gl_shader_cache: std::move entries in CachedShader constructor
Avoids several reallocations of std::vector instances where applicable.
This commit is contained in:
parent
15a6840e7a
commit
4cd5ad90f3
1 changed files with 4 additions and 3 deletions
|
@ -313,9 +313,10 @@ std::unordered_set<GLenum> GetSupportedFormats() {
|
||||||
|
|
||||||
CachedShader::CachedShader(const ShaderParameters& params, ShaderType shader_type,
|
CachedShader::CachedShader(const ShaderParameters& params, ShaderType shader_type,
|
||||||
GLShader::ShaderEntries entries, ProgramCode code, ProgramCode code_b)
|
GLShader::ShaderEntries entries, ProgramCode code, ProgramCode code_b)
|
||||||
: RasterizerCacheObject{params.host_ptr}, system{params.system}, disk_cache{params.disk_cache},
|
: RasterizerCacheObject{params.host_ptr}, system{params.system},
|
||||||
device{params.device}, cpu_addr{params.cpu_addr}, unique_identifier{params.unique_identifier},
|
disk_cache{params.disk_cache}, device{params.device}, cpu_addr{params.cpu_addr},
|
||||||
shader_type{shader_type}, entries{entries}, code{std::move(code)}, code_b{std::move(code_b)} {
|
unique_identifier{params.unique_identifier}, shader_type{shader_type},
|
||||||
|
entries{std::move(entries)}, code{std::move(code)}, code_b{std::move(code_b)} {
|
||||||
if (!params.precompiled_variants) {
|
if (!params.precompiled_variants) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue