diff options
| author | 2018-11-08 09:51:53 -0300 | |
|---|---|---|
| committer | 2018-11-11 16:36:53 -0300 | |
| commit | 72b1fae98480b781a17524e65b0be6e3d6151b4a (patch) | |
| tree | eee9930228869f19aa56af1573dfc4541fbcfa45 /src | |
| parent | Improve state management by splitting some of the states id separated functio... (diff) | |
| download | yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar.gz yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.tar.xz yuzu-72b1fae98480b781a17524e65b0be6e3d6151b4a.zip | |
Use core extensions when available to set max anisotropic filtering level
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 9 |
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 | |||
| 787 | } | 787 | } |
| 788 | } | 788 | } |
| 789 | if (info.tic.use_header_opt_control == 0) { | 789 | if (info.tic.use_header_opt_control == 0) { |
| 790 | glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT, | 790 | if (GLAD_GL_ARB_texture_filter_anisotropic) { |
| 791 | static_cast<float>(1 << info.tic.max_anisotropy.Value())); | 791 | glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY, |
| 792 | static_cast<float>(1 << info.tic.max_anisotropy.Value())); | ||
| 793 | } else if (GLAD_GL_EXT_texture_filter_anisotropic) { | ||
| 794 | glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT, | ||
| 795 | static_cast<float>(1 << info.tic.max_anisotropy.Value())); | ||
| 796 | } | ||
| 792 | glSamplerParameterf(s, GL_TEXTURE_MIN_LOD, | 797 | glSamplerParameterf(s, GL_TEXTURE_MIN_LOD, |
| 793 | static_cast<float>(info.tic.res_min_mip_level.Value())); | 798 | static_cast<float>(info.tic.res_min_mip_level.Value())); |
| 794 | glSamplerParameterf(s, GL_TEXTURE_MAX_LOD, | 799 | glSamplerParameterf(s, GL_TEXTURE_MAX_LOD, |