Skip to content

Commit

Permalink
GPU/HW: Fix crash on VRAM write/copy with mask test
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed May 31, 2024
1 parent 627c12b commit a7543ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/gpu_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a7543ab

Please sign in to comment.