summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-30 02:08:03 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-30 23:10:35 +0100
commit3e80b0894494c0a25f84e97e3e320e606028c206 (patch)
tree2cb1384dd2ede4e954149b4c888bfcdc25c9e16d /src/video_core/renderer_opengl
parentgl_rasterizer_cache: Guard clause swizzle testing (diff)
downloadyuzu-3e80b0894494c0a25f84e97e3e320e606028c206.tar
yuzu-3e80b0894494c0a25f84e97e3e320e606028c206.tar.gz
yuzu-3e80b0894494c0a25f84e97e3e320e606028c206.tar.bz2
yuzu-3e80b0894494c0a25f84e97e3e320e606028c206.tar.lz
yuzu-3e80b0894494c0a25f84e97e3e320e606028c206.tar.xz
yuzu-3e80b0894494c0a25f84e97e3e320e606028c206.tar.zst
yuzu-3e80b0894494c0a25f84e97e3e320e606028c206.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index d453ddbce..42e4e7aa1 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -883,12 +883,11 @@ void CachedSurface::UpdateSwizzle(Tegra::Texture::SwizzleSource swizzle_x,
if (swizzle[0] == new_x && swizzle[1] == new_y && swizzle[2] == new_z && swizzle[3] == new_w) {
return;
}
- swizzle = {new_x, new_y, new_z, new_w};
- const auto swizzle_data = reinterpret_cast<const GLint*>(swizzle.data());
- glTextureParameteriv(texture.handle, GL_TEXTURE_SWIZZLE_RGBA, swizzle_data);
- if (texture_view.handle != 0) {
- glTextureParameteriv(texture_view.handle, GL_TEXTURE_SWIZZLE_RGBA, swizzle_data);
- }
+ swizzle = {new_x, new_y, new_z, new_w};
+ const auto swizzle_data = reinterpret_cast<const GLint*>(swizzle.data());
+ glTextureParameteriv(texture.handle, GL_TEXTURE_SWIZZLE_RGBA, swizzle_data);
+ if (texture_view.handle != 0) {
+ glTextureParameteriv(texture_view.handle, GL_TEXTURE_SWIZZLE_RGBA, swizzle_data);
}
}