mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 10:40:36 +01:00
r300g: add a default channel ordering of texture border for unhandled formats
It should fix the texture border for compressed textures. Broken since8449a4772a. (cherry picked from commit676c3f08bd) Conflicts: src/gallium/drivers/r300/r300_state_derived.c
This commit is contained in:
parent
1c746ba9d4
commit
44ba61c518
1 changed files with 8 additions and 7 deletions
|
|
@ -606,19 +606,20 @@ static uint32_t r300_get_border_color(enum pipe_format format,
|
|||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
r = ((float_to_ubyte(border_swizzled[0]) & 0xff) << 0) |
|
||||
((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
|
||||
((float_to_ubyte(border_swizzled[2]) & 0xff) << 16) |
|
||||
((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
r = ((float_to_ubyte(border_swizzled[2]) & 0xff) << 0) |
|
||||
((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
|
||||
((float_to_ubyte(border_swizzled[0]) & 0xff) << 16) |
|
||||
((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
default:
|
||||
r = ((float_to_ubyte(border_swizzled[0]) & 0xff) << 0) |
|
||||
((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
|
||||
((float_to_ubyte(border_swizzled[2]) & 0xff) << 16) |
|
||||
((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
|
||||
break;
|
||||
}
|
||||
|
||||
return r;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue