From: Eric Anholt Date: Wed, 22 Sep 2010 18:43:58 +0000 (-0700) Subject: glsl: Fix copy'n'wasted ir_noop_swizzle conditions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ffab367685c0e0c7ce4d01a3b9b934cb0b15883;p=mesa.git glsl: Fix copy'n'wasted ir_noop_swizzle conditions. It considered .xyyy a noop for vec4 instead of .xyzw, and similar for vec3. --- diff --git a/src/glsl/ir_noop_swizzle.cpp b/src/glsl/ir_noop_swizzle.cpp index b78c87b47f3..0403dfa4e93 100644 --- a/src/glsl/ir_noop_swizzle.cpp +++ b/src/glsl/ir_noop_swizzle.cpp @@ -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;