Fix D3D12 pixel history not properly picking up discarded fragments

This commit is contained in:
baldurk
2025-10-27 11:50:35 +00:00
parent f459440d03
commit 9c001c3f59
@@ -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.