1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from egl.xml and egl_angle_ext.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // entry_points_egl_ext_autogen.cpp:
9 // Defines the EGL Extension entry points.
10
11 #include "libGLESv2/entry_points_egl_ext_autogen.h"
12
13 #include "libANGLE/entry_points_utils.h"
14 #include "libANGLE/validationEGL_autogen.h"
15 #include "libGLESv2/egl_ext_stubs_autogen.h"
16 #include "libGLESv2/global_state.h"
17
18 using namespace egl;
19
20 extern "C" {
21
22 // EGL_ANDROID_blob_cache
EGL_SetBlobCacheFuncsANDROID(EGLDisplay dpy,EGLSetBlobFuncANDROID set,EGLGetBlobFuncANDROID get)23 void EGLAPIENTRY EGL_SetBlobCacheFuncsANDROID(EGLDisplay dpy,
24 EGLSetBlobFuncANDROID set,
25 EGLGetBlobFuncANDROID get)
26 {
27
28 ANGLE_SCOPED_GLOBAL_LOCK();
29 EGL_EVENT(SetBlobCacheFuncsANDROID,
30 "dpy = 0x%016" PRIxPTR ", set = 0x%016" PRIxPTR ", get = 0x%016" PRIxPTR "",
31 (uintptr_t)dpy, (uintptr_t)set, (uintptr_t)get);
32
33 Thread *thread = egl::GetCurrentThread();
34
35 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
36
37 ANGLE_EGL_VALIDATE_VOID(thread, SetBlobCacheFuncsANDROID, GetDisplayIfValid(dpyPacked),
38 dpyPacked, set, get);
39
40 SetBlobCacheFuncsANDROID(thread, dpyPacked, set, get);
41 }
42
43 // EGL_ANDROID_create_native_client_buffer
EGL_CreateNativeClientBufferANDROID(const EGLint * attrib_list)44 EGLClientBuffer EGLAPIENTRY EGL_CreateNativeClientBufferANDROID(const EGLint *attrib_list)
45 {
46
47 ANGLE_SCOPED_GLOBAL_LOCK();
48 EGL_EVENT(CreateNativeClientBufferANDROID, "attrib_list = 0x%016" PRIxPTR "",
49 (uintptr_t)attrib_list);
50
51 Thread *thread = egl::GetCurrentThread();
52
53 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
54
55 ANGLE_EGL_VALIDATE(thread, CreateNativeClientBufferANDROID, nullptr, EGLClientBuffer,
56 attrib_listPacked);
57
58 return CreateNativeClientBufferANDROID(thread, attrib_listPacked);
59 }
60
61 // EGL_ANDROID_get_frame_timestamps
EGL_GetCompositorTimingSupportedANDROID(EGLDisplay dpy,EGLSurface surface,EGLint name)62 EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingSupportedANDROID(EGLDisplay dpy,
63 EGLSurface surface,
64 EGLint name)
65 {
66
67 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
68 ANGLE_SCOPED_GLOBAL_LOCK();
69 EGL_EVENT(GetCompositorTimingSupportedANDROID,
70 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", name = %d", (uintptr_t)dpy,
71 (uintptr_t)surface, name);
72
73 Thread *thread = egl::GetCurrentThread();
74
75 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
76 Surface *surfacePacked = PackParam<Surface *>(surface);
77 CompositorTiming namePacked = PackParam<CompositorTiming>(name);
78
79 ANGLE_EGL_VALIDATE(thread, GetCompositorTimingSupportedANDROID, GetDisplayIfValid(dpyPacked),
80 EGLBoolean, dpyPacked, surfacePacked, namePacked);
81
82 return GetCompositorTimingSupportedANDROID(thread, dpyPacked, surfacePacked, namePacked);
83 }
84
EGL_GetCompositorTimingANDROID(EGLDisplay dpy,EGLSurface surface,EGLint numTimestamps,const EGLint * names,EGLnsecsANDROID * values)85 EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingANDROID(EGLDisplay dpy,
86 EGLSurface surface,
87 EGLint numTimestamps,
88 const EGLint *names,
89 EGLnsecsANDROID *values)
90 {
91
92 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
93 ANGLE_SCOPED_GLOBAL_LOCK();
94 EGL_EVENT(GetCompositorTimingANDROID,
95 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR
96 ", numTimestamps = %d, names = 0x%016" PRIxPTR ", values = 0x%016" PRIxPTR "",
97 (uintptr_t)dpy, (uintptr_t)surface, numTimestamps, (uintptr_t)names,
98 (uintptr_t)values);
99
100 Thread *thread = egl::GetCurrentThread();
101
102 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
103 Surface *surfacePacked = PackParam<Surface *>(surface);
104
105 ANGLE_EGL_VALIDATE(thread, GetCompositorTimingANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean,
106 dpyPacked, surfacePacked, numTimestamps, names, values);
107
108 return GetCompositorTimingANDROID(thread, dpyPacked, surfacePacked, numTimestamps, names,
109 values);
110 }
111
EGL_GetNextFrameIdANDROID(EGLDisplay dpy,EGLSurface surface,EGLuint64KHR * frameId)112 EGLBoolean EGLAPIENTRY EGL_GetNextFrameIdANDROID(EGLDisplay dpy,
113 EGLSurface surface,
114 EGLuint64KHR *frameId)
115 {
116
117 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
118 ANGLE_SCOPED_GLOBAL_LOCK();
119 EGL_EVENT(GetNextFrameIdANDROID,
120 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", frameId = 0x%016" PRIxPTR "",
121 (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)frameId);
122
123 Thread *thread = egl::GetCurrentThread();
124
125 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
126 Surface *surfacePacked = PackParam<Surface *>(surface);
127
128 ANGLE_EGL_VALIDATE(thread, GetNextFrameIdANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean,
129 dpyPacked, surfacePacked, frameId);
130
131 return GetNextFrameIdANDROID(thread, dpyPacked, surfacePacked, frameId);
132 }
133
EGL_GetFrameTimestampSupportedANDROID(EGLDisplay dpy,EGLSurface surface,EGLint timestamp)134 EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampSupportedANDROID(EGLDisplay dpy,
135 EGLSurface surface,
136 EGLint timestamp)
137 {
138
139 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
140 ANGLE_SCOPED_GLOBAL_LOCK();
141 EGL_EVENT(GetFrameTimestampSupportedANDROID,
142 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", timestamp = %d",
143 (uintptr_t)dpy, (uintptr_t)surface, timestamp);
144
145 Thread *thread = egl::GetCurrentThread();
146
147 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
148 Surface *surfacePacked = PackParam<Surface *>(surface);
149 Timestamp timestampPacked = PackParam<Timestamp>(timestamp);
150
151 ANGLE_EGL_VALIDATE(thread, GetFrameTimestampSupportedANDROID, GetDisplayIfValid(dpyPacked),
152 EGLBoolean, dpyPacked, surfacePacked, timestampPacked);
153
154 return GetFrameTimestampSupportedANDROID(thread, dpyPacked, surfacePacked, timestampPacked);
155 }
156
EGL_GetFrameTimestampsANDROID(EGLDisplay dpy,EGLSurface surface,EGLuint64KHR frameId,EGLint numTimestamps,const EGLint * timestamps,EGLnsecsANDROID * values)157 EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampsANDROID(EGLDisplay dpy,
158 EGLSurface surface,
159 EGLuint64KHR frameId,
160 EGLint numTimestamps,
161 const EGLint *timestamps,
162 EGLnsecsANDROID *values)
163 {
164
165 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
166 ANGLE_SCOPED_GLOBAL_LOCK();
167 EGL_EVENT(GetFrameTimestampsANDROID,
168 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR
169 ", frameId = %llu, numTimestamps = %d, timestamps = 0x%016" PRIxPTR
170 ", values = 0x%016" PRIxPTR "",
171 (uintptr_t)dpy, (uintptr_t)surface, static_cast<unsigned long long>(frameId),
172 numTimestamps, (uintptr_t)timestamps, (uintptr_t)values);
173
174 Thread *thread = egl::GetCurrentThread();
175
176 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
177 Surface *surfacePacked = PackParam<Surface *>(surface);
178
179 ANGLE_EGL_VALIDATE(thread, GetFrameTimestampsANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean,
180 dpyPacked, surfacePacked, frameId, numTimestamps, timestamps, values);
181
182 return GetFrameTimestampsANDROID(thread, dpyPacked, surfacePacked, frameId, numTimestamps,
183 timestamps, values);
184 }
185
186 // EGL_ANDROID_get_native_client_buffer
EGL_GetNativeClientBufferANDROID(const struct AHardwareBuffer * buffer)187 EGLClientBuffer EGLAPIENTRY EGL_GetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer)
188 {
189
190 ANGLE_SCOPED_GLOBAL_LOCK();
191 EGL_EVENT(GetNativeClientBufferANDROID, "buffer = 0x%016" PRIxPTR "", (uintptr_t)buffer);
192
193 Thread *thread = egl::GetCurrentThread();
194
195 ANGLE_EGL_VALIDATE(thread, GetNativeClientBufferANDROID, nullptr, EGLClientBuffer, buffer);
196
197 return GetNativeClientBufferANDROID(thread, buffer);
198 }
199
200 // EGL_ANDROID_native_fence_sync
EGL_DupNativeFenceFDANDROID(EGLDisplay dpy,EGLSyncKHR sync)201 EGLint EGLAPIENTRY EGL_DupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync)
202 {
203
204 ANGLE_SCOPED_GLOBAL_LOCK();
205 EGL_EVENT(DupNativeFenceFDANDROID, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "",
206 (uintptr_t)dpy, (uintptr_t)sync);
207
208 Thread *thread = egl::GetCurrentThread();
209
210 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
211 Sync *syncPacked = PackParam<Sync *>(sync);
212
213 ANGLE_EGL_VALIDATE(thread, DupNativeFenceFDANDROID, GetDisplayIfValid(dpyPacked), EGLint,
214 dpyPacked, syncPacked);
215
216 return DupNativeFenceFDANDROID(thread, dpyPacked, syncPacked);
217 }
218
219 // EGL_ANDROID_presentation_time
EGL_PresentationTimeANDROID(EGLDisplay dpy,EGLSurface surface,EGLnsecsANDROID time)220 EGLBoolean EGLAPIENTRY EGL_PresentationTimeANDROID(EGLDisplay dpy,
221 EGLSurface surface,
222 EGLnsecsANDROID time)
223 {
224
225 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
226 ANGLE_SCOPED_GLOBAL_LOCK();
227 EGL_EVENT(PresentationTimeANDROID,
228 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", time = %llu", (uintptr_t)dpy,
229 (uintptr_t)surface, static_cast<unsigned long long>(time));
230
231 Thread *thread = egl::GetCurrentThread();
232
233 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
234 Surface *surfacePacked = PackParam<Surface *>(surface);
235
236 ANGLE_EGL_VALIDATE(thread, PresentationTimeANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean,
237 dpyPacked, surfacePacked, time);
238
239 return PresentationTimeANDROID(thread, dpyPacked, surfacePacked, time);
240 }
241
242 // EGL_ANGLE_device_creation
EGL_CreateDeviceANGLE(EGLint device_type,void * native_device,const EGLAttrib * attrib_list)243 EGLDeviceEXT EGLAPIENTRY EGL_CreateDeviceANGLE(EGLint device_type,
244 void *native_device,
245 const EGLAttrib *attrib_list)
246 {
247
248 ANGLE_SCOPED_GLOBAL_LOCK();
249 EGL_EVENT(CreateDeviceANGLE,
250 "device_type = %d, native_device = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR
251 "",
252 device_type, (uintptr_t)native_device, (uintptr_t)attrib_list);
253
254 Thread *thread = egl::GetCurrentThread();
255
256 ANGLE_EGL_VALIDATE(thread, CreateDeviceANGLE, nullptr, EGLDeviceEXT, device_type, native_device,
257 attrib_list);
258
259 return CreateDeviceANGLE(thread, device_type, native_device, attrib_list);
260 }
261
EGL_ReleaseDeviceANGLE(EGLDeviceEXT device)262 EGLBoolean EGLAPIENTRY EGL_ReleaseDeviceANGLE(EGLDeviceEXT device)
263 {
264
265 ANGLE_SCOPED_GLOBAL_LOCK();
266 EGL_EVENT(ReleaseDeviceANGLE, "device = 0x%016" PRIxPTR "", (uintptr_t)device);
267
268 Thread *thread = egl::GetCurrentThread();
269
270 Device *devicePacked = PackParam<Device *>(device);
271
272 ANGLE_EGL_VALIDATE(thread, ReleaseDeviceANGLE, nullptr, EGLBoolean, devicePacked);
273
274 return ReleaseDeviceANGLE(thread, devicePacked);
275 }
276
277 // EGL_ANGLE_feature_control
EGL_QueryStringiANGLE(EGLDisplay dpy,EGLint name,EGLint index)278 const char *EGLAPIENTRY EGL_QueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index)
279 {
280
281 ANGLE_SCOPED_GLOBAL_LOCK();
282 EGL_EVENT(QueryStringiANGLE, "dpy = 0x%016" PRIxPTR ", name = %d, index = %d", (uintptr_t)dpy,
283 name, index);
284
285 Thread *thread = egl::GetCurrentThread();
286
287 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
288
289 ANGLE_EGL_VALIDATE(thread, QueryStringiANGLE, GetDisplayIfValid(dpyPacked), const char *,
290 dpyPacked, name, index);
291
292 return QueryStringiANGLE(thread, dpyPacked, name, index);
293 }
294
EGL_QueryDisplayAttribANGLE(EGLDisplay dpy,EGLint attribute,EGLAttrib * value)295 EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribANGLE(EGLDisplay dpy,
296 EGLint attribute,
297 EGLAttrib *value)
298 {
299
300 ANGLE_SCOPED_GLOBAL_LOCK();
301 EGL_EVENT(QueryDisplayAttribANGLE,
302 "dpy = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", (uintptr_t)dpy,
303 attribute, (uintptr_t)value);
304
305 Thread *thread = egl::GetCurrentThread();
306
307 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
308
309 ANGLE_EGL_VALIDATE(thread, QueryDisplayAttribANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean,
310 dpyPacked, attribute, value);
311
312 return QueryDisplayAttribANGLE(thread, dpyPacked, attribute, value);
313 }
314
315 // EGL_ANGLE_power_preference
EGL_ReleaseHighPowerGPUANGLE(EGLDisplay dpy,EGLContext ctx)316 void EGLAPIENTRY EGL_ReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
317 {
318
319 ANGLE_SCOPED_GLOBAL_LOCK();
320 EGL_EVENT(ReleaseHighPowerGPUANGLE, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "",
321 (uintptr_t)dpy, (uintptr_t)ctx);
322
323 Thread *thread = egl::GetCurrentThread();
324
325 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
326 gl::Context *ctxPacked = PackParam<gl::Context *>(ctx);
327
328 ANGLE_EGL_VALIDATE_VOID(thread, ReleaseHighPowerGPUANGLE, GetDisplayIfValid(dpyPacked),
329 dpyPacked, ctxPacked);
330
331 ReleaseHighPowerGPUANGLE(thread, dpyPacked, ctxPacked);
332 }
333
EGL_ReacquireHighPowerGPUANGLE(EGLDisplay dpy,EGLContext ctx)334 void EGLAPIENTRY EGL_ReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
335 {
336
337 ANGLE_SCOPED_GLOBAL_LOCK();
338 EGL_EVENT(ReacquireHighPowerGPUANGLE, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "",
339 (uintptr_t)dpy, (uintptr_t)ctx);
340
341 Thread *thread = egl::GetCurrentThread();
342
343 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
344 gl::Context *ctxPacked = PackParam<gl::Context *>(ctx);
345
346 ANGLE_EGL_VALIDATE_VOID(thread, ReacquireHighPowerGPUANGLE, GetDisplayIfValid(dpyPacked),
347 dpyPacked, ctxPacked);
348
349 ReacquireHighPowerGPUANGLE(thread, dpyPacked, ctxPacked);
350 }
351
EGL_HandleGPUSwitchANGLE(EGLDisplay dpy)352 void EGLAPIENTRY EGL_HandleGPUSwitchANGLE(EGLDisplay dpy)
353 {
354
355 ANGLE_SCOPED_GLOBAL_LOCK();
356 EGL_EVENT(HandleGPUSwitchANGLE, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy);
357
358 Thread *thread = egl::GetCurrentThread();
359
360 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
361
362 ANGLE_EGL_VALIDATE_VOID(thread, HandleGPUSwitchANGLE, GetDisplayIfValid(dpyPacked), dpyPacked);
363
364 HandleGPUSwitchANGLE(thread, dpyPacked);
365 }
366
EGL_ForceGPUSwitchANGLE(EGLDisplay dpy,EGLint gpuIDHigh,EGLint gpuIDLow)367 void EGLAPIENTRY EGL_ForceGPUSwitchANGLE(EGLDisplay dpy, EGLint gpuIDHigh, EGLint gpuIDLow)
368 {
369
370 ANGLE_SCOPED_GLOBAL_LOCK();
371 EGL_EVENT(ForceGPUSwitchANGLE, "dpy = 0x%016" PRIxPTR ", gpuIDHigh = %d, gpuIDLow = %d",
372 (uintptr_t)dpy, gpuIDHigh, gpuIDLow);
373
374 Thread *thread = egl::GetCurrentThread();
375
376 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
377
378 ANGLE_EGL_VALIDATE_VOID(thread, ForceGPUSwitchANGLE, GetDisplayIfValid(dpyPacked), dpyPacked,
379 gpuIDHigh, gpuIDLow);
380
381 ForceGPUSwitchANGLE(thread, dpyPacked, gpuIDHigh, gpuIDLow);
382 }
383
384 // EGL_ANGLE_prepare_swap_buffers
EGL_PrepareSwapBuffersANGLE(EGLDisplay dpy,EGLSurface surface)385 EGLBoolean EGLAPIENTRY EGL_PrepareSwapBuffersANGLE(EGLDisplay dpy, EGLSurface surface)
386 {
387 return PrepareSwapBuffersANGLE(dpy, surface);
388 }
389
390 // EGL_ANGLE_program_cache_control
EGL_ProgramCacheGetAttribANGLE(EGLDisplay dpy,EGLenum attrib)391 EGLint EGLAPIENTRY EGL_ProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib)
392 {
393
394 ANGLE_SCOPED_GLOBAL_LOCK();
395 EGL_EVENT(ProgramCacheGetAttribANGLE, "dpy = 0x%016" PRIxPTR ", attrib = 0x%X", (uintptr_t)dpy,
396 attrib);
397
398 Thread *thread = egl::GetCurrentThread();
399
400 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
401
402 ANGLE_EGL_VALIDATE(thread, ProgramCacheGetAttribANGLE, GetDisplayIfValid(dpyPacked), EGLint,
403 dpyPacked, attrib);
404
405 return ProgramCacheGetAttribANGLE(thread, dpyPacked, attrib);
406 }
407
EGL_ProgramCacheQueryANGLE(EGLDisplay dpy,EGLint index,void * key,EGLint * keysize,void * binary,EGLint * binarysize)408 void EGLAPIENTRY EGL_ProgramCacheQueryANGLE(EGLDisplay dpy,
409 EGLint index,
410 void *key,
411 EGLint *keysize,
412 void *binary,
413 EGLint *binarysize)
414 {
415
416 ANGLE_SCOPED_GLOBAL_LOCK();
417 EGL_EVENT(ProgramCacheQueryANGLE,
418 "dpy = 0x%016" PRIxPTR ", index = %d, key = 0x%016" PRIxPTR
419 ", keysize = 0x%016" PRIxPTR ", binary = 0x%016" PRIxPTR
420 ", binarysize = 0x%016" PRIxPTR "",
421 (uintptr_t)dpy, index, (uintptr_t)key, (uintptr_t)keysize, (uintptr_t)binary,
422 (uintptr_t)binarysize);
423
424 Thread *thread = egl::GetCurrentThread();
425
426 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
427
428 ANGLE_EGL_VALIDATE_VOID(thread, ProgramCacheQueryANGLE, GetDisplayIfValid(dpyPacked), dpyPacked,
429 index, key, keysize, binary, binarysize);
430
431 ProgramCacheQueryANGLE(thread, dpyPacked, index, key, keysize, binary, binarysize);
432 }
433
EGL_ProgramCachePopulateANGLE(EGLDisplay dpy,const void * key,EGLint keysize,const void * binary,EGLint binarysize)434 void EGLAPIENTRY EGL_ProgramCachePopulateANGLE(EGLDisplay dpy,
435 const void *key,
436 EGLint keysize,
437 const void *binary,
438 EGLint binarysize)
439 {
440
441 ANGLE_SCOPED_GLOBAL_LOCK();
442 EGL_EVENT(ProgramCachePopulateANGLE,
443 "dpy = 0x%016" PRIxPTR ", key = 0x%016" PRIxPTR
444 ", keysize = %d, binary = 0x%016" PRIxPTR ", binarysize = %d",
445 (uintptr_t)dpy, (uintptr_t)key, keysize, (uintptr_t)binary, binarysize);
446
447 Thread *thread = egl::GetCurrentThread();
448
449 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
450
451 ANGLE_EGL_VALIDATE_VOID(thread, ProgramCachePopulateANGLE, GetDisplayIfValid(dpyPacked),
452 dpyPacked, key, keysize, binary, binarysize);
453
454 ProgramCachePopulateANGLE(thread, dpyPacked, key, keysize, binary, binarysize);
455 }
456
EGL_ProgramCacheResizeANGLE(EGLDisplay dpy,EGLint limit,EGLint mode)457 EGLint EGLAPIENTRY EGL_ProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode)
458 {
459
460 ANGLE_SCOPED_GLOBAL_LOCK();
461 EGL_EVENT(ProgramCacheResizeANGLE, "dpy = 0x%016" PRIxPTR ", limit = %d, mode = %d",
462 (uintptr_t)dpy, limit, mode);
463
464 Thread *thread = egl::GetCurrentThread();
465
466 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
467
468 ANGLE_EGL_VALIDATE(thread, ProgramCacheResizeANGLE, GetDisplayIfValid(dpyPacked), EGLint,
469 dpyPacked, limit, mode);
470
471 return ProgramCacheResizeANGLE(thread, dpyPacked, limit, mode);
472 }
473
474 // EGL_ANGLE_query_surface_pointer
EGL_QuerySurfacePointerANGLE(EGLDisplay dpy,EGLSurface surface,EGLint attribute,void ** value)475 EGLBoolean EGLAPIENTRY EGL_QuerySurfacePointerANGLE(EGLDisplay dpy,
476 EGLSurface surface,
477 EGLint attribute,
478 void **value)
479 {
480
481 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
482 ANGLE_SCOPED_GLOBAL_LOCK();
483 EGL_EVENT(QuerySurfacePointerANGLE,
484 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR
485 ", attribute = %d, value = 0x%016" PRIxPTR "",
486 (uintptr_t)dpy, (uintptr_t)surface, attribute, (uintptr_t)value);
487
488 Thread *thread = egl::GetCurrentThread();
489
490 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
491 Surface *surfacePacked = PackParam<Surface *>(surface);
492
493 ANGLE_EGL_VALIDATE(thread, QuerySurfacePointerANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean,
494 dpyPacked, surfacePacked, attribute, value);
495
496 return QuerySurfacePointerANGLE(thread, dpyPacked, surfacePacked, attribute, value);
497 }
498
499 // EGL_ANGLE_stream_producer_d3d_texture
EGL_CreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,EGLStreamKHR stream,const EGLAttrib * attrib_list)500 EGLBoolean EGLAPIENTRY EGL_CreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,
501 EGLStreamKHR stream,
502 const EGLAttrib *attrib_list)
503 {
504
505 ANGLE_SCOPED_GLOBAL_LOCK();
506 EGL_EVENT(CreateStreamProducerD3DTextureANGLE,
507 "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR
508 "",
509 (uintptr_t)dpy, (uintptr_t)stream, (uintptr_t)attrib_list);
510
511 Thread *thread = egl::GetCurrentThread();
512
513 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
514 Stream *streamPacked = PackParam<Stream *>(stream);
515 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
516
517 ANGLE_EGL_VALIDATE(thread, CreateStreamProducerD3DTextureANGLE, GetDisplayIfValid(dpyPacked),
518 EGLBoolean, dpyPacked, streamPacked, attrib_listPacked);
519
520 return CreateStreamProducerD3DTextureANGLE(thread, dpyPacked, streamPacked, attrib_listPacked);
521 }
522
EGL_StreamPostD3DTextureANGLE(EGLDisplay dpy,EGLStreamKHR stream,void * texture,const EGLAttrib * attrib_list)523 EGLBoolean EGLAPIENTRY EGL_StreamPostD3DTextureANGLE(EGLDisplay dpy,
524 EGLStreamKHR stream,
525 void *texture,
526 const EGLAttrib *attrib_list)
527 {
528
529 ANGLE_SCOPED_GLOBAL_LOCK();
530 EGL_EVENT(StreamPostD3DTextureANGLE,
531 "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR ", texture = 0x%016" PRIxPTR
532 ", attrib_list = 0x%016" PRIxPTR "",
533 (uintptr_t)dpy, (uintptr_t)stream, (uintptr_t)texture, (uintptr_t)attrib_list);
534
535 Thread *thread = egl::GetCurrentThread();
536
537 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
538 Stream *streamPacked = PackParam<Stream *>(stream);
539 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
540
541 ANGLE_EGL_VALIDATE(thread, StreamPostD3DTextureANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean,
542 dpyPacked, streamPacked, texture, attrib_listPacked);
543
544 return StreamPostD3DTextureANGLE(thread, dpyPacked, streamPacked, texture, attrib_listPacked);
545 }
546
547 // EGL_ANGLE_swap_with_frame_token
EGL_SwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,EGLSurface surface,EGLFrameTokenANGLE frametoken)548 EGLBoolean EGLAPIENTRY EGL_SwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,
549 EGLSurface surface,
550 EGLFrameTokenANGLE frametoken)
551 {
552 ANGLE_EGLBOOLEAN_TRY(PrepareSwapBuffersANGLE(dpy, surface));
553 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
554 ANGLE_SCOPED_GLOBAL_LOCK();
555 EGL_EVENT(SwapBuffersWithFrameTokenANGLE,
556 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", frametoken = 0x%llX",
557 (uintptr_t)dpy, (uintptr_t)surface, static_cast<unsigned long long>(frametoken));
558
559 Thread *thread = egl::GetCurrentThread();
560
561 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
562 Surface *surfacePacked = PackParam<Surface *>(surface);
563
564 ANGLE_EGL_VALIDATE(thread, SwapBuffersWithFrameTokenANGLE, GetDisplayIfValid(dpyPacked),
565 EGLBoolean, dpyPacked, surfacePacked, frametoken);
566
567 return SwapBuffersWithFrameTokenANGLE(thread, dpyPacked, surfacePacked, frametoken);
568 }
569
570 // EGL_ANGLE_sync_control_rate
EGL_GetMscRateANGLE(EGLDisplay dpy,EGLSurface surface,EGLint * numerator,EGLint * denominator)571 EGLBoolean EGLAPIENTRY EGL_GetMscRateANGLE(EGLDisplay dpy,
572 EGLSurface surface,
573 EGLint *numerator,
574 EGLint *denominator)
575 {
576
577 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
578 ANGLE_SCOPED_GLOBAL_LOCK();
579 EGL_EVENT(GetMscRateANGLE,
580 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", numerator = 0x%016" PRIxPTR
581 ", denominator = 0x%016" PRIxPTR "",
582 (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)numerator, (uintptr_t)denominator);
583
584 Thread *thread = egl::GetCurrentThread();
585
586 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
587 Surface *surfacePacked = PackParam<Surface *>(surface);
588
589 ANGLE_EGL_VALIDATE(thread, GetMscRateANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
590 surfacePacked, numerator, denominator);
591
592 return GetMscRateANGLE(thread, dpyPacked, surfacePacked, numerator, denominator);
593 }
594
595 // EGL_ANGLE_vulkan_image
EGL_ExportVkImageANGLE(EGLDisplay dpy,EGLImage image,void * vk_image,void * vk_image_create_info)596 EGLBoolean EGLAPIENTRY EGL_ExportVkImageANGLE(EGLDisplay dpy,
597 EGLImage image,
598 void *vk_image,
599 void *vk_image_create_info)
600 {
601
602 ANGLE_SCOPED_GLOBAL_LOCK();
603 EGL_EVENT(ExportVkImageANGLE,
604 "dpy = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR ", vk_image = 0x%016" PRIxPTR
605 ", vk_image_create_info = 0x%016" PRIxPTR "",
606 (uintptr_t)dpy, (uintptr_t)image, (uintptr_t)vk_image,
607 (uintptr_t)vk_image_create_info);
608
609 Thread *thread = egl::GetCurrentThread();
610
611 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
612 Image *imagePacked = PackParam<Image *>(image);
613
614 ANGLE_EGL_VALIDATE(thread, ExportVkImageANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean,
615 dpyPacked, imagePacked, vk_image, vk_image_create_info);
616
617 return ExportVkImageANGLE(thread, dpyPacked, imagePacked, vk_image, vk_image_create_info);
618 }
619
620 // EGL_CHROMIUM_sync_control
EGL_GetSyncValuesCHROMIUM(EGLDisplay dpy,EGLSurface surface,EGLuint64KHR * ust,EGLuint64KHR * msc,EGLuint64KHR * sbc)621 EGLBoolean EGLAPIENTRY EGL_GetSyncValuesCHROMIUM(EGLDisplay dpy,
622 EGLSurface surface,
623 EGLuint64KHR *ust,
624 EGLuint64KHR *msc,
625 EGLuint64KHR *sbc)
626 {
627
628 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
629 ANGLE_SCOPED_GLOBAL_LOCK();
630 EGL_EVENT(GetSyncValuesCHROMIUM,
631 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", ust = 0x%016" PRIxPTR
632 ", msc = 0x%016" PRIxPTR ", sbc = 0x%016" PRIxPTR "",
633 (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)ust, (uintptr_t)msc, (uintptr_t)sbc);
634
635 Thread *thread = egl::GetCurrentThread();
636
637 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
638 Surface *surfacePacked = PackParam<Surface *>(surface);
639
640 ANGLE_EGL_VALIDATE(thread, GetSyncValuesCHROMIUM, GetDisplayIfValid(dpyPacked), EGLBoolean,
641 dpyPacked, surfacePacked, ust, msc, sbc);
642
643 return GetSyncValuesCHROMIUM(thread, dpyPacked, surfacePacked, ust, msc, sbc);
644 }
645
646 // EGL_EXT_device_query
EGL_QueryDeviceAttribEXT(EGLDeviceEXT device,EGLint attribute,EGLAttrib * value)647 EGLBoolean EGLAPIENTRY EGL_QueryDeviceAttribEXT(EGLDeviceEXT device,
648 EGLint attribute,
649 EGLAttrib *value)
650 {
651
652 ANGLE_SCOPED_GLOBAL_LOCK();
653 EGL_EVENT(QueryDeviceAttribEXT,
654 "device = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "",
655 (uintptr_t)device, attribute, (uintptr_t)value);
656
657 Thread *thread = egl::GetCurrentThread();
658
659 Device *devicePacked = PackParam<Device *>(device);
660
661 ANGLE_EGL_VALIDATE(thread, QueryDeviceAttribEXT, nullptr, EGLBoolean, devicePacked, attribute,
662 value);
663
664 return QueryDeviceAttribEXT(thread, devicePacked, attribute, value);
665 }
666
EGL_QueryDeviceStringEXT(EGLDeviceEXT device,EGLint name)667 const char *EGLAPIENTRY EGL_QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name)
668 {
669
670 ANGLE_SCOPED_GLOBAL_LOCK();
671 EGL_EVENT(QueryDeviceStringEXT, "device = 0x%016" PRIxPTR ", name = %d", (uintptr_t)device,
672 name);
673
674 Thread *thread = egl::GetCurrentThread();
675
676 Device *devicePacked = PackParam<Device *>(device);
677
678 ANGLE_EGL_VALIDATE(thread, QueryDeviceStringEXT, nullptr, const char *, devicePacked, name);
679
680 return QueryDeviceStringEXT(thread, devicePacked, name);
681 }
682
EGL_QueryDisplayAttribEXT(EGLDisplay dpy,EGLint attribute,EGLAttrib * value)683 EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value)
684 {
685
686 ANGLE_SCOPED_GLOBAL_LOCK();
687 EGL_EVENT(QueryDisplayAttribEXT,
688 "dpy = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", (uintptr_t)dpy,
689 attribute, (uintptr_t)value);
690
691 Thread *thread = egl::GetCurrentThread();
692
693 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
694
695 ANGLE_EGL_VALIDATE(thread, QueryDisplayAttribEXT, GetDisplayIfValid(dpyPacked), EGLBoolean,
696 dpyPacked, attribute, value);
697
698 return QueryDisplayAttribEXT(thread, dpyPacked, attribute, value);
699 }
700
701 // EGL_EXT_image_dma_buf_import_modifiers
EGL_QueryDmaBufFormatsEXT(EGLDisplay dpy,EGLint max_formats,EGLint * formats,EGLint * num_formats)702 EGLBoolean EGLAPIENTRY EGL_QueryDmaBufFormatsEXT(EGLDisplay dpy,
703 EGLint max_formats,
704 EGLint *formats,
705 EGLint *num_formats)
706 {
707
708 ANGLE_SCOPED_GLOBAL_LOCK();
709 EGL_EVENT(QueryDmaBufFormatsEXT,
710 "dpy = 0x%016" PRIxPTR ", max_formats = %d, formats = 0x%016" PRIxPTR
711 ", num_formats = 0x%016" PRIxPTR "",
712 (uintptr_t)dpy, max_formats, (uintptr_t)formats, (uintptr_t)num_formats);
713
714 Thread *thread = egl::GetCurrentThread();
715
716 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
717
718 ANGLE_EGL_VALIDATE(thread, QueryDmaBufFormatsEXT, GetDisplayIfValid(dpyPacked), EGLBoolean,
719 dpyPacked, max_formats, formats, num_formats);
720
721 return QueryDmaBufFormatsEXT(thread, dpyPacked, max_formats, formats, num_formats);
722 }
723
EGL_QueryDmaBufModifiersEXT(EGLDisplay dpy,EGLint format,EGLint max_modifiers,EGLuint64KHR * modifiers,EGLBoolean * external_only,EGLint * num_modifiers)724 EGLBoolean EGLAPIENTRY EGL_QueryDmaBufModifiersEXT(EGLDisplay dpy,
725 EGLint format,
726 EGLint max_modifiers,
727 EGLuint64KHR *modifiers,
728 EGLBoolean *external_only,
729 EGLint *num_modifiers)
730 {
731
732 ANGLE_SCOPED_GLOBAL_LOCK();
733 EGL_EVENT(QueryDmaBufModifiersEXT,
734 "dpy = 0x%016" PRIxPTR ", format = %d, max_modifiers = %d, modifiers = 0x%016" PRIxPTR
735 ", external_only = 0x%016" PRIxPTR ", num_modifiers = 0x%016" PRIxPTR "",
736 (uintptr_t)dpy, format, max_modifiers, (uintptr_t)modifiers, (uintptr_t)external_only,
737 (uintptr_t)num_modifiers);
738
739 Thread *thread = egl::GetCurrentThread();
740
741 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
742
743 ANGLE_EGL_VALIDATE(thread, QueryDmaBufModifiersEXT, GetDisplayIfValid(dpyPacked), EGLBoolean,
744 dpyPacked, format, max_modifiers, modifiers, external_only, num_modifiers);
745
746 return QueryDmaBufModifiersEXT(thread, dpyPacked, format, max_modifiers, modifiers,
747 external_only, num_modifiers);
748 }
749
750 // EGL_EXT_platform_base
EGL_CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,EGLConfig config,void * native_pixmap,const EGLint * attrib_list)751 EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
752 EGLConfig config,
753 void *native_pixmap,
754 const EGLint *attrib_list)
755 {
756
757 ANGLE_SCOPED_GLOBAL_LOCK();
758 EGL_EVENT(CreatePlatformPixmapSurfaceEXT,
759 "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", native_pixmap = 0x%016" PRIxPTR
760 ", attrib_list = 0x%016" PRIxPTR "",
761 (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)native_pixmap, (uintptr_t)attrib_list);
762
763 Thread *thread = egl::GetCurrentThread();
764
765 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
766 Config *configPacked = PackParam<Config *>(config);
767 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
768
769 ANGLE_EGL_VALIDATE(thread, CreatePlatformPixmapSurfaceEXT, GetDisplayIfValid(dpyPacked),
770 EGLSurface, dpyPacked, configPacked, native_pixmap, attrib_listPacked);
771
772 return CreatePlatformPixmapSurfaceEXT(thread, dpyPacked, configPacked, native_pixmap,
773 attrib_listPacked);
774 }
775
EGL_CreatePlatformWindowSurfaceEXT(EGLDisplay dpy,EGLConfig config,void * native_window,const EGLint * attrib_list)776 EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
777 EGLConfig config,
778 void *native_window,
779 const EGLint *attrib_list)
780 {
781
782 ANGLE_SCOPED_GLOBAL_LOCK();
783 EGL_EVENT(CreatePlatformWindowSurfaceEXT,
784 "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", native_window = 0x%016" PRIxPTR
785 ", attrib_list = 0x%016" PRIxPTR "",
786 (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)native_window, (uintptr_t)attrib_list);
787
788 Thread *thread = egl::GetCurrentThread();
789
790 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
791 Config *configPacked = PackParam<Config *>(config);
792 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
793
794 ANGLE_EGL_VALIDATE(thread, CreatePlatformWindowSurfaceEXT, GetDisplayIfValid(dpyPacked),
795 EGLSurface, dpyPacked, configPacked, native_window, attrib_listPacked);
796
797 return CreatePlatformWindowSurfaceEXT(thread, dpyPacked, configPacked, native_window,
798 attrib_listPacked);
799 }
800
EGL_GetPlatformDisplayEXT(EGLenum platform,void * native_display,const EGLint * attrib_list)801 EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplayEXT(EGLenum platform,
802 void *native_display,
803 const EGLint *attrib_list)
804 {
805
806 ANGLE_SCOPED_GLOBAL_LOCK();
807 EGL_EVENT(GetPlatformDisplayEXT,
808 "platform = 0x%X, native_display = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR
809 "",
810 platform, (uintptr_t)native_display, (uintptr_t)attrib_list);
811
812 Thread *thread = egl::GetCurrentThread();
813
814 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
815
816 ANGLE_EGL_VALIDATE(thread, GetPlatformDisplayEXT, nullptr, EGLDisplay, platform, native_display,
817 attrib_listPacked);
818
819 return GetPlatformDisplayEXT(thread, platform, native_display, attrib_listPacked);
820 }
821
822 // EGL_KHR_debug
EGL_DebugMessageControlKHR(EGLDEBUGPROCKHR callback,const EGLAttrib * attrib_list)823 EGLint EGLAPIENTRY EGL_DebugMessageControlKHR(EGLDEBUGPROCKHR callback,
824 const EGLAttrib *attrib_list)
825 {
826
827 ANGLE_SCOPED_GLOBAL_LOCK();
828 EGL_EVENT(DebugMessageControlKHR,
829 "callback = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", (uintptr_t)callback,
830 (uintptr_t)attrib_list);
831
832 Thread *thread = egl::GetCurrentThread();
833
834 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
835
836 ANGLE_EGL_VALIDATE(thread, DebugMessageControlKHR, nullptr, EGLint, callback,
837 attrib_listPacked);
838
839 return DebugMessageControlKHR(thread, callback, attrib_listPacked);
840 }
841
EGL_LabelObjectKHR(EGLDisplay display,EGLenum objectType,EGLObjectKHR object,EGLLabelKHR label)842 EGLint EGLAPIENTRY EGL_LabelObjectKHR(EGLDisplay display,
843 EGLenum objectType,
844 EGLObjectKHR object,
845 EGLLabelKHR label)
846 {
847
848 ANGLE_SCOPED_GLOBAL_LOCK();
849 EGL_EVENT(LabelObjectKHR,
850 "display = 0x%016" PRIxPTR ", objectType = 0x%X, object = 0x%016" PRIxPTR
851 ", label = 0x%016" PRIxPTR "",
852 (uintptr_t)display, objectType, (uintptr_t)object, (uintptr_t)label);
853
854 Thread *thread = egl::GetCurrentThread();
855
856 egl::Display *displayPacked = PackParam<egl::Display *>(display);
857 ObjectType objectTypePacked = PackParam<ObjectType>(objectType);
858
859 ANGLE_EGL_VALIDATE(thread, LabelObjectKHR, GetDisplayIfValid(displayPacked), EGLint,
860 displayPacked, objectTypePacked, object, label);
861
862 return LabelObjectKHR(thread, displayPacked, objectTypePacked, object, label);
863 }
864
EGL_QueryDebugKHR(EGLint attribute,EGLAttrib * value)865 EGLBoolean EGLAPIENTRY EGL_QueryDebugKHR(EGLint attribute, EGLAttrib *value)
866 {
867
868 ANGLE_SCOPED_GLOBAL_LOCK();
869 EGL_EVENT(QueryDebugKHR, "attribute = %d, value = 0x%016" PRIxPTR "", attribute,
870 (uintptr_t)value);
871
872 Thread *thread = egl::GetCurrentThread();
873
874 ANGLE_EGL_VALIDATE(thread, QueryDebugKHR, nullptr, EGLBoolean, attribute, value);
875
876 return QueryDebugKHR(thread, attribute, value);
877 }
878
879 // EGL_KHR_fence_sync
EGL_ClientWaitSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint flags,EGLTimeKHR timeout)880 EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy,
881 EGLSyncKHR sync,
882 EGLint flags,
883 EGLTimeKHR timeout)
884 {
885
886 ANGLE_SCOPED_GLOBAL_LOCK();
887 EGL_EVENT(ClientWaitSyncKHR,
888 "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d, timeout = %llu",
889 (uintptr_t)dpy, (uintptr_t)sync, flags, static_cast<unsigned long long>(timeout));
890
891 Thread *thread = egl::GetCurrentThread();
892
893 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
894 Sync *syncPacked = PackParam<Sync *>(sync);
895
896 ANGLE_EGL_VALIDATE(thread, ClientWaitSyncKHR, GetDisplayIfValid(dpyPacked), EGLint, dpyPacked,
897 syncPacked, flags, timeout);
898
899 return ClientWaitSyncKHR(thread, dpyPacked, syncPacked, flags, timeout);
900 }
901
EGL_CreateSyncKHR(EGLDisplay dpy,EGLenum type,const EGLint * attrib_list)902 EGLSyncKHR EGLAPIENTRY EGL_CreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
903 {
904
905 ANGLE_SCOPED_GLOBAL_LOCK();
906 EGL_EVENT(CreateSyncKHR,
907 "dpy = 0x%016" PRIxPTR ", type = 0x%X, attrib_list = 0x%016" PRIxPTR "",
908 (uintptr_t)dpy, type, (uintptr_t)attrib_list);
909
910 Thread *thread = egl::GetCurrentThread();
911
912 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
913 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
914
915 ANGLE_EGL_VALIDATE(thread, CreateSyncKHR, GetDisplayIfValid(dpyPacked), EGLSyncKHR, dpyPacked,
916 type, attrib_listPacked);
917
918 return CreateSyncKHR(thread, dpyPacked, type, attrib_listPacked);
919 }
920
EGL_DestroySyncKHR(EGLDisplay dpy,EGLSyncKHR sync)921 EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
922 {
923
924 ANGLE_SCOPED_GLOBAL_LOCK();
925 EGL_EVENT(DestroySyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", (uintptr_t)dpy,
926 (uintptr_t)sync);
927
928 Thread *thread = egl::GetCurrentThread();
929
930 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
931 Sync *syncPacked = PackParam<Sync *>(sync);
932
933 ANGLE_EGL_VALIDATE(thread, DestroySyncKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
934 syncPacked);
935
936 return DestroySyncKHR(thread, dpyPacked, syncPacked);
937 }
938
EGL_GetSyncAttribKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint attribute,EGLint * value)939 EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy,
940 EGLSyncKHR sync,
941 EGLint attribute,
942 EGLint *value)
943 {
944
945 ANGLE_SCOPED_GLOBAL_LOCK();
946 EGL_EVENT(GetSyncAttribKHR,
947 "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR
948 ", attribute = %d, value = 0x%016" PRIxPTR "",
949 (uintptr_t)dpy, (uintptr_t)sync, attribute, (uintptr_t)value);
950
951 Thread *thread = egl::GetCurrentThread();
952
953 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
954 Sync *syncPacked = PackParam<Sync *>(sync);
955
956 ANGLE_EGL_VALIDATE(thread, GetSyncAttribKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
957 dpyPacked, syncPacked, attribute, value);
958
959 return GetSyncAttribKHR(thread, dpyPacked, syncPacked, attribute, value);
960 }
961
962 // EGL_KHR_image
EGL_CreateImageKHR(EGLDisplay dpy,EGLContext ctx,EGLenum target,EGLClientBuffer buffer,const EGLint * attrib_list)963 EGLImageKHR EGLAPIENTRY EGL_CreateImageKHR(EGLDisplay dpy,
964 EGLContext ctx,
965 EGLenum target,
966 EGLClientBuffer buffer,
967 const EGLint *attrib_list)
968 {
969
970 ANGLE_SCOPED_GLOBAL_LOCK();
971 EGL_EVENT(CreateImageKHR,
972 "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR
973 ", target = 0x%X, buffer = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "",
974 (uintptr_t)dpy, (uintptr_t)ctx, target, (uintptr_t)buffer, (uintptr_t)attrib_list);
975
976 Thread *thread = egl::GetCurrentThread();
977
978 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
979 gl::Context *ctxPacked = PackParam<gl::Context *>(ctx);
980 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
981
982 ANGLE_EGL_VALIDATE(thread, CreateImageKHR, GetDisplayIfValid(dpyPacked), EGLImageKHR, dpyPacked,
983 ctxPacked, target, buffer, attrib_listPacked);
984
985 return CreateImageKHR(thread, dpyPacked, ctxPacked, target, buffer, attrib_listPacked);
986 }
987
EGL_DestroyImageKHR(EGLDisplay dpy,EGLImageKHR image)988 EGLBoolean EGLAPIENTRY EGL_DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
989 {
990
991 ANGLE_SCOPED_GLOBAL_LOCK();
992 EGL_EVENT(DestroyImageKHR, "dpy = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR "", (uintptr_t)dpy,
993 (uintptr_t)image);
994
995 Thread *thread = egl::GetCurrentThread();
996
997 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
998 Image *imagePacked = PackParam<Image *>(image);
999
1000 ANGLE_EGL_VALIDATE(thread, DestroyImageKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
1001 imagePacked);
1002
1003 return DestroyImageKHR(thread, dpyPacked, imagePacked);
1004 }
1005
1006 // EGL_KHR_lock_surface3
EGL_LockSurfaceKHR(EGLDisplay dpy,EGLSurface surface,const EGLint * attrib_list)1007 EGLBoolean EGLAPIENTRY EGL_LockSurfaceKHR(EGLDisplay dpy,
1008 EGLSurface surface,
1009 const EGLint *attrib_list)
1010 {
1011
1012 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
1013 ANGLE_SCOPED_GLOBAL_LOCK();
1014 EGL_EVENT(LockSurfaceKHR,
1015 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR
1016 "",
1017 (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)attrib_list);
1018
1019 Thread *thread = egl::GetCurrentThread();
1020
1021 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1022 Surface *surfacePacked = PackParam<Surface *>(surface);
1023 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
1024
1025 ANGLE_EGL_VALIDATE(thread, LockSurfaceKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
1026 surfacePacked, attrib_listPacked);
1027
1028 return LockSurfaceKHR(thread, dpyPacked, surfacePacked, attrib_listPacked);
1029 }
1030
EGL_QuerySurface64KHR(EGLDisplay dpy,EGLSurface surface,EGLint attribute,EGLAttribKHR * value)1031 EGLBoolean EGLAPIENTRY EGL_QuerySurface64KHR(EGLDisplay dpy,
1032 EGLSurface surface,
1033 EGLint attribute,
1034 EGLAttribKHR *value)
1035 {
1036
1037 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
1038 ANGLE_SCOPED_GLOBAL_LOCK();
1039 EGL_EVENT(QuerySurface64KHR,
1040 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR
1041 ", attribute = %d, value = 0x%016" PRIxPTR "",
1042 (uintptr_t)dpy, (uintptr_t)surface, attribute, (uintptr_t)value);
1043
1044 Thread *thread = egl::GetCurrentThread();
1045
1046 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1047 Surface *surfacePacked = PackParam<Surface *>(surface);
1048
1049 ANGLE_EGL_VALIDATE(thread, QuerySurface64KHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1050 dpyPacked, surfacePacked, attribute, value);
1051
1052 return QuerySurface64KHR(thread, dpyPacked, surfacePacked, attribute, value);
1053 }
1054
EGL_UnlockSurfaceKHR(EGLDisplay dpy,EGLSurface surface)1055 EGLBoolean EGLAPIENTRY EGL_UnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
1056 {
1057
1058 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
1059 ANGLE_SCOPED_GLOBAL_LOCK();
1060 EGL_EVENT(UnlockSurfaceKHR, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "",
1061 (uintptr_t)dpy, (uintptr_t)surface);
1062
1063 Thread *thread = egl::GetCurrentThread();
1064
1065 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1066 Surface *surfacePacked = PackParam<Surface *>(surface);
1067
1068 ANGLE_EGL_VALIDATE(thread, UnlockSurfaceKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1069 dpyPacked, surfacePacked);
1070
1071 return UnlockSurfaceKHR(thread, dpyPacked, surfacePacked);
1072 }
1073
1074 // EGL_KHR_partial_update
EGL_SetDamageRegionKHR(EGLDisplay dpy,EGLSurface surface,EGLint * rects,EGLint n_rects)1075 EGLBoolean EGLAPIENTRY EGL_SetDamageRegionKHR(EGLDisplay dpy,
1076 EGLSurface surface,
1077 EGLint *rects,
1078 EGLint n_rects)
1079 {
1080
1081 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
1082 ANGLE_SCOPED_GLOBAL_LOCK();
1083 EGL_EVENT(SetDamageRegionKHR,
1084 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", rects = 0x%016" PRIxPTR
1085 ", n_rects = %d",
1086 (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)rects, n_rects);
1087
1088 Thread *thread = egl::GetCurrentThread();
1089
1090 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1091 Surface *surfacePacked = PackParam<Surface *>(surface);
1092
1093 ANGLE_EGL_VALIDATE(thread, SetDamageRegionKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1094 dpyPacked, surfacePacked, rects, n_rects);
1095
1096 return SetDamageRegionKHR(thread, dpyPacked, surfacePacked, rects, n_rects);
1097 }
1098
1099 // EGL_KHR_reusable_sync
EGL_SignalSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLenum mode)1100 EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
1101 {
1102
1103 ANGLE_SCOPED_GLOBAL_LOCK();
1104 EGL_EVENT(SignalSyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", mode = 0x%X",
1105 (uintptr_t)dpy, (uintptr_t)sync, mode);
1106
1107 Thread *thread = egl::GetCurrentThread();
1108
1109 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1110 Sync *syncPacked = PackParam<Sync *>(sync);
1111
1112 ANGLE_EGL_VALIDATE(thread, SignalSyncKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
1113 syncPacked, mode);
1114
1115 return SignalSyncKHR(thread, dpyPacked, syncPacked, mode);
1116 }
1117
1118 // ClientWaitSyncKHR is already defined.
1119
1120 // CreateSyncKHR is already defined.
1121
1122 // DestroySyncKHR is already defined.
1123
1124 // GetSyncAttribKHR is already defined.
1125
1126 // EGL_KHR_stream
EGL_CreateStreamKHR(EGLDisplay dpy,const EGLint * attrib_list)1127 EGLStreamKHR EGLAPIENTRY EGL_CreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list)
1128 {
1129
1130 ANGLE_SCOPED_GLOBAL_LOCK();
1131 EGL_EVENT(CreateStreamKHR, "dpy = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "",
1132 (uintptr_t)dpy, (uintptr_t)attrib_list);
1133
1134 Thread *thread = egl::GetCurrentThread();
1135
1136 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1137 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
1138
1139 ANGLE_EGL_VALIDATE(thread, CreateStreamKHR, GetDisplayIfValid(dpyPacked), EGLStreamKHR,
1140 dpyPacked, attrib_listPacked);
1141
1142 return CreateStreamKHR(thread, dpyPacked, attrib_listPacked);
1143 }
1144
EGL_DestroyStreamKHR(EGLDisplay dpy,EGLStreamKHR stream)1145 EGLBoolean EGLAPIENTRY EGL_DestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream)
1146 {
1147
1148 ANGLE_SCOPED_GLOBAL_LOCK();
1149 EGL_EVENT(DestroyStreamKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "",
1150 (uintptr_t)dpy, (uintptr_t)stream);
1151
1152 Thread *thread = egl::GetCurrentThread();
1153
1154 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1155 Stream *streamPacked = PackParam<Stream *>(stream);
1156
1157 ANGLE_EGL_VALIDATE(thread, DestroyStreamKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1158 dpyPacked, streamPacked);
1159
1160 return DestroyStreamKHR(thread, dpyPacked, streamPacked);
1161 }
1162
EGL_QueryStreamKHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLint * value)1163 EGLBoolean EGLAPIENTRY EGL_QueryStreamKHR(EGLDisplay dpy,
1164 EGLStreamKHR stream,
1165 EGLenum attribute,
1166 EGLint *value)
1167 {
1168
1169 ANGLE_SCOPED_GLOBAL_LOCK();
1170 EGL_EVENT(QueryStreamKHR,
1171 "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR
1172 ", attribute = 0x%X, value = 0x%016" PRIxPTR "",
1173 (uintptr_t)dpy, (uintptr_t)stream, attribute, (uintptr_t)value);
1174
1175 Thread *thread = egl::GetCurrentThread();
1176
1177 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1178 Stream *streamPacked = PackParam<Stream *>(stream);
1179
1180 ANGLE_EGL_VALIDATE(thread, QueryStreamKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
1181 streamPacked, attribute, value);
1182
1183 return QueryStreamKHR(thread, dpyPacked, streamPacked, attribute, value);
1184 }
1185
EGL_QueryStreamu64KHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLuint64KHR * value)1186 EGLBoolean EGLAPIENTRY EGL_QueryStreamu64KHR(EGLDisplay dpy,
1187 EGLStreamKHR stream,
1188 EGLenum attribute,
1189 EGLuint64KHR *value)
1190 {
1191
1192 ANGLE_SCOPED_GLOBAL_LOCK();
1193 EGL_EVENT(QueryStreamu64KHR,
1194 "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR
1195 ", attribute = 0x%X, value = 0x%016" PRIxPTR "",
1196 (uintptr_t)dpy, (uintptr_t)stream, attribute, (uintptr_t)value);
1197
1198 Thread *thread = egl::GetCurrentThread();
1199
1200 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1201 Stream *streamPacked = PackParam<Stream *>(stream);
1202
1203 ANGLE_EGL_VALIDATE(thread, QueryStreamu64KHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1204 dpyPacked, streamPacked, attribute, value);
1205
1206 return QueryStreamu64KHR(thread, dpyPacked, streamPacked, attribute, value);
1207 }
1208
EGL_StreamAttribKHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLint value)1209 EGLBoolean EGLAPIENTRY EGL_StreamAttribKHR(EGLDisplay dpy,
1210 EGLStreamKHR stream,
1211 EGLenum attribute,
1212 EGLint value)
1213 {
1214
1215 ANGLE_SCOPED_GLOBAL_LOCK();
1216 EGL_EVENT(StreamAttribKHR,
1217 "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR ", attribute = 0x%X, value = %d",
1218 (uintptr_t)dpy, (uintptr_t)stream, attribute, value);
1219
1220 Thread *thread = egl::GetCurrentThread();
1221
1222 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1223 Stream *streamPacked = PackParam<Stream *>(stream);
1224
1225 ANGLE_EGL_VALIDATE(thread, StreamAttribKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
1226 streamPacked, attribute, value);
1227
1228 return StreamAttribKHR(thread, dpyPacked, streamPacked, attribute, value);
1229 }
1230
1231 // EGL_KHR_stream_consumer_gltexture
EGL_StreamConsumerAcquireKHR(EGLDisplay dpy,EGLStreamKHR stream)1232 EGLBoolean EGLAPIENTRY EGL_StreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream)
1233 {
1234
1235 ANGLE_SCOPED_GLOBAL_LOCK();
1236 EGL_EVENT(StreamConsumerAcquireKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "",
1237 (uintptr_t)dpy, (uintptr_t)stream);
1238
1239 Thread *thread = egl::GetCurrentThread();
1240
1241 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1242 Stream *streamPacked = PackParam<Stream *>(stream);
1243
1244 ANGLE_EGL_VALIDATE(thread, StreamConsumerAcquireKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1245 dpyPacked, streamPacked);
1246
1247 return StreamConsumerAcquireKHR(thread, dpyPacked, streamPacked);
1248 }
1249
EGL_StreamConsumerGLTextureExternalKHR(EGLDisplay dpy,EGLStreamKHR stream)1250 EGLBoolean EGLAPIENTRY EGL_StreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream)
1251 {
1252
1253 ANGLE_SCOPED_GLOBAL_LOCK();
1254 EGL_EVENT(StreamConsumerGLTextureExternalKHR,
1255 "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", (uintptr_t)dpy,
1256 (uintptr_t)stream);
1257
1258 Thread *thread = egl::GetCurrentThread();
1259
1260 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1261 Stream *streamPacked = PackParam<Stream *>(stream);
1262
1263 ANGLE_EGL_VALIDATE(thread, StreamConsumerGLTextureExternalKHR, GetDisplayIfValid(dpyPacked),
1264 EGLBoolean, dpyPacked, streamPacked);
1265
1266 return StreamConsumerGLTextureExternalKHR(thread, dpyPacked, streamPacked);
1267 }
1268
EGL_StreamConsumerReleaseKHR(EGLDisplay dpy,EGLStreamKHR stream)1269 EGLBoolean EGLAPIENTRY EGL_StreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream)
1270 {
1271
1272 ANGLE_SCOPED_GLOBAL_LOCK();
1273 EGL_EVENT(StreamConsumerReleaseKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "",
1274 (uintptr_t)dpy, (uintptr_t)stream);
1275
1276 Thread *thread = egl::GetCurrentThread();
1277
1278 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1279 Stream *streamPacked = PackParam<Stream *>(stream);
1280
1281 ANGLE_EGL_VALIDATE(thread, StreamConsumerReleaseKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1282 dpyPacked, streamPacked);
1283
1284 return StreamConsumerReleaseKHR(thread, dpyPacked, streamPacked);
1285 }
1286
1287 // EGL_KHR_swap_buffers_with_damage
EGL_SwapBuffersWithDamageKHR(EGLDisplay dpy,EGLSurface surface,const EGLint * rects,EGLint n_rects)1288 EGLBoolean EGLAPIENTRY EGL_SwapBuffersWithDamageKHR(EGLDisplay dpy,
1289 EGLSurface surface,
1290 const EGLint *rects,
1291 EGLint n_rects)
1292 {
1293 ANGLE_EGLBOOLEAN_TRY(PrepareSwapBuffersANGLE(dpy, surface));
1294 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
1295 ANGLE_SCOPED_GLOBAL_LOCK();
1296 EGL_EVENT(SwapBuffersWithDamageKHR,
1297 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", rects = 0x%016" PRIxPTR
1298 ", n_rects = %d",
1299 (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)rects, n_rects);
1300
1301 Thread *thread = egl::GetCurrentThread();
1302
1303 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1304 Surface *surfacePacked = PackParam<Surface *>(surface);
1305
1306 ANGLE_EGL_VALIDATE(thread, SwapBuffersWithDamageKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
1307 dpyPacked, surfacePacked, rects, n_rects);
1308
1309 return SwapBuffersWithDamageKHR(thread, dpyPacked, surfacePacked, rects, n_rects);
1310 }
1311
1312 // EGL_KHR_wait_sync
EGL_WaitSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint flags)1313 EGLint EGLAPIENTRY EGL_WaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
1314 {
1315
1316 ANGLE_SCOPED_GLOBAL_LOCK();
1317 EGL_EVENT(WaitSyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d",
1318 (uintptr_t)dpy, (uintptr_t)sync, flags);
1319
1320 Thread *thread = egl::GetCurrentThread();
1321
1322 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1323 Sync *syncPacked = PackParam<Sync *>(sync);
1324
1325 ANGLE_EGL_VALIDATE(thread, WaitSyncKHR, GetDisplayIfValid(dpyPacked), EGLint, dpyPacked,
1326 syncPacked, flags);
1327
1328 return WaitSyncKHR(thread, dpyPacked, syncPacked, flags);
1329 }
1330
1331 // EGL_NV_post_sub_buffer
EGL_PostSubBufferNV(EGLDisplay dpy,EGLSurface surface,EGLint x,EGLint y,EGLint width,EGLint height)1332 EGLBoolean EGLAPIENTRY EGL_PostSubBufferNV(EGLDisplay dpy,
1333 EGLSurface surface,
1334 EGLint x,
1335 EGLint y,
1336 EGLint width,
1337 EGLint height)
1338 {
1339
1340 ANGLE_SCOPED_GLOBAL_SURFACE_LOCK();
1341 ANGLE_SCOPED_GLOBAL_LOCK();
1342 EGL_EVENT(PostSubBufferNV,
1343 "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR
1344 ", x = %d, y = %d, width = %d, height = %d",
1345 (uintptr_t)dpy, (uintptr_t)surface, x, y, width, height);
1346
1347 Thread *thread = egl::GetCurrentThread();
1348
1349 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1350 Surface *surfacePacked = PackParam<Surface *>(surface);
1351
1352 ANGLE_EGL_VALIDATE(thread, PostSubBufferNV, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
1353 surfacePacked, x, y, width, height);
1354
1355 return PostSubBufferNV(thread, dpyPacked, surfacePacked, x, y, width, height);
1356 }
1357
1358 // EGL_NV_stream_consumer_gltexture_yuv
EGL_StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,EGLStreamKHR stream,const EGLAttrib * attrib_list)1359 EGLBoolean EGLAPIENTRY EGL_StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,
1360 EGLStreamKHR stream,
1361 const EGLAttrib *attrib_list)
1362 {
1363
1364 ANGLE_SCOPED_GLOBAL_LOCK();
1365 EGL_EVENT(StreamConsumerGLTextureExternalAttribsNV,
1366 "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR
1367 "",
1368 (uintptr_t)dpy, (uintptr_t)stream, (uintptr_t)attrib_list);
1369
1370 Thread *thread = egl::GetCurrentThread();
1371
1372 egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
1373 Stream *streamPacked = PackParam<Stream *>(stream);
1374 const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
1375
1376 ANGLE_EGL_VALIDATE(thread, StreamConsumerGLTextureExternalAttribsNV,
1377 GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, streamPacked,
1378 attrib_listPacked);
1379
1380 return StreamConsumerGLTextureExternalAttribsNV(thread, dpyPacked, streamPacked,
1381 attrib_listPacked);
1382 }
1383
1384 } // extern "C"
1385