glsl2: Add a pass to convert exp and log to exp2 and log2.

Fixes ir_to_mesa handling of unop_log, which used the weird ARB_vp LOG
opcode that doesn't do what we want.  This also lets the multiplication
coefficients in there get constant-folded, possibly.

Fixes:
glsl-fs-log
This commit is contained in:
Eric Anholt
2010-08-05 15:22:05 -07:00
parent 8048226b7b
commit bc4034b243
7 changed files with 96 additions and 7 deletions
+1
View File
@@ -1281,6 +1281,7 @@ link_shaders(struct gl_shader_program *prog)
do_mat_op_to_vec(ir);
do_mod_to_fract(ir);
do_div_to_mul_rcp(ir);
do_explog_to_explog2(ir);
do {
progress = false;