Merge pull request #114 from amdrexu/bugfix2
Parser: Extension requirement of gl_PrimitiveID and gl_Layer should be checked only for ESSL instead of GLSL.
This commit is contained in:
		
						commit
						534610d815
					
				@ -43,3 +43,8 @@ void barWxyz()
 | 
			
		||||
    ivec4 t42 = texelFetch(ismsa, ivec3(2), samp);
 | 
			
		||||
    uvec4 t43 = texelFetch(usmsa, p3, samp);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int primitiveID()
 | 
			
		||||
{
 | 
			
		||||
   return gl_PrimitiveID;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -146,3 +146,8 @@ void interp()
 | 
			
		||||
    interpolateAtCentroid(sampInArray[2].xy);
 | 
			
		||||
    interpolateAtSample(sampInArray[2].x.x, 2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int layer()
 | 
			
		||||
{
 | 
			
		||||
    return gl_Layer;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
 | 
			
		||||
@ -3165,8 +3165,11 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth);
 | 
			
		||||
 | 
			
		||||
        if (profile == EEsProfile) {
 | 
			
		||||
            symbolTable.setVariableExtensions("gl_PrimitiveID",  Num_AEP_geometry_shader, AEP_geometry_shader);
 | 
			
		||||
            symbolTable.setVariableExtensions("gl_Layer",        Num_AEP_geometry_shader, AEP_geometry_shader);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (profile == EEsProfile) {
 | 
			
		||||
            symbolTable.setFunctionExtensions("imageAtomicAdd",      1, &E_GL_OES_shader_image_atomic);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user