Commit e3933d68 by John Kessenich

Front-end: Implement GL_OES_gpu_shader5.

parent ace4c45a
...@@ -30,11 +30,11 @@ void main() ...@@ -30,11 +30,11 @@ void main()
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2); iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i)); iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(0.5));
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i)); // ERROR, offset not constant
} }
out vec4 outp; out vec4 outp;
void foo23() void foo23()
{ {
const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16)); const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
...@@ -193,3 +193,32 @@ void foo_GS() ...@@ -193,3 +193,32 @@ void foo_GS()
highp int l = gl_Layer; highp int l = gl_Layer;
highp int p = gl_PrimitiveID; highp int p = gl_PrimitiveID;
} }
in vec2 inf, ing;
uniform ivec2 offsets[4];
uniform sampler2D sArray[4];
uniform int sIndex;
layout(binding = 0) uniform atomic_uint auArray[2];
uniform ubName { int i; } ubInst[4];
buffer bbName { int i; } bbInst[4];
uniform writeonly image2D iArray[5];
const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
void pfooBad()
{
precise vec2 h; // ERROR reserved
h = fma(inf, ing, h); // ERROR, not available
textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf)); // ERROR, offset not constant
textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); // ERROR, not available
}
#extension GL_OES_gpu_shader5 : enable
void pfoo()
{
precise vec2 h;
h = fma(inf, ing, h);
textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
}
...@@ -139,3 +139,45 @@ centroid out cmo { // ERROR, no centroid on a block ...@@ -139,3 +139,45 @@ centroid out cmo { // ERROR, no centroid on a block
invariant out imo { // ERROR, no invariant on a block invariant out imo { // ERROR, no invariant on a block
int i; int i;
} imon; } imon;
in vec2 inf, ing;
uniform ivec2 offsets[4];
uniform sampler2D sArray[4];
uniform int sIndex;
layout(binding = 0) uniform atomic_uint auArray[2];
uniform ubName { int i; } ubInst[4];
buffer bbName { int i; } bbInst[4];
uniform writeonly image2D iArray[5];
const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
void pfooBad()
{
precise vec2 h; // ERROR reserved
h = fma(inf, ing, h); // ERROR, not available
sArray[sIndex + 1]; // ERRRO, not supported
auArray[sIndex + 1];
ubInst[1];
bbInst[2];
ubInst[sIndex + 1]; // ERRRO, not supported
bbInst[sIndex]; // ERRRO, not supported
iArray[2];
iArray[sIndex * 2]; // ERRRO, not supported
textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf)); // ERROR, offset not constant
textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); // ERROR, not available
}
#extension GL_OES_gpu_shader5 : enable
void pfoo()
{
precise vec2 h;
h = fma(inf, ing, h);
sArray[sIndex + 1];
ubInst[sIndex + 1];
bbInst[sIndex - 2]; // ERROR, still not supported
iArray[2];
iArray[sIndex - 2];
textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
}
...@@ -10,7 +10,7 @@ ERROR: 0:63: 'texel offset' : argument must be compile-time constant ...@@ -10,7 +10,7 @@ ERROR: 0:63: 'texel offset' : argument must be compile-time constant
ERROR: 0:64: 'texel offset' : argument must be compile-time constant ERROR: 0:64: 'texel offset' : argument must be compile-time constant
ERROR: 0:66: 'texel offset' : argument must be compile-time constant ERROR: 0:66: 'texel offset' : argument must be compile-time constant
ERROR: 0:68: 'texel offset' : argument must be compile-time constant ERROR: 0:68: 'texel offset' : argument must be compile-time constant
ERROR: 0:69: 'variable indexing sampler array' : not supported with this profile: es ERROR: 0:69: 'variable indexing sampler array' : not supported for this version or the enabled extensions
ERROR: 0:73: 'texel offset' : argument must be compile-time constant ERROR: 0:73: 'texel offset' : argument must be compile-time constant
ERROR: 0:83: 'double' : Reserved word. ERROR: 0:83: 'double' : Reserved word.
ERROR: 0:83: 'double' : not supported with this profile: es ERROR: 0:83: 'double' : not supported with this profile: es
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
ERROR: 0:10: '' : cannot nest a structure definition inside a structure or block ERROR: 0:10: '' : cannot nest a structure definition inside a structure or block
ERROR: 0:21: '' : cannot nest a structure definition inside a structure or block ERROR: 0:21: '' : cannot nest a structure definition inside a structure or block
ERROR: 0:20: 'sampler' : member of block cannot be a sampler type ERROR: 0:20: 'sampler' : member of block cannot be a sampler type
ERROR: 0:45: 'variable indexing block array' : not supported with this profile: es ERROR: 0:45: 'variable indexing uniform block array' : not supported for this version or the enabled extensions
ERROR: 4 compilation errors. No code generated. ERROR: 4 compilation errors. No code generated.
......
...@@ -31,7 +31,9 @@ ERROR: 0:80: '' : array size required ...@@ -31,7 +31,9 @@ ERROR: 0:80: '' : array size required
ERROR: 0:86: 'location' : overlapping use of location 4 ERROR: 0:86: 'location' : overlapping use of location 4
ERROR: 0:90: 'location' : overlapping use of location 4 ERROR: 0:90: 'location' : overlapping use of location 4
ERROR: 0:94: 'precise' : Reserved word. ERROR: 0:94: 'precise' : Reserved word.
ERROR: 0:95: 'fma' : no matching overloaded function found ERROR: 0:95: 'fma' : required extension not requested: Possible extensions include:
GL_EXT_gpu_shader5
GL_OES_gpu_shader5
ERROR: 0:104: 'sample' : Reserved word. ERROR: 0:104: 'sample' : Reserved word.
ERROR: 0:106: 'vertices' : can only apply to a standalone qualifier ERROR: 0:106: 'vertices' : can only apply to a standalone qualifier
ERROR: 0:107: 'vertices' : inconsistent output number of vertices for array size of misSized ERROR: 0:107: 'vertices' : inconsistent output number of vertices for array size of misSized
...@@ -188,8 +190,10 @@ ERROR: node is still EOpNull! ...@@ -188,8 +190,10 @@ ERROR: node is still EOpNull!
0:? Sequence 0:? Sequence
0:95 move second child to first child (temp highp float) 0:95 move second child to first child (temp highp float)
0:95 'd' (temp highp float) 0:95 'd' (temp highp float)
0:95 Constant: 0:95 Function Call: fma(f1;f1;f1; (global highp float)
0:95 0.000000 0:95 'd' (temp highp float)
0:95 'd' (temp highp float)
0:95 'd' (temp highp float)
0:112 Function Definition: pointSize2( (global void) 0:112 Function Definition: pointSize2( (global void)
0:112 Function Parameters: 0:112 Function Parameters:
0:114 Sequence 0:114 Sequence
...@@ -390,8 +394,10 @@ ERROR: node is still EOpNull! ...@@ -390,8 +394,10 @@ ERROR: node is still EOpNull!
0:? Sequence 0:? Sequence
0:95 move second child to first child (temp highp float) 0:95 move second child to first child (temp highp float)
0:95 'd' (temp highp float) 0:95 'd' (temp highp float)
0:95 Constant: 0:95 Function Call: fma(f1;f1;f1; (global highp float)
0:95 0.000000 0:95 'd' (temp highp float)
0:95 'd' (temp highp float)
0:95 'd' (temp highp float)
0:112 Function Definition: pointSize2( (global void) 0:112 Function Definition: pointSize2( (global void)
0:112 Function Parameters: 0:112 Function Parameters:
0:114 Sequence 0:114 Sequence
......
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
WARNING: 0:5: '#extension' : extension is only partially supported: GL_EXT_gpu_shader5
WARNING: 0:6: '#extension' : extension not supported: GL_EXT_shader_texture_image_samples WARNING: 0:6: '#extension' : extension not supported: GL_EXT_shader_texture_image_samples
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
#version 310 es #version 310 es
#line 1 2 #line 1 2
#pragma something #pragma something
void main(){ } void main(){ }
#line 300 #line 300
#line 2 #line 2
#line 10 #line 10
#line 2 #line 2
#line 0 #line 0
#line 4 #line 4
#line 8 #line 8
void main(){ void main(){
gl_Position = vec4(10); gl_Position = vec4(10);
} }
#line 8 4 #line 8 4
#line 12 3 #line 12 3
#line 1 #line 1
...@@ -493,19 +493,24 @@ void TBuiltIns::initialize(int version, EProfile profile) ...@@ -493,19 +493,24 @@ void TBuiltIns::initialize(int version, EProfile profile)
"\n"); "\n");
} }
if (profile != EEsProfile && version >= 400) { if ((profile != EEsProfile && version >= 400) ||
(profile == EEsProfile && version >= 310)) { // GL_OES_gpu_shader5
commonBuiltins.append( commonBuiltins.append(
"float fma(float, float, float );" "float fma(float, float, float );"
"vec2 fma(vec2, vec2, vec2 );" "vec2 fma(vec2, vec2, vec2 );"
"vec3 fma(vec3, vec3, vec3 );" "vec3 fma(vec3, vec3, vec3 );"
"vec4 fma(vec4, vec4, vec4 );" "vec4 fma(vec4, vec4, vec4 );"
"double fma(double, double, double);"
"dvec2 fma(dvec2, dvec2, dvec2 );"
"dvec3 fma(dvec3, dvec3, dvec3 );"
"dvec4 fma(dvec4, dvec4, dvec4 );"
"\n"); "\n");
if (profile != EEsProfile) {
commonBuiltins.append(
"double fma(double, double, double);"
"dvec2 fma(dvec2, dvec2, dvec2 );"
"dvec3 fma(dvec3, dvec3, dvec3 );"
"dvec4 fma(dvec4, dvec4, dvec4 );"
"\n");
}
} }
if ((profile == EEsProfile && version >= 310) || if ((profile == EEsProfile && version >= 310) ||
...@@ -2221,9 +2226,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers ...@@ -2221,9 +2226,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers
for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets
if (profile == EEsProfile && offset == 2)
continue;
for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument
if (comp > 0 && sampler.shadow) if (comp > 0 && sampler.shadow)
...@@ -2802,8 +2804,11 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb ...@@ -2802,8 +2804,11 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
// //
// N.B.: a symbol should only be tagged once, and this function is called multiple times, once // N.B.: a symbol should only be tagged once, and this function is called multiple times, once
// per stage that's used for this profile. So, stick common ones in the fragment stage to // per stage that's used for this profile. So
// ensure they are tagged exactly once. // - generally, stick common ones in the fragment stage to ensure they are tagged exactly once
// - for ES, which has different precisions for different stages, the coarsest-grained tagging
// for a built-in used in many stages needs to be once for the fragment stage and once for
// the vertex stage
switch(language) { switch(language) {
case EShLangVertex: case EShLangVertex:
...@@ -2822,6 +2827,15 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb ...@@ -2822,6 +2827,15 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
BuiltInVariable("gl_MultiTexCoord7", EbvMultiTexCoord7, symbolTable); BuiltInVariable("gl_MultiTexCoord7", EbvMultiTexCoord7, symbolTable);
BuiltInVariable("gl_FogCoord", EbvFogFragCoord, symbolTable); BuiltInVariable("gl_FogCoord", EbvFogFragCoord, symbolTable);
if (profile == EEsProfile) {
symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
if (version >= 310)
symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5);
}
// Fall through // Fall through
case EShLangTessControl: case EShLangTessControl:
...@@ -2931,15 +2945,21 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb ...@@ -2931,15 +2945,21 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
// built-in functions // built-in functions
if (version == 100) {
symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_OES_standard_derivatives);
symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_OES_standard_derivatives);
symbolTable.setFunctionExtensions("fwidth", 1, &E_GL_OES_standard_derivatives);
}
if (profile == EEsProfile) { if (profile == EEsProfile) {
symbolTable.setFunctionExtensions("texture2DLodEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DLodEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("texture2DProjLodEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjLodEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("textureCubeLodEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeLodEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
if (version == 100) {
symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_OES_standard_derivatives);
symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_OES_standard_derivatives);
symbolTable.setFunctionExtensions("fwidth", 1, &E_GL_OES_standard_derivatives);
}
if (version >= 310)
symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5);
} else if (version < 130) { } else if (version < 130) {
symbolTable.setFunctionExtensions("texture1DLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture1DLod", 1, &E_GL_ARB_shader_texture_lod);
symbolTable.setFunctionExtensions("texture2DLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DLod", 1, &E_GL_ARB_shader_texture_lod);
...@@ -2973,12 +2993,6 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb ...@@ -2973,12 +2993,6 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
symbolTable.setFunctionExtensions("shadow2DRectProjGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow2DRectProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
} }
if (profile == EEsProfile) {
symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod);
symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod);
}
// E_GL_ARB_shader_image_load_store // E_GL_ARB_shader_image_load_store
if (profile != EEsProfile && version < 420) if (profile != EEsProfile && version < 420)
symbolTable.setFunctionExtensions("memoryBarrier", 1, &E_GL_ARB_shader_image_load_store); symbolTable.setFunctionExtensions("memoryBarrier", 1, &E_GL_ARB_shader_image_load_store);
......
...@@ -505,13 +505,19 @@ TIntermTyped* TParseContext::handleBracketDereference(TSourceLoc loc, TIntermTyp ...@@ -505,13 +505,19 @@ TIntermTyped* TParseContext::handleBracketDereference(TSourceLoc loc, TIntermTyp
else else
error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable"); error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
} }
if (base->getBasicType() == EbtBlock) if (base->getBasicType() == EbtBlock) {
requireProfile(base->getLoc(), ~EEsProfile, "variable indexing block array"); if (base->getQualifier().storage == EvqBuffer)
else if (language == EShLangFragment && base->getQualifier().isPipeOutput()) requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array");
else if (base->getQualifier().storage == EvqUniform)
profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "variable indexing uniform block array");
else
requireProfile(base->getLoc(), ~EEsProfile, "variable indexing in/out block array");
} else if (language == EShLangFragment && base->getQualifier().isPipeOutput())
requireProfile(base->getLoc(), ~EEsProfile, "variable indexing fragment shader ouput array"); requireProfile(base->getLoc(), ~EEsProfile, "variable indexing fragment shader ouput array");
else if (base->getBasicType() == EbtSampler && version >= 130) { else if (base->getBasicType() == EbtSampler && version >= 130) {
const char* explanation = "variable indexing sampler array"; const char* explanation = "variable indexing sampler array";
requireProfile(base->getLoc(), ECoreProfile | ECompatibilityProfile, explanation); requireProfile(base->getLoc(), EEsProfile | ECoreProfile | ECompatibilityProfile, explanation);
profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, explanation);
profileRequires(base->getLoc(), ECoreProfile | ECompatibilityProfile, 400, nullptr, explanation); profileRequires(base->getLoc(), ECoreProfile | ECompatibilityProfile, 400, nullptr, explanation);
} }
...@@ -1332,6 +1338,9 @@ void TParseContext::nonOpBuiltInCheck(TSourceLoc loc, const TFunction& fnCandida ...@@ -1332,6 +1338,9 @@ void TParseContext::nonOpBuiltInCheck(TSourceLoc loc, const TFunction& fnCandida
profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature); profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature);
else else
profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature); profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2;
if (! callNode.getSequence()[offsetArg]->getAsConstantUnion())
profileRequires(loc, EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument");
if (! fnCandidate[0].type->getSampler().shadow) if (! fnCandidate[0].type->getSampler().shadow)
compArg = 3; compArg = 3;
} else if (fnCandidate.getName().compare("textureGatherOffsets") == 0) { } else if (fnCandidate.getName().compare("textureGatherOffsets") == 0) {
......
...@@ -941,12 +941,14 @@ int TScanContext::tokenizeIdentifier() ...@@ -941,12 +941,14 @@ int TScanContext::tokenizeIdentifier()
return keyword; return keyword;
case PRECISE: case PRECISE:
if (parseContext.profile == EEsProfile && parseContext.version >= 310) if ((parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5)) ||
(parseContext.profile != EEsProfile && parseContext.version >= 400))
return keyword;
if (parseContext.profile == EEsProfile && parseContext.version == 310) {
reservedWord(); reservedWord();
else if (parseContext.profile == EEsProfile || return keyword;
(parseContext.profile != EEsProfile && parseContext.version < 400)) }
return identifierOrType(); return identifierOrType();
return keyword;
case INVARIANT: case INVARIANT:
if (parseContext.profile != EEsProfile && parseContext.version < 120) if (parseContext.profile != EEsProfile && parseContext.version < 120)
......
...@@ -200,7 +200,7 @@ public: ...@@ -200,7 +200,7 @@ public:
TSymbol(name), TSymbol(name),
mangledName(*name + '('), mangledName(*name + '('),
op(tOp), op(tOp),
defined(false), prototyped(false) { returnType.shallowCopy(retType); } defined(false), prototyped(false) { returnType.shallowCopy(retType); }
virtual TFunction* clone() const; virtual TFunction* clone() const;
virtual ~TFunction(); virtual ~TFunction();
...@@ -486,8 +486,8 @@ public: ...@@ -486,8 +486,8 @@ public:
// //
protected: protected:
static const int globalLevel = 3; static const int globalLevel = 3;
bool isSharedLevel(int level) { return level <= 1; } // exclude all per-compile levels bool isSharedLevel(int level) { return level <= 1; } // exclude all per-compile levels
bool isBuiltInLevel(int level) { return level <= 2; } // exclude user globals bool isBuiltInLevel(int level) { return level <= 2; } // exclude user globals
bool isGlobalLevel(int level) { return level <= globalLevel; } // include user globals bool isGlobalLevel(int level) { return level <= globalLevel; } // include user globals
public: public:
bool isEmpty() { return table.size() == 0; } bool isEmpty() { return table.size() == 0; }
......
...@@ -183,7 +183,7 @@ void TParseContext::initializeExtensionBehavior() ...@@ -183,7 +183,7 @@ void TParseContext::initializeExtensionBehavior()
extensionBehavior[E_GL_OES_texture_storage_multisample_2d_array] = EBhDisablePartial; extensionBehavior[E_GL_OES_texture_storage_multisample_2d_array] = EBhDisablePartial;
extensionBehavior[E_GL_EXT_geometry_shader] = EBhDisable; extensionBehavior[E_GL_EXT_geometry_shader] = EBhDisable;
extensionBehavior[E_GL_EXT_geometry_point_size] = EBhDisable; extensionBehavior[E_GL_EXT_geometry_point_size] = EBhDisable;
extensionBehavior[E_GL_EXT_gpu_shader5] = EBhDisablePartial; extensionBehavior[E_GL_EXT_gpu_shader5] = EBhDisable;
extensionBehavior[E_GL_EXT_primitive_bounding_box] = EBhDisablePartial; extensionBehavior[E_GL_EXT_primitive_bounding_box] = EBhDisablePartial;
extensionBehavior[E_GL_EXT_shader_io_blocks] = EBhDisable; extensionBehavior[E_GL_EXT_shader_io_blocks] = EBhDisable;
extensionBehavior[E_GL_EXT_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_EXT_tessellation_shader] = EBhDisable;
...@@ -194,7 +194,7 @@ void TParseContext::initializeExtensionBehavior() ...@@ -194,7 +194,7 @@ void TParseContext::initializeExtensionBehavior()
// OES matching AEP // OES matching AEP
extensionBehavior[E_GL_OES_geometry_shader] = EBhDisable; extensionBehavior[E_GL_OES_geometry_shader] = EBhDisable;
extensionBehavior[E_GL_OES_geometry_point_size] = EBhDisable; extensionBehavior[E_GL_OES_geometry_point_size] = EBhDisable;
extensionBehavior[E_GL_OES_gpu_shader5] = EBhDisablePartial; extensionBehavior[E_GL_OES_gpu_shader5] = EBhDisable;
extensionBehavior[E_GL_OES_primitive_bounding_box] = EBhDisablePartial; extensionBehavior[E_GL_OES_primitive_bounding_box] = EBhDisablePartial;
extensionBehavior[E_GL_OES_shader_io_blocks] = EBhDisable; extensionBehavior[E_GL_OES_shader_io_blocks] = EBhDisable;
extensionBehavior[E_GL_OES_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_OES_tessellation_shader] = EBhDisable;
......
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