Commit b14178b6 by Alexis Hetu Committed by Alexis Hétu

Completing GLES 3.0 language parser

Added new matrix and sampler types in glslang parsed files, along with related code and new types in the C++ code. Change-Id: Id70c73fac04d000d508236bc9bf1b39a46beda6f Reviewed-on: https://swiftshader-review.googlesource.com/2826Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent f9b7cb1b
......@@ -156,14 +156,14 @@ bool TCompiler::InitBuiltInSymbolTable(const ShBuiltInResources &resources)
TPublicType integer;
integer.type = EbtInt;
integer.size = 1;
integer.matrix = false;
integer.primarySize = 1;
integer.secondarySize = 1;
integer.array = false;
TPublicType floatingPoint;
floatingPoint.type = EbtFloat;
floatingPoint.size = 1;
floatingPoint.matrix = false;
floatingPoint.primarySize = 1;
floatingPoint.secondarySize = 1;
floatingPoint.array = false;
switch(shaderType)
......
......@@ -81,9 +81,9 @@ void InsertBuiltInFunctions(GLenum type, const ShBuiltInResources &resources, TS
symbolTable.insertBuiltIn(COMMON_BUILTINS, EOpReflect, genType, "reflect", genType, genType);
symbolTable.insertBuiltIn(COMMON_BUILTINS, EOpRefract, genType, "refract", genType, genType, float1);
TType *mat2 = new TType(EbtFloat, 2, true);
TType *mat3 = new TType(EbtFloat, 3, true);
TType *mat4 = new TType(EbtFloat, 4, true);
TType *mat2 = new TType(EbtFloat, 2, 2);
TType *mat3 = new TType(EbtFloat, 3, 3);
TType *mat4 = new TType(EbtFloat, 4, 4);
//
// Matrix Functions.
......@@ -260,7 +260,7 @@ void IdentifyBuiltIns(GLenum shaderType,
case GL_FRAGMENT_SHADER:
{
// Set up gl_FragData. The array size.
TType fragData(EbtFloat, EbpMedium, EvqFragData, 4, false, true);
TType fragData(EbtFloat, EbpMedium, EvqFragData, 4, 1, true);
fragData.setArraySize(resources.MaxDrawBuffers);
symbolTable.insert(ESSL1_BUILTINS, *new TVariable(NewPoolTString("gl_FragData"), fragData));
}
......
......@@ -697,6 +697,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
}
int size = std::max(left->getNominalSize(), right->getNominalSize());
int matrixSize = std::max(left->getSecondarySize(), right->getSecondarySize()); // FIXME: This will have to change for NxM matrices
//
// All scalars. Code after this test assumes this case is removed!
......@@ -746,6 +747,12 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
return false;
}
if (left->getSecondarySize() != right->getSecondarySize()) {
// Operator cannot be of type pure assignment.
if (op == EOpAssign || op == EOpInitialize)
return false;
}
//
// Can these two operands be combined?
//
......@@ -757,12 +764,12 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
op = EOpVectorTimesMatrix;
else {
op = EOpMatrixTimesScalar;
setType(TType(basicType, higherPrecision, EvqTemporary, size, true));
setType(TType(basicType, higherPrecision, EvqTemporary, size, matrixSize));
}
} else if (left->isMatrix() && !right->isMatrix()) {
if (right->isVector()) {
op = EOpMatrixTimesVector;
setType(TType(basicType, higherPrecision, EvqTemporary, size, false));
setType(TType(basicType, higherPrecision, EvqTemporary, size, 1));
} else {
op = EOpMatrixTimesScalar;
}
......@@ -773,7 +780,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
// leave as component product
} else if (left->isVector() || right->isVector()) {
op = EOpVectorTimesScalar;
setType(TType(basicType, higherPrecision, EvqTemporary, size, false));
setType(TType(basicType, higherPrecision, EvqTemporary, size, 1));
}
} else {
infoSink.info.message(EPrefixInternalError, "Missing elses", getLine());
......@@ -802,7 +809,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
if (! left->isVector())
return false;
op = EOpVectorTimesScalarAssign;
setType(TType(basicType, higherPrecision, EvqTemporary, size, false));
setType(TType(basicType, higherPrecision, EvqTemporary, size, 1));
}
} else {
infoSink.info.message(EPrefixInternalError, "Missing elses", getLine());
......@@ -821,7 +828,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
if ((left->isMatrix() && right->isVector()) ||
(left->isVector() && right->isMatrix()))
return false;
setType(TType(basicType, higherPrecision, EvqTemporary, size, left->isMatrix() || right->isMatrix()));
setType(TType(basicType, higherPrecision, EvqTemporary, size, matrixSize));
break;
case EOpEqual:
......@@ -1288,6 +1295,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
const TType& t = node->getType();
return addConstantUnion(leftUnionArray, TType(promoteTo, t.getPrecision(), t.getQualifier(), t.getNominalSize(), t.isMatrix(), t.isArray()), node->getLine());
return addConstantUnion(leftUnionArray, TType(promoteTo, t.getPrecision(), t.getQualifier(), t.getNominalSize(), t.getSecondarySize(), t.isArray()), node->getLine());
}
......@@ -19,6 +19,7 @@
#define GL_APICALL
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES3/gl3.h>
namespace glsl
{
......@@ -33,7 +34,7 @@ namespace glsl
class Temporary : public TIntermSymbol
{
public:
Temporary(OutputASM *assembler) : TIntermSymbol(0, "tmp", TType(EbtFloat, EbpHigh, EvqTemporary, 4, false, false)), assembler(assembler)
Temporary(OutputASM *assembler) : TIntermSymbol(0, "tmp", TType(EbtFloat, EbpHigh, EvqTemporary, 4, 1, false)), assembler(assembler)
{
}
......@@ -49,7 +50,7 @@ namespace glsl
class Constant : public TIntermConstantUnion
{
public:
Constant(float x, float y, float z, float w) : TIntermConstantUnion(constants, TType(EbtFloat, EbpHigh, EvqConstExpr, 4, false, false))
Constant(float x, float y, float z, float w) : TIntermConstantUnion(constants, TType(EbtFloat, EbpHigh, EvqConstExpr, 4, 1, false))
{
constants[0].setFConst(x);
constants[1].setFConst(y);
......@@ -57,12 +58,12 @@ namespace glsl
constants[3].setFConst(w);
}
Constant(bool b) : TIntermConstantUnion(constants, TType(EbtBool, EbpHigh, EvqConstExpr, 1, false, false))
Constant(bool b) : TIntermConstantUnion(constants, TType(EbtBool, EbpHigh, EvqConstExpr, 1, 1, false))
{
constants[0].setBConst(b);
}
Constant(int i) : TIntermConstantUnion(constants, TType(EbtInt, EbpHigh, EvqConstExpr, 1, false, false))
Constant(int i) : TIntermConstantUnion(constants, TType(EbtInt, EbpHigh, EvqConstExpr, 1, 1, false))
{
constants[0].setIConst(i);
}
......@@ -2357,9 +2358,30 @@ namespace glsl
{
switch(type.getNominalSize())
{
case 2: return GL_FLOAT_MAT2;
case 3: return GL_FLOAT_MAT3;
case 4: return GL_FLOAT_MAT4;
case 2:
switch(type.getSecondarySize())
{
case 2: return GL_FLOAT_MAT2;
case 3: return GL_FLOAT_MAT2x3;
case 4: return GL_FLOAT_MAT2x4;
default: UNREACHABLE();
}
case 3:
switch(type.getSecondarySize())
{
case 2: return GL_FLOAT_MAT3x2;
case 3: return GL_FLOAT_MAT3;
case 4: return GL_FLOAT_MAT4x2;
default: UNREACHABLE();
}
case 4:
switch(type.getSecondarySize())
{
case 2: return GL_FLOAT_MAT4x2;
case 3: return GL_FLOAT_MAT4x3;
case 4: return GL_FLOAT_MAT4;
default: UNREACHABLE();
}
default: UNREACHABLE();
}
}
......
......@@ -580,7 +580,7 @@ bool TParseContext::boolErrorCheck(int line, const TIntermTyped* type)
//
bool TParseContext::boolErrorCheck(int line, const TPublicType& pType)
{
if (pType.type != EbtBool || pType.array || pType.matrix || (pType.size > 1)) {
if (pType.type != EbtBool || pType.array || (pType.primarySize > 1) || (pType.secondarySize > 1)) {
error(line, "boolean expression expected", "");
return true;
}
......
......@@ -25,7 +25,7 @@
int TSymbolTableLevel::uniqueId = 0;
TType::TType(const TPublicType &p) :
type(p.type), precision(p.precision), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(p.arraySize),
type(p.type), precision(p.precision), primarySize(p.primarySize), secondarySize(p.secondarySize), qualifier(p.qualifier), array(p.array), arraySize(p.arraySize),
maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{
if (p.userDef)
......
......@@ -439,7 +439,7 @@ public:
return true; // Skip sampler types for the time being
if (type.type != EbtFloat && type.type != EbtInt)
return false; // Only set default precision for int/float
if (type.size != 1 || type.matrix || type.array)
if (type.primarySize > 1 || type.secondarySize > 1 || type.array)
return false; // Not allowed to set for aggregate types
int indexOfLastElement = static_cast<int>(precisionStack.size()) - 1;
precisionStack[indexOfLastElement][type.type] = prec; // Uses map operator [], overwrites the current value
......
......@@ -39,19 +39,19 @@ class TType
public:
POOL_ALLOCATOR_NEW_DELETE();
TType() {}
TType(TBasicType t, int s = 1, bool m = false) :
type(t), precision(EbpUndefined), qualifier(EvqGlobal), size(s), matrix(m), array(false), arraySize(0),
TType(TBasicType t, int s0 = 1, int s1 = 1) :
type(t), precision(EbpUndefined), qualifier(EvqGlobal), primarySize(s0), secondarySize(s1), array(false), arraySize(0),
maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{
}
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) :
type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0),
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s0 = 1, int s1 = 1, bool a = false) :
type(t), precision(p), qualifier(q), primarySize(s0), secondarySize(s1), array(a), arraySize(0),
maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{
}
explicit TType(const TPublicType &p);
TType(TTypeList* userDef, const TString& n, TPrecision p = EbpUndefined) :
type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0),
type(EbtStruct), precision(p), qualifier(EvqTemporary), primarySize(1), secondarySize(1), array(false), arraySize(0),
maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0)
{
typeName = NewPoolTString(n.c_str());
......@@ -67,8 +67,8 @@ public:
void setQualifier(TQualifier q) { qualifier = q; }
// One-dimensional size of single instance type
int getNominalSize() const { return size; }
void setNominalSize(int s) { size = s; }
int getNominalSize() const { return primarySize; }
void setNominalSize(int s) { primarySize = s; }
// Full size of single instance of type
int getObjectSize() const
{
......@@ -88,13 +88,13 @@ public:
{
return getStructSize();
}
else if(matrix)
else if(isMatrix())
{
return size * size;
return primarySize * secondarySize;
}
else // Vector or scalar
{
return size;
return primarySize;
}
}
......@@ -135,8 +135,9 @@ public:
}
}
bool isMatrix() const { return matrix ? true : false; }
void setMatrix(bool m) { matrix = m; }
bool isMatrix() const { return secondarySize > 1; }
void setSecondarySize(int s1) { secondarySize = s1; }
int getSecondarySize() const { return secondarySize; }
bool isArray() const { return array ? true : false; }
int getArraySize() const { return arraySize; }
......@@ -147,9 +148,9 @@ public:
void setArrayInformationType(TType* t) { arrayInformationType = t; }
TType* getArrayInformationType() const { return arrayInformationType; }
bool isVector() const { return size > 1 && !matrix; }
bool isScalar() const { return size == 1 && !matrix && !structure; }
bool isRegister() const { return !matrix && !structure && !array; } // Fits in a 4-element register
bool isVector() const { return primarySize > 1 && !isMatrix(); }
bool isScalar() const { return primarySize == 1 && !isMatrix() && !structure; }
bool isRegister() const { return !isMatrix() && !structure && !array; } // Fits in a 4-element register
bool isStruct() const { return structure != 0; }
bool isScalarInt() const { return isScalar() && (type == EbtInt || type == EbtUInt); }
......@@ -189,15 +190,15 @@ public:
bool sameElementType(const TType& right) const {
return type == right.type &&
size == right.size &&
matrix == right.matrix &&
primarySize == right.primarySize &&
secondarySize == right.secondarySize &&
structure == right.structure;
}
bool operator==(const TType& right) const {
return type == right.type &&
size == right.size &&
matrix == right.matrix &&
array == right.array && (!array || arraySize == right.arraySize) &&
primarySize == right.primarySize &&
secondarySize == right.secondarySize &&
array == right.array && (!array || arraySize == right.arraySize) &&
structure == right.structure;
// don't check the qualifier, it's not ever what's being sought after
}
......@@ -206,8 +207,8 @@ public:
}
bool operator<(const TType& right) const {
if (type != right.type) return type < right.type;
if (size != right.size) return size < right.size;
if (matrix != right.matrix) return matrix < right.matrix;
if(primarySize != right.primarySize) return (primarySize * secondarySize) < (right.primarySize * right.secondarySize);
if(secondarySize != right.secondarySize) return secondarySize < right.secondarySize;
if (array != right.array) return array < right.array;
if (arraySize != right.arraySize) return arraySize < right.arraySize;
if (structure != right.structure) return structure < right.structure;
......@@ -244,8 +245,8 @@ protected:
TBasicType type;
TPrecision precision;
TQualifier qualifier;
unsigned char size; // size of vector or matrix, not size of array
bool matrix;
unsigned char primarySize; // size of vector or matrix, not size of array
unsigned char secondarySize; // secondarySize: 1 for vectors, >1 for matrices
bool array;
int arraySize;
int maxArraySize;
......@@ -275,8 +276,8 @@ struct TPublicType
TLayoutQualifier layoutQualifier;
TQualifier qualifier;
TPrecision precision;
int size; // size of vector or matrix, not size of array
bool matrix;
int primarySize; // size of vector or matrix, not size of array
int secondarySize; // 1 for scalars/vectors, >1 for matrices
bool array;
int arraySize;
TType* userDef;
......@@ -288,20 +289,26 @@ struct TPublicType
layoutQualifier = TLayoutQualifier::create();
qualifier = q;
precision = EbpUndefined;
size = 1;
matrix = false;
primarySize = 1;
secondarySize = 1;
array = false;
arraySize = 0;
userDef = 0;
line = ln;
}
void setAggregate(int s, bool m = false)
void setAggregate(int s)
{
size = s;
matrix = m;
primarySize = s;
secondarySize = 1;
}
void setMatrix(int s0, int s1)
{
primarySize = s0;
secondarySize = s1;
}
void setArray(bool a, int s = 0)
{
array = a;
......
/*
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -133,6 +133,17 @@ O [0-7]
"mat3" { context->lexAfterType = true; return(MATRIX3); }
"mat4" { context->lexAfterType = true; return(MATRIX4); }
"mat2x2" { return ES2_identifier_ES3_keyword(context, MATRIX2); }
"mat3x3" { return ES2_identifier_ES3_keyword(context, MATRIX3); }
"mat4x4" { return ES2_identifier_ES3_keyword(context, MATRIX4); }
"mat2x3" { return ES2_identifier_ES3_keyword(context, MATRIX2x3); }
"mat3x2" { return ES2_identifier_ES3_keyword(context, MATRIX3x2); }
"mat2x4" { return ES2_identifier_ES3_keyword(context, MATRIX2x4); }
"mat4x2" { return ES2_identifier_ES3_keyword(context, MATRIX4x2); }
"mat3x4" { return ES2_identifier_ES3_keyword(context, MATRIX3x4); }
"mat4x3" { return ES2_identifier_ES3_keyword(context, MATRIX4x3); }
"vec2" { context->lexAfterType = true; return (VEC2); }
"vec3" { context->lexAfterType = true; return (VEC3); }
"vec4" { context->lexAfterType = true; return (VEC4); }
......@@ -151,7 +162,18 @@ O [0-7]
"samplerExternalOES" { context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
"sampler3D" { context->lexAfterType = true; return SAMPLER3D; }
"sampler3DRect" { return ES2_reserved_ES3_keyword(context, SAMPLER3DRECT); }
"sampler2DArray" { return ES2_identifier_ES3_keyword(context, SAMPLER2DARRAY); }
"isampler2D" { return ES2_identifier_ES3_keyword(context, ISAMPLER2D); }
"isampler3D" { return ES2_identifier_ES3_keyword(context, ISAMPLER3D); }
"isamplerCube" { return ES2_identifier_ES3_keyword(context, ISAMPLERCUBE); }
"isampler2DArray" { return ES2_identifier_ES3_keyword(context, ISAMPLER2DARRAY); }
"usampler2D" { return ES2_identifier_ES3_keyword(context, USAMPLER2D); }
"usampler3D" { return ES2_identifier_ES3_keyword(context, USAMPLER3D); }
"usamplerCube" { return ES2_identifier_ES3_keyword(context, USAMPLERCUBE); }
"usampler2DArray" { return ES2_identifier_ES3_keyword(context, USAMPLER2DARRAY); }
"sampler2DShadow" { return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); }
"samplerCubeShadow" { return ES2_identifier_ES3_keyword(context, SAMPLERCUBESHADOW); }
"sampler2DArrayShadow" { return ES2_identifier_ES3_keyword(context, SAMPLER2DARRAYSHADOW); }
"struct" { context->lexAfterType = true; return(STRUCT); }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -81,72 +81,89 @@
INOUT_QUAL = 297,
UNIFORM = 298,
VARYING = 299,
CENTROID = 300,
FLAT = 301,
SMOOTH = 302,
STRUCT = 303,
VOID_TYPE = 304,
WHILE = 305,
SAMPLER2D = 306,
SAMPLERCUBE = 307,
SAMPLER_EXTERNAL_OES = 308,
SAMPLER2DRECT = 309,
SAMPLER3D = 310,
SAMPLER3DRECT = 311,
SAMPLER2DSHADOW = 312,
LAYOUT = 313,
IDENTIFIER = 314,
TYPE_NAME = 315,
FLOATCONSTANT = 316,
INTCONSTANT = 317,
UINTCONSTANT = 318,
BOOLCONSTANT = 319,
FIELD_SELECTION = 320,
LEFT_OP = 321,
RIGHT_OP = 322,
INC_OP = 323,
DEC_OP = 324,
LE_OP = 325,
GE_OP = 326,
EQ_OP = 327,
NE_OP = 328,
AND_OP = 329,
OR_OP = 330,
XOR_OP = 331,
MUL_ASSIGN = 332,
DIV_ASSIGN = 333,
ADD_ASSIGN = 334,
MOD_ASSIGN = 335,
LEFT_ASSIGN = 336,
RIGHT_ASSIGN = 337,
AND_ASSIGN = 338,
XOR_ASSIGN = 339,
OR_ASSIGN = 340,
SUB_ASSIGN = 341,
LEFT_PAREN = 342,
RIGHT_PAREN = 343,
LEFT_BRACKET = 344,
RIGHT_BRACKET = 345,
LEFT_BRACE = 346,
RIGHT_BRACE = 347,
DOT = 348,
COMMA = 349,
COLON = 350,
EQUAL = 351,
SEMICOLON = 352,
BANG = 353,
DASH = 354,
TILDE = 355,
PLUS = 356,
STAR = 357,
SLASH = 358,
PERCENT = 359,
LEFT_ANGLE = 360,
RIGHT_ANGLE = 361,
VERTICAL_BAR = 362,
CARET = 363,
AMPERSAND = 364,
QUESTION = 365
MATRIX2x3 = 300,
MATRIX3x2 = 301,
MATRIX2x4 = 302,
MATRIX4x2 = 303,
MATRIX3x4 = 304,
MATRIX4x3 = 305,
CENTROID = 306,
FLAT = 307,
SMOOTH = 308,
STRUCT = 309,
VOID_TYPE = 310,
WHILE = 311,
SAMPLER2D = 312,
SAMPLERCUBE = 313,
SAMPLER_EXTERNAL_OES = 314,
SAMPLER2DRECT = 315,
SAMPLER2DARRAY = 316,
ISAMPLER2D = 317,
ISAMPLER3D = 318,
ISAMPLERCUBE = 319,
ISAMPLER2DARRAY = 320,
USAMPLER2D = 321,
USAMPLER3D = 322,
USAMPLERCUBE = 323,
USAMPLER2DARRAY = 324,
SAMPLER3D = 325,
SAMPLER3DRECT = 326,
SAMPLER2DSHADOW = 327,
SAMPLERCUBESHADOW = 328,
SAMPLER2DARRAYSHADOW = 329,
LAYOUT = 330,
IDENTIFIER = 331,
TYPE_NAME = 332,
FLOATCONSTANT = 333,
INTCONSTANT = 334,
UINTCONSTANT = 335,
BOOLCONSTANT = 336,
FIELD_SELECTION = 337,
LEFT_OP = 338,
RIGHT_OP = 339,
INC_OP = 340,
DEC_OP = 341,
LE_OP = 342,
GE_OP = 343,
EQ_OP = 344,
NE_OP = 345,
AND_OP = 346,
OR_OP = 347,
XOR_OP = 348,
MUL_ASSIGN = 349,
DIV_ASSIGN = 350,
ADD_ASSIGN = 351,
MOD_ASSIGN = 352,
LEFT_ASSIGN = 353,
RIGHT_ASSIGN = 354,
AND_ASSIGN = 355,
XOR_ASSIGN = 356,
OR_ASSIGN = 357,
SUB_ASSIGN = 358,
LEFT_PAREN = 359,
RIGHT_PAREN = 360,
LEFT_BRACKET = 361,
RIGHT_BRACKET = 362,
LEFT_BRACE = 363,
RIGHT_BRACE = 364,
DOT = 365,
COMMA = 366,
COLON = 367,
EQUAL = 368,
SEMICOLON = 369,
BANG = 370,
DASH = 371,
TILDE = 372,
PLUS = 373,
STAR = 374,
SLASH = 375,
PERCENT = 376,
LEFT_ANGLE = 377,
RIGHT_ANGLE = 378,
VERTICAL_BAR = 379,
CARET = 380,
AMPERSAND = 381,
QUESTION = 382
};
#endif
......
......@@ -44,10 +44,10 @@ TString TType::getCompleteString() const
stream << getQualifierString() << " " << getPrecisionString() << " ";
if (array)
stream << "array of ";
if (matrix)
stream << size << "X" << size << " matrix of ";
else if (size > 1)
stream << size << "-component vector of ";
if (isMatrix())
stream << primarySize << "X" << secondarySize << " matrix of ";
else if(primarySize > 1)
stream << primarySize << "-component vector of ";
stream << getBasicString();
return stream.str();
......
......@@ -161,7 +161,13 @@ enum TOperator {
EOpConstructUVec3,
EOpConstructUVec4,
EOpConstructMat2,
EOpConstructMat2x3,
EOpConstructMat2x4,
EOpConstructMat3x2,
EOpConstructMat3,
EOpConstructMat3x4,
EOpConstructMat4x2,
EOpConstructMat4x3,
EOpConstructMat4,
EOpConstructStruct,
......@@ -247,6 +253,7 @@ public:
TQualifier getQualifier() const { return type.getQualifier(); }
TPrecision getPrecision() const { return type.getPrecision(); }
int getNominalSize() const { return type.getNominalSize(); }
int getSecondarySize() const { return type.getSecondarySize(); }
bool isMatrix() const { return type.isMatrix(); }
bool isArray() const { return type.isArray(); }
......
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