diff options
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 31472e878..95d2c1cd7 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -3073,7 +3073,10 @@ struct ExprLoweringVisitorBase : ExprVisitor<Derived, LoweredValInfo> { auto type = lowerType(context, expr->type); auto baseVal = lowerSubExpr(expr->baseExpression); - auto indexVal = getSimpleVal(context, lowerRValueExpr(context, expr->indexExpression)); + + SLANG_RELEASE_ASSERT(expr->indexExprs.getCount() == 1); + + auto indexVal = getSimpleVal(context, lowerRValueExpr(context, expr->indexExprs[0])); return subscriptValue(type, baseVal, indexVal); } @@ -6714,7 +6717,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> // Allocate an IRInterfaceType with the `operandCount` operands. IRInterfaceType* irInterface = subBuilder->createInterfaceType(operandCount, nullptr); - + // Add `irInterface` to decl mapping now to prevent cyclic lowering. setValue(subContext, decl, LoweredValInfo::simple(irInterface)); |
