summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-glsl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
-rw-r--r--source/slang/slang-emit-glsl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp
index 00ce929d9..ef7e557f6 100644
--- a/source/slang/slang-emit-glsl.cpp
+++ b/source/slang/slang-emit-glsl.cpp
@@ -1358,7 +1358,8 @@ bool GLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
case kIROp_StringLit:
{
IRStringLit* lit = cast<IRStringLit>(inst);
- m_writer->emit(GetHashCode(lit->getStringSlice()));
+ const UnownedStringSlice slice = lit->getStringSlice();
+ m_writer->emit(int32_t(getStableHashCode32(slice.begin(), slice.getLength())));
return true;
}
case kIROp_GetStringHash: