Change TType member from "type" to "basicType". It was very confusing.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21094 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
		
							parent
							
								
									f6648dc12c
								
							
						
					
					
						commit
						ed3197921e
					
				@ -288,7 +288,7 @@ public:
 | 
			
		||||
 | 
			
		||||
class TPublicType {
 | 
			
		||||
public:
 | 
			
		||||
    TBasicType type;
 | 
			
		||||
    TBasicType basicType;
 | 
			
		||||
    TSampler sampler;
 | 
			
		||||
    TQualifier qualifier;
 | 
			
		||||
    int vectorSize : 4;
 | 
			
		||||
@ -300,7 +300,7 @@ public:
 | 
			
		||||
 | 
			
		||||
    void initType(int ln = 0)
 | 
			
		||||
    {
 | 
			
		||||
        type = EbtVoid;
 | 
			
		||||
        basicType = EbtVoid;
 | 
			
		||||
        vectorSize = 1;
 | 
			
		||||
        matrixRows = 0;
 | 
			
		||||
        matrixCols = 0;
 | 
			
		||||
@ -352,7 +352,7 @@ class TType {
 | 
			
		||||
public:
 | 
			
		||||
    POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
 | 
			
		||||
    TType(TBasicType t, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0) :
 | 
			
		||||
                            type(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), arraySizes(0),
 | 
			
		||||
                            basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), arraySizes(0),
 | 
			
		||||
                            structure(0), structureSize(0), maxArraySize(0), arrayInformationType(0),
 | 
			
		||||
                            fieldName(0), mangled(0), typeName(0)
 | 
			
		||||
                            {
 | 
			
		||||
@ -361,7 +361,7 @@ public:
 | 
			
		||||
                                qualifier.storage = q;
 | 
			
		||||
                            }
 | 
			
		||||
    TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0) :
 | 
			
		||||
                            type(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), arraySizes(0),
 | 
			
		||||
                            basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), arraySizes(0),
 | 
			
		||||
                            structure(0), structureSize(0), maxArraySize(0), arrayInformationType(0),
 | 
			
		||||
                            fieldName(0), mangled(0), typeName(0)
 | 
			
		||||
                            {
 | 
			
		||||
@ -372,7 +372,7 @@ public:
 | 
			
		||||
                                assert(p >= 0 && p <= EpqHigh);
 | 
			
		||||
                            }
 | 
			
		||||
    explicit TType(const TPublicType &p) :
 | 
			
		||||
                            type(p.type), vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), arraySizes(p.arraySizes),
 | 
			
		||||
                            basicType(p.basicType), vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), arraySizes(p.arraySizes),
 | 
			
		||||
                            structure(0), structureSize(0), maxArraySize(0), arrayInformationType(0), fieldName(0), mangled(0), typeName(0)
 | 
			
		||||
                            {
 | 
			
		||||
                                sampler = p.sampler;
 | 
			
		||||
@ -383,7 +383,7 @@ public:
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
    TType(TTypeList* userDef, const TString& n, TStorageQualifier blockQualifier = EvqGlobal) :
 | 
			
		||||
                            type(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), arraySizes(0),
 | 
			
		||||
                            basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), arraySizes(0),
 | 
			
		||||
                            structure(userDef), maxArraySize(0), arrayInformationType(0), fieldName(0), mangled(0)
 | 
			
		||||
                            {
 | 
			
		||||
                                sampler.clear();
 | 
			
		||||
@ -391,7 +391,7 @@ public:
 | 
			
		||||
                                // is it an interface block?
 | 
			
		||||
                                if (blockQualifier != EvqGlobal) {
 | 
			
		||||
                                    qualifier.storage = blockQualifier;
 | 
			
		||||
                                    type = EbtBlock;
 | 
			
		||||
                                    basicType = EbtBlock;
 | 
			
		||||
                                }
 | 
			
		||||
								typeName = NewPoolTString(n.c_str());
 | 
			
		||||
                            }
 | 
			
		||||
