mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
i965/nir/vec4: Implement single-element "mov" operations
Adds NIR ALU operations: * nir_op_imov * nir_op_fmov Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
9e5d827f45
commit
79154d99d6
1 changed files with 13 additions and 0 deletions
|
|
@ -655,6 +655,8 @@ brw_swizzle_for_nir_swizzle(uint8_t swizzle[4])
|
|||
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;
|
||||
|
|
@ -667,6 +669,17 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue