Give new scopes to non-compound (simple) if-then-else substatements, correcting scoping for declarations they contain.
Also, updated several tests and the Todo list. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22845 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -80,6 +80,7 @@ void main()
|
||||
}
|
||||
|
||||
gl_FragColor.xr; // ERROR, swizzlers not from same field space
|
||||
gl_FragColor.xyxyx.xy; // ERROR, cannot make a vec5, even temporarily
|
||||
centTexCoord.z; // ERROR, swizzler out of range
|
||||
(a,b) = true; // ERROR, not an l-value
|
||||
}
|
||||
@@ -103,4 +104,13 @@ bool gen(vec3 v)
|
||||
{
|
||||
if (abs(v[0]) < 1e-4 && abs(v[1]) < 1e-4)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void v1()
|
||||
{
|
||||
}
|
||||
|
||||
void v2()
|
||||
{
|
||||
return v1(); // ERROR, no expression allowed, even though void
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user