diff options
Diffstat (limited to 'tools/gfx')
| -rw-r--r-- | tools/gfx/debug-layer/debug-shader-object.h | 4 | ||||
| -rw-r--r-- | tools/gfx/renderer-shared.cpp | 1 | ||||
| -rw-r--r-- | tools/gfx/renderer-shared.h | 10 |
3 files changed, 8 insertions, 7 deletions
diff --git a/tools/gfx/debug-layer/debug-shader-object.h b/tools/gfx/debug-layer/debug-shader-object.h index 9f368a2c1..b5a268892 100644 --- a/tools/gfx/debug-layer/debug-shader-object.h +++ b/tools/gfx/debug-layer/debug-shader-object.h @@ -12,13 +12,13 @@ namespace debug struct ShaderOffsetKey { ShaderOffset offset; - bool operator==(ShaderOffsetKey other) + bool operator==(ShaderOffsetKey other) const { return offset.bindingArrayIndex == other.offset.bindingArrayIndex && offset.bindingRangeIndex == other.offset.bindingRangeIndex && offset.uniformOffset == other.offset.uniformOffset; } - Slang::HashCode getHashCode() + Slang::HashCode getHashCode() const { return Slang::combineHash( (Slang::HashCode)offset.uniformOffset, diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp index 99188233a..1e4cbb2f4 100644 --- a/tools/gfx/renderer-shared.cpp +++ b/tools/gfx/renderer-shared.cpp @@ -3,6 +3,7 @@ #include "core/slang-io.h" #include "core/slang-token-reader.h" +#include "../../source/core/slang-stable-hash.h" #include "../../source/core/slang-file-system.h" #include "../../slang.h" diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h index 38aa775be..32aa22b48 100644 --- a/tools/gfx/renderer-shared.h +++ b/tools/gfx/renderer-shared.h @@ -1043,7 +1043,7 @@ struct ComponentKey Slang::UnownedStringSlice typeName; Slang::ShortList<ShaderComponentID> specializationArgs; Slang::HashCode hash; - Slang::HashCode getHashCode() + Slang::HashCode getHashCode() const { return hash; } @@ -1060,7 +1060,7 @@ struct PipelineKey PipelineStateBase* pipeline; Slang::ShortList<ShaderComponentID> specializationArgs; Slang::HashCode hash; - Slang::HashCode getHashCode() + Slang::HashCode getHashCode() const { return hash; } @@ -1070,7 +1070,7 @@ struct PipelineKey for (auto& arg : specializationArgs) hash = Slang::combineHash(hash, arg); } - bool operator==(const PipelineKey& other) + bool operator==(const PipelineKey& other) const { if (pipeline != other.pipeline) return false; @@ -1090,12 +1090,12 @@ struct OwningComponentKey Slang::String typeName; Slang::ShortList<ShaderComponentID> specializationArgs; Slang::HashCode hash; - Slang::HashCode getHashCode() + Slang::HashCode getHashCode() const { return hash; } template<typename KeyType> - bool operator==(const KeyType& other) + bool operator==(const KeyType& other) const { if (typeName != other.typeName) return false; |
