summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-01-14 13:14:13 -0500
committerGravatar Lioncash2020-01-14 13:14:16 -0500
commit4cd5ad90f3da7288746888455f3858f746597f83 (patch)
treeafc0fd0a1887c327a97a3c3b1cf778a4c76bbb3b /src
parentgl_shader_cache: Remove unused entries variable in BuildShader() (diff)
downloadyuzu-4cd5ad90f3da7288746888455f3858f746597f83.tar.gz
yuzu-4cd5ad90f3da7288746888455f3858f746597f83.tar.xz
yuzu-4cd5ad90f3da7288746888455f3858f746597f83.zip
gl_shader_cache: std::move entries in CachedShader constructor
Avoids several reallocations of std::vector instances where applicable.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 8a46fefeb..51526b1b0 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -313,9 +313,10 @@ std::unordered_set<GLenum> GetSupportedFormats() {
313 313
314CachedShader::CachedShader(const ShaderParameters& params, ShaderType shader_type, 314CachedShader::CachedShader(const ShaderParameters& params, ShaderType shader_type,
315 GLShader::ShaderEntries entries, ProgramCode code, ProgramCode code_b) 315 GLShader::ShaderEntries entries, ProgramCode code, ProgramCode code_b)
316 : RasterizerCacheObject{params.host_ptr}, system{params.system}, disk_cache{params.disk_cache}, 316 : RasterizerCacheObject{params.host_ptr}, system{params.system},
317 device{params.device}, cpu_addr{params.cpu_addr}, unique_identifier{params.unique_identifier}, 317 disk_cache{params.disk_cache}, device{params.device}, cpu_addr{params.cpu_addr},
318 shader_type{shader_type}, entries{entries}, code{std::move(code)}, code_b{std::move(code_b)} { 318 unique_identifier{params.unique_identifier}, shader_type{shader_type},
319 entries{std::move(entries)}, code{std::move(code)}, code_b{std::move(code_b)} {
319 if (!params.precompiled_variants) { 320 if (!params.precompiled_variants) {
320 return; 321 return;
321 } 322 }