HLSL: cast bracket dereference index to int type if not.
HLSL can index arrays using operator[] with non-integer types, and inserts a conversion to a uint if needed.
This commit is contained in:
@@ -2816,6 +2816,8 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
|
||||
}
|
||||
advanceToken();
|
||||
node = parseContext.handleBracketDereference(indexNode->getLoc(), node, indexNode);
|
||||
if (node == nullptr)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case EOpPostIncrement:
|
||||
|
||||
Reference in New Issue
Block a user