mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-24 03:39:07 +02: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
@@ -630,7 +630,8 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
|
||||
}
|
||||
|
||||
if (entry->vkTex) {
|
||||
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);
|
||||
bool fakeMipmap = IsFakeMipmapChange() && level > 0;
|
||||
// Upload the texture data.
|
||||
for (int i = 0; i <= maxLevel; i++) {
|
||||
|
||||
Reference in new issue
Block a user