summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar Mat M2019-01-29 22:01:04 -0300
committerGravatar ReinUsesLisp2019-01-30 19:10:35 -0300
commit911587fb8d4fbd6917c427ce7c500fef7f1274d7 (patch)
tree275e8f7aa41490c23189e065a09e154b6961c68f /src/video_core
parentgl_state: Remove texture target tracking (diff)
downloadyuzu-911587fb8d4fbd6917c427ce7c500fef7f1274d7.tar.gz
yuzu-911587fb8d4fbd6917c427ce7c500fef7f1274d7.tar.xz
yuzu-911587fb8d4fbd6917c427ce7c500fef7f1274d7.zip
gl_rasterizer_cache: Guard clause swizzle testing
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 0dc4857e8..d453ddbce 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -880,7 +880,9 @@ void CachedSurface::UpdateSwizzle(Tegra::Texture::SwizzleSource swizzle_x,
880 const GLenum new_y = MaxwellToGL::SwizzleSource(swizzle_y); 880 const GLenum new_y = MaxwellToGL::SwizzleSource(swizzle_y);
881 const GLenum new_z = MaxwellToGL::SwizzleSource(swizzle_z); 881 const GLenum new_z = MaxwellToGL::SwizzleSource(swizzle_z);
882 const GLenum new_w = MaxwellToGL::SwizzleSource(swizzle_w); 882 const GLenum new_w = MaxwellToGL::SwizzleSource(swizzle_w);
883 if (swizzle[0] != new_x || swizzle[1] != new_y || swizzle[2] != new_z || swizzle[3] != new_w) { 883 if (swizzle[0] == new_x && swizzle[1] == new_y && swizzle[2] == new_z && swizzle[3] == new_w) {
884 return;
885 }
884 swizzle = {new_x, new_y, new_z, new_w}; 886 swizzle = {new_x, new_y, new_z, new_w};
885 const auto swizzle_data = reinterpret_cast<const GLint*>(swizzle.data()); 887 const auto swizzle_data = reinterpret_cast<const GLint*>(swizzle.data());
886 glTextureParameteriv(texture.handle, GL_TEXTURE_SWIZZLE_RGBA, swizzle_data); 888 glTextureParameteriv(texture.handle, GL_TEXTURE_SWIZZLE_RGBA, swizzle_data);