diff options
author | Eric Anholt <[email protected]> | 2010-09-22 11:43:58 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-09-22 13:09:51 -0700 |
commit | 3ffab367685c0e0c7ce4d01a3b9b934cb0b15883 (patch) | |
tree | 944a03c1cf2aa3d589443ef04b34984d9f4fac30 /src/glsl/ir_noop_swizzle.cpp | |
parent | b39e6f33b60ef9bbaf81f320aaca6a440d8a6a8f (diff) |
glsl: Fix copy'n'wasted ir_noop_swizzle conditions.
It considered .xyyy a noop for vec4 instead of .xyzw, and similar for vec3.
Diffstat (limited to 'src/glsl/ir_noop_swizzle.cpp')
-rw-r--r-- | 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 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; |