diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2023-01-09 17:44:29 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2023-01-09 17:47:02 +0100 |
commit | 5ca2ba45f1574211126fa2574364721773de7242 (patch) | |
tree | 53b2ccdff0834fa741f50a461127af35172c6492 /servers/rendering | |
parent | 964fc6e15d8631a06c2f442299759041328a8473 (diff) |
Make inclusion of Godot version in shader hash universal
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/renderer_rd/shader_rd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp index ab64ae1055..2d5263a3e2 100644 --- a/servers/rendering/renderer_rd/shader_rd.cpp +++ b/servers/rendering/renderer_rd/shader_rd.cpp @@ -33,6 +33,7 @@ #include "core/io/compression.h" #include "core/io/dir_access.h" #include "core/io/file_access.h" +#include "core/version.h" #include "renderer_compositor_rd.h" #include "servers/rendering/rendering_device.h" #include "thirdparty/misc/smolv.h" @@ -116,6 +117,10 @@ void ShaderRD::setup(const char *p_vertex_code, const char *p_fragment_code, con } StringBuilder tohash; + tohash.append("[GodotVersionNumber]"); + tohash.append(VERSION_NUMBER); + tohash.append("[GodotVersionHash]"); + tohash.append(VERSION_HASH); tohash.append("[SpirvCacheKey]"); tohash.append(RenderingDevice::get_singleton()->shader_get_spirv_cache_key()); tohash.append("[BinaryCacheKey]"); |