Merge pull request #6117 from vitor-k/invalidate-cache
Invalidate older shader caches
This commit is contained in:
commit
47c4f31c8d
3 changed files with 6 additions and 0 deletions
|
@ -68,6 +68,8 @@ set(HASH_FILES
|
||||||
"${VIDEO_CORE}/renderer_opengl/gl_shader_disk_cache.h"
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_disk_cache.h"
|
||||||
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.cpp"
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.cpp"
|
||||||
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.h"
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.h"
|
||||||
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_util.cpp"
|
||||||
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_util.h"
|
||||||
"${VIDEO_CORE}/shader/shader.cpp"
|
"${VIDEO_CORE}/shader/shader.cpp"
|
||||||
"${VIDEO_CORE}/shader/shader.h"
|
"${VIDEO_CORE}/shader/shader.h"
|
||||||
"${VIDEO_CORE}/pica.cpp"
|
"${VIDEO_CORE}/pica.cpp"
|
||||||
|
|
|
@ -32,6 +32,8 @@ add_custom_command(OUTPUT scm_rev.cpp
|
||||||
"${VIDEO_CORE}/renderer_opengl/gl_shader_disk_cache.h"
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_disk_cache.h"
|
||||||
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.cpp"
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.cpp"
|
||||||
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.h"
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_gen.h"
|
||||||
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_util.cpp"
|
||||||
|
"${VIDEO_CORE}/renderer_opengl/gl_shader_util.h"
|
||||||
"${VIDEO_CORE}/shader/shader.cpp"
|
"${VIDEO_CORE}/shader/shader.cpp"
|
||||||
"${VIDEO_CORE}/shader/shader.h"
|
"${VIDEO_CORE}/shader/shader.h"
|
||||||
"${VIDEO_CORE}/pica.cpp"
|
"${VIDEO_CORE}/pica.cpp"
|
||||||
|
|
|
@ -33,6 +33,8 @@ enum class PrecompiledEntryKind : u32 {
|
||||||
|
|
||||||
constexpr u32 NativeVersion = 1;
|
constexpr u32 NativeVersion = 1;
|
||||||
|
|
||||||
|
// The hash is based on relevant files. The list of files can be found at src/common/CMakeLists.txt
|
||||||
|
// and CMakeModules/GenerateSCMRev.cmake
|
||||||
ShaderCacheVersionHash GetShaderCacheVersionHash() {
|
ShaderCacheVersionHash GetShaderCacheVersionHash() {
|
||||||
ShaderCacheVersionHash hash{};
|
ShaderCacheVersionHash hash{};
|
||||||
const std::size_t length = std::min(std::strlen(Common::g_shader_cache_version), hash.size());
|
const std::size_t length = std::min(std::strlen(Common::g_shader_cache_version), hash.size());
|
||||||
|
|
Loading…
Reference in a new issue