aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 5ed2165b014..bcceb3ccb52 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1069,9 +1069,14 @@ ntq_emit_alu(struct vc4_compile *c, nir_alu_instr *instr)
case nir_op_fsign:
*dest = ntq_fsign(c, src[0]);
break;
+
case nir_op_fabs:
*dest = qir_FMAXABS(c, src[0], src[0]);
break;
+ case nir_op_iabs:
+ *dest = qir_MAX(c, src[0],
+ qir_SUB(c, qir_uniform_ui(c, 0), src[0]));
+ break;
default:
fprintf(stderr, "unknown NIR ALU inst: ");