mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
r300g: set undefined vertex swizzles to (0,0,0,1) respectively
This commit is contained in:
parent
52f145a186
commit
83b76657b3
1 changed files with 8 additions and 1 deletions
|
|
@ -453,10 +453,17 @@ r300_translate_vertex_data_swizzle(enum pipe_format format) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < desc->nr_channels; i++) {
|
||||
swizzle |=
|
||||
MIN2(desc->swizzle[i], R300_SWIZZLE_SELECT_FP_ONE) << (3*i);
|
||||
}
|
||||
/* Set (0,0,0,1) in unused components. */
|
||||
for (; i < 3; i++) {
|
||||
swizzle |= R300_SWIZZLE_SELECT_FP_ZERO << (3*i);
|
||||
}
|
||||
for (; i < 4; i++) {
|
||||
swizzle |= R300_SWIZZLE_SELECT_FP_ONE << (3*i);
|
||||
}
|
||||
|
||||
return swizzle | (0xf << R300_WRITE_ENA_SHIFT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue