From 50976369db7657ebeec48e52c57f16d0e64d630d Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 15 Oct 2025 16:43:57 +0100 Subject: [PATCH] Depth clears are considered to have depth in D3D12 pixel history --- renderdoc/driver/d3d12/d3d12_pixelhistory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp index 621822cb4..ccaae7f41 100644 --- a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp +++ b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp @@ -2922,8 +2922,10 @@ rdcarray D3D12Replay::PixelHistory(rdcarray event bool directWrite = IsDirectWrite(usage); EventInfo eventInfo = {}; const ActionDescription *action = m_pDevice->GetAction(eventId); - eventInfo.hasDepth = - (action->flags & (ActionFlags::MeshDispatch | ActionFlags::Drawcall)) ? true : false; + eventInfo.hasDepth = (action->flags & (ActionFlags::MeshDispatch | ActionFlags::Drawcall | + ActionFlags::ClearDepthStencil)) + ? true + : false; D3D12_RESOURCE_STATES resourceState = D3D12_RESOURCE_STATE_RENDER_TARGET; if(IsUavWrite(usage)) @@ -2956,7 +2958,6 @@ rdcarray D3D12Replay::PixelHistory(rdcarray event if(directWrite || clear) { modEvents.push_back(eventId); - RDCASSERT(eventInfo.hasDepth == false); } else {