glsl: Consolidate duplicate copies of constant folding.

We could probably clean this up more (maybe make it a method), but at
least there's only one copy of this code now, and that's a start.

No change in shader-db.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Kenneth Graunke
2016-04-29 14:40:26 -07:00
parent 3bf27a9a00
commit 329fe93210
3 changed files with 19 additions and 32 deletions

View File

@@ -73,6 +73,8 @@ bool do_common_optimization(exec_list *ir, bool linked,
const struct gl_shader_compiler_options *options,
bool native_integers);
bool ir_constant_fold(ir_rvalue **rvalue);
bool do_rebalance_tree(exec_list *instructions);
bool do_algebraic(exec_list *instructions, bool native_integers,
const struct gl_shader_compiler_options *options);