diff options
author | Marek Olšák <[email protected]> | 2010-01-17 14:54:35 +0100 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2010-01-18 02:35:08 -0800 |
commit | d3d41cbc3504536c2d2dfa2faaae86b2ae5eb670 (patch) | |
tree | a3f847cf796b549effc228188027822ec1d591d6 /src/gallium | |
parent | cd553ec8be14eea7db2d21b9f26ea6e72474a471 (diff) |
r300g: fix vertex data swizzle
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_inlines.h | 6 |
1 files changed, 5 insertions, 1 deletions
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++) { |