aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/bifrost/bifrost_compile.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-10 07:52:24 -0400
committerMarge Bot <[email protected]>2020-03-10 19:25:59 +0000
commit1216a63ff22277fede7d7953019fc3412714a4af (patch)
treebb170c8ff60b5ba95d3239176e3eae193b786751 /src/panfrost/bifrost/bifrost_compile.c
parent8ed79c9ed756a550f98f588abb46099916401cde (diff)
pan/bi: Implement fabs, fneg as fmov with mods
Fusing will come later with the appropriate NIR support. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
Diffstat (limited to 'src/panfrost/bifrost/bifrost_compile.c')
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 8dccb16bbe6..759f650f245 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -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: