glsl/tests: Verify fragment shader built-ins generated by _mesa_glsl_initialize_variables
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 3 Oct 2013 22:14:35 +0000 (15:14 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 22 Oct 2013 22:23:30 +0000 (15:23 -0700)
commitf094a0f825abd261109ee566a760089dd4da64e6
tree067cc33369111db54bcb4497e9199a306d698605
parentd05202900bcbe2d0bb8dabcbb3048f3a31b82bbd
glsl/tests: Verify fragment shader built-ins generated by _mesa_glsl_initialize_variables

Checks that the variables generated meet certain criteria.

 - Fragment shader inputs have an explicit location.

 - Fragment shader outputs have an explicit location.

 - Vertex / geometry shader-only varying locations are not used.

 - Fragment shader uniforms and system values don't have an explicit
   location.

 - Fragment shader constants don't have an explicit location and are
   read-only.

 - No other kinds of fragment variables exist.

It does not verify that an specific variables exist.

v2: Use _mesa_varying_slot_in_fs in
fragment_builtin.inputs_have_explicit_location.  Suggested by Paul.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/tests/builtin_variable_test.cpp