@ -402,7 +402,7 @@ public:
 | 
			
		||||
 | 
			
		||||
	void copyType(const TType& copyOf, const TStructureMap& remapper)
 | 
			
		||||
	{
 | 
			
		||||
		type = copyOf.type;
 | 
			
		||||
		basicType = copyOf.basicType;
 | 
			
		||||
        sampler = copyOf.sampler;
 | 
			
		||||
		qualifier = copyOf.qualifier;
 | 
			
		||||
		vectorSize = copyOf.vectorSize;
 | 
			
		||||
@ -472,7 +472,7 @@ public:
 | 
			
		||||
 | 
			
		||||
    virtual void setElementType(TBasicType t, int s, int mc, int mr, const TType* userDef)
 | 
			
		||||
    {
 | 
			
		||||
        type = t;
 | 
			
		||||
        basicType = t;
 | 
			
		||||
        vectorSize = s;
 | 
			
		||||
        matrixCols = mc;
 | 
			
		||||
        matrixRows = mr;
 | 
			
		||||
@ -494,7 +494,7 @@ public:
 | 
			
		||||
		return *fieldName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    virtual TBasicType getBasicType() const { return type; }
 | 
			
		||||
    virtual TBasicType getBasicType() const { return basicType; }
 | 
			
		||||
    virtual const TSampler& getSampler() const { return sampler; }
 | 
			
		||||
    virtual TQualifier& getQualifier() { return qualifier; }
 | 
			
		||||
    virtual const TQualifier& getQualifier() const { return qualifier; }
 | 
			
		||||
@ -519,7 +519,7 @@ public:
 | 
			
		||||
    TType* getArrayInformationType() { return arrayInformationType; }
 | 
			
		||||
    virtual bool isVector() const { return vectorSize > 1; }
 | 
			
		||||
    const char* getBasicString() const {
 | 
			
		||||
        return TType::getBasicString(type);
 | 
			
		||||
        return TType::getBasicString(basicType);
 | 
			
		||||
    }
 | 
			
		||||
    static const char* getBasicString(TBasicType t) {
 | 
			
		||||
        switch (t) {
 | 
			
		||||
@ -604,7 +604,7 @@ public:
 | 
			
		||||
 | 
			
		||||
    TString getCompleteTypeString() const
 | 
			
		||||
    {
 | 
			
		||||
        if (type == EbtSampler)
 | 
			
		||||
        if (basicType == EbtSampler)
 | 
			
		||||
            return sampler.getString();
 | 
			
		||||
        else
 | 
			
		||||
            return getBasicString();
 | 
			
		||||
@ -645,7 +645,7 @@ public:
 | 
			
		||||
 | 
			
		||||
    bool sameElementType(const TType& right) const
 | 
			
		||||
    {
 | 
			
		||||
        return       type == right.type       &&
 | 
			
		||||
        return  basicType == right.basicType  &&
 | 
			
		||||
                  sampler == right.sampler    &&
 | 
			
		||||
               vectorSize == right.vectorSize &&
 | 
			
		||||
               matrixCols == right.matrixCols &&
 | 
			
		||||
@ -670,7 +670,7 @@ protected:
 | 
			
		||||
    void buildMangledName(TString&);
 | 
			
		||||
    int getStructSize() const;
 | 
			
		||||
 | 
			
		||||
	TBasicType type      : 8;
 | 
			
		||||
	TBasicType basicType : 8;
 | 
			
		||||
    int vectorSize       : 4;
 | 
			
		||||
    int matrixCols       : 4;
 | 
			
		||||
    int matrixRows       : 4;
 | 
			
		||||
 | 
			
		||||
@ -577,7 +577,7 @@ bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction
 | 
			
		||||
//
 | 
			
		||||
bool TParseContext::voidErrorCheck(int line, const TString& identifier, const TPublicType& pubType)
 | 
			
		||||
{
 | 
			
		||||
    if (pubType.type == EbtVoid) {
 | 
			
		||||
    if (pubType.basicType == EbtVoid) {
 | 
			
		||||
        error(line, "illegal use of type 'void'", identifier.c_str(), "");
 | 
			
		||||
        return true;
 | 
			
		||||
    } 
 | 
			
		||||
@ -605,7 +605,7 @@ bool TParseContext::boolErrorCheck(int line, const TIntermTyped* type)
 | 
			
		||||
//
 | 
			
		||||
bool TParseContext::boolErrorCheck(int line, const TPublicType& pType)
 | 
			
		||||
{
 | 
			
		||||
    if (pType.type != EbtBool || pType.arraySizes || pType.matrixCols > 1 || (pType.vectorSize > 1)) {
 | 
			
		||||
    if (pType.basicType != EbtBool || pType.arraySizes || pType.matrixCols > 1 || (pType.vectorSize > 1)) {
 | 
			
		||||
        error(line, "boolean expression expected", "", "");
 | 
			
		||||
        return true;
 | 
			
		||||
    } 
 | 
			
		||||
@ -615,16 +615,16 @@ bool TParseContext::boolErrorCheck(int line, const TPublicType& pType)
 | 
			
		||||
 | 
			
		||||
bool TParseContext::samplerErrorCheck(int line, const TPublicType& pType, const char* reason)
 | 
			
		||||
{
 | 
			
		||||
    if (pType.type == EbtStruct) {
 | 
			
		||||
    if (pType.basicType == EbtStruct) {
 | 
			
		||||
        if (containsSampler(*pType.userDef)) {
 | 
			
		||||
            error(line, reason, TType::getBasicString(pType.type), "(structure cannot contain a sampler or image)");
 | 
			
		||||
            error(line, reason, TType::getBasicString(pType.basicType), "(structure cannot contain a sampler or image)");
 | 
			
		||||
        
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        return false;
 | 
			
		||||
    } else if (pType.type == EbtSampler) {
 | 
			
		||||
        error(line, reason, TType::getBasicString(pType.type), "");
 | 
			
		||||
    } else if (pType.basicType == EbtSampler) {
 | 
			
		||||
        error(line, reason, TType::getBasicString(pType.basicType), "");
 | 
			
		||||
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
@ -672,13 +672,13 @@ bool TParseContext::globalQualifierFixAndErrorCheck(int line, TQualifier& qualif
 | 
			
		||||
 | 
			
		||||
    // now, knowing it is a shader in/out, do all the in/out semantic checks
 | 
			
		||||
 | 
			
		||||
    if (publicType.type == EbtBool) {
 | 
			
		||||
    if (publicType.basicType == EbtBool) {
 | 
			
		||||
        error(line, "cannot be bool",  getStorageQualifierString(qualifier.storage), "");
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (language == EShLangVertex && qualifier.storage == EvqVaryingIn) {
 | 
			
		||||
        if (publicType.type == EbtStruct) {
 | 
			
		||||
        if (publicType.basicType == EbtStruct) {
 | 
			
		||||
            error(line, "cannot be a structure or array",  getStorageQualifierString(qualifier.storage), "");
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
@ -690,17 +690,17 @@ bool TParseContext::globalQualifierFixAndErrorCheck(int line, TQualifier& qualif
 | 
			
		||||
 | 
			
		||||
    if (language == EShLangFragment && qualifier.storage == EvqVaryingOut) {
 | 
			
		||||
        profileRequires(line, EEsProfile, 300, 0, "fragment shader output");
 | 
			
		||||
        if (publicType.type == EbtStruct) {
 | 
			
		||||
        if (publicType.basicType == EbtStruct) {
 | 
			
		||||
            error(line, "cannot be a structure",  getStorageQualifierString(qualifier.storage), "");
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (publicType.type == EbtInt || publicType.type == EbtUint || publicType.type == EbtDouble) {
 | 
			
		||||
    if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || publicType.basicType == EbtDouble) {
 | 
			
		||||
        profileRequires(line, EEsProfile, 300, 0, "shader input/output");
 | 
			
		||||
        if (language != EShLangVertex   && qualifier.storage == EvqVaryingIn  && ! qualifier.flat ||
 | 
			
		||||
            language != EShLangFragment && qualifier.storage == EvqVaryingOut && ! qualifier.flat) {
 | 
			
		||||
            error(line, "must be qualified as 'flat'", getStorageQualifierString(qualifier.storage), TType::getBasicString(publicType.type));
 | 
			
		||||
            error(line, "must be qualified as 'flat'", getStorageQualifierString(qualifier.storage), TType::getBasicString(publicType.basicType));
 | 
			
		||||
         
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
@ -776,7 +776,7 @@ bool TParseContext::mergeQualifiersErrorCheck(int line, TPublicType& dst, const
 | 
			
		||||
 | 
			
		||||
void TParseContext::setDefaultPrecision(int line, TPublicType& publicType, TPrecisionQualifier qualifier)
 | 
			
		||||
{
 | 
			
		||||
    TBasicType basicType = publicType.type;
 | 
			
		||||
    TBasicType basicType = publicType.basicType;
 | 
			
		||||
 | 
			
		||||
    if (basicType == EbtSampler || basicType == EbtInt || basicType == EbtFloat) {
 | 
			
		||||
        if (publicType.isScalar()) {
 | 
			
		||||
@ -1478,7 +1478,7 @@ void TParseContext::addBlock(int line, TPublicType& qualifier, const TString& bl
 | 
			
		||||
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    if (qualifier.type != EbtVoid) {
 | 
			
		||||
    if (qualifier.basicType != EbtVoid) {
 | 
			
		||||
        error(line, "interface blocks cannot be declared with a type", blockName.c_str(), "");
 | 
			
		||||
        recover();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -55,7 +55,7 @@ void TType::buildMangledName(TString& mangledName)
 | 
			
		||||
    else if (isVector())
 | 
			
		||||
        mangledName += 'v';
 | 
			
		||||
 | 
			
		||||
    switch (type) {
 | 
			
		||||
    switch (basicType) {
 | 
			
		||||
    case EbtFloat:              mangledName += 'f';      break;
 | 
			
		||||
    case EbtDouble:             mangledName += 'd';      break;
 | 
			
		||||
    case EbtInt:                mangledName += 'i';      break;
 | 
			
		||||
 | 
			
		||||
@ -652,7 +652,7 @@ function_identifier
 | 
			
		||||
            $$.function = function;
 | 
			
		||||
        } else {
 | 
			
		||||
            TOperator op = EOpNull;
 | 
			
		||||
            switch ($1.type) {
 | 
			
		||||
            switch ($1.basicType) {
 | 
			
		||||
            case EbtFloat:
 | 
			
		||||
                if ($1.matrixCols) {
 | 
			
		||||
                    switch ($1.matrixCols) {
 | 
			
		||||
@ -760,9 +760,9 @@ function_identifier
 | 
			
		||||
            default: break; // some compilers want this
 | 
			
		||||
            }
 | 
			
		||||
            if (op == EOpNull) {
 | 
			
		||||
                parseContext.error($1.line, "cannot construct this type", TType::getBasicString($1.type), "");
 | 
			
		||||
                parseContext.error($1.line, "cannot construct this type", TType::getBasicString($1.basicType), "");
 | 
			
		||||
                parseContext.recover();
 | 
			
		||||
                $1.type = EbtFloat;
 | 
			
		||||
                $1.basicType = EbtFloat;
 | 
			
		||||
                op = EOpConstructFloat;
 | 
			
		||||
            }
 | 
			
		||||
            TString tempString = "";
 | 
			
		||||
@ -1318,7 +1318,7 @@ parameter_declarator
 | 
			
		||||
            parseContext.profileRequires($1.line, ENoProfile, 120, "GL_3DL_array_objects", "arrayed type");
 | 
			
		||||
            parseContext.profileRequires($1.line, EEsProfile, 300, 0, "arrayed type");
 | 
			
		||||
        }
 | 
			
		||||
        if ($1.type == EbtVoid) {
 | 
			
		||||
        if ($1.basicType == EbtVoid) {
 | 
			
		||||
            parseContext.error($2.line, "illegal use of type 'void'", $2.string->c_str(), "");
 | 
			
		||||
            parseContext.recover();
 | 
			
		||||
        }
 | 
			
		||||
@ -1662,8 +1662,8 @@ type_qualifier
 | 
			
		||||
    }
 | 
			
		||||
    | type_qualifier single_type_qualifier {
 | 
			
		||||
        $$ = $1;
 | 
			
		||||
        if ($$.type == EbtVoid)
 | 
			
		||||
            $$.type = $2.type;
 | 
			
		||||
        if ($$.basicType == EbtVoid)
 | 
			
		||||
            $$.basicType = $2.basicType;
 | 
			
		||||
 | 
			
		||||
        if (parseContext.mergeQualifiersErrorCheck($$.line, $$, $2, false))
 | 
			
		||||
            parseContext.recover();
 | 
			
		||||
@ -1830,11 +1830,11 @@ type_name_list
 | 
			
		||||
type_specifier
 | 
			
		||||
    : type_specifier_nonarray {
 | 
			
		||||
        $$ = $1;
 | 
			
		||||
        $$.qualifier.precision = parseContext.defaultPrecision[$$.type];
 | 
			
		||||
        $$.qualifier.precision = parseContext.defaultPrecision[$$.basicType];
 | 
			
		||||
    }
 | 
			
		||||
    | type_specifier_nonarray array_specifier {
 | 
			
		||||
        $$ = $1;
 | 
			
		||||
        $$.qualifier.precision = parseContext.defaultPrecision[$$.type];
 | 
			
		||||
        $$.qualifier.precision = parseContext.defaultPrecision[$$.basicType];
 | 
			
		||||
        $$.arraySizes = $2.arraySizes;
 | 
			
		||||
    }
 | 
			
		||||
    ;
 | 
			
		||||
@ -1871,619 +1871,619 @@ array_specifier
 | 
			
		||||
type_specifier_nonarray
 | 
			
		||||
    : VOID {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtVoid;
 | 
			
		||||
        $$.basicType = EbtVoid;
 | 
			
		||||
    }
 | 
			
		||||
    | FLOAT {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
    }
 | 
			
		||||
    | DOUBLE {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
    }
 | 
			
		||||
    | INT {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtInt;
 | 
			
		||||
        $$.basicType = EbtInt;
 | 
			
		||||
    }
 | 
			
		||||
    | UINT {
 | 
			
		||||
        parseContext.fullIntegerCheck($1.line, "unsigned integer");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtUint;
 | 
			
		||||
        $$.basicType = EbtUint;
 | 
			
		||||
    }
 | 
			
		||||
    | BOOL {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtBool;
 | 
			
		||||
        $$.basicType = EbtBool;
 | 
			
		||||
    }
 | 
			
		||||
    | VEC2 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setVector(2);
 | 
			
		||||
    }
 | 
			
		||||
    | VEC3 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setVector(3);
 | 
			
		||||
    }
 | 
			
		||||
    | VEC4 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setVector(4);
 | 
			
		||||
    }
 | 
			
		||||
    | DVEC2 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double vector");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setVector(2);
 | 
			
		||||
    }
 | 
			
		||||
    | DVEC3 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double vector");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setVector(3);
 | 
			
		||||
    }
 | 
			
		||||
    | DVEC4 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double vector");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setVector(4);
 | 
			
		||||
    }
 | 
			
		||||
    | BVEC2 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtBool;
 | 
			
		||||
        $$.basicType = EbtBool;
 | 
			
		||||
        $$.setVector(2);
 | 
			
		||||
    }
 | 
			
		||||
    | BVEC3 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtBool;
 | 
			
		||||
        $$.basicType = EbtBool;
 | 
			
		||||
        $$.setVector(3);
 | 
			
		||||
    }
 | 
			
		||||
    | BVEC4 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtBool;
 | 
			
		||||
        $$.basicType = EbtBool;
 | 
			
		||||
        $$.setVector(4);
 | 
			
		||||
    }
 | 
			
		||||
    | IVEC2 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtInt;
 | 
			
		||||
        $$.basicType = EbtInt;
 | 
			
		||||
        $$.setVector(2);
 | 
			
		||||
    }
 | 
			
		||||
    | IVEC3 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtInt;
 | 
			
		||||
        $$.basicType = EbtInt;
 | 
			
		||||
        $$.setVector(3);
 | 
			
		||||
    }
 | 
			
		||||
    | IVEC4 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtInt;
 | 
			
		||||
        $$.basicType = EbtInt;
 | 
			
		||||
        $$.setVector(4);
 | 
			
		||||
    }
 | 
			
		||||
    | UVEC2 {
 | 
			
		||||
        parseContext.fullIntegerCheck($1.line, "unsigned integer vector");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtUint;
 | 
			
		||||
        $$.basicType = EbtUint;
 | 
			
		||||
        $$.setVector(2);
 | 
			
		||||
    }
 | 
			
		||||
    | UVEC3 {
 | 
			
		||||
        parseContext.fullIntegerCheck($1.line, "unsigned integer vector");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtUint;
 | 
			
		||||
        $$.basicType = EbtUint;
 | 
			
		||||
        $$.setVector(3);
 | 
			
		||||
    }
 | 
			
		||||
    | UVEC4 {
 | 
			
		||||
        parseContext.fullIntegerCheck($1.line, "unsigned integer vector");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtUint;
 | 
			
		||||
        $$.basicType = EbtUint;
 | 
			
		||||
        $$.setVector(4);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT2 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(2, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT3 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(3, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT4 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(4, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT2X2 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(2, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT2X3 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(2, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT2X4 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(2, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT3X2 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(3, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT3X3 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(3, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT3X4 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(3, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT4X2 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(4, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT4X3 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(4, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | MAT4X4 {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtFloat;
 | 
			
		||||
        $$.basicType = EbtFloat;
 | 
			
		||||
        $$.setMatrix(4, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT2 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(2, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT3 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(3, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT4 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(4, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT2X2 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(2, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT2X3 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(2, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT2X4 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(2, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT3X2 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(3, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT3X3 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(3, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT3X4 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(3, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT4X2 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(4, 2);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT4X3 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(4, 3);
 | 
			
		||||
    }
 | 
			
		||||
    | DMAT4X4 {
 | 
			
		||||
        parseContext.doubleCheck($1.line, "double matrix");
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtDouble;
 | 
			
		||||
        $$.basicType = EbtDouble;
 | 
			
		||||
        $$.setMatrix(4, 4);
 | 
			
		||||
    }
 | 
			
		||||
    | ATOMIC_UINT {
 | 
			
		||||
        // TODO: add type
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtInt;
 | 
			
		||||
        $$.basicType = EbtInt;
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER1D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd1D);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd2D);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER3D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd3D);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLERCUBE {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, EsdCube);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER1DSHADOW {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd1D, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2DSHADOW {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd2D, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLERCUBESHADOW {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, EsdCube, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER1DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd1D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd2D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER1DARRAYSHADOW {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd1D, true, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2DARRAYSHADOW {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd2D, true, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLERCUBEARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, EsdCube, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLERCUBEARRAYSHADOW {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, EsdCube, true, true);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER1D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd1D);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER2D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd2D);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER3D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd3D);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLERCUBE {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, EsdCube);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER1DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd1D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER2DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd2D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLERCUBEARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd3D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER1D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, Esd1D);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER2D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, Esd2D);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER3D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, Esd3D);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLERCUBE {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, EsdCube);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER1DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, Esd1D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER2DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, Esd2D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLERCUBEARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, EsdCube, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2DRECT {
 | 
			
		||||
        parseContext.profileRequires($1.line, ENoProfile, 140, "GL_ARB_texture_rectangle", "rectangle texture");
 | 
			
		||||
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, EsdRect);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2DRECTSHADOW {
 | 
			
		||||
        parseContext.profileRequires($1.line, ECoreProfile, 140, "GL_ARB_texture_rectangle", "rectangle texture");
 | 
			
		||||
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, EsdRect, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER2DRECT {
 | 
			
		||||
        parseContext.profileRequires($1.line, ECoreProfile, 140, "GL_ARB_texture_rectangle", "rectangle texture");
 | 
			
		||||
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, EsdRect);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER2DRECT {
 | 
			
		||||
        parseContext.profileRequires($1.line, ECoreProfile, 140, "GL_ARB_texture_rectangle", "rectangle texture");
 | 
			
		||||
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, EsdRect);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLERBUFFER {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, EsdBuffer);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLERBUFFER {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, EsdBuffer);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLERBUFFER {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, EsdBuffer);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2DMS {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd2D, false, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER2DMS {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd2D, false, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER2DMS {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, Esd2D, false, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | SAMPLER2DMSARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtFloat, Esd2D, true, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | ISAMPLER2DMSARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtInt, Esd2D, true, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | USAMPLER2DMSARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.set(EbtUint, Esd2D, true, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE1D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, Esd1D);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE1D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, Esd1D);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE1D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, Esd1D);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE2D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, Esd2D);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE2D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, Esd2D);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE2D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, Esd2D);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE3D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, Esd3D);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE3D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, Esd3D);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE3D {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, Esd3D);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE2DRECT {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, EsdRect);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE2DRECT {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, EsdRect);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE2DRECT {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, EsdRect);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGECUBE {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, EsdCube);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGECUBE {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, EsdCube);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGECUBE {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, EsdCube);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGEBUFFER {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, EsdBuffer);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGEBUFFER {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, EsdBuffer);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGEBUFFER {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, EsdBuffer);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE1DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, Esd1D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE1DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, Esd1D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE1DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, Esd1D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE2DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, Esd2D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE2DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, Esd2D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE2DARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, Esd2D, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGECUBEARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, EsdCube, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGECUBEARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, EsdCube, true);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGECUBEARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, EsdCube, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE2DMS {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, Esd2D, false, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE2DMS {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, Esd2D, false, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE2DMS {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, Esd2D, false, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IMAGE2DMSARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtFloat, Esd2D, true, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | IIMAGE2DMSARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtInt, Esd2D, true, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | UIMAGE2DMSARRAY {
 | 
			
		||||
        $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
        $$.type = EbtSampler;
 | 
			
		||||
        $$.basicType = EbtSampler;
 | 
			
		||||
        $$.sampler.setImage(EbtUint, Esd2D, true, false, true);
 | 
			
		||||
    }
 | 
			
		||||
    | struct_specifier {
 | 
			
		||||
@ -2498,7 +2498,7 @@ type_specifier_nonarray
 | 
			
		||||
        if (TVariable* variable = ($1.symbol)->getAsVariable()) {
 | 
			
		||||
            const TType& structure = variable->getType();
 | 
			
		||||
            $$.init($1.line, parseContext.symbolTable.atGlobalLevel());
 | 
			
		||||
            $$.type = EbtStruct;
 | 
			
		||||
            $$.basicType = EbtStruct;
 | 
			
		||||
            $$.userDef = &structure;
 | 
			
		||||
        } else {
 | 
			
		||||
            parseContext.error($1.line, "expected type name", $1.string->c_str(), "");
 | 
			
		||||
@ -2538,13 +2538,13 @@ struct_specifier
 | 
			
		||||
            parseContext.recover();
 | 
			
		||||
        }
 | 
			
		||||
        $$.init($1.line);
 | 
			
		||||
        $$.type = EbtStruct;
 | 
			
		||||
        $$.basicType = EbtStruct;
 | 
			
		||||
        $$.userDef = structure;
 | 
			
		||||
    }
 | 
			
		||||
    | STRUCT LEFT_BRACE struct_declaration_list RIGHT_BRACE {
 | 
			
		||||
        TType* structure = new TType($3, TString(""));
 | 
			
		||||
        $$.init($1.line);
 | 
			
		||||
        $$.type = EbtStruct;
 | 
			
		||||
        $$.basicType = EbtStruct;
 | 
			
		||||
        $$.userDef = structure;
 | 
			
		||||
    }
 | 
			
		||||
    ;
 | 
			
		||||
@ -2583,7 +2583,7 @@ struct_declaration
 | 
			
		||||
            //
 | 
			
		||||
            // Careful not to replace already know aspects of type, like array-ness
 | 
			
		||||
            //
 | 
			
		||||
            (*$$)[i].type->setElementType($1.type, $1.vectorSize, $1.matrixCols, $1.matrixRows, $1.userDef);
 | 
			
		||||
            (*$$)[i].type->setElementType($1.basicType, $1.vectorSize, $1.matrixCols, $1.matrixRows, $1.userDef);
 | 
			
		||||
 | 
			
		||||
            if ($1.arraySizes)
 | 
			
		||||
                (*$$)[i].type->setArraySizes($1.arraySizes);
 | 
			
		||||
@ -2607,7 +2607,7 @@ struct_declaration
 | 
			
		||||
            //
 | 
			
		||||
            // Careful not to replace already know aspects of type, like array-ness
 | 
			
		||||
            //
 | 
			
		||||
            (*$$)[i].type->setElementType($2.type, $2.vectorSize, $2.matrixCols, $2.matrixRows, $2.userDef);
 | 
			
		||||
            (*$$)[i].type->setElementType($2.basicType, $2.vectorSize, $2.matrixCols, $2.matrixRows, $2.userDef);
 | 
			
		||||
            (*$$)[i].type->getQualifier() = $2.qualifier;
 | 
			
		||||
            if ($2.arraySizes)
 | 
			
		||||
                (*$$)[i].type->setArraySizes($2.arraySizes);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user