Parser: Extension requirement of gl_PrimitiveID and gl_Layer should be checked only for ESSL instead of GLSL.

This commit is contained in:
Rex Xu
2015-12-07 19:07:17 +08:00
parent e00e72ded1
commit e553ace049
5 changed files with 35 additions and 2 deletions

View File

@@ -43,3 +43,8 @@ void barWxyz()
ivec4 t42 = texelFetch(ismsa, ivec3(2), samp);
uvec4 t43 = texelFetch(usmsa, p3, samp);
}
int primitiveID()
{
return gl_PrimitiveID;
}

View File

@@ -146,3 +146,8 @@ void interp()
interpolateAtCentroid(sampInArray[2].xy);
interpolateAtSample(sampInArray[2].x.x, 2);
}
int layer()
{
return gl_Layer;
}

View File

@@ -101,6 +101,11 @@ ERROR: node is still EOpNull!
0:44 'usmsa' (uniform usampler2DMSArray)
0:44 'p3' (flat in 3-component vector of int)
0:44 'samp' (flat in int)
0:47 Function Definition: primitiveID( (global int)
0:47 Function Parameters:
0:49 Sequence
0:49 Branch: Return with expression
0:49 'gl_PrimitiveID' (flat in int PrimitiveID)
0:? Linker Objects
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
@@ -216,6 +221,11 @@ ERROR: node is still EOpNull!
0:44 'usmsa' (uniform usampler2DMSArray)
0:44 'p3' (flat in 3-component vector of int)
0:44 'samp' (flat in int)
0:47 Function Definition: primitiveID( (global int)
0:47 Function Parameters:
0:49 Sequence
0:49 Branch: Return with expression
0:49 'gl_PrimitiveID' (flat in int PrimitiveID)
0:? Linker Objects
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)

View File

@@ -77,6 +77,11 @@ ERROR: node is still EOpNull!
0:147 0 (const int)
0:147 Constant:
0:147 2 (const int)
0:150 Function Definition: layer( (global int)
0:150 Function Parameters:
0:152 Sequence
0:152 Branch: Return with expression
0:152 'gl_Layer' (flat in int Layer)
0:? Linker Objects
0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
0:? 'b' (layout(location=4 component=1 ) smooth in float)
@@ -145,6 +150,11 @@ ERROR: node is still EOpNull!
0:147 0 (const int)
0:147 Constant:
0:147 2 (const int)
0:150 Function Definition: layer( (global int)
0:150 Function Parameters:
0:152 Sequence
0:152 Branch: Return with expression
0:152 'gl_Layer' (flat in int Layer)
0:? Linker Objects
0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
0:? 'b' (layout(location=4 component=1 ) smooth in float)