glsl/tests: Unit test vertex shader in / out with link_invalidate_variable_locations
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 22 Oct 2013 22:10:16 +0000 (15:10 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 22 Oct 2013 22:23:30 +0000 (15:23 -0700)
commit1eee0a9f016a1049869f4677f5919186ee3785a2
treed6a7aae0ddc0498999bbba56d908b3e51b72aa8c
parentcf8b14ce6dc8e6c741005fa76cfda046e1618ea4
glsl/tests: Unit test vertex shader in / out with link_invalidate_variable_locations

Validates:

  - ir_variable::explicit_location should not be modified.

  - If ir_variable::explicit_location is not set, ir_variable::location,
    ir_variable::location_frac, and
    ir_variable::is_unmatched_generic_inout must be reset to 0.

  - If ir_variable::explicit_location is set, ir_variable::location
    should not be modified.  ir_variable::location_frac, and
    ir_variable::is_unmatched_generic_inout must be reset to 0.
    Previous unit tests have shown that all non-generic inputs / outputs
    have explicit_location set.

v2: Split the link_invalidate_variable_locations interface change out to
a separate patch.  Remove the vertex_in_builtin_without_explicit and
vertex_out_builtin_without_explicit tests.  There was a lot of good
discussion about this on the mailing list to which I refer the
interested reader.  Both changes suggested by Paul.

    http://lists.freedesktop.org/archives/mesa-dev/2013-October/046652.html

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/Makefile.am
src/glsl/tests/invalidate_locations_test.cpp [new file with mode: 0644]