mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01:00
GPU: Fix negative mip levels with const workaround.
Might've crashed if it hit a negative level before.
This commit is contained in:
1 parent
b6375638f5
commit
f66ffb9ffe
5 files changed
+10
-6
No files matched your search
@@ -688,7 +688,8 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag
|
||||
|
||||
// Always load base level texture here
|
||||
if (IsFakeMipmapChange()) {
|
||||
u8 level = (gstate.texlevel >> 20) & 0xF;
|
||||
// NOTE: Since the level is not part of the cache key, we assume it never changes.
|
||||
u8 level = std::max(0, gstate.getTexLevelOffset16() / 16);
|
||||
LoadTextureLevel(*entry, replaced, level, replaceImages, scaleFactor, dstFmt);
|
||||
} else
|
||||
LoadTextureLevel(*entry, replaced, 0, replaceImages, scaleFactor, dstFmt);
|
||||
|
||||
Reference in new issue
Block a user