From eaede89761c97292b0c929abbcc0d2765235a46e Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 20 Jun 2013 21:34:35 +0200 Subject: [PATCH] Support tex level factor 000001 (fixed at 0, that is, mipmapping off) --- GPU/GLES/DisplayListInterpreter.cpp | 5 ++--- GPU/GLES/TextureCache.cpp | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/GPU/GLES/DisplayListInterpreter.cpp b/GPU/GLES/DisplayListInterpreter.cpp index 118575425e3e..af91a48b3b0a 100644 --- a/GPU/GLES/DisplayListInterpreter.cpp +++ b/GPU/GLES/DisplayListInterpreter.cpp @@ -956,9 +956,8 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { break; case GE_CMD_TEXLEVEL: - if (data == 1) - WARN_LOG_REPORT_ONCE(texLevel1, G3D, "Unsupported texture level bias settings: %06x", data) - else if (data != 0) + // We support 000001, it means fixed at mip level 0. Don't report 0 as it's normal. + if (data != 1 && data != 0) WARN_LOG_REPORT_ONCE(texLevel2, G3D, "Unsupported texture level bias settings: %06x", data); break; #endif diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 39984d410cfb..82772eb823e8 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -492,6 +492,9 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) { bool sClamp = gstate.texwrap & 1; bool tClamp = (gstate.texwrap>>8) & 1; + + bool noMip = gstate.texlevel == 0x000001; // Fix texlevel at 0 + if (entry.maxLevel == 0) { // Enforce no mip filtering, for safety. minFilt &= 1; // no mipmaps yet @@ -511,7 +514,7 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) { minFilt |= 1; } - if (!g_Config.bMipMap) { + if (!g_Config.bMipMap || noMip) { magFilt &= 1; minFilt &= 1; }