freedreno/ir3: re-work shader inputs/outputs
authorRob Clark <robdclark@chromium.org>
Fri, 25 Oct 2019 22:37:56 +0000 (15:37 -0700)
committerRob Clark <robdclark@chromium.org>
Tue, 12 Nov 2019 21:57:52 +0000 (13:57 -0800)
commitbdf6b7018cedf95b554e21953d5a1935d3067ce7
treea8aa4c14268a229fb87448f10b1620e52bc20b63
parent2aae13f642b136d84c55004af0db5f411a4da61d
freedreno/ir3: re-work shader inputs/outputs

Allow inputs/outputs to be vecN (ie. whatever their actual size is), and
use split to get scalar components of inputs, and collect to gather up
scalar components of outputs.

The main motivation is to simplify RA, by only having to consider split/
collect to figure out where values need to land in consecutive scalar
registers, rather than having to also deal with left/right neighbors.

Because of varying packing, and the resulting fractional location
(location_frac), to implement load_input/store_output, it is still
convenient to have a table of scalar inputs/outputs.  We move this to
the compile ctx (since it is only needed for nir->ir3).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/freedreno/ir3/ir3.c
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_context.h
src/freedreno/ir3/ir3_group.c