-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvapi-d3d: Just error out of GetCurrentSLIState #279
Conversation
This feels wrong, at least for the purposes of fixing one game... NV docs suggest that an error from the nvapi call should even be interpreted by a game as 'prompt the player to upgrade their driver' which is counterproductive. https://docs.nvidia.com/gameworks/content/technologies/desktop/sli_using_nvapi.htm The fix would be to figure out why this game is happy with the result from real nvapi and unhappy with the result from dxvk-nvapi. dxvk-nvapi's implementation looks sensible at first glance but I wouldn't be surprised if a game expects numAFRGroups to be 0 instead of 1. |
I tested that. It did not fix it. I guess I need to see what Windows returns. |
Okay I did thorough testing on Windows. The docs don't list
|
The failed CI test isn't caused by the PR. |
It is, you just looked at the wrong message:
|
Should be fixed now. |
Nice (and surprising) discoveries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the research and fix, very cool!
Minor nit, otherwise LGTM! If you are at it, you could tweak the commit message slightly since it feels a bit more graceful now than just "error out". But also ok if you want to keep it like it is.
This is what NvAPI returns on Windows. Fallout New Vegas seems to think it's running on an SLI system if it get's SUCCESS as the returned status from GetCurrentSLIState regardless of the contents of the state struct.
Fallout New Vegas seems to think it's running on an SLI system unless we just error out here.
I also tried setting
maxNumAFRGroups
andnumAFRGroups
both to 0 but that didn't fix it either.Additionally I tried just setting
numAFRGroups
to 0 and keepingmaxNumAFRGroups
at 1 but that didn't work either.The Nvidia sample suggests what we have right now is a valid implementation:
bSLIEnabled = (gMaxNumAFRGroups > 1);
but it appears that the check in Fallout isn't particularly robust.So I suggest we just return an error when the function gets called. Alternatively we could return null pointers for the SLI functions in
QueryInterface
. I don't have a test setup for Nvapi on Windows right now, so I can't check what Nvidia does on Windows these days without a lot of effort.Fixes: doitsujin/dxvk#4696
ValveSoftware/Proton#356 (comment)