diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-13 04:25:52 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-23 01:28:48 +0100 |
commit | 287ae2b9e8ea38642a4c8e36f7863d881d4c0e87 (patch) | |
tree | feb26b3520031dfff59e7cf8e85018ab888cc2fa /src/video_core/renderer_opengl/gl_shader_disk_cache.h | |
parent | gl_shader_cache: Specialize shared memory size (diff) | |
download | yuzu-287ae2b9e8ea38642a4c8e36f7863d881d4c0e87.tar yuzu-287ae2b9e8ea38642a4c8e36f7863d881d4c0e87.tar.gz yuzu-287ae2b9e8ea38642a4c8e36f7863d881d4c0e87.tar.bz2 yuzu-287ae2b9e8ea38642a4c8e36f7863d881d4c0e87.tar.lz yuzu-287ae2b9e8ea38642a4c8e36f7863d881d4c0e87.tar.xz yuzu-287ae2b9e8ea38642a4c8e36f7863d881d4c0e87.tar.zst yuzu-287ae2b9e8ea38642a4c8e36f7863d881d4c0e87.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_disk_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.h | 16 |
1 files changed, 9 insertions, 7 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 6f8e51364..28689f6c7 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -64,10 +64,10 @@ struct ProgramVariant final { : base_bindings{base_bindings}, primitive_mode{primitive_mode} {} /// Compute constructor. - explicit constexpr ProgramVariant(u32 block_x, u32 block_y, u32 block_z, - u32 shared_memory_size) noexcept + explicit constexpr ProgramVariant(u32 block_x, u32 block_y, u32 block_z, u32 shared_memory_size, + u32 local_memory_size) noexcept : block_x{block_x}, block_y{static_cast<u16>(block_y)}, block_z{static_cast<u16>(block_z)}, - shared_memory_size{shared_memory_size} {} + shared_memory_size{shared_memory_size}, local_memory_size{local_memory_size} {} // Graphics specific parameters. BaseBindings base_bindings{}; @@ -78,12 +78,13 @@ struct ProgramVariant final { u16 block_y{}; u16 block_z{}; u32 shared_memory_size{}; + u32 local_memory_size{}; bool operator==(const ProgramVariant& rhs) const noexcept { return std::tie(base_bindings, primitive_mode, block_x, block_y, block_z, - shared_memory_size) == std::tie(rhs.base_bindings, rhs.primitive_mode, - rhs.block_x, rhs.block_y, rhs.block_z, - rhs.shared_memory_size); + shared_memory_size, local_memory_size) == + std::tie(rhs.base_bindings, rhs.primitive_mode, rhs.block_x, rhs.block_y, + rhs.block_z, rhs.shared_memory_size, rhs.local_memory_size); } bool operator!=(const ProgramVariant& rhs) const noexcept { @@ -133,7 +134,8 @@ struct hash<OpenGL::ProgramVariant> { static_cast<std::size_t>(variant.block_x) ^ (static_cast<std::size_t>(variant.block_y) << 32) ^ (static_cast<std::size_t>(variant.block_z) << 48) ^ - (static_cast<std::size_t>(variant.shared_memory_size) << 16); + (static_cast<std::size_t>(variant.shared_memory_size) << 16) ^ + (static_cast<std::size_t>(variant.local_memory_size) << 36); } }; |