From 659ee2c3f6e14d57fd6b1825dfe46c845f62ba4a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 1 Oct 2015 22:56:31 -0700 Subject: [PATCH] Ensure we update sampling params on tex update. --- GPU/GLES/TextureCache.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index f6e138aaab..352f15192b 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -1005,8 +1005,10 @@ void TextureCache::ApplyTexture() { } } - glBindTexture(GL_TEXTURE_2D, nextTexture_->textureName); - lastBoundTexture = nextTexture_->textureName; + if (nextTexture_->textureName != lastBoundTexture) { + glBindTexture(GL_TEXTURE_2D, nextTexture_->textureName); + lastBoundTexture = nextTexture_->textureName; + } UpdateSamplingParams(*nextTexture_, false); } @@ -1354,10 +1356,10 @@ void TextureCache::SetTexture(bool force) { //got one! entry->lastFrame = gpuStats.numFlips; if (entry->textureName != lastBoundTexture) { - nextTexture_ = entry; gstate_c.textureFullAlpha = entry->GetAlphaStatus() == TexCacheEntry::STATUS_ALPHA_FULL; gstate_c.textureSimpleAlpha = entry->GetAlphaStatus() != TexCacheEntry::STATUS_ALPHA_UNKNOWN; } + nextTexture_ = entry; VERBOSE_LOG(G3D, "Texture at %08x Found in Cache, applying", texaddr); return; //Done! } else {