mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Fix D3D12 pixel history missing stencil copy.
* When viewing pixel history on a depth stencil, the depth value was copied but the stencil value was not.
This commit is contained in:
committed by
Jake Turner
parent
6895194805
commit
4815adaa83
@@ -1074,6 +1074,20 @@ private:
|
||||
|
||||
CopyImagePixel(cmd, targetCopyParams, offset);
|
||||
|
||||
if(IsDepthAndStencilFormat(m_CallbackInfo.targetDesc.Format))
|
||||
{
|
||||
D3D12CopyPixelParams stencilCopyParams = targetCopyParams;
|
||||
stencilCopyParams.srcImageFormat =
|
||||
GetDepthSRVFormat(m_CallbackInfo.targetImage->GetDesc().Format, 1);
|
||||
stencilCopyParams.copyFormat = DXGI_FORMAT_R8_TYPELESS;
|
||||
stencilCopyParams.planeSlice = 1;
|
||||
stencilCopyParams.srcImageState =
|
||||
m_SavedState.dsv.GetDSV().Flags & D3D12_DSV_FLAG_READ_ONLY_STENCIL
|
||||
? D3D12_RESOURCE_STATE_DEPTH_READ
|
||||
: D3D12_RESOURCE_STATE_DEPTH_WRITE;
|
||||
CopyImagePixel(cmd, stencilCopyParams, offset + sizeof(float));
|
||||
}
|
||||
|
||||
// If the target image is a depth/stencil view, we already copied the value above.
|
||||
if(IsDepthFormat(m_CallbackInfo.targetDesc.Format))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user