panfrost/midgard: Use nir_dest_num_components
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 1 Jul 2019 22:28:37 +0000 (15:28 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 10 Jul 2019 13:12:03 +0000 (06:12 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index 109ed010d38b2ce7592b26b55394134ddce86916..cb3b4689c8200e9cad46db1e2de087dc6b08b80d 100644 (file)
@@ -732,7 +732,7 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
         bool is_ssa = instr->dest.dest.is_ssa;
 
         unsigned dest = nir_dest_index(ctx, &instr->dest.dest);
-        unsigned nr_components = is_ssa ? instr->dest.dest.ssa.num_components : instr->dest.dest.reg.reg->num_components;
+        unsigned nr_components = nir_dest_num_components(instr->dest.dest);
         unsigned nr_inputs = nir_op_infos[instr->op].num_inputs;
 
         /* Most Midgard ALU ops have a 1:1 correspondance to NIR ops; these are