auto& value_factory = shader.value_factory();
AluInstr *ir = nullptr;
auto pin = pin_for_components(alu);
- for (int i = 0; i < 4; ++i) {
+ for (unsigned i = 0; i < nir_dest_num_components(alu.dest.dest); ++i) {
ir = new AluInstr(opcode,
value_factory.dest(alu.dest, i, pin),
value_factory.zero(),
AluInstr *ir = nullptr;
auto pin = pin_for_components(alu);
- for (int i = 0; i < 4; ++i) {
+ for (unsigned i = 0; i < nir_dest_num_components(alu.dest.dest); ++i) {
ir = new AluInstr(opcode,
value_factory.dest(alu.dest.dest, i, pin),
value_factory.src(src0, i),