glsl: Only force varyings to be flat when varying packing.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 31 Aug 2016 05:51:25 +0000 (22:51 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 1 Sep 2016 18:24:17 +0000 (11:24 -0700)
commit9c562956f97cbb0698c0dc232eb594e7018a6c08
treedbda4df3781b171004cd8cd314b52b28458a1975
parent72b56e8b1ae34b4c10f822b704521ccd463270b3
glsl: Only force varyings to be flat when varying packing.

Varying packing would like to mark certain variables as flat.
This works as long as both sides of the interfaces are changed
accordingly.  However, with SSO, we disable varying packing on
the outermost stages.  We also disable varying packing for
certain tessellation stages.

With SSO, we operate on the producer and consumer separately.
Checks based on the consumer stage and variable are risky, and
can easily lead to altering one half of the interface between
stages, breaking SSO pipeline IO validation.

Just stop monkeying around with interpolation modes unless
required for varying packing.  There's no point.  This also
disables it in unsafe SSO cases.

Fixes CTS tests:
*.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_MaxPatchVertices_Position_PointSize

Also fixes Piglit's spec/oes_geometry_shader/sso_validation:
- user-defined-gs-input-not-in-block.shader_test
- user-defined-gs-input-in-block.shader_test

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/link_varyings.cpp