nir+drivers: add helpers to get # of src/dest components
authorRob Clark <robdclark@gmail.com>
Wed, 28 Mar 2018 12:32:10 +0000 (08:32 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 3 Apr 2018 10:08:56 +0000 (06:08 -0400)
commit51888bf07dd2f9942708f9a265b18a129ee625f1
tree980aa77e4a11fc7360cb734cd252a62fa13c8787
parent91f9450b3222469d93c270b8ca5fb4bf2ef584f2
nir+drivers: add helpers to get # of src/dest components

Add helpers to get the number of src/dest components for an intrinsic,
and update spots that were open-coding this logic to use the helpers
instead.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_copy_propagate.c
src/compiler/nir/nir_validate.c
src/compiler/spirv/spirv_to_nir.c
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/intel/compiler/brw_fs_nir.cpp