From be1d558be11daa96e68b1c36c6d63ff6e9b3852e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 15 Apr 2024 23:30:55 +1000 Subject: [PATCH] GPU/HW: Fix black screen in Metal after vertex ID wraparound --- src/core/gpu_hw.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index b6ae728ef..38356f5ef 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -2551,11 +2551,10 @@ void GPU_HW::EnsureVertexBufferSpaceForCurrentCommand() void GPU_HW::ResetBatchVertexDepth() { - if (m_pgxp_depth_buffer || !m_vram_depth_texture) - return; - Log_PerfPrint("Resetting batch vertex depth"); - UpdateDepthBufferFromMaskBit(); + + if (m_vram_depth_texture && !m_pgxp_depth_buffer) + UpdateDepthBufferFromMaskBit(); m_current_depth = 1; }