eglext.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. #ifndef __eglext_h_
  2. #define __eglext_h_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*
  7. ** Copyright (c) 2007-2013 The Khronos Group Inc.
  8. **
  9. ** Permission is hereby granted, free of charge, to any person obtaining a
  10. ** copy of this software and/or associated documentation files (the
  11. ** "Materials"), to deal in the Materials without restriction, including
  12. ** without limitation the rights to use, copy, modify, merge, publish,
  13. ** distribute, sublicense, and/or sell copies of the Materials, and to
  14. ** permit persons to whom the Materials are furnished to do so, subject to
  15. ** the following conditions:
  16. **
  17. ** The above copyright notice and this permission notice shall be included
  18. ** in all copies or substantial portions of the Materials.
  19. **
  20. ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  23. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  24. ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  25. ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  26. ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  27. */
  28. #include <EGL/eglplatform.h>
  29. /*************************************************************/
  30. /* Header file version number */
  31. /* Current version at http://www.khronos.org/registry/egl/ */
  32. /* $Revision: 20690 $ on $Date: 2013-02-22 17:15:05 -0800 (Fri, 22 Feb 2013) $ */
  33. #define EGL_EGLEXT_VERSION 15
  34. #ifndef EGL_KHR_config_attribs
  35. #define EGL_KHR_config_attribs 1
  36. #define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
  37. #define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
  38. #define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
  39. #endif
  40. #ifndef EGL_KHR_lock_surface
  41. #define EGL_KHR_lock_surface 1
  42. #define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
  43. #define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
  44. #define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
  45. #define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
  46. #define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
  47. #define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
  48. #define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
  49. #define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
  50. #define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
  51. #define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
  52. #define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
  53. #define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
  54. #define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
  55. #define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
  56. #define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
  57. #define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
  58. #define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
  59. #define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
  60. #define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
  61. #define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
  62. #define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
  63. #ifdef EGL_EGLEXT_PROTOTYPES
  64. EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
  65. EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
  66. #endif /* EGL_EGLEXT_PROTOTYPES */
  67. typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
  68. typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
  69. #endif
  70. #ifndef EGL_KHR_image
  71. #define EGL_KHR_image 1
  72. #define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
  73. typedef void *EGLImageKHR;
  74. #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
  75. #ifdef EGL_EGLEXT_PROTOTYPES
  76. EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
  77. EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
  78. #endif /* EGL_EGLEXT_PROTOTYPES */
  79. typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
  80. typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
  81. #endif
  82. #ifndef EGL_KHR_vg_parent_image
  83. #define EGL_KHR_vg_parent_image 1
  84. #define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
  85. #endif
  86. #ifndef EGL_KHR_gl_texture_2D_image
  87. #define EGL_KHR_gl_texture_2D_image 1
  88. #define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
  89. #define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
  90. #endif
  91. #ifndef EGL_KHR_gl_texture_cubemap_image
  92. #define EGL_KHR_gl_texture_cubemap_image 1
  93. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
  94. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
  95. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
  96. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
  97. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
  98. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
  99. #endif
  100. #ifndef EGL_KHR_gl_texture_3D_image
  101. #define EGL_KHR_gl_texture_3D_image 1
  102. #define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
  103. #define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
  104. #endif
  105. #ifndef EGL_KHR_gl_renderbuffer_image
  106. #define EGL_KHR_gl_renderbuffer_image 1
  107. #define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
  108. #endif
  109. #ifndef EGL_WL_bind_wayland_display
  110. #define EGL_WL_bind_wayland_display 1
  111. #define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
  112. #define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */
  113. #define EGL_TEXTURE_Y_U_V_WL 0x31D7
  114. #define EGL_TEXTURE_Y_UV_WL 0x31D8
  115. #define EGL_TEXTURE_Y_XUXV_WL 0x31D9
  116. #define EGL_TEXTURE_EXTERNAL_WL 0x31DA
  117. struct wl_display;
  118. struct wl_resource;
  119. #ifdef EGL_EGLEXT_PROTOTYPES
  120. EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
  121. EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
  122. EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *resource, EGLint attribute, EGLint *value);
  123. #endif
  124. typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
  125. typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
  126. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *resource, EGLint attribute, EGLint *value);
  127. #endif
  128. #if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
  129. #ifndef EGL_KHR_reusable_sync
  130. #define EGL_KHR_reusable_sync 1
  131. typedef void* EGLSyncKHR;
  132. typedef khronos_utime_nanoseconds_t EGLTimeKHR;
  133. #define EGL_SYNC_STATUS_KHR 0x30F1
  134. #define EGL_SIGNALED_KHR 0x30F2
  135. #define EGL_UNSIGNALED_KHR 0x30F3
  136. #define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
  137. #define EGL_CONDITION_SATISFIED_KHR 0x30F6
  138. #define EGL_SYNC_TYPE_KHR 0x30F7
  139. #define EGL_SYNC_REUSABLE_KHR 0x30FA
  140. #define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
  141. #define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
  142. #define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
  143. #ifdef EGL_EGLEXT_PROTOTYPES
  144. EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
  145. EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
  146. EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
  147. EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
  148. EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
  149. #endif /* EGL_EGLEXT_PROTOTYPES */
  150. typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
  151. typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
  152. typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
  153. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
  154. typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
  155. #endif
  156. #endif
  157. #ifndef EGL_KHR_image_base
  158. #define EGL_KHR_image_base 1
  159. /* Most interfaces defined by EGL_KHR_image_pixmap above */
  160. #define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
  161. #endif
  162. #ifndef EGL_KHR_image_pixmap
  163. #define EGL_KHR_image_pixmap 1
  164. /* Interfaces defined by EGL_KHR_image above */
  165. #endif
  166. #ifndef EGL_IMG_context_priority
  167. #define EGL_IMG_context_priority 1
  168. #define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
  169. #define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
  170. #define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
  171. #define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
  172. #endif
  173. #ifndef EGL_KHR_lock_surface2
  174. #define EGL_KHR_lock_surface2 1
  175. #define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
  176. #endif
  177. #ifndef EGL_NV_coverage_sample
  178. #define EGL_NV_coverage_sample 1
  179. #define EGL_COVERAGE_BUFFERS_NV 0x30E0
  180. #define EGL_COVERAGE_SAMPLES_NV 0x30E1
  181. #endif
  182. #ifndef EGL_NV_depth_nonlinear
  183. #define EGL_NV_depth_nonlinear 1
  184. #define EGL_DEPTH_ENCODING_NV 0x30E2
  185. #define EGL_DEPTH_ENCODING_NONE_NV 0
  186. #define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
  187. #endif
  188. #if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */
  189. #ifndef EGL_NV_sync
  190. #define EGL_NV_sync 1
  191. #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
  192. #define EGL_SYNC_STATUS_NV 0x30E7
  193. #define EGL_SIGNALED_NV 0x30E8
  194. #define EGL_UNSIGNALED_NV 0x30E9
  195. #define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
  196. #define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
  197. #define EGL_ALREADY_SIGNALED_NV 0x30EA
  198. #define EGL_TIMEOUT_EXPIRED_NV 0x30EB
  199. #define EGL_CONDITION_SATISFIED_NV 0x30EC
  200. #define EGL_SYNC_TYPE_NV 0x30ED
  201. #define EGL_SYNC_CONDITION_NV 0x30EE
  202. #define EGL_SYNC_FENCE_NV 0x30EF
  203. #define EGL_NO_SYNC_NV ((EGLSyncNV)0)
  204. typedef void* EGLSyncNV;
  205. typedef khronos_utime_nanoseconds_t EGLTimeNV;
  206. #ifdef EGL_EGLEXT_PROTOTYPES
  207. EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
  208. EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
  209. EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
  210. EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
  211. EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
  212. EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
  213. #endif /* EGL_EGLEXT_PROTOTYPES */
  214. typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
  215. typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
  216. typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
  217. typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
  218. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
  219. typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
  220. #endif
  221. #endif
  222. #if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */
  223. #ifndef EGL_KHR_fence_sync
  224. #define EGL_KHR_fence_sync 1
  225. /* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
  226. #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
  227. #define EGL_SYNC_CONDITION_KHR 0x30F8
  228. #define EGL_SYNC_FENCE_KHR 0x30F9
  229. #endif
  230. #endif
  231. #ifndef EGL_HI_clientpixmap
  232. #define EGL_HI_clientpixmap 1
  233. /* Surface Attribute */
  234. #define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
  235. /*
  236. * Structure representing a client pixmap
  237. * (pixmap's data is in client-space memory).
  238. */
  239. struct EGLClientPixmapHI
  240. {
  241. void* pData;
  242. EGLint iWidth;
  243. EGLint iHeight;
  244. EGLint iStride;
  245. };
  246. #ifdef EGL_EGLEXT_PROTOTYPES
  247. EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
  248. #endif /* EGL_EGLEXT_PROTOTYPES */
  249. typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
  250. #endif /* EGL_HI_clientpixmap */
  251. #ifndef EGL_HI_colorformats
  252. #define EGL_HI_colorformats 1
  253. /* Config Attribute */
  254. #define EGL_COLOR_FORMAT_HI 0x8F70
  255. /* Color Formats */
  256. #define EGL_COLOR_RGB_HI 0x8F71
  257. #define EGL_COLOR_RGBA_HI 0x8F72
  258. #define EGL_COLOR_ARGB_HI 0x8F73
  259. #endif /* EGL_HI_colorformats */
  260. #ifndef EGL_MESA_drm_image
  261. #define EGL_MESA_drm_image 1
  262. #define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */
  263. #define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */
  264. #define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */
  265. #define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
  266. #define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
  267. #define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */
  268. #define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */
  269. #ifdef EGL_EGLEXT_PROTOTYPES
  270. EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
  271. EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
  272. #endif /* EGL_EGLEXT_PROTOTYPES */
  273. typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
  274. typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
  275. #endif
  276. #ifndef EGL_NV_post_sub_buffer
  277. #define EGL_NV_post_sub_buffer 1
  278. #define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
  279. #ifdef EGL_EGLEXT_PROTOTYPES
  280. EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
  281. #endif /* EGL_EGLEXT_PROTOTYPES */
  282. typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
  283. #endif
  284. #ifndef EGL_ANGLE_query_surface_pointer
  285. #define EGL_ANGLE_query_surface_pointer 1
  286. #ifdef EGL_EGLEXT_PROTOTYPES
  287. EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
  288. #endif
  289. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
  290. #endif
  291. #ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
  292. #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
  293. #define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
  294. #endif
  295. #ifndef EGL_NV_coverage_sample_resolve
  296. #define EGL_NV_coverage_sample_resolve 1
  297. #define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
  298. #define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
  299. #define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
  300. #endif
  301. #if KHRONOS_SUPPORT_INT64 /* EGLuint64NV requires 64-bit uint support */
  302. #ifndef EGL_NV_system_time
  303. #define EGL_NV_system_time 1
  304. typedef khronos_utime_nanoseconds_t EGLuint64NV;
  305. #ifdef EGL_EGLEXT_PROTOTYPES
  306. EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
  307. EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
  308. #endif /* EGL_EGLEXT_PROTOTYPES */
  309. typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
  310. typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
  311. #endif
  312. #endif
  313. #if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */
  314. #ifndef EGL_KHR_stream
  315. #define EGL_KHR_stream 1
  316. typedef void* EGLStreamKHR;
  317. typedef khronos_uint64_t EGLuint64KHR;
  318. #define EGL_NO_STREAM_KHR ((EGLStreamKHR)0)
  319. #define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210
  320. #define EGL_PRODUCER_FRAME_KHR 0x3212
  321. #define EGL_CONSUMER_FRAME_KHR 0x3213
  322. #define EGL_STREAM_STATE_KHR 0x3214
  323. #define EGL_STREAM_STATE_CREATED_KHR 0x3215
  324. #define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
  325. #define EGL_STREAM_STATE_EMPTY_KHR 0x3217
  326. #define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
  327. #define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
  328. #define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
  329. #define EGL_BAD_STREAM_KHR 0x321B
  330. #define EGL_BAD_STATE_KHR 0x321C
  331. #ifdef EGL_EGLEXT_PROTOTYPES
  332. EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list);
  333. EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream);
  334. EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
  335. EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
  336. EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
  337. #endif /* EGL_EGLEXT_PROTOTYPES */
  338. typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list);
  339. typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  340. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
  341. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
  342. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
  343. #endif
  344. #endif
  345. #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  346. #ifndef EGL_KHR_stream_consumer_gltexture
  347. #define EGL_KHR_stream_consumer_gltexture 1
  348. #define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
  349. #ifdef EGL_EGLEXT_PROTOTYPES
  350. EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream);
  351. EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream);
  352. EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream);
  353. #endif /* EGL_EGLEXT_PROTOTYPES */
  354. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  355. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  356. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  357. #endif
  358. #endif
  359. #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  360. #ifndef EGL_KHR_stream_producer_eglsurface
  361. #define EGL_KHR_stream_producer_eglsurface 1
  362. #define EGL_STREAM_BIT_KHR 0x0800
  363. #ifdef EGL_EGLEXT_PROTOTYPES
  364. EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
  365. #endif /* EGL_EGLEXT_PROTOTYPES */
  366. typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
  367. #endif
  368. #endif
  369. #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  370. #ifndef EGL_KHR_stream_producer_aldatalocator
  371. #define EGL_KHR_stream_producer_aldatalocator 1
  372. #endif
  373. #endif
  374. #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  375. #ifndef EGL_KHR_stream_fifo
  376. #define EGL_KHR_stream_fifo 1
  377. /* reuse EGLTimeKHR */
  378. #define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
  379. #define EGL_STREAM_TIME_NOW_KHR 0x31FD
  380. #define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE
  381. #define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF
  382. #ifdef EGL_EGLEXT_PROTOTYPES
  383. EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
  384. #endif /* EGL_EGLEXT_PROTOTYPES */
  385. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
  386. #endif
  387. #endif
  388. #ifndef EGL_EXT_create_context_robustness
  389. #define EGL_EXT_create_context_robustness 1
  390. #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
  391. #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
  392. #define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
  393. #define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
  394. #endif
  395. #ifndef EGL_ANGLE_d3d_share_handle_client_buffer
  396. #define EGL_ANGLE_d3d_share_handle_client_buffer 1
  397. /* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */
  398. #endif
  399. #ifndef EGL_KHR_create_context
  400. #define EGL_KHR_create_context 1
  401. #define EGL_CONTEXT_MAJOR_VERSION_KHR EGL_CONTEXT_CLIENT_VERSION
  402. #define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
  403. #define EGL_CONTEXT_FLAGS_KHR 0x30FC
  404. #define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
  405. #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
  406. #define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
  407. #define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
  408. #define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
  409. #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
  410. #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
  411. #define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
  412. #define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
  413. #define EGL_OPENGL_ES3_BIT_KHR 0x00000040
  414. #endif
  415. #ifndef EGL_KHR_surfaceless_context
  416. #define EGL_KHR_surfaceless_context 1
  417. /* No tokens/entry points, just relaxes an error condition */
  418. #endif
  419. #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  420. #ifndef EGL_KHR_stream_cross_process_fd
  421. #define EGL_KHR_stream_cross_process_fd 1
  422. typedef int EGLNativeFileDescriptorKHR;
  423. #define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1))
  424. #ifdef EGL_EGLEXT_PROTOTYPES
  425. EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream);
  426. EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
  427. #endif /* EGL_EGLEXT_PROTOTYPES */
  428. typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  429. typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
  430. #endif
  431. #endif
  432. #ifndef EGL_EXT_multiview_window
  433. #define EGL_EXT_multiview_window 1
  434. #define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134
  435. #endif
  436. #ifndef EGL_KHR_wait_sync
  437. #define EGL_KHR_wait_sync 1
  438. #ifdef EGL_EGLEXT_PROTOTYPES
  439. EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
  440. #endif /* EGL_EGLEXT_PROTOTYPES */
  441. typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
  442. #endif
  443. #ifndef EGL_NV_post_convert_rounding
  444. #define EGL_NV_post_convert_rounding 1
  445. /* No tokens or entry points, just relaxes behavior of SwapBuffers */
  446. #endif
  447. #ifndef EGL_NV_native_query
  448. #define EGL_NV_native_query 1
  449. #ifdef EGL_EGLEXT_PROTOTYPES
  450. EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV( EGLDisplay dpy, EGLNativeDisplayType* display_id);
  451. EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV( EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window);
  452. EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV( EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap);
  453. #endif /* EGL_EGLEXT_PROTOTYPES */
  454. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)(EGLDisplay dpy, EGLNativeDisplayType *display_id);
  455. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
  456. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
  457. #endif
  458. #ifndef EGL_NV_3dvision_surface
  459. #define EGL_NV_3dvision_surface 1
  460. #define EGL_AUTO_STEREO_NV 0x3136
  461. #endif
  462. #ifndef EGL_ANDROID_framebuffer_target
  463. #define EGL_ANDROID_framebuffer_target 1
  464. #define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147
  465. #endif
  466. #ifndef EGL_ANDROID_blob_cache
  467. #define EGL_ANDROID_blob_cache 1
  468. typedef khronos_ssize_t EGLsizeiANDROID;
  469. typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
  470. typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
  471. #ifdef EGL_EGLEXT_PROTOTYPES
  472. EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
  473. #endif /* EGL_EGLEXT_PROTOTYPES */
  474. typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
  475. #endif
  476. #ifndef EGL_ANDROID_image_native_buffer
  477. #define EGL_ANDROID_image_native_buffer 1
  478. #define EGL_NATIVE_BUFFER_ANDROID 0x3140
  479. #endif
  480. #ifndef EGL_ANDROID_native_fence_sync
  481. #define EGL_ANDROID_native_fence_sync 1
  482. #define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
  483. #define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
  484. #define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
  485. #define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
  486. #ifdef EGL_EGLEXT_PROTOTYPES
  487. EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID( EGLDisplay dpy, EGLSyncKHR);
  488. #endif /* EGL_EGLEXT_PROTOTYPES */
  489. typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR);
  490. #endif
  491. #ifndef EGL_ANDROID_recordable
  492. #define EGL_ANDROID_recordable 1
  493. #define EGL_RECORDABLE_ANDROID 0x3142
  494. #endif
  495. #ifndef EGL_EXT_buffer_age
  496. #define EGL_EXT_buffer_age 1
  497. #define EGL_BUFFER_AGE_EXT 0x313D
  498. #endif
  499. #ifndef EGL_EXT_image_dma_buf_import
  500. #define EGL_EXT_image_dma_buf_import 1
  501. #define EGL_LINUX_DMA_BUF_EXT 0x3270
  502. #define EGL_LINUX_DRM_FOURCC_EXT 0x3271
  503. #define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
  504. #define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
  505. #define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
  506. #define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
  507. #define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
  508. #define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
  509. #define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
  510. #define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
  511. #define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
  512. #define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
  513. #define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
  514. #define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
  515. #define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
  516. #define EGL_ITU_REC601_EXT 0x327F
  517. #define EGL_ITU_REC709_EXT 0x3280
  518. #define EGL_ITU_REC2020_EXT 0x3281
  519. #define EGL_YUV_FULL_RANGE_EXT 0x3282
  520. #define EGL_YUV_NARROW_RANGE_EXT 0x3283
  521. #define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
  522. #define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
  523. #endif
  524. #ifndef EGL_IMG_image_plane_attribs
  525. #define EGL_IMG_image_plane_attribs 1
  526. #define EGL_NATIVE_BUFFER_MULTIPLANE_SEPARATE_IMG 0x3105
  527. #define EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG 0x3106
  528. #endif
  529. #ifdef __cplusplus
  530. }
  531. #endif
  532. #endif /* __eglext_h_ */