Re: [Mesa-dev] [PATCH] glsl: Fix a bug where LHS swizzles of swizzles were too small.

2015-07-23 Thread Timothy Arceri
Looks right to me. However for code clarity it would probably make sense to move: m.num_components = MAX2(m.num_components, (to + 1)); to under the second update_rhs_swizzle() call as this is the only place still using it. Reviewed-by: Timothy Arceri On Wed, 2015-07-22 at 21:39 -0700, Kenneth

[Mesa-dev] [PATCH] glsl: Fix a bug where LHS swizzles of swizzles were too small.

2015-07-22 Thread Kenneth Graunke
A simple shader such as vec4 color; color.xy.x = 1.0; would cause ir_assignment::set_lhs() to generate bogus IR: (swiz xy (swiz x (constant float (1.0 We were setting the number of components of each new RHS swizzle based on the highest channel used in the LHS swizzle. So, .xy.y w