1 //
2 // Copyright (c) 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 #endif /* EGL_ANGLE_platform_angle */
55 
56 #ifndef EGL_ANGLE_platform_angle_d3d
57 #define EGL_ANGLE_platform_angle_d3d 1
58 #define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
59 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
60 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
61 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
62 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B
63 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE 0x320C
64 #define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F
65 #endif /* EGL_ANGLE_platform_angle_d3d */
66 
67 #ifndef EGL_ANGLE_platform_angle_opengl
68 #define EGL_ANGLE_platform_angle_opengl 1
69 #define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D
70 #define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E
71 #endif /* EGL_ANGLE_platform_angle_opengl */
72 
73 #ifndef EGL_ANGLE_platform_angle_null
74 #define EGL_ANGLE_platform_angle_null 1
75 #define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE
76 #endif /* EGL_ANGLE_platform_angle_null */
77 
78 #ifndef EGL_ANGLE_platform_angle_vulkan
79 #define EGL_ANGLE_platform_angle_vulkan 1
80 #define EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE 0x3450
81 #endif /* EGL_ANGLE_platform_angle_vulkan */
82 
83 #ifndef EGL_ANGLE_x11_visual
84 #define EGL_ANGLE_x11_visual
85 #define EGL_X11_VISUAL_ID_ANGLE 0x33A3
86 #endif /* EGL_ANGLE_x11_visual */
87 
88 #ifndef EGL_ANGLE_flexible_surface_compatibility
89 #define EGL_ANGLE_flexible_surface_compatibility 1
90 #define EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE 0x33A6
91 #endif /* EGL_ANGLE_flexible_surface_compatibility */
92 
93 #ifndef EGL_ANGLE_surface_orientation
94 #define EGL_ANGLE_surface_orientation
95 #define EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE 0x33A7
96 #define EGL_SURFACE_ORIENTATION_ANGLE 0x33A8
97 #define EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE 0x0001
98 #define EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE 0x0002
99 #endif /* EGL_ANGLE_surface_orientation */
100 
101 #ifndef EGL_ANGLE_experimental_present_path
102 #define EGL_ANGLE_experimental_present_path
103 #define EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE 0x33A4
104 #define EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9
105 #define EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
106 #endif /* EGL_ANGLE_experimental_present_path */
107 
108 #ifndef EGL_ANGLE_stream_producer_d3d_texture_nv12
109 #define EGL_ANGLE_stream_producer_d3d_texture_nv12
110 #define EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB
111 typedef EGLBoolean(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
112 typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMPOSTD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
113 #ifdef EGL_EGLEXT_PROTOTYPES
114 EGLAPI EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
115 EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
116 #endif
117 #endif /* EGL_ANGLE_stream_producer_d3d_texture_nv12 */
118 
119 #ifndef EGL_ANGLE_create_context_webgl_compatibility
120 #define EGL_ANGLE_create_context_webgl_compatibility 1
121 #define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x3AAC
122 #endif /* EGL_ANGLE_create_context_webgl_compatibility */
123 
124 #ifndef EGL_ANGLE_display_texture_share_group
125 #define EGL_ANGLE_display_texture_share_group 1
126 #define EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE 0x3AAF
127 #endif /* EGL_ANGLE_display_texture_share_group */
128 
129 #ifndef EGL_CHROMIUM_create_context_bind_generates_resource
130 #define EGL_CHROMIUM_create_context_bind_generates_resource 1
131 #define EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x3AAD
132 #endif /* EGL_CHROMIUM_create_context_bind_generates_resource */
133 
134 #ifndef EGL_ANGLE_create_context_client_arrays
135 #define EGL_ANGLE_create_context_client_arrays 1
136 #define EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE 0x3452
137 #endif /* EGL_ANGLE_create_context_client_arrays */
138 
139 #ifndef EGL_ANGLE_device_creation
140 #define EGL_ANGLE_device_creation 1
141 typedef EGLDeviceEXT(EGLAPIENTRYP PFNEGLCREATEDEVICEANGLEPROC) (EGLint device_type, void *native_device, const EGLAttrib *attrib_list);
142 typedef EGLBoolean(EGLAPIENTRYP PFNEGLRELEASEDEVICEANGLEPROC) (EGLDeviceEXT device);
143 #ifdef EGL_EGLEXT_PROTOTYPES
144 EGLAPI EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type, void *native_device, const EGLAttrib *attrib_list);
145 EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device);
146 #endif
147 #endif /* EGL_ANGLE_device_creation */
148 
149 #ifndef EGL_ANGLE_program_cache_control
150 #define EGL_ANGLE_program_cache_control 1
151 #define EGL_PROGRAM_CACHE_SIZE_ANGLE 0x3455
152 #define EGL_PROGRAM_CACHE_KEY_LENGTH_ANGLE 0x3456
153 #define EGL_PROGRAM_CACHE_RESIZE_ANGLE 0x3457
154 #define EGL_PROGRAM_CACHE_TRIM_ANGLE 0x3458
155 #define EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE 0x3459
156 typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC) (EGLDisplay dpy, EGLenum attrib);
157 typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEQUERYANGLEPROC) (EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize);
158 typedef void (EGLAPIENTRYP PFNEGPROGRAMCACHELPOPULATEANGLEPROC) (EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize);
159 typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHERESIZEANGLEPROC) (EGLDisplay dpy, EGLint limit, EGLenum mode);
160 #ifdef EGL_EGLEXT_PROTOTYPES
161 EGLAPI EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib);
162 EGLAPI void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize);
163 EGLAPI void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize);
164 EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLenum mode);
165 #endif
166 #endif /* EGL_ANGLE_program_cache_control */
167 
168 // clang-format on
169 
170 #endif  // INCLUDE_EGL_EGLEXT_ANGLE_
171