mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 21:36:27 -05:00
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.
This commit is contained in:
parent
a03c644aed
commit
d92e8ab062
1 changed files with 2 additions and 2 deletions
|
@ -105,14 +105,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderEntries UseProgrammableVertexShader(const MaxwellVSConfig& config,
|
ShaderEntries UseProgrammableVertexShader(const MaxwellVSConfig& config,
|
||||||
const ShaderSetup setup) {
|
const ShaderSetup& setup) {
|
||||||
ShaderEntries result;
|
ShaderEntries result;
|
||||||
std::tie(current.vs, result) = vertex_shaders.Get(config, setup);
|
std::tie(current.vs, result) = vertex_shaders.Get(config, setup);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderEntries UseProgrammableFragmentShader(const MaxwellFSConfig& config,
|
ShaderEntries UseProgrammableFragmentShader(const MaxwellFSConfig& config,
|
||||||
const ShaderSetup setup) {
|
const ShaderSetup& setup) {
|
||||||
ShaderEntries result;
|
ShaderEntries result;
|
||||||
std::tie(current.fs, result) = fragment_shaders.Get(config, setup);
|
std::tie(current.fs, result) = fragment_shaders.Get(config, setup);
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue