GPU: Fix negative mip levels with const workaround.

Might've crashed if it hit a negative level before.
This commit is contained in:
Unknown W. Brackets committed 2017-05-31 21:42:07 -07:00
1 parent b6375638f5
commit f66ffb9ffe
5 files changed
+10 -6

No files matched your search

+1 -1
View File
@@ -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.