From 9c001c3f59a7e0b6b0d8d827a0d1fbd4c404f42e Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 20 Oct 2025 17:13:50 +0100 Subject: [PATCH] Fix D3D12 pixel history not properly picking up discarded fragments --- renderdoc/driver/d3d12/d3d12_pixelhistory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp index 8919cf4f1..a3c901bde 100644 --- a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp +++ b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp @@ -1093,8 +1093,7 @@ struct D3D12ColorAndStencilCallback : public D3D12PixelHistoryCallback params.depthcopy = true; params.planeSlice = 1; params.multisampled = m_CallbackInfo.targetDesc.SampleDesc.Count > 1; - CopyImagePixel(cmd, params, - storeOffset + offsetof(struct D3D12EventInfo, dsWithoutShaderDiscard)); + CopyImagePixel(cmd, params, storeOffset + offsetof(struct D3D12EventInfo, dsWithShaderDiscard)); // TODO: In between draws, do we need to reset the depth/stencil value? @@ -1106,7 +1105,8 @@ struct D3D12ColorAndStencilCallback : public D3D12PixelHistoryCallback ReplayDraw(cmd, eid, true); - CopyImagePixel(cmd, params, storeOffset + offsetof(struct D3D12EventInfo, dsWithShaderDiscard)); + CopyImagePixel(cmd, params, + storeOffset + offsetof(struct D3D12EventInfo, dsWithoutShaderDiscard)); } // Restore the state.