wayland/dma-buf: Advertise support for 64 half point RGBA formats

Just as wl_shm, hook up the Wayland DMA-BUF protocol to the 64 bit half
point pixel formats too. This makes it possible for Wayland EGL clients
to use 64 bit pixel EGL configurations.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
This commit is contained in:
Jonas Ådahl 2019-09-18 18:39:22 +02:00 committed by Robert Mader
parent d3f629bfa8
commit a54a01d1e2

View File

@ -124,6 +124,14 @@ meta_wayland_dma_buf_realize_texture (MetaWaylandBuffer *buffer,
case DRM_FORMAT_RGB565: case DRM_FORMAT_RGB565:
cogl_format = COGL_PIXEL_FORMAT_RGB_565; cogl_format = COGL_PIXEL_FORMAT_RGB_565;
break; break;
case DRM_FORMAT_XBGR16161616F:
case DRM_FORMAT_ABGR16161616F:
cogl_format = COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE;
break;
case DRM_FORMAT_XRGB16161616F:
case DRM_FORMAT_ARGB16161616F:
cogl_format = COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE;
break;
default: default:
g_set_error (error, G_IO_ERROR, g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED, G_IO_ERROR_FAILED,
@ -675,6 +683,10 @@ dma_buf_bind (struct wl_client *client,
send_modifiers (resource, DRM_FORMAT_ARGB2101010); send_modifiers (resource, DRM_FORMAT_ARGB2101010);
send_modifiers (resource, DRM_FORMAT_XRGB2101010); send_modifiers (resource, DRM_FORMAT_XRGB2101010);
send_modifiers (resource, DRM_FORMAT_RGB565); send_modifiers (resource, DRM_FORMAT_RGB565);
send_modifiers (resource, DRM_FORMAT_ABGR16161616F);
send_modifiers (resource, DRM_FORMAT_XBGR16161616F);
send_modifiers (resource, DRM_FORMAT_XRGB16161616F);
send_modifiers (resource, DRM_FORMAT_ARGB16161616F);
} }
/** /**