420Pack: Implement length() on vectors and matrices. Also, tweak line-continuation semantics to understand the extension.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26601 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2014-05-10 22:24:50 +00:00
parent 7c257eb108
commit 0b9e112da6
14 changed files with 286 additions and 134 deletions

View file

@ -362,11 +362,8 @@ function_identifier
TIntermMethod* method = $1->getAsMethodNode();
if (method) {
if (method->getObject()->isArray()) {
$$.function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength);
$$.intermNode = method->getObject();
} else
parseContext.error(method->getLoc(), "only arrays have methods", "", "");
$$.function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength);
$$.intermNode = method->getObject();
} else {
TIntermSymbol* symbol = $1->getAsSymbolNode();
if (symbol) {