summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2013-09-14 23:25:54 -0700
committerKristian Høgsberg <[email protected]>2013-10-15 22:07:52 -0700
commitafda76cc0d18f7c1bc585c3457a0ad58c13b71ca (patch)
treed4d80e7f00ccd4bf0cb3cd5d768f2865ebe0a956 /src/mesa
parentdf479cffccbdc71d13596bee38cd6434adf5f229 (diff)
dri/common: Add support for creating ARGB2101010 configs
This extends the common dri driver infrastructure with the ability to create __DRIconfigs for 10 bits/channel + 2 bit alphs formats. This still has to be supported and requested by a driver, so this doesn't enable anthing yet. Signed-off-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa')
-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 c9fc2189128..f3780d9b603 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -189,6 +189,10 @@ driCreateConfigs(gl_format format,
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
/* MESA_FORMAT_ARGB8888 */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
+ /* MESA_FORMAT_XRGB2101010_UNORM */
+ { 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 },
+ /* MESA_FORMAT_ARGB2101010 */
+ { 0x3FF00000, 0x000FFC00, 0x000003FF, 0xC0000000 },
};
const uint32_t * masks;
@@ -214,6 +218,12 @@ driCreateConfigs(gl_format format,
case MESA_FORMAT_SARGB8:
masks = masks_table[2];
break;
+ case MESA_FORMAT_XRGB2101010_UNORM:
+ masks = masks_table[3];
+ break;
+ case MESA_FORMAT_ARGB2101010:
+ masks = masks_table[4];
+ break;
default:
fprintf(stderr, "[%s:%u] Unknown framebuffer type %s (%d).\n",
__FUNCTION__, __LINE__,