diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp index e2857ae970..4bc9049d5f 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp @@ -2350,13 +2350,12 @@ GSTexture12* GSDevice12::SetupPrimitiveTrackingDATE(GSHWDrawConfig& config, Pipe OMSetRenderTargets(image, config.ds, config.drawarea); // if the depth target has been cleared, we need to preserve that clear - BeginRenderPass( - D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE, - GetLoadOpForTexture(static_cast(config.ds)), + BeginRenderPass(D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE, + config.ds ? GetLoadOpForTexture(static_cast(config.ds)) : + D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS, config.ds ? D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE : D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS, D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS, - GSVector4::zero(), - static_cast(config.ds)->GetClearDepth()); + GSVector4::zero(), config.ds ? static_cast(config.ds)->GetClearDepth() : 0.0f); // draw the quad to prefill the image const GSVector4 src = GSVector4(config.drawarea) / GSVector4(rtsize).xyxy();