[Mesa-dev] [PATCH 1/3] wayland-drm: Expose server-side xbgr2101010 and abgr2101010 formats.
Mario Kleiner
mario.kleiner.de at gmail.com
Mon Mar 12 20:45:43 UTC 2018
This way the wayland server can signal support for these formats
to wayland EGL clients. This is currently used by nouveau for 10
bpc support.
Tested with glmark2-wayland and glmark2-es2-wayland under weston
to now expose 10 bpc EGL configs under nouveau.
Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
---
src/egl/wayland/wayland-drm/wayland-drm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index 3c6696d..7d44d38 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -111,6 +111,8 @@ drm_create_buffer(struct wl_client *client, struct wl_resource *resource,
uint32_t stride, uint32_t format)
{
switch (format) {
+ case WL_DRM_FORMAT_ABGR2101010:
+ case WL_DRM_FORMAT_XBGR2101010:
case WL_DRM_FORMAT_ARGB2101010:
case WL_DRM_FORMAT_XRGB2101010:
case WL_DRM_FORMAT_ARGB8888:
@@ -215,6 +217,10 @@ bind_drm(struct wl_client *client, void *data, uint32_t version, uint32_t id)
wl_resource_post_event(resource, WL_DRM_FORMAT,
WL_DRM_FORMAT_XRGB2101010);
wl_resource_post_event(resource, WL_DRM_FORMAT,
+ WL_DRM_FORMAT_ABGR2101010);
+ wl_resource_post_event(resource, WL_DRM_FORMAT,
+ WL_DRM_FORMAT_XBGR2101010);
+ wl_resource_post_event(resource, WL_DRM_FORMAT,
WL_DRM_FORMAT_ARGB8888);
wl_resource_post_event(resource, WL_DRM_FORMAT,
WL_DRM_FORMAT_XRGB8888);
--
2.7.4
More information about the mesa-dev
mailing list