Fix #1879: Check for valid variable before checking for unsized arrays.
The order of error checking was not quite being correct (maybe there is no correct ordering, when many checks must be done and they affect each other). So, check for block-name reuse twice.
This commit is contained in:
@@ -47,4 +47,5 @@ void barWxyz()
|
||||
int primitiveID()
|
||||
{
|
||||
return gl_PrimitiveID;
|
||||
gl_PerFragment; // ERROR, block name can't get reused
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ ERROR: 0:4: 'redeclaration' : cannot redeclare with different qualification: gl_
|
||||
ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
|
||||
ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord
|
||||
ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
|
||||
ERROR: 4 compilation errors. No code generated.
|
||||
ERROR: 0:50: 'gl_PerFragment' : cannot be used (maybe an instance name is needed)
|
||||
ERROR: 0:50: 'gl_PerFragment' : undeclared identifier
|
||||
ERROR: 6 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 150
|
||||
@@ -106,6 +108,7 @@ ERROR: node is still EOpNull!
|
||||
0:49 Sequence
|
||||
0:49 Branch: Return with expression
|
||||
0:49 'gl_PrimitiveID' ( flat in int PrimitiveID)
|
||||
0:50 'gl_PerFragment' ( temp float)
|
||||
0:? Linker Objects
|
||||
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
|
||||
0:? 'foo' ( smooth in 4-component vector of float)
|
||||
|
||||
Reference in New Issue
Block a user