return true;
}
+static bool ppir_lower_abs(ppir_block *block, ppir_node *node)
+{
+ /* Turn it into a mov and set the absolute modifier */
+ ppir_alu_node *alu = ppir_node_to_alu(node);
+
+ assert(alu->num_src == 1);
+
+ alu->src[0].absolute = true;
+ alu->src[0].negate = false;
+ node->op = ppir_op_mov;
+
+ return true;
+}
+
static bool ppir_lower_branch(ppir_block *block, ppir_node *node)
{
ppir_branch_node *branch = ppir_node_to_branch(node);
}
static bool (*ppir_lower_funcs[ppir_op_num])(ppir_block *, ppir_node *) = {
+ [ppir_op_abs] = ppir_lower_abs,
[ppir_op_const] = ppir_lower_const,
[ppir_op_dot2] = ppir_lower_dot,
[ppir_op_dot3] = ppir_lower_dot,
[nir_op_mov] = ppir_op_mov,
[nir_op_fmul] = ppir_op_mul,
+ [nir_op_fabs] = ppir_op_abs,
[nir_op_fadd] = ppir_op_add,
[nir_op_fdot2] = ppir_op_dot2,
[nir_op_fdot3] = ppir_op_dot3,