glsl: Drop constant 0.0 components from dot products.
authorMatt Turner <mattst88@gmail.com>
Sat, 18 Oct 2014 03:32:58 +0000 (20:32 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 30 Oct 2014 04:35:46 +0000 (21:35 -0700)
commitd056863b3c535aeebfe5fcfc9468eb33a06ddb60
tree9718584e114426560451e5d0c075412775d83353
parent26122e09a304061e46690e1b9da2e36a527b3e2e
glsl: Drop constant 0.0 components from dot products.

Helps a small number of vertex shaders in the games Dungeon Defenders
and Shank, as well as an internal benchmark.

instructions in affected programs:     2801 -> 2719 (-2.93%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/opt_algebraic.cpp