From bd0c40367254c28666b17518e7781c1de5143127 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 2 Aug 2020 13:04:24 +1000 Subject: [PATCH] GPU/HW: Fix mask bit test regression Fixes white boxes in Silent Hill. Again. --- src/core/gpu_hw.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index f544451c8..0787611c4 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -212,13 +212,13 @@ void GPU_HW::FixLineVertexCoordinates(s32& start_x, s32& start_y, s32& end_x, s3 void GPU_HW::LoadVertices() { + if (m_GPUSTAT.check_mask_before_draw) + m_current_depth++; + const RenderCommand rc{m_render_command.bits}; const u32 texpage = ZeroExtend32(m_draw_mode.mode_reg.bits) | (ZeroExtend32(m_draw_mode.palette_reg) << 16); const float depth = GetCurrentNormalizedVertexDepth(); - if (m_GPUSTAT.check_mask_before_draw) - m_current_depth++; - switch (rc.primitive) { case Primitive::Polygon: