glsl2: Add a pass to convert exp and log to exp2 and log2.
authorEric Anholt <eric@anholt.net>
Thu, 5 Aug 2010 22:22:05 +0000 (15:22 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 5 Aug 2010 22:34:00 +0000 (15:34 -0700)
commitbc4034b243975089c06c4415d4e26edaaaec7a46
treec6a3ae69c5b02f86bcd1bbc224f65eace4c49821
parent8048226b7b1bbe8fd89f9c32fa4fadca4b8760c4
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
src/glsl/Makefile
src/glsl/ir.h
src/glsl/ir_explog_to_explog2.cpp [new file with mode: 0644]
src/glsl/ir_optimization.h
src/glsl/ir_validate.cpp
src/glsl/linker.cpp
src/mesa/program/ir_to_mesa.cpp