diff --git a/Common/GPU/OpenGL/thin3d_gl.cpp b/Common/GPU/OpenGL/thin3d_gl.cpp index 9878886fd0de..18da422ca24b 100644 --- a/Common/GPU/OpenGL/thin3d_gl.cpp +++ b/Common/GPU/OpenGL/thin3d_gl.cpp @@ -645,6 +645,11 @@ OpenGLContext::OpenGLContext() { bugs_.Infest(Bugs::PVR_GENMIPMAP_HEIGHT_GREATER); } + if (caps_.vendor == GPUVendor::VENDOR_QUALCOMM) { + if (gl_extensions.modelNumber < 600) + bugs_.Infest(Bugs::ADRENO_RESOURCE_DEADLOCK); + } + #if PPSSPP_PLATFORM(IOS) // For some reason, this bug does not appear on M1. if (caps_.vendor == GPUVendor::VENDOR_APPLE) { diff --git a/Common/GPU/thin3d.cpp b/Common/GPU/thin3d.cpp index fab4e665d18d..2713aef555bb 100644 --- a/Common/GPU/thin3d.cpp +++ b/Common/GPU/thin3d.cpp @@ -733,6 +733,8 @@ const char *Bugs::GetBugName(uint32_t bug) { case RASPBERRY_SHADER_COMP_HANG: return "RASPBERRY_SHADER_COMP_HANG"; case MALI_CONSTANT_LOAD_BUG: return "MALI_CONSTANT_LOAD_BUG"; case SUBPASS_FEEDBACK_BROKEN: return "SUBPASS_FEEDBACK_BROKEN"; + case GEOMETRY_SHADERS_SLOW_OR_BROKEN: return "GEOMETRY_SHADERS_SLOW_OR_BROKEN"; + case ADRENO_RESOURCE_DEADLOCK: return "ADRENO_RESOURCE_DEADLOCK"; default: return "(N/A)"; } } diff --git a/Common/GPU/thin3d.h b/Common/GPU/thin3d.h index 53d35250ceb9..0f1a8b86bb93 100644 --- a/Common/GPU/thin3d.h +++ b/Common/GPU/thin3d.h @@ -339,6 +339,7 @@ class Bugs { MALI_CONSTANT_LOAD_BUG = 9, SUBPASS_FEEDBACK_BROKEN = 10, GEOMETRY_SHADERS_SLOW_OR_BROKEN = 11, + ADRENO_RESOURCE_DEADLOCK = 12, MAX_BUG, }; diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index d3d65861e006..6541cc53b306 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -120,6 +120,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) { CheckSetting(iniFile, gameID, "NearestFilteringOnFramebufferCreate", &flags_.NearestFilteringOnFramebufferCreate); CheckSetting(iniFile, gameID, "SecondaryTextureCache", &flags_.SecondaryTextureCache); CheckSetting(iniFile, gameID, "EnglishOrJapaneseOnly", &flags_.EnglishOrJapaneseOnly); + CheckSetting(iniFile, gameID, "OldAdrenoPixelDepthRoundingGL", &flags_.OldAdrenoPixelDepthRoundingGL); } void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) { diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 6755afe7a94a..aee9f2c41b5b 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -91,6 +91,7 @@ struct CompatFlags { bool NearestFilteringOnFramebufferCreate; bool SecondaryTextureCache; bool EnglishOrJapaneseOnly; + bool OldAdrenoPixelDepthRoundingGL; }; struct VRCompat { diff --git a/GPU/GLES/GPU_GLES.cpp b/GPU/GLES/GPU_GLES.cpp index a43cdd24674a..c110380c91a7 100644 --- a/GPU/GLES/GPU_GLES.cpp +++ b/GPU/GLES/GPU_GLES.cpp @@ -191,6 +191,12 @@ u32 GPU_GLES::CheckGPUFeatures() const { features = CheckGPUFeaturesLate(features); + if (draw_->GetBugs().Has(Draw::Bugs::ADRENO_RESOURCE_DEADLOCK) && g_Config.bVendorBugChecksEnabled) { + if (PSP_CoreParameter().compat.flags().OldAdrenoPixelDepthRoundingGL) { + features |= GPU_ROUND_FRAGMENT_DEPTH_TO_16BIT; + } + } + // This is a bit ugly, but lets us reuse most of the depth logic in GPUCommon. if (features & GPU_ROUND_FRAGMENT_DEPTH_TO_16BIT) { if (gl_extensions.IsGLES && !gl_extensions.GLES3) { diff --git a/assets/compat.ini b/assets/compat.ini index 425164cf589f..0f334cb6d9ad 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -1269,4 +1269,67 @@ NPJH50408 = true # Twinbee Portable, see issue #16382 ULAS42089 = true ULJM05221 = true -ULJM05323 = true \ No newline at end of file +ULJM05323 = true + +[OldAdrenoPixelDepthRoundingGL] +# See #16015 + +# Naruto Shippuden: Ultimate Ninja Impact +ULUS10582 = true +ULES01537 = true +ULJS00390 = true +ULAS42297 = true +ULJS19071 = true +NPJH50435 = true +NPJH50435 = true + +# Kingdom Hearts - Birth By Sleep +ULES01441 = true +ULJM05600 = true +ULUS10505 = true +ULJM05775 = true # Final MIX +PSPJ30012 = true +UCAS40295 = true +UCKS45143 = true +UCAS40317 = true +UCAS40326 = true +UCKS45168 = true +ULJM06213 = true +ULJM06214 = true + +# Monster Hunter Portable 3rd +NPJB40001 = true +NPJH55800 = true +ULJM05800 = true +ULJM08058 = true + +# Persona 3 Portable +ULES01523 = true +ULUS10512 = true +UCAS40288 = true +ULJM05489 = true +UCKS45140 = true +ULJM08044 = true +NPJH50040 = true +UCKS45175 = true + +# Hack/Link +ULJS00266 = true +ULJS00279 = true +ULJS19058 = true + +# Midnight Club: LA Remix +ULUS10383 = true +ULES01144 = true +ULJS00180 = true +ULJS00267 = true +ULJM05904 = true +NPJH50440 = true + +# ModNation Racers +UCES01327 = true +UCUS98741 = true +UCAS40306 = true +UCJS10112 = true +NPJG00116 = true +NPUG70097 = true # Demo