Skip to content

Commit c5a10a5

Browse files
committed
Tweak the Mali stencil-test workaround to work for Surf's Up. See #15016
1 parent c8739d5 commit c5a10a5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

GPU/Common/ShaderId.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ void ComputeFragmentShaderID(FShaderID *id_out, const Draw::Bugs &bugs) {
345345
} else if (bugs.Has(Draw::Bugs::MALI_STENCIL_DISCARD_BUG) && PSP_CoreParameter().compat.flags().MaliDepthStencilBugWorkaround) {
346346
// Very similar driver bug to the Adreno one, with the same workaround (though might look into if there are cheaper ones!)
347347
// Keeping the conditions separate since it can probably be made tighter.
348-
id.SetBit(FS_BIT_NO_DEPTH_CANNOT_DISCARD_STENCIL, !IsStencilTestOutputDisabled() && !gstate.isDepthWriteEnabled());
348+
id.SetBit(FS_BIT_NO_DEPTH_CANNOT_DISCARD_STENCIL, !IsStencilTestOutputDisabled() && (!gstate.isDepthTestEnabled() || !gstate.isDepthWriteEnabled()));
349349
}
350350
}
351351
}

assets/compat.ini

+5
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,11 @@ ULES00978 = true
611611
ULES00977 = true
612612
ULES00976 = true
613613

614+
# Surf's Up - see issue #15016
615+
ULES00816 = true
616+
ULES00817 = true
617+
ULUS10262 = true
618+
614619
[RequireDefaultCPUClock]
615620
# GOW : Ghost of Sparta
616621
UCUS98737 = true

0 commit comments

Comments
 (0)