diff options
author | Lioncash <mathew1800@gmail.com> | 2019-05-19 08:42:57 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-05-19 08:46:45 +0200 |
commit | 7fdc644c446b3c710d3e3160ced89dd793485eca (patch) | |
tree | 7dc890f6bb2a472cce1bd1c42f8f70143b382468 | |
parent | gl_shader_disk_cache: Remove redundant code string construction in LoadDecompiledEntry() (diff) | |
download | yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar.gz yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar.bz2 yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar.lz yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar.xz yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar.zst yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h index 34d4bd637..7a7183f21 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -70,14 +70,14 @@ namespace std { template <> struct hash<OpenGL::BaseBindings> { - std::size_t operator()(const OpenGL::BaseBindings& bindings) const { + std::size_t operator()(const OpenGL::BaseBindings& bindings) const noexcept { return bindings.cbuf | bindings.gmem << 8 | bindings.sampler << 16; } }; template <> struct hash<OpenGL::ShaderDiskCacheUsage> { - std::size_t operator()(const OpenGL::ShaderDiskCacheUsage& usage) const { + std::size_t operator()(const OpenGL::ShaderDiskCacheUsage& usage) const noexcept { return static_cast<std::size_t>(usage.unique_identifier) ^ std::hash<OpenGL::BaseBindings>()(usage.bindings) ^ usage.primitive << 16; } |