summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2017-12-31 01:05:06 -0500
committerIlia Mirkin <[email protected]>2018-02-19 22:33:58 -0500
commitebdc4c31e23ffd5ce0d1fc47dd8f76c146961e25 (patch)
treefdd9dbae065b2aa46f2a7c1070287b503919cdb9 /src/mesa/drivers/dri/common
parentd88a2906f86843fa11d95f7ac2f39cd0b2713d72 (diff)
mesa: add xbgr support adjacent to xrgb
Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index e944754a424..1cffd3ad08e 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -177,6 +177,10 @@ driCreateConfigs(mesa_format format,
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 },
/* MESA_FORMAT_R8G8B8X8_UNORM */
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
+ /* MESA_FORMAT_R10G10B10X2_UNORM */
+ { 0x000003FF, 0x000FFC00, 0x3FF00000, 0x00000000 },
+ /* MESA_FORMAT_R10G10B10A2_UNORM */
+ { 0x000003FF, 0x000FFC00, 0x3FF00000, 0xC0000000 },
};
const uint32_t * masks;
@@ -215,6 +219,12 @@ driCreateConfigs(mesa_format format,
case MESA_FORMAT_B10G10R10A2_UNORM:
masks = masks_table[4];
break;
+ case MESA_FORMAT_R10G10B10X2_UNORM:
+ masks = masks_table[7];
+ break;
+ case MESA_FORMAT_R10G10B10A2_UNORM:
+ masks = masks_table[8];
+ break;
default:
fprintf(stderr, "[%s:%u] Unknown framebuffer type %s (%d).\n",
__func__, __LINE__,