freedreno/ir3: assign varying locations later
authorRob Clark <robclark@freedesktop.org>
Thu, 26 Nov 2015 17:26:53 +0000 (12:26 -0500)
committerRob Clark <robclark@freedesktop.org>
Thu, 26 Nov 2015 17:35:10 +0000 (12:35 -0500)
commit57fc0dd8d5610a0a25cece53b172b0c992421db0
tree6497707616d1da01502439ac8cb0f81f531f4468
parent2181f2cd58f2af1e216618fc6889e23697cec325
freedreno/ir3: assign varying locations later

Rather than assigning inloc up front, when we don't yet know if it will
be unused, assign it last thing before the legalize pass.

Also, realize when inputs are unused (since for frag shader's we can't
rely on them being removed from ir->inputs[]).  This doesn't make sense
if we don't also dynamically assign the inloc's, since we could end up
telling the hw the wrong # of varyings (since we currently assume that
the # of varyings and max-inloc are related..)

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_program.c
src/gallium/drivers/freedreno/a4xx/fd4_program.c
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/ir3/ir3_shader.h