"Vectorize multiple scalar assignments" optimization (added in 4bd6e0d7c69 on master) does not take possible branches into account. For example, on a fragment shader like this: uniform sampler2D maintex; uniform float factor; varying vec2 uv; void main() { vec4 c = texture2D (maintex, uv); vec2 coord = c.xy; bool cond = c.w >= 0.5; if (!cond) coord.x += factor; if (cond) coord.y += factor; gl_FragColor = vec4(coord,0,0); } It does try to merge both coord.x and coord.y assignments into one, even if they are under different branch conditions. Effectively it ends up with "if (cond) coord.xy += ..." which is wrong. Real-life shaders like FXAA3.11 have a code very similar to the above, and it regresses under this optimization. As a simple stop-gap solution the optimization could just never go into any branch-like structures (return visit_continue_with_parent from visit_enter(ir_if) etc.
Thanks for the report. I'll try to fix this today.
Patch on the list. It fixes it for me.
New piglit test as well: http://patchwork.freedesktop.org/patch/18838/
Updated patch committed as http://cgit.freedesktop.org/mesa/mesa/commit/?id=37f1903e007e30892ce39e6e2493c9e88dacf7cc
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.