nir_intrinsic_instr_create(b->shader, intrinsic_op);
if (opcode == SpvOpEmitStreamVertex || opcode == SpvOpEndStreamPrimitive)
- intrin->const_index[0] = w[1];
+ nir_intrinsic_set_stream_id(intrin, w[1]);
nir_builder_instr_insert(&b->nb, &intrin->instr);
}
intrin->num_components, NULL);
inout->def = &intrin->dest.ssa;
} else {
- intrin->const_index[0] = (1 << intrin->num_components) - 1;
+ nir_intrinsic_set_write_mask(intrin, (1 << intrin->num_components) - 1);
intrin->src[0] = nir_src_for_ssa(inout->def);
}
int src = 0;
if (!load) {
- instr->const_index[0] = (1 << instr->num_components) - 1; /* write mask */
+ nir_intrinsic_set_write_mask(instr, (1 << instr->num_components) - 1);
instr->src[src++] = nir_src_for_ssa((*inout)->def);
}
* constant block for now.
*/
if (op == nir_intrinsic_load_push_constant) {
- instr->const_index[0] = 0;
- instr->const_index[1] = 128;
+ nir_intrinsic_set_base(instr, 0);
+ nir_intrinsic_set_range(instr, 128);
}
if (index)