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
D3D: Fixed D3D validation error during EFB to texture copy #1689
Conversation
Texture was being bound as a render target while still being set as a shader resource. D3D automatically unbinds the SRV in this case and generates a validation error. The fix is to manually unbind SRV, render into it and then re-bind to old slots.
|
LGTM in fixing the bugs. |
|
Fixes the bugs reported in Metroid Prime |
|
Fixes some textures being black instead in Rune Factory: Frontier. |
|
This PR fixes a lot of issues in several games, including Super Smash Bros Melee, The Legend of Zelda The Wind Waker and Donkey Kong Country Returns. As seen on: https://forums.dolphin-emu.org/Thread-4-0-4583-d3d-regression-donkey-kong-country-returns |
|
I dunno if anything is holding this up except review. Time to be patient :) |
|
code LGTM |
|
I tested this a good deal. No issues to report. |
| _BitScanForward(&index, textureSlotMask); | ||
| D3D::stateman->SetTexture(index, texture->GetSRV()); | ||
| textureSlotMask &= ~(1 << index); | ||
| } |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
What's up with buildbot pr-deb* configs? |
|
sorry, that was me. @dolphin-emu-bot rebuild |
dfbb871
to
819f06d
Compare
819f06d
to
5688c27
Compare
|
Is there anything else to test with the Pull request? |
|
@JMC47 Unless the last commit has introduced some weird issue I doubt it. |
|
LGTM, this PR fixes Luigi's Mansion. It basically fixes every game that uses EFB copies. |
D3D: Fixed D3D validation error during EFB to texture copy
Texture was being bound as a render target while still being set as a shader resource.
D3D automatically unbinds the SRV in this case and generates a validation error.
The fix is to manually unbind SRV, render into it and then re-bind to old slots.
This was responsible for https://code.google.com/p/dolphin-emu/issues/detail?id=7929 and quite likely https://forums.dolphin-emu.org/Thread-4-0-4583-d3d-regression?pid=348967