diff options
author | Rob Clark <[email protected]> | 2018-03-28 08:32:10 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-04-03 06:08:56 -0400 |
commit | 51888bf07dd2f9942708f9a265b18a129ee625f1 (patch) | |
tree | 980aa77e4a11fc7360cb734cd252a62fa13c8787 /src/gallium/drivers/freedreno | |
parent | 91f9450b3222469d93c270b8ca5fb4bf2ef584f2 (diff) |
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index 3d3c85dd03b..174141b7fec 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -2044,11 +2044,7 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) int idx, comp; if (info->has_dest) { - unsigned n; - if (info->dest_components) - n = info->dest_components; - else - n = intr->num_components; + unsigned n = nir_intrinsic_dest_components(intr); dst = get_dst(ctx, &intr->dest, n); } else { dst = NULL; |