summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-11-08 13:51:53 +0100
committerRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-11-11 20:36:53 +0100
commit72b1fae98480b781a17524e65b0be6e3d6151b4a (patch)
treeeee9930228869f19aa56af1573dfc4541fbcfa45
parentImprove state management by splitting some of the states id separated function to avoid a full apply overhead (diff)
downloadyuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar
yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar.gz
yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar.bz2
yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar.lz
yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar.xz
yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar.zst
yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp9
1 files 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<float>(1 << info.tic.max_anisotropy.Value()));
+ if (GLAD_GL_ARB_texture_filter_anisotropic) {
+ glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY,
+ static_cast<float>(1 << info.tic.max_anisotropy.Value()));
+ } else if (GLAD_GL_EXT_texture_filter_anisotropic) {
+ glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT,
+ static_cast<float>(1 << info.tic.max_anisotropy.Value()));
+ }
glSamplerParameterf(s, GL_TEXTURE_MIN_LOD,
static_cast<float>(info.tic.res_min_mip_level.Value()));
glSamplerParameterf(s, GL_TEXTURE_MAX_LOD,