From c5a10a5501108dbb60014981e8b68762f12050c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 11 Jul 2022 16:57:52 +0200 Subject: [PATCH] Tweak the Mali stencil-test workaround to work for Surf's Up. See #15016 --- GPU/Common/ShaderId.cpp | 2 +- assets/compat.ini | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/GPU/Common/ShaderId.cpp b/GPU/Common/ShaderId.cpp index cbfbeeffa3..2a7441a92f 100644 --- a/GPU/Common/ShaderId.cpp +++ b/GPU/Common/ShaderId.cpp @@ -345,7 +345,7 @@ void ComputeFragmentShaderID(FShaderID *id_out, const Draw::Bugs &bugs) { } else if (bugs.Has(Draw::Bugs::MALI_STENCIL_DISCARD_BUG) && PSP_CoreParameter().compat.flags().MaliDepthStencilBugWorkaround) { // Very similar driver bug to the Adreno one, with the same workaround (though might look into if there are cheaper ones!) // Keeping the conditions separate since it can probably be made tighter. - id.SetBit(FS_BIT_NO_DEPTH_CANNOT_DISCARD_STENCIL, !IsStencilTestOutputDisabled() && !gstate.isDepthWriteEnabled()); + id.SetBit(FS_BIT_NO_DEPTH_CANNOT_DISCARD_STENCIL, !IsStencilTestOutputDisabled() && (!gstate.isDepthTestEnabled() || !gstate.isDepthWriteEnabled())); } } } diff --git a/assets/compat.ini b/assets/compat.ini index 1e2c6214ed..1ce22fbdcf 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -611,6 +611,11 @@ ULES00978 = true ULES00977 = true ULES00976 = true +# Surf's Up - see issue #15016 +ULES00816 = true +ULES00817 = true +ULUS10262 = true + [RequireDefaultCPUClock] # GOW : Ghost of Sparta UCUS98737 = true