From e97ce5f459d871913d6540125fce32e62e85d2b0 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 29 Nov 2022 09:52:33 +0100 Subject: render/pixel-format: add various new formats --- render/pixel_format.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/render/pixel_format.c b/render/pixel_format.c index 330a59cc..f3d695d7 100644 --- a/render/pixel_format.c +++ b/render/pixel_format.c @@ -52,6 +52,18 @@ static const struct wlr_pixel_format_info pixel_format_info[] = { .bpp = 32, .has_alpha = true, }, + { + .drm_format = DRM_FORMAT_R8, + .bpp = 8, + }, + { + .drm_format = DRM_FORMAT_GR88, + .bpp = 16, + }, + { + .drm_format = DRM_FORMAT_RGB888, + .bpp = 24, + }, { .drm_format = DRM_FORMAT_BGR888, .opaque_substitute = DRM_FORMAT_INVALID, @@ -70,6 +82,16 @@ static const struct wlr_pixel_format_info pixel_format_info[] = { .bpp = 16, .has_alpha = true, }, + { + .drm_format = DRM_FORMAT_BGRX4444, + .bpp = 16, + }, + { + .drm_format = DRM_FORMAT_BGRA4444, + .opaque_substitute = DRM_FORMAT_BGRX4444, + .bpp = 16, + .has_alpha = true, + }, { .drm_format = DRM_FORMAT_RGBX5551, .opaque_substitute = DRM_FORMAT_INVALID, @@ -82,6 +104,26 @@ static const struct wlr_pixel_format_info pixel_format_info[] = { .bpp = 16, .has_alpha = true, }, + { + .drm_format = DRM_FORMAT_BGRX5551, + .bpp = 16, + }, + { + .drm_format = DRM_FORMAT_BGRA5551, + .opaque_substitute = DRM_FORMAT_BGRX5551, + .bpp = 16, + .has_alpha = true, + }, + { + .drm_format = DRM_FORMAT_XRGB1555, + .bpp = 16, + }, + { + .drm_format = DRM_FORMAT_ARGB1555, + .opaque_substitute = DRM_FORMAT_XRGB1555, + .bpp = 16, + .has_alpha = true, + }, { .drm_format = DRM_FORMAT_RGB565, .opaque_substitute = DRM_FORMAT_INVALID, -- cgit v1.2.3