blob: aa5eb4d24d9128ab3e5d1dcafcbccb0bda6ee9bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
Name
WL_create_wayland_buffer_from_image
Name Strings
EGL_WL_create_wayland_buffer_from_image
Contributors
Neil Roberts
Axel Davy
Daniel Stone
Contact
Neil Roberts <neil.s.roberts@intel.com>
Status
Proposal
Version
Version 2, October 25, 2013
Number
EGL Extension #not assigned
Dependencies
Requires EGL 1.4 or later. This extension is written against the
wording of the EGL 1.4 specification.
EGL_KHR_base_image is required.
Overview
This extension provides an entry point to create a wl_buffer which shares
its contents with a given EGLImage. The expected use case for this is in a
nested Wayland compositor which is using subsurfaces to present buffers
from its clients. Using this extension it can attach the client buffers
directly to the subsurface without having to blit the contents into an
intermediate buffer. The compositing can then be done in the parent
compositor.
The nested compositor can create an EGLImage from a client buffer resource
using the existing WL_bind_wayland_display extension. It should also be
possible to create buffers using other types of images although there is
no expected use case for that.
IP Status
Open-source; freely implementable.
New Procedures and Functions
struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy,
EGLImageKHR image);
New Tokens
None.
Additions to the EGL 1.4 Specification:
To create a client-side wl_buffer from an EGLImage call
struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy,
EGLImageKHR image);
The returned buffer will share the contents with the given EGLImage. Any
updates to the image will also be updated in the wl_buffer. Typically the
EGLImage will be generated in a nested Wayland compositor using a buffer
resource from a client via the EGL_WL_bind_wayland_display extension.
If there was an error then the function will return NULL. In particular it
will generate EGL_BAD_MATCH if the implementation is not able to represent
the image as a wl_buffer. The possible reasons for this error are
implementation-dependant but may include problems such as an unsupported
format or tiling mode or that the buffer is in memory that is inaccessible
to the GPU that the given EGLDisplay is using.
Issues
1) Under what circumstances can the EGL_BAD_MATCH error be generated? Does
this include for example unsupported tiling modes?
RESOLVED: Yes, the EGL_BAD_MATCH error can be generated for any reason
which prevents the implementation from representing the image as a
wl_buffer. For example, these problems can be but are not limited to
unsupported tiling modes, inaccessible memory or an unsupported pixel
format.
Revision History
Version 1, September 6, 2013
Initial draft (Neil Roberts)
Version 2, October 25, 2013
Added a note about more possible reasons for returning EGL_BAD_FORMAT.
|