Mesa (master): glsl: Fix copy'n'wasted ir_noop_swizzle conditions.

Eric Anholt anholt at kemper.freedesktop.org
Wed Sep 22 20:15:33 UTC 2010


Module: Mesa
Branch: master
Commit: 3ffab367685c0e0c7ce4d01a3b9b934cb0b15883
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ffab367685c0e0c7ce4d01a3b9b934cb0b15883

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Sep 22 11:43:58 2010 -0700

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 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ir_noop_swizzle.cpp b/src/glsl/ir_noop_swizzle.cpp
index b78c87b..0403dfa 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;




More information about the mesa-commit mailing list