}
}
-static inline unsigned
-nir_alu_src_index(compiler_context *ctx, nir_alu_src *src)
-{
- return nir_src_index(ctx, &src->src);
-}
-
static inline unsigned
nir_dest_index(nir_dest *dst)
{
* instructions. The latter can only be fetched if the instruction
* needs it, or else we may segfault. */
- unsigned src0 = nir_alu_src_index(ctx, &instr->src[0]);
- unsigned src1 = nr_inputs >= 2 ? nir_alu_src_index(ctx, &instr->src[1]) : ~0;
- unsigned src2 = nr_inputs == 3 ? nir_alu_src_index(ctx, &instr->src[2]) : ~0;
+ unsigned src0 = nir_src_index(ctx, &instr->src[0].src);
+ unsigned src1 = nr_inputs >= 2 ? nir_src_index(ctx, &instr->src[1].src) : ~0;
+ unsigned src2 = nr_inputs == 3 ? nir_src_index(ctx, &instr->src[2].src) : ~0;
assert(nr_inputs <= 3);
/* Rather than use the instruction generation helpers, we do it
.type = TAG_TEXTURE_4,
.mask = mask_of(nr_components),
.dest = nir_dest_index(&instr->dest.dest),
- .src = { nir_alu_src_index(ctx, &instr->src[0]), ~0, ~0, ~0 },
+ .src = { nir_src_index(ctx, &instr->src[0].src), ~0, ~0, ~0 },
.texture = {
.op = mir_derivative_op(instr->op),
.format = MALI_TEX_2D,