nir_intrinsic_instr_create(c->s,
nir_intrinsic_load_input);
intr_comp->num_components = 1;
- nir_intrinsic_set_base(intr_comp,
- nir_intrinsic_base(intr) * 4 + i);
+ nir_intrinsic_set_base(intr_comp, nir_intrinsic_base(intr));
+ nir_intrinsic_set_component(intr_comp, i);
intr_comp->src[0] = nir_src_for_ssa(nir_imm_int(b, 0));
nir_ssa_dest_init(&intr_comp->instr, &intr_comp->dest, 1, 32, NULL);
nir_builder_instr_insert(b, &intr_comp->instr);
}
ntq_store_dest(c, &instr->dest, 0,
c->color_reads[sample_index]);
- } else if (c->stage == QSTAGE_FRAG) {
+ } else {
offset = nir_intrinsic_base(instr) + const_offset->u32[0];
int comp = nir_intrinsic_component(instr);
ntq_store_dest(c, &instr->dest, 0,
c->inputs[offset * 4 + comp]);
- } else {
- offset = nir_intrinsic_base(instr) + const_offset->u32[0];
- ntq_store_dest(c, &instr->dest, 0,
- c->inputs[offset]);
}
break;