pan/bi: Implement fabs, fneg as fmov with mods

Fusing will come later with the appropriate NIR support.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
This commit is contained in:
Alyssa Rosenzweig 2020-03-10 07:52:24 -04:00 committed by Marge Bot
parent 8ed79c9ed7
commit 1216a63ff2

View file

@ -267,6 +267,8 @@ bi_class_for_nir_alu(nir_op op)
return BI_MINMAX;
case nir_op_fsat:
case nir_op_fneg:
case nir_op_fabs:
case nir_op_mov:
return BI_MOV;
@ -353,6 +355,12 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr)
case nir_op_fsat:
alu.outmod = BIFROST_SAT; /* MOV */
break;
case nir_op_fneg:
alu.src_neg[0] = true; /* MOV */
break;
case nir_op_fabs:
alu.src_abs[0] = true; /* MOV */
break;
case nir_op_fmax:
case nir_op_imax:
case nir_op_umax: