Adds NIR ALU operations:
* nir_op_imov
* nir_op_fmov
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
void
vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
{
+ vec4_instruction *inst;
+
dst_reg dst = get_nir_dest(instr->dest.dest,
nir_op_infos[instr->op].output_type);
dst.writemask = instr->dest.write_mask;
op[i].abs = instr->src[i].abs;
op[i].negate = instr->src[i].negate;
}
+
+ switch (instr->op) {
+ case nir_op_imov:
+ case nir_op_fmov:
+ inst = emit(MOV(dst, op[0]));
+ inst->saturate = instr->dest.saturate;
+ break;
+
+ default:
+ unreachable("Unimplemented ALU operation");
+ }
}
void