From 9a0e421983edc31371440c08687fa2bb2207924d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 2 Jul 2010 11:27:06 -0700 Subject: glsl2: Add a pass to break ir_binop_div to _mul and _rcp. This results in constant folding of a constant divisor. --- src/glsl/ir_optimization.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/glsl/ir_optimization.h') diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index 1a8b740..6d02e59 100644 --- a/src/glsl/ir_optimization.h +++ b/src/glsl/ir_optimization.h @@ -37,6 +37,7 @@ bool do_dead_code(struct _mesa_glsl_parse_state *state, bool do_dead_code_local(exec_list *instructions); bool do_dead_code_unlinked(struct _mesa_glsl_parse_state *state, exec_list *instructions); +bool do_div_to_mul_rcp(exec_list *instructions); bool do_function_inlining(exec_list *instructions); bool do_if_simplification(exec_list *instructions); bool do_mod_to_fract(exec_list *instructions); -- cgit v1.1