4 Contains a list of EGL functions to generate dispatch functions for.
6 This is used from gen_egl_dispatch.py.
8 EGL_FUNCTIONS is a sequence of (name, eglData) pairs, where name is the name
9 of the function, and eglData is a dictionary containing data about that
12 The values in the eglData dictionary are:
14 How to select a vendor library. See "Method values" below.
17 This string is prepended to the name of the dispatch function. If
18 unspecified, the default is "" (an empty string).
21 If True, this function should be declared static.
24 If True, the function should be exported from the library. Vendor libraries
25 generally should not use this.
28 If specified, this is the name of a macro to check for before defining a
29 function. Used for checking for extension macros and such.
32 If specified, this is a C expression with the default value to return if we
33 can't find a function to call. By default, it will try to guess from the
34 return type: EGL_NO_whatever for the various handle types, NULL for
35 pointers, and zero for everything else.
39 The dispatch stub will be hand-written instead of generated.
42 No dispatch function exists at all, but the function should still have an
43 entry in the index array. This is for other functions that a stub may need
44 to call that are implemented in libEGL itself.
47 Select a vendor from an EGLDisplay argument.
50 Select a vendor from an EGLDeviceEXT argument.
53 Select the vendor that owns the current context.
56 def _eglFunc(name
, method
, static
=None, public
=False, inheader
=None, prefix
="dispatch_", extension
=None, retval
=None):
58 A convenience function to define an entry in the EGL function list.
61 static
= (not public
and method
!= "custom")
63 inheader
= (not static
)
67 "extension" : extension
,
71 "inheader" : inheader
,
77 _eglFunc("eglChooseConfig", "none"),
78 _eglFunc("eglCopyBuffers", "none"),
79 _eglFunc("eglCreateContext", "none"),
80 _eglFunc("eglCreatePbufferSurface", "none"),
81 _eglFunc("eglCreatePixmapSurface", "none"),
82 _eglFunc("eglCreateWindowSurface", "none"),
83 _eglFunc("eglDestroyContext", "none"),
84 _eglFunc("eglDestroySurface", "none"),
85 _eglFunc("eglGetConfigAttrib", "none"),
86 _eglFunc("eglGetConfigs", "none"),
87 _eglFunc("eglQueryContext", "none"),
88 _eglFunc("eglQuerySurface", "none"),
89 _eglFunc("eglSwapBuffers", "none"),
90 _eglFunc("eglWaitGL", "none"),
91 _eglFunc("eglWaitNative", "none"),
92 _eglFunc("eglTerminate", "none"),
93 _eglFunc("eglInitialize", "none"),
95 _eglFunc("eglGetCurrentDisplay", "none"),
96 _eglFunc("eglGetCurrentSurface", "none"),
97 _eglFunc("eglGetDisplay", "none"),
98 _eglFunc("eglGetError", "none"),
99 _eglFunc("eglGetProcAddress", "none"),
100 _eglFunc("eglMakeCurrent", "none"),
101 _eglFunc("eglQueryString", "none"),
104 _eglFunc("eglBindTexImage", "none"),
105 _eglFunc("eglReleaseTexImage", "none"),
106 _eglFunc("eglSurfaceAttrib", "none"),
107 _eglFunc("eglSwapInterval", "none"),
110 _eglFunc("eglCreatePbufferFromClientBuffer", "none"),
111 _eglFunc("eglWaitClient", "none"),
112 _eglFunc("eglBindAPI", "none"),
113 _eglFunc("eglQueryAPI", "none"),
114 _eglFunc("eglReleaseThread", "none"),
117 _eglFunc("eglGetCurrentContext", "none"),
120 _eglFunc("eglCreateSync", "none"),
121 _eglFunc("eglDestroySync", "none"),
122 _eglFunc("eglClientWaitSync", "none"),
123 _eglFunc("eglGetSyncAttrib", "none"),
124 _eglFunc("eglCreateImage", "none"),
125 _eglFunc("eglDestroyImage", "none"),
126 _eglFunc("eglCreatePlatformWindowSurface", "none"),
127 _eglFunc("eglCreatePlatformPixmapSurface", "none"),
128 _eglFunc("eglWaitSync", "none"),
129 _eglFunc("eglGetPlatformDisplay", "none"),
131 # EGL_EXT_platform_base
132 _eglFunc("eglCreatePlatformWindowSurfaceEXT", "display"),
133 _eglFunc("eglCreatePlatformPixmapSurfaceEXT", "display"),
134 _eglFunc("eglGetPlatformDisplayEXT", "none"),
136 # TODO: Most of these extensions should be provided by the vendor
137 # libraries, not by libEGL. They're here now to make testing everything
140 # EGL_EXT_swap_buffers_with_damage
141 _eglFunc("eglSwapBuffersWithDamageEXT", "display"),
143 # KHR_EXT_swap_buffers_with_damage
144 _eglFunc("eglSwapBuffersWithDamageKHR", "display"),
147 _eglFunc("eglCreateSync64KHR", "display"),
150 _eglFunc("eglCreateSyncKHR", "display"),
151 _eglFunc("eglDestroySyncKHR", "display"),
152 _eglFunc("eglClientWaitSyncKHR", "display"),
153 _eglFunc("eglGetSyncAttribKHR", "display"),
156 _eglFunc("eglCreateImageKHR", "display"),
157 _eglFunc("eglDestroyImageKHR", "display"),
160 # eglCreateImageKHR already defined in EGL_KHR_image
161 # eglDestroyImageKHR already defined in EGL_KHR_image
163 # EGL_KHR_reusable_sync
164 _eglFunc("eglSignalSyncKHR", "display"),
165 # eglCreateSyncKHR already defined in EGL_KHR_fence_sync
166 # eglDestroySyncKHR already defined in EGL_KHR_fence_sync
167 # eglClientWaitSyncKHR already defined in EGL_KHR_fence_sync
168 # eglGetSyncAttribKHR already defined in EGL_KHR_fence_sync
171 _eglFunc("eglWaitSyncKHR", "display"),
174 _eglFunc("eglCreateDRMImageMESA", "display"),
175 _eglFunc("eglExportDRMImageMESA", "display"),
177 # EGL_MESA_image_dma_buf_export
178 _eglFunc("eglExportDMABUFImageQueryMESA", "display"),
179 _eglFunc("eglExportDMABUFImageMESA", "display"),
181 # EGL_NOK_swap_region
182 _eglFunc("eglSwapBuffersRegionNOK", "display"),
184 # EGL_NV_post_sub_buffer
185 _eglFunc("eglPostSubBufferNV", "display"),
187 # EGL_WL_bind_wayland_display
188 _eglFunc("eglCreateWaylandBufferFromImageWL", "display"),
189 _eglFunc("eglUnbindWaylandDisplayWL", "display"),
190 _eglFunc("eglQueryWaylandBufferWL", "display"),
191 _eglFunc("eglBindWaylandDisplayWL", "display"),
193 # EGL_CHROMIUM_get_sync_values
194 _eglFunc("eglGetSyncValuesCHROMIUM", "display"),
196 # EGL_ANDROID_native_fence_sync
197 _eglFunc("eglDupNativeFenceFDANDROID", "display"),