freedreno/ir3/ra: fix pre-color edge case
authorRob Clark <robdclark@chromium.org>
Mon, 22 Jun 2020 23:18:13 +0000 (16:18 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 25 Jun 2020 04:40:40 +0000 (04:40 +0000)
commit6da06479878a1b2d765c8fbe3c168b7ecbe86795
treefbbd5b560ddcee186233caa39cb983d2fe255320
parentc5b990f435e7145bfd8562c80a4dc1012aaa03f8
freedreno/ir3/ra: fix pre-color edge case

Fixes a case where you have something like:

   aVecOutput.z = aScalarInput;

In particular, skipping over things that are not the first component is
wrong.. in the above case the input we need to precolor is the 3rd
component.  But we need to adjust the target register according to the
offset.

Fixes android.hardware.nativehardware.cts.AHardwareBufferNativeTests

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5601>
src/freedreno/ir3/ir3_ra.c