mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Treat read-only DSVs as depth writes disabled for overlays on D3D
This commit is contained in:
@@ -1570,6 +1570,10 @@ ResourceId D3D11Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
|
||||
d.FrontFace = cur.FrontFace;
|
||||
d.BackFace = cur.BackFace;
|
||||
}
|
||||
if(dsViewDesc.Flags & D3D11_DSV_READ_ONLY_DEPTH)
|
||||
d.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;
|
||||
if(dsViewDesc.Flags & D3D11_DSV_READ_ONLY_STENCIL)
|
||||
d.StencilWriteMask = 0;
|
||||
|
||||
SAFE_RELEASE(os);
|
||||
hr = m_pDevice->CreateDepthStencilState(&d, &os);
|
||||
|
||||
@@ -2210,6 +2210,12 @@ ResourceId D3D12Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
|
||||
}
|
||||
}
|
||||
|
||||
if(dsViewDesc.Flags & D3D12_DSV_FLAG_READ_ONLY_DEPTH)
|
||||
psoDesc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ZERO;
|
||||
if(dsViewDesc.Flags & D3D12_DSV_FLAG_READ_ONLY_STENCIL)
|
||||
psoDesc.DepthStencilState.FrontFace.StencilWriteMask =
|
||||
psoDesc.DepthStencilState.BackFace.StencilWriteMask = 0;
|
||||
|
||||
RDCEraseEl(psoDesc.RTVFormats.RTFormats);
|
||||
psoDesc.RTVFormats.RTFormats[0] = DXGI_FORMAT_R16G16B16A16_FLOAT;
|
||||
psoDesc.RTVFormats.NumRenderTargets = 1;
|
||||
|
||||
Reference in New Issue
Block a user