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

[d3d9] Refactor D3D9ShaderValidator and enable input count validation only for The Void #4538

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WinterSnowfall
Copy link
Contributor

Fixes #4537. I had hoped the input count validation would work globally, but apparently it regresses that particular game.

There's no nicer way to handle this unfortunately, since we're dealing with entirely undocumented behavior, so I've hidden the offending validation behind a config option and enabled it only for The Void, the only known game that actually needs it.

Also part of this PR, I've refactored the code to sit in its own .cpp file (as I should have done from the start really).

@WinterSnowfall WinterSnowfall marked this pull request as ready for review December 22, 2024 16:02
@doitsujin
Copy link
Owner

doitsujin commented Dec 30, 2024

What exactly does the validation in question do, what do the shaders in The Void look like that cause it to fail, and why does it break the other game?

@WinterSnowfall
Copy link
Contributor Author

WinterSnowfall commented Dec 30, 2024

What exactly does the validation in question do, what do the shaders in The Void look like that cause it to fail, and why does it break the other game?

The validation in question fails if a PS 3.0 uses more than 10 (higher than index 9) input registers. This is (apparently) what The Void relies on to work correctly.

As to why the game on #4537 takes issue with it, no idea, as it's no longer available for purchase, but since the validation is pretty specific, I'm sure it uses a higher than 9 index in a PS 3.0 for some reason. As of now it's the only other game (with the exception of The Void of course) that we know of to do that, but in its case it doesn't expect the validation to fail.

TLDR, this entire thing is a mess even by d3d9 standards, but since in practice only The Void needs it, I think the PR isn't too far of an ask. I lost count how many config options we have specifically for Sims 2, so we might as well have a very dubious one for The Void, at least until (if ever) we get an exact idea what the intended behavior is here, if it differs based on OS versions etc.

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.

DXVK 2.5.2 causes FPS drop due to shader issues
2 participants