glsl: restrict consumer stage condition to modify interpolation type
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 12 Jan 2016 14:36:56 +0000 (15:36 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 15 Jan 2016 06:06:41 +0000 (07:06 +0100)
commit781d2787bc1cf975757a95d0d9324f734fa61c09
tree3b488940e3be9b7abc0f129cc540a11bcf7e4795
parent3657cbf24f3b0baf7e3382e572d97a36b0ed4103
glsl: restrict consumer stage condition to modify interpolation type

Only modify interpolation type for integer-based varyings or when the
consumer is known and different than fragment shader.

If we are linking separate shader programs and the consumer is unknown,
the consumer could be added later and be a fragment shader. If we
modify the interpolation type in this case, we could read wrong
values in the fragment shader inputs, as shown in bug 93320.

Fixes the following CTS test:
   ES31-CTS.vertex_attrib_binding.advanced-bindingUpdate

Fixes the following dEQP tests:

dEQP-GLES31.functional.separate_shader.random.102
dEQP-GLES31.functional.separate_shader.random.111
dEQP-GLES31.functional.separate_shader.random.115
dEQP-GLES31.functional.separate_shader.random.17
dEQP-GLES31.functional.separate_shader.random.22
dEQP-GLES31.functional.separate_shader.random.23
dEQP-GLES31.functional.separate_shader.random.3
dEQP-GLES31.functional.separate_shader.random.32
dEQP-GLES31.functional.separate_shader.random.39
dEQP-GLES31.functional.separate_shader.random.64
dEQP-GLES31.functional.separate_shader.random.73
dEQP-GLES31.functional.separate_shader.random.91

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93320
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/glsl/link_varyings.cpp