Skip to content
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

[d3d8] Return S_FALSE if VCache queries are unsupported #212

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

WinterSnowfall
Copy link

@WinterSnowfall WinterSnowfall commented May 25, 2024

Related to doitsujin#4020. While testing the behavior on native platforms, I uncovered the fact that native drivers actually adhered to spec and returned S_FALSE when VCache queries are unsupported.

Additionally, both modern AMD drivers and ATI native drivers of old (on WinXP) zero out the return struct:

Listing VCache query result:
  ~ Response: S_FALSE
  ~ Pattern: 0
  ~ OptMethod: 0
  ~ CacheSize: 0
  ~ MagicNumber: 0

The behavior on Nvidia is correct and we should be inline with what d3d9 returns.

I'm not entirely sure if I've implemented this correctly, but I rather added the D3DDEVINFO_VCACHE struct declaration to our headers than messing about with D3D9Types.h. Let me know if that's a problem.

src/d3d8/d3d8_device.cpp Outdated Show resolved Hide resolved
@WinterSnowfall
Copy link
Author

I've moved the definition of D3DDEVINFO_VCACHE as part of d3d8_include.h, since AFAIU it should be included in d3d8.h (but MinGW doesn't seem to provide it). @AlpyneDreams In case MSVC has it, let me know, and we can gate it behind an ifdef.

@AlpyneDreams AlpyneDreams merged commit 8a18e13 into AlpyneDreams:main Jul 7, 2024
4 checks passed
@WinterSnowfall WinterSnowfall deleted the d8vk-vcache branch July 7, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants