diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-02-07 04:05:41 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-14 05:25:32 +0200 |
commit | 5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80 (patch) | |
tree | d3f411c5b0c15539bd36e86944cfdc28972fb98a /src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | |
parent | Merge pull request #2378 from lioncash/ro (diff) | |
download | yuzu-5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80.tar yuzu-5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80.tar.gz yuzu-5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80.tar.bz2 yuzu-5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80.tar.lz yuzu-5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80.tar.xz yuzu-5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80.tar.zst yuzu-5c280e6ff04ae36e8cd7ba81cce4ae89e0a49b80.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_disk_cache.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 13 |
1 files changed, 10 insertions, 3 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 8a43eb157..d5890a375 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -337,11 +337,16 @@ std::optional<ShaderDiskCacheDecompiled> ShaderDiskCacheOpenGL::LoadDecompiledEn for (u32 i = 0; i < global_memory_count; ++i) { u32 cbuf_index{}; u32 cbuf_offset{}; + u8 is_read{}; + u8 is_written{}; if (file.ReadBytes(&cbuf_index, sizeof(u32)) != sizeof(u32) || - file.ReadBytes(&cbuf_offset, sizeof(u32)) != sizeof(u32)) { + file.ReadBytes(&cbuf_offset, sizeof(u32)) != sizeof(u32) || + file.ReadBytes(&is_read, sizeof(u8)) != sizeof(u8) || + file.ReadBytes(&is_written, sizeof(u8)) != sizeof(u8)) { return {}; } - entry.entries.global_memory_entries.emplace_back(cbuf_index, cbuf_offset); + entry.entries.global_memory_entries.emplace_back(cbuf_index, cbuf_offset, is_read != 0, + is_written != 0); } for (auto& clip_distance : entry.entries.clip_distances) { @@ -397,7 +402,9 @@ bool ShaderDiskCacheOpenGL::SaveDecompiledFile(FileUtil::IOFile& file, u64 uniqu return false; for (const auto& gmem : entries.global_memory_entries) { if (file.WriteObject(static_cast<u32>(gmem.GetCbufIndex())) != 1 || - file.WriteObject(static_cast<u32>(gmem.GetCbufOffset())) != 1) { + file.WriteObject(static_cast<u32>(gmem.GetCbufOffset())) != 1 || + file.WriteObject(static_cast<u8>(gmem.IsRead() ? 1 : 0)) != 1 || + file.WriteObject(static_cast<u8>(gmem.IsWritten() ? 1 : 0)) != 1) { return false; } } |