Fix bug where we tried to set aniso even if unsupported. Fixes #9377

This commit is contained in:
Henrik Rydgard committed 2017-03-03 14:16:15 +01:00
1 parent 147d311acb
commit f95459ab0d
4 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -709,7 +709,9 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag
if (gstate_c.Supports(GPU_SUPPORTS_ANISOTROPY)) {
int aniso = 1 << g_Config.iAnisotropyLevel;
float anisotropyLevel = (float) aniso > maxAnisotropyLevel ? maxAnisotropyLevel : (float) aniso;
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropyLevel);
if (anisotropyLevel > 1.0f) {
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropyLevel);
}
}
// This will rebind it, but that's okay.