mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Detect the simplest Tactics Ogre case (US/EU) early
Removes the need for the compat.ini flag for these versions, since we can just treat the texture exactly as a regular 2D texture.
This commit is contained in:
1 parent
86b37dc64a
commit
30a165b1dd
2 files changed
+15
-12
No files matched your search
@@ -2777,15 +2777,22 @@ bool TextureCacheCommon::PrepareBuildTexture(BuildTexturePlan &plan, TexCacheEnt
|
||||
int tw = gstate.getTextureWidth(0);
|
||||
int th = gstate.getTextureHeight(0);
|
||||
bool pure3D = true;
|
||||
if (!isFakeMipmapChange) {
|
||||
for (int i = 0; i < plan.levelsToLoad; i++) {
|
||||
if (gstate.getTextureWidth(i) != gstate.getTextureWidth(0) || gstate.getTextureHeight(i) != gstate.getTextureHeight(0)) {
|
||||
pure3D = false;
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < plan.levelsToLoad; i++) {
|
||||
if (gstate.getTextureWidth(i) != gstate.getTextureWidth(0) || gstate.getTextureHeight(i) != gstate.getTextureHeight(0)) {
|
||||
pure3D = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
// Check early for the degenerate case from Tactics Ogre.
|
||||
if (pure3D && plan.levelsToLoad == 2 && gstate.getTextureAddress(0) == gstate.getTextureAddress(1)) {
|
||||
// Simply treat it as a regular 2D texture, no fake mipmaps or anything
|
||||
plan.levelsToLoad = 1;
|
||||
isFakeMipmapChange = false;
|
||||
pure3D = false;
|
||||
} else if (isFakeMipmapChange) {
|
||||
// We don't want to create a volume texture, if this is a "fake mipmap change".
|
||||
// In practice due to the compat flag, the only time we end up here is in JP Tactics Ogre.
|
||||
pure3D = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user