From 3ffab367685c0e0c7ce4d01a3b9b934cb0b15883 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 22 Sep 2010 11:43:58 -0700 Subject: glsl: Fix copy'n'wasted ir_noop_swizzle conditions. It considered .xyyy a noop for vec4 instead of .xyzw, and similar for vec3. --- src/glsl/ir_noop_swizzle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/glsl') 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; -- cgit v1.2.3