r300g: add a default channel ordering of texture border for unhandled formats
It should fix the texture border for compressed textures.
Broken since 8449a4772a
.
This commit is contained in:
parent
8ff7885e8f
commit
676c3f08bd
|
@ -620,13 +620,6 @@ static uint32_t r300_get_border_color(enum pipe_format format,
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case 16:
|
||||||
r = ((float_to_ubyte(border_swizzled[2]) & 0xff) << 0) |
|
r = ((float_to_ubyte(border_swizzled[2]) & 0xff) << 0) |
|
||||||
((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
|
((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
|
||||||
|
@ -634,9 +627,12 @@ static uint32_t r300_get_border_color(enum pipe_format format,
|
||||||
((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
|
((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 8:
|
||||||
default:
|
default:
|
||||||
assert(0);
|
r = ((float_to_ubyte(border_swizzled[0]) & 0xff) << 0) |
|
||||||
r = 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue