gbm: add GBM_FORMAT_R16

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12101>
This commit is contained in:
Simon Zeni 2021-07-28 09:40:44 -04:00 committed by Simon Ser
parent 74181ffcc5
commit f7ee7112ec
2 changed files with 8 additions and 0 deletions

View File

@ -504,6 +504,11 @@ static const struct gbm_dri_visual gbm_dri_visuals_table[] = {
{ 0, -1, -1, -1 },
{ 8, 0, 0, 0 },
},
{
GBM_FORMAT_R16, __DRI_IMAGE_FORMAT_R16,
{ 0, -1, -1, -1 },
{ 16, 0, 0, 0 },
},
{
GBM_FORMAT_GR88, __DRI_IMAGE_FORMAT_GR88,
{ 0, 8, -1, -1 },

View File

@ -94,6 +94,9 @@ enum gbm_bo_format {
/* 8 bpp Red */
#define GBM_FORMAT_R8 __gbm_fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
/* 16 bpp Red */
#define GBM_FORMAT_R16 __gbm_fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */
/* 16 bpp RG */
#define GBM_FORMAT_GR88 __gbm_fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */