1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[d3d9] Fix unbinding RTs

Fixes a regression with 8560efa3c7 in ND1.

Also more optimized.
This commit is contained in:
Joshua Ashton 2023-06-24 03:41:31 +01:00
parent 362743c1d6
commit 6b60de2d31

View File

@ -3394,7 +3394,7 @@ namespace dxvk {
if (shader != nullptr) { if (shader != nullptr) {
m_flags.set(D3D9DeviceFlag::DirtyFFPixelShader); m_flags.set(D3D9DeviceFlag::DirtyFFPixelShader);
BindShader<DxsoProgramTypes::PixelShader>(GetCommonShader(shader)); BindShader<DxsoProgramTypes::PixelShader>(newShader);
newShaderMasks = newShader->GetShaderMask(); newShaderMasks = newShader->GetShaderMask();
} }
else { else {
@ -3408,7 +3408,9 @@ namespace dxvk {
// If we have any RTs we would have bound to the the FB // If we have any RTs we would have bound to the the FB
// not in the new shader mask, mark the framebuffer as dirty // not in the new shader mask, mark the framebuffer as dirty
// so we unbind them. // so we unbind them.
if (m_boundRTs & m_anyColorWrites & m_psShaderMasks.rtMask & (~newShaderMasks.rtMask)) uint32_t oldUseMask = m_activeRTs & m_psShaderMasks.rtMask;
uint32_t newUseMask = m_activeRTs & newShaderMasks.rtMask;
if (oldUseMask != newUseMask)
m_flags.set(D3D9DeviceFlag::DirtyFramebuffer); m_flags.set(D3D9DeviceFlag::DirtyFramebuffer);
if (m_psShaderMasks.samplerMask != newShaderMasks.samplerMask || if (m_psShaderMasks.samplerMask != newShaderMasks.samplerMask ||