1 // 2 // Copyright 2017 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // eglext_angle.h: ANGLE modifications to the eglext.h header file. 7 // Currently we don't include this file directly, we patch eglext.h 8 // to include it implicitly so it is visible throughout our code. 9 10 #ifndef INCLUDE_EGL_EGLEXT_ANGLE_ 11 #define INCLUDE_EGL_EGLEXT_ANGLE_ 12 13 // clang-format off 14 15 #ifndef EGL_ANGLE_robust_resource_initialization 16 #define EGL_ANGLE_robust_resource_initialization 1 17 #define EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x3453 18 #endif /* EGL_ANGLE_robust_resource_initialization */ 19 20 #ifndef EGL_ANGLE_keyed_mutex 21 #define EGL_ANGLE_keyed_mutex 1 22 #define EGL_DXGI_KEYED_MUTEX_ANGLE 0x33A2 23 #endif /* EGL_ANGLE_keyed_mutex */ 24 25 #ifndef EGL_ANGLE_d3d_texture_client_buffer 26 #define EGL_ANGLE_d3d_texture_client_buffer 1 27 #define EGL_D3D_TEXTURE_ANGLE 0x33A3 28 #endif /* EGL_ANGLE_d3d_texture_client_buffer */ 29 30 #ifndef EGL_ANGLE_software_display 31 #define EGL_ANGLE_software_display 1 32 #define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1) 33 #endif /* EGL_ANGLE_software_display */ 34 35 #ifndef EGL_ANGLE_direct3d_display 36 #define EGL_ANGLE_direct3d_display 1 37 #define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2) 38 #define EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3) 39 #endif /* EGL_ANGLE_direct3d_display */ 40 41 #ifndef EGL_ANGLE_direct_composition 42 #define EGL_ANGLE_direct_composition 1 43 #define EGL_DIRECT_COMPOSITION_ANGLE 0x33A5 44 #endif /* EGL_ANGLE_direct_composition */ 45 46 #ifndef EGL_ANGLE_platform_angle 47 #define EGL_ANGLE_platform_angle 1 48 #define EGL_PLATFORM_ANGLE_ANGLE 0x3202 49 #define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203 50 #define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204 51 #define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205 52 #define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206 53 #define EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE 0x3451 54 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209 55 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A 56 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE 0x345E 57 #endif /* EGL_ANGLE_platform_angle */ 58 59 #ifndef EGL_ANGLE_platform_angle_d3d 60 #define EGL_ANGLE_platform_angle_d3d 1 61 #define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207 62 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208 63 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE 0x320B 64 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE 0x320C 65 #define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F 66 #endif /* EGL_ANGLE_platform_angle_d3d */ 67 68 #ifndef EGL_ANGLE_platform_angle_d3d11on12 69 #define EGL_ANGLE_platform_angle_d3d11on12 1 70 #define EGL_PLATFORM_ANGLE_D3D11ON12_ANGLE 0x3488 71 #endif /* EGL_ANGLE_platform_angle_d3d11on12 */ 72 73 #ifndef EGL_ANGLE_platform_angle_opengl 74 #define EGL_ANGLE_platform_angle_opengl 1 75 #define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D 76 #define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E 77 #define EGL_PLATFORM_ANGLE_EGL_HANDLE_ANGLE 0x3480 78 #endif /* EGL_ANGLE_platform_angle_opengl */ 79 80 #ifndef EGL_ANGLE_platform_angle_null 81 #define EGL_ANGLE_platform_angle_null 1 82 #define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE 83 #endif /* EGL_ANGLE_platform_angle_null */ 84 85 #ifndef EGL_ANGLE_platform_angle_vulkan 86 #define EGL_ANGLE_platform_angle_vulkan 1 87 #define EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE 0x3450 88 #endif /* EGL_ANGLE_platform_angle_vulkan */ 89 90 #ifndef EGL_ANGLE_platform_angle_metal 91 #define EGL_ANGLE_platform_angle_metal 1 92 #define EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE 0x3489 93 #endif /* EGL_ANGLE_platform_angle_metal */ 94 95 #ifndef EGL_ANGLE_platform_angle_device_type_swiftshader 96 #define EGL_ANGLE_platform_angle_device_type_swiftshader 97 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE 0x3487 98 #endif /* EGL_ANGLE_platform_angle_device_type_swiftshader */ 99 100 #ifndef EGL_ANGLE_platform_angle_device_type_egl_angle 101 #define EGL_ANGLE_platform_angle_device_type_egl_angle 102 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE 0x348E 103 #endif /* EGL_ANGLE_platform_angle_device_type_egl_angle */ 104 105 #ifndef EGL_ANGLE_platform_angle_context_virtualization 106 #define EGL_ANGLE_platform_angle_context_virtualization 1 107 #define EGL_PLATFORM_ANGLE_CONTEXT_VIRTUALIZATION_ANGLE 0x3481 108 #endif /* EGL_ANGLE_platform_angle_context_virtualization */ 109 110 #ifndef EGL_ANGLE_x11_visual 111 #define EGL_ANGLE_x11_visual 112 #define EGL_X11_VISUAL_ID_ANGLE 0x33A3 113 #endif /* EGL_ANGLE_x11_visual */ 114 115 #ifndef EGL_ANGLE_flexible_surface_compatibility 116 #define EGL_ANGLE_flexible_surface_compatibility 1 117 #define EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE 0x33A6 118 #endif /* EGL_ANGLE_flexible_surface_compatibility */ 119 120 #ifndef EGL_ANGLE_surface_orientation 121 #define EGL_ANGLE_surface_orientation 122 #define EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE 0x33A7 123 #define EGL_SURFACE_ORIENTATION_ANGLE 0x33A8 124 #define EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE 0x0001 125 #define EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE 0x0002 126 #endif /* EGL_ANGLE_surface_orientation */ 127 128 #ifndef EGL_ANGLE_experimental_present_path 129 #define EGL_ANGLE_experimental_present_path 130 #define EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE 0x33A4 131 #define EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9 132 #define EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA 133 #endif /* EGL_ANGLE_experimental_present_path */ 134 135 #ifndef EGL_ANGLE_stream_producer_d3d_texture 136 #define EGL_ANGLE_stream_producer_d3d_texture 137 #define EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB 138 typedef EGLBoolean(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERD3DTEXTUREANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); 139 typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMPOSTD3DTEXTUREANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list); 140 #ifdef EGL_EGLEXT_PROTOTYPES 141 EGLAPI EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); 142 EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list); 143 #endif 144 #endif /* EGL_ANGLE_stream_producer_d3d_texture */ 145 146 #ifndef EGL_ANGLE_create_context_webgl_compatibility 147 #define EGL_ANGLE_create_context_webgl_compatibility 1 148 #define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x33AC 149 #endif /* EGL_ANGLE_create_context_webgl_compatibility */ 150 151 #ifndef EGL_ANGLE_display_texture_share_group 152 #define EGL_ANGLE_display_texture_share_group 1 153 #define EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE 0x33AF 154 #endif /* EGL_ANGLE_display_texture_share_group */ 155 156 #ifndef EGL_CHROMIUM_create_context_bind_generates_resource 157 #define EGL_CHROMIUM_create_context_bind_generates_resource 1 158 #define EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x33AD 159 #endif /* EGL_CHROMIUM_create_context_bind_generates_resource */ 160 161 #ifndef EGL_ANGLE_create_context_client_arrays 162 #define EGL_ANGLE_create_context_client_arrays 1 163 #define EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE 0x3452 164 #endif /* EGL_ANGLE_create_context_client_arrays */ 165 166 #ifndef EGL_ANGLE_device_creation 167 #define EGL_ANGLE_device_creation 1 168 typedef EGLDeviceEXT(EGLAPIENTRYP PFNEGLCREATEDEVICEANGLEPROC) (EGLint device_type, void *native_device, const EGLAttrib *attrib_list); 169 typedef EGLBoolean(EGLAPIENTRYP PFNEGLRELEASEDEVICEANGLEPROC) (EGLDeviceEXT device); 170 #ifdef EGL_EGLEXT_PROTOTYPES 171 EGLAPI EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type, void *native_device, const EGLAttrib *attrib_list); 172 EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device); 173 #endif 174 #endif /* EGL_ANGLE_device_creation */ 175 176 #ifndef EGL_ANGLE_program_cache_control 177 #define EGL_ANGLE_program_cache_control 1 178 #define EGL_PROGRAM_CACHE_SIZE_ANGLE 0x3455 179 #define EGL_PROGRAM_CACHE_KEY_LENGTH_ANGLE 0x3456 180 #define EGL_PROGRAM_CACHE_RESIZE_ANGLE 0x3457 181 #define EGL_PROGRAM_CACHE_TRIM_ANGLE 0x3458 182 #define EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE 0x3459 183 typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC) (EGLDisplay dpy, EGLenum attrib); 184 typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEQUERYANGLEPROC) (EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize); 185 typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEPOPULATEANGLEPROC) (EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize); 186 typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHERESIZEANGLEPROC) (EGLDisplay dpy, EGLint limit, EGLenum mode); 187 #ifdef EGL_EGLEXT_PROTOTYPES 188 EGLAPI EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib); 189 EGLAPI void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize); 190 EGLAPI void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize); 191 EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLenum mode); 192 #endif 193 #endif /* EGL_ANGLE_program_cache_control */ 194 195 #ifndef EGL_ANGLE_iosurface_client_buffer 196 #define EGL_ANGLE_iosurface_client_buffer 1 197 #define EGL_IOSURFACE_ANGLE 0x3454 198 #define EGL_IOSURFACE_PLANE_ANGLE 0x345A 199 #define EGL_TEXTURE_RECTANGLE_ANGLE 0x345B 200 #define EGL_TEXTURE_TYPE_ANGLE 0x345C 201 #define EGL_TEXTURE_INTERNAL_FORMAT_ANGLE 0x345D 202 #define EGL_IOSURFACE_USAGE_HINT_ANGLE 0x348A 203 #define EGL_IOSURFACE_READ_HINT_ANGLE 0x0001 204 #define EGL_IOSURFACE_WRITE_HINT_ANGLE 0x0002 205 #define EGL_BIND_TO_TEXTURE_TARGET_ANGLE 0x348D 206 #endif /* EGL_ANGLE_iosurface_client_buffer */ 207 208 #ifndef EGL_ANGLE_create_context_extensions_enabled 209 #define EGL_ANGLE_create_context_extensions_enabled 1 210 #define EGL_EXTENSIONS_ENABLED_ANGLE 0x345F 211 #endif /* EGL_ANGLE_create_context_extensions_enabled */ 212 213 #ifndef EGL_CHROMIUM_sync_control 214 #define EGL_CHROMIUM_sync_control 1 215 typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCVALUESCHROMIUMPROC) (EGLDisplay dpy, 216 EGLSurface surface, 217 EGLuint64KHR *ust, 218 EGLuint64KHR *msc, 219 EGLuint64KHR *sbc); 220 #ifdef EGL_EGLEXT_PROTOTYPES 221 EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy, 222 EGLSurface surface, 223 EGLuint64KHR *ust, 224 EGLuint64KHR *msc, 225 EGLuint64KHR *sbc); 226 #endif 227 #endif /* EGL_CHROMIUM_sync_control */ 228 229 #ifndef EGL_ANGLE_sync_control_rate 230 #define EGL_ANGLE_sync_control_rate 1 231 typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMSCRATEANGLEPROC) (EGLDisplay dpy, 232 EGLSurface surface, 233 EGLint *numerator, 234 EGLint *denominator); 235 #ifdef EGL_EGLEXT_PROTOTYPES 236 EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy, 237 EGLSurface surface, 238 EGLint *numerator, 239 EGLint *denominator); 240 #endif 241 #endif /* EGL_ANGLE_sync_control_rate */ 242 243 #ifndef EGL_ANGLE_power_preference 244 #define EGL_ANGLE_power_preference 1 245 #define EGL_POWER_PREFERENCE_ANGLE 0x3482 246 #define EGL_LOW_POWER_ANGLE 0x0001 247 #define EGL_HIGH_POWER_ANGLE 0x0002 248 #endif /* EGL_ANGLE_power_preference */ 249 250 #ifndef EGL_ANGLE_feature_control 251 #define EGL_ANGLE_feature_control 1 252 #define EGL_FEATURE_NAME_ANGLE 0x3460 253 #define EGL_FEATURE_CATEGORY_ANGLE 0x3461 254 #define EGL_FEATURE_DESCRIPTION_ANGLE 0x3462 255 #define EGL_FEATURE_BUG_ANGLE 0x3463 256 #define EGL_FEATURE_STATUS_ANGLE 0x3464 257 #define EGL_FEATURE_COUNT_ANGLE 0x3465 258 #define EGL_FEATURE_OVERRIDES_ENABLED_ANGLE 0x3466 259 #define EGL_FEATURE_OVERRIDES_DISABLED_ANGLE 0x3467 260 #define EGL_FEATURE_CONDITION_ANGLE 0x3468 261 #define EGL_FEATURE_ALL_DISABLED_ANGLE 0x3469 262 typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGIANGLEPROC) (EGLDisplay dpy, EGLint name, EGLint index); 263 typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBANGLEPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); 264 #ifdef EGL_EGLEXT_PROTOTYPES 265 EGLAPI const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index); 266 EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy, EGLint attribute, EGLAttrib *value); 267 #endif 268 #endif /* EGL_ANGLE_feature_control */ 269 270 #ifndef EGL_ANGLE_image_d3d11_texture 271 #define EGL_D3D11_TEXTURE_ANGLE 0x3484 272 #define EGL_TEXTURE_INTERNAL_FORMAT_ANGLE 0x345D 273 #endif /* EGL_ANGLE_image_d3d11_texture */ 274 275 #ifndef EGL_ANGLE_create_context_backwards_compatible 276 #define EGL_ANGLE_create_context_backwards_compatible 1 277 #define EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE 0x3483 278 #endif /* EGL_ANGLE_create_context_backwards_compatible */ 279 280 #ifndef EGL_ANGLE_device_cgl 281 #define EGL_ANGLE_device_cgl 1 282 #define EGL_CGL_CONTEXT_ANGLE 0x3485 283 #define EGL_CGL_PIXEL_FORMAT_ANGLE 0x3486 284 #endif 285 286 #ifndef EGL_ANGLE_ggp_stream_descriptor 287 #define EGL_ANGLE_ggp_stream_descriptor 1 288 #define EGL_GGP_STREAM_DESCRIPTOR_ANGLE 0x348B 289 #endif /* EGL_ANGLE_ggp_stream_descriptor */ 290 291 #ifndef EGL_ANGLE_swap_with_frame_token 292 #define EGL_ANGLE_swap_with_frame_token 1 293 typedef khronos_uint64_t EGLFrameTokenANGLE; 294 typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHFRAMETOKENANGLEPROC)(EGLDisplay dpy, EGLSurface surface, EGLFrameTokenANGLE frametoken); 295 #ifdef EGL_EGLEXT_PROTOTYPES 296 EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy, EGLSurface surface, EGLFrameTokenANGLE frametoken); 297 #endif 298 #endif /* EGL_ANGLE_swap_with_frame_token */ 299 300 #ifndef EGL_ANGLE_device_eagl 301 #define EGL_ANGLE_device_eagl 1 302 #define EGL_EAGL_CONTEXT_ANGLE 0x348C 303 #endif 304 305 // clang-format on 306 307 #endif // INCLUDE_EGL_EGLEXT_ANGLE_ 308