The depth bounds test doesn't run if there is no depth target bound

This commit is contained in:
baldurk
2025-10-12 12:15:49 +01:00
parent f626625490
commit cf42a3ea5c
2 changed files with 5 additions and 2 deletions
@@ -1420,7 +1420,8 @@ struct D3D12TestsFailedCallback : public D3D12PixelHistoryCallback
D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC pipeDesc;
origPSO->Fill(pipeDesc);
if(pipeDesc.DepthStencilState.DepthBoundsTestEnable)
// When a depth buffer is not bound (e.g. when TIR is enabled), the Depth Bounds Test must always pass.
if(pipeDesc.DepthStencilState.DepthBoundsTestEnable && pipeState.GetDSVID() != ResourceId())
m_EventDepthBounds[eid] = {pipeState.depthBoundsMin, pipeState.depthBoundsMax};
else
m_EventDepthBounds[eid] = {};
+3 -1
View File
@@ -4868,8 +4868,10 @@ rdcarray<PixelModification> VulkanReplay::PixelHistory(rdcarray<EventUsage> even
if((history[h].preMod.depth < depthBounds.first ||
history[h].preMod.depth > depthBounds.second) &&
depthBounds.second > depthBounds.first)
depthBounds.second > depthBounds.first && dfmt != VK_FORMAT_UNDEFINED)
{
history[h].depthBoundsFailed = true;
}
}
}