HLSL: Fix #1257: layout float1, int1, etc., as scalars.
This commit is contained in:
parent
46413d5780
commit
d55fe86512
3 changed files with 7 additions and 3 deletions
|
|
@ -829,7 +829,9 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc,
|
|||
} else {
|
||||
// at least one of base and index is variable...
|
||||
|
||||
if (base->getAsSymbolNode() && wasFlattened(base)) {
|
||||
if (base->getType().isScalarOrVec1())
|
||||
result = base;
|
||||
else if (base->getAsSymbolNode() && wasFlattened(base)) {
|
||||
if (index->getQualifier().storage != EvqConst)
|
||||
error(loc, "Invalid variable index to flattened array", base->getAsSymbolNode()->getName().c_str(), "");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue