Hi Kevin, On Mon, 28 Jan 2019 at 18:43, Kevin Strasser <kevin.stras...@intel.com> wrote: > Set loader caps indicating that wayland can handle both rgba ordering and > fp16 formats. > > NOTE: This requries libwayland to provide definitions for > WL_SHM_FORMAT_XBGR16161616F and WL_SHM_FORMAT_ABGR16161616F
To be honest, we wouldn't be very likely to add those until at least Pixman got support for FP16 formats. (Can you also upload those through, e.g., TexImage2D when using GLES?) > static const __DRIimageLoaderExtension image_loader_extension = { > diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c > b/src/egl/wayland/wayland-drm/wayland-drm.c > index 3c6696d..9dd7fd3 100644 > --- a/src/egl/wayland/wayland-drm/wayland-drm.c > +++ b/src/egl/wayland/wayland-drm/wayland-drm.c > @@ -117,6 +117,8 @@ drm_create_buffer(struct wl_client *client, struct > wl_resource *resource, > case WL_DRM_FORMAT_XRGB8888: > case WL_DRM_FORMAT_YUYV: > case WL_DRM_FORMAT_RGB565: > + case WL_DRM_FORMAT_ABGR16161616F: > + case WL_DRM_FORMAT_XBGR16161616F: > break; > default: > wl_resource_post_error(resource, > @@ -220,6 +222,10 @@ bind_drm(struct wl_client *client, void *data, uint32_t > version, uint32_t id) > WL_DRM_FORMAT_XRGB8888); > wl_resource_post_event(resource, WL_DRM_FORMAT, > WL_DRM_FORMAT_RGB565); > + wl_resource_post_event(resource, WL_DRM_FORMAT, > + WL_DRM_FORMAT_ABGR16161616F); > + wl_resource_post_event(resource, WL_DRM_FORMAT, > + WL_DRM_FORMAT_XBGR16161616F); These should only be advertised if the underlying driver actually supports texturing from FP16. Regardless, we try to avoid adding ~anything new to wl_drm. It would be much better to have DRM FourCC definitions for these formats and use them via the linux_dmabuf extension if available. If the driver advertises DRM_FORMAT_*16161616F formats through the EGL dmabuf format query extension, then the server will automatically advertise them to clients and import will just work on the server side without having to touch src/egl/wayland/wayland-drm/, which we'd mostly prefer to be preserved in amber. Cheers, Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev