mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
r300g: fix vertex data swizzle
This commit is contained in:
parent
cd553ec8be
commit
d3d41cbc35
1 changed files with 5 additions and 1 deletions
|
|
@ -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. */
|
/* Swizzles for 8bits formats are in the reversed order, not sure why. */
|
||||||
if (desc->channel[0].size == 8) {
|
if (desc->channel[0].size == 8) {
|
||||||
for (i = 0; i < 4; i++) {
|
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 {
|
} else {
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue