Add missing matrix constructor test, and add a size() method for downstream consumers of constArrays.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26937 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
974258d88f
commit
9dedb13447
4 changed files with 165 additions and 4 deletions
|
|
@ -1698,9 +1698,9 @@ bool TParseContext::builtInName(const TString& identifier)
|
|||
}
|
||||
|
||||
//
|
||||
// Make sure there is enough data provided to the constructor to build
|
||||
// something of the type of the constructor. Also returns the type of
|
||||
// the constructor.
|
||||
// Make sure there is enough data and not too many arguments provided to the
|
||||
// constructor to build something of the type of the constructor. Also returns
|
||||
// the type of the constructor.
|
||||
//
|
||||
// Returns true if there was an error in construction.
|
||||
//
|
||||
|
|
@ -1781,6 +1781,11 @@ bool TParseContext::constructorError(TSourceLoc loc, TIntermNode* node, TFunctio
|
|||
|
||||
if (matrixInMatrix && ! type.isArray()) {
|
||||
profileRequires(loc, ENoProfile, 120, 0, "constructing matrix from matrix");
|
||||
|
||||
// "If a matrix argument is given to a matrix constructor,
|
||||
// it is a compile-time error to have any other arguments."
|
||||
if (function.getParamCount() > 1)
|
||||
error(loc, "matrix constructed from matrix can only have one argument", "constructor", "");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue