glsl: Prohibit structs and bools from being used as "varyings".
The GLSL 1.30 spec only allows vertex shader outputs and fragment
shader inputs ("varyings" in pre-GLSL-1.30 parlance) to be of type
int, uint, float, or vectors, matrices, or arrays thereof. Bools,
bvec's, and structs are prohibited. (Integral varyings were
prohibited prior to GLSL 1.30).
Previously, Mesa only performed this check on variables declared with
the "varying" keyword, and it always performed the check according to
the pre-GLSL-1.30 rules. As a result, bools and structs were allowed
to slip through, provided they were declared using the new in/out
syntax.
This patch modifies the error check so that it occurs after "varying"
is converted to "in/out", and corrects it to properly account for GLSL
version.
Fixes piglit tests:
in-bool-prohibited.frag
in-bvec2-prohibited.frag
in-bvec3-prohibited.frag
in-bvec4-prohibited.frag
in-struct-prohibited.frag
out-bool-prohibited.vert
out-bvec2-prohibited.vert
out-bvec3-prohibited.vert
out-bvec4-prohibited.vert
out-struct-prohibited.vert
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>