glsl: Initialize source_chan in opt_copy_propagation_elements.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 28 Aug 2014 22:33:56 +0000 (15:33 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 4 Sep 2014 00:25:56 +0000 (17:25 -0700)
commit5ced83ee1561553d9eba831fa356bf63cc214447
treecc53c0d3ddbcc01d5f338dc7b3c68b2b1ab1b7ba
parent8270b048cf23ee8a8d5377a3af62fce7086e9c61
glsl: Initialize source_chan in opt_copy_propagation_elements.

Previously, if chans < 4, we passed uninitialized stack garbage to the
ir_swizzle constructor for the excess components.  Thankfully, it
ignores that data, as it's unnecessary, so no harm actually comes of it.

However, it's obviously better to initialize it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/opt_copy_propagation_elements.cpp