Skip to content

Commit 8c70f06

Browse files
committed
fix serialization
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
1 parent d821878 commit 8c70f06

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/nbl/asset/utils/IShaderCompiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class NBL_API2 IShaderCompiler : public core::IReferenceCounted
183183

184184
public:
185185
// Used to check compatibility of Caches before reading
186-
constexpr static inline std::string_view VERSION = "1.0.0";
186+
constexpr static inline std::string_view VERSION = "1.1.0";
187187

188188
static auto const SHADER_BUFFER_SIZE_BYTES = sizeof(uint64_t) / sizeof(uint8_t); // It's obviously 8
189189

src/nbl/asset/utils/shaderCompiler_serialization.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ inline void to_json(json& j, const SEntry::SPreprocessingDependency& dependency)
116116
j = json{
117117
{ "requestingSourceDir", dependency.requestingSourceDir },
118118
{ "identifier", dependency.identifier },
119-
{ "hash", dependency.hash },
119+
{ "hash", dependency.hash.data },
120120
{ "standardInclude", dependency.standardInclude },
121121
};
122122
}
@@ -125,7 +125,7 @@ inline void from_json(const json& j, SEntry::SPreprocessingDependency& dependenc
125125
{
126126
j.at("requestingSourceDir").get_to(dependency.requestingSourceDir);
127127
j.at("identifier").get_to(dependency.identifier);
128-
j.at("hash").get_to(dependency.hash);
128+
j.at("hash").get_to(dependency.hash.data);
129129
j.at("standardInclude").get_to(dependency.standardInclude);
130130
}
131131

@@ -177,7 +177,7 @@ inline void to_json(json& j, const SEntry& entry)
177177
j = json{
178178
{ "mainFileContents", entry.mainFileContents },
179179
{ "compilerArgs", entry.compilerArgs },
180-
{ "hash", entry.hash },
180+
{ "hash", entry.hash.data },
181181
{ "lookupHash", entry.lookupHash },
182182
{ "dependencies", entry.dependencies },
183183
};
@@ -187,7 +187,7 @@ inline void from_json(const json& j, SEntry& entry)
187187
{
188188
j.at("mainFileContents").get_to(entry.mainFileContents);
189189
j.at("compilerArgs").get_to(entry.compilerArgs);
190-
j.at("hash").get_to(entry.hash);
190+
j.at("hash").get_to(entry.hash.data);
191191
j.at("lookupHash").get_to(entry.lookupHash);
192192
j.at("dependencies").get_to(entry.dependencies);
193193
entry.cpuShader = nullptr;

0 commit comments

Comments
 (0)