| // GENERATED FILE - DO NOT EDIT. | |
| // Generated by generate_entry_points.py using data from egl.xml and egl_angle_ext.xml. | |
| // | |
| // Copyright 2020 The ANGLE Project Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| // | |
| // entry_points_egl_ext_autogen.cpp: | |
| // Defines the EGL Extension entry points. | |
| #include "libGLESv2/entry_points_egl_ext_autogen.h" | |
| #include "libANGLE/EGLSync.h" | |
| #include "libANGLE/capture/capture_egl_autogen.h" | |
| #include "libANGLE/entry_points_utils.h" | |
| #include "libANGLE/validationEGL_autogen.h" | |
| #include "libGLESv2/egl_context_lock_impl.h" | |
| #include "libGLESv2/egl_ext_stubs_autogen.h" | |
| #include "libGLESv2/global_state.h" | |
| using namespace egl; | |
| extern "C" { | |
| // EGL_ANDROID_blob_cache | |
| void EGLAPIENTRY EGL_SetBlobCacheFuncsANDROID(EGLDisplay dpy, | |
| EGLSetBlobFuncANDROID set, | |
| EGLGetBlobFuncANDROID get) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(SetBlobCacheFuncsANDROID, | |
| "dpy = 0x%016" PRIxPTR ", set = 0x%016" PRIxPTR ", get = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)set, (uintptr_t)get); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(SetBlobCacheFuncsANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, SetBlobCacheFuncsANDROID, validDisplay, | |
| validDisplay, set, get); | |
| } | |
| else | |
| { | |
| } | |
| SetBlobCacheFuncsANDROID(thread, dpyPacked, set, get); | |
| } | |
| ANGLE_CAPTURE_EGL(SetBlobCacheFuncsANDROID, true, thread, dpyPacked, set, get); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| // EGL_ANDROID_create_native_client_buffer | |
| EGLClientBuffer EGLAPIENTRY EGL_CreateNativeClientBufferANDROID(const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLClientBuffer returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(CreateNativeClientBufferANDROID, "attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)attrib_list); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CreateNativeClientBufferANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreateNativeClientBufferANDROID, nullptr, | |
| EGLClientBuffer, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = CreateNativeClientBufferANDROID(thread, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(CreateNativeClientBufferANDROID, true, thread, attrib_listPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANDROID_get_frame_timestamps | |
| EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingSupportedANDROID(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint name) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetCompositorTimingSupportedANDROID, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", name = %d", (uintptr_t)dpy, | |
| (uintptr_t)surface, name); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| CompositorTiming namePacked = PackParam<CompositorTiming>(name); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetCompositorTimingSupportedANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetCompositorTimingSupportedANDROID, validDisplay, | |
| EGLBoolean, validDisplay, surfacePackedObject, namePacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = GetCompositorTimingSupportedANDROID(thread, validDisplay, | |
| surfacePackedObject, namePacked); | |
| } | |
| ANGLE_CAPTURE_EGL(GetCompositorTimingSupportedANDROID, true, thread, dpyPacked, | |
| surfacePacked, namePacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingANDROID(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint numTimestamps, | |
| const EGLint *names, | |
| EGLnsecsANDROID *values) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetCompositorTimingANDROID, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR | |
| ", numTimestamps = %d, names = 0x%016" PRIxPTR ", values = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface, numTimestamps, (uintptr_t)names, | |
| (uintptr_t)values); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetCompositorTimingANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetCompositorTimingANDROID, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, numTimestamps, names, values); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = GetCompositorTimingANDROID(thread, validDisplay, surfacePackedObject, | |
| numTimestamps, names, values); | |
| } | |
| ANGLE_CAPTURE_EGL(GetCompositorTimingANDROID, true, thread, dpyPacked, surfacePacked, | |
| numTimestamps, names, values, returnValue); | |
| } | |
| egl::Display::GetCurrentThreadUnlockedTailCall()->run(&returnValue); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_GetNextFrameIdANDROID(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLuint64KHR *frameId) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetNextFrameIdANDROID, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", frameId = 0x%016" PRIxPTR | |
| "", | |
| (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)frameId); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetNextFrameIdANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetNextFrameIdANDROID, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, frameId); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = GetNextFrameIdANDROID(thread, validDisplay, surfacePackedObject, frameId); | |
| } | |
| ANGLE_CAPTURE_EGL(GetNextFrameIdANDROID, true, thread, dpyPacked, surfacePacked, frameId, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampSupportedANDROID(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint timestamp) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetFrameTimestampSupportedANDROID, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", timestamp = %d", | |
| (uintptr_t)dpy, (uintptr_t)surface, timestamp); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| Timestamp timestampPacked = PackParam<Timestamp>(timestamp); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetFrameTimestampSupportedANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetFrameTimestampSupportedANDROID, validDisplay, | |
| EGLBoolean, validDisplay, surfacePackedObject, timestampPacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = GetFrameTimestampSupportedANDROID(thread, validDisplay, | |
| surfacePackedObject, timestampPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(GetFrameTimestampSupportedANDROID, true, thread, dpyPacked, surfacePacked, | |
| timestampPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampsANDROID(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLuint64KHR frameId, | |
| EGLint numTimestamps, | |
| const EGLint *timestamps, | |
| EGLnsecsANDROID *values) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetFrameTimestampsANDROID, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR | |
| ", frameId = %llu, numTimestamps = %d, timestamps = 0x%016" PRIxPTR | |
| ", values = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface, static_cast<unsigned long long>(frameId), | |
| numTimestamps, (uintptr_t)timestamps, (uintptr_t)values); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetFrameTimestampsANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetFrameTimestampsANDROID, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, frameId, numTimestamps, | |
| timestamps, values); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = GetFrameTimestampsANDROID(thread, validDisplay, surfacePackedObject, | |
| frameId, numTimestamps, timestamps, values); | |
| } | |
| ANGLE_CAPTURE_EGL(GetFrameTimestampsANDROID, true, thread, dpyPacked, surfacePacked, | |
| frameId, numTimestamps, timestamps, values, returnValue); | |
| } | |
| egl::Display::GetCurrentThreadUnlockedTailCall()->run(&returnValue); | |
| return returnValue; | |
| } | |
| // EGL_ANDROID_get_native_client_buffer | |
| EGLClientBuffer EGLAPIENTRY EGL_GetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLClientBuffer returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(GetNativeClientBufferANDROID, "buffer = 0x%016" PRIxPTR "", (uintptr_t)buffer); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetNativeClientBufferANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetNativeClientBufferANDROID, nullptr, EGLClientBuffer, | |
| buffer); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = GetNativeClientBufferANDROID(thread, buffer); | |
| } | |
| ANGLE_CAPTURE_EGL(GetNativeClientBufferANDROID, true, thread, buffer, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANDROID_native_fence_sync | |
| EGLint EGLAPIENTRY EGL_DupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLint returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(DupNativeFenceFDANDROID, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)sync); | |
| egl::SyncID syncPacked = PackParam<egl::SyncID>(sync); | |
| egl::ScopedSyncRef syncPackedRef = GetSyncIfValid(validDisplay, syncPacked); | |
| egl::Sync *syncPackedObject = syncPackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(DupNativeFenceFDANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, DupNativeFenceFDANDROID, validDisplay, EGLint, | |
| validDisplay, syncPackedObject); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = DupNativeFenceFDANDROID(thread, validDisplay, syncPackedObject); | |
| } | |
| ANGLE_CAPTURE_EGL(DupNativeFenceFDANDROID, true, thread, dpyPacked, syncPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANDROID_presentation_time | |
| EGLBoolean EGLAPIENTRY EGL_PresentationTimeANDROID(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLnsecsANDROID time) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(PresentationTimeANDROID, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", time = %llu", | |
| (uintptr_t)dpy, (uintptr_t)surface, static_cast<unsigned long long>(time)); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(PresentationTimeANDROID, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, PresentationTimeANDROID, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, time); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = PresentationTimeANDROID(thread, validDisplay, surfacePackedObject, time); | |
| } | |
| ANGLE_CAPTURE_EGL(PresentationTimeANDROID, true, thread, dpyPacked, surfacePacked, time, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_device_creation | |
| EGLDeviceEXT EGLAPIENTRY EGL_CreateDeviceANGLE(EGLint device_type, | |
| void *native_device, | |
| const EGLAttrib *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLDeviceEXT returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(CreateDeviceANGLE, | |
| "device_type = %d, native_device = 0x%016" PRIxPTR | |
| ", attrib_list = 0x%016" PRIxPTR "", | |
| device_type, (uintptr_t)native_device, (uintptr_t)attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CreateDeviceANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreateDeviceANGLE, nullptr, EGLDeviceEXT, device_type, | |
| native_device, attrib_list); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = CreateDeviceANGLE(thread, device_type, native_device, attrib_list); | |
| } | |
| ANGLE_CAPTURE_EGL(CreateDeviceANGLE, true, thread, device_type, native_device, attrib_list, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_ReleaseDeviceANGLE(EGLDeviceEXT device) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(ReleaseDeviceANGLE, "device = 0x%016" PRIxPTR "", (uintptr_t)device); | |
| egl::Device *devicePacked = PackParam<egl::Device *>(device); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ReleaseDeviceANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, ReleaseDeviceANGLE, nullptr, EGLBoolean, devicePacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = ReleaseDeviceANGLE(thread, devicePacked); | |
| } | |
| ANGLE_CAPTURE_EGL(ReleaseDeviceANGLE, true, thread, devicePacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_device_vulkan | |
| void EGLAPIENTRY EGL_LockVulkanQueueANGLE(EGLDisplay dpy) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayRef dpyPackedRef = GetDisplayIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(LockVulkanQueueANGLE, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy); | |
| { | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, LockVulkanQueueANGLE, validDisplay, validDisplay); | |
| } | |
| else | |
| { | |
| } | |
| LockVulkanQueueANGLE(thread, dpyPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(LockVulkanQueueANGLE, true, thread, dpyPacked); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| void EGLAPIENTRY EGL_UnlockVulkanQueueANGLE(EGLDisplay dpy) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayRef dpyPackedRef = GetDisplayIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(UnlockVulkanQueueANGLE, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy); | |
| { | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, UnlockVulkanQueueANGLE, validDisplay, validDisplay); | |
| } | |
| else | |
| { | |
| } | |
| UnlockVulkanQueueANGLE(thread, dpyPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(UnlockVulkanQueueANGLE, true, thread, dpyPacked); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| // EGL_ANGLE_external_context_and_surface | |
| void EGLAPIENTRY EGL_AcquireExternalContextANGLE(EGLDisplay dpy, EGLSurface drawAndRead) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(AcquireExternalContextANGLE, | |
| "dpy = 0x%016" PRIxPTR ", drawAndRead = 0x%016" PRIxPTR "", (uintptr_t)dpy, | |
| (uintptr_t)drawAndRead); | |
| SurfaceID drawAndReadPacked = PackParam<SurfaceID>(drawAndRead); | |
| egl::ScopedSurfacesLockAndRef<3> drawAndReadPackedRef({ | |
| GetSurfaceRefIfValid(validDisplay, drawAndReadPacked), | |
| egl::ScopedSurfaceRef(thread->getDisplay(), thread->getCurrentDrawSurface()), | |
| egl::ScopedSurfaceRef(thread->getDisplay(), thread->getCurrentReadSurface()), | |
| }); | |
| egl::Surface *drawAndReadPackedObject = drawAndReadPackedRef.get(0); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(AcquireExternalContextANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, AcquireExternalContextANGLE, validDisplay, | |
| validDisplay, drawAndReadPackedObject); | |
| } | |
| else | |
| { | |
| } | |
| AcquireExternalContextANGLE(thread, validDisplay, drawAndReadPackedObject); | |
| } | |
| ANGLE_CAPTURE_EGL(AcquireExternalContextANGLE, true, thread, dpyPacked, drawAndReadPacked); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| void EGLAPIENTRY EGL_ReleaseExternalContextANGLE(EGLDisplay dpy) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ReleaseExternalContextANGLE, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ReleaseExternalContextANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, ReleaseExternalContextANGLE, validDisplay, | |
| validDisplay); | |
| } | |
| else | |
| { | |
| } | |
| ReleaseExternalContextANGLE(thread, dpyPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(ReleaseExternalContextANGLE, true, thread, dpyPacked); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| // EGL_ANGLE_feature_control | |
| const char *EGLAPIENTRY EGL_QueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| const char *returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QueryStringiANGLE, "dpy = 0x%016" PRIxPTR ", name = %d, index = %d", | |
| (uintptr_t)dpy, name, index); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryStringiANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryStringiANGLE, validDisplay, const char *, | |
| validDisplay, name, index); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryStringiANGLE(thread, dpyPacked, name, index); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryStringiANGLE, true, thread, dpyPacked, name, index, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribANGLE(EGLDisplay dpy, | |
| EGLint attribute, | |
| EGLAttrib *value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QueryDisplayAttribANGLE, | |
| "dpy = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, attribute, (uintptr_t)value); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryDisplayAttribANGLE, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryDisplayAttribANGLE, validDisplay, EGLBoolean, | |
| validDisplay, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryDisplayAttribANGLE(thread, dpyPacked, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryDisplayAttribANGLE, true, thread, dpyPacked, attribute, value, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_metal_shared_event_sync | |
| void *EGLAPIENTRY EGL_CopyMetalSharedEventANGLE(EGLDisplay dpy, EGLSyncKHR sync) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| void *returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(CopyMetalSharedEventANGLE, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)sync); | |
| egl::SyncID syncPacked = PackParam<egl::SyncID>(sync); | |
| egl::ScopedSyncRef syncPackedRef = GetSyncIfValid(validDisplay, syncPacked); | |
| egl::Sync *syncPackedObject = syncPackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CopyMetalSharedEventANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CopyMetalSharedEventANGLE, validDisplay, void *, | |
| validDisplay, syncPackedObject); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = CopyMetalSharedEventANGLE(thread, validDisplay, syncPackedObject); | |
| } | |
| ANGLE_CAPTURE_EGL(CopyMetalSharedEventANGLE, true, thread, dpyPacked, syncPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_no_error | |
| void EGLAPIENTRY EGL_SetValidationEnabledANGLE(EGLBoolean validationState) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(SetValidationEnabledANGLE, "validationState = %u", validationState); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(SetValidationEnabledANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, SetValidationEnabledANGLE, nullptr, | |
| validationState); | |
| } | |
| else | |
| { | |
| } | |
| SetValidationEnabledANGLE(thread, validationState); | |
| } | |
| ANGLE_CAPTURE_EGL(SetValidationEnabledANGLE, true, thread, validationState); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| // EGL_ANGLE_power_preference | |
| void EGLAPIENTRY EGL_ReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ReleaseHighPowerGPUANGLE, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)ctx); | |
| gl::ContextID ctxPacked = PackParam<gl::ContextID>(ctx); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK_DPY(ReleaseHighPowerGPUANGLE, thread, validDisplay, | |
| ctxPacked); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, ReleaseHighPowerGPUANGLE, validDisplay, | |
| validDisplay, ctxPacked); | |
| } | |
| else | |
| { | |
| } | |
| ReleaseHighPowerGPUANGLE(thread, dpyPacked, ctxPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(ReleaseHighPowerGPUANGLE, true, thread, dpyPacked, ctxPacked); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| void EGLAPIENTRY EGL_ReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ReacquireHighPowerGPUANGLE, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)ctx); | |
| gl::ContextID ctxPacked = PackParam<gl::ContextID>(ctx); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK_DPY(ReacquireHighPowerGPUANGLE, thread, validDisplay, | |
| ctxPacked); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, ReacquireHighPowerGPUANGLE, validDisplay, | |
| validDisplay, ctxPacked); | |
| } | |
| else | |
| { | |
| } | |
| ReacquireHighPowerGPUANGLE(thread, dpyPacked, ctxPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(ReacquireHighPowerGPUANGLE, true, thread, dpyPacked, ctxPacked); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| void EGLAPIENTRY EGL_HandleGPUSwitchANGLE(EGLDisplay dpy) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(HandleGPUSwitchANGLE, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(HandleGPUSwitchANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, HandleGPUSwitchANGLE, validDisplay, validDisplay); | |
| } | |
| else | |
| { | |
| } | |
| HandleGPUSwitchANGLE(thread, dpyPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(HandleGPUSwitchANGLE, true, thread, dpyPacked); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| void EGLAPIENTRY EGL_ForceGPUSwitchANGLE(EGLDisplay dpy, EGLint gpuIDHigh, EGLint gpuIDLow) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ForceGPUSwitchANGLE, "dpy = 0x%016" PRIxPTR ", gpuIDHigh = %d, gpuIDLow = %d", | |
| (uintptr_t)dpy, gpuIDHigh, gpuIDLow); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ForceGPUSwitchANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, ForceGPUSwitchANGLE, validDisplay, validDisplay, | |
| gpuIDHigh, gpuIDLow); | |
| } | |
| else | |
| { | |
| } | |
| ForceGPUSwitchANGLE(thread, dpyPacked, gpuIDHigh, gpuIDLow); | |
| } | |
| ANGLE_CAPTURE_EGL(ForceGPUSwitchANGLE, true, thread, dpyPacked, gpuIDHigh, gpuIDLow); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| // EGL_ANGLE_prepare_swap_buffers | |
| EGLBoolean EGLAPIENTRY EGL_PrepareSwapBuffersANGLE(EGLDisplay dpy, EGLSurface surface) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(PrepareSwapBuffersANGLE, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(PrepareSwapBuffersANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, PrepareSwapBuffersANGLE, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = PrepareSwapBuffersANGLE(thread, validDisplay, surfacePackedObject); | |
| } | |
| ANGLE_CAPTURE_EGL(PrepareSwapBuffersANGLE, true, thread, dpyPacked, surfacePacked, | |
| returnValue); | |
| } | |
| egl::Display::GetCurrentThreadUnlockedTailCall()->run(nullptr); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_program_cache_control | |
| EGLint EGLAPIENTRY EGL_ProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLint returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ProgramCacheGetAttribANGLE, "dpy = 0x%016" PRIxPTR ", attrib = 0x%X", | |
| (uintptr_t)dpy, attrib); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ProgramCacheGetAttribANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, ProgramCacheGetAttribANGLE, validDisplay, EGLint, | |
| validDisplay, attrib); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = ProgramCacheGetAttribANGLE(thread, dpyPacked, attrib); | |
| } | |
| ANGLE_CAPTURE_EGL(ProgramCacheGetAttribANGLE, true, thread, dpyPacked, attrib, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| void EGLAPIENTRY EGL_ProgramCacheQueryANGLE(EGLDisplay dpy, | |
| EGLint index, | |
| void *key, | |
| EGLint *keysize, | |
| void *binary, | |
| EGLint *binarysize) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ProgramCacheQueryANGLE, | |
| "dpy = 0x%016" PRIxPTR ", index = %d, key = 0x%016" PRIxPTR | |
| ", keysize = 0x%016" PRIxPTR ", binary = 0x%016" PRIxPTR | |
| ", binarysize = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, index, (uintptr_t)key, (uintptr_t)keysize, (uintptr_t)binary, | |
| (uintptr_t)binarysize); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ProgramCacheQueryANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, ProgramCacheQueryANGLE, validDisplay, validDisplay, | |
| index, key, keysize, binary, binarysize); | |
| } | |
| else | |
| { | |
| } | |
| ProgramCacheQueryANGLE(thread, dpyPacked, index, key, keysize, binary, binarysize); | |
| } | |
| ANGLE_CAPTURE_EGL(ProgramCacheQueryANGLE, true, thread, dpyPacked, index, key, keysize, | |
| binary, binarysize); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| void EGLAPIENTRY EGL_ProgramCachePopulateANGLE(EGLDisplay dpy, | |
| const void *key, | |
| EGLint keysize, | |
| const void *binary, | |
| EGLint binarysize) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ProgramCachePopulateANGLE, | |
| "dpy = 0x%016" PRIxPTR ", key = 0x%016" PRIxPTR | |
| ", keysize = %d, binary = 0x%016" PRIxPTR ", binarysize = %d", | |
| (uintptr_t)dpy, (uintptr_t)key, keysize, (uintptr_t)binary, binarysize); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ProgramCachePopulateANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, ProgramCachePopulateANGLE, validDisplay, | |
| validDisplay, key, keysize, binary, binarysize); | |
| } | |
| else | |
| { | |
| } | |
| ProgramCachePopulateANGLE(thread, dpyPacked, key, keysize, binary, binarysize); | |
| } | |
| ANGLE_CAPTURE_EGL(ProgramCachePopulateANGLE, true, thread, dpyPacked, key, keysize, binary, | |
| binarysize); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| EGLint EGLAPIENTRY EGL_ProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLint returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ProgramCacheResizeANGLE, "dpy = 0x%016" PRIxPTR ", limit = %d, mode = %d", | |
| (uintptr_t)dpy, limit, mode); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ProgramCacheResizeANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, ProgramCacheResizeANGLE, validDisplay, EGLint, | |
| validDisplay, limit, mode); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = ProgramCacheResizeANGLE(thread, dpyPacked, limit, mode); | |
| } | |
| ANGLE_CAPTURE_EGL(ProgramCacheResizeANGLE, true, thread, dpyPacked, limit, mode, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_query_surface_pointer | |
| EGLBoolean EGLAPIENTRY EGL_QuerySurfacePointerANGLE(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint attribute, | |
| void **value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(QuerySurfacePointerANGLE, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR | |
| ", attribute = %d, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface, attribute, (uintptr_t)value); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QuerySurfacePointerANGLE, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QuerySurfacePointerANGLE, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QuerySurfacePointerANGLE(thread, validDisplay, surfacePackedObject, | |
| attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QuerySurfacePointerANGLE, true, thread, dpyPacked, surfacePacked, | |
| attribute, value, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_stream_producer_d3d_texture | |
| EGLBoolean EGLAPIENTRY EGL_CreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, | |
| EGLStreamKHR stream, | |
| const EGLAttrib *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(CreateStreamProducerD3DTextureANGLE, | |
| "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR | |
| ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream, (uintptr_t)attrib_list); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CreateStreamProducerD3DTextureANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreateStreamProducerD3DTextureANGLE, validDisplay, | |
| EGLBoolean, validDisplay, streamPacked, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = CreateStreamProducerD3DTextureANGLE(thread, dpyPacked, streamPacked, | |
| attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(CreateStreamProducerD3DTextureANGLE, true, thread, dpyPacked, | |
| streamPacked, attrib_listPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_StreamPostD3DTextureANGLE(EGLDisplay dpy, | |
| EGLStreamKHR stream, | |
| void *texture, | |
| const EGLAttrib *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(StreamPostD3DTextureANGLE, | |
| "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR ", texture = 0x%016" PRIxPTR | |
| ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream, (uintptr_t)texture, (uintptr_t)attrib_list); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(StreamPostD3DTextureANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, StreamPostD3DTextureANGLE, validDisplay, EGLBoolean, | |
| validDisplay, streamPacked, texture, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = StreamPostD3DTextureANGLE(thread, dpyPacked, streamPacked, texture, | |
| attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(StreamPostD3DTextureANGLE, true, thread, dpyPacked, streamPacked, texture, | |
| attrib_listPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_sync_control_rate | |
| EGLBoolean EGLAPIENTRY EGL_GetMscRateANGLE(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint *numerator, | |
| EGLint *denominator) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetMscRateANGLE, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", numerator = 0x%016" PRIxPTR | |
| ", denominator = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)numerator, (uintptr_t)denominator); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetMscRateANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetMscRateANGLE, validDisplay, EGLBoolean, validDisplay, | |
| surfacePackedObject, numerator, denominator); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| GetMscRateANGLE(thread, validDisplay, surfacePackedObject, numerator, denominator); | |
| } | |
| ANGLE_CAPTURE_EGL(GetMscRateANGLE, true, thread, dpyPacked, surfacePacked, numerator, | |
| denominator, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_vulkan_image | |
| EGLBoolean EGLAPIENTRY EGL_ExportVkImageANGLE(EGLDisplay dpy, | |
| EGLImage image, | |
| void *vk_image, | |
| void *vk_image_create_info) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(ExportVkImageANGLE, | |
| "dpy = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR ", vk_image = 0x%016" PRIxPTR | |
| ", vk_image_create_info = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)image, (uintptr_t)vk_image, | |
| (uintptr_t)vk_image_create_info); | |
| ImageID imagePacked = PackParam<ImageID>(image); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ExportVkImageANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, ExportVkImageANGLE, validDisplay, EGLBoolean, | |
| validDisplay, imagePacked, vk_image, vk_image_create_info); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| ExportVkImageANGLE(thread, dpyPacked, imagePacked, vk_image, vk_image_create_info); | |
| } | |
| ANGLE_CAPTURE_EGL(ExportVkImageANGLE, true, thread, dpyPacked, imagePacked, vk_image, | |
| vk_image_create_info, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_ANGLE_wait_until_work_scheduled | |
| void EGLAPIENTRY EGL_WaitUntilWorkScheduledANGLE(EGLDisplay dpy) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(WaitUntilWorkScheduledANGLE, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(WaitUntilWorkScheduledANGLE, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE_VOID(thread, WaitUntilWorkScheduledANGLE, validDisplay, | |
| validDisplay); | |
| } | |
| else | |
| { | |
| } | |
| WaitUntilWorkScheduledANGLE(thread, dpyPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(WaitUntilWorkScheduledANGLE, true, thread, dpyPacked); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| } | |
| // EGL_CHROMIUM_sync_control | |
| EGLBoolean EGLAPIENTRY EGL_GetSyncValuesCHROMIUM(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLuint64KHR *ust, | |
| EGLuint64KHR *msc, | |
| EGLuint64KHR *sbc) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetSyncValuesCHROMIUM, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", ust = 0x%016" PRIxPTR | |
| ", msc = 0x%016" PRIxPTR ", sbc = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)ust, (uintptr_t)msc, | |
| (uintptr_t)sbc); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetSyncValuesCHROMIUM, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetSyncValuesCHROMIUM, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, ust, msc, sbc); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| GetSyncValuesCHROMIUM(thread, validDisplay, surfacePackedObject, ust, msc, sbc); | |
| } | |
| ANGLE_CAPTURE_EGL(GetSyncValuesCHROMIUM, true, thread, dpyPacked, surfacePacked, ust, msc, | |
| sbc, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_EXT_device_query | |
| EGLBoolean EGLAPIENTRY EGL_QueryDeviceAttribEXT(EGLDeviceEXT device, | |
| EGLint attribute, | |
| EGLAttrib *value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(QueryDeviceAttribEXT, | |
| "device = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)device, attribute, (uintptr_t)value); | |
| egl::Device *devicePacked = PackParam<egl::Device *>(device); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryDeviceAttribEXT, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryDeviceAttribEXT, nullptr, EGLBoolean, devicePacked, | |
| attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryDeviceAttribEXT(thread, devicePacked, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryDeviceAttribEXT, true, thread, devicePacked, attribute, value, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| const char *EGLAPIENTRY EGL_QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| const char *returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(QueryDeviceStringEXT, "device = 0x%016" PRIxPTR ", name = %d", (uintptr_t)device, | |
| name); | |
| egl::Device *devicePacked = PackParam<egl::Device *>(device); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryDeviceStringEXT, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryDeviceStringEXT, nullptr, const char *, | |
| devicePacked, name); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryDeviceStringEXT(thread, devicePacked, name); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryDeviceStringEXT, true, thread, devicePacked, name, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QueryDisplayAttribEXT, | |
| "dpy = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, attribute, (uintptr_t)value); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryDisplayAttribEXT, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryDisplayAttribEXT, validDisplay, EGLBoolean, | |
| validDisplay, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryDisplayAttribEXT(thread, dpyPacked, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryDisplayAttribEXT, true, thread, dpyPacked, attribute, value, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_EXT_image_dma_buf_import_modifiers | |
| EGLBoolean EGLAPIENTRY EGL_QueryDmaBufFormatsEXT(EGLDisplay dpy, | |
| EGLint max_formats, | |
| EGLint *formats, | |
| EGLint *num_formats) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QueryDmaBufFormatsEXT, | |
| "dpy = 0x%016" PRIxPTR ", max_formats = %d, formats = 0x%016" PRIxPTR | |
| ", num_formats = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, max_formats, (uintptr_t)formats, (uintptr_t)num_formats); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryDmaBufFormatsEXT, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryDmaBufFormatsEXT, validDisplay, EGLBoolean, | |
| validDisplay, max_formats, formats, num_formats); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| QueryDmaBufFormatsEXT(thread, dpyPacked, max_formats, formats, num_formats); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryDmaBufFormatsEXT, true, thread, dpyPacked, max_formats, formats, | |
| num_formats, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_QueryDmaBufModifiersEXT(EGLDisplay dpy, | |
| EGLint format, | |
| EGLint max_modifiers, | |
| EGLuint64KHR *modifiers, | |
| EGLBoolean *external_only, | |
| EGLint *num_modifiers) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QueryDmaBufModifiersEXT, | |
| "dpy = 0x%016" PRIxPTR | |
| ", format = %d, max_modifiers = %d, modifiers = 0x%016" PRIxPTR | |
| ", external_only = 0x%016" PRIxPTR ", num_modifiers = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, format, max_modifiers, (uintptr_t)modifiers, | |
| (uintptr_t)external_only, (uintptr_t)num_modifiers); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryDmaBufModifiersEXT, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryDmaBufModifiersEXT, validDisplay, EGLBoolean, | |
| validDisplay, format, max_modifiers, modifiers, external_only, | |
| num_modifiers); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryDmaBufModifiersEXT(thread, dpyPacked, format, max_modifiers, | |
| modifiers, external_only, num_modifiers); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryDmaBufModifiersEXT, true, thread, dpyPacked, format, max_modifiers, | |
| modifiers, external_only, num_modifiers, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_EXT_platform_base | |
| EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, | |
| EGLConfig config, | |
| void *native_pixmap, | |
| const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLSurface returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(CreatePlatformPixmapSurfaceEXT, | |
| "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR | |
| ", native_pixmap = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)native_pixmap, | |
| (uintptr_t)attrib_list); | |
| egl::Config *configPacked = PackParam<egl::Config *>(config); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CreatePlatformPixmapSurfaceEXT, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreatePlatformPixmapSurfaceEXT, validDisplay, EGLSurface, | |
| validDisplay, configPacked, native_pixmap, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = CreatePlatformPixmapSurfaceEXT(thread, dpyPacked, configPacked, | |
| native_pixmap, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(CreatePlatformPixmapSurfaceEXT, true, thread, dpyPacked, configPacked, | |
| native_pixmap, attrib_listPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurfaceEXT(EGLDisplay dpy, | |
| EGLConfig config, | |
| void *native_window, | |
| const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLSurface returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(CreatePlatformWindowSurfaceEXT, | |
| "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR | |
| ", native_window = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)native_window, | |
| (uintptr_t)attrib_list); | |
| egl::Config *configPacked = PackParam<egl::Config *>(config); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CreatePlatformWindowSurfaceEXT, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreatePlatformWindowSurfaceEXT, validDisplay, EGLSurface, | |
| validDisplay, configPacked, native_window, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = CreatePlatformWindowSurfaceEXT(thread, dpyPacked, configPacked, | |
| native_window, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(CreatePlatformWindowSurfaceEXT, true, thread, dpyPacked, configPacked, | |
| native_window, attrib_listPacked, returnValue); | |
| } | |
| egl::Display::GetCurrentThreadUnlockedTailCall()->run(nullptr); | |
| return returnValue; | |
| } | |
| EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplayEXT(EGLenum platform, | |
| void *native_display, | |
| const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLDisplay returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(GetPlatformDisplayEXT, | |
| "platform = 0x%X, native_display = 0x%016" PRIxPTR | |
| ", attrib_list = 0x%016" PRIxPTR "", | |
| platform, (uintptr_t)native_display, (uintptr_t)attrib_list); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetPlatformDisplayEXT, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetPlatformDisplayEXT, nullptr, EGLDisplay, platform, | |
| native_display, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = | |
| GetPlatformDisplayEXT(thread, platform, native_display, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(GetPlatformDisplayEXT, true, thread, platform, native_display, | |
| attrib_listPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_EXT_surface_compression | |
| EGLBoolean EGLAPIENTRY EGL_QuerySupportedCompressionRatesEXT(EGLDisplay dpy, | |
| EGLConfig config, | |
| const EGLAttrib *attrib_list, | |
| EGLint *rates, | |
| EGLint rate_size, | |
| EGLint *num_rates) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QuerySupportedCompressionRatesEXT, | |
| "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR | |
| ", attrib_list = 0x%016" PRIxPTR ", rates = 0x%016" PRIxPTR | |
| ", rate_size = %d, num_rates = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)attrib_list, (uintptr_t)rates, | |
| rate_size, (uintptr_t)num_rates); | |
| egl::Config *configPacked = PackParam<egl::Config *>(config); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QuerySupportedCompressionRatesEXT, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QuerySupportedCompressionRatesEXT, validDisplay, | |
| EGLBoolean, validDisplay, configPacked, attrib_list, rates, | |
| rate_size, num_rates); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QuerySupportedCompressionRatesEXT( | |
| thread, dpyPacked, configPacked, attrib_list, rates, rate_size, num_rates); | |
| } | |
| ANGLE_CAPTURE_EGL(QuerySupportedCompressionRatesEXT, true, thread, dpyPacked, configPacked, | |
| attrib_list, rates, rate_size, num_rates, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_debug | |
| EGLint EGLAPIENTRY EGL_DebugMessageControlKHR(EGLDEBUGPROCKHR callback, | |
| const EGLAttrib *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLint returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(DebugMessageControlKHR, | |
| "callback = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)callback, (uintptr_t)attrib_list); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(DebugMessageControlKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, DebugMessageControlKHR, nullptr, EGLint, callback, | |
| attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = DebugMessageControlKHR(thread, callback, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(DebugMessageControlKHR, true, thread, callback, attrib_listPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLint EGLAPIENTRY EGL_LabelObjectKHR(EGLDisplay display, | |
| EGLenum objectType, | |
| EGLObjectKHR object, | |
| EGLLabelKHR label) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLint returnValue; | |
| { | |
| egl::Display *displayPacked = PackParam<egl::Display *>(display); | |
| egl::ScopedDisplayLockAndRef displayPackedLock = GetDisplayAndLockIfValid(displayPacked); | |
| const egl::Display *validDisplay = displayPackedLock.get(); | |
| EGL_EVENT(LabelObjectKHR, | |
| "display = 0x%016" PRIxPTR ", objectType = 0x%X, object = 0x%016" PRIxPTR | |
| ", label = 0x%016" PRIxPTR "", | |
| (uintptr_t)display, objectType, (uintptr_t)object, (uintptr_t)label); | |
| ObjectType objectTypePacked = PackParam<ObjectType>(objectType); | |
| egl::ScopedSurfaceLockAndRef surfaceObjectRef = | |
| (objectTypePacked == ObjectType::Surface) | |
| ? GetSurfaceIfValid(validDisplay, PackParam<SurfaceID>(object)) | |
| : egl::ScopedSurfaceLockAndRef(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(LabelObjectKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, LabelObjectKHR, validDisplay, EGLint, validDisplay, | |
| objectTypePacked, object, label); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = LabelObjectKHR(thread, displayPacked, objectTypePacked, object, label); | |
| } | |
| ANGLE_CAPTURE_EGL(LabelObjectKHR, true, thread, displayPacked, objectTypePacked, object, | |
| label, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_QueryDebugKHR(EGLint attribute, EGLAttrib *value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| ANGLE_SCOPED_GLOBAL_LOCK(); | |
| EGL_EVENT(QueryDebugKHR, "attribute = %d, value = 0x%016" PRIxPTR "", attribute, | |
| (uintptr_t)value); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryDebugKHR, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryDebugKHR, nullptr, EGLBoolean, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryDebugKHR(thread, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryDebugKHR, true, thread, attribute, value, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_fence_sync | |
| EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy, | |
| EGLSyncKHR sync, | |
| EGLint flags, | |
| EGLTimeKHR timeout) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLint returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| { | |
| EGL_EVENT( | |
| ClientWaitSyncKHR, | |
| "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d, timeout = %llu", | |
| (uintptr_t)dpy, (uintptr_t)sync, flags, static_cast<unsigned long long>(timeout)); | |
| egl::SyncID syncPacked = PackParam<egl::SyncID>(sync); | |
| egl::ScopedSyncRef syncPackedRef = GetSyncIfValid(validDisplay, syncPacked); | |
| egl::Sync *syncPackedObject = syncPackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(ClientWaitSyncKHR, thread, flags); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, ClientWaitSyncKHR, validDisplay, EGLint, | |
| validDisplay, syncPackedObject, flags, timeout); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| ClientWaitSyncKHR(thread, validDisplay, syncPackedObject, flags, timeout); | |
| } | |
| ANGLE_CAPTURE_EGL(ClientWaitSyncKHR, true, thread, dpyPacked, syncPacked, flags, | |
| timeout, returnValue); | |
| } | |
| egl::Display::GetCurrentThreadUnlockedTailCall()->run(&returnValue); | |
| } | |
| return returnValue; | |
| } | |
| EGLSyncKHR EGLAPIENTRY EGL_CreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLSyncKHR returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(CreateSyncKHR, | |
| "dpy = 0x%016" PRIxPTR ", type = 0x%X, attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, type, (uintptr_t)attrib_list); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CreateSyncKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreateSyncKHR, validDisplay, EGLSyncKHR, validDisplay, | |
| type, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = CreateSyncKHR(thread, validDisplay, type, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(CreateSyncKHR, true, thread, dpyPacked, type, attrib_listPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(DestroySyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)sync); | |
| egl::SyncID syncPacked = PackParam<egl::SyncID>(sync); | |
| egl::ScopedSyncDestroy syncPackedRef = RemoveSyncIfValid(validDisplay, syncPacked); | |
| egl::Sync *syncPackedObject = syncPackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(DestroySyncKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, DestroySyncKHR, validDisplay, EGLBoolean, validDisplay, | |
| syncPackedObject); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = DestroySyncKHR(thread, validDisplay, syncPackedRef.release()); | |
| } | |
| ANGLE_CAPTURE_EGL(DestroySyncKHR, true, thread, dpyPacked, syncPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy, | |
| EGLSyncKHR sync, | |
| EGLint attribute, | |
| EGLint *value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(GetSyncAttribKHR, | |
| "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR | |
| ", attribute = %d, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)sync, attribute, (uintptr_t)value); | |
| egl::SyncID syncPacked = PackParam<egl::SyncID>(sync); | |
| egl::ScopedSyncRef syncPackedRef = GetSyncIfValid(validDisplay, syncPacked); | |
| egl::Sync *syncPackedObject = syncPackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(GetSyncAttribKHR, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, GetSyncAttribKHR, validDisplay, EGLBoolean, validDisplay, | |
| syncPackedObject, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| GetSyncAttribKHR(thread, validDisplay, syncPackedObject, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(GetSyncAttribKHR, true, thread, dpyPacked, syncPacked, attribute, value, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_image | |
| EGLImageKHR EGLAPIENTRY EGL_CreateImageKHR(EGLDisplay dpy, | |
| EGLContext ctx, | |
| EGLenum target, | |
| EGLClientBuffer buffer, | |
| const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLImageKHR returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(CreateImageKHR, | |
| "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR | |
| ", target = 0x%X, buffer = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)ctx, target, (uintptr_t)buffer, | |
| (uintptr_t)attrib_list); | |
| gl::ContextID ctxPacked = PackParam<gl::ContextID>(ctx); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK_DPY(CreateImageKHR, thread, validDisplay, ctxPacked); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreateImageKHR, validDisplay, EGLImageKHR, validDisplay, | |
| ctxPacked, target, buffer, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = | |
| CreateImageKHR(thread, dpyPacked, ctxPacked, target, buffer, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(CreateImageKHR, true, thread, dpyPacked, ctxPacked, target, buffer, | |
| attrib_listPacked, returnValue); | |
| } | |
| egl::Display::GetCurrentThreadUnlockedTailCall()->run(&returnValue); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(DestroyImageKHR, "dpy = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)image); | |
| ImageID imagePacked = PackParam<ImageID>(image); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(DestroyImageKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, DestroyImageKHR, validDisplay, EGLBoolean, validDisplay, | |
| imagePacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = DestroyImageKHR(thread, dpyPacked, imagePacked); | |
| } | |
| ANGLE_CAPTURE_EGL(DestroyImageKHR, true, thread, dpyPacked, imagePacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_lock_surface3 | |
| EGLBoolean EGLAPIENTRY EGL_LockSurfaceKHR(EGLDisplay dpy, | |
| EGLSurface surface, | |
| const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(LockSurfaceKHR, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR | |
| ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)attrib_list); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(LockSurfaceKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, LockSurfaceKHR, validDisplay, EGLBoolean, validDisplay, | |
| surfacePackedObject, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = | |
| LockSurfaceKHR(thread, validDisplay, surfacePackedObject, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(LockSurfaceKHR, true, thread, dpyPacked, surfacePacked, attrib_listPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_QuerySurface64KHR(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint attribute, | |
| EGLAttribKHR *value) | |
| { | |
| if (attribute == EGL_BUFFER_AGE_EXT || attribute == EGL_SURFACE_COMPRESSION_EXT) | |
| { | |
| ANGLE_EGLBOOLEAN_TRY(EGL_PrepareSwapBuffersANGLE(dpy, surface)); | |
| } | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(QuerySurface64KHR, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR | |
| ", attribute = %d, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface, attribute, (uintptr_t)value); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QuerySurface64KHR, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QuerySurface64KHR, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| QuerySurface64KHR(thread, validDisplay, surfacePackedObject, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QuerySurface64KHR, true, thread, dpyPacked, surfacePacked, attribute, | |
| value, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_UnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(UnlockSurfaceKHR, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)surface); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(UnlockSurfaceKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, UnlockSurfaceKHR, validDisplay, EGLBoolean, validDisplay, | |
| surfacePackedObject); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = UnlockSurfaceKHR(thread, validDisplay, surfacePackedObject); | |
| } | |
| ANGLE_CAPTURE_EGL(UnlockSurfaceKHR, true, thread, dpyPacked, surfacePacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_partial_update | |
| EGLBoolean EGLAPIENTRY EGL_SetDamageRegionKHR(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint *rects, | |
| EGLint n_rects) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(SetDamageRegionKHR, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", rects = 0x%016" PRIxPTR | |
| ", n_rects = %d", | |
| (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)rects, n_rects); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(SetDamageRegionKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, SetDamageRegionKHR, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, rects, n_rects); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| SetDamageRegionKHR(thread, validDisplay, surfacePackedObject, rects, n_rects); | |
| } | |
| ANGLE_CAPTURE_EGL(SetDamageRegionKHR, true, thread, dpyPacked, surfacePacked, rects, | |
| n_rects, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_reusable_sync | |
| EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(SignalSyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", mode = 0x%X", | |
| (uintptr_t)dpy, (uintptr_t)sync, mode); | |
| egl::SyncID syncPacked = PackParam<egl::SyncID>(sync); | |
| egl::ScopedSyncRef syncPackedRef = GetSyncIfValid(validDisplay, syncPacked); | |
| egl::Sync *syncPackedObject = syncPackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(SignalSyncKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, SignalSyncKHR, validDisplay, EGLBoolean, validDisplay, | |
| syncPackedObject, mode); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = SignalSyncKHR(thread, validDisplay, syncPackedObject, mode); | |
| } | |
| ANGLE_CAPTURE_EGL(SignalSyncKHR, true, thread, dpyPacked, syncPacked, mode, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // ClientWaitSyncKHR is already defined. | |
| // CreateSyncKHR is already defined. | |
| // DestroySyncKHR is already defined. | |
| // GetSyncAttribKHR is already defined. | |
| // EGL_KHR_stream | |
| EGLStreamKHR EGLAPIENTRY EGL_CreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLStreamKHR returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(CreateStreamKHR, "dpy = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)attrib_list); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(CreateStreamKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, CreateStreamKHR, validDisplay, EGLStreamKHR, | |
| validDisplay, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = CreateStreamKHR(thread, dpyPacked, attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(CreateStreamKHR, true, thread, dpyPacked, attrib_listPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_DestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(DestroyStreamKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(DestroyStreamKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, DestroyStreamKHR, validDisplay, EGLBoolean, validDisplay, | |
| streamPacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = DestroyStreamKHR(thread, dpyPacked, streamPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(DestroyStreamKHR, true, thread, dpyPacked, streamPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_QueryStreamKHR(EGLDisplay dpy, | |
| EGLStreamKHR stream, | |
| EGLenum attribute, | |
| EGLint *value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QueryStreamKHR, | |
| "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR | |
| ", attribute = 0x%X, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream, attribute, (uintptr_t)value); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryStreamKHR, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryStreamKHR, validDisplay, EGLBoolean, validDisplay, | |
| streamPacked, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryStreamKHR(thread, dpyPacked, streamPacked, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryStreamKHR, true, thread, dpyPacked, streamPacked, attribute, value, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_QueryStreamu64KHR(EGLDisplay dpy, | |
| EGLStreamKHR stream, | |
| EGLenum attribute, | |
| EGLuint64KHR *value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(QueryStreamu64KHR, | |
| "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR | |
| ", attribute = 0x%X, value = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream, attribute, (uintptr_t)value); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(QueryStreamu64KHR, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, QueryStreamu64KHR, validDisplay, EGLBoolean, | |
| validDisplay, streamPacked, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = QueryStreamu64KHR(thread, dpyPacked, streamPacked, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(QueryStreamu64KHR, true, thread, dpyPacked, streamPacked, attribute, | |
| value, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_StreamAttribKHR(EGLDisplay dpy, | |
| EGLStreamKHR stream, | |
| EGLenum attribute, | |
| EGLint value) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(StreamAttribKHR, | |
| "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR | |
| ", attribute = 0x%X, value = %d", | |
| (uintptr_t)dpy, (uintptr_t)stream, attribute, value); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(StreamAttribKHR, thread, attribute); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, StreamAttribKHR, validDisplay, EGLBoolean, validDisplay, | |
| streamPacked, attribute, value); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = StreamAttribKHR(thread, dpyPacked, streamPacked, attribute, value); | |
| } | |
| ANGLE_CAPTURE_EGL(StreamAttribKHR, true, thread, dpyPacked, streamPacked, attribute, value, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_stream_consumer_gltexture | |
| EGLBoolean EGLAPIENTRY EGL_StreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(StreamConsumerAcquireKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(StreamConsumerAcquireKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, StreamConsumerAcquireKHR, validDisplay, EGLBoolean, | |
| validDisplay, streamPacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = StreamConsumerAcquireKHR(thread, dpyPacked, streamPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(StreamConsumerAcquireKHR, true, thread, dpyPacked, streamPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_StreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(StreamConsumerGLTextureExternalKHR, | |
| "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", (uintptr_t)dpy, | |
| (uintptr_t)stream); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(StreamConsumerGLTextureExternalKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, StreamConsumerGLTextureExternalKHR, validDisplay, | |
| EGLBoolean, validDisplay, streamPacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = StreamConsumerGLTextureExternalKHR(thread, dpyPacked, streamPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(StreamConsumerGLTextureExternalKHR, true, thread, dpyPacked, streamPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| EGLBoolean EGLAPIENTRY EGL_StreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(StreamConsumerReleaseKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(StreamConsumerReleaseKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, StreamConsumerReleaseKHR, validDisplay, EGLBoolean, | |
| validDisplay, streamPacked); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = StreamConsumerReleaseKHR(thread, dpyPacked, streamPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(StreamConsumerReleaseKHR, true, thread, dpyPacked, streamPacked, | |
| returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_KHR_swap_buffers_with_damage | |
| EGLBoolean EGLAPIENTRY EGL_SwapBuffersWithDamageKHR(EGLDisplay dpy, | |
| EGLSurface surface, | |
| const EGLint *rects, | |
| EGLint n_rects) | |
| { | |
| ANGLE_EGLBOOLEAN_TRY(EGL_PrepareSwapBuffersANGLE(dpy, surface)); | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(SwapBuffersWithDamageKHR, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", rects = 0x%016" PRIxPTR | |
| ", n_rects = %d", | |
| (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)rects, n_rects); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfacesLockAndRef<2> surfacePackedRef({ | |
| GetSurfaceRefIfValid(validDisplay, surfacePacked), | |
| egl::ScopedSurfaceRef(thread->getDisplay(), thread->getCurrentReadSurface()), | |
| }); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(0); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(SwapBuffersWithDamageKHR, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, SwapBuffersWithDamageKHR, validDisplay, EGLBoolean, | |
| validDisplay, surfacePackedObject, rects, n_rects); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| SwapBuffersWithDamageKHR(thread, validDisplay, surfacePackedObject, rects, n_rects); | |
| } | |
| ANGLE_CAPTURE_EGL(SwapBuffersWithDamageKHR, true, thread, dpyPacked, surfacePacked, rects, | |
| n_rects, returnValue); | |
| } | |
| egl::Display::GetCurrentThreadUnlockedTailCall()->run(&returnValue); | |
| return returnValue; | |
| } | |
| // EGL_KHR_wait_sync | |
| EGLint EGLAPIENTRY EGL_WaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLint returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(WaitSyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d", | |
| (uintptr_t)dpy, (uintptr_t)sync, flags); | |
| egl::SyncID syncPacked = PackParam<egl::SyncID>(sync); | |
| egl::ScopedSyncRef syncPackedRef = GetSyncIfValid(validDisplay, syncPacked); | |
| egl::Sync *syncPackedObject = syncPackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(WaitSyncKHR, thread, flags); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, WaitSyncKHR, validDisplay, EGLint, validDisplay, | |
| syncPackedObject, flags); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = WaitSyncKHR(thread, validDisplay, syncPackedObject, flags); | |
| } | |
| ANGLE_CAPTURE_EGL(WaitSyncKHR, true, thread, dpyPacked, syncPacked, flags, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_NV_post_sub_buffer | |
| EGLBoolean EGLAPIENTRY EGL_PostSubBufferNV(EGLDisplay dpy, | |
| EGLSurface surface, | |
| EGLint x, | |
| EGLint y, | |
| EGLint width, | |
| EGLint height) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedThreadSafeDisplayRef dpyPackedRef = GetThreadSafeDisplayIfValid(dpyPacked); | |
| egl::ThreadSafeDisplay *validDisplay = dpyPackedRef.get(); | |
| EGL_EVENT(PostSubBufferNV, | |
| "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR | |
| ", x = %d, y = %d, width = %d, height = %d", | |
| (uintptr_t)dpy, (uintptr_t)surface, x, y, width, height); | |
| SurfaceID surfacePacked = PackParam<SurfaceID>(surface); | |
| egl::ScopedSurfaceLockAndRef surfacePackedRef = | |
| GetSurfaceIfValid(validDisplay, surfacePacked); | |
| egl::Surface *surfacePackedObject = surfacePackedRef.get(); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(PostSubBufferNV, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, PostSubBufferNV, validDisplay, EGLBoolean, validDisplay, | |
| surfacePackedObject, x, y, width, height); | |
| } | |
| else | |
| { | |
| } | |
| returnValue = | |
| PostSubBufferNV(thread, validDisplay, surfacePackedObject, x, y, width, height); | |
| } | |
| ANGLE_CAPTURE_EGL(PostSubBufferNV, true, thread, dpyPacked, surfacePacked, x, y, width, | |
| height, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| // EGL_NV_stream_consumer_gltexture_yuv | |
| EGLBoolean EGLAPIENTRY EGL_StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, | |
| EGLStreamKHR stream, | |
| const EGLAttrib *attrib_list) | |
| { | |
| Thread *thread = egl::GetCurrentThread(); | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| EGLBoolean returnValue; | |
| { | |
| egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); | |
| egl::ScopedDisplayLockAndRef dpyPackedLock = GetDisplayAndLockIfValid(dpyPacked); | |
| const egl::Display *validDisplay = dpyPackedLock.get(); | |
| EGL_EVENT(StreamConsumerGLTextureExternalAttribsNV, | |
| "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR | |
| ", attrib_list = 0x%016" PRIxPTR "", | |
| (uintptr_t)dpy, (uintptr_t)stream, (uintptr_t)attrib_list); | |
| egl::Stream *streamPacked = PackParam<egl::Stream *>(stream); | |
| const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); | |
| { | |
| ANGLE_EGL_SCOPED_CONTEXT_LOCK(StreamConsumerGLTextureExternalAttribsNV, thread); | |
| if (IsEGLValidationEnabled()) | |
| { | |
| ANGLE_EGL_VALIDATE(thread, StreamConsumerGLTextureExternalAttribsNV, validDisplay, | |
| EGLBoolean, validDisplay, streamPacked, attrib_listPacked); | |
| } | |
| else | |
| { | |
| attrib_listPacked.initializeWithoutValidation(); | |
| } | |
| returnValue = StreamConsumerGLTextureExternalAttribsNV(thread, dpyPacked, streamPacked, | |
| attrib_listPacked); | |
| } | |
| ANGLE_CAPTURE_EGL(StreamConsumerGLTextureExternalAttribsNV, true, thread, dpyPacked, | |
| streamPacked, attrib_listPacked, returnValue); | |
| } | |
| ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any()); | |
| return returnValue; | |
| } | |
| } // extern "C" |