From 72b1fae98480b781a17524e65b0be6e3d6151b4a Mon Sep 17 00:00:00 2001 From: Rodolfo Bogado Date: Thu, 8 Nov 2018 09:51:53 -0300 Subject: Use core extensions when available to set max anisotropic filtering level --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index c4fe86b49..f969d5196 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -787,8 +787,13 @@ void RasterizerOpenGL::SamplerInfo::SyncWithConfig(const Tegra::Texture::FullTex } } if (info.tic.use_header_opt_control == 0) { - glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT, - static_cast(1 << info.tic.max_anisotropy.Value())); + if (GLAD_GL_ARB_texture_filter_anisotropic) { + glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY, + static_cast(1 << info.tic.max_anisotropy.Value())); + } else if (GLAD_GL_EXT_texture_filter_anisotropic) { + glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT, + static_cast(1 << info.tic.max_anisotropy.Value())); + } glSamplerParameterf(s, GL_TEXTURE_MIN_LOD, static_cast(info.tic.res_min_mip_level.Value())); glSamplerParameterf(s, GL_TEXTURE_MAX_LOD, -- cgit v1.2.3