diff options
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-hlsl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index e48a166c5..338e99e68 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -520,7 +520,8 @@ bool HLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu case kIROp_StringLit: { IRStringLit* lit = cast<IRStringLit>(inst); - m_writer->emit(GetHashCode(lit->getStringSlice())); + UnownedStringSlice slice = lit->getStringSlice(); + m_writer->emit(int32_t(getStableHashCode32(slice.begin(), slice.getLength()))); return true; } case kIROp_GetStringHash: |
