summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorlucy96chen <47800040+lucy96chen@users.noreply.github.com>2022-10-17 17:38:59 -0700
committerGitHub <noreply@github.com>2022-10-17 17:38:59 -0700
commit8add41a6e37994577d928bc312801ddfa1c33173 (patch)
tree6ca5ef639a22c4e37c7287df1877cb5bf7ce691c /slang.h
parent09408e32d7c0ccebf38fe31b5d2ddf4b1cd128e4 (diff)
Shader cache index implementation (#2452)
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/slang.h b/slang.h
index 08279a1de..8a0813f7b 100644
--- a/slang.h
+++ b/slang.h
@@ -4139,6 +4139,19 @@ namespace slang
struct Digest
{
uint32_t values[4] = { 0 };
+
+ bool operator==(const Digest& rhs)
+ {
+ return values[0] == rhs.values[0]
+ && values[1] == rhs.values[1]
+ && values[2] == rhs.values[2]
+ && values[3] == rhs.values[3];
+ }
+
+ uint32_t getHashCode()
+ {
+ return values[0];
+ }
};
/** A session provides a scope for code that is loaded.