nir/linker: use nir_gather_xfb_info
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 7 Nov 2018 09:11:20 +0000 (10:11 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 8 Mar 2019 14:00:50 +0000 (15:00 +0100)
commit7c0f411c27d57861be07add717b8e9bda86569e4
tree9bad0f1888596a30ec2a54d1a657586d9f593758
parentb2a212ac2edfd326e6b4faa011bf08dc301a6a47
nir/linker: use nir_gather_xfb_info

Instead of a custom ARB_gl_spirv xfb gather info pass.

In fact, this is not only about reusing code, but the current custom
code was not handling properly how many varyings are enumerated from
some complex types. So this change is also about fixing some corner
cases.

v2: Use util_bitcount, simplify current stage check (Kenneth)

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/gl_nir_link_xfb.c