Merge pull request #16422 from hrydgard/old-adreno-gl-compat-flag

Add compat flag / bug check for games on old Adreno/GL affected by #16015
This commit is contained in:
Henrik Rydgård 2022-11-24 10:47:16 +01:00 committed by GitHub
commit 158f6fc111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 80 additions and 1 deletions

View File

@ -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) {

View File

@ -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)";
}
}

View File

@ -339,6 +339,7 @@ public:
MALI_CONSTANT_LOAD_BUG = 9,
SUBPASS_FEEDBACK_BROKEN = 10,
GEOMETRY_SHADERS_SLOW_OR_BROKEN = 11,
ADRENO_RESOURCE_DEADLOCK = 12,
MAX_BUG,
};

View File

@ -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) {

View File

@ -91,6 +91,7 @@ struct CompatFlags {
bool NearestFilteringOnFramebufferCreate;
bool SecondaryTextureCache;
bool EnglishOrJapaneseOnly;
bool OldAdrenoPixelDepthRoundingGL;
};
struct VRCompat {

View File

@ -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) {

View File

@ -1269,4 +1269,67 @@ NPJH50408 = true
# Twinbee Portable, see issue #16382
ULAS42089 = true
ULJM05221 = true
ULJM05323 = true
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