glsl: Fix copy'n'wasted ir_noop_swizzle conditions.

It considered .xyyy a noop for vec4 instead of .xyzw, and similar for vec3.
(cherry picked from commit 3ffab36768)
This commit is contained in:
Eric Anholt 2010-09-22 11:43:58 -07:00 committed by Ian Romanick
parent 0391eaf088
commit aebd78f607

View file

@ -61,9 +61,9 @@ ir_noop_swizzle_visitor::handle_rvalue(ir_rvalue **rvalue)
return;
if (elems >= 2 && swiz->mask.y != 1)
return;
if (elems >= 3 && swiz->mask.z != 1)
if (elems >= 3 && swiz->mask.z != 2)
return;
if (elems >= 4 && swiz->mask.w != 1)
if (elems >= 4 && swiz->mask.w != 3)
return;
this->progress = true;