freedreno/ir3: don't rely on intr->num_components
authorRob Clark <robdclark@chromium.org>
Sat, 6 Jun 2020 01:25:50 +0000 (18:25 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Jun 2020 02:48:18 +0000 (02:48 +0000)
commit28a14787c07b0046d2789bb6bd483f8ff2e4317c
tree3abeb00cfc481b62373dff432b7508f137600a80
parentfce02f4020ae1a48ce02201df2895b9477ea22d2
freedreno/ir3: don't rely on intr->num_components

It is better to use `nir_intrinsic_dest_components()` which also handles
the case of intrinsics with a fixed number of dest components.

Somehow this starts showing up with a nir_serialize round-trip with
shader-cache.  But we really shouldn't have been relying on
`intr->num_components` directly.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371>
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_nir_lower_load_barycentric_at_offset.c
src/freedreno/ir3/ir3_nir_lower_load_barycentric_at_sample.c
src/freedreno/ir3/ir3_nir_lower_tess.c