2 Contains a list of EGL functions to generate dispatch functions for.
4 This is used from gen_egl_dispatch.py.
6 EGL_FUNCTIONS is a sequence of (name, eglData) pairs, where name is the name
7 of the function, and eglData is a dictionary containing data about that
10 The values in the eglData dictionary are:
12 How to select a vendor library. See "Method values" below.
15 This string is prepended to the name of the dispatch function. If
16 unspecified, the default is "" (an empty string).
19 If True, this function should be declared static.
22 If True, the function should be exported from the library. Vendor libraries
23 generally should not use this.
26 If specified, this is the name of a macro to check for before defining a
27 function. Used for checking for extension macros and such.
30 If specified, this is a C expression with the default value to return if we
31 can't find a function to call. By default, it will try to guess from the
32 return type: EGL_NO_whatever for the various handle types, NULL for
33 pointers, and zero for everything else.
37 The dispatch stub will be hand-written instead of generated.
40 No dispatch function exists at all, but the function should still have an
41 entry in the index array. This is for other functions that a stub may need
42 to call that are implemented in libEGL itself.
45 Select a vendor from an EGLDisplay argument.
48 Select a vendor from an EGLDeviceEXT argument.
51 Select the vendor that owns the current context.
54 def _eglFunc(name
, method
, static
=None, public
=False, inheader
=None, prefix
="dispatch_", extension
=None, retval
=None):
56 A convenience function to define an entry in the EGL function list.
59 static
= (not public
and method
!= "custom")
61 inheader
= (not static
)
65 "extension" : extension
,
69 "inheader" : inheader
,
75 _eglFunc("eglChooseConfig", "none"),
76 _eglFunc("eglCopyBuffers", "none"),
77 _eglFunc("eglCreateContext", "none"),
78 _eglFunc("eglCreatePbufferSurface", "none"),
79 _eglFunc("eglCreatePixmapSurface", "none"),
80 _eglFunc("eglCreateWindowSurface", "none"),
81 _eglFunc("eglDestroyContext", "none"),
82 _eglFunc("eglDestroySurface", "none"),
83 _eglFunc("eglGetConfigAttrib", "none"),
84 _eglFunc("eglGetConfigs", "none"),
85 _eglFunc("eglQueryContext", "none"),
86 _eglFunc("eglQuerySurface", "none"),
87 _eglFunc("eglSwapBuffers", "none"),
88 _eglFunc("eglWaitGL", "none"),
89 _eglFunc("eglWaitNative", "none"),
90 _eglFunc("eglTerminate", "none"),
91 _eglFunc("eglInitialize", "none"),
93 _eglFunc("eglGetCurrentDisplay", "none"),
94 _eglFunc("eglGetCurrentSurface", "none"),
95 _eglFunc("eglGetDisplay", "none"),
96 _eglFunc("eglGetError", "none"),
97 _eglFunc("eglGetProcAddress", "none"),
98 _eglFunc("eglMakeCurrent", "none"),
99 _eglFunc("eglQueryString", "none"),
102 _eglFunc("eglBindTexImage", "none"),
103 _eglFunc("eglReleaseTexImage", "none"),
104 _eglFunc("eglSurfaceAttrib", "none"),
105 _eglFunc("eglSwapInterval", "none"),
108 _eglFunc("eglCreatePbufferFromClientBuffer", "none"),
109 _eglFunc("eglWaitClient", "none"),
110 _eglFunc("eglBindAPI", "none"),
111 _eglFunc("eglQueryAPI", "none"),
112 _eglFunc("eglReleaseThread", "none"),
115 _eglFunc("eglGetCurrentContext", "none"),
118 _eglFunc("eglCreateSync", "none"),
119 _eglFunc("eglDestroySync", "none"),
120 _eglFunc("eglClientWaitSync", "none"),
121 _eglFunc("eglGetSyncAttrib", "none"),
122 _eglFunc("eglCreateImage", "none"),
123 _eglFunc("eglDestroyImage", "none"),
124 _eglFunc("eglCreatePlatformWindowSurface", "none"),
125 _eglFunc("eglCreatePlatformPixmapSurface", "none"),
126 _eglFunc("eglWaitSync", "none"),
127 _eglFunc("eglGetPlatformDisplay", "none"),
129 # EGL_EXT_platform_base
130 _eglFunc("eglCreatePlatformWindowSurfaceEXT", "display"),
131 _eglFunc("eglCreatePlatformPixmapSurfaceEXT", "display"),
132 _eglFunc("eglGetPlatformDisplayEXT", "none"),
134 # TODO: Most of these extensions should be provided by the vendor
135 # libraries, not by libEGL. They're here now to make testing everything
138 # EGL_EXT_swap_buffers_with_damage
139 _eglFunc("eglSwapBuffersWithDamageEXT", "display"),
141 # KHR_EXT_swap_buffers_with_damage
142 _eglFunc("eglSwapBuffersWithDamageKHR", "display"),
145 _eglFunc("eglCreateSync64KHR", "display"),
148 _eglFunc("eglCreateSyncKHR", "display"),
149 _eglFunc("eglDestroySyncKHR", "display"),
150 _eglFunc("eglClientWaitSyncKHR", "display"),
151 _eglFunc("eglGetSyncAttribKHR", "display"),
154 _eglFunc("eglCreateImageKHR", "display"),
155 _eglFunc("eglDestroyImageKHR", "display"),
158 # eglCreateImageKHR already defined in EGL_KHR_image
159 # eglDestroyImageKHR already defined in EGL_KHR_image
161 # EGL_KHR_reusable_sync
162 _eglFunc("eglSignalSyncKHR", "display"),
163 # eglCreateSyncKHR already defined in EGL_KHR_fence_sync
164 # eglDestroySyncKHR already defined in EGL_KHR_fence_sync
165 # eglClientWaitSyncKHR already defined in EGL_KHR_fence_sync
166 # eglGetSyncAttribKHR already defined in EGL_KHR_fence_sync
169 _eglFunc("eglWaitSyncKHR", "display"),
172 _eglFunc("eglCreateDRMImageMESA", "display"),
173 _eglFunc("eglExportDRMImageMESA", "display"),
175 # EGL_MESA_image_dma_buf_export
176 _eglFunc("eglExportDMABUFImageQueryMESA", "display"),
177 _eglFunc("eglExportDMABUFImageMESA", "display"),
179 # EGL_NOK_swap_region
180 _eglFunc("eglSwapBuffersRegionNOK", "display"),
182 # EGL_NV_post_sub_buffer
183 _eglFunc("eglPostSubBufferNV", "display"),
185 # EGL_WL_bind_wayland_display
186 _eglFunc("eglCreateWaylandBufferFromImageWL", "display"),
187 _eglFunc("eglUnbindWaylandDisplayWL", "display"),
188 _eglFunc("eglQueryWaylandBufferWL", "display"),
189 _eglFunc("eglBindWaylandDisplayWL", "display"),
191 # EGL_CHROMIUM_get_sync_values
192 _eglFunc("eglGetSyncValuesCHROMIUM", "display"),
194 # EGL_ANDROID_native_fence_sync
195 _eglFunc("eglDupNativeFenceFDANDROID", "display"),
197 # EGL_ANDROID_blob_cache
198 _eglFunc("eglSetBlobCacheFuncsANDROID", "display"),
200 # EGL_EXT_image_dma_buf_import_modifiers
201 _eglFunc("eglQueryDmaBufFormatsEXT", "display"),
202 _eglFunc("eglQueryDmaBufModifiersEXT", "display"),
204 # EGL_EXT_device_base
205 _eglFunc("eglQueryDeviceAttribEXT", "device"),
206 _eglFunc("eglQueryDeviceStringEXT", "device"),
207 _eglFunc("eglQueryDevicesEXT", "none"),
208 _eglFunc("eglQueryDisplayAttribEXT", "display"),
210 # EGL_MESA_query_driver
211 _eglFunc("eglGetDisplayDriverName", "display"),
212 _eglFunc("eglGetDisplayDriverConfig", "display"),
214 # EGL_KHR_partial_update
215 _eglFunc("eglSetDamageRegionKHR", "display"),