summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-10-15 18:29:35 -0400
committerGravatar Lioncash2019-10-15 18:29:37 -0400
commitb8a62adcf1034535353b4a1486a51a5775d209b5 (patch)
tree3d126d92aeda02726e2e78dc6192e74bc23871e1
parentgl_shader_decompiler: Use std::holds_alternative within GenerateTexture() (diff)
downloadyuzu-b8a62adcf1034535353b4a1486a51a5775d209b5.tar.gz
yuzu-b8a62adcf1034535353b4a1486a51a5775d209b5.tar.xz
yuzu-b8a62adcf1034535353b4a1486a51a5775d209b5.zip
gl_shader_decompiler: Pass by reference to GenerateTextureArgument()
Avoids an unnecessary atomic reference count increment and decrement.
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 970cd0c76..82228b55d 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1158,8 +1158,8 @@ private:
1158 return expr + ')'; 1158 return expr + ')';
1159 } 1159 }
1160 1160
1161 std::string GenerateTextureArgument(TextureArgument argument) { 1161 std::string GenerateTextureArgument(const TextureArgument& argument) {
1162 const auto [type, operand] = argument; 1162 const auto& [type, operand] = argument;
1163 if (operand == nullptr) { 1163 if (operand == nullptr) {
1164 return {}; 1164 return {};
1165 } 1165 }