D3D12Device: Unbind all render targets when one is destroyed

Clearing just the destroyed slot left a null entry that the next render
pass dereferenced. Matches Vulkan.
This commit is contained in:
Stenzek committed 2026-10-19 16:45:14 +10:00
1 parent af211cb60e
commit 0dc05598bd
1 file changed
+2 -3
+2 -3
View File
@@ -2156,9 +2156,8 @@ void D3D12Device::UnbindTexture(D3D12Texture* tex)
{
if (m_current_render_targets[i] == tex)
{
if (InRenderPass())
EndRenderPass();
m_current_render_targets[i] = nullptr;
SetRenderTargets(nullptr, 0, m_current_depth_target);
break;
}
}
}