diff --git a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp index 5f7d61d5a..e7bf445c6 100644 --- a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp +++ b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp @@ -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] = {}; diff --git a/renderdoc/driver/vulkan/vk_pixelhistory.cpp b/renderdoc/driver/vulkan/vk_pixelhistory.cpp index 12ca78961..58b91c039 100644 --- a/renderdoc/driver/vulkan/vk_pixelhistory.cpp +++ b/renderdoc/driver/vulkan/vk_pixelhistory.cpp @@ -4868,8 +4868,10 @@ rdcarray VulkanReplay::PixelHistory(rdcarray 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; + } } }