summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_format.c2
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 3a8aeab5fed..34922ab18ab 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;