From 727c4ef6fb83506a6f7b29f518405b94a79426a0 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 28 Apr 2022 01:45:30 +0100 Subject: [PATCH] pixel-formats: Add R8 and GR88 These formats are used within gl-renderer to do YUV -> RGB colourspace conversion. Signed-off-by: Daniel Stone --- libweston/pixel-formats.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c index 8d3d49a32..5793621b2 100644 --- a/libweston/pixel-formats.c +++ b/libweston/pixel-formats.c @@ -82,6 +82,22 @@ * colour channels, are not supported. */ static const struct pixel_format_info pixel_format_table[] = { + { + DRM_FORMAT(R8), + BITS_RGBA_FIXED(8, 0, 0, 0), + .bpp = 8, + .hide_from_clients = true, + GL_FORMAT(GL_R8_EXT), + GL_TYPE(GL_UNSIGNED_BYTE), + }, + { + DRM_FORMAT(GR88), + BITS_RGBA_FIXED(8, 8, 0, 0), + .bpp = 16, + .hide_from_clients = true, + GL_FORMAT(GL_RG8_EXT), + GL_TYPE(GL_UNSIGNED_BYTE), + }, { DRM_FORMAT(XRGB4444), BITS_RGBA_FIXED(4, 4, 4, 0),