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>
int swizzle_chan[4];
ir_dereference_variable *deref_var;
ir_variable *source[4] = {NULL, NULL, NULL, NULL};
- int source_chan[4];
+ int source_chan[4] = {0, 0, 0, 0};
int chans;
if (!*ir)