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

[d3d9] Optimize DS active hazard check

There can only be one DS, so no need to loop over.
This commit is contained in:
Joshua Ashton 2023-06-22 14:55:54 +01:00 committed by Joshie
parent b3cbe36c08
commit 3625c5d481

View File

@ -5624,9 +5624,9 @@ namespace dxvk {
}
}
for (uint32_t samplerIdx : bit::BitMask(m_activeHazardsDS)) {
if (m_activeHazardsDS != 0) {
// Guaranteed to not be nullptr...
auto tex = GetCommonTexture(m_state.textures[samplerIdx]);
auto tex = m_state.depthStencil->GetCommonTexture();
if (unlikely(!tex->MarkHazardous())) {
TransitionImage(tex, m_hazardLayout);
m_flags.set(D3D9DeviceFlag::DirtyFramebuffer);