mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-06 04:33:49 +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
@@ -230,7 +230,7 @@ void TextureCacheCommon::SetTexture(bool force) {
|
||||
|
||||
u8 level = 0;
|
||||
if (IsFakeMipmapChange())
|
||||
level = (gstate.texlevel >> 20) & 0xF;
|
||||
level = std::max(0, gstate.getTexLevelOffset16() / 16);
|
||||
u32 texaddr = gstate.getTextureAddress(level);
|
||||
if (!Memory::IsValidAddress(texaddr)) {
|
||||
// Bind a null texture and return.
|
||||
|
||||
Reference in new issue
Block a user