[d3d9] Tweak VCache query results #4020
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not entirely sure which games relied on this being exposed anyway, but here's a bit more insight into how this obscure query is supposed to work: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3d9types/ns-d3d9types-_d3ddevinfo_vcache
Also this is what you get with native 45.23 Nvidia drivers, on Windows XP, with a GeForce 4:
dxvk currently does:
Since I'm guessing CacheSize refers to the number of internal cached buffers the driver holds, it's probably safe to assume a d3d9-era card reported somewhat higher numbers (hence the doubling in this PR).
As for the 🪄 number, allegedly:
... whatever that means. So copied over native behavior of
CacheSize/2 - 1
here.As far as I can tell, at least with d3d8, the results are entirely static, so this should be good enough. WineD3D actually just returns a bunch of gibberish.
I'll undraft this once I figure out what native drivers report these days.