diff options
author | Wollnashorn <Wollnashorn@users.noreply.github.com> | 2023-06-15 18:46:40 +0200 |
---|---|---|
committer | Wollnashorn <Wollnashorn@users.noreply.github.com> | 2023-06-15 18:46:40 +0200 |
commit | 3e8cd91d548433344d9c479bb7ad83a3bf1560c1 (patch) | |
tree | a1b04a5ea149d6b45ad52f1fcd01733740552e30 /src/video_core/renderer_opengl | |
parent | video_core: Add per-image anisotropy heuristics (format & mip count) (diff) | |
download | yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.gz yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.bz2 yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.lz yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.xz yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.zst yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index ee5a0c723..7ff54003f 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -1270,10 +1270,10 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const TSCEntry& config) { const f32 max_anisotropy = std::clamp(config.MaxAnisotropy(), 1.0f, 16.0f); - const auto create_sampler = [&](const f32 max_anisotropy) { - OGLSampler sampler; - sampler.Create(); - const GLuint handle = sampler.handle; + const auto create_sampler = [&](const f32 anisotropy) { + OGLSampler new_sampler; + new_sampler.Create(); + const GLuint handle = new_sampler.handle; glSamplerParameteri(handle, GL_TEXTURE_WRAP_S, MaxwellToGL::WrapMode(config.wrap_u)); glSamplerParameteri(handle, GL_TEXTURE_WRAP_T, MaxwellToGL::WrapMode(config.wrap_v)); glSamplerParameteri(handle, GL_TEXTURE_WRAP_R, MaxwellToGL::WrapMode(config.wrap_p)); @@ -1287,7 +1287,7 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const TSCEntry& config) { glSamplerParameterfv(handle, GL_TEXTURE_BORDER_COLOR, config.BorderColor().data()); if (GLAD_GL_ARB_texture_filter_anisotropic || GLAD_GL_EXT_texture_filter_anisotropic) { - glSamplerParameterf(handle, GL_TEXTURE_MAX_ANISOTROPY, max_anisotropy); + glSamplerParameterf(handle, GL_TEXTURE_MAX_ANISOTROPY, anisotropy); } else { LOG_WARNING(Render_OpenGL, "GL_ARB_texture_filter_anisotropic is required"); } @@ -1302,7 +1302,7 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const TSCEntry& config) { // We default to false because it's more common LOG_WARNING(Render_OpenGL, "GL_ARB_seamless_cubemap_per_texture is required"); } - return sampler; + return new_sampler; }; sampler = create_sampler(max_anisotropy); |