From f81aacdf2f69a371bc8a3970baec88c21dc862cc Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 17 Feb 2022 13:49:01 +0100 Subject: [PATCH] pixel-formats: Add support for 64bbp float RGB formats These are supported by some other compositors already. Add them to the list so `weston-simple-dmabuf-feedback` reports them correctly. Signed-off-by: Robert Mader --- libweston/pixel-formats.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c index 56ccaf6a..822cc144 100644 --- a/libweston/pixel-formats.c +++ b/libweston/pixel-formats.c @@ -64,6 +64,12 @@ .bits.b = b_, \ .bits.a = a_, \ .component_type = PIXEL_COMPONENT_TYPE_FIXED +#define BITS_RGBA_FLOAT(r_, g_, b_, a_) \ + .bits.r = r_, \ + .bits.g = g_, \ + .bits.b = b_, \ + .bits.a = a_, \ + .component_type = PIXEL_COMPONENT_TYPE_FLOAT #define PIXMAN_FMT(fmt) .pixman_format = (PIXMAN_ ## fmt) @@ -341,6 +347,24 @@ static const struct pixel_format_info pixel_format_table[] = { BITS_RGBA_FIXED(16, 16, 16, 16), .opaque_substitute = DRM_FORMAT_XBGR16161616, }, + { + DRM_FORMAT(XBGR16161616F), + BITS_RGBA_FLOAT(16, 16, 16, 0), + }, + { + DRM_FORMAT(ABGR16161616F), + BITS_RGBA_FLOAT(16, 16, 16, 16), + .opaque_substitute = DRM_FORMAT_XBGR16161616F, + }, + { + DRM_FORMAT(XRGB16161616F), + BITS_RGBA_FLOAT(16, 16, 16, 0), + }, + { + DRM_FORMAT(ARGB16161616F), + BITS_RGBA_FLOAT(16, 16, 16, 16), + .opaque_substitute = DRM_FORMAT_XRGB16161616F, + }, { DRM_FORMAT(YUYV), SAMPLER_TYPE(EGL_TEXTURE_Y_XUXV_WL),