glsl: Compare vector indices in blocks
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 19 Jul 2011 01:51:25 +0000 (18:51 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 23 Jul 2011 08:24:18 +0000 (01:24 -0700)
commit6c8f1f483a999005cae1da5b54cc8ca1904e7ce7
tree6d5c83a0e9c780e37c85af5308d749e2cde92dca
parent90cc372400e1f5869baabd841823bbf9296d7b01
glsl: Compare vector indices in blocks

Just like the non-constant array index lowering pass, compare all N
indices at once.  For accesses to a vec4, this saves 3 comparison
instructions on a vector architecture.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/lower_vec_index_to_cond_assign.cpp