diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-29 07:49:51 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-09 22:40:07 +0100 |
commit | 0528be5c92db67b608dc64322c55e57629c80619 (patch) | |
tree | 6705b628f5b7db52300f967f5101d172384eb101 /src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | |
parent | video_core: Rename "const buffer locker" to "registry" (diff) | |
download | yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.gz yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.bz2 yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.lz yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.xz yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.zst yuzu-0528be5c92db67b608dc64322c55e57629c80619.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp index 0e1717c5e..5d5118058 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -48,7 +48,7 @@ struct BindlessSamplerKey { Tegra::Engines::SamplerDescriptor sampler; }; -constexpr u32 NativeVersion = 16; +constexpr u32 NativeVersion = 17; ShaderCacheVersionHash GetShaderCacheVersionHash() { ShaderCacheVersionHash hash{}; @@ -83,15 +83,16 @@ bool ShaderDiskCacheEntry::Load(FileUtil::IOFile& file) { return false; } - bool is_texture_handler_size_known; + u8 is_texture_handler_size_known; u32 texture_handler_size_value; u32 num_keys; u32 num_bound_samplers; u32 num_bindless_samplers; if (file.ReadArray(&unique_identifier, 1) != 1 || file.ReadArray(&bound_buffer, 1) != 1 || file.ReadArray(&is_texture_handler_size_known, 1) != 1 || - file.ReadArray(&texture_handler_size_value, 1) != 1 || file.ReadArray(&num_keys, 1) != 1 || - file.ReadArray(&num_bound_samplers, 1) != 1 || + file.ReadArray(&texture_handler_size_value, 1) != 1 || + file.ReadArray(&graphics_info, 1) != 1 || file.ReadArray(&compute_info, 1) != 1 || + file.ReadArray(&num_keys, 1) != 1 || file.ReadArray(&num_bound_samplers, 1) != 1 || file.ReadArray(&num_bindless_samplers, 1) != 1) { return false; } @@ -136,8 +137,9 @@ bool ShaderDiskCacheEntry::Save(FileUtil::IOFile& file) const { } if (file.WriteObject(unique_identifier) != 1 || file.WriteObject(bound_buffer) != 1 || - file.WriteObject(texture_handler_size.has_value()) != 1 || + file.WriteObject(static_cast<u8>(texture_handler_size.has_value())) != 1 || file.WriteObject(texture_handler_size.value_or(0)) != 1 || + file.WriteObject(graphics_info) != 1 || file.WriteObject(compute_info) != 1 || file.WriteObject(static_cast<u32>(keys.size())) != 1 || file.WriteObject(static_cast<u32>(bound_samplers.size())) != 1 || file.WriteObject(static_cast<u32>(bindless_samplers.size())) != 1) { |