Commit 441b2ac4 by John Kessenich

Web: Prune grammar and lexor down to needed subset.

About 60K smaller (20% the target size is these units of 300K). Over 300 fewer #ifdef. This adds a new glslang.m4 file that needs to be processed by m4 to get the glslang.y file needed by bison. See comment in glslang.m4 for more detail. This updates the updateGrammar script to do the .m4 -> .y processing, to conditionally exclude grammar not needed for the web build.
parent a28f7a75
...@@ -7,6 +7,7 @@ else(WIN32) ...@@ -7,6 +7,7 @@ else(WIN32)
endif(WIN32) endif(WIN32)
set(SOURCES set(SOURCES
MachineIndependent/glslang.m4
MachineIndependent/glslang.y MachineIndependent/glslang.y
MachineIndependent/glslang_tab.cpp MachineIndependent/glslang_tab.cpp
MachineIndependent/attribute.cpp MachineIndependent/attribute.cpp
...@@ -71,15 +72,6 @@ set(HEADERS ...@@ -71,15 +72,6 @@ set(HEADERS
MachineIndependent/preprocessor/PpContext.h MachineIndependent/preprocessor/PpContext.h
MachineIndependent/preprocessor/PpTokens.h) MachineIndependent/preprocessor/PpTokens.h)
# This might be useful for making grammar changes:
#
# find_package(BISON)
# add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h
# COMMAND ${BISON_EXECUTABLE} --defines=${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h -t ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang.y -o ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp
# MAIN_DEPENDENCY MachineIndependent/glslang.y
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp)
glslang_pch(SOURCES MachineIndependent/pch.cpp) glslang_pch(SOURCES MachineIndependent/pch.cpp)
add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
......
...@@ -341,9 +341,14 @@ void TScanContext::fillInKeywordMap() ...@@ -341,9 +341,14 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["const"] = CONST; (*KeywordMap)["const"] = CONST;
(*KeywordMap)["uniform"] = UNIFORM; (*KeywordMap)["uniform"] = UNIFORM;
(*KeywordMap)["nonuniformEXT"] = NONUNIFORM;
(*KeywordMap)["in"] = IN; (*KeywordMap)["in"] = IN;
(*KeywordMap)["out"] = OUT; (*KeywordMap)["out"] = OUT;
(*KeywordMap)["smooth"] = SMOOTH;
(*KeywordMap)["flat"] = FLAT;
(*KeywordMap)["centroid"] = CENTROID;
(*KeywordMap)["invariant"] = INVARIANT;
(*KeywordMap)["packed"] = PACKED;
(*KeywordMap)["resource"] = RESOURCE;
(*KeywordMap)["inout"] = INOUT; (*KeywordMap)["inout"] = INOUT;
(*KeywordMap)["struct"] = STRUCT; (*KeywordMap)["struct"] = STRUCT;
(*KeywordMap)["break"] = BREAK; (*KeywordMap)["break"] = BREAK;
...@@ -356,7 +361,6 @@ void TScanContext::fillInKeywordMap() ...@@ -356,7 +361,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["default"] = DEFAULT; (*KeywordMap)["default"] = DEFAULT;
(*KeywordMap)["if"] = IF; (*KeywordMap)["if"] = IF;
(*KeywordMap)["else"] = ELSE; (*KeywordMap)["else"] = ELSE;
(*KeywordMap)["demote"] = DEMOTE;
(*KeywordMap)["discard"] = DISCARD; (*KeywordMap)["discard"] = DISCARD;
(*KeywordMap)["return"] = RETURN; (*KeywordMap)["return"] = RETURN;
(*KeywordMap)["void"] = VOID; (*KeywordMap)["void"] = VOID;
...@@ -377,8 +381,33 @@ void TScanContext::fillInKeywordMap() ...@@ -377,8 +381,33 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["mat4"] = MAT4; (*KeywordMap)["mat4"] = MAT4;
(*KeywordMap)["true"] = BOOLCONSTANT; (*KeywordMap)["true"] = BOOLCONSTANT;
(*KeywordMap)["false"] = BOOLCONSTANT; (*KeywordMap)["false"] = BOOLCONSTANT;
(*KeywordMap)["layout"] = LAYOUT;
(*KeywordMap)["shared"] = SHARED;
(*KeywordMap)["highp"] = HIGH_PRECISION;
(*KeywordMap)["mediump"] = MEDIUM_PRECISION;
(*KeywordMap)["lowp"] = LOW_PRECISION;
(*KeywordMap)["superp"] = SUPERP;
(*KeywordMap)["precision"] = PRECISION;
(*KeywordMap)["mat2x2"] = MAT2X2;
(*KeywordMap)["mat2x3"] = MAT2X3;
(*KeywordMap)["mat2x4"] = MAT2X4;
(*KeywordMap)["mat3x2"] = MAT3X2;
(*KeywordMap)["mat3x3"] = MAT3X3;
(*KeywordMap)["mat3x4"] = MAT3X4;
(*KeywordMap)["mat4x2"] = MAT4X2;
(*KeywordMap)["mat4x3"] = MAT4X3;
(*KeywordMap)["mat4x4"] = MAT4X4;
(*KeywordMap)["uint"] = UINT;
(*KeywordMap)["uvec2"] = UVEC2;
(*KeywordMap)["uvec3"] = UVEC3;
(*KeywordMap)["uvec4"] = UVEC4;
#ifndef GLSLANG_WEB
(*KeywordMap)["nonuniformEXT"] = NONUNIFORM;
(*KeywordMap)["demote"] = DEMOTE;
(*KeywordMap)["attribute"] = ATTRIBUTE; (*KeywordMap)["attribute"] = ATTRIBUTE;
(*KeywordMap)["varying"] = VARYING; (*KeywordMap)["varying"] = VARYING;
(*KeywordMap)["noperspective"] = NOPERSPECTIVE;
(*KeywordMap)["buffer"] = BUFFER; (*KeywordMap)["buffer"] = BUFFER;
(*KeywordMap)["coherent"] = COHERENT; (*KeywordMap)["coherent"] = COHERENT;
(*KeywordMap)["devicecoherent"] = DEVICECOHERENT; (*KeywordMap)["devicecoherent"] = DEVICECOHERENT;
...@@ -391,24 +420,9 @@ void TScanContext::fillInKeywordMap() ...@@ -391,24 +420,9 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["writeonly"] = WRITEONLY; (*KeywordMap)["writeonly"] = WRITEONLY;
(*KeywordMap)["atomic_uint"] = ATOMIC_UINT; (*KeywordMap)["atomic_uint"] = ATOMIC_UINT;
(*KeywordMap)["volatile"] = VOLATILE; (*KeywordMap)["volatile"] = VOLATILE;
(*KeywordMap)["layout"] = LAYOUT;
(*KeywordMap)["shared"] = SHARED;
(*KeywordMap)["patch"] = PATCH; (*KeywordMap)["patch"] = PATCH;
(*KeywordMap)["sample"] = SAMPLE; (*KeywordMap)["sample"] = SAMPLE;
(*KeywordMap)["subroutine"] = SUBROUTINE; (*KeywordMap)["subroutine"] = SUBROUTINE;
(*KeywordMap)["highp"] = HIGH_PRECISION;
(*KeywordMap)["mediump"] = MEDIUM_PRECISION;
(*KeywordMap)["lowp"] = LOW_PRECISION;
(*KeywordMap)["precision"] = PRECISION;
(*KeywordMap)["mat2x2"] = MAT2X2;
(*KeywordMap)["mat2x3"] = MAT2X3;
(*KeywordMap)["mat2x4"] = MAT2X4;
(*KeywordMap)["mat3x2"] = MAT3X2;
(*KeywordMap)["mat3x3"] = MAT3X3;
(*KeywordMap)["mat3x4"] = MAT3X4;
(*KeywordMap)["mat4x2"] = MAT4X2;
(*KeywordMap)["mat4x3"] = MAT4X3;
(*KeywordMap)["mat4x4"] = MAT4X4;
(*KeywordMap)["dmat2"] = DMAT2; (*KeywordMap)["dmat2"] = DMAT2;
(*KeywordMap)["dmat3"] = DMAT3; (*KeywordMap)["dmat3"] = DMAT3;
(*KeywordMap)["dmat4"] = DMAT4; (*KeywordMap)["dmat4"] = DMAT4;
...@@ -458,11 +472,6 @@ void TScanContext::fillInKeywordMap() ...@@ -458,11 +472,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["dvec2"] = DVEC2; (*KeywordMap)["dvec2"] = DVEC2;
(*KeywordMap)["dvec3"] = DVEC3; (*KeywordMap)["dvec3"] = DVEC3;
(*KeywordMap)["dvec4"] = DVEC4; (*KeywordMap)["dvec4"] = DVEC4;
(*KeywordMap)["uint"] = UINT;
(*KeywordMap)["uvec2"] = UVEC2;
(*KeywordMap)["uvec3"] = UVEC3;
(*KeywordMap)["uvec4"] = UVEC4;
(*KeywordMap)["int64_t"] = INT64_T; (*KeywordMap)["int64_t"] = INT64_T;
(*KeywordMap)["uint64_t"] = UINT64_T; (*KeywordMap)["uint64_t"] = UINT64_T;
(*KeywordMap)["i64vec2"] = I64VEC2; (*KeywordMap)["i64vec2"] = I64VEC2;
...@@ -549,6 +558,7 @@ void TScanContext::fillInKeywordMap() ...@@ -549,6 +558,7 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["f64mat4x2"] = F64MAT4X2; (*KeywordMap)["f64mat4x2"] = F64MAT4X2;
(*KeywordMap)["f64mat4x3"] = F64MAT4X3; (*KeywordMap)["f64mat4x3"] = F64MAT4X3;
(*KeywordMap)["f64mat4x4"] = F64MAT4X4; (*KeywordMap)["f64mat4x4"] = F64MAT4X4;
#endif
(*KeywordMap)["sampler2D"] = SAMPLER2D; (*KeywordMap)["sampler2D"] = SAMPLER2D;
(*KeywordMap)["samplerCube"] = SAMPLERCUBE; (*KeywordMap)["samplerCube"] = SAMPLERCUBE;
...@@ -556,12 +566,6 @@ void TScanContext::fillInKeywordMap() ...@@ -556,12 +566,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["samplerCubeArrayShadow"] = SAMPLERCUBEARRAYSHADOW; (*KeywordMap)["samplerCubeArrayShadow"] = SAMPLERCUBEARRAYSHADOW;
(*KeywordMap)["isamplerCubeArray"] = ISAMPLERCUBEARRAY; (*KeywordMap)["isamplerCubeArray"] = ISAMPLERCUBEARRAY;
(*KeywordMap)["usamplerCubeArray"] = USAMPLERCUBEARRAY; (*KeywordMap)["usamplerCubeArray"] = USAMPLERCUBEARRAY;
(*KeywordMap)["sampler1DArrayShadow"] = SAMPLER1DARRAYSHADOW;
(*KeywordMap)["isampler1DArray"] = ISAMPLER1DARRAY;
(*KeywordMap)["usampler1D"] = USAMPLER1D;
(*KeywordMap)["isampler1D"] = ISAMPLER1D;
(*KeywordMap)["usampler1DArray"] = USAMPLER1DARRAY;
(*KeywordMap)["samplerBuffer"] = SAMPLERBUFFER;
(*KeywordMap)["samplerCubeShadow"] = SAMPLERCUBESHADOW; (*KeywordMap)["samplerCubeShadow"] = SAMPLERCUBESHADOW;
(*KeywordMap)["sampler2DArray"] = SAMPLER2DARRAY; (*KeywordMap)["sampler2DArray"] = SAMPLER2DARRAY;
(*KeywordMap)["sampler2DArrayShadow"] = SAMPLER2DARRAYSHADOW; (*KeywordMap)["sampler2DArrayShadow"] = SAMPLER2DARRAYSHADOW;
...@@ -573,6 +577,16 @@ void TScanContext::fillInKeywordMap() ...@@ -573,6 +577,16 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["usampler3D"] = USAMPLER3D; (*KeywordMap)["usampler3D"] = USAMPLER3D;
(*KeywordMap)["usamplerCube"] = USAMPLERCUBE; (*KeywordMap)["usamplerCube"] = USAMPLERCUBE;
(*KeywordMap)["usampler2DArray"] = USAMPLER2DARRAY; (*KeywordMap)["usampler2DArray"] = USAMPLER2DARRAY;
(*KeywordMap)["sampler3D"] = SAMPLER3D;
(*KeywordMap)["sampler2DShadow"] = SAMPLER2DSHADOW;
#ifndef GLSLANG_WEB
(*KeywordMap)["sampler1DArrayShadow"] = SAMPLER1DARRAYSHADOW;
(*KeywordMap)["isampler1DArray"] = ISAMPLER1DARRAY;
(*KeywordMap)["usampler1D"] = USAMPLER1D;
(*KeywordMap)["isampler1D"] = ISAMPLER1D;
(*KeywordMap)["usampler1DArray"] = USAMPLER1DARRAY;
(*KeywordMap)["samplerBuffer"] = SAMPLERBUFFER;
(*KeywordMap)["isampler2DRect"] = ISAMPLER2DRECT; (*KeywordMap)["isampler2DRect"] = ISAMPLER2DRECT;
(*KeywordMap)["usampler2DRect"] = USAMPLER2DRECT; (*KeywordMap)["usampler2DRect"] = USAMPLER2DRECT;
(*KeywordMap)["isamplerBuffer"] = ISAMPLERBUFFER; (*KeywordMap)["isamplerBuffer"] = ISAMPLERBUFFER;
...@@ -585,8 +599,6 @@ void TScanContext::fillInKeywordMap() ...@@ -585,8 +599,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["usampler2DMSArray"] = USAMPLER2DMSARRAY; (*KeywordMap)["usampler2DMSArray"] = USAMPLER2DMSARRAY;
(*KeywordMap)["sampler1D"] = SAMPLER1D; (*KeywordMap)["sampler1D"] = SAMPLER1D;
(*KeywordMap)["sampler1DShadow"] = SAMPLER1DSHADOW; (*KeywordMap)["sampler1DShadow"] = SAMPLER1DSHADOW;
(*KeywordMap)["sampler3D"] = SAMPLER3D;
(*KeywordMap)["sampler2DShadow"] = SAMPLER2DSHADOW;
(*KeywordMap)["sampler2DRect"] = SAMPLER2DRECT; (*KeywordMap)["sampler2DRect"] = SAMPLER2DRECT;
(*KeywordMap)["sampler2DRectShadow"] = SAMPLER2DRECTSHADOW; (*KeywordMap)["sampler2DRectShadow"] = SAMPLER2DRECTSHADOW;
(*KeywordMap)["sampler1DArray"] = SAMPLER1DARRAY; (*KeywordMap)["sampler1DArray"] = SAMPLER1DARRAY;
...@@ -639,7 +651,6 @@ void TScanContext::fillInKeywordMap() ...@@ -639,7 +651,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["usubpassInput"] = USUBPASSINPUT; (*KeywordMap)["usubpassInput"] = USUBPASSINPUT;
(*KeywordMap)["usubpassInputMS"] = USUBPASSINPUTMS; (*KeywordMap)["usubpassInputMS"] = USUBPASSINPUTMS;
#ifdef AMD_EXTENSIONS
(*KeywordMap)["f16sampler1D"] = F16SAMPLER1D; (*KeywordMap)["f16sampler1D"] = F16SAMPLER1D;
(*KeywordMap)["f16sampler2D"] = F16SAMPLER2D; (*KeywordMap)["f16sampler2D"] = F16SAMPLER2D;
(*KeywordMap)["f16sampler3D"] = F16SAMPLER3D; (*KeywordMap)["f16sampler3D"] = F16SAMPLER3D;
...@@ -685,25 +696,10 @@ void TScanContext::fillInKeywordMap() ...@@ -685,25 +696,10 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["f16subpassInput"] = F16SUBPASSINPUT; (*KeywordMap)["f16subpassInput"] = F16SUBPASSINPUT;
(*KeywordMap)["f16subpassInputMS"] = F16SUBPASSINPUTMS; (*KeywordMap)["f16subpassInputMS"] = F16SUBPASSINPUTMS;
#endif
(*KeywordMap)["noperspective"] = NOPERSPECTIVE;
(*KeywordMap)["smooth"] = SMOOTH;
(*KeywordMap)["flat"] = FLAT;
#ifdef AMD_EXTENSIONS
(*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD; (*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD;
#endif
(*KeywordMap)["centroid"] = CENTROID;
#ifdef NV_EXTENSIONS
(*KeywordMap)["pervertexNV"] = PERVERTEXNV; (*KeywordMap)["pervertexNV"] = PERVERTEXNV;
#endif
(*KeywordMap)["precise"] = PRECISE; (*KeywordMap)["precise"] = PRECISE;
(*KeywordMap)["invariant"] = INVARIANT;
(*KeywordMap)["packed"] = PACKED;
(*KeywordMap)["resource"] = RESOURCE;
(*KeywordMap)["superp"] = SUPERP;
#ifdef NV_EXTENSIONS
(*KeywordMap)["rayPayloadNV"] = PAYLOADNV; (*KeywordMap)["rayPayloadNV"] = PAYLOADNV;
(*KeywordMap)["rayPayloadInNV"] = PAYLOADINNV; (*KeywordMap)["rayPayloadInNV"] = PAYLOADINNV;
(*KeywordMap)["hitAttributeNV"] = HITATTRNV; (*KeywordMap)["hitAttributeNV"] = HITATTRNV;
...@@ -713,7 +709,6 @@ void TScanContext::fillInKeywordMap() ...@@ -713,7 +709,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV; (*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
(*KeywordMap)["perviewNV"] = PERVIEWNV; (*KeywordMap)["perviewNV"] = PERVIEWNV;
(*KeywordMap)["taskNV"] = PERTASKNV; (*KeywordMap)["taskNV"] = PERTASKNV;
#endif
(*KeywordMap)["fcoopmatNV"] = FCOOPMATNV; (*KeywordMap)["fcoopmatNV"] = FCOOPMATNV;
...@@ -756,6 +751,7 @@ void TScanContext::fillInKeywordMap() ...@@ -756,6 +751,7 @@ void TScanContext::fillInKeywordMap()
ReservedSet->insert("cast"); ReservedSet->insert("cast");
ReservedSet->insert("namespace"); ReservedSet->insert("namespace");
ReservedSet->insert("using"); ReservedSet->insert("using");
#endif
} }
void TScanContext::deleteKeywordMap() void TScanContext::deleteKeywordMap()
...@@ -842,13 +838,15 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) ...@@ -842,13 +838,15 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT; case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT;
case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT; case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT;
case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT;
#ifndef GLSLANG_WEB
case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT; case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT;
case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT; case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT;
case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT; case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT;
case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT;
case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT;
case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT;
case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT; case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT;
#endif
case PpAtomIdentifier: case PpAtomIdentifier:
{ {
int token = tokenizeIdentifier(); int token = tokenizeIdentifier();
...@@ -870,8 +868,10 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) ...@@ -870,8 +868,10 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
int TScanContext::tokenizeIdentifier() int TScanContext::tokenizeIdentifier()
{ {
#ifndef GLSLANG_WEB
if (ReservedSet->find(tokenText) != ReservedSet->end()) if (ReservedSet->find(tokenText) != ReservedSet->end())
return reservedWord(); return reservedWord();
#endif
auto it = KeywordMap->find(tokenText); auto it = KeywordMap->find(tokenText);
if (it == KeywordMap->end()) { if (it == KeywordMap->end()) {
...@@ -902,12 +902,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -902,12 +902,6 @@ int TScanContext::tokenizeIdentifier()
afterStruct = true; afterStruct = true;
return keyword; return keyword;
case NONUNIFORM:
if (parseContext.extensionTurnedOn(E_GL_EXT_nonuniform_qualifier))
return keyword;
else
return identifierOrType();
case SWITCH: case SWITCH:
case DEFAULT: case DEFAULT:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) || if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
...@@ -943,20 +937,66 @@ int TScanContext::tokenizeIdentifier() ...@@ -943,20 +937,66 @@ int TScanContext::tokenizeIdentifier()
parserToken->sType.lex.b = false; parserToken->sType.lex.b = false;
return keyword; return keyword;
case SMOOTH:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 130))
return identifierOrType();
return keyword;
case FLAT:
if (parseContext.profile == EEsProfile && parseContext.version < 300)
reservedWord();
else if (parseContext.profile != EEsProfile && parseContext.version < 130)
return identifierOrType();
return keyword;
case CENTROID:
if (parseContext.version < 120)
return identifierOrType();
return keyword;
case INVARIANT:
if (parseContext.profile != EEsProfile && parseContext.version < 120)
return identifierOrType();
return keyword;
case PACKED:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 330))
return reservedWord();
return identifierOrType();
case RESOURCE:
{
bool reserved = (parseContext.profile == EEsProfile && parseContext.version >= 300) ||
(parseContext.profile != EEsProfile && parseContext.version >= 420);
return identifierOrReserved(reserved);
}
case SUPERP:
{
bool reserved = parseContext.profile == EEsProfile || parseContext.version >= 130;
return identifierOrReserved(reserved);
}
#ifndef GLSLANG_WEB
case NOPERSPECTIVE:
if (parseContext.profile == EEsProfile && parseContext.version >= 300 &&
parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation))
return keyword;
return es30ReservedFromGLSL(130);
case NONUNIFORM:
if (parseContext.extensionTurnedOn(E_GL_EXT_nonuniform_qualifier))
return keyword;
else
return identifierOrType();
case ATTRIBUTE: case ATTRIBUTE:
case VARYING: case VARYING:
if (parseContext.profile == EEsProfile && parseContext.version >= 300) if (parseContext.profile == EEsProfile && parseContext.version >= 300)
reservedWord(); reservedWord();
return keyword; return keyword;
case BUFFER: case BUFFER:
afterBuffer = true; afterBuffer = true;
if ((parseContext.profile == EEsProfile && parseContext.version < 310) || if ((parseContext.profile == EEsProfile && parseContext.version < 310) ||
(parseContext.profile != EEsProfile && parseContext.version < 430)) (parseContext.profile != EEsProfile && parseContext.version < 430))
return identifierOrType(); return identifierOrType();
return keyword; return keyword;
#ifdef NV_EXTENSIONS
case PAYLOADNV: case PAYLOADNV:
case PAYLOADINNV: case PAYLOADINNV:
case HITATTRNV: case HITATTRNV:
...@@ -968,8 +1008,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -968,8 +1008,6 @@ int TScanContext::tokenizeIdentifier()
&& parseContext.extensionTurnedOn(E_GL_NV_ray_tracing))) && parseContext.extensionTurnedOn(E_GL_NV_ray_tracing)))
return keyword; return keyword;
return identifierOrType(); return identifierOrType();
#endif
case ATOMIC_UINT: case ATOMIC_UINT:
if ((parseContext.profile == EEsProfile && parseContext.version >= 310) || if ((parseContext.profile == EEsProfile && parseContext.version >= 310) ||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters)) parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
...@@ -988,7 +1026,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -988,7 +1026,6 @@ int TScanContext::tokenizeIdentifier()
if (parseContext.profile == EEsProfile && parseContext.version >= 310) if (parseContext.profile == EEsProfile && parseContext.version >= 310)
return keyword; return keyword;
return es30ReservedFromGLSL(parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store) ? 130 : 420); return es30ReservedFromGLSL(parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store) ? 130 : 420);
case VOLATILE: case VOLATILE:
if (parseContext.profile == EEsProfile && parseContext.version >= 310) if (parseContext.profile == EEsProfile && parseContext.version >= 310)
return keyword; return keyword;
...@@ -996,24 +1033,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -996,24 +1033,6 @@ int TScanContext::tokenizeIdentifier()
(parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))))
reservedWord(); reservedWord();
return keyword; return keyword;
case LAYOUT:
{
const int numLayoutExts = 2;
const char* layoutExts[numLayoutExts] = { E_GL_ARB_shading_language_420pack,
E_GL_ARB_explicit_attrib_location };
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140 &&
! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)))
return identifierOrType();
return keyword;
}
case SHARED:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140))
return identifierOrType();
return keyword;
case PATCH: case PATCH:
if (parseContext.symbolTable.atBuiltInLevel() || if (parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.profile == EEsProfile && (parseContext.profile == EEsProfile &&
...@@ -1032,6 +1051,24 @@ int TScanContext::tokenizeIdentifier() ...@@ -1032,6 +1051,24 @@ int TScanContext::tokenizeIdentifier()
case SUBROUTINE: case SUBROUTINE:
return es30ReservedFromGLSL(400); return es30ReservedFromGLSL(400);
#endif
case LAYOUT:
{
const int numLayoutExts = 2;
const char* layoutExts[numLayoutExts] = { E_GL_ARB_shading_language_420pack,
E_GL_ARB_explicit_attrib_location };
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140 &&
! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)))
return identifierOrType();
return keyword;
}
case SHARED:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 140))
return identifierOrType();
return keyword;
case HIGH_PRECISION: case HIGH_PRECISION:
case MEDIUM_PRECISION: case MEDIUM_PRECISION:
...@@ -1050,6 +1087,7 @@ int TScanContext::tokenizeIdentifier() ...@@ -1050,6 +1087,7 @@ int TScanContext::tokenizeIdentifier()
case MAT4X4: case MAT4X4:
return matNxM(); return matNxM();
#ifndef GLSLANG_WEB
case DMAT2: case DMAT2:
case DMAT3: case DMAT3:
case DMAT4: case DMAT4:
...@@ -1172,10 +1210,7 @@ int TScanContext::tokenizeIdentifier() ...@@ -1172,10 +1210,7 @@ int TScanContext::tokenizeIdentifier()
afterType = true; afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() || if (parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.profile != EEsProfile && parseContext.version >= 450 && (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
( (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) ||
#ifdef AMD_EXTENSIONS
parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) ||
#endif
parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) || parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16)))) parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16))))
...@@ -1251,10 +1286,7 @@ int TScanContext::tokenizeIdentifier() ...@@ -1251,10 +1286,7 @@ int TScanContext::tokenizeIdentifier()
afterType = true; afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() || if (parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.profile != EEsProfile && parseContext.version >= 450 && (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
( (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) ||
#ifdef AMD_EXTENSIONS
parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) ||
#endif
parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) || parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16)))) parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16))))
...@@ -1277,15 +1309,13 @@ int TScanContext::tokenizeIdentifier() ...@@ -1277,15 +1309,13 @@ int TScanContext::tokenizeIdentifier()
afterType = true; afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() || if (parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.profile != EEsProfile && parseContext.version >= 450 && (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
( (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) ||
#ifdef AMD_EXTENSIONS
parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) ||
#endif
parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16)))) parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16))))
return keyword; return keyword;
return identifierOrType(); return identifierOrType();
#endif
case SAMPLERCUBEARRAY: case SAMPLERCUBEARRAY:
case SAMPLERCUBEARRAYSHADOW: case SAMPLERCUBEARRAYSHADOW:
...@@ -1299,14 +1329,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -1299,14 +1329,6 @@ int TScanContext::tokenizeIdentifier()
reservedWord(); reservedWord();
return keyword; return keyword;
case ISAMPLER1D:
case ISAMPLER1DARRAY:
case SAMPLER1DARRAYSHADOW:
case USAMPLER1D:
case USAMPLER1DARRAY:
afterType = true;
return es30ReservedFromGLSL(130);
case UINT: case UINT:
case UVEC2: case UVEC2:
case UVEC3: case UVEC3:
...@@ -1325,6 +1347,30 @@ int TScanContext::tokenizeIdentifier() ...@@ -1325,6 +1347,30 @@ int TScanContext::tokenizeIdentifier()
afterType = true; afterType = true;
return nonreservedKeyword(300, 130); return nonreservedKeyword(300, 130);
case SAMPLER3D:
afterType = true;
if (parseContext.profile == EEsProfile && parseContext.version < 300) {
if (!parseContext.extensionTurnedOn(E_GL_OES_texture_3D))
reservedWord();
}
return keyword;
case SAMPLER2DSHADOW:
afterType = true;
if (parseContext.profile == EEsProfile && parseContext.version < 300) {
if (!parseContext.extensionTurnedOn(E_GL_EXT_shadow_samplers))
reservedWord();
}
return keyword;
#ifndef GLSLANG_WEB
case ISAMPLER1D:
case ISAMPLER1DARRAY:
case SAMPLER1DARRAYSHADOW:
case USAMPLER1D:
case USAMPLER1DARRAY:
afterType = true;
return es30ReservedFromGLSL(130);
case ISAMPLER2DRECT: case ISAMPLER2DRECT:
case USAMPLER2DRECT: case USAMPLER2DRECT:
afterType = true; afterType = true;
...@@ -1369,22 +1415,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -1369,22 +1415,6 @@ int TScanContext::tokenizeIdentifier()
reservedWord(); reservedWord();
return keyword; return keyword;
case SAMPLER3D:
afterType = true;
if (parseContext.profile == EEsProfile && parseContext.version < 300) {
if (!parseContext.extensionTurnedOn(E_GL_OES_texture_3D))
reservedWord();
}
return keyword;
case SAMPLER2DSHADOW:
afterType = true;
if (parseContext.profile == EEsProfile && parseContext.version < 300) {
if (!parseContext.extensionTurnedOn(E_GL_EXT_shadow_samplers))
reservedWord();
}
return keyword;
case SAMPLER2DRECT: case SAMPLER2DRECT:
case SAMPLER2DRECTSHADOW: case SAMPLER2DRECTSHADOW:
afterType = true; afterType = true;
...@@ -1473,7 +1503,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -1473,7 +1503,6 @@ int TScanContext::tokenizeIdentifier()
else else
return identifierOrType(); return identifierOrType();
#ifdef AMD_EXTENSIONS
case F16SAMPLER1D: case F16SAMPLER1D:
case F16SAMPLER2D: case F16SAMPLER2D:
case F16SAMPLER3D: case F16SAMPLER3D:
...@@ -1525,50 +1554,19 @@ int TScanContext::tokenizeIdentifier() ...@@ -1525,50 +1554,19 @@ int TScanContext::tokenizeIdentifier()
parseContext.profile != EEsProfile && parseContext.version >= 450)) parseContext.profile != EEsProfile && parseContext.version >= 450))
return keyword; return keyword;
return identifierOrType(); return identifierOrType();
#endif
case NOPERSPECTIVE:
#ifdef NV_EXTENSIONS
if (parseContext.profile == EEsProfile && parseContext.version >= 300 &&
parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation))
return keyword;
#endif
return es30ReservedFromGLSL(130);
case SMOOTH:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 130))
return identifierOrType();
return keyword;
#ifdef AMD_EXTENSIONS
case EXPLICITINTERPAMD: case EXPLICITINTERPAMD:
if (parseContext.profile != EEsProfile && parseContext.version >= 450 && if (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
parseContext.extensionTurnedOn(E_GL_AMD_shader_explicit_vertex_parameter)) parseContext.extensionTurnedOn(E_GL_AMD_shader_explicit_vertex_parameter))
return keyword; return keyword;
return identifierOrType(); return identifierOrType();
#endif
#ifdef NV_EXTENSIONS
case PERVERTEXNV: case PERVERTEXNV:
if (((parseContext.profile != EEsProfile && parseContext.version >= 450) || if (((parseContext.profile != EEsProfile && parseContext.version >= 450) ||
(parseContext.profile == EEsProfile && parseContext.version >= 320)) && (parseContext.profile == EEsProfile && parseContext.version >= 320)) &&
parseContext.extensionTurnedOn(E_GL_NV_fragment_shader_barycentric)) parseContext.extensionTurnedOn(E_GL_NV_fragment_shader_barycentric))
return keyword; return keyword;
return identifierOrType(); return identifierOrType();
#endif
case FLAT:
if (parseContext.profile == EEsProfile && parseContext.version < 300)
reservedWord();
else if (parseContext.profile != EEsProfile && parseContext.version < 130)
return identifierOrType();
return keyword;
case CENTROID:
if (parseContext.version < 120)
return identifierOrType();
return keyword;
case PRECISE: case PRECISE:
if ((parseContext.profile == EEsProfile && if ((parseContext.profile == EEsProfile &&
...@@ -1581,30 +1579,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -1581,30 +1579,6 @@ int TScanContext::tokenizeIdentifier()
} }
return identifierOrType(); return identifierOrType();
case INVARIANT:
if (parseContext.profile != EEsProfile && parseContext.version < 120)
return identifierOrType();
return keyword;
case PACKED:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
(parseContext.profile != EEsProfile && parseContext.version < 330))
return reservedWord();
return identifierOrType();
case RESOURCE:
{
bool reserved = (parseContext.profile == EEsProfile && parseContext.version >= 300) ||
(parseContext.profile != EEsProfile && parseContext.version >= 420);
return identifierOrReserved(reserved);
}
case SUPERP:
{
bool reserved = parseContext.profile == EEsProfile || parseContext.version >= 130;
return identifierOrReserved(reserved);
}
#ifdef NV_EXTENSIONS
case PERPRIMITIVENV: case PERPRIMITIVENV:
case PERVIEWNV: case PERVIEWNV:
case PERTASKNV: case PERTASKNV:
...@@ -1613,7 +1587,6 @@ int TScanContext::tokenizeIdentifier() ...@@ -1613,7 +1587,6 @@ int TScanContext::tokenizeIdentifier()
parseContext.extensionTurnedOn(E_GL_NV_mesh_shader)) parseContext.extensionTurnedOn(E_GL_NV_mesh_shader))
return keyword; return keyword;
return identifierOrType(); return identifierOrType();
#endif
case FCOOPMATNV: case FCOOPMATNV:
afterType = true; afterType = true;
...@@ -1627,6 +1600,7 @@ int TScanContext::tokenizeIdentifier() ...@@ -1627,6 +1600,7 @@ int TScanContext::tokenizeIdentifier()
return keyword; return keyword;
else else
return identifierOrType(); return identifierOrType();
#endif
default: default:
parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -36,6 +36,31 @@ ...@@ -36,6 +36,31 @@
// POSSIBILITY OF SUCH DAMAGE. // POSSIBILITY OF SUCH DAMAGE.
// //
//
// Do not edit the .y file, only edit the .m4 file.
// The .y bison file is not a source file, it is a derivitive of the .m4 file.
// The m4 file needs to be processed by m4 to generate the .y bison file.
//
// Code sandwiched between a pair:
//
// GLSLANG_WEB_EXCLUDE_ON
// ...
// ...
// ...
// GLSLANG_WEB_EXCLUDE_OFF
//
// Will be exluded from the grammar when m4 is executed as:
//
// m4 -P -DGLSLANG_WEB
//
// It will be included when m4 is executed as:
//
// m4 -P
//
/** /**
* This is bison grammar and productions for parsing all versions of the * This is bison grammar and productions for parsing all versions of the
* GLSL shading languages. * GLSL shading languages.
...@@ -125,13 +150,30 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -125,13 +150,30 @@ extern int yylex(YYSTYPE*, TParseContext&);
%pure-parser // enable thread safety %pure-parser // enable thread safety
%expect 1 // One shift reduce conflict because of if | else %expect 1 // One shift reduce conflict because of if | else
%token <lex> ATTRIBUTE VARYING %token <lex> CONST BOOL INT UINT FLOAT
%token <lex> FLOAT16_T FLOAT FLOAT32_T DOUBLE FLOAT64_T
%token <lex> CONST BOOL INT UINT INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT SUBROUTINE DEMOTE
%token <lex> BVEC2 BVEC3 BVEC4 %token <lex> BVEC2 BVEC3 BVEC4
%token <lex> IVEC2 IVEC3 IVEC4 %token <lex> IVEC2 IVEC3 IVEC4
%token <lex> UVEC2 UVEC3 UVEC4 %token <lex> UVEC2 UVEC3 UVEC4
%token <lex> VEC2 VEC3 VEC4
%token <lex> MAT2 MAT3 MAT4
%token <lex> MAT2X2 MAT2X3 MAT2X4
%token <lex> MAT3X2 MAT3X3 MAT3X4
%token <lex> MAT4X2 MAT4X3 MAT4X4
// combined image/sampler
%token <lex> SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER2DSHADOW
%token <lex> SAMPLERCUBESHADOW SAMPLER2DARRAY
%token <lex> SAMPLER2DARRAYSHADOW ISAMPLER2D ISAMPLER3D ISAMPLERCUBE
%token <lex> ISAMPLER2DARRAY USAMPLER2D USAMPLER3D
%token <lex> USAMPLERCUBE USAMPLER2DARRAY
%token <lex> SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
%token <lex> ISAMPLERCUBEARRAY USAMPLERCUBEARRAY
%token <lex> ATTRIBUTE VARYING
%token <lex> FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T
%token <lex> INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T
%token <lex> I64VEC2 I64VEC3 I64VEC4 %token <lex> I64VEC2 I64VEC3 I64VEC4
%token <lex> U64VEC2 U64VEC3 U64VEC4 %token <lex> U64VEC2 U64VEC3 U64VEC4
%token <lex> I32VEC2 I32VEC3 I32VEC4 %token <lex> I32VEC2 I32VEC3 I32VEC4
...@@ -140,19 +182,10 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -140,19 +182,10 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> U16VEC2 U16VEC3 U16VEC4 %token <lex> U16VEC2 U16VEC3 U16VEC4
%token <lex> I8VEC2 I8VEC3 I8VEC4 %token <lex> I8VEC2 I8VEC3 I8VEC4
%token <lex> U8VEC2 U8VEC3 U8VEC4 %token <lex> U8VEC2 U8VEC3 U8VEC4
%token <lex> VEC2 VEC3 VEC4
%token <lex> MAT2 MAT3 MAT4 CENTROID IN OUT INOUT
%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED NONUNIFORM PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT SUBGROUPCOHERENT NONPRIVATE
%token <lex> DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4 %token <lex> DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4
%token <lex> F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 %token <lex> F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4
%token <lex> F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4 %token <lex> F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4
%token <lex> F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4 %token <lex> F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4
%token <lex> NOPERSPECTIVE FLAT SMOOTH LAYOUT EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
%token <lex> MAT2X2 MAT2X3 MAT2X4
%token <lex> MAT3X2 MAT3X3 MAT3X4
%token <lex> MAT4X2 MAT4X3 MAT4X4
%token <lex> DMAT2X2 DMAT2X3 DMAT2X4 %token <lex> DMAT2X2 DMAT2X3 DMAT2X4
%token <lex> DMAT3X2 DMAT3X3 DMAT3X4 %token <lex> DMAT3X2 DMAT3X3 DMAT3X4
%token <lex> DMAT4X2 DMAT4X3 DMAT4X4 %token <lex> DMAT4X2 DMAT4X3 DMAT4X4
...@@ -170,26 +203,36 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -170,26 +203,36 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> FCOOPMATNV %token <lex> FCOOPMATNV
// combined image/sampler // combined image/sampler
%token <lex> SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER1DSHADOW SAMPLER2DSHADOW %token <lex> SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW
%token <lex> SAMPLERCUBESHADOW SAMPLER1DARRAY SAMPLER2DARRAY SAMPLER1DARRAYSHADOW
%token <lex> SAMPLER2DARRAYSHADOW ISAMPLER1D ISAMPLER2D ISAMPLER3D ISAMPLERCUBE
%token <lex> ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D
%token <lex> USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY
%token <lex> SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT %token <lex> SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT
%token <lex> SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER %token <lex> SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER
%token <lex> SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
%token <lex> ISAMPLERCUBEARRAY USAMPLERCUBEARRAY
%token <lex> SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS %token <lex> SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS
%token <lex> SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY %token <lex> SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY
%token <lex> SAMPLEREXTERNALOES %token <lex> SAMPLEREXTERNALOES
%token <lex> SAMPLEREXTERNAL2DY2YEXT %token <lex> SAMPLEREXTERNAL2DY2YEXT
%token <lex> ISAMPLER1DARRAY USAMPLER1D USAMPLER1DARRAY
%token <lex> F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE %token <lex> F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE
%token <lex> F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY %token <lex> F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY
%token <lex> F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY %token <lex> F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY
%token <lex> F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW %token <lex> F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW
%token <lex> F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW %token <lex> F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW
// images
%token <lex> IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D
%token <lex> UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D
%token <lex> IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT
%token <lex> IMAGECUBE IIMAGECUBE UIMAGECUBE
%token <lex> IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER
%token <lex> IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY
%token <lex> IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY
%token <lex> IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY
%token <lex> IMAGE2DMS IIMAGE2DMS UIMAGE2DMS
%token <lex> IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY
%token <lex> F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT
%token <lex> F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY
%token <lex> F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY
// pure sampler // pure sampler
%token <lex> SAMPLER SAMPLERSHADOW %token <lex> SAMPLER SAMPLERSHADOW
...@@ -213,25 +256,8 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -213,25 +256,8 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS %token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
%token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS %token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS
%token <lex> IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D
%token <lex> UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D
%token <lex> IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT
%token <lex> IMAGECUBE IIMAGECUBE UIMAGECUBE
%token <lex> IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER
%token <lex> IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY
%token <lex> IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY
%token <lex> IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY
%token <lex> IMAGE2DMS IIMAGE2DMS UIMAGE2DMS
%token <lex> IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY
%token <lex> F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT
%token <lex> F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY
%token <lex> F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY
%token <lex> STRUCT VOID WHILE
%token <lex> IDENTIFIER TYPE_NAME
%token <lex> FLOATCONSTANT DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT INT32CONSTANT UINT32CONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT BOOLCONSTANT FLOAT16CONSTANT
%token <lex> LEFT_OP RIGHT_OP %token <lex> LEFT_OP RIGHT_OP
%token <lex> INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP %token <lex> INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP
%token <lex> AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN %token <lex> AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN
...@@ -242,11 +268,30 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -242,11 +268,30 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT %token <lex> COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT
%token <lex> LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION %token <lex> LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION
%token <lex> INVARIANT PRECISE %token <lex> INVARIANT
%token <lex> HIGH_PRECISION MEDIUM_PRECISION LOW_PRECISION PRECISION %token <lex> HIGH_PRECISION MEDIUM_PRECISION LOW_PRECISION PRECISION
%token <lex> PACKED RESOURCE SUPERP %token <lex> PACKED RESOURCE SUPERP
%token <lex> FLOATCONSTANT INTCONSTANT UINTCONSTANT BOOLCONSTANT
%token <lex> IDENTIFIER TYPE_NAME
%token <lex> CENTROID IN OUT INOUT
%token <lex> STRUCT VOID WHILE
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
%token <lex> UNIFORM SHARED
%token <lex> FLAT SMOOTH LAYOUT
%token <lex> DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT
%token <lex> INT64CONSTANT UINT64CONSTANT
%token <lex> SUBROUTINE DEMOTE
%token <lex> PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV
%token <lex> PATCH SAMPLE BUFFER NONUNIFORM
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
%token <lex> SUBGROUPCOHERENT NONPRIVATE
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
%token <lex> PRECISE
%type <interm> assignment_operator unary_operator %type <interm> assignment_operator unary_operator
%type <interm.intermTypedNode> variable_identifier primary_expression postfix_expression %type <interm.intermTypedNode> variable_identifier primary_expression postfix_expression
%type <interm.intermTypedNode> expression integer_expression assignment_expression %type <interm.intermTypedNode> expression integer_expression assignment_expression
...@@ -265,15 +310,14 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -265,15 +310,14 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm.intermNode> declaration external_declaration %type <interm.intermNode> declaration external_declaration
%type <interm.intermNode> for_init_statement compound_statement_no_new_scope %type <interm.intermNode> for_init_statement compound_statement_no_new_scope
%type <interm.nodePair> selection_rest_statement for_rest_statement %type <interm.nodePair> selection_rest_statement for_rest_statement
%type <interm.intermNode> iteration_statement iteration_statement_nonattributed jump_statement statement_no_new_scope statement_scoped demote_statement %type <interm.intermNode> iteration_statement iteration_statement_nonattributed jump_statement statement_no_new_scope statement_scoped
%type <interm> single_declaration init_declarator_list %type <interm> single_declaration init_declarator_list
%type <interm> parameter_declaration parameter_declarator parameter_type_specifier %type <interm> parameter_declaration parameter_declarator parameter_type_specifier
%type <interm> array_specifier %type <interm> array_specifier
%type <interm.type> precise_qualifier invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier %type <interm.type> invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier
%type <interm.type> layout_qualifier layout_qualifier_id_list layout_qualifier_id %type <interm.type> layout_qualifier layout_qualifier_id_list layout_qualifier_id
%type <interm.type> non_uniform_qualifier
%type <interm.typeParameters> type_parameter_specifier %type <interm.typeParameters> type_parameter_specifier
%type <interm.typeParameters> type_parameter_specifier_opt %type <interm.typeParameters> type_parameter_specifier_opt
...@@ -284,7 +328,7 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -284,7 +328,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm.type> type_specifier_nonarray %type <interm.type> type_specifier_nonarray
%type <interm.type> struct_specifier %type <interm.type> struct_specifier
%type <interm.typeLine> struct_declarator %type <interm.typeLine> struct_declarator
%type <interm.typeList> struct_declarator_list struct_declaration struct_declaration_list type_name_list %type <interm.typeList> struct_declarator_list struct_declaration struct_declaration_list
%type <interm> block_structure %type <interm> block_structure
%type <interm.function> function_header function_declarator %type <interm.function> function_header function_declarator
%type <interm.function> function_header_with_parameters %type <interm.function> function_header_with_parameters
...@@ -293,7 +337,12 @@ extern int yylex(YYSTYPE*, TParseContext&); ...@@ -293,7 +337,12 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm.identifierList> identifier_list %type <interm.identifierList> identifier_list
%type <interm.type> precise_qualifier non_uniform_qualifier
%type <interm.typeList> type_name_list
%type <interm.attributes> attribute attribute_list single_attribute %type <interm.attributes> attribute attribute_list single_attribute
%type <interm.intermNode> demote_statement
%start translation_unit %start translation_unit
%% %%
...@@ -308,17 +357,13 @@ primary_expression ...@@ -308,17 +357,13 @@ primary_expression
: variable_identifier { : variable_identifier {
$$ = $1; $$ = $1;
} }
| INT32CONSTANT { | LEFT_PAREN expression RIGHT_PAREN {
#ifndef GLSLANG_WEB $$ = $2;
parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); if ($$->getAsConstantUnion())
$$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); $$->getAsConstantUnion()->setExpression();
#endif
} }
| UINT32CONSTANT { | FLOATCONSTANT {
#ifndef GLSLANG_WEB $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
$$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
#endif
} }
| INTCONSTANT { | INTCONSTANT {
$$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
...@@ -327,6 +372,18 @@ primary_expression ...@@ -327,6 +372,18 @@ primary_expression
parseContext.fullIntegerCheck($1.loc, "unsigned literal"); parseContext.fullIntegerCheck($1.loc, "unsigned literal");
$$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
} }
| BOOLCONSTANT {
$$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
}
| INT32CONSTANT {
parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
$$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
}
| UINT32CONSTANT {
parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
$$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
}
| INT64CONSTANT { | INT64CONSTANT {
parseContext.int64Check($1.loc, "64-bit integer literal"); parseContext.int64Check($1.loc, "64-bit integer literal");
$$ = parseContext.intermediate.addConstantUnion($1.i64, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.i64, $1.loc, true);
...@@ -336,38 +393,22 @@ primary_expression ...@@ -336,38 +393,22 @@ primary_expression
$$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true);
} }
| INT16CONSTANT { | INT16CONSTANT {
#ifndef GLSLANG_WEB
parseContext.explicitInt16Check($1.loc, "16-bit integer literal"); parseContext.explicitInt16Check($1.loc, "16-bit integer literal");
$$ = parseContext.intermediate.addConstantUnion((short)$1.i, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion((short)$1.i, $1.loc, true);
#endif
} }
| UINT16CONSTANT { | UINT16CONSTANT {
#ifndef GLSLANG_WEB
parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer literal"); parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer literal");
$$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true);
#endif
}
| FLOATCONSTANT {
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
} }
| DOUBLECONSTANT { | DOUBLECONSTANT {
parseContext.doubleCheck($1.loc, "double literal"); parseContext.doubleCheck($1.loc, "double literal");
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true);
} }
| FLOAT16CONSTANT { | FLOAT16CONSTANT {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float literal"); parseContext.float16Check($1.loc, "half float literal");
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true);
#endif
}
| BOOLCONSTANT {
$$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
}
| LEFT_PAREN expression RIGHT_PAREN {
$$ = $2;
if ($$->getAsConstantUnion())
$$->getAsConstantUnion()->setExpression();
} }
; ;
postfix_expression postfix_expression
...@@ -493,11 +534,13 @@ function_identifier ...@@ -493,11 +534,13 @@ function_identifier
$$.function = new TFunction(empty, TType(EbtVoid), EOpNull); $$.function = new TFunction(empty, TType(EbtVoid), EOpNull);
} }
} }
| non_uniform_qualifier { | non_uniform_qualifier {
// Constructor // Constructor
$$.intermNode = 0; $$.intermNode = 0;
$$.function = parseContext.handleConstructorCall($1.loc, $1); $$.function = parseContext.handleConstructorCall($1.loc, $1);
} }
; ;
unary_expression unary_expression
...@@ -1145,36 +1188,30 @@ interpolation_qualifier ...@@ -1145,36 +1188,30 @@ interpolation_qualifier
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.flat = true; $$.qualifier.flat = true;
} }
| NOPERSPECTIVE { | NOPERSPECTIVE {
#ifndef GLSLANG_WEB
parseContext.globalCheck($1.loc, "noperspective"); parseContext.globalCheck($1.loc, "noperspective");
parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective");
parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective"); parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.nopersp = true; $$.qualifier.nopersp = true;
#endif
} }
| EXPLICITINTERPAMD { | EXPLICITINTERPAMD {
#ifdef AMD_EXTENSIONS
parseContext.globalCheck($1.loc, "__explicitInterpAMD"); parseContext.globalCheck($1.loc, "__explicitInterpAMD");
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation");
parseContext.profileRequires($1.loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); parseContext.profileRequires($1.loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.explicitInterp = true; $$.qualifier.explicitInterp = true;
#endif
} }
| PERVERTEXNV { | PERVERTEXNV {
#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "pervertexNV"); parseContext.globalCheck($1.loc, "pervertexNV");
parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.pervertexNV = true; $$.qualifier.pervertexNV = true;
#endif
} }
| PERPRIMITIVENV { | PERPRIMITIVENV {
#ifdef NV_EXTENSIONS
// No need for profile version or extension check. Shader stage already checks both. // No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck($1.loc, "perprimitiveNV"); parseContext.globalCheck($1.loc, "perprimitiveNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV"); parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV");
...@@ -1183,26 +1220,22 @@ interpolation_qualifier ...@@ -1183,26 +1220,22 @@ interpolation_qualifier
parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV"); parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.perPrimitiveNV = true; $$.qualifier.perPrimitiveNV = true;
#endif
} }
| PERVIEWNV { | PERVIEWNV {
#ifdef NV_EXTENSIONS
// No need for profile version or extension check. Shader stage already checks both. // No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck($1.loc, "perviewNV"); parseContext.globalCheck($1.loc, "perviewNV");
parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV"); parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.perViewNV = true; $$.qualifier.perViewNV = true;
#endif
} }
| PERTASKNV { | PERTASKNV {
#ifdef NV_EXTENSIONS
// No need for profile version or extension check. Shader stage already checks both. // No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck($1.loc, "taskNV"); parseContext.globalCheck($1.loc, "taskNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV"); parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.perTaskNV = true; $$.qualifier.perTaskNV = true;
#endif
} }
; ;
layout_qualifier layout_qualifier
...@@ -1237,17 +1270,17 @@ layout_qualifier_id ...@@ -1237,17 +1270,17 @@ layout_qualifier_id
} }
; ;
precise_qualifier precise_qualifier
: PRECISE { : PRECISE {
#ifndef GLSLANG_WEB
parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise");
parseContext.profileRequires($1.loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); parseContext.profileRequires($1.loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.noContraction = true; $$.qualifier.noContraction = true;
#endif
} }
; ;
type_qualifier type_qualifier
: single_type_qualifier { : single_type_qualifier {
$$ = $1; $$ = $1;
...@@ -1281,6 +1314,7 @@ single_type_qualifier ...@@ -1281,6 +1314,7 @@ single_type_qualifier
// allow inheritance of storage qualifier from block declaration // allow inheritance of storage qualifier from block declaration
$$ = $1; $$ = $1;
} }
| precise_qualifier { | precise_qualifier {
// allow inheritance of storage qualifier from block declaration // allow inheritance of storage qualifier from block declaration
$$ = $1; $$ = $1;
...@@ -1288,6 +1322,7 @@ single_type_qualifier ...@@ -1288,6 +1322,7 @@ single_type_qualifier
| non_uniform_qualifier { | non_uniform_qualifier {
$$ = $1; $$ = $1;
} }
; ;
storage_qualifier storage_qualifier
...@@ -1295,6 +1330,49 @@ storage_qualifier ...@@ -1295,6 +1330,49 @@ storage_qualifier
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant $$.qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant
} }
| INOUT {
parseContext.globalCheck($1.loc, "inout");
$$.init($1.loc);
$$.qualifier.storage = EvqInOut;
}
| IN {
parseContext.globalCheck($1.loc, "in");
$$.init($1.loc);
// whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
$$.qualifier.storage = EvqIn;
}
| OUT {
parseContext.globalCheck($1.loc, "out");
$$.init($1.loc);
// whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
$$.qualifier.storage = EvqOut;
}
| CENTROID {
parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid");
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid");
parseContext.globalCheck($1.loc, "centroid");
$$.init($1.loc);
$$.qualifier.centroid = true;
}
| UNIFORM {
parseContext.globalCheck($1.loc, "uniform");
$$.init($1.loc);
$$.qualifier.storage = EvqUniform;
}
| SHARED {
parseContext.globalCheck($1.loc, "shared");
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
$$.init($1.loc);
$$.qualifier.storage = EvqShared;
}
| BUFFER {
parseContext.globalCheck($1.loc, "buffer");
$$.init($1.loc);
$$.qualifier.storage = EvqBuffer;
}
| ATTRIBUTE { | ATTRIBUTE {
parseContext.requireStage($1.loc, EShLangVertex, "attribute"); parseContext.requireStage($1.loc, EShLangVertex, "attribute");
parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute"); parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute");
...@@ -1321,30 +1399,6 @@ storage_qualifier ...@@ -1321,30 +1399,6 @@ storage_qualifier
else else
$$.qualifier.storage = EvqVaryingIn; $$.qualifier.storage = EvqVaryingIn;
} }
| INOUT {
parseContext.globalCheck($1.loc, "inout");
$$.init($1.loc);
$$.qualifier.storage = EvqInOut;
}
| IN {
parseContext.globalCheck($1.loc, "in");
$$.init($1.loc);
// whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
$$.qualifier.storage = EvqIn;
}
| OUT {
parseContext.globalCheck($1.loc, "out");
$$.init($1.loc);
// whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
$$.qualifier.storage = EvqOut;
}
| CENTROID {
parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid");
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid");
parseContext.globalCheck($1.loc, "centroid");
$$.init($1.loc);
$$.qualifier.centroid = true;
}
| PATCH { | PATCH {
parseContext.globalCheck($1.loc, "patch"); parseContext.globalCheck($1.loc, "patch");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
...@@ -1356,76 +1410,44 @@ storage_qualifier ...@@ -1356,76 +1410,44 @@ storage_qualifier
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.sample = true; $$.qualifier.sample = true;
} }
| UNIFORM {
parseContext.globalCheck($1.loc, "uniform");
$$.init($1.loc);
$$.qualifier.storage = EvqUniform;
}
| BUFFER {
parseContext.globalCheck($1.loc, "buffer");
$$.init($1.loc);
$$.qualifier.storage = EvqBuffer;
}
| HITATTRNV { | HITATTRNV {
#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "hitAttributeNV"); parseContext.globalCheck($1.loc, "hitAttributeNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
| EShLangAnyHitNVMask), "hitAttributeNV"); | EShLangAnyHitNVMask), "hitAttributeNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV"); parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.storage = EvqHitAttrNV; $$.qualifier.storage = EvqHitAttrNV;
#endif
} }
| PAYLOADNV { | PAYLOADNV {
#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "rayPayloadNV"); parseContext.globalCheck($1.loc, "rayPayloadNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask | parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNV"); EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV"); parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.storage = EvqPayloadNV; $$.qualifier.storage = EvqPayloadNV;
#endif
} }
| PAYLOADINNV { | PAYLOADINNV {
#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "rayPayloadInNV"); parseContext.globalCheck($1.loc, "rayPayloadInNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitNVMask | parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitNVMask |
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNV"); EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV"); parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.storage = EvqPayloadInNV; $$.qualifier.storage = EvqPayloadInNV;
#endif
} }
| CALLDATANV { | CALLDATANV {
#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "callableDataNV"); parseContext.globalCheck($1.loc, "callableDataNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask |
EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "callableDataNV"); EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "callableDataNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV"); parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.storage = EvqCallableDataNV; $$.qualifier.storage = EvqCallableDataNV;
#endif
} }
| CALLDATAINNV { | CALLDATAINNV {
#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "callableDataInNV"); parseContext.globalCheck($1.loc, "callableDataInNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV"); parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV"); parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV");
$$.init($1.loc); $$.init($1.loc);
$$.qualifier.storage = EvqCallableDataInNV; $$.qualifier.storage = EvqCallableDataInNV;
#endif
}
| SHARED {
parseContext.globalCheck($1.loc, "shared");
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
#ifdef NV_EXTENSIONS
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
#else
parseContext.requireStage($1.loc, EShLangCompute, "shared");
#endif
$$.init($1.loc);
$$.qualifier.storage = EvqShared;
} }
| COHERENT { | COHERENT {
$$.init($1.loc); $$.init($1.loc);
...@@ -1473,23 +1495,21 @@ storage_qualifier ...@@ -1473,23 +1495,21 @@ storage_qualifier
$$.qualifier.writeonly = true; $$.qualifier.writeonly = true;
} }
| SUBROUTINE { | SUBROUTINE {
#ifndef GLSLANG_WEB
parseContext.spvRemoved($1.loc, "subroutine"); parseContext.spvRemoved($1.loc, "subroutine");
parseContext.globalCheck($1.loc, "subroutine"); parseContext.globalCheck($1.loc, "subroutine");
parseContext.unimplemented($1.loc, "subroutine"); parseContext.unimplemented($1.loc, "subroutine");
$$.init($1.loc); $$.init($1.loc);
#endif
} }
| SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN { | SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN {
#ifndef GLSLANG_WEB
parseContext.spvRemoved($1.loc, "subroutine"); parseContext.spvRemoved($1.loc, "subroutine");
parseContext.globalCheck($1.loc, "subroutine"); parseContext.globalCheck($1.loc, "subroutine");
parseContext.unimplemented($1.loc, "subroutine"); parseContext.unimplemented($1.loc, "subroutine");
$$.init($1.loc); $$.init($1.loc);
#endif
} }
; ;
non_uniform_qualifier non_uniform_qualifier
: NONUNIFORM { : NONUNIFORM {
$$.init($1.loc); $$.init($1.loc);
...@@ -1508,6 +1528,7 @@ type_name_list ...@@ -1508,6 +1528,7 @@ type_name_list
} }
; ;
type_specifier type_specifier
: type_specifier_nonarray type_parameter_specifier_opt { : type_specifier_nonarray type_parameter_specifier_opt {
$$ = $1; $$ = $1;
...@@ -1591,82 +1612,192 @@ type_specifier_nonarray ...@@ -1591,82 +1612,192 @@ type_specifier_nonarray
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
} }
| INT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
}
| UINT {
parseContext.fullIntegerCheck($1.loc, "unsigned integer");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
}
| BOOL {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
}
| VEC2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setVector(2);
}
| VEC3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setVector(3);
}
| VEC4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setVector(4);
}
| BVEC2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
$$.setVector(2);
}
| BVEC3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
$$.setVector(3);
}
| BVEC4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
$$.setVector(4);
}
| IVEC2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
$$.setVector(2);
}
| IVEC3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
$$.setVector(3);
}
| IVEC4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
$$.setVector(4);
}
| UVEC2 {
parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
$$.setVector(2);
}
| UVEC3 {
parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
$$.setVector(3);
}
| UVEC4 {
parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
$$.setVector(4);
}
| MAT2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 2);
}
| MAT3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 3);
}
| MAT4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 4);
}
| MAT2X2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 2);
}
| MAT2X3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 3);
}
| MAT2X4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 4);
}
| MAT3X2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 2);
}
| MAT3X3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 3);
}
| MAT3X4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 4);
}
| MAT4X2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 2);
}
| MAT4X3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 3);
}
| MAT4X4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 4);
}
| DOUBLE { | DOUBLE {
parseContext.doubleCheck($1.loc, "double"); parseContext.doubleCheck($1.loc, "double");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
} }
| FLOAT16_T { | FLOAT16_T {
#ifndef GLSLANG_WEB
parseContext.float16ScalarVectorCheck($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
#endif
} }
| FLOAT32_T { | FLOAT32_T {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
#endif
} }
| FLOAT64_T { | FLOAT64_T {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
#endif
}
| INT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
}
| UINT {
parseContext.fullIntegerCheck($1.loc, "unsigned integer");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
} }
| INT8_T { | INT8_T {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
#endif
} }
| UINT8_T { | UINT8_T {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint8; $$.basicType = EbtUint8;
#endif
} }
| INT16_T { | INT16_T {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
#endif
} }
| UINT16_T { | UINT16_T {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
#endif
} }
| INT32_T { | INT32_T {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt; $$.basicType = EbtInt;
#endif
} }
| UINT32_T { | UINT32_T {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint; $$.basicType = EbtUint;
#endif
} }
| INT64_T { | INT64_T {
parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel());
...@@ -1678,25 +1809,6 @@ type_specifier_nonarray ...@@ -1678,25 +1809,6 @@ type_specifier_nonarray
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint64; $$.basicType = EbtUint64;
} }
| BOOL {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
}
| VEC2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setVector(2);
}
| VEC3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setVector(3);
}
| VEC4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setVector(4);
}
| DVEC2 { | DVEC2 {
parseContext.doubleCheck($1.loc, "double vector"); parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -1716,52 +1828,40 @@ type_specifier_nonarray ...@@ -1716,52 +1828,40 @@ type_specifier_nonarray
$$.setVector(4); $$.setVector(4);
} }
| F16VEC2 { | F16VEC2 {
#ifndef GLSLANG_WEB
parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setVector(2); $$.setVector(2);
#endif
} }
| F16VEC3 { | F16VEC3 {
#ifndef GLSLANG_WEB
parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setVector(3); $$.setVector(3);
#endif
} }
| F16VEC4 { | F16VEC4 {
#ifndef GLSLANG_WEB
parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setVector(4); $$.setVector(4);
#endif
} }
| F32VEC2 { | F32VEC2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setVector(2); $$.setVector(2);
#endif
} }
| F32VEC3 { | F32VEC3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setVector(3); $$.setVector(3);
#endif
} }
| F32VEC4 { | F32VEC4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setVector(4); $$.setVector(4);
#endif
} }
| F64VEC2 { | F64VEC2 {
parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
...@@ -1781,107 +1881,59 @@ type_specifier_nonarray ...@@ -1781,107 +1881,59 @@ type_specifier_nonarray
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setVector(4); $$.setVector(4);
} }
| BVEC2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
$$.setVector(2);
}
| BVEC3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
$$.setVector(3);
}
| BVEC4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtBool;
$$.setVector(4);
}
| IVEC2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
$$.setVector(2);
}
| IVEC3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
$$.setVector(3);
}
| IVEC4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
$$.setVector(4);
}
| I8VEC2 { | I8VEC2 {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
$$.setVector(2); $$.setVector(2);
#endif
} }
| I8VEC3 { | I8VEC3 {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
$$.setVector(3); $$.setVector(3);
#endif
} }
| I8VEC4 { | I8VEC4 {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
$$.setVector(4); $$.setVector(4);
#endif
} }
| I16VEC2 { | I16VEC2 {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
$$.setVector(2); $$.setVector(2);
#endif
} }
| I16VEC3 { | I16VEC3 {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
$$.setVector(3); $$.setVector(3);
#endif
} }
| I16VEC4 { | I16VEC4 {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
$$.setVector(4); $$.setVector(4);
#endif
} }
| I32VEC2 { | I32VEC2 {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt; $$.basicType = EbtInt;
$$.setVector(2); $$.setVector(2);
#endif
} }
| I32VEC3 { | I32VEC3 {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt; $$.basicType = EbtInt;
$$.setVector(3); $$.setVector(3);
#endif
} }
| I32VEC4 { | I32VEC4 {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt; $$.basicType = EbtInt;
$$.setVector(4); $$.setVector(4);
#endif
} }
| I64VEC2 { | I64VEC2 {
parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
...@@ -1901,95 +1953,59 @@ type_specifier_nonarray ...@@ -1901,95 +1953,59 @@ type_specifier_nonarray
$$.basicType = EbtInt64; $$.basicType = EbtInt64;
$$.setVector(4); $$.setVector(4);
} }
| UVEC2 {
parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
$$.setVector(2);
}
| UVEC3 {
parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
$$.setVector(3);
}
| UVEC4 {
parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint;
$$.setVector(4);
}
| U8VEC2 { | U8VEC2 {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint8; $$.basicType = EbtUint8;
$$.setVector(2); $$.setVector(2);
#endif
} }
| U8VEC3 { | U8VEC3 {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint8; $$.basicType = EbtUint8;
$$.setVector(3); $$.setVector(3);
#endif
} }
| U8VEC4 { | U8VEC4 {
#ifndef GLSLANG_WEB
parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint8; $$.basicType = EbtUint8;
$$.setVector(4); $$.setVector(4);
#endif
} }
| U16VEC2 { | U16VEC2 {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
$$.setVector(2); $$.setVector(2);
#endif
} }
| U16VEC3 { | U16VEC3 {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
$$.setVector(3); $$.setVector(3);
#endif
} }
| U16VEC4 { | U16VEC4 {
#ifndef GLSLANG_WEB
parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
$$.setVector(4); $$.setVector(4);
#endif
} }
| U32VEC2 { | U32VEC2 {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint; $$.basicType = EbtUint;
$$.setVector(2); $$.setVector(2);
#endif
} }
| U32VEC3 { | U32VEC3 {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint; $$.basicType = EbtUint;
$$.setVector(3); $$.setVector(3);
#endif
} }
| U32VEC4 { | U32VEC4 {
#ifndef GLSLANG_WEB
parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint; $$.basicType = EbtUint;
$$.setVector(4); $$.setVector(4);
#endif
} }
| U64VEC2 { | U64VEC2 {
parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
...@@ -2009,66 +2025,6 @@ type_specifier_nonarray ...@@ -2009,66 +2025,6 @@ type_specifier_nonarray
$$.basicType = EbtUint64; $$.basicType = EbtUint64;
$$.setVector(4); $$.setVector(4);
} }
| MAT2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 2);
}
| MAT3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 3);
}
| MAT4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 4);
}
| MAT2X2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 2);
}
| MAT2X3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 3);
}
| MAT2X4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(2, 4);
}
| MAT3X2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 2);
}
| MAT3X3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 3);
}
| MAT3X4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(3, 4);
}
| MAT4X2 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 2);
}
| MAT4X3 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 3);
}
| MAT4X4 {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
$$.setMatrix(4, 4);
}
| DMAT2 { | DMAT2 {
parseContext.doubleCheck($1.loc, "double matrix"); parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2142,298 +2098,224 @@ type_specifier_nonarray ...@@ -2142,298 +2098,224 @@ type_specifier_nonarray
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
} }
| F16MAT2 { | F16MAT2 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
#endif
} }
| F16MAT3 { | F16MAT3 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
#endif
} }
| F16MAT4 { | F16MAT4 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
#endif
} }
| F16MAT2X2 { | F16MAT2X2 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
#endif
} }
| F16MAT2X3 { | F16MAT2X3 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(2, 3); $$.setMatrix(2, 3);
#endif
} }
| F16MAT2X4 { | F16MAT2X4 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(2, 4); $$.setMatrix(2, 4);
#endif
} }
| F16MAT3X2 { | F16MAT3X2 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(3, 2); $$.setMatrix(3, 2);
#endif
} }
| F16MAT3X3 { | F16MAT3X3 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
#endif
} }
| F16MAT3X4 { | F16MAT3X4 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(3, 4); $$.setMatrix(3, 4);
#endif
} }
| F16MAT4X2 { | F16MAT4X2 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(4, 2); $$.setMatrix(4, 2);
#endif
} }
| F16MAT4X3 { | F16MAT4X3 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(4, 3); $$.setMatrix(4, 3);
#endif
} }
| F16MAT4X4 { | F16MAT4X4 {
#ifndef GLSLANG_WEB
parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
#endif
} }
| F32MAT2 { | F32MAT2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
#endif
} }
| F32MAT3 { | F32MAT3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
#endif
} }
| F32MAT4 { | F32MAT4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
#endif
} }
| F32MAT2X2 { | F32MAT2X2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
#endif
} }
| F32MAT2X3 { | F32MAT2X3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(2, 3); $$.setMatrix(2, 3);
#endif
} }
| F32MAT2X4 { | F32MAT2X4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(2, 4); $$.setMatrix(2, 4);
#endif
} }
| F32MAT3X2 { | F32MAT3X2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(3, 2); $$.setMatrix(3, 2);
#endif
} }
| F32MAT3X3 { | F32MAT3X3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
#endif
} }
| F32MAT3X4 { | F32MAT3X4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(3, 4); $$.setMatrix(3, 4);
#endif
} }
| F32MAT4X2 { | F32MAT4X2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(4, 2); $$.setMatrix(4, 2);
#endif
} }
| F32MAT4X3 { | F32MAT4X3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(4, 3); $$.setMatrix(4, 3);
#endif
} }
| F32MAT4X4 { | F32MAT4X4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
#endif
} }
| F64MAT2 { | F64MAT2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
#endif
} }
| F64MAT3 { | F64MAT3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
#endif
} }
| F64MAT4 { | F64MAT4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
#endif
} }
| F64MAT2X2 { | F64MAT2X2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 2); $$.setMatrix(2, 2);
#endif
} }
| F64MAT2X3 { | F64MAT2X3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 3); $$.setMatrix(2, 3);
#endif
} }
| F64MAT2X4 { | F64MAT2X4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(2, 4); $$.setMatrix(2, 4);
#endif
} }
| F64MAT3X2 { | F64MAT3X2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 2); $$.setMatrix(3, 2);
#endif
} }
| F64MAT3X3 { | F64MAT3X3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 3); $$.setMatrix(3, 3);
#endif
} }
| F64MAT3X4 { | F64MAT3X4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(3, 4); $$.setMatrix(3, 4);
#endif
} }
| F64MAT4X2 { | F64MAT4X2 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 2); $$.setMatrix(4, 2);
#endif
} }
| F64MAT4X3 { | F64MAT4X3 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 3); $$.setMatrix(4, 3);
#endif
} }
| F64MAT4X4 { | F64MAT4X4 {
#ifndef GLSLANG_WEB
parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
#endif
} }
| ACCSTRUCTNV { | ACCSTRUCTNV {
#ifdef NV_EXTENSIONS
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtAccStructNV; $$.basicType = EbtAccStructNV;
#endif
} }
| ATOMIC_UINT { | ATOMIC_UINT {
parseContext.vulkanRemoved($1.loc, "atomic counter types"); parseContext.vulkanRemoved($1.loc, "atomic counter types");
...@@ -2445,6 +2327,7 @@ type_specifier_nonarray ...@@ -2445,6 +2327,7 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, Esd1D); $$.sampler.set(EbtFloat, Esd1D);
} }
| SAMPLER2D { | SAMPLER2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2460,11 +2343,6 @@ type_specifier_nonarray ...@@ -2460,11 +2343,6 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, EsdCube); $$.sampler.set(EbtFloat, EsdCube);
} }
| SAMPLER1DSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, Esd1D, false, true);
}
| SAMPLER2DSHADOW { | SAMPLER2DSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2475,21 +2353,28 @@ type_specifier_nonarray ...@@ -2475,21 +2353,28 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, EsdCube, false, true); $$.sampler.set(EbtFloat, EsdCube, false, true);
} }
| SAMPLER1DARRAY {
| SAMPLER1DSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, Esd1D, true); $$.sampler.set(EbtFloat, Esd1D, false, true);
} }
| SAMPLER2DARRAY { | SAMPLER1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, Esd2D, true); $$.sampler.set(EbtFloat, Esd1D, true);
} }
| SAMPLER1DARRAYSHADOW { | SAMPLER1DARRAYSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, Esd1D, true, true); $$.sampler.set(EbtFloat, Esd1D, true, true);
} }
| SAMPLER2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, Esd2D, true);
}
| SAMPLER2DARRAYSHADOW { | SAMPLER2DARRAYSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2505,115 +2390,91 @@ type_specifier_nonarray ...@@ -2505,115 +2390,91 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, EsdCube, true, true); $$.sampler.set(EbtFloat, EsdCube, true, true);
} }
| F16SAMPLER1D { | F16SAMPLER1D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D); $$.sampler.set(EbtFloat16, Esd1D);
#endif
} }
| F16SAMPLER2D { | F16SAMPLER2D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D); $$.sampler.set(EbtFloat16, Esd2D);
#endif
} }
| F16SAMPLER3D { | F16SAMPLER3D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd3D); $$.sampler.set(EbtFloat16, Esd3D);
#endif
} }
| F16SAMPLERCUBE { | F16SAMPLERCUBE {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube); $$.sampler.set(EbtFloat16, EsdCube);
#endif
} }
| F16SAMPLER1DSHADOW { | F16SAMPLER1DSHADOW {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D, false, true); $$.sampler.set(EbtFloat16, Esd1D, false, true);
#endif
} }
| F16SAMPLER2DSHADOW { | F16SAMPLER2DSHADOW {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, false, true); $$.sampler.set(EbtFloat16, Esd2D, false, true);
#endif
} }
| F16SAMPLERCUBESHADOW { | F16SAMPLERCUBESHADOW {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube, false, true); $$.sampler.set(EbtFloat16, EsdCube, false, true);
#endif
} }
| F16SAMPLER1DARRAY { | F16SAMPLER1DARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D, true); $$.sampler.set(EbtFloat16, Esd1D, true);
#endif
} }
| F16SAMPLER2DARRAY { | F16SAMPLER2DARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, true); $$.sampler.set(EbtFloat16, Esd2D, true);
#endif
} }
| F16SAMPLER1DARRAYSHADOW { | F16SAMPLER1DARRAYSHADOW {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D, true, true); $$.sampler.set(EbtFloat16, Esd1D, true, true);
#endif
} }
| F16SAMPLER2DARRAYSHADOW { | F16SAMPLER2DARRAYSHADOW {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, true, true); $$.sampler.set(EbtFloat16, Esd2D, true, true);
#endif
} }
| F16SAMPLERCUBEARRAY { | F16SAMPLERCUBEARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube, true); $$.sampler.set(EbtFloat16, EsdCube, true);
#endif
} }
| F16SAMPLERCUBEARRAYSHADOW { | F16SAMPLERCUBEARRAYSHADOW {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube, true, true); $$.sampler.set(EbtFloat16, EsdCube, true, true);
#endif
} }
| ISAMPLER1D { | ISAMPLER1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtInt, Esd1D); $$.sampler.set(EbtInt, Esd1D);
} }
| ISAMPLER2D { | ISAMPLER2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2629,11 +2490,13 @@ type_specifier_nonarray ...@@ -2629,11 +2490,13 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtInt, EsdCube); $$.sampler.set(EbtInt, EsdCube);
} }
| ISAMPLER1DARRAY { | ISAMPLER1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtInt, Esd1D, true); $$.sampler.set(EbtInt, Esd1D, true);
} }
| ISAMPLER2DARRAY { | ISAMPLER2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2644,11 +2507,13 @@ type_specifier_nonarray ...@@ -2644,11 +2507,13 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtInt, EsdCube, true); $$.sampler.set(EbtInt, EsdCube, true);
} }
| USAMPLER1D { | USAMPLER1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtUint, Esd1D); $$.sampler.set(EbtUint, Esd1D);
} }
| USAMPLER2D { | USAMPLER2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2664,11 +2529,13 @@ type_specifier_nonarray ...@@ -2664,11 +2529,13 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtUint, EsdCube); $$.sampler.set(EbtUint, EsdCube);
} }
| USAMPLER1DARRAY { | USAMPLER1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtUint, Esd1D, true); $$.sampler.set(EbtUint, Esd1D, true);
} }
| USAMPLER2DARRAY { | USAMPLER2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2679,6 +2546,7 @@ type_specifier_nonarray ...@@ -2679,6 +2546,7 @@ type_specifier_nonarray
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtUint, EsdCube, true); $$.sampler.set(EbtUint, EsdCube, true);
} }
| SAMPLER2DRECT { | SAMPLER2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
...@@ -2690,20 +2558,16 @@ type_specifier_nonarray ...@@ -2690,20 +2558,16 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, EsdRect, false, true); $$.sampler.set(EbtFloat, EsdRect, false, true);
} }
| F16SAMPLER2DRECT { | F16SAMPLER2DRECT {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdRect); $$.sampler.set(EbtFloat16, EsdRect);
#endif
} }
| F16SAMPLER2DRECTSHADOW { | F16SAMPLER2DRECTSHADOW {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdRect, false, true); $$.sampler.set(EbtFloat16, EsdRect, false, true);
#endif
} }
| ISAMPLER2DRECT { | ISAMPLER2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2721,12 +2585,10 @@ type_specifier_nonarray ...@@ -2721,12 +2585,10 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, EsdBuffer); $$.sampler.set(EbtFloat, EsdBuffer);
} }
| F16SAMPLERBUFFER { | F16SAMPLERBUFFER {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdBuffer); $$.sampler.set(EbtFloat16, EsdBuffer);
#endif
} }
| ISAMPLERBUFFER { | ISAMPLERBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2744,12 +2606,10 @@ type_specifier_nonarray ...@@ -2744,12 +2606,10 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, Esd2D, false, false, true); $$.sampler.set(EbtFloat, Esd2D, false, false, true);
} }
| F16SAMPLER2DMS { | F16SAMPLER2DMS {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, false, false, true); $$.sampler.set(EbtFloat16, Esd2D, false, false, true);
#endif
} }
| ISAMPLER2DMS { | ISAMPLER2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2767,12 +2627,10 @@ type_specifier_nonarray ...@@ -2767,12 +2627,10 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, Esd2D, true, false, true); $$.sampler.set(EbtFloat, Esd2D, true, false, true);
} }
| F16SAMPLER2DMSARRAY { | F16SAMPLER2DMSARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, true, false, true); $$.sampler.set(EbtFloat16, Esd2D, true, false, true);
#endif
} }
| ISAMPLER2DMSARRAY { | ISAMPLER2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2800,12 +2658,10 @@ type_specifier_nonarray ...@@ -2800,12 +2658,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd1D); $$.sampler.setTexture(EbtFloat, Esd1D);
} }
| F16TEXTURE1D { | F16TEXTURE1D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd1D); $$.sampler.setTexture(EbtFloat16, Esd1D);
#endif
} }
| TEXTURE2D { | TEXTURE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2813,12 +2669,10 @@ type_specifier_nonarray ...@@ -2813,12 +2669,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd2D); $$.sampler.setTexture(EbtFloat, Esd2D);
} }
| F16TEXTURE2D { | F16TEXTURE2D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D); $$.sampler.setTexture(EbtFloat16, Esd2D);
#endif
} }
| TEXTURE3D { | TEXTURE3D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2826,12 +2680,10 @@ type_specifier_nonarray ...@@ -2826,12 +2680,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd3D); $$.sampler.setTexture(EbtFloat, Esd3D);
} }
| F16TEXTURE3D { | F16TEXTURE3D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd3D); $$.sampler.setTexture(EbtFloat16, Esd3D);
#endif
} }
| TEXTURECUBE { | TEXTURECUBE {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2839,12 +2691,10 @@ type_specifier_nonarray ...@@ -2839,12 +2691,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, EsdCube); $$.sampler.setTexture(EbtFloat, EsdCube);
} }
| F16TEXTURECUBE { | F16TEXTURECUBE {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdCube); $$.sampler.setTexture(EbtFloat16, EsdCube);
#endif
} }
| TEXTURE1DARRAY { | TEXTURE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2852,12 +2702,10 @@ type_specifier_nonarray ...@@ -2852,12 +2702,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd1D, true); $$.sampler.setTexture(EbtFloat, Esd1D, true);
} }
| F16TEXTURE1DARRAY { | F16TEXTURE1DARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd1D, true); $$.sampler.setTexture(EbtFloat16, Esd1D, true);
#endif
} }
| TEXTURE2DARRAY { | TEXTURE2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2865,12 +2713,10 @@ type_specifier_nonarray ...@@ -2865,12 +2713,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd2D, true); $$.sampler.setTexture(EbtFloat, Esd2D, true);
} }
| F16TEXTURE2DARRAY { | F16TEXTURE2DARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D, true); $$.sampler.setTexture(EbtFloat16, Esd2D, true);
#endif
} }
| TEXTURECUBEARRAY { | TEXTURECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2878,12 +2724,10 @@ type_specifier_nonarray ...@@ -2878,12 +2724,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, EsdCube, true); $$.sampler.setTexture(EbtFloat, EsdCube, true);
} }
| F16TEXTURECUBEARRAY { | F16TEXTURECUBEARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdCube, true); $$.sampler.setTexture(EbtFloat16, EsdCube, true);
#endif
} }
| ITEXTURE1D { | ITEXTURE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2961,12 +2805,10 @@ type_specifier_nonarray ...@@ -2961,12 +2805,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, EsdRect); $$.sampler.setTexture(EbtFloat, EsdRect);
} }
| F16TEXTURE2DRECT { | F16TEXTURE2DRECT {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdRect); $$.sampler.setTexture(EbtFloat16, EsdRect);
#endif
} }
| ITEXTURE2DRECT { | ITEXTURE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -2984,12 +2826,10 @@ type_specifier_nonarray ...@@ -2984,12 +2826,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, EsdBuffer); $$.sampler.setTexture(EbtFloat, EsdBuffer);
} }
| F16TEXTUREBUFFER { | F16TEXTUREBUFFER {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdBuffer); $$.sampler.setTexture(EbtFloat16, EsdBuffer);
#endif
} }
| ITEXTUREBUFFER { | ITEXTUREBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3007,12 +2847,10 @@ type_specifier_nonarray ...@@ -3007,12 +2847,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd2D, false, false, true); $$.sampler.setTexture(EbtFloat, Esd2D, false, false, true);
} }
| F16TEXTURE2DMS { | F16TEXTURE2DMS {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D, false, false, true); $$.sampler.setTexture(EbtFloat16, Esd2D, false, false, true);
#endif
} }
| ITEXTURE2DMS { | ITEXTURE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3030,12 +2868,10 @@ type_specifier_nonarray ...@@ -3030,12 +2868,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd2D, true, false, true); $$.sampler.setTexture(EbtFloat, Esd2D, true, false, true);
} }
| F16TEXTURE2DMSARRAY { | F16TEXTURE2DMSARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D, true, false, true); $$.sampler.setTexture(EbtFloat16, Esd2D, true, false, true);
#endif
} }
| ITEXTURE2DMSARRAY { | ITEXTURE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3053,12 +2889,10 @@ type_specifier_nonarray ...@@ -3053,12 +2889,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd1D); $$.sampler.setImage(EbtFloat, Esd1D);
} }
| F16IMAGE1D { | F16IMAGE1D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd1D); $$.sampler.setImage(EbtFloat16, Esd1D);
#endif
} }
| IIMAGE1D { | IIMAGE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3076,12 +2910,10 @@ type_specifier_nonarray ...@@ -3076,12 +2910,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D); $$.sampler.setImage(EbtFloat, Esd2D);
} }
| F16IMAGE2D { | F16IMAGE2D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D); $$.sampler.setImage(EbtFloat16, Esd2D);
#endif
} }
| IIMAGE2D { | IIMAGE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3099,12 +2931,10 @@ type_specifier_nonarray ...@@ -3099,12 +2931,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd3D); $$.sampler.setImage(EbtFloat, Esd3D);
} }
| F16IMAGE3D { | F16IMAGE3D {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd3D); $$.sampler.setImage(EbtFloat16, Esd3D);
#endif
} }
| IIMAGE3D { | IIMAGE3D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3122,12 +2952,10 @@ type_specifier_nonarray ...@@ -3122,12 +2952,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdRect); $$.sampler.setImage(EbtFloat, EsdRect);
} }
| F16IMAGE2DRECT { | F16IMAGE2DRECT {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdRect); $$.sampler.setImage(EbtFloat16, EsdRect);
#endif
} }
| IIMAGE2DRECT { | IIMAGE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3145,12 +2973,10 @@ type_specifier_nonarray ...@@ -3145,12 +2973,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdCube); $$.sampler.setImage(EbtFloat, EsdCube);
} }
| F16IMAGECUBE { | F16IMAGECUBE {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdCube); $$.sampler.setImage(EbtFloat16, EsdCube);
#endif
} }
| IIMAGECUBE { | IIMAGECUBE {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3168,12 +2994,10 @@ type_specifier_nonarray ...@@ -3168,12 +2994,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdBuffer); $$.sampler.setImage(EbtFloat, EsdBuffer);
} }
| F16IMAGEBUFFER { | F16IMAGEBUFFER {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdBuffer); $$.sampler.setImage(EbtFloat16, EsdBuffer);
#endif
} }
| IIMAGEBUFFER { | IIMAGEBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3191,12 +3015,10 @@ type_specifier_nonarray ...@@ -3191,12 +3015,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd1D, true); $$.sampler.setImage(EbtFloat, Esd1D, true);
} }
| F16IMAGE1DARRAY { | F16IMAGE1DARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd1D, true); $$.sampler.setImage(EbtFloat16, Esd1D, true);
#endif
} }
| IIMAGE1DARRAY { | IIMAGE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3214,12 +3036,10 @@ type_specifier_nonarray ...@@ -3214,12 +3036,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D, true); $$.sampler.setImage(EbtFloat, Esd2D, true);
} }
| F16IMAGE2DARRAY { | F16IMAGE2DARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D, true); $$.sampler.setImage(EbtFloat16, Esd2D, true);
#endif
} }
| IIMAGE2DARRAY { | IIMAGE2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3237,12 +3057,10 @@ type_specifier_nonarray ...@@ -3237,12 +3057,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdCube, true); $$.sampler.setImage(EbtFloat, EsdCube, true);
} }
| F16IMAGECUBEARRAY { | F16IMAGECUBEARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdCube, true); $$.sampler.setImage(EbtFloat16, EsdCube, true);
#endif
} }
| IIMAGECUBEARRAY { | IIMAGECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3260,12 +3078,10 @@ type_specifier_nonarray ...@@ -3260,12 +3078,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D, false, false, true); $$.sampler.setImage(EbtFloat, Esd2D, false, false, true);
} }
| F16IMAGE2DMS { | F16IMAGE2DMS {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D, false, false, true); $$.sampler.setImage(EbtFloat16, Esd2D, false, false, true);
#endif
} }
| IIMAGE2DMS { | IIMAGE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3283,12 +3099,10 @@ type_specifier_nonarray ...@@ -3283,12 +3099,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D, true, false, true); $$.sampler.setImage(EbtFloat, Esd2D, true, false, true);
} }
| F16IMAGE2DMSARRAY { | F16IMAGE2DMSARRAY {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D, true, false, true); $$.sampler.setImage(EbtFloat16, Esd2D, true, false, true);
#endif
} }
| IIMAGE2DMSARRAY { | IIMAGE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
...@@ -3325,22 +3139,18 @@ type_specifier_nonarray ...@@ -3325,22 +3139,18 @@ type_specifier_nonarray
$$.sampler.setSubpass(EbtFloat, true); $$.sampler.setSubpass(EbtFloat, true);
} }
| F16SUBPASSINPUT { | F16SUBPASSINPUT {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setSubpass(EbtFloat16); $$.sampler.setSubpass(EbtFloat16);
#endif
} }
| F16SUBPASSINPUTMS { | F16SUBPASSINPUTMS {
#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.setSubpass(EbtFloat16, true); $$.sampler.setSubpass(EbtFloat16, true);
#endif
} }
| ISUBPASSINPUT { | ISUBPASSINPUT {
parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
...@@ -3367,13 +3177,12 @@ type_specifier_nonarray ...@@ -3367,13 +3177,12 @@ type_specifier_nonarray
$$.sampler.setSubpass(EbtUint, true); $$.sampler.setSubpass(EbtUint, true);
} }
| FCOOPMATNV { | FCOOPMATNV {
#ifndef GLSLANG_WEB
parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat; $$.basicType = EbtFloat;
$$.coopmat = true; $$.coopmat = true;
#endif
} }
| struct_specifier { | struct_specifier {
$$ = $1; $$ = $1;
$$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3570,9 +3379,12 @@ simple_statement ...@@ -3570,9 +3379,12 @@ simple_statement
| case_label { $$ = $1; } | case_label { $$ = $1; }
| iteration_statement { $$ = $1; } | iteration_statement { $$ = $1; }
| jump_statement { $$ = $1; } | jump_statement { $$ = $1; }
| demote_statement { $$ = $1; } | demote_statement { $$ = $1; }
; ;
demote_statement demote_statement
: DEMOTE SEMICOLON { : DEMOTE SEMICOLON {
parseContext.requireStage($1.loc, EShLangFragment, "demote"); parseContext.requireStage($1.loc, EShLangFragment, "demote");
...@@ -3581,6 +3393,7 @@ demote_statement ...@@ -3581,6 +3393,7 @@ demote_statement
} }
; ;
compound_statement compound_statement
: LEFT_BRACE RIGHT_BRACE { $$ = 0; } : LEFT_BRACE RIGHT_BRACE { $$ = 0; }
| LEFT_BRACE { | LEFT_BRACE {
...@@ -3663,13 +3476,13 @@ selection_statement ...@@ -3663,13 +3476,13 @@ selection_statement
: selection_statement_nonattributed { : selection_statement_nonattributed {
$$ = $1; $$ = $1;
} }
| attribute selection_statement_nonattributed { | attribute selection_statement_nonattributed {
#ifndef GLSLANG_WEB
parseContext.handleSelectionAttributes(*$1, $2); parseContext.handleSelectionAttributes(*$1, $2);
#endif
$$ = $2; $$ = $2;
} }
selection_statement_nonattributed selection_statement_nonattributed
: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement {
parseContext.boolCheck($1.loc, $3); parseContext.boolCheck($1.loc, $3);
...@@ -3710,13 +3523,13 @@ switch_statement ...@@ -3710,13 +3523,13 @@ switch_statement
: switch_statement_nonattributed { : switch_statement_nonattributed {
$$ = $1; $$ = $1;
} }
| attribute switch_statement_nonattributed { | attribute switch_statement_nonattributed {
#ifndef GLSLANG_WEB
parseContext.handleSwitchAttributes(*$1, $2); parseContext.handleSwitchAttributes(*$1, $2);
#endif
$$ = $2; $$ = $2;
} }
switch_statement_nonattributed switch_statement_nonattributed
: SWITCH LEFT_PAREN expression RIGHT_PAREN { : SWITCH LEFT_PAREN expression RIGHT_PAREN {
// start new switch sequence on the switch stack // start new switch sequence on the switch stack
...@@ -3774,13 +3587,13 @@ iteration_statement ...@@ -3774,13 +3587,13 @@ iteration_statement
: iteration_statement_nonattributed { : iteration_statement_nonattributed {
$$ = $1; $$ = $1;
} }
| attribute iteration_statement_nonattributed { | attribute iteration_statement_nonattributed {
#ifndef GLSLANG_WEB
parseContext.handleLoopAttributes(*$1, $2); parseContext.handleLoopAttributes(*$1, $2);
#endif
$$ = $2; $$ = $2;
} }
iteration_statement_nonattributed iteration_statement_nonattributed
: WHILE LEFT_PAREN { : WHILE LEFT_PAREN {
if (! parseContext.limits.whileLoops) if (! parseContext.limits.whileLoops)
...@@ -3940,6 +3753,7 @@ function_definition ...@@ -3940,6 +3753,7 @@ function_definition
} }
; ;
attribute attribute
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
$$ = $3; $$ = $3;
...@@ -3951,21 +3765,16 @@ attribute_list ...@@ -3951,21 +3765,16 @@ attribute_list
$$ = $1; $$ = $1;
} }
| attribute_list COMMA single_attribute { | attribute_list COMMA single_attribute {
#ifndef GLSLANG_WEB
$$ = parseContext.mergeAttributes($1, $3); $$ = parseContext.mergeAttributes($1, $3);
#endif
} }
single_attribute single_attribute
: IDENTIFIER { : IDENTIFIER {
#ifndef GLSLANG_WEB
$$ = parseContext.makeAttributes(*$1.string); $$ = parseContext.makeAttributes(*$1.string);
#endif
} }
| IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN { | IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN {
#ifndef GLSLANG_WEB
$$ = parseContext.makeAttributes(*$1.string, $3); $$ = parseContext.makeAttributes(*$1.string, $3);
#endif
} }
%% %%
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -45,412 +45,412 @@ extern int yydebug; ...@@ -45,412 +45,412 @@ extern int yydebug;
# define YYTOKENTYPE # define YYTOKENTYPE
enum yytokentype enum yytokentype
{ {
ATTRIBUTE = 258, CONST = 258,
VARYING = 259, BOOL = 259,
FLOAT16_T = 260, INT = 260,
FLOAT = 261, UINT = 261,
FLOAT32_T = 262, FLOAT = 262,
DOUBLE = 263, BVEC2 = 263,
FLOAT64_T = 264, BVEC3 = 264,
CONST = 265, BVEC4 = 265,
BOOL = 266, IVEC2 = 266,
INT = 267, IVEC3 = 267,
UINT = 268, IVEC4 = 268,
INT64_T = 269, UVEC2 = 269,
UINT64_T = 270, UVEC3 = 270,
INT32_T = 271, UVEC4 = 271,
UINT32_T = 272, VEC2 = 272,
INT16_T = 273, VEC3 = 273,
UINT16_T = 274, VEC4 = 274,
INT8_T = 275, MAT2 = 275,
UINT8_T = 276, MAT3 = 276,
BREAK = 277, MAT4 = 277,
CONTINUE = 278, MAT2X2 = 278,
DO = 279, MAT2X3 = 279,
ELSE = 280, MAT2X4 = 280,
FOR = 281, MAT3X2 = 281,
IF = 282, MAT3X3 = 282,
DISCARD = 283, MAT3X4 = 283,
RETURN = 284, MAT4X2 = 284,
SWITCH = 285, MAT4X3 = 285,
CASE = 286, MAT4X4 = 286,
DEFAULT = 287, SAMPLER2D = 287,
SUBROUTINE = 288, SAMPLER3D = 288,
DEMOTE = 289, SAMPLERCUBE = 289,
BVEC2 = 290, SAMPLER2DSHADOW = 290,
BVEC3 = 291, SAMPLERCUBESHADOW = 291,
BVEC4 = 292, SAMPLER2DARRAY = 292,
IVEC2 = 293, SAMPLER2DARRAYSHADOW = 293,
IVEC3 = 294, ISAMPLER2D = 294,
IVEC4 = 295, ISAMPLER3D = 295,
UVEC2 = 296, ISAMPLERCUBE = 296,
UVEC3 = 297, ISAMPLER2DARRAY = 297,
UVEC4 = 298, USAMPLER2D = 298,
I64VEC2 = 299, USAMPLER3D = 299,
I64VEC3 = 300, USAMPLERCUBE = 300,
I64VEC4 = 301, USAMPLER2DARRAY = 301,
U64VEC2 = 302, SAMPLERCUBEARRAY = 302,
U64VEC3 = 303, SAMPLERCUBEARRAYSHADOW = 303,
U64VEC4 = 304, ISAMPLERCUBEARRAY = 304,
I32VEC2 = 305, USAMPLERCUBEARRAY = 305,
I32VEC3 = 306, ATTRIBUTE = 306,
I32VEC4 = 307, VARYING = 307,
U32VEC2 = 308, FLOAT16_T = 308,
U32VEC3 = 309, FLOAT32_T = 309,
U32VEC4 = 310, DOUBLE = 310,
I16VEC2 = 311, FLOAT64_T = 311,
I16VEC3 = 312, INT64_T = 312,
I16VEC4 = 313, UINT64_T = 313,
U16VEC2 = 314, INT32_T = 314,
U16VEC3 = 315, UINT32_T = 315,
U16VEC4 = 316, INT16_T = 316,
I8VEC2 = 317, UINT16_T = 317,
I8VEC3 = 318, INT8_T = 318,
I8VEC4 = 319, UINT8_T = 319,
U8VEC2 = 320, I64VEC2 = 320,
U8VEC3 = 321, I64VEC3 = 321,
U8VEC4 = 322, I64VEC4 = 322,
VEC2 = 323, U64VEC2 = 323,
VEC3 = 324, U64VEC3 = 324,
VEC4 = 325, U64VEC4 = 325,
MAT2 = 326, I32VEC2 = 326,
MAT3 = 327, I32VEC3 = 327,
MAT4 = 328, I32VEC4 = 328,
CENTROID = 329, U32VEC2 = 329,
IN = 330, U32VEC3 = 330,
OUT = 331, U32VEC4 = 331,
INOUT = 332, I16VEC2 = 332,
UNIFORM = 333, I16VEC3 = 333,
PATCH = 334, I16VEC4 = 334,
SAMPLE = 335, U16VEC2 = 335,
BUFFER = 336, U16VEC3 = 336,
SHARED = 337, U16VEC4 = 337,
NONUNIFORM = 338, I8VEC2 = 338,
PAYLOADNV = 339, I8VEC3 = 339,
PAYLOADINNV = 340, I8VEC4 = 340,
HITATTRNV = 341, U8VEC2 = 341,
CALLDATANV = 342, U8VEC3 = 342,
CALLDATAINNV = 343, U8VEC4 = 343,
COHERENT = 344, DVEC2 = 344,
VOLATILE = 345, DVEC3 = 345,
RESTRICT = 346, DVEC4 = 346,
READONLY = 347, DMAT2 = 347,
WRITEONLY = 348, DMAT3 = 348,
DEVICECOHERENT = 349, DMAT4 = 349,
QUEUEFAMILYCOHERENT = 350, F16VEC2 = 350,
WORKGROUPCOHERENT = 351, F16VEC3 = 351,
SUBGROUPCOHERENT = 352, F16VEC4 = 352,
NONPRIVATE = 353, F16MAT2 = 353,
DVEC2 = 354, F16MAT3 = 354,
DVEC3 = 355, F16MAT4 = 355,
DVEC4 = 356, F32VEC2 = 356,
DMAT2 = 357, F32VEC3 = 357,
DMAT3 = 358, F32VEC4 = 358,
DMAT4 = 359, F32MAT2 = 359,
F16VEC2 = 360, F32MAT3 = 360,
F16VEC3 = 361, F32MAT4 = 361,
F16VEC4 = 362, F64VEC2 = 362,
F16MAT2 = 363, F64VEC3 = 363,
F16MAT3 = 364, F64VEC4 = 364,
F16MAT4 = 365, F64MAT2 = 365,
F32VEC2 = 366, F64MAT3 = 366,
F32VEC3 = 367, F64MAT4 = 367,
F32VEC4 = 368, DMAT2X2 = 368,
F32MAT2 = 369, DMAT2X3 = 369,
F32MAT3 = 370, DMAT2X4 = 370,
F32MAT4 = 371, DMAT3X2 = 371,
F64VEC2 = 372, DMAT3X3 = 372,
F64VEC3 = 373, DMAT3X4 = 373,
F64VEC4 = 374, DMAT4X2 = 374,
F64MAT2 = 375, DMAT4X3 = 375,
F64MAT3 = 376, DMAT4X4 = 376,
F64MAT4 = 377, F16MAT2X2 = 377,
NOPERSPECTIVE = 378, F16MAT2X3 = 378,
FLAT = 379, F16MAT2X4 = 379,
SMOOTH = 380, F16MAT3X2 = 380,
LAYOUT = 381, F16MAT3X3 = 381,
EXPLICITINTERPAMD = 382, F16MAT3X4 = 382,
PERVERTEXNV = 383, F16MAT4X2 = 383,
PERPRIMITIVENV = 384, F16MAT4X3 = 384,
PERVIEWNV = 385, F16MAT4X4 = 385,
PERTASKNV = 386, F32MAT2X2 = 386,
MAT2X2 = 387, F32MAT2X3 = 387,
MAT2X3 = 388, F32MAT2X4 = 388,
MAT2X4 = 389, F32MAT3X2 = 389,
MAT3X2 = 390, F32MAT3X3 = 390,
MAT3X3 = 391, F32MAT3X4 = 391,
MAT3X4 = 392, F32MAT4X2 = 392,
MAT4X2 = 393, F32MAT4X3 = 393,
MAT4X3 = 394, F32MAT4X4 = 394,
MAT4X4 = 395, F64MAT2X2 = 395,
DMAT2X2 = 396, F64MAT2X3 = 396,
DMAT2X3 = 397, F64MAT2X4 = 397,
DMAT2X4 = 398, F64MAT3X2 = 398,
DMAT3X2 = 399, F64MAT3X3 = 399,
DMAT3X3 = 400, F64MAT3X4 = 400,
DMAT3X4 = 401, F64MAT4X2 = 401,
DMAT4X2 = 402, F64MAT4X3 = 402,
DMAT4X3 = 403, F64MAT4X4 = 403,
DMAT4X4 = 404, ATOMIC_UINT = 404,
F16MAT2X2 = 405, ACCSTRUCTNV = 405,
F16MAT2X3 = 406, FCOOPMATNV = 406,
F16MAT2X4 = 407, SAMPLER1D = 407,
F16MAT3X2 = 408, SAMPLER1DARRAY = 408,
F16MAT3X3 = 409, SAMPLER1DARRAYSHADOW = 409,
F16MAT3X4 = 410, ISAMPLER1D = 410,
F16MAT4X2 = 411, SAMPLER1DSHADOW = 411,
F16MAT4X3 = 412, SAMPLER2DRECT = 412,
F16MAT4X4 = 413, SAMPLER2DRECTSHADOW = 413,
F32MAT2X2 = 414, ISAMPLER2DRECT = 414,
F32MAT2X3 = 415, USAMPLER2DRECT = 415,
F32MAT2X4 = 416, SAMPLERBUFFER = 416,
F32MAT3X2 = 417, ISAMPLERBUFFER = 417,
F32MAT3X3 = 418, USAMPLERBUFFER = 418,
F32MAT3X4 = 419, SAMPLER2DMS = 419,
F32MAT4X2 = 420, ISAMPLER2DMS = 420,
F32MAT4X3 = 421, USAMPLER2DMS = 421,
F32MAT4X4 = 422, SAMPLER2DMSARRAY = 422,
F64MAT2X2 = 423, ISAMPLER2DMSARRAY = 423,
F64MAT2X3 = 424, USAMPLER2DMSARRAY = 424,
F64MAT2X4 = 425, SAMPLEREXTERNALOES = 425,
F64MAT3X2 = 426, SAMPLEREXTERNAL2DY2YEXT = 426,
F64MAT3X3 = 427, ISAMPLER1DARRAY = 427,
F64MAT3X4 = 428, USAMPLER1D = 428,
F64MAT4X2 = 429, USAMPLER1DARRAY = 429,
F64MAT4X3 = 430, F16SAMPLER1D = 430,
F64MAT4X4 = 431, F16SAMPLER2D = 431,
ATOMIC_UINT = 432, F16SAMPLER3D = 432,
ACCSTRUCTNV = 433, F16SAMPLER2DRECT = 433,
FCOOPMATNV = 434, F16SAMPLERCUBE = 434,
SAMPLER1D = 435, F16SAMPLER1DARRAY = 435,
SAMPLER2D = 436, F16SAMPLER2DARRAY = 436,
SAMPLER3D = 437, F16SAMPLERCUBEARRAY = 437,
SAMPLERCUBE = 438, F16SAMPLERBUFFER = 438,
SAMPLER1DSHADOW = 439, F16SAMPLER2DMS = 439,
SAMPLER2DSHADOW = 440, F16SAMPLER2DMSARRAY = 440,
SAMPLERCUBESHADOW = 441, F16SAMPLER1DSHADOW = 441,
SAMPLER1DARRAY = 442, F16SAMPLER2DSHADOW = 442,
SAMPLER2DARRAY = 443, F16SAMPLER1DARRAYSHADOW = 443,
SAMPLER1DARRAYSHADOW = 444, F16SAMPLER2DARRAYSHADOW = 444,
SAMPLER2DARRAYSHADOW = 445, F16SAMPLER2DRECTSHADOW = 445,
ISAMPLER1D = 446, F16SAMPLERCUBESHADOW = 446,
ISAMPLER2D = 447, F16SAMPLERCUBEARRAYSHADOW = 447,
ISAMPLER3D = 448, IMAGE1D = 448,
ISAMPLERCUBE = 449, IIMAGE1D = 449,
ISAMPLER1DARRAY = 450, UIMAGE1D = 450,
ISAMPLER2DARRAY = 451, IMAGE2D = 451,
USAMPLER1D = 452, IIMAGE2D = 452,
USAMPLER2D = 453, UIMAGE2D = 453,
USAMPLER3D = 454, IMAGE3D = 454,
USAMPLERCUBE = 455, IIMAGE3D = 455,
USAMPLER1DARRAY = 456, UIMAGE3D = 456,
USAMPLER2DARRAY = 457, IMAGE2DRECT = 457,
SAMPLER2DRECT = 458, IIMAGE2DRECT = 458,
SAMPLER2DRECTSHADOW = 459, UIMAGE2DRECT = 459,
ISAMPLER2DRECT = 460, IMAGECUBE = 460,
USAMPLER2DRECT = 461, IIMAGECUBE = 461,
SAMPLERBUFFER = 462, UIMAGECUBE = 462,
ISAMPLERBUFFER = 463, IMAGEBUFFER = 463,
USAMPLERBUFFER = 464, IIMAGEBUFFER = 464,
SAMPLERCUBEARRAY = 465, UIMAGEBUFFER = 465,
SAMPLERCUBEARRAYSHADOW = 466, IMAGE1DARRAY = 466,
ISAMPLERCUBEARRAY = 467, IIMAGE1DARRAY = 467,
USAMPLERCUBEARRAY = 468, UIMAGE1DARRAY = 468,
SAMPLER2DMS = 469, IMAGE2DARRAY = 469,
ISAMPLER2DMS = 470, IIMAGE2DARRAY = 470,
USAMPLER2DMS = 471, UIMAGE2DARRAY = 471,
SAMPLER2DMSARRAY = 472, IMAGECUBEARRAY = 472,
ISAMPLER2DMSARRAY = 473, IIMAGECUBEARRAY = 473,
USAMPLER2DMSARRAY = 474, UIMAGECUBEARRAY = 474,
SAMPLEREXTERNALOES = 475, IMAGE2DMS = 475,
SAMPLEREXTERNAL2DY2YEXT = 476, IIMAGE2DMS = 476,
F16SAMPLER1D = 477, UIMAGE2DMS = 477,
F16SAMPLER2D = 478, IMAGE2DMSARRAY = 478,
F16SAMPLER3D = 479, IIMAGE2DMSARRAY = 479,
F16SAMPLER2DRECT = 480, UIMAGE2DMSARRAY = 480,
F16SAMPLERCUBE = 481, F16IMAGE1D = 481,
F16SAMPLER1DARRAY = 482, F16IMAGE2D = 482,
F16SAMPLER2DARRAY = 483, F16IMAGE3D = 483,
F16SAMPLERCUBEARRAY = 484, F16IMAGE2DRECT = 484,
F16SAMPLERBUFFER = 485, F16IMAGECUBE = 485,
F16SAMPLER2DMS = 486, F16IMAGE1DARRAY = 486,
F16SAMPLER2DMSARRAY = 487, F16IMAGE2DARRAY = 487,
F16SAMPLER1DSHADOW = 488, F16IMAGECUBEARRAY = 488,
F16SAMPLER2DSHADOW = 489, F16IMAGEBUFFER = 489,
F16SAMPLER1DARRAYSHADOW = 490, F16IMAGE2DMS = 490,
F16SAMPLER2DARRAYSHADOW = 491, F16IMAGE2DMSARRAY = 491,
F16SAMPLER2DRECTSHADOW = 492, SAMPLER = 492,
F16SAMPLERCUBESHADOW = 493, SAMPLERSHADOW = 493,
F16SAMPLERCUBEARRAYSHADOW = 494, TEXTURE1D = 494,
SAMPLER = 495, TEXTURE2D = 495,
SAMPLERSHADOW = 496, TEXTURE3D = 496,
TEXTURE1D = 497, TEXTURECUBE = 497,
TEXTURE2D = 498, TEXTURE1DARRAY = 498,
TEXTURE3D = 499, TEXTURE2DARRAY = 499,
TEXTURECUBE = 500, ITEXTURE1D = 500,
TEXTURE1DARRAY = 501, ITEXTURE2D = 501,
TEXTURE2DARRAY = 502, ITEXTURE3D = 502,
ITEXTURE1D = 503, ITEXTURECUBE = 503,
ITEXTURE2D = 504, ITEXTURE1DARRAY = 504,
ITEXTURE3D = 505, ITEXTURE2DARRAY = 505,
ITEXTURECUBE = 506, UTEXTURE1D = 506,
ITEXTURE1DARRAY = 507, UTEXTURE2D = 507,
ITEXTURE2DARRAY = 508, UTEXTURE3D = 508,
UTEXTURE1D = 509, UTEXTURECUBE = 509,
UTEXTURE2D = 510, UTEXTURE1DARRAY = 510,
UTEXTURE3D = 511, UTEXTURE2DARRAY = 511,
UTEXTURECUBE = 512, TEXTURE2DRECT = 512,
UTEXTURE1DARRAY = 513, ITEXTURE2DRECT = 513,
UTEXTURE2DARRAY = 514, UTEXTURE2DRECT = 514,
TEXTURE2DRECT = 515, TEXTUREBUFFER = 515,
ITEXTURE2DRECT = 516, ITEXTUREBUFFER = 516,
UTEXTURE2DRECT = 517, UTEXTUREBUFFER = 517,
TEXTUREBUFFER = 518, TEXTURECUBEARRAY = 518,
ITEXTUREBUFFER = 519, ITEXTURECUBEARRAY = 519,
UTEXTUREBUFFER = 520, UTEXTURECUBEARRAY = 520,
TEXTURECUBEARRAY = 521, TEXTURE2DMS = 521,
ITEXTURECUBEARRAY = 522, ITEXTURE2DMS = 522,
UTEXTURECUBEARRAY = 523, UTEXTURE2DMS = 523,
TEXTURE2DMS = 524, TEXTURE2DMSARRAY = 524,
ITEXTURE2DMS = 525, ITEXTURE2DMSARRAY = 525,
UTEXTURE2DMS = 526, UTEXTURE2DMSARRAY = 526,
TEXTURE2DMSARRAY = 527, F16TEXTURE1D = 527,
ITEXTURE2DMSARRAY = 528, F16TEXTURE2D = 528,
UTEXTURE2DMSARRAY = 529, F16TEXTURE3D = 529,
F16TEXTURE1D = 530, F16TEXTURE2DRECT = 530,
F16TEXTURE2D = 531, F16TEXTURECUBE = 531,
F16TEXTURE3D = 532, F16TEXTURE1DARRAY = 532,
F16TEXTURE2DRECT = 533, F16TEXTURE2DARRAY = 533,
F16TEXTURECUBE = 534, F16TEXTURECUBEARRAY = 534,
F16TEXTURE1DARRAY = 535, F16TEXTUREBUFFER = 535,
F16TEXTURE2DARRAY = 536, F16TEXTURE2DMS = 536,
F16TEXTURECUBEARRAY = 537, F16TEXTURE2DMSARRAY = 537,
F16TEXTUREBUFFER = 538, SUBPASSINPUT = 538,
F16TEXTURE2DMS = 539, SUBPASSINPUTMS = 539,
F16TEXTURE2DMSARRAY = 540, ISUBPASSINPUT = 540,
SUBPASSINPUT = 541, ISUBPASSINPUTMS = 541,
SUBPASSINPUTMS = 542, USUBPASSINPUT = 542,
ISUBPASSINPUT = 543, USUBPASSINPUTMS = 543,
ISUBPASSINPUTMS = 544, F16SUBPASSINPUT = 544,
USUBPASSINPUT = 545, F16SUBPASSINPUTMS = 545,
USUBPASSINPUTMS = 546, LEFT_OP = 546,
F16SUBPASSINPUT = 547, RIGHT_OP = 547,
F16SUBPASSINPUTMS = 548, INC_OP = 548,
IMAGE1D = 549, DEC_OP = 549,
IIMAGE1D = 550, LE_OP = 550,
UIMAGE1D = 551, GE_OP = 551,
IMAGE2D = 552, EQ_OP = 552,
IIMAGE2D = 553, NE_OP = 553,
UIMAGE2D = 554, AND_OP = 554,
IMAGE3D = 555, OR_OP = 555,
IIMAGE3D = 556, XOR_OP = 556,
UIMAGE3D = 557, MUL_ASSIGN = 557,
IMAGE2DRECT = 558, DIV_ASSIGN = 558,
IIMAGE2DRECT = 559, ADD_ASSIGN = 559,
UIMAGE2DRECT = 560, MOD_ASSIGN = 560,
IMAGECUBE = 561, LEFT_ASSIGN = 561,
IIMAGECUBE = 562, RIGHT_ASSIGN = 562,
UIMAGECUBE = 563, AND_ASSIGN = 563,
IMAGEBUFFER = 564, XOR_ASSIGN = 564,
IIMAGEBUFFER = 565, OR_ASSIGN = 565,
UIMAGEBUFFER = 566, SUB_ASSIGN = 566,
IMAGE1DARRAY = 567, LEFT_PAREN = 567,
IIMAGE1DARRAY = 568, RIGHT_PAREN = 568,
UIMAGE1DARRAY = 569, LEFT_BRACKET = 569,
IMAGE2DARRAY = 570, RIGHT_BRACKET = 570,
IIMAGE2DARRAY = 571, LEFT_BRACE = 571,
UIMAGE2DARRAY = 572, RIGHT_BRACE = 572,
IMAGECUBEARRAY = 573, DOT = 573,
IIMAGECUBEARRAY = 574, COMMA = 574,
UIMAGECUBEARRAY = 575, COLON = 575,
IMAGE2DMS = 576, EQUAL = 576,
IIMAGE2DMS = 577, SEMICOLON = 577,
UIMAGE2DMS = 578, BANG = 578,
IMAGE2DMSARRAY = 579, DASH = 579,
IIMAGE2DMSARRAY = 580, TILDE = 580,
UIMAGE2DMSARRAY = 581, PLUS = 581,
F16IMAGE1D = 582, STAR = 582,
F16IMAGE2D = 583, SLASH = 583,
F16IMAGE3D = 584, PERCENT = 584,
F16IMAGE2DRECT = 585, LEFT_ANGLE = 585,
F16IMAGECUBE = 586, RIGHT_ANGLE = 586,
F16IMAGE1DARRAY = 587, VERTICAL_BAR = 587,
F16IMAGE2DARRAY = 588, CARET = 588,
F16IMAGECUBEARRAY = 589, AMPERSAND = 589,
F16IMAGEBUFFER = 590, QUESTION = 590,
F16IMAGE2DMS = 591, INVARIANT = 591,
F16IMAGE2DMSARRAY = 592, HIGH_PRECISION = 592,
STRUCT = 593, MEDIUM_PRECISION = 593,
VOID = 594, LOW_PRECISION = 594,
WHILE = 595, PRECISION = 595,
IDENTIFIER = 596, PACKED = 596,
TYPE_NAME = 597, RESOURCE = 597,
FLOATCONSTANT = 598, SUPERP = 598,
DOUBLECONSTANT = 599, FLOATCONSTANT = 599,
INT16CONSTANT = 600, INTCONSTANT = 600,
UINT16CONSTANT = 601, UINTCONSTANT = 601,
INT32CONSTANT = 602, BOOLCONSTANT = 602,
UINT32CONSTANT = 603, IDENTIFIER = 603,
INTCONSTANT = 604, TYPE_NAME = 604,
UINTCONSTANT = 605, CENTROID = 605,
INT64CONSTANT = 606, IN = 606,
UINT64CONSTANT = 607, OUT = 607,
BOOLCONSTANT = 608, INOUT = 608,
FLOAT16CONSTANT = 609, STRUCT = 609,
LEFT_OP = 610, VOID = 610,
RIGHT_OP = 611, WHILE = 611,
INC_OP = 612, BREAK = 612,
DEC_OP = 613, CONTINUE = 613,
LE_OP = 614, DO = 614,
GE_OP = 615, ELSE = 615,
EQ_OP = 616, FOR = 616,
NE_OP = 617, IF = 617,
AND_OP = 618, DISCARD = 618,
OR_OP = 619, RETURN = 619,
XOR_OP = 620, SWITCH = 620,
MUL_ASSIGN = 621, CASE = 621,
DIV_ASSIGN = 622, DEFAULT = 622,
ADD_ASSIGN = 623, UNIFORM = 623,
MOD_ASSIGN = 624, SHARED = 624,
LEFT_ASSIGN = 625, FLAT = 625,
RIGHT_ASSIGN = 626, SMOOTH = 626,
AND_ASSIGN = 627, LAYOUT = 627,
XOR_ASSIGN = 628, DOUBLECONSTANT = 628,
OR_ASSIGN = 629, INT16CONSTANT = 629,
SUB_ASSIGN = 630, UINT16CONSTANT = 630,
LEFT_PAREN = 631, FLOAT16CONSTANT = 631,
RIGHT_PAREN = 632, INT32CONSTANT = 632,
LEFT_BRACKET = 633, UINT32CONSTANT = 633,
RIGHT_BRACKET = 634, INT64CONSTANT = 634,
LEFT_BRACE = 635, UINT64CONSTANT = 635,
RIGHT_BRACE = 636, SUBROUTINE = 636,
DOT = 637, DEMOTE = 637,
COMMA = 638, PAYLOADNV = 638,
COLON = 639, PAYLOADINNV = 639,
EQUAL = 640, HITATTRNV = 640,
SEMICOLON = 641, CALLDATANV = 641,
BANG = 642, CALLDATAINNV = 642,
DASH = 643, PATCH = 643,
TILDE = 644, SAMPLE = 644,
PLUS = 645, BUFFER = 645,
STAR = 646, NONUNIFORM = 646,
SLASH = 647, COHERENT = 647,
PERCENT = 648, VOLATILE = 648,
LEFT_ANGLE = 649, RESTRICT = 649,
RIGHT_ANGLE = 650, READONLY = 650,
VERTICAL_BAR = 651, WRITEONLY = 651,
CARET = 652, DEVICECOHERENT = 652,
AMPERSAND = 653, QUEUEFAMILYCOHERENT = 653,
QUESTION = 654, WORKGROUPCOHERENT = 654,
INVARIANT = 655, SUBGROUPCOHERENT = 655,
PRECISE = 656, NONPRIVATE = 656,
HIGH_PRECISION = 657, NOPERSPECTIVE = 657,
MEDIUM_PRECISION = 658, EXPLICITINTERPAMD = 658,
LOW_PRECISION = 659, PERVERTEXNV = 659,
PRECISION = 660, PERPRIMITIVENV = 660,
PACKED = 661, PERVIEWNV = 661,
RESOURCE = 662, PERTASKNV = 662,
SUPERP = 663 PRECISE = 663
}; };
#endif #endif
...@@ -459,7 +459,7 @@ extern int yydebug; ...@@ -459,7 +459,7 @@ extern int yydebug;
union YYSTYPE union YYSTYPE
{ {
#line 71 "MachineIndependent/glslang.y" /* yacc.c:1909 */ #line 96 "MachineIndependent/glslang.y" /* yacc.c:1909 */
struct { struct {
glslang::TSourceLoc loc; glslang::TSourceLoc loc;
......
#!/usr/bin/env bash #!/usr/bin/bash
if [ "$1" = 'web' ]
then
m4 -P -DGLSLANG_WEB MachineIndependent/glslang.m4 > MachineIndependent/glslang.y
elif [ "$#" -eq 0 ]
then
m4 -P MachineIndependent/glslang.m4 > MachineIndependent/glslang.y
else
echo usage:
echo $0 web
echo $0
exit
fi
bison --defines=MachineIndependent/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o MachineIndependent/glslang_tab.cpp bison --defines=MachineIndependent/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o MachineIndependent/glslang_tab.cpp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment