gbm: Add support for 10bpp BGR formats
authorDaniel Stone <daniels@collabora.com>
Wed, 13 Jun 2018 04:04:12 +0000 (06:04 +0200)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 1 Aug 2018 11:55:37 +0000 (12:55 +0100)
Add support for XBGR2101010 and ABGR2101010 formats.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/gbm/backends/dri/gbm_dri.c

index df20db4021882e8a386e4fc1042fd76c83a75fdc..b3d6ceb15a3e4267eb20e1cdd512d71b1d285640 100644 (file)
@@ -580,6 +580,14 @@ static const struct gbm_dri_visual gbm_dri_visuals_table[] = {
      GBM_FORMAT_ARGB2101010, __DRI_IMAGE_FORMAT_ARGB2101010,
      { 0x3ff00000, 0x000ffc00, 0x000003ff, 0xc0000000 },
    },
+   {
+     GBM_FORMAT_XBGR2101010, __DRI_IMAGE_FORMAT_XBGR2101010,
+     { 0x000003ff, 0x000ffc00, 0x3ff00000, 0x00000000 },
+   },
+   {
+     GBM_FORMAT_ABGR2101010, __DRI_IMAGE_FORMAT_ABGR2101010,
+     { 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000 },
+   },
 };
 
 /* The two GBM_BO_FORMAT_[XA]RGB8888 formats alias the GBM_FORMAT_*