diff options
author | Eric Anholt <[email protected]> | 2010-08-09 21:22:17 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-08-09 21:41:14 -0700 |
commit | 5854d4583c6e8885185e12a0636f77489a62e24c (patch) | |
tree | 38a132c8c1d5a1f09fc4733da1584fe5dbdd47a3 /src/glsl/ir_optimization.h | |
parent | 8bebbeb7c5b26ec9166a4644a2c051238d18509b (diff) |
glsl2: Add a pass to transform ir_binop_sub to add(op0, neg(op1))
All the current HW backends transform subtract to adding the negation,
so I haven't bothered peepholing it back out in Mesa IR. This allows
some subtract of subtract to get removed in ir_algebraic.
Diffstat (limited to 'src/glsl/ir_optimization.h')
-rw-r--r-- | src/glsl/ir_optimization.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index 97a0c25216e..5997a30eab3 100644 --- a/src/glsl/ir_optimization.h +++ b/src/glsl/ir_optimization.h @@ -47,6 +47,7 @@ bool do_if_to_cond_assign(exec_list *instructions); bool do_mat_op_to_vec(exec_list *instructions); bool do_mod_to_fract(exec_list *instructions); bool do_structure_splitting(exec_list *instructions); +bool do_sub_to_add_neg(exec_list *instructions); bool do_swizzle_swizzle(exec_list *instructions); bool do_tree_grafting(exec_list *instructions); bool do_vec_index_to_cond_assign(exec_list *instructions); |