3 WL_create_wayland_buffer_from_image
7 EGL_WL_create_wayland_buffer_from_image
17 Neil Roberts
<neil.s.roberts@intel.com
>
25 Version 2, October
25, 2013
29 EGL Extension
#not assigned
33 Requires EGL
1.4 or later. This extension is written against the
34 wording of the EGL
1.4 specification.
36 EGL_KHR_base_image is required.
40 This extension provides an entry point to create a wl_buffer which shares
41 its contents with a given EGLImage. The expected use
case for this is
in a
42 nested Wayland compositor which is using subsurfaces to present buffers
43 from its clients. Using this extension it can attach the client buffers
44 directly to the subsurface without having to blit the contents into an
45 intermediate buffer. The compositing can
then be
done in the parent
48 The nested compositor can create an EGLImage from a client buffer resource
49 using the existing WL_bind_wayland_display extension. It should also be
50 possible to create buffers using other types of images although there is
51 no expected use
case for that.
55 Open
-source; freely implementable.
57 New Procedures and Functions
59 struct wl_buffer
*eglCreateWaylandBufferFromImageWL
(EGLDisplay dpy
,
66 Additions to the EGL
1.4 Specification
:
68 To create a client
-side wl_buffer from an EGLImage call
70 struct wl_buffer
*eglCreateWaylandBufferFromImageWL
(EGLDisplay dpy
,
73 The returned buffer will share the contents with the given EGLImage. Any
74 updates to the image will also be updated
in the wl_buffer. Typically the
75 EGLImage will be generated
in a nested Wayland compositor using a buffer
76 resource from a client via the EGL_WL_bind_wayland_display extension.
78 If there was an error
then the
function will
return NULL. In particular it
79 will generate EGL_BAD_MATCH
if the implementation is not able to represent
80 the image as a wl_buffer. The possible reasons
for this error are
81 implementation
-dependant but may include problems such as an unsupported
82 format or tiling mode or that the buffer is
in memory that is inaccessible
83 to the GPU that the given EGLDisplay is using.
87 1) Under what circumstances can the EGL_BAD_MATCH error be generated? Does
88 this include
for example unsupported tiling modes?
90 RESOLVED
: Yes
, the EGL_BAD_MATCH error can be generated
for any reason
91 which prevents the implementation from representing the image as a
92 wl_buffer. For example
, these problems can be but are not limited to
93 unsupported tiling modes
, inaccessible memory or an unsupported pixel
98 Version 1, September
6, 2013
99 Initial draft
(Neil Roberts
)
100 Version 2, October
25, 2013
101 Added a note about more possible reasons
for returning EGL_BAD_FORMAT.