From 8add41a6e37994577d928bc312801ddfa1c33173 Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Mon, 17 Oct 2022 17:38:59 -0700 Subject: Shader cache index implementation (#2452) --- slang.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'slang.h') 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. -- cgit v1.2.3