anv: fix bug when using component qualifier in FS outputs
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 31 Oct 2017 10:47:57 +0000 (11:47 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 12 Dec 2017 06:24:55 +0000 (07:24 +0100)
commitba4bb0838bd5712a45c4b37cb1562cc815e6e3c1
tree0e5b367f524c4ba363a8f2ccf0af2d768ce74b70
parent0332c7484b712e56ce1a6648c5fa04c90e286c37
anv: fix bug when using component qualifier in FS outputs

We can write to the same output but in different components, like
in this example:

layout(location = 0, component = 0) out ivec2 dEQP_FragColor_0;
layout(location = 0, component = 2) out ivec2 dEQP_FragColor_1;

Therefore, they are not two different outputs but only one.

Fixes:

dEQP-VK.glsl.440.linkage.varying.component.frag_out.*

v3:
- Remove FRAG_RESULT_MAX.
- Add const and use sizeof (Ian).
- Do three-pass to set properly the locations of fragment
  outputs when having arrays (Jason).

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_pipeline.c