From 3325c7a912adda0b890315d8a9b8586907f2c73f Mon Sep 17 00:00:00 2001 From: Anton Kindestam Date: Tue, 13 Feb 2018 18:40:47 +0100 Subject: context_drm_egl: Introduce 30bpp support This introduces the option --drm-format (currently used only by context_drm_egl, vo_drm implementation is pending) which allows you to pick between a xrgb8888 or a xrgb2101010 visual for --gpu-context=drm. Requires a recent mesa (18.0.0_rc4 or later) to work. This also fixes a bug when using --gpu-context=drm on a 30bpp-enabled mesa (allow_rgb10_configs set to true). Previously it would've set up an XRGB8888 format at the DRM/GBM level, while a 30bpp EGLConfig would be picked, resulting in a garbled image. --- video/out/drm_common.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/out/drm_common.c') diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 8402ac7e69..1a164f9a30 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -48,6 +48,9 @@ const struct m_sub_options drm_conf = { 0, drm_validate_connector_opt), OPT_INT("drm-mode", drm_mode_id, 0), OPT_INT("drm-overlay", drm_overlay_id, 0), + OPT_CHOICE("drm-format", drm_format, 0, + ({"xrgb8888", DRM_OPTS_FORMAT_XRGB8888}, + {"xrgb2101010", DRM_OPTS_FORMAT_XRGB2101010})), {0}, }, .size = sizeof(struct drm_opts), -- cgit v1.2.3