summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-02 11:07:07 -0400
committerGravatar Lioncash2018-08-02 11:09:46 -0400
commitd92e8ab06238c78e7a9c0cecc1efc483364f43ac (patch)
treeef73166e1f3cebcc2a6d01292754d3106d11ec43 /src
parentMerge pull request #896 from lioncash/audio-out (diff)
downloadyuzu-d92e8ab06238c78e7a9c0cecc1efc483364f43ac.tar.gz
yuzu-d92e8ab06238c78e7a9c0cecc1efc483364f43ac.tar.xz
yuzu-d92e8ab06238c78e7a9c0cecc1efc483364f43ac.zip
gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()
Avoids performing unnecessary copies of 65560 byte sized ShaderSetup instances, considering it's only used as part of lookup and not modified. Given the parameters were already const, it's likely taking these parameters by reference was intended but the ampersand was forgotten.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_manager.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_manager.h b/src/video_core/renderer_opengl/gl_shader_manager.h
index e29d551e1..2214c348a 100644
--- a/src/video_core/renderer_opengl/gl_shader_manager.h
+++ b/src/video_core/renderer_opengl/gl_shader_manager.h
@@ -105,14 +105,14 @@ public:
105 } 105 }
106 106
107 ShaderEntries UseProgrammableVertexShader(const MaxwellVSConfig& config, 107 ShaderEntries UseProgrammableVertexShader(const MaxwellVSConfig& config,
108 const ShaderSetup setup) { 108 const ShaderSetup& setup) {
109 ShaderEntries result; 109 ShaderEntries result;
110 std::tie(current.vs, result) = vertex_shaders.Get(config, setup); 110 std::tie(current.vs, result) = vertex_shaders.Get(config, setup);
111 return result; 111 return result;
112 } 112 }
113 113
114 ShaderEntries UseProgrammableFragmentShader(const MaxwellFSConfig& config, 114 ShaderEntries UseProgrammableFragmentShader(const MaxwellFSConfig& config,
115 const ShaderSetup setup) { 115 const ShaderSetup& setup) {
116 ShaderEntries result; 116 ShaderEntries result;
117 std::tie(current.fs, result) = fragment_shaders.Get(config, setup); 117 std::tie(current.fs, result) = fragment_shaders.Get(config, setup);
118 return result; 118 return result;