glsl: add varyings to resource list only with SSO
authorTapani Pälli <tapani.palli@intel.com>
Wed, 7 Oct 2015 07:04:06 +0000 (10:04 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 8 Oct 2015 04:43:11 +0000 (07:43 +0300)
commit4e7fd66cf0986a7eb58800f52d0b8709c2f997d6
tree64b3b10d314267ec93562aad5fdf25d65a80f2ab
parent6ad9ebb073fc4ed245ef8e9db4479a52e818cb92
glsl: add varyings to resource list only with SSO

Varyings can be considered inputs or outputs of a program only when
SSO is in use. With multi-stage programs, inputs contain only inputs
for first stage and outputs contains outputs of the final shader stage.

I've tested that fix works for Assault Android Cactus (demo version)
and does not cause Piglit or CTS regressions in glGetProgramiv tests.

Following ES 3.1 CTS separate shader tests that do query properties
of varyings in SSO shader programs pass:

   ES31-CTS.program_interface_query.separate-programs-vertex
   ES31-CTS.program_interface_query.separate-programs-fragment

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92122
src/glsl/linker.cpp