Mesa (master): util: fix a typo in util_format_swizzle_4f

Marek Olšák mareko at kemper.freedesktop.org
Tue Aug 2 23:16:02 UTC 2011


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Wed Aug  3 01:13:06 2011 +0200

util: fix a typo in util_format_swizzle_4f

Reported by Gustaw Smolarczyk.

---

 src/gallium/auxiliary/util/u_format.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format.c
index 3a8aeab..34922ab 100644
--- a/src/gallium/auxiliary/util/u_format.c
+++ b/src/gallium/auxiliary/util/u_format.c
@@ -409,7 +409,7 @@ void util_format_swizzle_4f(float *dst, const float *src,
    unsigned i;
 
    for (i = 0; i < 4; i++) {
-      if (swz[i] < UTIL_FORMAT_SWIZZLE_W)
+      if (swz[i] <= UTIL_FORMAT_SWIZZLE_W)
          dst[i] = src[swz[i]];
       else if (swz[i] == UTIL_FORMAT_SWIZZLE_0)
          dst[i] = 0;




More information about the mesa-commit mailing list