summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_noop_swizzle.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-12-18 15:24:39 -0800
committerPaul Berry <[email protected]>2013-01-08 09:09:21 -0800
commit18720555dd2da779ad6907e8f6aa083e7b4d1841 (patch)
treeb1db9eaffc0fe79d750877208ec49886b5af32e4 /src/glsl/opt_noop_swizzle.cpp
parentc33be485c58dace2a691042703f50cc6defe960d (diff)
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 <[email protected]>
Diffstat (limited to 'src/glsl/opt_noop_swizzle.cpp')
0 files changed, 0 insertions, 0 deletions