Merge pull request #8017 from unknownbrackets/gpu-minor

Ensure we update sampling params on tex update
This commit is contained in:
Henrik Rydgård 2015-10-02 12:36:00 +02:00
commit d885cfa8a7

View file

@ -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 {