From fe392fff2425c10c9683a4058c779d352b9855ec Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 26 Mar 2019 17:56:16 -0400 Subject: Unify both sampler types. --- src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_shader_disk_cache.cpp') 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 6a95af6f6..e27740383 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -319,16 +319,18 @@ std::optional ShaderDiskCacheOpenGL::LoadDecompiledEn u32 type{}; u8 is_array{}; u8 is_shadow{}; + u8 is_bindless{}; if (file.ReadBytes(&offset, sizeof(u64)) != sizeof(u64) || file.ReadBytes(&index, sizeof(u64)) != sizeof(u64) || file.ReadBytes(&type, sizeof(u32)) != sizeof(u32) || file.ReadBytes(&is_array, sizeof(u8)) != sizeof(u8) || - file.ReadBytes(&is_shadow, sizeof(u8)) != sizeof(u8)) { + file.ReadBytes(&is_shadow, sizeof(u8)) != sizeof(u8) || + file.ReadBytes(&is_bindless, sizeof(u8)) != sizeof(u8)) { return {}; } entry.entries.samplers.emplace_back( static_cast(offset), static_cast(index), - static_cast(type), is_array != 0, is_shadow != 0, false); + static_cast(type), is_array != 0, is_shadow != 0, is_bindless != 0); } u32 global_memory_count{}; @@ -388,7 +390,8 @@ bool ShaderDiskCacheOpenGL::SaveDecompiledFile(FileUtil::IOFile& file, u64 uniqu file.WriteObject(static_cast(sampler.GetIndex())) != 1 || file.WriteObject(static_cast(sampler.GetType())) != 1 || file.WriteObject(static_cast(sampler.IsArray() ? 1 : 0)) != 1 || - file.WriteObject(static_cast(sampler.IsShadow() ? 1 : 0)) != 1) { + file.WriteObject(static_cast(sampler.IsShadow() ? 1 : 0)) != 1 || + file.WriteObject(static_cast(sampler.IsBindless() ? 1 : 0)) != 1) { return false; } } -- cgit v1.2.3