Skip to content

Commit

Permalink
Don't do the texture size check for the built-in font texture.
Browse files Browse the repository at this point in the history
Fixes #18483
Fixes #18479
  • Loading branch information
hrydgard committed Dec 7, 2023
1 parent 7e5090c commit 7bf8023
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions GPU/Common/TextureCacheCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2812,19 +2812,17 @@ bool TextureCacheCommon::PrepareBuildTexture(BuildTexturePlan &plan, TexCacheEnt
plan.w = gstate.getTextureWidth(0);
plan.h = gstate.getTextureHeight(0);

if (!g_DoubleTextureCoordinates) {
// Refuse to load invalid-ly sized textures, which can happen through display list corruption.
if (plan.w > 512 || plan.h > 512) {
ERROR_LOG(G3D, "Bad texture dimensions: %dx%d", plan.w, plan.h);
return false;
}
}

bool isPPGETexture = entry->addr >= PSP_GetKernelMemoryBase() && entry->addr < PSP_GetKernelMemoryEnd();

// Don't scale the PPGe texture.
if (isPPGETexture) {
plan.scaleFactor = 1;
} else if (!g_DoubleTextureCoordinates) {
// Refuse to load invalid-ly sized textures, which can happen through display list corruption.
if (plan.w > 512 || plan.h > 512) {
ERROR_LOG(G3D, "Bad texture dimensions: %dx%d", plan.w, plan.h);
return false;
}
}

if (PSP_CoreParameter().compat.flags().ForceLowerResolutionForEffectsOn && gstate.FrameBufStride() < 0x1E0) {
Expand Down

0 comments on commit 7bf8023

Please sign in to comment.