From d3d41cbc3504536c2d2dfa2faaae86b2ae5eb670 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 17 Jan 2010 14:54:35 +0100 Subject: [PATCH] r300g: fix vertex data swizzle --- src/gallium/drivers/r300/r300_state_inlines.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h index a9ee0a26f14..e2180b33b77 100644 --- a/src/gallium/drivers/r300/r300_state_inlines.h +++ b/src/gallium/drivers/r300/r300_state_inlines.h @@ -551,7 +551,11 @@ r300_translate_vertex_data_swizzle(enum pipe_format format) { /* Swizzles for 8bits formats are in the reversed order, not sure why. */ if (desc->channel[0].size == 8) { for (i = 0; i < 4; i++) { - swizzle[i] = 3 - desc->swizzle[i]; + if (desc->swizzle[i] <= 3) { + swizzle[i] = 3 - desc->swizzle[i]; + } else { + swizzle[i] = desc->swizzle[i]; + } } } else { for (i = 0; i < 4; i++) { -- 2.30.2