dri_fill_in_modes(struct dri_screen *screen)
{
static const mesa_format mesa_formats[] = {
+ MESA_FORMAT_B10G10R10A2_UNORM,
+ MESA_FORMAT_B10G10R10X2_UNORM,
MESA_FORMAT_B8G8R8A8_UNORM,
MESA_FORMAT_B8G8R8X8_UNORM,
MESA_FORMAT_B8G8R8A8_SRGB,
MESA_FORMAT_R8G8B8X8_UNORM,
};
static const enum pipe_format pipe_formats[] = {
+ PIPE_FORMAT_B10G10R10A2_UNORM,
+ PIPE_FORMAT_B10G10R10X2_UNORM,
PIPE_FORMAT_BGRA8888_UNORM,
PIPE_FORMAT_BGRX8888_UNORM,
PIPE_FORMAT_BGRA8888_SRGB,
if (dri_loader_get_cap(screen, DRI_LOADER_CAP_RGBA_ORDERING))
num_formats = ARRAY_SIZE(mesa_formats);
else
- num_formats = ARRAY_SIZE(mesa_formats) - 2;
+ num_formats = ARRAY_SIZE(mesa_formats) - 2; /* all - RGBA_ORDERING formats */
/* Add configs. */
for (format = 0; format < num_formats; format++) {
/* Deduce the color format. */
switch (mode->redMask) {
+ case 0x3FF00000:
+ if (mode->alphaMask) {
+ assert(mode->alphaMask == 0xC0000000);
+ stvis->color_format = PIPE_FORMAT_B10G10R10A2_UNORM;
+ } else {
+ stvis->color_format = PIPE_FORMAT_B10G10R10X2_UNORM;
+ }
+ break;
+
case 0x00FF0000:
if (mode->alphaMask) {
assert(mode->alphaMask == 0xFF000000);