From 2432a5cc748042eadf8073a23f8036f856542224 Mon Sep 17 00:00:00 2001 From: DH Date: Tue, 22 Oct 2024 15:18:31 +0300 Subject: [PATCH] gpu: fix segfault on invalid depth format --- rpcsx/gpu/Renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcsx/gpu/Renderer.cpp b/rpcsx/gpu/Renderer.cpp index 9d80fcee9..d3335fb61 100644 --- a/rpcsx/gpu/Renderer.cpp +++ b/rpcsx/gpu/Renderer.cpp @@ -187,7 +187,7 @@ void amdgpu::draw(GraphicsPipe &pipe, int vmId, std::uint32_t firstVertex, auto depthAccess = Access::None; auto stencilAccess = Access::None; - if (pipe.context.dbDepthControl.depthEnable) { + if (pipe.context.dbDepthControl.depthEnable && pipe.context.dbZInfo.format != gnm::kZFormatInvalid) { if (!pipe.context.dbRenderControl.depthClearEnable) { depthAccess |= Access::Read; }