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