From a7543ab36590877c6804d516be5abf23687eb398 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 31 May 2024 20:39:31 +1000 Subject: [PATCH] GPU/HW: Fix crash on VRAM write/copy with mask test --- src/core/gpu_hw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 003ed6b7f..a22a2dac1 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -1116,7 +1116,7 @@ bool GPU_HW::CompilePipelines() plconfig.fragment_shader = fs.get(); for (u8 depth_test = 0; depth_test < 2; depth_test++) { - if (depth_test && write_mask_as_depth) + if (depth_test && !write_mask_as_depth) continue; plconfig.depth.depth_write = needs_depth_buffer; @@ -1146,7 +1146,7 @@ bool GPU_HW::CompilePipelines() plconfig.fragment_shader = fs.get(); for (u8 depth_test = 0; depth_test < 2; depth_test++) { - if (depth_test && write_mask_as_depth) + if (depth_test && !write_mask_as_depth) continue; plconfig.depth.depth_write = needs_depth_buffer;