Commit 341afbba by Nicolas Capens

Fix constant expression vector indexing.

Change-Id: If3b61ad65f1f1d6687890bd8715b2a534c78a353 Reviewed-on: https://swiftshader-review.googlesource.com/5081Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent d3d9b9c6
...@@ -2616,7 +2616,7 @@ TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre ...@@ -2616,7 +2616,7 @@ TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre
TIntermTyped *index = intermediate.addSwizzle(fields, fieldLocation); TIntermTyped *index = intermediate.addSwizzle(fields, fieldLocation);
indexedExpression = intermediate.addIndex(EOpVectorSwizzle, baseExpression, index, dotLocation); indexedExpression = intermediate.addIndex(EOpVectorSwizzle, baseExpression, index, dotLocation);
indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(), indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(),
EvqTemporary, (unsigned char)vectorString.size())); baseExpression->getQualifier() == EvqConstExpr ? EvqConstExpr : EvqTemporary, (unsigned char)vectorString.size()));
} }
} }
else if(baseExpression->isMatrix()) else if(baseExpression->isMatrix())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment