glsl2: Add a new pass at the IR level to break down matrix ops to vector ops.

This will be used by the Mesa IR and likely most HW backends, as it
allows other optimizations to occur that might not otherwise.

Fixes glsl-vs-mat-sub-1, glsl-vs-mat-div-1.
This commit is contained in:
Eric Anholt
2010-07-12 11:04:07 -07:00
parent 5723e5bb8b
commit 6d8a0a0aad
5 changed files with 197 additions and 0 deletions

View File

@@ -1960,6 +1960,7 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
_mesa_ast_to_hir(shader->ir, state);
/* Lowering */
do_mat_op_to_vec(shader->ir);
do_mod_to_fract(shader->ir);
do_div_to_mul_rcp(shader->ir);