diff options
author | Philip Langdale <philipl@overt.org> | 2021-11-05 20:05:42 -0700 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2021-11-10 09:57:58 -0800 |
commit | 2b9d8ae8b146f459da8647360d148c54cc72bc7e (patch) | |
tree | ce7b6fcad6355d8e7e76561c2100e39b272517a0 /video/out/drm_common.c | |
parent | 10d677575a0e6ea3deb7b824559535df6d5ed6d3 (diff) | |
download | mpv-2b9d8ae8b146f459da8647360d148c54cc72bc7e.tar.bz2 mpv-2b9d8ae8b146f459da8647360d148c54cc72bc7e.tar.xz |
context_drm_egl: add support for BGR surface formats
The new GBM supporting nvidia drivers declare support for 10bit
surfaces using BGR ordering, rather than RGB, so add support for them.
We've also seen examples of hardware supporting BGR8888 but not
RGB8888 so let's support those too.
Of course, the nvidia EGL driver doesn't publish support for any 10bit
formats so you can't actually do 10bit display. Perhaps they'll
eventually fix that.
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r-- | video/out/drm_common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 5e730c3833..aa86b7750b 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -90,7 +90,9 @@ const struct m_sub_options drm_conf = { M_RANGE(0, INT_MAX)}, {"drm-format", OPT_CHOICE(drm_format, {"xrgb8888", DRM_OPTS_FORMAT_XRGB8888}, - {"xrgb2101010", DRM_OPTS_FORMAT_XRGB2101010})}, + {"xrgb2101010", DRM_OPTS_FORMAT_XRGB2101010}, + {"xbgr8888", DRM_OPTS_FORMAT_XBGR8888}, + {"xbgr2101010", DRM_OPTS_FORMAT_XBGR2101010})}, {"drm-draw-surface-size", OPT_SIZE_BOX(drm_draw_surface_size)}, {"drm-osd-plane-id", OPT_REPLACED("drm-draw-plane")}, |