summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-spirv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-spirv.cpp')
-rw-r--r--source/slang/slang-emit-spirv.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp
index 62c667de1..7f6202a7f 100644
--- a/source/slang/slang-emit-spirv.cpp
+++ b/source/slang/slang-emit-spirv.cpp
@@ -2060,7 +2060,9 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex
inst->getOp() == kIROp_ArrayType
? emitOpTypeArray(inst, elementType, irArrayType->getElementCount())
: emitOpTypeRuntimeArray(inst, elementType);
- if (shouldEmitArrayStride(irArrayType->getElementType()))
+ // Arrays of opaque types should not emit a stride
+ if (!isIROpaqueType(elementType) &&
+ shouldEmitArrayStride(irArrayType->getElementType()))
{
auto stride = 0;
// If the array type has no stride, it indicates that this array type is only