summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-emit-glsl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp
index 7cf478c36..eea672938 100644
--- a/source/slang/slang-emit-glsl.cpp
+++ b/source/slang/slang-emit-glsl.cpp
@@ -2068,7 +2068,10 @@ bool GLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
emitOperand(inst->getOperand(0), leftSide(outerPrec, prec));
m_writer->emit("._data[");
+ // glsl only support int/uint as array index
+ m_writer->emit("uint(");
emitOperand(inst->getOperand(1), getInfo(EmitOp::General));
+ m_writer->emit(")");
m_writer->emit("]");
maybeCloseParens(needClose);