nir/cse: fix bug with comparing non-per-component sources
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 14 Apr 2015 19:44:24 +0000 (15:44 -0400)
committerConnor Abbott <cwabbott0@gmail.com>
Tue, 14 Apr 2015 23:07:44 +0000 (19:07 -0400)
commit47a1b4841d39fc358fc5ab67dc129a02419fba8d
tree14a187054f604b1163d9247ae27c007036cbe3d1
parentb069f9eafd945a86be633d8fff4e715fc6d7ec2d
nir/cse: fix bug with comparing non-per-component sources

We weren't comparing the right number of components when checking
swizzles. Use nir_ssa_alu_instr_num_src_components() to do the right
thing.

No piglit regressions, and no fixes either.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_opt_cse.c