diff options
Diffstat (limited to 'gfx/angle/checkout/src/libGLESv2')
28 files changed, 73167 insertions, 0 deletions
diff --git a/gfx/angle/checkout/src/libGLESv2/egl_ext_stubs.cpp b/gfx/angle/checkout/src/libGLESv2/egl_ext_stubs.cpp new file mode 100644 index 0000000000..dbc151c2e3 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/egl_ext_stubs.cpp @@ -0,0 +1,796 @@ +// +// 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. +// +// egl_ext_stubs.cpp: Stubs for EXT extension entry points. +// + +#include "libGLESv2/egl_ext_stubs_autogen.h" + +#include "libANGLE/Device.h" +#include "libANGLE/Display.h" +#include "libANGLE/EGLSync.h" +#include "libANGLE/Surface.h" +#include "libANGLE/Thread.h" +#include "libANGLE/queryutils.h" +#include "libANGLE/validationEGL.h" +#include "libGLESv2/global_state.h" + +namespace egl +{ +EGLint ClientWaitSyncKHR(Thread *thread, + Display *display, + Sync *syncObject, + EGLint flags, + EGLTimeKHR timeout) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglClientWaitSync", + GetDisplayIfValid(display), EGL_FALSE); + gl::Context *currentContext = thread->getContext(); + EGLint syncStatus = EGL_FALSE; + ANGLE_EGL_TRY_RETURN( + thread, syncObject->clientWait(display, currentContext, flags, timeout, &syncStatus), + "eglClientWaitSync", GetSyncIfValid(display, syncObject), EGL_FALSE); + + thread->setSuccess(); + return syncStatus; +} + +EGLImageKHR CreateImageKHR(Thread *thread, + Display *display, + gl::Context *context, + EGLenum target, + EGLClientBuffer buffer, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateImageKHR", + GetDisplayIfValid(display), EGL_NO_IMAGE); + Image *image = nullptr; + ANGLE_EGL_TRY_RETURN(thread, display->createImage(context, target, buffer, attributes, &image), + "", GetDisplayIfValid(display), EGL_NO_IMAGE); + + thread->setSuccess(); + return static_cast<EGLImage>(image); +} + +EGLClientBuffer CreateNativeClientBufferANDROID(Thread *thread, const AttributeMap &attribMap) +{ + EGLClientBuffer eglClientBuffer = nullptr; + ANGLE_EGL_TRY_RETURN(thread, + egl::Display::CreateNativeClientBuffer(attribMap, &eglClientBuffer), + "eglCreateNativeClientBufferANDROID", nullptr, nullptr); + + thread->setSuccess(); + return eglClientBuffer; +} + +EGLSurface CreatePlatformPixmapSurfaceEXT(Thread *thread, + Display *display, + Config *configPacked, + void *native_pixmap, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePlatformPixmapSurfaceEXT", + GetDisplayIfValid(display), EGL_NO_SURFACE); + thread->setError(EGL_BAD_DISPLAY, "eglCreatePlatformPixmapSurfaceEXT", + GetDisplayIfValid(display), "CreatePlatformPixmapSurfaceEXT unimplemented."); + return EGL_NO_SURFACE; +} + +EGLSurface CreatePlatformWindowSurfaceEXT(Thread *thread, + Display *display, + Config *configPacked, + void *native_window, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePlatformWindowSurfaceEXT", + GetDisplayIfValid(display), EGL_NO_SURFACE); + thread->setError(EGL_BAD_DISPLAY, "eglCreatePlatformWindowSurfaceEXT", + GetDisplayIfValid(display), "CreatePlatformWindowSurfaceEXT unimplemented."); + return EGL_NO_SURFACE; +} + +EGLStreamKHR CreateStreamKHR(Thread *thread, Display *display, const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateStreamKHR", + GetDisplayIfValid(display), EGL_NO_STREAM_KHR); + Stream *stream; + ANGLE_EGL_TRY_RETURN(thread, display->createStream(attributes, &stream), "eglCreateStreamKHR", + GetDisplayIfValid(display), EGL_NO_STREAM_KHR); + + thread->setSuccess(); + return static_cast<EGLStreamKHR>(stream); +} + +EGLSyncKHR CreateSyncKHR(Thread *thread, + Display *display, + EGLenum type, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateSyncKHR", + GetDisplayIfValid(display), EGL_NO_SYNC); + egl::Sync *syncObject = nullptr; + ANGLE_EGL_TRY_RETURN(thread, + display->createSync(thread->getContext(), type, attributes, &syncObject), + "eglCreateSyncKHR", GetDisplayIfValid(display), EGL_NO_SYNC); + + thread->setSuccess(); + return static_cast<EGLSync>(syncObject); +} + +EGLint DebugMessageControlKHR(Thread *thread, + EGLDEBUGPROCKHR callback, + const AttributeMap &attributes) +{ + Debug *debug = GetDebug(); + debug->setCallback(callback, attributes); + + thread->setSuccess(); + return EGL_SUCCESS; +} + +EGLBoolean DestroyImageKHR(Thread *thread, Display *display, Image *img) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroyImageKHR", + GetDisplayIfValid(display), EGL_FALSE); + display->destroyImage(img); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean DestroyStreamKHR(Thread *thread, Display *display, Stream *streamObject) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroyStreamKHR", + GetDisplayIfValid(display), EGL_FALSE); + display->destroyStream(streamObject); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean DestroySyncKHR(Thread *thread, Display *display, Sync *syncObject) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroySync", + GetDisplayIfValid(display), EGL_FALSE); + display->destroySync(syncObject); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLint DupNativeFenceFDANDROID(Thread *thread, Display *display, Sync *syncObject) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDupNativeFenceFDANDROID", + GetDisplayIfValid(display), EGL_NO_NATIVE_FENCE_FD_ANDROID); + EGLint result = EGL_NO_NATIVE_FENCE_FD_ANDROID; + ANGLE_EGL_TRY_RETURN(thread, syncObject->dupNativeFenceFD(display, &result), + "eglDupNativeFenceFDANDROID", GetSyncIfValid(display, syncObject), + EGL_NO_NATIVE_FENCE_FD_ANDROID); + + thread->setSuccess(); + return result; +} + +EGLClientBuffer GetNativeClientBufferANDROID(Thread *thread, const struct AHardwareBuffer *buffer) +{ + thread->setSuccess(); + return egl::Display::GetNativeClientBuffer(buffer); +} + +EGLDisplay GetPlatformDisplayEXT(Thread *thread, + EGLenum platform, + void *native_display, + const AttributeMap &attribMap) +{ + if (platform == EGL_PLATFORM_ANGLE_ANGLE) + { + return egl::Display::GetDisplayFromNativeDisplay( + gl::bitCast<EGLNativeDisplayType>(native_display), attribMap); + } + else if (platform == EGL_PLATFORM_DEVICE_EXT) + { + Device *eglDevice = static_cast<Device *>(native_display); + return egl::Display::GetDisplayFromDevice(eglDevice, attribMap); + } + else + { + UNREACHABLE(); + return EGL_NO_DISPLAY; + } +} + +EGLBoolean GetSyncAttribKHR(Thread *thread, + Display *display, + Sync *syncObject, + EGLint attribute, + EGLint *value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglGetSyncAttrib", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, GetSyncAttrib(display, syncObject, attribute, value), + "eglGetSyncAttrib", GetSyncIfValid(display, syncObject), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLint LabelObjectKHR(Thread *thread, + Display *display, + ObjectType objectTypePacked, + EGLObjectKHR object, + EGLLabelKHR label) +{ + LabeledObject *labeledObject = + GetLabeledObjectIfValid(thread, display, objectTypePacked, object); + ASSERT(labeledObject != nullptr); + labeledObject->setLabel(label); + + thread->setSuccess(); + return EGL_SUCCESS; +} + +EGLBoolean PostSubBufferNV(Thread *thread, + Display *display, + Surface *eglSurface, + EGLint x, + EGLint y, + EGLint width, + EGLint height) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglPostSubBufferNV", + GetDisplayIfValid(display), EGL_FALSE); + Error error = eglSurface->postSubBuffer(thread->getContext(), x, y, width, height); + if (error.isError()) + { + thread->setError(error, "eglPostSubBufferNV", GetSurfaceIfValid(display, eglSurface)); + return EGL_FALSE; + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean PresentationTimeANDROID(Thread *thread, + Display *display, + Surface *eglSurface, + EGLnsecsANDROID time) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglPresentationTimeANDROID", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->setPresentationTime(time), + "eglPresentationTimeANDROID", GetSurfaceIfValid(display, eglSurface), + EGL_FALSE); + + return EGL_TRUE; +} + +EGLBoolean GetCompositorTimingSupportedANDROID(Thread *thread, + Display *display, + Surface *eglSurface, + CompositorTiming nameInternal) +{ + thread->setSuccess(); + return eglSurface->getSupportedCompositorTimings().test(nameInternal); +} + +EGLBoolean GetCompositorTimingANDROID(Thread *thread, + Display *display, + Surface *eglSurface, + EGLint numTimestamps, + const EGLint *names, + EGLnsecsANDROID *values) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglGetCompositorTimingANDROIDD", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->getCompositorTiming(numTimestamps, names, values), + "eglGetCompositorTimingANDROIDD", GetSurfaceIfValid(display, eglSurface), + EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean GetNextFrameIdANDROID(Thread *thread, + Display *display, + Surface *eglSurface, + EGLuint64KHR *frameId) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglGetNextFrameIdANDROID", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->getNextFrameId(frameId), "eglGetNextFrameIdANDROID", + GetSurfaceIfValid(display, eglSurface), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean GetFrameTimestampSupportedANDROID(Thread *thread, + Display *display, + Surface *eglSurface, + Timestamp timestampInternal) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryTimestampSupportedANDROID", + GetDisplayIfValid(display), EGL_FALSE); + thread->setSuccess(); + return eglSurface->getSupportedTimestamps().test(timestampInternal); +} + +EGLBoolean GetFrameTimestampsANDROID(Thread *thread, + Display *display, + Surface *eglSurface, + EGLuint64KHR frameId, + EGLint numTimestamps, + const EGLint *timestamps, + EGLnsecsANDROID *values) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglGetFrameTimestampsANDROID", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN( + thread, eglSurface->getFrameTimestamps(frameId, numTimestamps, timestamps, values), + "eglGetFrameTimestampsANDROID", GetSurfaceIfValid(display, eglSurface), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean QueryDebugKHR(Thread *thread, EGLint attribute, EGLAttrib *value) +{ + Debug *debug = GetDebug(); + switch (attribute) + { + case EGL_DEBUG_MSG_CRITICAL_KHR: + case EGL_DEBUG_MSG_ERROR_KHR: + case EGL_DEBUG_MSG_WARN_KHR: + case EGL_DEBUG_MSG_INFO_KHR: + *value = debug->isMessageTypeEnabled(FromEGLenum<MessageType>(attribute)) ? EGL_TRUE + : EGL_FALSE; + break; + case EGL_DEBUG_CALLBACK_KHR: + *value = reinterpret_cast<EGLAttrib>(debug->getCallback()); + break; + + default: + UNREACHABLE(); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean QueryDeviceAttribEXT(Thread *thread, Device *dev, EGLint attribute, EGLAttrib *value) +{ + ANGLE_EGL_TRY_RETURN(thread, dev->getAttribute(attribute, value), "eglQueryDeviceAttribEXT", + GetDeviceIfValid(dev), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +const char *QueryDeviceStringEXT(Thread *thread, Device *dev, EGLint name) +{ + egl::Display *owningDisplay = dev->getOwningDisplay(); + ANGLE_EGL_TRY_RETURN(thread, owningDisplay->prepareForCall(), "eglQueryDeviceStringEXT", + GetDisplayIfValid(owningDisplay), EGL_FALSE); + const char *result; + switch (name) + { + case EGL_EXTENSIONS: + result = dev->getExtensionString().c_str(); + break; + default: + thread->setError(EglBadDevice(), "eglQueryDeviceStringEXT", GetDeviceIfValid(dev)); + return nullptr; + } + + thread->setSuccess(); + return result; +} + +EGLBoolean QueryDisplayAttribEXT(Thread *thread, + Display *display, + EGLint attribute, + EGLAttrib *value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryDisplayAttribEXT", + GetDisplayIfValid(display), EGL_FALSE); + *value = display->queryAttrib(attribute); + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean QueryStreamKHR(Thread *thread, + Display *display, + Stream *streamObject, + EGLenum attribute, + EGLint *value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryStreamKHR", + GetDisplayIfValid(display), EGL_FALSE); + switch (attribute) + { + case EGL_STREAM_STATE_KHR: + *value = streamObject->getState(); + break; + case EGL_CONSUMER_LATENCY_USEC_KHR: + *value = streamObject->getConsumerLatency(); + break; + case EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR: + *value = streamObject->getConsumerAcquireTimeout(); + break; + default: + UNREACHABLE(); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean QueryStreamu64KHR(Thread *thread, + Display *display, + Stream *streamObject, + EGLenum attribute, + EGLuint64KHR *value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryStreamu64KHR", + GetDisplayIfValid(display), EGL_FALSE); + switch (attribute) + { + case EGL_PRODUCER_FRAME_KHR: + *value = streamObject->getProducerFrame(); + break; + case EGL_CONSUMER_FRAME_KHR: + *value = streamObject->getConsumerFrame(); + break; + default: + UNREACHABLE(); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean QuerySurfacePointerANGLE(Thread *thread, + Display *display, + Surface *eglSurface, + EGLint attribute, + void **value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQuerySurfacePointerANGLE", + GetDisplayIfValid(display), EGL_FALSE); + Error error = eglSurface->querySurfacePointerANGLE(attribute, value); + if (error.isError()) + { + thread->setError(error, "eglQuerySurfacePointerANGLE", + GetSurfaceIfValid(display, eglSurface)); + return EGL_FALSE; + } + + thread->setSuccess(); + return EGL_TRUE; +} + +void SetBlobCacheFuncsANDROID(Thread *thread, + Display *display, + EGLSetBlobFuncANDROID set, + EGLGetBlobFuncANDROID get) +{ + ANGLE_EGL_TRY(thread, display->prepareForCall(), "eglSetBlobCacheFuncsANDROID", + GetDisplayIfValid(display)); + thread->setSuccess(); + display->setBlobCacheFuncs(set, get); +} + +EGLBoolean SignalSyncKHR(Thread *thread, Display *display, Sync *syncObject, EGLenum mode) +{ + gl::Context *currentContext = thread->getContext(); + ANGLE_EGL_TRY_RETURN(thread, syncObject->signal(display, currentContext, mode), + "eglSignalSyncKHR", GetSyncIfValid(display, syncObject), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean StreamAttribKHR(Thread *thread, + Display *display, + Stream *streamObject, + EGLenum attribute, + EGLint value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglStreamAttribKHR", + GetDisplayIfValid(display), EGL_FALSE); + switch (attribute) + { + case EGL_CONSUMER_LATENCY_USEC_KHR: + streamObject->setConsumerLatency(value); + break; + case EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR: + streamObject->setConsumerAcquireTimeout(value); + break; + default: + UNREACHABLE(); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean StreamConsumerAcquireKHR(Thread *thread, Display *display, Stream *streamObject) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglStreamConsumerAcquireKHR", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, streamObject->consumerAcquire(thread->getContext()), + "eglStreamConsumerAcquireKHR", GetStreamIfValid(display, streamObject), + EGL_FALSE); + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean StreamConsumerGLTextureExternalKHR(Thread *thread, + Display *display, + Stream *streamObject) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglStreamConsumerGLTextureExternalKHR", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN( + thread, streamObject->createConsumerGLTextureExternal(AttributeMap(), thread->getContext()), + "eglStreamConsumerGLTextureExternalKHR", GetStreamIfValid(display, streamObject), + EGL_FALSE); + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean StreamConsumerGLTextureExternalAttribsNV(Thread *thread, + Display *display, + Stream *streamObject, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), + "eglStreamConsumerGLTextureExternalAttribsNV", GetDisplayIfValid(display), + EGL_FALSE); + + gl::Context *context = gl::GetValidGlobalContext(); + ANGLE_EGL_TRY_RETURN(thread, streamObject->createConsumerGLTextureExternal(attributes, context), + "eglStreamConsumerGLTextureExternalAttribsNV", + GetStreamIfValid(display, streamObject), EGL_FALSE); + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean StreamConsumerReleaseKHR(Thread *thread, Display *display, Stream *streamObject) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglStreamConsumerReleaseKHR", + GetDisplayIfValid(display), EGL_FALSE); + + gl::Context *context = gl::GetValidGlobalContext(); + ANGLE_EGL_TRY_RETURN(thread, streamObject->consumerRelease(context), + "eglStreamConsumerReleaseKHR", GetStreamIfValid(display, streamObject), + EGL_FALSE); + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean SwapBuffersWithDamageKHR(Thread *thread, + Display *display, + Surface *eglSurface, + const EGLint *rects, + EGLint n_rects) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSwapBuffersWithDamageEXT", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->swapWithDamage(thread->getContext(), rects, n_rects), + "eglSwapBuffersWithDamageEXT", GetSurfaceIfValid(display, eglSurface), + EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLint WaitSyncKHR(Thread *thread, Display *display, Sync *syncObject, EGLint flags) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitSync", + GetDisplayIfValid(display), EGL_FALSE); + gl::Context *currentContext = thread->getContext(); + ANGLE_EGL_TRY_RETURN(thread, syncObject->serverWait(display, currentContext, flags), + "eglWaitSync", GetSyncIfValid(display, syncObject), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLDeviceEXT CreateDeviceANGLE(Thread *thread, + EGLint device_type, + void *native_device, + const EGLAttrib *attrib_list) +{ + Device *device = nullptr; + ANGLE_EGL_TRY_RETURN(thread, Device::CreateDevice(device_type, native_device, &device), + "eglCreateDeviceANGLE", GetThreadIfValid(thread), EGL_NO_DEVICE_EXT); + + thread->setSuccess(); + return device; +} + +EGLBoolean ReleaseDeviceANGLE(Thread *thread, Device *dev) +{ + SafeDelete(dev); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean CreateStreamProducerD3DTextureANGLE(Thread *thread, + Display *display, + Stream *streamObject, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), + "eglCreateStreamProducerD3DTextureANGLE", GetDisplayIfValid(display), + EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, streamObject->createProducerD3D11Texture(attributes), + "eglCreateStreamProducerD3DTextureANGLE", + GetStreamIfValid(display, streamObject), EGL_FALSE); + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean StreamPostD3DTextureANGLE(Thread *thread, + Display *display, + Stream *streamObject, + void *texture, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglStreamPostD3DTextureANGLE", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, streamObject->postD3D11Texture(texture, attributes), + "eglStreamPostD3DTextureANGLE", GetStreamIfValid(display, streamObject), + EGL_FALSE); + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean GetMscRateANGLE(Thread *thread, + Display *display, + Surface *eglSurface, + EGLint *numerator, + EGLint *denominator) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglGetMscRateANGLE", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->getMscRate(numerator, denominator), + "eglGetMscRateANGLE", GetSurfaceIfValid(display, eglSurface), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean GetSyncValuesCHROMIUM(Thread *thread, + Display *display, + Surface *eglSurface, + EGLuint64KHR *ust, + EGLuint64KHR *msc, + EGLuint64KHR *sbc) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglGetSyncValuesCHROMIUM", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->getSyncValues(ust, msc, sbc), + "eglGetSyncValuesCHROMIUM", GetSurfaceIfValid(display, eglSurface), + EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLint ProgramCacheGetAttribANGLE(Thread *thread, Display *display, EGLenum attrib) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglProgramCacheGetAttribANGLE", + GetDisplayIfValid(display), 0); + thread->setSuccess(); + return display->programCacheGetAttrib(attrib); +} + +void ProgramCacheQueryANGLE(Thread *thread, + Display *display, + EGLint index, + void *key, + EGLint *keysize, + void *binary, + EGLint *binarysize) +{ + ANGLE_EGL_TRY(thread, display->prepareForCall(), "eglProgramCacheQueryANGLE", + GetDisplayIfValid(display)); + ANGLE_EGL_TRY(thread, display->programCacheQuery(index, key, keysize, binary, binarysize), + "eglProgramCacheQueryANGLE", GetDisplayIfValid(display)); + + thread->setSuccess(); +} + +void ProgramCachePopulateANGLE(Thread *thread, + Display *display, + const void *key, + EGLint keysize, + const void *binary, + EGLint binarysize) +{ + ANGLE_EGL_TRY(thread, display->prepareForCall(), "eglProgramCachePopulateANGLE", + GetDisplayIfValid(display)); + ANGLE_EGL_TRY(thread, display->programCachePopulate(key, keysize, binary, binarysize), + "eglProgramCachePopulateANGLE", GetDisplayIfValid(display)); + + thread->setSuccess(); +} + +EGLint ProgramCacheResizeANGLE(Thread *thread, Display *display, EGLint limit, EGLint mode) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglProgramCacheResizeANGLE", + GetDisplayIfValid(display), 0); + thread->setSuccess(); + return display->programCacheResize(limit, mode); +} + +const char *QueryStringiANGLE(Thread *thread, Display *display, EGLint name, EGLint index) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryStringiANGLE", + GetDisplayIfValid(display), nullptr); + thread->setSuccess(); + return display->queryStringi(name, index); +} + +EGLBoolean SwapBuffersWithFrameTokenANGLE(Thread *thread, + Display *display, + Surface *eglSurface, + EGLFrameTokenANGLE frametoken) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSwapBuffersWithFrameTokenANGLE", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->swapWithFrameToken(thread->getContext(), frametoken), + "eglSwapBuffersWithFrameTokenANGLE", GetDisplayIfValid(display), + EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +void ReleaseHighPowerGPUANGLE(Thread *thread, Display *display, gl::Context *context) +{ + ANGLE_EGL_TRY(thread, display->prepareForCall(), "eglReleaseHighPowerGPUANGLE", + GetDisplayIfValid(display)); + ANGLE_EGL_TRY(thread, context->releaseHighPowerGPU(), "eglReleaseHighPowerGPUANGLE", + GetDisplayIfValid(display)); + + thread->setSuccess(); +} + +void ReacquireHighPowerGPUANGLE(Thread *thread, Display *display, gl::Context *context) +{ + ANGLE_EGL_TRY(thread, display->prepareForCall(), "eglReacquireHighPowerGPUANGLE", + GetDisplayIfValid(display)); + ANGLE_EGL_TRY(thread, context->reacquireHighPowerGPU(), "eglReacquireHighPowerGPUANGLE", + GetDisplayIfValid(display)); + + thread->setSuccess(); +} + +void HandleGPUSwitchANGLE(Thread *thread, Display *display) +{ + ANGLE_EGL_TRY(thread, display->prepareForCall(), "eglHandleGPUSwitchANGLE", + GetDisplayIfValid(display)); + ANGLE_EGL_TRY(thread, display->handleGPUSwitch(), "eglHandleGPUSwitchANGLE", + GetDisplayIfValid(display)); + + thread->setSuccess(); +} + +EGLBoolean QueryDisplayAttribANGLE(Thread *thread, + Display *display, + EGLint attribute, + EGLAttrib *value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryDisplayAttribEXT", + GetDisplayIfValid(display), EGL_FALSE); + *value = display->queryAttrib(attribute); + thread->setSuccess(); + return EGL_TRUE; +} +} // namespace egl diff --git a/gfx/angle/checkout/src/libGLESv2/egl_ext_stubs_autogen.h b/gfx/angle/checkout/src/libGLESv2/egl_ext_stubs_autogen.h new file mode 100644 index 0000000000..435cfca69d --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/egl_ext_stubs_autogen.h @@ -0,0 +1,226 @@ +// 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. +// +// egl_ext_stubs_autogen.h: Stubs for EXT extension entry points. + +#ifndef LIBGLESV2_EGL_EXT_STUBS_AUTOGEN_H_ +#define LIBGLESV2_EGL_EXT_STUBS_AUTOGEN_H_ + +#include <EGL/egl.h> +#include <EGL/eglext.h> + +#include "common/PackedEGLEnums_autogen.h" + +namespace gl +{ +class Context; +} // namespace gl + +namespace egl +{ +class AttributeMap; +class Device; +class Display; +class Image; +class Stream; +class Surface; +class Sync; +class Thread; +struct Config; + +EGLint ClientWaitSyncKHR(Thread *thread, + egl::Display *dpyPacked, + Sync *syncPacked, + EGLint flags, + EGLTimeKHR timeout); +EGLImageKHR CreateImageKHR(Thread *thread, + egl::Display *dpyPacked, + gl::Context *ctxPacked, + EGLenum target, + EGLClientBuffer buffer, + const AttributeMap &attrib_listPacked); +EGLClientBuffer CreateNativeClientBufferANDROID(Thread *thread, + const AttributeMap &attrib_listPacked); +EGLSurface CreatePlatformPixmapSurfaceEXT(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + void *native_pixmap, + const AttributeMap &attrib_listPacked); +EGLSurface CreatePlatformWindowSurfaceEXT(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + void *native_window, + const AttributeMap &attrib_listPacked); +EGLStreamKHR CreateStreamKHR(Thread *thread, + egl::Display *dpyPacked, + const AttributeMap &attrib_listPacked); +EGLSyncKHR CreateSyncKHR(Thread *thread, + egl::Display *dpyPacked, + EGLenum type, + const AttributeMap &attrib_listPacked); +EGLint DebugMessageControlKHR(Thread *thread, + EGLDEBUGPROCKHR callback, + const AttributeMap &attrib_listPacked); +EGLBoolean DestroyImageKHR(Thread *thread, egl::Display *dpyPacked, Image *imagePacked); +EGLBoolean DestroyStreamKHR(Thread *thread, egl::Display *dpyPacked, Stream *streamPacked); +EGLBoolean DestroySyncKHR(Thread *thread, egl::Display *dpyPacked, Sync *syncPacked); +EGLint DupNativeFenceFDANDROID(Thread *thread, egl::Display *dpyPacked, Sync *syncPacked); +EGLClientBuffer GetNativeClientBufferANDROID(Thread *thread, const struct AHardwareBuffer *buffer); +EGLDisplay GetPlatformDisplayEXT(Thread *thread, + EGLenum platform, + void *native_display, + const AttributeMap &attrib_listPacked); +EGLBoolean GetSyncAttribKHR(Thread *thread, + egl::Display *dpyPacked, + Sync *syncPacked, + EGLint attribute, + EGLint *value); +EGLint LabelObjectKHR(Thread *thread, + egl::Display *displayPacked, + ObjectType objectTypePacked, + EGLObjectKHR object, + EGLLabelKHR label); +EGLBoolean PostSubBufferNV(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint x, + EGLint y, + EGLint width, + EGLint height); +EGLBoolean PresentationTimeANDROID(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLnsecsANDROID time); +EGLBoolean GetCompositorTimingSupportedANDROID(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + CompositorTiming namePacked); +EGLBoolean GetCompositorTimingANDROID(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint numTimestamps, + const EGLint *names, + EGLnsecsANDROID *values); +EGLBoolean GetNextFrameIdANDROID(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLuint64KHR *frameId); +EGLBoolean GetFrameTimestampSupportedANDROID(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + Timestamp timestampPacked); +EGLBoolean GetFrameTimestampsANDROID(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLuint64KHR frameId, + EGLint numTimestamps, + const EGLint *timestamps, + EGLnsecsANDROID *values); +EGLBoolean QueryDebugKHR(Thread *thread, EGLint attribute, EGLAttrib *value); +EGLBoolean QueryDeviceAttribEXT(Thread *thread, + Device *devicePacked, + EGLint attribute, + EGLAttrib *value); +const char *QueryDeviceStringEXT(Thread *thread, Device *devicePacked, EGLint name); +EGLBoolean QueryDisplayAttribEXT(Thread *thread, + egl::Display *dpyPacked, + EGLint attribute, + EGLAttrib *value); +EGLBoolean QueryStreamKHR(Thread *thread, + egl::Display *dpyPacked, + Stream *streamPacked, + EGLenum attribute, + EGLint *value); +EGLBoolean QueryStreamu64KHR(Thread *thread, + egl::Display *dpyPacked, + Stream *streamPacked, + EGLenum attribute, + EGLuint64KHR *value); +EGLBoolean QuerySurfacePointerANGLE(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint attribute, + void **value); +void SetBlobCacheFuncsANDROID(Thread *thread, + egl::Display *dpyPacked, + EGLSetBlobFuncANDROID set, + EGLGetBlobFuncANDROID get); +EGLBoolean SignalSyncKHR(Thread *thread, egl::Display *dpyPacked, Sync *syncPacked, EGLenum mode); +EGLBoolean StreamAttribKHR(Thread *thread, + egl::Display *dpyPacked, + Stream *streamPacked, + EGLenum attribute, + EGLint value); +EGLBoolean StreamConsumerAcquireKHR(Thread *thread, egl::Display *dpyPacked, Stream *streamPacked); +EGLBoolean StreamConsumerGLTextureExternalKHR(Thread *thread, + egl::Display *dpyPacked, + Stream *streamPacked); +EGLBoolean StreamConsumerGLTextureExternalAttribsNV(Thread *thread, + egl::Display *dpyPacked, + Stream *streamPacked, + const AttributeMap &attrib_listPacked); +EGLBoolean StreamConsumerReleaseKHR(Thread *thread, egl::Display *dpyPacked, Stream *streamPacked); +EGLBoolean SwapBuffersWithDamageKHR(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + const EGLint *rects, + EGLint n_rects); +EGLint WaitSyncKHR(Thread *thread, egl::Display *dpyPacked, Sync *syncPacked, EGLint flags); +EGLDeviceEXT CreateDeviceANGLE(Thread *thread, + EGLint device_type, + void *native_device, + const EGLAttrib *attrib_list); +EGLBoolean ReleaseDeviceANGLE(Thread *thread, Device *devicePacked); +EGLBoolean CreateStreamProducerD3DTextureANGLE(Thread *thread, + egl::Display *dpyPacked, + Stream *streamPacked, + const AttributeMap &attrib_listPacked); +EGLBoolean StreamPostD3DTextureANGLE(Thread *thread, + egl::Display *dpyPacked, + Stream *streamPacked, + void *texture, + const AttributeMap &attrib_listPacked); +EGLBoolean GetMscRateANGLE(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint *numerator, + EGLint *denominator); +EGLBoolean GetSyncValuesCHROMIUM(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLuint64KHR *ust, + EGLuint64KHR *msc, + EGLuint64KHR *sbc); +EGLint ProgramCacheGetAttribANGLE(Thread *thread, egl::Display *dpyPacked, EGLenum attrib); +void ProgramCacheQueryANGLE(Thread *thread, + egl::Display *dpyPacked, + EGLint index, + void *key, + EGLint *keysize, + void *binary, + EGLint *binarysize); +void ProgramCachePopulateANGLE(Thread *thread, + egl::Display *dpyPacked, + const void *key, + EGLint keysize, + const void *binary, + EGLint binarysize); +EGLint ProgramCacheResizeANGLE(Thread *thread, egl::Display *dpyPacked, EGLint limit, EGLint mode); +const char *QueryStringiANGLE(Thread *thread, egl::Display *dpyPacked, EGLint name, EGLint index); +EGLBoolean SwapBuffersWithFrameTokenANGLE(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLFrameTokenANGLE frametoken); +void ReleaseHighPowerGPUANGLE(Thread *thread, egl::Display *dpyPacked, gl::Context *ctxPacked); +void ReacquireHighPowerGPUANGLE(Thread *thread, egl::Display *dpyPacked, gl::Context *ctxPacked); +void HandleGPUSwitchANGLE(Thread *thread, egl::Display *dpyPacked); +EGLBoolean QueryDisplayAttribANGLE(Thread *thread, + egl::Display *dpyPacked, + EGLint attribute, + EGLAttrib *value); +} // namespace egl +#endif // LIBGLESV2_EGL_EXT_STUBS_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/egl_stubs.cpp b/gfx/angle/checkout/src/libGLESv2/egl_stubs.cpp new file mode 100644 index 0000000000..4b062a9c14 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/egl_stubs.cpp @@ -0,0 +1,767 @@ +// +// 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. +// +// egl_stubs.cpp: Stubs for EGL entry points. +// + +#include "libGLESv2/egl_stubs_autogen.h" + +#include "common/version.h" +#include "libANGLE/Context.h" +#include "libANGLE/Display.h" +#include "libANGLE/EGLSync.h" +#include "libANGLE/Surface.h" +#include "libANGLE/Thread.h" +#include "libANGLE/queryutils.h" +#include "libANGLE/validationEGL.h" +#include "libGLESv2/global_state.h" +#include "libGLESv2/proc_table_egl.h" + +namespace egl +{ +namespace +{ +bool CompareProc(const ProcEntry &a, const char *b) +{ + return strcmp(a.first, b) < 0; +} + +void ClipConfigs(const std::vector<const Config *> &filteredConfigs, + EGLConfig *outputConfigs, + EGLint configSize, + EGLint *numConfigs) +{ + EGLint resultSize = static_cast<EGLint>(filteredConfigs.size()); + if (outputConfigs) + { + resultSize = std::max(std::min(resultSize, configSize), 0); + for (EGLint i = 0; i < resultSize; i++) + { + outputConfigs[i] = const_cast<Config *>(filteredConfigs[i]); + } + } + *numConfigs = resultSize; +} +} // anonymous namespace + +EGLBoolean BindAPI(Thread *thread, EGLenum api) +{ + thread->setAPI(api); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean BindTexImage(Thread *thread, Display *display, Surface *eglSurface, EGLint buffer) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglBindTexImage", + GetDisplayIfValid(display), EGL_FALSE); + + gl::Context *context = thread->getContext(); + if (context) + { + gl::TextureType type = + egl_gl::EGLTextureTargetToTextureType(eglSurface->getTextureTarget()); + gl::Texture *textureObject = context->getTextureByType(type); + ANGLE_EGL_TRY_RETURN(thread, eglSurface->bindTexImage(context, textureObject, buffer), + "eglBindTexImage", GetSurfaceIfValid(display, eglSurface), EGL_FALSE); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean ChooseConfig(Thread *thread, + Display *display, + const AttributeMap &attribMap, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config) +{ + ClipConfigs(display->chooseConfig(attribMap), configs, config_size, num_config); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLint ClientWaitSync(Thread *thread, + Display *display, + Sync *syncObject, + EGLint flags, + EGLTime timeout) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglClientWaitSync", + GetDisplayIfValid(display), EGL_FALSE); + gl::Context *currentContext = thread->getContext(); + EGLint syncStatus = EGL_FALSE; + ANGLE_EGL_TRY_RETURN( + thread, syncObject->clientWait(display, currentContext, flags, timeout, &syncStatus), + "eglClientWaitSync", GetSyncIfValid(display, syncObject), EGL_FALSE); + + thread->setSuccess(); + return syncStatus; +} + +EGLBoolean CopyBuffers(Thread *thread, + Display *display, + Surface *eglSurface, + EGLNativePixmapType target) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCopyBuffers", + GetDisplayIfValid(display), EGL_FALSE); + UNIMPLEMENTED(); // FIXME + + thread->setSuccess(); + return 0; +} + +EGLContext CreateContext(Thread *thread, + Display *display, + Config *configuration, + gl::Context *sharedGLContext, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateContext", + GetDisplayIfValid(display), EGL_NO_CONTEXT); + gl::Context *context = nullptr; + ANGLE_EGL_TRY_RETURN(thread, + display->createContext(configuration, sharedGLContext, thread->getAPI(), + attributes, &context), + "eglCreateContext", GetDisplayIfValid(display), EGL_NO_CONTEXT); + + thread->setSuccess(); + return static_cast<EGLContext>(context); +} + +EGLImage CreateImage(Thread *thread, + Display *display, + gl::Context *context, + EGLenum target, + EGLClientBuffer buffer, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateImage", + GetDisplayIfValid(display), EGL_FALSE); + + Image *image = nullptr; + Error error = display->createImage(context, target, buffer, attributes, &image); + if (error.isError()) + { + thread->setError(error, "eglCreateImage", GetDisplayIfValid(display)); + return EGL_NO_IMAGE; + } + + thread->setSuccess(); + return static_cast<EGLImage>(image); +} + +EGLSurface CreatePbufferFromClientBuffer(Thread *thread, + Display *display, + EGLenum buftype, + EGLClientBuffer buffer, + Config *configuration, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePbufferFromClientBuffer", + GetDisplayIfValid(display), EGL_NO_SURFACE); + Surface *surface = nullptr; + ANGLE_EGL_TRY_RETURN(thread, + display->createPbufferFromClientBuffer(configuration, buftype, buffer, + attributes, &surface), + "eglCreatePbufferFromClientBuffer", GetDisplayIfValid(display), + EGL_NO_SURFACE); + + return static_cast<EGLSurface>(surface); +} + +EGLSurface CreatePbufferSurface(Thread *thread, + Display *display, + Config *configuration, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePbufferSurface", + GetDisplayIfValid(display), EGL_NO_SURFACE); + Surface *surface = nullptr; + ANGLE_EGL_TRY_RETURN(thread, display->createPbufferSurface(configuration, attributes, &surface), + "eglCreatePbufferSurface", GetDisplayIfValid(display), EGL_NO_SURFACE); + + return static_cast<EGLSurface>(surface); +} + +EGLSurface CreatePixmapSurface(Thread *thread, + Display *display, + Config *configuration, + EGLNativePixmapType pixmap, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePixmapSurface", + GetDisplayIfValid(display), EGL_NO_SURFACE); + Surface *surface = nullptr; + ANGLE_EGL_TRY_RETURN(thread, + display->createPixmapSurface(configuration, pixmap, attributes, &surface), + "eglCreatePixmapSurface", GetDisplayIfValid(display), EGL_NO_SURFACE); + + thread->setSuccess(); + return static_cast<EGLSurface>(surface); +} + +EGLSurface CreatePlatformPixmapSurface(Thread *thread, + Display *display, + Config *configuration, + void *pixmap, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePlatformPixmapSurface", + GetDisplayIfValid(display), EGL_NO_SURFACE); + Surface *surface = nullptr; + EGLNativePixmapType nativePixmap = reinterpret_cast<EGLNativePixmapType>(pixmap); + ANGLE_EGL_TRY_RETURN( + thread, display->createPixmapSurface(configuration, nativePixmap, attributes, &surface), + "eglCreatePlatformPixmapSurface", GetDisplayIfValid(display), EGL_NO_SURFACE); + + thread->setSuccess(); + return static_cast<EGLSurface>(surface); +} + +EGLSurface CreatePlatformWindowSurface(Thread *thread, + Display *display, + Config *configuration, + void *win, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePlatformWindowSurface", + GetDisplayIfValid(display), EGL_NO_SURFACE); + Surface *surface = nullptr; + EGLNativeWindowType nativeWindow = reinterpret_cast<EGLNativeWindowType>(win); + ANGLE_EGL_TRY_RETURN( + thread, display->createWindowSurface(configuration, nativeWindow, attributes, &surface), + "eglPlatformCreateWindowSurface", GetDisplayIfValid(display), EGL_NO_SURFACE); + + return static_cast<EGLSurface>(surface); +} + +EGLSync CreateSync(Thread *thread, Display *display, EGLenum type, const AttributeMap &attributes) +{ + gl::Context *currentContext = thread->getContext(); + + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateSync", + GetDisplayIfValid(display), EGL_FALSE); + Sync *syncObject = nullptr; + ANGLE_EGL_TRY_RETURN(thread, display->createSync(currentContext, type, attributes, &syncObject), + "eglCreateSync", GetDisplayIfValid(display), EGL_NO_SYNC); + + thread->setSuccess(); + return static_cast<EGLSync>(syncObject); +} + +EGLSurface CreateWindowSurface(Thread *thread, + Display *display, + Config *configuration, + EGLNativeWindowType win, + const AttributeMap &attributes) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateWindowSurface", + GetDisplayIfValid(display), EGL_NO_SURFACE); + + Surface *surface = nullptr; + ANGLE_EGL_TRY_RETURN(thread, + display->createWindowSurface(configuration, win, attributes, &surface), + "eglCreateWindowSurface", GetDisplayIfValid(display), EGL_NO_SURFACE); + + return static_cast<EGLSurface>(surface); +} + +EGLBoolean DestroyContext(Thread *thread, Display *display, gl::Context *context) +{ + + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroyContext", + GetDisplayIfValid(display), EGL_FALSE); + + gl::Context *contextForThread = thread->getContext(); + bool contextWasCurrent = context == contextForThread; + + bool shouldMakeCurrent = + !contextWasCurrent && !context->isExternal() && context->getRefCount() <= 1; + + // Display can't access the current global context, but does exhibit a context switch, + // so ensuring the current global context is correct needs to happen here. + Surface *currentDrawSurface = thread->getCurrentDrawSurface(); + Surface *currentReadSurface = thread->getCurrentReadSurface(); + + if (shouldMakeCurrent) + { + SetContextCurrent(thread, context); + } + + ANGLE_EGL_TRY_RETURN( + thread, + display->destroyContextWithSurfaces(thread, context, contextForThread, currentDrawSurface, + currentReadSurface), + "eglDestroyContext", GetContextIfValid(display, context), EGL_FALSE); + + if (contextWasCurrent) + { + ANGLE_EGL_TRY_RETURN(thread, display->makeCurrent(context, nullptr, nullptr, nullptr), + "eglDestroyContext", GetContextIfValid(display, context), EGL_FALSE); + SetContextCurrent(thread, nullptr); + } + else if (shouldMakeCurrent) + { + SetContextCurrent(thread, contextForThread); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean DestroyImage(Thread *thread, Display *display, Image *img) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroyImage", + GetDisplayIfValid(display), EGL_FALSE); + display->destroyImage(img); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean DestroySurface(Thread *thread, Display *display, Surface *eglSurface) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroySurface", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, display->destroySurface(eglSurface), "eglDestroySurface", + GetSurfaceIfValid(display, eglSurface), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean DestroySync(Thread *thread, Display *display, Sync *syncObject) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroySync", + GetDisplayIfValid(display), EGL_FALSE); + display->destroySync(syncObject); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean GetConfigAttrib(Thread *thread, + Display *display, + Config *configuration, + EGLint attribute, + EGLint *value) +{ + QueryConfigAttrib(configuration, attribute, value); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean GetConfigs(Thread *thread, + Display *display, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config) +{ + ClipConfigs(display->getConfigs(AttributeMap()), configs, config_size, num_config); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLContext GetCurrentContext(Thread *thread) +{ + gl::Context *context = thread->getContext(); + + thread->setSuccess(); + return static_cast<EGLContext>(context); +} + +EGLDisplay GetCurrentDisplay(Thread *thread) +{ + thread->setSuccess(); + if (thread->getContext() != nullptr) + { + return thread->getContext()->getDisplay(); + } + return EGL_NO_DISPLAY; +} + +EGLSurface GetCurrentSurface(Thread *thread, EGLint readdraw) +{ + if (readdraw == EGL_READ) + { + thread->setSuccess(); + return thread->getCurrentReadSurface(); + } + else if (readdraw == EGL_DRAW) + { + thread->setSuccess(); + return thread->getCurrentDrawSurface(); + } + else + { + thread->setError(EglBadParameter(), "eglGetCurrentSurface", nullptr); + return EGL_NO_SURFACE; + } +} + +EGLDisplay GetDisplay(Thread *thread, EGLNativeDisplayType display_id) +{ + return Display::GetDisplayFromNativeDisplay(display_id, AttributeMap()); +} + +EGLint GetError(Thread *thread) +{ + EGLint error = thread->getError(); + thread->setSuccess(); + return error; +} + +EGLDisplay GetPlatformDisplay(Thread *thread, + EGLenum platform, + void *native_display, + const AttributeMap &attribMap) +{ + if (platform == EGL_PLATFORM_ANGLE_ANGLE) + { + return Display::GetDisplayFromNativeDisplay( + gl::bitCast<EGLNativeDisplayType>(native_display), attribMap); + } + else if (platform == EGL_PLATFORM_DEVICE_EXT) + { + Device *eglDevice = static_cast<Device *>(native_display); + return Display::GetDisplayFromDevice(eglDevice, attribMap); + } + else + { + UNREACHABLE(); + return EGL_NO_DISPLAY; + } +} + +__eglMustCastToProperFunctionPointerType GetProcAddress(Thread *thread, const char *procname) +{ + const ProcEntry *entry = + std::lower_bound(&g_procTable[0], &g_procTable[g_numProcs], procname, CompareProc); + + thread->setSuccess(); + + if (entry == &g_procTable[g_numProcs] || strcmp(entry->first, procname) != 0) + { + return nullptr; + } + + return entry->second; +} + +EGLBoolean GetSyncAttrib(Thread *thread, + Display *display, + Sync *syncObject, + EGLint attribute, + EGLAttrib *value) +{ + EGLint valueExt; + ANGLE_EGL_TRY_RETURN(thread, GetSyncAttrib(display, syncObject, attribute, &valueExt), + "eglGetSyncAttrib", GetSyncIfValid(display, syncObject), EGL_FALSE); + *value = valueExt; + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean Initialize(Thread *thread, Display *display, EGLint *major, EGLint *minor) +{ + ANGLE_EGL_TRY_RETURN(thread, display->initialize(), "eglInitialize", GetDisplayIfValid(display), + EGL_FALSE); + + if (major) + *major = 1; + if (minor) + *minor = 5; + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean MakeCurrent(Thread *thread, + Display *display, + Surface *drawSurface, + Surface *readSurface, + gl::Context *context) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglMakeCurrent", + GetDisplayIfValid(display), EGL_FALSE); + Surface *previousDraw = thread->getCurrentDrawSurface(); + Surface *previousRead = thread->getCurrentReadSurface(); + gl::Context *previousContext = thread->getContext(); + + // Only call makeCurrent if the context or surfaces have changed. + if (previousDraw != drawSurface || previousRead != readSurface || previousContext != context) + { + ANGLE_EGL_TRY_RETURN( + thread, display->makeCurrent(previousContext, drawSurface, readSurface, context), + "eglMakeCurrent", GetContextIfValid(display, context), EGL_FALSE); + SetContextCurrent(thread, context); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLenum QueryAPI(Thread *thread) +{ + EGLenum API = thread->getAPI(); + + thread->setSuccess(); + return API; +} + +EGLBoolean QueryContext(Thread *thread, + Display *display, + gl::Context *context, + EGLint attribute, + EGLint *value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryContext", + GetDisplayIfValid(display), EGL_FALSE); + QueryContextAttrib(context, attribute, value); + + thread->setSuccess(); + return EGL_TRUE; +} + +const char *QueryString(Thread *thread, Display *display, EGLint name) +{ + if (display) + { + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryString", + GetDisplayIfValid(display), nullptr); + } + + const char *result = nullptr; + switch (name) + { + case EGL_CLIENT_APIS: + result = "OpenGL_ES"; + break; + case EGL_EXTENSIONS: + if (display == EGL_NO_DISPLAY) + { + result = Display::GetClientExtensionString().c_str(); + } + else + { + result = display->getExtensionString().c_str(); + } + break; + case EGL_VENDOR: + result = display->getVendorString().c_str(); + break; + case EGL_VERSION: + result = "1.5 (ANGLE " ANGLE_VERSION_STRING ")"; + break; + default: + UNREACHABLE(); + break; + } + + thread->setSuccess(); + return result; +} + +EGLBoolean QuerySurface(Thread *thread, + Display *display, + Surface *eglSurface, + EGLint attribute, + EGLint *value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQuerySurface", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN( + thread, QuerySurfaceAttrib(display, thread->getContext(), eglSurface, attribute, value), + "eglQuerySurface", GetSurfaceIfValid(display, eglSurface), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean ReleaseTexImage(Thread *thread, Display *display, Surface *eglSurface, EGLint buffer) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglReleaseTexImage", + GetDisplayIfValid(display), EGL_FALSE); + gl::Texture *texture = eglSurface->getBoundTexture(); + + if (texture) + { + ANGLE_EGL_TRY_RETURN(thread, eglSurface->releaseTexImage(thread->getContext(), buffer), + "eglReleaseTexImage", GetSurfaceIfValid(display, eglSurface), + EGL_FALSE); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean ReleaseThread(Thread *thread) +{ + Surface *previousDraw = thread->getCurrentDrawSurface(); + Surface *previousRead = thread->getCurrentReadSurface(); + gl::Context *previousContext = thread->getContext(); + Display *previousDisplay = thread->getDisplay(); + + if (previousDisplay != EGL_NO_DISPLAY) + { + ANGLE_EGL_TRY_RETURN(thread, previousDisplay->prepareForCall(), "eglReleaseThread", + GetDisplayIfValid(previousDisplay), EGL_FALSE); + // Only call makeCurrent if the context or surfaces have changed. + if (previousDraw != EGL_NO_SURFACE || previousRead != EGL_NO_SURFACE || + previousContext != EGL_NO_CONTEXT) + { + ANGLE_EGL_TRY_RETURN( + thread, previousDisplay->makeCurrent(previousContext, nullptr, nullptr, nullptr), + "eglReleaseThread", nullptr, EGL_FALSE); + } + ANGLE_EGL_TRY_RETURN(thread, previousDisplay->releaseThread(), "eglReleaseThread", + GetDisplayIfValid(previousDisplay), EGL_FALSE); + SetContextCurrent(thread, nullptr); + } + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean SurfaceAttrib(Thread *thread, + Display *display, + Surface *eglSurface, + EGLint attribute, + EGLint value) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSurfaceAttrib", + GetDisplayIfValid(display), EGL_FALSE); + SetSurfaceAttrib(eglSurface, attribute, value); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean SwapBuffers(Thread *thread, Display *display, Surface *eglSurface) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSwapBuffers", + GetDisplayIfValid(display), EGL_FALSE); + + ANGLE_EGL_TRY_RETURN(thread, eglSurface->swap(thread->getContext()), "eglSwapBuffers", + GetSurfaceIfValid(display, eglSurface), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean SwapInterval(Thread *thread, Display *display, EGLint interval) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSwapInterval", + GetDisplayIfValid(display), EGL_FALSE); + + Surface *drawSurface = static_cast<Surface *>(thread->getCurrentDrawSurface()); + const Config *surfaceConfig = drawSurface->getConfig(); + EGLint clampedInterval = std::min(std::max(interval, surfaceConfig->minSwapInterval), + surfaceConfig->maxSwapInterval); + + drawSurface->setSwapInterval(clampedInterval); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean Terminate(Thread *thread, Display *display) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglTerminate", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, + display->makeCurrent(thread->getContext(), nullptr, nullptr, nullptr), + "eglTerminate", GetDisplayIfValid(display), EGL_FALSE); + SetContextCurrent(thread, nullptr); + ANGLE_EGL_TRY_RETURN(thread, display->terminate(thread), "eglTerminate", + GetDisplayIfValid(display), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean WaitClient(Thread *thread) +{ + Display *display = thread->getDisplay(); + if (display == nullptr) + { + // EGL spec says this about eglWaitClient - + // If there is no current context for the current rendering API, + // the function has no effect but still returns EGL_TRUE. + return EGL_TRUE; + } + + gl::Context *context = thread->getContext(); + + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitClient", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, display->waitClient(context), "eglWaitClient", + GetContextIfValid(display, context), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean WaitGL(Thread *thread) +{ + Display *display = thread->getDisplay(); + if (display == nullptr) + { + // EGL spec says this about eglWaitGL - + // eglWaitGL is ignored if there is no current EGL rendering context for OpenGL ES. + return EGL_TRUE; + } + + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitGL", GetDisplayIfValid(display), + EGL_FALSE); + + // eglWaitGL like calling eglWaitClient with the OpenGL ES API bound. Since we only implement + // OpenGL ES we can do the call directly. + ANGLE_EGL_TRY_RETURN(thread, display->waitClient(thread->getContext()), "eglWaitGL", + GetDisplayIfValid(display), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean WaitNative(Thread *thread, EGLint engine) +{ + Display *display = thread->getDisplay(); + if (display == nullptr) + { + // EGL spec says this about eglWaitNative - + // eglWaitNative is ignored if there is no current EGL rendering context. + return EGL_TRUE; + } + + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitNative", + GetDisplayIfValid(display), EGL_FALSE); + ANGLE_EGL_TRY_RETURN(thread, display->waitNative(thread->getContext(), engine), "eglWaitNative", + GetThreadIfValid(thread), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} + +EGLBoolean WaitSync(Thread *thread, Display *display, Sync *syncObject, EGLint flags) +{ + ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitSync", + GetDisplayIfValid(display), EGL_FALSE); + gl::Context *currentContext = thread->getContext(); + ANGLE_EGL_TRY_RETURN(thread, syncObject->serverWait(display, currentContext, flags), + "eglWaitSync", GetSyncIfValid(display, syncObject), EGL_FALSE); + + thread->setSuccess(); + return EGL_TRUE; +} +} // namespace egl diff --git a/gfx/angle/checkout/src/libGLESv2/egl_stubs_autogen.h b/gfx/angle/checkout/src/libGLESv2/egl_stubs_autogen.h new file mode 100644 index 0000000000..6d7d210d9d --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/egl_stubs_autogen.h @@ -0,0 +1,165 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from egl.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. +// +// egl_stubs_autogen.h: Stubs for EGL entry points. + +#ifndef LIBGLESV2_EGL_STUBS_AUTOGEN_H_ +#define LIBGLESV2_EGL_STUBS_AUTOGEN_H_ + +#include <EGL/egl.h> +#include <EGL/eglext.h> + +#include "common/PackedEGLEnums_autogen.h" + +namespace gl +{ +class Context; +} // namespace gl + +namespace egl +{ +class AttributeMap; +class Device; +class Display; +class Image; +class Stream; +class Surface; +class Sync; +class Thread; +struct Config; + +EGLBoolean BindAPI(Thread *thread, EGLenum api); +EGLBoolean BindTexImage(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint buffer); +EGLBoolean ChooseConfig(Thread *thread, + egl::Display *dpyPacked, + const AttributeMap &attrib_listPacked, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config); +EGLint ClientWaitSync(Thread *thread, + egl::Display *dpyPacked, + Sync *syncPacked, + EGLint flags, + EGLTime timeout); +EGLBoolean CopyBuffers(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLNativePixmapType target); +EGLContext CreateContext(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + gl::Context *share_contextPacked, + const AttributeMap &attrib_listPacked); +EGLImage CreateImage(Thread *thread, + egl::Display *dpyPacked, + gl::Context *ctxPacked, + EGLenum target, + EGLClientBuffer buffer, + const AttributeMap &attrib_listPacked); +EGLSurface CreatePbufferFromClientBuffer(Thread *thread, + egl::Display *dpyPacked, + EGLenum buftype, + EGLClientBuffer buffer, + Config *configPacked, + const AttributeMap &attrib_listPacked); +EGLSurface CreatePbufferSurface(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + const AttributeMap &attrib_listPacked); +EGLSurface CreatePixmapSurface(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + EGLNativePixmapType pixmap, + const AttributeMap &attrib_listPacked); +EGLSurface CreatePlatformPixmapSurface(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + void *native_pixmap, + const AttributeMap &attrib_listPacked); +EGLSurface CreatePlatformWindowSurface(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + void *native_window, + const AttributeMap &attrib_listPacked); +EGLSync CreateSync(Thread *thread, + egl::Display *dpyPacked, + EGLenum type, + const AttributeMap &attrib_listPacked); +EGLSurface CreateWindowSurface(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + EGLNativeWindowType win, + const AttributeMap &attrib_listPacked); +EGLBoolean DestroyContext(Thread *thread, egl::Display *dpyPacked, gl::Context *ctxPacked); +EGLBoolean DestroyImage(Thread *thread, egl::Display *dpyPacked, Image *imagePacked); +EGLBoolean DestroySurface(Thread *thread, egl::Display *dpyPacked, Surface *surfacePacked); +EGLBoolean DestroySync(Thread *thread, egl::Display *dpyPacked, Sync *syncPacked); +EGLBoolean GetConfigAttrib(Thread *thread, + egl::Display *dpyPacked, + Config *configPacked, + EGLint attribute, + EGLint *value); +EGLBoolean GetConfigs(Thread *thread, + egl::Display *dpyPacked, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config); +EGLContext GetCurrentContext(Thread *thread); +EGLDisplay GetCurrentDisplay(Thread *thread); +EGLSurface GetCurrentSurface(Thread *thread, EGLint readdraw); +EGLDisplay GetDisplay(Thread *thread, EGLNativeDisplayType display_id); +EGLint GetError(Thread *thread); +EGLDisplay GetPlatformDisplay(Thread *thread, + EGLenum platform, + void *native_display, + const AttributeMap &attrib_listPacked); +__eglMustCastToProperFunctionPointerType GetProcAddress(Thread *thread, const char *procname); +EGLBoolean GetSyncAttrib(Thread *thread, + egl::Display *dpyPacked, + Sync *syncPacked, + EGLint attribute, + EGLAttrib *value); +EGLBoolean Initialize(Thread *thread, egl::Display *dpyPacked, EGLint *major, EGLint *minor); +EGLBoolean MakeCurrent(Thread *thread, + egl::Display *dpyPacked, + Surface *drawPacked, + Surface *readPacked, + gl::Context *ctxPacked); +EGLenum QueryAPI(Thread *thread); +EGLBoolean QueryContext(Thread *thread, + egl::Display *dpyPacked, + gl::Context *ctxPacked, + EGLint attribute, + EGLint *value); +const char *QueryString(Thread *thread, egl::Display *dpyPacked, EGLint name); +EGLBoolean QuerySurface(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint attribute, + EGLint *value); +EGLBoolean ReleaseTexImage(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint buffer); +EGLBoolean ReleaseThread(Thread *thread); +EGLBoolean SurfaceAttrib(Thread *thread, + egl::Display *dpyPacked, + Surface *surfacePacked, + EGLint attribute, + EGLint value); +EGLBoolean SwapBuffers(Thread *thread, egl::Display *dpyPacked, Surface *surfacePacked); +EGLBoolean SwapInterval(Thread *thread, egl::Display *dpyPacked, EGLint interval); +EGLBoolean Terminate(Thread *thread, egl::Display *dpyPacked); +EGLBoolean WaitClient(Thread *thread); +EGLBoolean WaitGL(Thread *thread); +EGLBoolean WaitNative(Thread *thread, EGLint engine); +EGLBoolean WaitSync(Thread *thread, egl::Display *dpyPacked, Sync *syncPacked, EGLint flags); +} // namespace egl +#endif // LIBGLESV2_EGL_STUBS_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_egl_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_autogen.cpp new file mode 100644 index 0000000000..89eccf6957 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_autogen.cpp @@ -0,0 +1,812 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from egl.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_autogen.cpp: +// Defines the EGL entry points. + +#include "libGLESv2/entry_points_egl_autogen.h" + +#include "libANGLE/entry_points_utils.h" +#include "libANGLE/validationEGL_autogen.h" +#include "libGLESv2/egl_stubs_autogen.h" +#include "libGLESv2/global_state.h" + +using namespace egl; + +extern "C" { + +// EGL 1.0 +EGLBoolean EGLAPIENTRY EGL_ChooseConfig(EGLDisplay dpy, + const EGLint *attrib_list, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ChooseConfig, + "dpy = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR ", configs = 0x%016" PRIxPTR + ", config_size = %d, num_config = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)attrib_list, (uintptr_t)configs, config_size, + (uintptr_t)num_config); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, ChooseConfig, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + attrib_listPacked, configs, config_size, num_config); + + return ChooseConfig(thread, dpyPacked, attrib_listPacked, configs, config_size, num_config); +} + +EGLBoolean EGLAPIENTRY EGL_CopyBuffers(EGLDisplay dpy, + EGLSurface surface, + EGLNativePixmapType target) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CopyBuffers, + "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", target = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)target); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, CopyBuffers, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked, target); + + return CopyBuffers(thread, dpyPacked, surfacePacked, target); +} + +EGLContext EGLAPIENTRY EGL_CreateContext(EGLDisplay dpy, + EGLConfig config, + EGLContext share_context, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreateContext, + "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", share_context = 0x%016" PRIxPTR + ", attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)share_context, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + gl::Context *share_contextPacked = PackParam<gl::Context *>(share_context); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateContext, GetDisplayIfValid(dpyPacked), EGLContext, dpyPacked, + configPacked, share_contextPacked, attrib_listPacked); + + return CreateContext(thread, dpyPacked, configPacked, share_contextPacked, attrib_listPacked); +} + +EGLSurface EGLAPIENTRY EGL_CreatePbufferSurface(EGLDisplay dpy, + EGLConfig config, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreatePbufferSurface, + "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR + "", + (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreatePbufferSurface, GetDisplayIfValid(dpyPacked), EGLSurface, + dpyPacked, configPacked, attrib_listPacked); + + return CreatePbufferSurface(thread, dpyPacked, configPacked, attrib_listPacked); +} + +EGLSurface EGLAPIENTRY EGL_CreatePixmapSurface(EGLDisplay dpy, + EGLConfig config, + EGLNativePixmapType pixmap, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreatePixmapSurface, + "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", pixmap = 0x%016" PRIxPTR + ", attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)pixmap, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreatePixmapSurface, GetDisplayIfValid(dpyPacked), EGLSurface, + dpyPacked, configPacked, pixmap, attrib_listPacked); + + return CreatePixmapSurface(thread, dpyPacked, configPacked, pixmap, attrib_listPacked); +} + +EGLSurface EGLAPIENTRY EGL_CreateWindowSurface(EGLDisplay dpy, + EGLConfig config, + EGLNativeWindowType win, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreateWindowSurface, + "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", win = 0x%016" PRIxPTR + ", attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)config, (uintptr_t)win, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateWindowSurface, GetDisplayIfValid(dpyPacked), EGLSurface, + dpyPacked, configPacked, win, attrib_listPacked); + + return CreateWindowSurface(thread, dpyPacked, configPacked, win, attrib_listPacked); +} + +EGLBoolean EGLAPIENTRY EGL_DestroyContext(EGLDisplay dpy, EGLContext ctx) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DestroyContext, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "", (uintptr_t)dpy, + (uintptr_t)ctx); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + gl::Context *ctxPacked = PackParam<gl::Context *>(ctx); + + ANGLE_EGL_VALIDATE(thread, DestroyContext, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + ctxPacked); + + return DestroyContext(thread, dpyPacked, ctxPacked); +} + +EGLBoolean EGLAPIENTRY EGL_DestroySurface(EGLDisplay dpy, EGLSurface surface) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DestroySurface, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)surface); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, DestroySurface, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked); + + return DestroySurface(thread, dpyPacked, surfacePacked); +} + +EGLBoolean EGLAPIENTRY EGL_GetConfigAttrib(EGLDisplay dpy, + EGLConfig config, + EGLint attribute, + EGLint *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetConfigAttrib, + "dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR + ", attribute = %d, value = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)config, attribute, (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + + ANGLE_EGL_VALIDATE(thread, GetConfigAttrib, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + configPacked, attribute, value); + + return GetConfigAttrib(thread, dpyPacked, configPacked, attribute, value); +} + +EGLBoolean EGLAPIENTRY EGL_GetConfigs(EGLDisplay dpy, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetConfigs, + "dpy = 0x%016" PRIxPTR ", configs = 0x%016" PRIxPTR + ", config_size = %d, num_config = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)configs, config_size, (uintptr_t)num_config); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, GetConfigs, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + configs, config_size, num_config); + + return GetConfigs(thread, dpyPacked, configs, config_size, num_config); +} + +EGLDisplay EGLAPIENTRY EGL_GetCurrentDisplay() +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetCurrentDisplay, ""); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, GetCurrentDisplay, nullptr, EGLDisplay); + + return GetCurrentDisplay(thread); +} + +EGLSurface EGLAPIENTRY EGL_GetCurrentSurface(EGLint readdraw) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetCurrentSurface, "readdraw = %d", readdraw); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, GetCurrentSurface, nullptr, EGLSurface, readdraw); + + return GetCurrentSurface(thread, readdraw); +} + +EGLDisplay EGLAPIENTRY EGL_GetDisplay(EGLNativeDisplayType display_id) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetDisplay, "display_id = 0x%016" PRIxPTR "", (uintptr_t)display_id); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, GetDisplay, nullptr, EGLDisplay, display_id); + + return GetDisplay(thread, display_id); +} + +EGLint EGLAPIENTRY EGL_GetError() +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetError, ""); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, GetError, nullptr, EGLint); + + return GetError(thread); +} + +__eglMustCastToProperFunctionPointerType EGLAPIENTRY EGL_GetProcAddress(const char *procname) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetProcAddress, "procname = 0x%016" PRIxPTR "", (uintptr_t)procname); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, GetProcAddress, nullptr, __eglMustCastToProperFunctionPointerType, + procname); + + return GetProcAddress(thread, procname); +} + +EGLBoolean EGLAPIENTRY EGL_Initialize(EGLDisplay dpy, EGLint *major, EGLint *minor) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(Initialize, + "dpy = 0x%016" PRIxPTR ", major = 0x%016" PRIxPTR ", minor = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)major, (uintptr_t)minor); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, Initialize, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + major, minor); + + return Initialize(thread, dpyPacked, major, minor); +} + +EGLBoolean EGLAPIENTRY EGL_MakeCurrent(EGLDisplay dpy, + EGLSurface draw, + EGLSurface read, + EGLContext ctx) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(MakeCurrent, + "dpy = 0x%016" PRIxPTR ", draw = 0x%016" PRIxPTR ", read = 0x%016" PRIxPTR + ", ctx = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)draw, (uintptr_t)read, (uintptr_t)ctx); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *drawPacked = PackParam<Surface *>(draw); + Surface *readPacked = PackParam<Surface *>(read); + gl::Context *ctxPacked = PackParam<gl::Context *>(ctx); + + ANGLE_EGL_VALIDATE(thread, MakeCurrent, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + drawPacked, readPacked, ctxPacked); + + return MakeCurrent(thread, dpyPacked, drawPacked, readPacked, ctxPacked); +} + +EGLBoolean EGLAPIENTRY EGL_QueryContext(EGLDisplay dpy, + EGLContext ctx, + EGLint attribute, + EGLint *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryContext, + "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR + ", attribute = %d, value = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)ctx, attribute, (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + gl::Context *ctxPacked = PackParam<gl::Context *>(ctx); + + ANGLE_EGL_VALIDATE(thread, QueryContext, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + ctxPacked, attribute, value); + + return QueryContext(thread, dpyPacked, ctxPacked, attribute, value); +} + +const char *EGLAPIENTRY EGL_QueryString(EGLDisplay dpy, EGLint name) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryString, "dpy = 0x%016" PRIxPTR ", name = %d", (uintptr_t)dpy, name); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, QueryString, GetDisplayIfValid(dpyPacked), const char *, dpyPacked, + name); + + return QueryString(thread, dpyPacked, name); +} + +EGLBoolean EGLAPIENTRY EGL_QuerySurface(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + EGLint *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QuerySurface, + "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR + ", attribute = %d, value = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)surface, attribute, (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, QuerySurface, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked, attribute, value); + + return QuerySurface(thread, dpyPacked, surfacePacked, attribute, value); +} + +EGLBoolean EGLAPIENTRY EGL_SwapBuffers(EGLDisplay dpy, EGLSurface surface) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(SwapBuffers, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "", (uintptr_t)dpy, + (uintptr_t)surface); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, SwapBuffers, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked); + + return SwapBuffers(thread, dpyPacked, surfacePacked); +} + +EGLBoolean EGLAPIENTRY EGL_Terminate(EGLDisplay dpy) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(Terminate, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, Terminate, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked); + + return Terminate(thread, dpyPacked); +} + +EGLBoolean EGLAPIENTRY EGL_WaitGL() +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(WaitGL, ""); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, WaitGL, nullptr, EGLBoolean); + + return WaitGL(thread); +} + +EGLBoolean EGLAPIENTRY EGL_WaitNative(EGLint engine) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(WaitNative, "engine = %d", engine); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, WaitNative, nullptr, EGLBoolean, engine); + + return WaitNative(thread, engine); +} + +// EGL 1.1 +EGLBoolean EGLAPIENTRY EGL_BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(BindTexImage, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", buffer = %d", + (uintptr_t)dpy, (uintptr_t)surface, buffer); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, BindTexImage, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked, buffer); + + return BindTexImage(thread, dpyPacked, surfacePacked, buffer); +} + +EGLBoolean EGLAPIENTRY EGL_ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ReleaseTexImage, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", buffer = %d", + (uintptr_t)dpy, (uintptr_t)surface, buffer); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, ReleaseTexImage, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked, buffer); + + return ReleaseTexImage(thread, dpyPacked, surfacePacked, buffer); +} + +EGLBoolean EGLAPIENTRY EGL_SurfaceAttrib(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + EGLint value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(SurfaceAttrib, + "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", attribute = %d, value = %d", + (uintptr_t)dpy, (uintptr_t)surface, attribute, value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, SurfaceAttrib, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked, attribute, value); + + return SurfaceAttrib(thread, dpyPacked, surfacePacked, attribute, value); +} + +EGLBoolean EGLAPIENTRY EGL_SwapInterval(EGLDisplay dpy, EGLint interval) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(SwapInterval, "dpy = 0x%016" PRIxPTR ", interval = %d", (uintptr_t)dpy, interval); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, SwapInterval, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + interval); + + return SwapInterval(thread, dpyPacked, interval); +} + +// EGL 1.2 +EGLBoolean EGLAPIENTRY EGL_BindAPI(EGLenum api) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(BindAPI, "api = 0x%X", api); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, BindAPI, nullptr, EGLBoolean, api); + + return BindAPI(thread, api); +} + +EGLSurface EGLAPIENTRY EGL_CreatePbufferFromClientBuffer(EGLDisplay dpy, + EGLenum buftype, + EGLClientBuffer buffer, + EGLConfig config, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreatePbufferFromClientBuffer, + "dpy = 0x%016" PRIxPTR ", buftype = 0x%X, buffer = 0x%016" PRIxPTR + ", config = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)dpy, buftype, (uintptr_t)buffer, (uintptr_t)config, + (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreatePbufferFromClientBuffer, GetDisplayIfValid(dpyPacked), + EGLSurface, dpyPacked, buftype, buffer, configPacked, attrib_listPacked); + + return CreatePbufferFromClientBuffer(thread, dpyPacked, buftype, buffer, configPacked, + attrib_listPacked); +} + +EGLenum EGLAPIENTRY EGL_QueryAPI() +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryAPI, ""); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, QueryAPI, nullptr, EGLenum); + + return QueryAPI(thread); +} + +EGLBoolean EGLAPIENTRY EGL_ReleaseThread() +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ReleaseThread, ""); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, ReleaseThread, nullptr, EGLBoolean); + + return ReleaseThread(thread); +} + +EGLBoolean EGLAPIENTRY EGL_WaitClient() +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(WaitClient, ""); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, WaitClient, nullptr, EGLBoolean); + + return WaitClient(thread); +} + +// EGL 1.4 +EGLContext EGLAPIENTRY EGL_GetCurrentContext() +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetCurrentContext, ""); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, GetCurrentContext, nullptr, EGLContext); + + return GetCurrentContext(thread); +} + +// EGL 1.5 +EGLint EGLAPIENTRY EGL_ClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ClientWaitSync, + "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)); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, ClientWaitSync, GetDisplayIfValid(dpyPacked), EGLint, dpyPacked, + syncPacked, flags, timeout); + + return ClientWaitSync(thread, dpyPacked, syncPacked, flags, timeout); +} + +EGLImage EGLAPIENTRY EGL_CreateImage(EGLDisplay dpy, + EGLContext ctx, + EGLenum target, + EGLClientBuffer buffer, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreateImage, + "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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + gl::Context *ctxPacked = PackParam<gl::Context *>(ctx); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateImage, GetDisplayIfValid(dpyPacked), EGLImage, dpyPacked, + ctxPacked, target, buffer, attrib_listPacked); + + return CreateImage(thread, dpyPacked, ctxPacked, target, buffer, attrib_listPacked); +} + +EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurface(EGLDisplay dpy, + EGLConfig config, + void *native_pixmap, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreatePlatformPixmapSurface, + "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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreatePlatformPixmapSurface, GetDisplayIfValid(dpyPacked), + EGLSurface, dpyPacked, configPacked, native_pixmap, attrib_listPacked); + + return CreatePlatformPixmapSurface(thread, dpyPacked, configPacked, native_pixmap, + attrib_listPacked); +} + +EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurface(EGLDisplay dpy, + EGLConfig config, + void *native_window, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreatePlatformWindowSurface, + "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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreatePlatformWindowSurface, GetDisplayIfValid(dpyPacked), + EGLSurface, dpyPacked, configPacked, native_window, attrib_listPacked); + + return CreatePlatformWindowSurface(thread, dpyPacked, configPacked, native_window, + attrib_listPacked); +} + +EGLSync EGLAPIENTRY EGL_CreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreateSync, "dpy = 0x%016" PRIxPTR ", type = 0x%X, attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)dpy, type, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateSync, GetDisplayIfValid(dpyPacked), EGLSync, dpyPacked, type, + attrib_listPacked); + + return CreateSync(thread, dpyPacked, type, attrib_listPacked); +} + +EGLBoolean EGLAPIENTRY EGL_DestroyImage(EGLDisplay dpy, EGLImage image) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DestroyImage, "dpy = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR "", (uintptr_t)dpy, + (uintptr_t)image); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Image *imagePacked = PackParam<Image *>(image); + + ANGLE_EGL_VALIDATE(thread, DestroyImage, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + imagePacked); + + return DestroyImage(thread, dpyPacked, imagePacked); +} + +EGLBoolean EGLAPIENTRY EGL_DestroySync(EGLDisplay dpy, EGLSync sync) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DestroySync, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", (uintptr_t)dpy, + (uintptr_t)sync); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, DestroySync, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + syncPacked); + + return DestroySync(thread, dpyPacked, syncPacked); +} + +EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplay(EGLenum platform, + void *native_display, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetPlatformDisplay, + "platform = 0x%X, native_display = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR + "", + platform, (uintptr_t)native_display, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, GetPlatformDisplay, nullptr, EGLDisplay, platform, native_display, + attrib_listPacked); + + return GetPlatformDisplay(thread, platform, native_display, attrib_listPacked); +} + +EGLBoolean EGLAPIENTRY EGL_GetSyncAttrib(EGLDisplay dpy, + EGLSync sync, + EGLint attribute, + EGLAttrib *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetSyncAttrib, + "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR + ", attribute = %d, value = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)sync, attribute, (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, GetSyncAttrib, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + syncPacked, attribute, value); + + return GetSyncAttrib(thread, dpyPacked, syncPacked, attribute, value); +} + +EGLBoolean EGLAPIENTRY EGL_WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(WaitSync, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d", + (uintptr_t)dpy, (uintptr_t)sync, flags); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, WaitSync, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + syncPacked, flags); + + return WaitSync(thread, dpyPacked, syncPacked, flags); +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_egl_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_autogen.h new file mode 100644 index 0000000000..407054b3e6 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_autogen.h @@ -0,0 +1,138 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from egl.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_autogen.h: +// Defines the EGL entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_EGL_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_EGL_AUTOGEN_H_ + +#include <EGL/egl.h> +#include <export.h> + +extern "C" { + +// EGL 1.0 +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_ChooseConfig(EGLDisplay dpy, + const EGLint *attrib_list, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_CopyBuffers(EGLDisplay dpy, + EGLSurface surface, + EGLNativePixmapType target); +ANGLE_EXPORT EGLContext EGLAPIENTRY EGL_CreateContext(EGLDisplay dpy, + EGLConfig config, + EGLContext share_context, + const EGLint *attrib_list); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePbufferSurface(EGLDisplay dpy, + EGLConfig config, + const EGLint *attrib_list); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePixmapSurface(EGLDisplay dpy, + EGLConfig config, + EGLNativePixmapType pixmap, + const EGLint *attrib_list); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreateWindowSurface(EGLDisplay dpy, + EGLConfig config, + EGLNativeWindowType win, + const EGLint *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroyContext(EGLDisplay dpy, EGLContext ctx); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySurface(EGLDisplay dpy, EGLSurface surface); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetConfigAttrib(EGLDisplay dpy, + EGLConfig config, + EGLint attribute, + EGLint *value); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetConfigs(EGLDisplay dpy, + EGLConfig *configs, + EGLint config_size, + EGLint *num_config); +ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetCurrentDisplay(); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_GetCurrentSurface(EGLint readdraw); +ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetDisplay(EGLNativeDisplayType display_id); +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_GetError(); +ANGLE_EXPORT __eglMustCastToProperFunctionPointerType EGLAPIENTRY +EGL_GetProcAddress(const char *procname); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_Initialize(EGLDisplay dpy, EGLint *major, EGLint *minor); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_MakeCurrent(EGLDisplay dpy, + EGLSurface draw, + EGLSurface read, + EGLContext ctx); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QueryContext(EGLDisplay dpy, + EGLContext ctx, + EGLint attribute, + EGLint *value); +ANGLE_EXPORT const char *EGLAPIENTRY EGL_QueryString(EGLDisplay dpy, EGLint name); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QuerySurface(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + EGLint *value); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SwapBuffers(EGLDisplay dpy, EGLSurface surface); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_Terminate(EGLDisplay dpy); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitGL(); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitNative(EGLint engine); + +// EGL 1.1 +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_BindTexImage(EGLDisplay dpy, + EGLSurface surface, + EGLint buffer); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_ReleaseTexImage(EGLDisplay dpy, + EGLSurface surface, + EGLint buffer); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SurfaceAttrib(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + EGLint value); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SwapInterval(EGLDisplay dpy, EGLint interval); + +// EGL 1.2 +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_BindAPI(EGLenum api); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePbufferFromClientBuffer(EGLDisplay dpy, + EGLenum buftype, + EGLClientBuffer buffer, + EGLConfig config, + const EGLint *attrib_list); +ANGLE_EXPORT EGLenum EGLAPIENTRY EGL_QueryAPI(); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_ReleaseThread(); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitClient(); + +// EGL 1.4 +ANGLE_EXPORT EGLContext EGLAPIENTRY EGL_GetCurrentContext(); + +// EGL 1.5 +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSync(EGLDisplay dpy, + EGLSync sync, + EGLint flags, + EGLTime timeout); +ANGLE_EXPORT EGLImage EGLAPIENTRY EGL_CreateImage(EGLDisplay dpy, + EGLContext ctx, + EGLenum target, + EGLClientBuffer buffer, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurface(EGLDisplay dpy, + EGLConfig config, + void *native_pixmap, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurface(EGLDisplay dpy, + EGLConfig config, + void *native_window, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLSync EGLAPIENTRY EGL_CreateSync(EGLDisplay dpy, + EGLenum type, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroyImage(EGLDisplay dpy, EGLImage image); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySync(EGLDisplay dpy, EGLSync sync); +ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplay(EGLenum platform, + void *native_display, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttrib(EGLDisplay dpy, + EGLSync sync, + EGLint attribute, + EGLAttrib *value); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_EGL_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_egl_ext_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_ext_autogen.cpp new file mode 100644 index 0000000000..88a847221a --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_ext_autogen.cpp @@ -0,0 +1,1127 @@ +// 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/entry_points_utils.h" +#include "libANGLE/validationEGL_autogen.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) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(SetBlobCacheFuncsANDROID, + "dpy = 0x%016" PRIxPTR ", set = 0x%016" PRIxPTR ", get = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)set, (uintptr_t)get); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE_VOID(thread, SetBlobCacheFuncsANDROID, GetDisplayIfValid(dpyPacked), + dpyPacked, set, get); + + SetBlobCacheFuncsANDROID(thread, dpyPacked, set, get); +} + +// EGL_ANDROID_create_native_client_buffer +EGLClientBuffer EGLAPIENTRY EGL_CreateNativeClientBufferANDROID(const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreateNativeClientBufferANDROID, "attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateNativeClientBufferANDROID, nullptr, EGLClientBuffer, + attrib_listPacked); + + return CreateNativeClientBufferANDROID(thread, attrib_listPacked); +} + +// EGL_ANDROID_get_frame_timestamps +EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingSupportedANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint name) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetCompositorTimingSupportedANDROID, + "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", name = %d", (uintptr_t)dpy, + (uintptr_t)surface, name); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + CompositorTiming namePacked = PackParam<CompositorTiming>(name); + + ANGLE_EGL_VALIDATE(thread, GetCompositorTimingSupportedANDROID, GetDisplayIfValid(dpyPacked), + EGLBoolean, dpyPacked, surfacePacked, namePacked); + + return GetCompositorTimingSupportedANDROID(thread, dpyPacked, surfacePacked, namePacked); +} + +EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint numTimestamps, + const EGLint *names, + EGLnsecsANDROID *values) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, GetCompositorTimingANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, surfacePacked, numTimestamps, names, values); + + return GetCompositorTimingANDROID(thread, dpyPacked, surfacePacked, numTimestamps, names, + values); +} + +EGLBoolean EGLAPIENTRY EGL_GetNextFrameIdANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR *frameId) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetNextFrameIdANDROID, + "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", frameId = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)frameId); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, GetNextFrameIdANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, surfacePacked, frameId); + + return GetNextFrameIdANDROID(thread, dpyPacked, surfacePacked, frameId); +} + +EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampSupportedANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint timestamp) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetFrameTimestampSupportedANDROID, + "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", timestamp = %d", + (uintptr_t)dpy, (uintptr_t)surface, timestamp); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + Timestamp timestampPacked = PackParam<Timestamp>(timestamp); + + ANGLE_EGL_VALIDATE(thread, GetFrameTimestampSupportedANDROID, GetDisplayIfValid(dpyPacked), + EGLBoolean, dpyPacked, surfacePacked, timestampPacked); + + return GetFrameTimestampSupportedANDROID(thread, dpyPacked, surfacePacked, timestampPacked); +} + +EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampsANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR frameId, + EGLint numTimestamps, + const EGLint *timestamps, + EGLnsecsANDROID *values) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, GetFrameTimestampsANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, surfacePacked, frameId, numTimestamps, timestamps, values); + + return GetFrameTimestampsANDROID(thread, dpyPacked, surfacePacked, frameId, numTimestamps, + timestamps, values); +} + +// EGL_ANDROID_get_native_client_buffer +EGLClientBuffer EGLAPIENTRY EGL_GetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(GetNativeClientBufferANDROID, "buffer = 0x%016" PRIxPTR "", (uintptr_t)buffer); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, GetNativeClientBufferANDROID, nullptr, EGLClientBuffer, buffer); + + return GetNativeClientBufferANDROID(thread, buffer); +} + +// EGL_ANDROID_native_fence_sync +EGLint EGLAPIENTRY EGL_DupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DupNativeFenceFDANDROID, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)sync); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, DupNativeFenceFDANDROID, GetDisplayIfValid(dpyPacked), EGLint, + dpyPacked, syncPacked); + + return DupNativeFenceFDANDROID(thread, dpyPacked, syncPacked); +} + +// EGL_ANDROID_presentation_time +EGLBoolean EGLAPIENTRY EGL_PresentationTimeANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLnsecsANDROID time) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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)); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, PresentationTimeANDROID, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, surfacePacked, time); + + return PresentationTimeANDROID(thread, dpyPacked, surfacePacked, time); +} + +// EGL_ANGLE_device_creation +EGLDeviceEXT EGLAPIENTRY EGL_CreateDeviceANGLE(EGLint device_type, + void *native_device, + const EGLAttrib *attrib_list) +{ + 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); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, CreateDeviceANGLE, nullptr, EGLDeviceEXT, device_type, native_device, + attrib_list); + + return CreateDeviceANGLE(thread, device_type, native_device, attrib_list); +} + +EGLBoolean EGLAPIENTRY EGL_ReleaseDeviceANGLE(EGLDeviceEXT device) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ReleaseDeviceANGLE, "device = 0x%016" PRIxPTR "", (uintptr_t)device); + + Thread *thread = egl::GetCurrentThread(); + + Device *devicePacked = PackParam<Device *>(device); + + ANGLE_EGL_VALIDATE(thread, ReleaseDeviceANGLE, nullptr, EGLBoolean, devicePacked); + + return ReleaseDeviceANGLE(thread, devicePacked); +} + +// EGL_ANGLE_feature_control +const char *EGLAPIENTRY EGL_QueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryStringiANGLE, "dpy = 0x%016" PRIxPTR ", name = %d, index = %d", (uintptr_t)dpy, + name, index); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, QueryStringiANGLE, GetDisplayIfValid(dpyPacked), const char *, + dpyPacked, name, index); + + return QueryStringiANGLE(thread, dpyPacked, name, index); +} + +EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribANGLE(EGLDisplay dpy, + EGLint attribute, + EGLAttrib *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryDisplayAttribANGLE, + "dpy = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", (uintptr_t)dpy, + attribute, (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, QueryDisplayAttribANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, attribute, value); + + return QueryDisplayAttribANGLE(thread, dpyPacked, attribute, value); +} + +// EGL_ANGLE_power_preference +void EGLAPIENTRY EGL_ReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ReleaseHighPowerGPUANGLE, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)ctx); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + gl::Context *ctxPacked = PackParam<gl::Context *>(ctx); + + ANGLE_EGL_VALIDATE_VOID(thread, ReleaseHighPowerGPUANGLE, GetDisplayIfValid(dpyPacked), + dpyPacked, ctxPacked); + + ReleaseHighPowerGPUANGLE(thread, dpyPacked, ctxPacked); +} + +void EGLAPIENTRY EGL_ReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ReacquireHighPowerGPUANGLE, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)ctx); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + gl::Context *ctxPacked = PackParam<gl::Context *>(ctx); + + ANGLE_EGL_VALIDATE_VOID(thread, ReacquireHighPowerGPUANGLE, GetDisplayIfValid(dpyPacked), + dpyPacked, ctxPacked); + + ReacquireHighPowerGPUANGLE(thread, dpyPacked, ctxPacked); +} + +void EGLAPIENTRY EGL_HandleGPUSwitchANGLE(EGLDisplay dpy) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(HandleGPUSwitchANGLE, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE_VOID(thread, HandleGPUSwitchANGLE, GetDisplayIfValid(dpyPacked), dpyPacked); + + HandleGPUSwitchANGLE(thread, dpyPacked); +} + +// EGL_ANGLE_program_cache_control +EGLint EGLAPIENTRY EGL_ProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ProgramCacheGetAttribANGLE, "dpy = 0x%016" PRIxPTR ", attrib = 0x%X", (uintptr_t)dpy, + attrib); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, ProgramCacheGetAttribANGLE, GetDisplayIfValid(dpyPacked), EGLint, + dpyPacked, attrib); + + return ProgramCacheGetAttribANGLE(thread, dpyPacked, attrib); +} + +void EGLAPIENTRY EGL_ProgramCacheQueryANGLE(EGLDisplay dpy, + EGLint index, + void *key, + EGLint *keysize, + void *binary, + EGLint *binarysize) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE_VOID(thread, ProgramCacheQueryANGLE, GetDisplayIfValid(dpyPacked), dpyPacked, + index, key, keysize, binary, binarysize); + + ProgramCacheQueryANGLE(thread, dpyPacked, index, key, keysize, binary, binarysize); +} + +void EGLAPIENTRY EGL_ProgramCachePopulateANGLE(EGLDisplay dpy, + const void *key, + EGLint keysize, + const void *binary, + EGLint binarysize) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE_VOID(thread, ProgramCachePopulateANGLE, GetDisplayIfValid(dpyPacked), + dpyPacked, key, keysize, binary, binarysize); + + ProgramCachePopulateANGLE(thread, dpyPacked, key, keysize, binary, binarysize); +} + +EGLint EGLAPIENTRY EGL_ProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(ProgramCacheResizeANGLE, "dpy = 0x%016" PRIxPTR ", limit = %d, mode = %d", + (uintptr_t)dpy, limit, mode); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, ProgramCacheResizeANGLE, GetDisplayIfValid(dpyPacked), EGLint, + dpyPacked, limit, mode); + + return ProgramCacheResizeANGLE(thread, dpyPacked, limit, mode); +} + +// EGL_ANGLE_query_surface_pointer +EGLBoolean EGLAPIENTRY EGL_QuerySurfacePointerANGLE(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + void **value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, QuerySurfacePointerANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, surfacePacked, attribute, value); + + return QuerySurfacePointerANGLE(thread, dpyPacked, surfacePacked, attribute, value); +} + +// EGL_ANGLE_stream_producer_d3d_texture +EGLBoolean EGLAPIENTRY EGL_CreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, + EGLStreamKHR stream, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateStreamProducerD3DTextureANGLE, GetDisplayIfValid(dpyPacked), + EGLBoolean, dpyPacked, streamPacked, attrib_listPacked); + + return CreateStreamProducerD3DTextureANGLE(thread, dpyPacked, streamPacked, attrib_listPacked); +} + +EGLBoolean EGLAPIENTRY EGL_StreamPostD3DTextureANGLE(EGLDisplay dpy, + EGLStreamKHR stream, + void *texture, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, StreamPostD3DTextureANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, streamPacked, texture, attrib_listPacked); + + return StreamPostD3DTextureANGLE(thread, dpyPacked, streamPacked, texture, attrib_listPacked); +} + +// EGL_ANGLE_swap_with_frame_token +EGLBoolean EGLAPIENTRY EGL_SwapBuffersWithFrameTokenANGLE(EGLDisplay dpy, + EGLSurface surface, + EGLFrameTokenANGLE frametoken) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(SwapBuffersWithFrameTokenANGLE, + "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", frametoken = 0x%llX", + (uintptr_t)dpy, (uintptr_t)surface, static_cast<unsigned long long>(frametoken)); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, SwapBuffersWithFrameTokenANGLE, GetDisplayIfValid(dpyPacked), + EGLBoolean, dpyPacked, surfacePacked, frametoken); + + return SwapBuffersWithFrameTokenANGLE(thread, dpyPacked, surfacePacked, frametoken); +} + +// EGL_ANGLE_sync_control_rate +EGLBoolean EGLAPIENTRY EGL_GetMscRateANGLE(EGLDisplay dpy, + EGLSurface surface, + EGLint *numerator, + EGLint *denominator) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, GetMscRateANGLE, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked, numerator, denominator); + + return GetMscRateANGLE(thread, dpyPacked, surfacePacked, numerator, denominator); +} + +// EGL_CHROMIUM_sync_control +EGLBoolean EGLAPIENTRY EGL_GetSyncValuesCHROMIUM(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR *ust, + EGLuint64KHR *msc, + EGLuint64KHR *sbc) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, GetSyncValuesCHROMIUM, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, surfacePacked, ust, msc, sbc); + + return GetSyncValuesCHROMIUM(thread, dpyPacked, surfacePacked, ust, msc, sbc); +} + +// EGL_EXT_device_query +EGLBoolean EGLAPIENTRY EGL_QueryDeviceAttribEXT(EGLDeviceEXT device, + EGLint attribute, + EGLAttrib *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryDeviceAttribEXT, + "device = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", + (uintptr_t)device, attribute, (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + Device *devicePacked = PackParam<Device *>(device); + + ANGLE_EGL_VALIDATE(thread, QueryDeviceAttribEXT, nullptr, EGLBoolean, devicePacked, attribute, + value); + + return QueryDeviceAttribEXT(thread, devicePacked, attribute, value); +} + +const char *EGLAPIENTRY EGL_QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryDeviceStringEXT, "device = 0x%016" PRIxPTR ", name = %d", (uintptr_t)device, + name); + + Thread *thread = egl::GetCurrentThread(); + + Device *devicePacked = PackParam<Device *>(device); + + ANGLE_EGL_VALIDATE(thread, QueryDeviceStringEXT, nullptr, const char *, devicePacked, name); + + return QueryDeviceStringEXT(thread, devicePacked, name); +} + +EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryDisplayAttribEXT, + "dpy = 0x%016" PRIxPTR ", attribute = %d, value = 0x%016" PRIxPTR "", (uintptr_t)dpy, + attribute, (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + + ANGLE_EGL_VALIDATE(thread, QueryDisplayAttribEXT, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, attribute, value); + + return QueryDisplayAttribEXT(thread, dpyPacked, attribute, value); +} + +// EGL_EXT_platform_base +EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, + EGLConfig config, + void *native_pixmap, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreatePlatformPixmapSurfaceEXT, GetDisplayIfValid(dpyPacked), + EGLSurface, dpyPacked, configPacked, native_pixmap, attrib_listPacked); + + return CreatePlatformPixmapSurfaceEXT(thread, dpyPacked, configPacked, native_pixmap, + attrib_listPacked); +} + +EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurfaceEXT(EGLDisplay dpy, + EGLConfig config, + void *native_window, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Config *configPacked = PackParam<Config *>(config); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreatePlatformWindowSurfaceEXT, GetDisplayIfValid(dpyPacked), + EGLSurface, dpyPacked, configPacked, native_window, attrib_listPacked); + + return CreatePlatformWindowSurfaceEXT(thread, dpyPacked, configPacked, native_window, + attrib_listPacked); +} + +EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplayEXT(EGLenum platform, + void *native_display, + const EGLint *attrib_list) +{ + 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); + + Thread *thread = egl::GetCurrentThread(); + + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, GetPlatformDisplayEXT, nullptr, EGLDisplay, platform, native_display, + attrib_listPacked); + + return GetPlatformDisplayEXT(thread, platform, native_display, attrib_listPacked); +} + +// EGL_KHR_debug +EGLint EGLAPIENTRY EGL_DebugMessageControlKHR(EGLDEBUGPROCKHR callback, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DebugMessageControlKHR, + "callback = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", (uintptr_t)callback, + (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, DebugMessageControlKHR, nullptr, EGLint, callback, + attrib_listPacked); + + return DebugMessageControlKHR(thread, callback, attrib_listPacked); +} + +EGLint EGLAPIENTRY EGL_LabelObjectKHR(EGLDisplay display, + EGLenum objectType, + EGLObjectKHR object, + EGLLabelKHR label) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *displayPacked = PackParam<egl::Display *>(display); + ObjectType objectTypePacked = PackParam<ObjectType>(objectType); + + ANGLE_EGL_VALIDATE(thread, LabelObjectKHR, GetDisplayIfValid(displayPacked), EGLint, + displayPacked, objectTypePacked, object, label); + + return LabelObjectKHR(thread, displayPacked, objectTypePacked, object, label); +} + +EGLBoolean EGLAPIENTRY EGL_QueryDebugKHR(EGLint attribute, EGLAttrib *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(QueryDebugKHR, "attribute = %d, value = 0x%016" PRIxPTR "", attribute, + (uintptr_t)value); + + Thread *thread = egl::GetCurrentThread(); + + ANGLE_EGL_VALIDATE(thread, QueryDebugKHR, nullptr, EGLBoolean, attribute, value); + + return QueryDebugKHR(thread, attribute, value); +} + +// EGL_KHR_fence_sync +EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy, + EGLSyncKHR sync, + EGLint flags, + EGLTimeKHR timeout) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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)); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, ClientWaitSyncKHR, GetDisplayIfValid(dpyPacked), EGLint, dpyPacked, + syncPacked, flags, timeout); + + return ClientWaitSyncKHR(thread, dpyPacked, syncPacked, flags, timeout); +} + +EGLSyncKHR EGLAPIENTRY EGL_CreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreateSyncKHR, + "dpy = 0x%016" PRIxPTR ", type = 0x%X, attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)dpy, type, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateSyncKHR, GetDisplayIfValid(dpyPacked), EGLSyncKHR, dpyPacked, + type, attrib_listPacked); + + return CreateSyncKHR(thread, dpyPacked, type, attrib_listPacked); +} + +EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DestroySyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", (uintptr_t)dpy, + (uintptr_t)sync); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, DestroySyncKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + syncPacked); + + return DestroySyncKHR(thread, dpyPacked, syncPacked); +} + +EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy, + EGLSyncKHR sync, + EGLint attribute, + EGLint *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, GetSyncAttribKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, syncPacked, attribute, value); + + return GetSyncAttribKHR(thread, dpyPacked, syncPacked, attribute, value); +} + +// EGL_KHR_image +EGLImageKHR EGLAPIENTRY EGL_CreateImageKHR(EGLDisplay dpy, + EGLContext ctx, + EGLenum target, + EGLClientBuffer buffer, + const EGLint *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + gl::Context *ctxPacked = PackParam<gl::Context *>(ctx); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateImageKHR, GetDisplayIfValid(dpyPacked), EGLImageKHR, dpyPacked, + ctxPacked, target, buffer, attrib_listPacked); + + return CreateImageKHR(thread, dpyPacked, ctxPacked, target, buffer, attrib_listPacked); +} + +EGLBoolean EGLAPIENTRY EGL_DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DestroyImageKHR, "dpy = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR "", (uintptr_t)dpy, + (uintptr_t)image); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Image *imagePacked = PackParam<Image *>(image); + + ANGLE_EGL_VALIDATE(thread, DestroyImageKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + imagePacked); + + return DestroyImageKHR(thread, dpyPacked, imagePacked); +} + +// EGL_KHR_reusable_sync +EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(SignalSyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", mode = 0x%X", + (uintptr_t)dpy, (uintptr_t)sync, mode); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, SignalSyncKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + syncPacked, mode); + + return SignalSyncKHR(thread, dpyPacked, syncPacked, mode); +} + +// 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) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(CreateStreamKHR, "dpy = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)attrib_list); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, CreateStreamKHR, GetDisplayIfValid(dpyPacked), EGLStreamKHR, + dpyPacked, attrib_listPacked); + + return CreateStreamKHR(thread, dpyPacked, attrib_listPacked); +} + +EGLBoolean EGLAPIENTRY EGL_DestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(DestroyStreamKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)stream); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + + ANGLE_EGL_VALIDATE(thread, DestroyStreamKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, streamPacked); + + return DestroyStreamKHR(thread, dpyPacked, streamPacked); +} + +EGLBoolean EGLAPIENTRY EGL_QueryStreamKHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLint *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + + ANGLE_EGL_VALIDATE(thread, QueryStreamKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + streamPacked, attribute, value); + + return QueryStreamKHR(thread, dpyPacked, streamPacked, attribute, value); +} + +EGLBoolean EGLAPIENTRY EGL_QueryStreamu64KHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLuint64KHR *value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + + ANGLE_EGL_VALIDATE(thread, QueryStreamu64KHR, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, streamPacked, attribute, value); + + return QueryStreamu64KHR(thread, dpyPacked, streamPacked, attribute, value); +} + +EGLBoolean EGLAPIENTRY EGL_StreamAttribKHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLint value) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(StreamAttribKHR, + "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR ", attribute = 0x%X, value = %d", + (uintptr_t)dpy, (uintptr_t)stream, attribute, value); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + + ANGLE_EGL_VALIDATE(thread, StreamAttribKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + streamPacked, attribute, value); + + return StreamAttribKHR(thread, dpyPacked, streamPacked, attribute, value); +} + +// EGL_KHR_stream_consumer_gltexture +EGLBoolean EGLAPIENTRY EGL_StreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(StreamConsumerAcquireKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)stream); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + + ANGLE_EGL_VALIDATE(thread, StreamConsumerAcquireKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, streamPacked); + + return StreamConsumerAcquireKHR(thread, dpyPacked, streamPacked); +} + +EGLBoolean EGLAPIENTRY EGL_StreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(StreamConsumerGLTextureExternalKHR, + "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", (uintptr_t)dpy, + (uintptr_t)stream); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + + ANGLE_EGL_VALIDATE(thread, StreamConsumerGLTextureExternalKHR, GetDisplayIfValid(dpyPacked), + EGLBoolean, dpyPacked, streamPacked); + + return StreamConsumerGLTextureExternalKHR(thread, dpyPacked, streamPacked); +} + +EGLBoolean EGLAPIENTRY EGL_StreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(StreamConsumerReleaseKHR, "dpy = 0x%016" PRIxPTR ", stream = 0x%016" PRIxPTR "", + (uintptr_t)dpy, (uintptr_t)stream); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + + ANGLE_EGL_VALIDATE(thread, StreamConsumerReleaseKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, streamPacked); + + return StreamConsumerReleaseKHR(thread, dpyPacked, streamPacked); +} + +// EGL_KHR_swap_buffers_with_damage +EGLBoolean EGLAPIENTRY EGL_SwapBuffersWithDamageKHR(EGLDisplay dpy, + EGLSurface surface, + const EGLint *rects, + EGLint n_rects) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, SwapBuffersWithDamageKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, + dpyPacked, surfacePacked, rects, n_rects); + + return SwapBuffersWithDamageKHR(thread, dpyPacked, surfacePacked, rects, n_rects); +} + +// EGL_KHR_wait_sync +EGLint EGLAPIENTRY EGL_WaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + EGL_EVENT(WaitSyncKHR, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d", + (uintptr_t)dpy, (uintptr_t)sync, flags); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Sync *syncPacked = PackParam<Sync *>(sync); + + ANGLE_EGL_VALIDATE(thread, WaitSyncKHR, GetDisplayIfValid(dpyPacked), EGLint, dpyPacked, + syncPacked, flags); + + return WaitSyncKHR(thread, dpyPacked, syncPacked, flags); +} + +// EGL_NV_post_sub_buffer +EGLBoolean EGLAPIENTRY EGL_PostSubBufferNV(EGLDisplay dpy, + EGLSurface surface, + EGLint x, + EGLint y, + EGLint width, + EGLint height) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Surface *surfacePacked = PackParam<Surface *>(surface); + + ANGLE_EGL_VALIDATE(thread, PostSubBufferNV, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, + surfacePacked, x, y, width, height); + + return PostSubBufferNV(thread, dpyPacked, surfacePacked, x, y, width, height); +} + +// EGL_NV_stream_consumer_gltexture_yuv +EGLBoolean EGLAPIENTRY EGL_StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, + EGLStreamKHR stream, + const EGLAttrib *attrib_list) +{ + ANGLE_SCOPED_GLOBAL_LOCK(); + 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); + + Thread *thread = egl::GetCurrentThread(); + + egl::Display *dpyPacked = PackParam<egl::Display *>(dpy); + Stream *streamPacked = PackParam<Stream *>(stream); + const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list); + + ANGLE_EGL_VALIDATE(thread, StreamConsumerGLTextureExternalAttribsNV, + GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked, streamPacked, + attrib_listPacked); + + return StreamConsumerGLTextureExternalAttribsNV(thread, dpyPacked, streamPacked, + attrib_listPacked); +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_egl_ext_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_ext_autogen.h new file mode 100644 index 0000000000..7eef98aab1 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_egl_ext_autogen.h @@ -0,0 +1,241 @@ +// 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.h: +// Defines the EGL Extension entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_EGL_EXT_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_EGL_EXT_AUTOGEN_H_ + +#include <EGL/egl.h> +#include <EGL/eglext.h> +#include <export.h> + +extern "C" { + +// EGL_ANDROID_blob_cache +ANGLE_EXPORT void EGLAPIENTRY EGL_SetBlobCacheFuncsANDROID(EGLDisplay dpy, + EGLSetBlobFuncANDROID set, + EGLGetBlobFuncANDROID get); + +// EGL_ANDROID_create_native_client_buffer +ANGLE_EXPORT EGLClientBuffer EGLAPIENTRY +EGL_CreateNativeClientBufferANDROID(const EGLint *attrib_list); + +// EGL_ANDROID_get_frame_timestamps +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingSupportedANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint name); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetCompositorTimingANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint numTimestamps, + const EGLint *names, + EGLnsecsANDROID *values); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetNextFrameIdANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR *frameId); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampSupportedANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLint timestamp); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetFrameTimestampsANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR frameId, + EGLint numTimestamps, + const EGLint *timestamps, + EGLnsecsANDROID *values); + +// EGL_ANDROID_get_native_client_buffer +ANGLE_EXPORT EGLClientBuffer EGLAPIENTRY +EGL_GetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer); + +// EGL_ANDROID_native_fence_sync +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_DupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync); + +// EGL_ANDROID_presentation_time +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_PresentationTimeANDROID(EGLDisplay dpy, + EGLSurface surface, + EGLnsecsANDROID time); + +// EGL_ANGLE_device_creation +ANGLE_EXPORT EGLDeviceEXT EGLAPIENTRY EGL_CreateDeviceANGLE(EGLint device_type, + void *native_device, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_ReleaseDeviceANGLE(EGLDeviceEXT device); + +// EGL_ANGLE_feature_control +ANGLE_EXPORT const char *EGLAPIENTRY EGL_QueryStringiANGLE(EGLDisplay dpy, + EGLint name, + EGLint index); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribANGLE(EGLDisplay dpy, + EGLint attribute, + EGLAttrib *value); + +// EGL_ANGLE_power_preference +ANGLE_EXPORT void EGLAPIENTRY EGL_ReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx); +ANGLE_EXPORT void EGLAPIENTRY EGL_ReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx); +ANGLE_EXPORT void EGLAPIENTRY EGL_HandleGPUSwitchANGLE(EGLDisplay dpy); + +// EGL_ANGLE_program_cache_control +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib); +ANGLE_EXPORT void EGLAPIENTRY EGL_ProgramCacheQueryANGLE(EGLDisplay dpy, + EGLint index, + void *key, + EGLint *keysize, + void *binary, + EGLint *binarysize); +ANGLE_EXPORT void EGLAPIENTRY EGL_ProgramCachePopulateANGLE(EGLDisplay dpy, + const void *key, + EGLint keysize, + const void *binary, + EGLint binarysize); +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ProgramCacheResizeANGLE(EGLDisplay dpy, + EGLint limit, + EGLint mode); + +// EGL_ANGLE_query_surface_pointer +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QuerySurfacePointerANGLE(EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + void **value); + +// EGL_ANGLE_stream_producer_d3d_texture +ANGLE_EXPORT EGLBoolean EGLAPIENTRY +EGL_CreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, + EGLStreamKHR stream, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_StreamPostD3DTextureANGLE(EGLDisplay dpy, + EGLStreamKHR stream, + void *texture, + const EGLAttrib *attrib_list); + +// EGL_ANGLE_swap_with_frame_token +ANGLE_EXPORT EGLBoolean EGLAPIENTRY +EGL_SwapBuffersWithFrameTokenANGLE(EGLDisplay dpy, + EGLSurface surface, + EGLFrameTokenANGLE frametoken); + +// EGL_ANGLE_sync_control_rate +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetMscRateANGLE(EGLDisplay dpy, + EGLSurface surface, + EGLint *numerator, + EGLint *denominator); + +// EGL_CHROMIUM_sync_control +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncValuesCHROMIUM(EGLDisplay dpy, + EGLSurface surface, + EGLuint64KHR *ust, + EGLuint64KHR *msc, + EGLuint64KHR *sbc); + +// EGL_EXT_device_query +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QueryDeviceAttribEXT(EGLDeviceEXT device, + EGLint attribute, + EGLAttrib *value); +ANGLE_EXPORT const char *EGLAPIENTRY EGL_QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QueryDisplayAttribEXT(EGLDisplay dpy, + EGLint attribute, + EGLAttrib *value); + +// EGL_EXT_platform_base +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, + EGLConfig config, + void *native_pixmap, + const EGLint *attrib_list); +ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurfaceEXT(EGLDisplay dpy, + EGLConfig config, + void *native_window, + const EGLint *attrib_list); +ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplayEXT(EGLenum platform, + void *native_display, + const EGLint *attrib_list); + +// EGL_KHR_debug +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_DebugMessageControlKHR(EGLDEBUGPROCKHR callback, + const EGLAttrib *attrib_list); +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_LabelObjectKHR(EGLDisplay display, + EGLenum objectType, + EGLObjectKHR object, + EGLLabelKHR label); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QueryDebugKHR(EGLint attribute, EGLAttrib *value); + +// EGL_KHR_fence_sync +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy, + EGLSyncKHR sync, + EGLint flags, + EGLTimeKHR timeout); +ANGLE_EXPORT EGLSyncKHR EGLAPIENTRY EGL_CreateSyncKHR(EGLDisplay dpy, + EGLenum type, + const EGLint *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy, + EGLSyncKHR sync, + EGLint attribute, + EGLint *value); + +// EGL_KHR_image +ANGLE_EXPORT EGLImageKHR EGLAPIENTRY EGL_CreateImageKHR(EGLDisplay dpy, + EGLContext ctx, + EGLenum target, + EGLClientBuffer buffer, + const EGLint *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image); + +// EGL_KHR_reusable_sync +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy, + EGLSyncKHR sync, + EGLenum mode); + +// EGL_KHR_stream +ANGLE_EXPORT EGLStreamKHR EGLAPIENTRY EGL_CreateStreamKHR(EGLDisplay dpy, + const EGLint *attrib_list); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QueryStreamKHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLint *value); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QueryStreamu64KHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLuint64KHR *value); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_StreamAttribKHR(EGLDisplay dpy, + EGLStreamKHR stream, + EGLenum attribute, + EGLint value); + +// EGL_KHR_stream_consumer_gltexture +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_StreamConsumerAcquireKHR(EGLDisplay dpy, + EGLStreamKHR stream); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_StreamConsumerGLTextureExternalKHR(EGLDisplay dpy, + EGLStreamKHR stream); +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_StreamConsumerReleaseKHR(EGLDisplay dpy, + EGLStreamKHR stream); + +// EGL_KHR_swap_buffers_with_damage +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SwapBuffersWithDamageKHR(EGLDisplay dpy, + EGLSurface surface, + const EGLint *rects, + EGLint n_rects); + +// EGL_KHR_wait_sync +ANGLE_EXPORT EGLint EGLAPIENTRY EGL_WaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); + +// EGL_NV_post_sub_buffer +ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_PostSubBufferNV(EGLDisplay dpy, + EGLSurface surface, + EGLint x, + EGLint y, + EGLint width, + EGLint height); + +// EGL_NV_stream_consumer_gltexture_yuv +ANGLE_EXPORT EGLBoolean EGLAPIENTRY +EGL_StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, + EGLStreamKHR stream, + const EGLAttrib *attrib_list); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_EGL_EXT_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_1_0_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_1_0_autogen.cpp new file mode 100644 index 0000000000..ff6681f127 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_1_0_autogen.cpp @@ -0,0 +1,2027 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_1_0_autogen.cpp: +// Defines the GLES 1.0 entry points. + +#include "libGLESv2/entry_points_gles_1_0_autogen.h" + +#include "common/entry_points_enum_autogen.h" +#include "libANGLE/Context.h" +#include "libANGLE/Context.inl.h" +#include "libANGLE/capture/capture_gles_1_0_autogen.h" +#include "libANGLE/capture/gl_enum_utils.h" +#include "libANGLE/entry_points_utils.h" +#include "libANGLE/validationES1.h" +#include "libGLESv2/global_state.h" + +using namespace gl; + +extern "C" { +void GL_APIENTRY GL_AlphaFunc(GLenum func, GLfloat ref) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLAlphaFunc, "context = %d, func = %s, ref = %f", CID(context), + GLenumToString(GLenumGroup::AlphaFunction, func), ref); + + if (context) + { + AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateAlphaFunc(context, funcPacked, ref)); + if (isCallValid) + { + context->alphaFunc(funcPacked, ref); + } + ANGLE_CAPTURE(AlphaFunc, isCallValid, context, funcPacked, ref); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_AlphaFuncx(GLenum func, GLfixed ref) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLAlphaFuncx, "context = %d, func = %s, ref = 0x%X", CID(context), + GLenumToString(GLenumGroup::AlphaFunction, func), ref); + + if (context) + { + AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateAlphaFuncx(context, funcPacked, ref)); + if (isCallValid) + { + context->alphaFuncx(funcPacked, ref); + } + ANGLE_CAPTURE(AlphaFuncx, isCallValid, context, funcPacked, ref); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearColorx, + "context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X", CID(context), red, + green, blue, alpha); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClearColorx(context, red, green, blue, alpha)); + if (isCallValid) + { + context->clearColorx(red, green, blue, alpha); + } + ANGLE_CAPTURE(ClearColorx, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearDepthx(GLfixed depth) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearDepthx, "context = %d, depth = 0x%X", CID(context), depth); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClearDepthx(context, depth)); + if (isCallValid) + { + context->clearDepthx(depth); + } + ANGLE_CAPTURE(ClearDepthx, isCallValid, context, depth); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClientActiveTexture(GLenum texture) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClientActiveTexture, "context = %d, texture = %s", CID(context), + GLenumToString(GLenumGroup::TextureUnit, texture)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClientActiveTexture(context, texture)); + if (isCallValid) + { + context->clientActiveTexture(texture); + } + ANGLE_CAPTURE(ClientActiveTexture, isCallValid, context, texture); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClipPlanef(GLenum p, const GLfloat *eqn) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClipPlanef, "context = %d, p = %s, eqn = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::ClipPlaneName, p), (uintptr_t)eqn); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClipPlanef(context, p, eqn)); + if (isCallValid) + { + context->clipPlanef(p, eqn); + } + ANGLE_CAPTURE(ClipPlanef, isCallValid, context, p, eqn); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClipPlanex(GLenum plane, const GLfixed *equation) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClipPlanex(context, plane, equation)); + if (isCallValid) + { + context->clipPlanex(plane, equation); + } + ANGLE_CAPTURE(ClipPlanex, isCallValid, context, plane, equation); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColor4f, "context = %d, red = %f, green = %f, blue = %f, alpha = %f", + CID(context), red, green, blue, alpha); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColor4f(context, red, green, blue, alpha)); + if (isCallValid) + { + context->color4f(red, green, blue, alpha); + } + ANGLE_CAPTURE(Color4f, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColor4ub, "context = %d, red = %d, green = %d, blue = %d, alpha = %d", + CID(context), red, green, blue, alpha); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColor4ub(context, red, green, blue, alpha)); + if (isCallValid) + { + context->color4ub(red, green, blue, alpha); + } + ANGLE_CAPTURE(Color4ub, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColor4x, "context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X", + CID(context), red, green, blue, alpha); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColor4x(context, red, green, blue, alpha)); + if (isCallValid) + { + context->color4x(red, green, blue, alpha); + } + ANGLE_CAPTURE(Color4x, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColorPointer, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::ColorPointerType, type), stride, + (uintptr_t)pointer); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateColorPointer(context, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->colorPointer(size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(ColorPointer, isCallValid, context, size, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DepthRangex(GLfixed n, GLfixed f) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDepthRangex, "context = %d, n = 0x%X, f = 0x%X", CID(context), n, f); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthRangex(context, n, f)); + if (isCallValid) + { + context->depthRangex(n, f); + } + ANGLE_CAPTURE(DepthRangex, isCallValid, context, n, f); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DisableClientState(GLenum array) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDisableClientState, "context = %d, array = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, array)); + + if (context) + { + ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableClientState(context, arrayPacked)); + if (isCallValid) + { + context->disableClientState(arrayPacked); + } + ANGLE_CAPTURE(DisableClientState, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EnableClientState(GLenum array) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEnableClientState, "context = %d, array = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, array)); + + if (context) + { + ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableClientState(context, arrayPacked)); + if (isCallValid) + { + context->enableClientState(arrayPacked); + } + ANGLE_CAPTURE(EnableClientState, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Fogf(GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFogf, "context = %d, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::FogParameter, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogf(context, pname, param)); + if (isCallValid) + { + context->fogf(pname, param); + } + ANGLE_CAPTURE(Fogf, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Fogfv(GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFogfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::FogParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogfv(context, pname, params)); + if (isCallValid) + { + context->fogfv(pname, params); + } + ANGLE_CAPTURE(Fogfv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Fogx(GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFogx, "context = %d, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::FogPName, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogx(context, pname, param)); + if (isCallValid) + { + context->fogx(pname, param); + } + ANGLE_CAPTURE(Fogx, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Fogxv(GLenum pname, const GLfixed *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFogxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::FogPName, pname), (uintptr_t)param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogxv(context, pname, param)); + if (isCallValid) + { + context->fogxv(pname, param); + } + ANGLE_CAPTURE(Fogxv, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Frustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFrustumf, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f", + CID(context), l, r, b, t, n, f); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFrustumf(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->frustumf(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Frustumf, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Frustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFrustumx, + "context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context), + l, r, b, t, n, f); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFrustumx(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->frustumx(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Frustumx, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetClipPlanef(GLenum plane, GLfloat *equation) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetClipPlanef, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetClipPlanef(context, plane, equation)); + if (isCallValid) + { + context->getClipPlanef(plane, equation); + } + ANGLE_CAPTURE(GetClipPlanef, isCallValid, context, plane, equation); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetClipPlanex(GLenum plane, GLfixed *equation) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetClipPlanex(context, plane, equation)); + if (isCallValid) + { + context->getClipPlanex(plane, equation); + } + ANGLE_CAPTURE(GetClipPlanex, isCallValid, context, plane, equation); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFixedv(GLenum pname, GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFixedv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetFixedv(context, pname, params)); + if (isCallValid) + { + context->getFixedv(pname, params); + } + ANGLE_CAPTURE(GetFixedv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetLightfv(GLenum light, GLenum pname, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context) + { + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetLightfv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->getLightfv(light, pnamePacked, params); + } + ANGLE_CAPTURE(GetLightfv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetLightxv(GLenum light, GLenum pname, GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context) + { + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetLightxv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->getLightxv(light, pnamePacked, params); + } + ANGLE_CAPTURE(GetLightxv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetMaterialfv, + "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params); + + if (context) + { + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetMaterialfv(context, face, pnamePacked, params)); + if (isCallValid) + { + context->getMaterialfv(face, pnamePacked, params); + } + ANGLE_CAPTURE(GetMaterialfv, isCallValid, context, face, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetMaterialxv(GLenum face, GLenum pname, GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetMaterialxv, + "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params); + + if (context) + { + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetMaterialxv(context, face, pnamePacked, params)); + if (isCallValid) + { + context->getMaterialxv(face, pnamePacked, params); + } + ANGLE_CAPTURE(GetMaterialxv, isCallValid, context, face, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexEnvfv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexEnvfv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->getTexEnvfv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(GetTexEnvfv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexEnviv(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexEnviv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexEnviv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->getTexEnviv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(GetTexEnviv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexEnvxv(GLenum target, GLenum pname, GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexEnvxv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexEnvxv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->getTexEnvxv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(GetTexEnvxv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterxv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterxv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterxv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterxv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LightModelf(GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightModelf, "context = %d, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::LightModelParameter, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelf(context, pname, param)); + if (isCallValid) + { + context->lightModelf(pname, param); + } + ANGLE_CAPTURE(LightModelf, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LightModelfv(GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightModelfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelfv(context, pname, params)); + if (isCallValid) + { + context->lightModelfv(pname, params); + } + ANGLE_CAPTURE(LightModelfv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LightModelx(GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightModelx, "context = %d, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::LightModelParameter, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelx(context, pname, param)); + if (isCallValid) + { + context->lightModelx(pname, param); + } + ANGLE_CAPTURE(LightModelx, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LightModelxv(GLenum pname, const GLfixed *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightModelxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelxv(context, pname, param)); + if (isCallValid) + { + context->lightModelxv(pname, param); + } + ANGLE_CAPTURE(LightModelxv, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Lightf(GLenum light, GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightf, "context = %d, light = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), param); + + if (context) + { + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightf(context, light, pnamePacked, param)); + if (isCallValid) + { + context->lightf(light, pnamePacked, param); + } + ANGLE_CAPTURE(Lightf, isCallValid, context, light, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Lightfv(GLenum light, GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context) + { + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightfv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->lightfv(light, pnamePacked, params); + } + ANGLE_CAPTURE(Lightfv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Lightx(GLenum light, GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightx, "context = %d, light = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), param); + + if (context) + { + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightx(context, light, pnamePacked, param)); + if (isCallValid) + { + context->lightx(light, pnamePacked, param); + } + ANGLE_CAPTURE(Lightx, isCallValid, context, light, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Lightxv(GLenum light, GLenum pname, const GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context) + { + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightxv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->lightxv(light, pnamePacked, params); + } + ANGLE_CAPTURE(Lightxv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LineWidthx(GLfixed width) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLineWidthx, "context = %d, width = 0x%X", CID(context), width); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLineWidthx(context, width)); + if (isCallValid) + { + context->lineWidthx(width); + } + ANGLE_CAPTURE(LineWidthx, isCallValid, context, width); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LoadIdentity() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLoadIdentity, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLoadIdentity(context)); + if (isCallValid) + { + context->loadIdentity(); + } + ANGLE_CAPTURE(LoadIdentity, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LoadMatrixf(const GLfloat *m) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLoadMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLoadMatrixf(context, m)); + if (isCallValid) + { + context->loadMatrixf(m); + } + ANGLE_CAPTURE(LoadMatrixf, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LoadMatrixx(const GLfixed *m) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLoadMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLoadMatrixx(context, m)); + if (isCallValid) + { + context->loadMatrixx(m); + } + ANGLE_CAPTURE(LoadMatrixx, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LogicOp(GLenum opcode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLogicOp, "context = %d, opcode = %s", CID(context), + GLenumToString(GLenumGroup::LogicOp, opcode)); + + if (context) + { + LogicalOperation opcodePacked = PackParam<LogicalOperation>(opcode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLogicOp(context, opcodePacked)); + if (isCallValid) + { + context->logicOp(opcodePacked); + } + ANGLE_CAPTURE(LogicOp, isCallValid, context, opcodePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Materialf(GLenum face, GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMaterialf, "context = %d, face = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), param); + + if (context) + { + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialf(context, face, pnamePacked, param)); + if (isCallValid) + { + context->materialf(face, pnamePacked, param); + } + ANGLE_CAPTURE(Materialf, isCallValid, context, face, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Materialfv(GLenum face, GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMaterialfv, "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params); + + if (context) + { + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialfv(context, face, pnamePacked, params)); + if (isCallValid) + { + context->materialfv(face, pnamePacked, params); + } + ANGLE_CAPTURE(Materialfv, isCallValid, context, face, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Materialx(GLenum face, GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMaterialx, "context = %d, face = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), param); + + if (context) + { + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialx(context, face, pnamePacked, param)); + if (isCallValid) + { + context->materialx(face, pnamePacked, param); + } + ANGLE_CAPTURE(Materialx, isCallValid, context, face, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Materialxv(GLenum face, GLenum pname, const GLfixed *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMaterialxv, "context = %d, face = %s, pname = %s, param = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)param); + + if (context) + { + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialxv(context, face, pnamePacked, param)); + if (isCallValid) + { + context->materialxv(face, pnamePacked, param); + } + ANGLE_CAPTURE(Materialxv, isCallValid, context, face, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MatrixMode(GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMatrixMode, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::MatrixMode, mode)); + + if (context) + { + MatrixType modePacked = PackParam<MatrixType>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMatrixMode(context, modePacked)); + if (isCallValid) + { + context->matrixMode(modePacked); + } + ANGLE_CAPTURE(MatrixMode, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultMatrixf(const GLfloat *m) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMultMatrixf(context, m)); + if (isCallValid) + { + context->multMatrixf(m); + } + ANGLE_CAPTURE(MultMatrixf, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultMatrixx(const GLfixed *m) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMultMatrixx(context, m)); + if (isCallValid) + { + context->multMatrixx(m); + } + ANGLE_CAPTURE(MultMatrixx, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiTexCoord4f, "context = %d, target = %s, s = %f, t = %f, r = %f, q = %f", + CID(context), GLenumToString(GLenumGroup::TextureUnit, target), s, t, r, q); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMultiTexCoord4f(context, target, s, t, r, q)); + if (isCallValid) + { + context->multiTexCoord4f(target, s, t, r, q); + } + ANGLE_CAPTURE(MultiTexCoord4f, isCallValid, context, target, s, t, r, q); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiTexCoord4x, + "context = %d, texture = %s, s = 0x%X, t = 0x%X, r = 0x%X, q = 0x%X", CID(context), + GLenumToString(GLenumGroup::TextureUnit, texture), s, t, r, q); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMultiTexCoord4x(context, texture, s, t, r, q)); + if (isCallValid) + { + context->multiTexCoord4x(texture, s, t, r, q); + } + ANGLE_CAPTURE(MultiTexCoord4x, isCallValid, context, texture, s, t, r, q); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLNormal3f, "context = %d, nx = %f, ny = %f, nz = %f", CID(context), nx, ny, nz); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateNormal3f(context, nx, ny, nz)); + if (isCallValid) + { + context->normal3f(nx, ny, nz); + } + ANGLE_CAPTURE(Normal3f, isCallValid, context, nx, ny, nz); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Normal3x(GLfixed nx, GLfixed ny, GLfixed nz) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLNormal3x, "context = %d, nx = 0x%X, ny = 0x%X, nz = 0x%X", CID(context), nx, + ny, nz); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateNormal3x(context, nx, ny, nz)); + if (isCallValid) + { + context->normal3x(nx, ny, nz); + } + ANGLE_CAPTURE(Normal3x, isCallValid, context, nx, ny, nz); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_NormalPointer(GLenum type, GLsizei stride, const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLNormalPointer, + "context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::NormalPointerType, type), stride, (uintptr_t)pointer); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateNormalPointer(context, typePacked, stride, pointer)); + if (isCallValid) + { + context->normalPointer(typePacked, stride, pointer); + } + ANGLE_CAPTURE(NormalPointer, isCallValid, context, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Orthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLOrthof, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f", + CID(context), l, r, b, t, n, f); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateOrthof(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->orthof(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Orthof, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Orthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLOrthox, + "context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context), + l, r, b, t, n, f); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateOrthox(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->orthox(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Orthox, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PointParameterf(GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPointParameterf, "context = %d, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), param); + + if (context) + { + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterf(context, pnamePacked, param)); + if (isCallValid) + { + context->pointParameterf(pnamePacked, param); + } + ANGLE_CAPTURE(PointParameterf, isCallValid, context, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PointParameterfv(GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPointParameterfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterfv(context, pnamePacked, params)); + if (isCallValid) + { + context->pointParameterfv(pnamePacked, params); + } + ANGLE_CAPTURE(PointParameterfv, isCallValid, context, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PointParameterx(GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPointParameterx, "context = %d, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), param); + + if (context) + { + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterx(context, pnamePacked, param)); + if (isCallValid) + { + context->pointParameterx(pnamePacked, param); + } + ANGLE_CAPTURE(PointParameterx, isCallValid, context, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PointParameterxv(GLenum pname, const GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPointParameterxv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterxv(context, pnamePacked, params)); + if (isCallValid) + { + context->pointParameterxv(pnamePacked, params); + } + ANGLE_CAPTURE(PointParameterxv, isCallValid, context, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PointSize(GLfloat size) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPointSize, "context = %d, size = %f", CID(context), size); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePointSize(context, size)); + if (isCallValid) + { + context->pointSize(size); + } + ANGLE_CAPTURE(PointSize, isCallValid, context, size); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PointSizex(GLfixed size) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPointSizex, "context = %d, size = 0x%X", CID(context), size); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePointSizex(context, size)); + if (isCallValid) + { + context->pointSizex(size); + } + ANGLE_CAPTURE(PointSizex, isCallValid, context, size); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PolygonOffsetx(GLfixed factor, GLfixed units) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPolygonOffsetx, "context = %d, factor = 0x%X, units = 0x%X", CID(context), + factor, units); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePolygonOffsetx(context, factor, units)); + if (isCallValid) + { + context->polygonOffsetx(factor, units); + } + ANGLE_CAPTURE(PolygonOffsetx, isCallValid, context, factor, units); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PopMatrix() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPopMatrix, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopMatrix(context)); + if (isCallValid) + { + context->popMatrix(); + } + ANGLE_CAPTURE(PopMatrix, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PushMatrix() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPushMatrix, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePushMatrix(context)); + if (isCallValid) + { + context->pushMatrix(); + } + ANGLE_CAPTURE(PushMatrix, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRotatef, "context = %d, angle = %f, x = %f, y = %f, z = %f", CID(context), + angle, x, y, z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateRotatef(context, angle, x, y, z)); + if (isCallValid) + { + context->rotatef(angle, x, y, z); + } + ANGLE_CAPTURE(Rotatef, isCallValid, context, angle, x, y, z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRotatex, "context = %d, angle = 0x%X, x = 0x%X, y = 0x%X, z = 0x%X", + CID(context), angle, x, y, z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateRotatex(context, angle, x, y, z)); + if (isCallValid) + { + context->rotatex(angle, x, y, z); + } + ANGLE_CAPTURE(Rotatex, isCallValid, context, angle, x, y, z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SampleCoveragex(GLclampx value, GLboolean invert) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSampleCoveragex, "context = %d, value = 0x%X, invert = %s", CID(context), + value, GLbooleanToString(invert)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleCoveragex(context, value, invert)); + if (isCallValid) + { + context->sampleCoveragex(value, invert); + } + ANGLE_CAPTURE(SampleCoveragex, isCallValid, context, value, invert); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Scalef(GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLScalef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateScalef(context, x, y, z)); + if (isCallValid) + { + context->scalef(x, y, z); + } + ANGLE_CAPTURE(Scalef, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Scalex(GLfixed x, GLfixed y, GLfixed z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLScalex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y, z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateScalex(context, x, y, z)); + if (isCallValid) + { + context->scalex(x, y, z); + } + ANGLE_CAPTURE(Scalex, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ShadeModel(GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLShadeModel, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::ShadingModel, mode)); + + if (context) + { + ShadingModel modePacked = PackParam<ShadingModel>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateShadeModel(context, modePacked)); + if (isCallValid) + { + context->shadeModel(modePacked); + } + ANGLE_CAPTURE(ShadeModel, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexCoordPointer, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::TexCoordPointerType, type), stride, + (uintptr_t)pointer); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexCoordPointer(context, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->texCoordPointer(size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(TexCoordPointer, isCallValid, context, size, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexEnvf(GLenum target, GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexEnvf, "context = %d, target = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), param); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvf(context, targetPacked, pnamePacked, param)); + if (isCallValid) + { + context->texEnvf(targetPacked, pnamePacked, param); + } + ANGLE_CAPTURE(TexEnvf, isCallValid, context, targetPacked, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexEnvfv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvfv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->texEnvfv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(TexEnvfv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexEnvi(GLenum target, GLenum pname, GLint param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexEnvi, "context = %d, target = %s, pname = %s, param = %d", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), param); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvi(context, targetPacked, pnamePacked, param)); + if (isCallValid) + { + context->texEnvi(targetPacked, pnamePacked, param); + } + ANGLE_CAPTURE(TexEnvi, isCallValid, context, targetPacked, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexEnviv(GLenum target, GLenum pname, const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexEnviv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnviv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->texEnviv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(TexEnviv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexEnvx(GLenum target, GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexEnvx, "context = %d, target = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), param); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvx(context, targetPacked, pnamePacked, param)); + if (isCallValid) + { + context->texEnvx(targetPacked, pnamePacked, param); + } + ANGLE_CAPTURE(TexEnvx, isCallValid, context, targetPacked, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexEnvxv(GLenum target, GLenum pname, const GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexEnvxv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context) + { + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvxv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->texEnvxv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(TexEnvxv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterx(GLenum target, GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterx, "context = %d, target = %s, pname = %s, param = 0x%X", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), param); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterx(context, targetPacked, pname, param)); + if (isCallValid) + { + context->texParameterx(targetPacked, pname, param); + } + ANGLE_CAPTURE(TexParameterx, isCallValid, context, targetPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterxv(GLenum target, GLenum pname, const GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterxv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterxv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterxv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterxv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Translatef(GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTranslatef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateTranslatef(context, x, y, z)); + if (isCallValid) + { + context->translatef(x, y, z); + } + ANGLE_CAPTURE(Translatef, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Translatex(GLfixed x, GLfixed y, GLfixed z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTranslatex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y, + z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateTranslatex(context, x, y, z)); + if (isCallValid) + { + context->translatex(x, y, z); + } + ANGLE_CAPTURE(Translatex, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexPointer, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::VertexPointerType, type), stride, + (uintptr_t)pointer); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexPointer(context, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->vertexPointer(size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(VertexPointer, isCallValid, context, size, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_1_0_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_1_0_autogen.h new file mode 100644 index 0000000000..211fb5b8db --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_1_0_autogen.h @@ -0,0 +1,123 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_1_0_autogen.h: +// Defines the GLES 1.0 entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_GLES_1_0_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_GLES_1_0_AUTOGEN_H_ + +#include <GLES/gl.h> +#include <export.h> + +extern "C" { +ANGLE_EXPORT void GL_APIENTRY GL_AlphaFunc(GLenum func, GLfloat ref); +ANGLE_EXPORT void GL_APIENTRY GL_AlphaFuncx(GLenum func, GLfixed ref); +ANGLE_EXPORT void GL_APIENTRY GL_ClearColorx(GLfixed red, + GLfixed green, + GLfixed blue, + GLfixed alpha); +ANGLE_EXPORT void GL_APIENTRY GL_ClearDepthx(GLfixed depth); +ANGLE_EXPORT void GL_APIENTRY GL_ClientActiveTexture(GLenum texture); +ANGLE_EXPORT void GL_APIENTRY GL_ClipPlanef(GLenum p, const GLfloat *eqn); +ANGLE_EXPORT void GL_APIENTRY GL_ClipPlanex(GLenum plane, const GLfixed *equation); +ANGLE_EXPORT void GL_APIENTRY GL_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +ANGLE_EXPORT void GL_APIENTRY GL_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +ANGLE_EXPORT void GL_APIENTRY GL_Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +ANGLE_EXPORT void GL_APIENTRY GL_ColorPointer(GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_DepthRangex(GLfixed n, GLfixed f); +ANGLE_EXPORT void GL_APIENTRY GL_DisableClientState(GLenum array); +ANGLE_EXPORT void GL_APIENTRY GL_EnableClientState(GLenum array); +ANGLE_EXPORT void GL_APIENTRY GL_Fogf(GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_Fogfv(GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_Fogx(GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_Fogxv(GLenum pname, const GLfixed *param); +ANGLE_EXPORT void GL_APIENTRY +GL_Frustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +ANGLE_EXPORT void GL_APIENTRY +GL_Frustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +ANGLE_EXPORT void GL_APIENTRY GL_GetClipPlanef(GLenum plane, GLfloat *equation); +ANGLE_EXPORT void GL_APIENTRY GL_GetClipPlanex(GLenum plane, GLfixed *equation); +ANGLE_EXPORT void GL_APIENTRY GL_GetFixedv(GLenum pname, GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetLightfv(GLenum light, GLenum pname, GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetLightxv(GLenum light, GLenum pname, GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetMaterialxv(GLenum face, GLenum pname, GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexEnviv(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexEnvxv(GLenum target, GLenum pname, GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterxv(GLenum target, GLenum pname, GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelf(GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelfv(GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelx(GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelxv(GLenum pname, const GLfixed *param); +ANGLE_EXPORT void GL_APIENTRY GL_Lightf(GLenum light, GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_Lightfv(GLenum light, GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_Lightx(GLenum light, GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_Lightxv(GLenum light, GLenum pname, const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_LineWidthx(GLfixed width); +ANGLE_EXPORT void GL_APIENTRY GL_LoadIdentity(); +ANGLE_EXPORT void GL_APIENTRY GL_LoadMatrixf(const GLfloat *m); +ANGLE_EXPORT void GL_APIENTRY GL_LoadMatrixx(const GLfixed *m); +ANGLE_EXPORT void GL_APIENTRY GL_LogicOp(GLenum opcode); +ANGLE_EXPORT void GL_APIENTRY GL_Materialf(GLenum face, GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_Materialfv(GLenum face, GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_Materialx(GLenum face, GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_Materialxv(GLenum face, GLenum pname, const GLfixed *param); +ANGLE_EXPORT void GL_APIENTRY GL_MatrixMode(GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_MultMatrixf(const GLfloat *m); +ANGLE_EXPORT void GL_APIENTRY GL_MultMatrixx(const GLfixed *m); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +ANGLE_EXPORT void GL_APIENTRY GL_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz); +ANGLE_EXPORT void GL_APIENTRY GL_Normal3x(GLfixed nx, GLfixed ny, GLfixed nz); +ANGLE_EXPORT void GL_APIENTRY GL_NormalPointer(GLenum type, GLsizei stride, const void *pointer); +ANGLE_EXPORT void GL_APIENTRY +GL_Orthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +ANGLE_EXPORT void GL_APIENTRY +GL_Orthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterf(GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterfv(GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterx(GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterxv(GLenum pname, const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_PointSize(GLfloat size); +ANGLE_EXPORT void GL_APIENTRY GL_PointSizex(GLfixed size); +ANGLE_EXPORT void GL_APIENTRY GL_PolygonOffsetx(GLfixed factor, GLfixed units); +ANGLE_EXPORT void GL_APIENTRY GL_PopMatrix(); +ANGLE_EXPORT void GL_APIENTRY GL_PushMatrix(); +ANGLE_EXPORT void GL_APIENTRY GL_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +ANGLE_EXPORT void GL_APIENTRY GL_Rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +ANGLE_EXPORT void GL_APIENTRY GL_SampleCoveragex(GLclampx value, GLboolean invert); +ANGLE_EXPORT void GL_APIENTRY GL_Scalef(GLfloat x, GLfloat y, GLfloat z); +ANGLE_EXPORT void GL_APIENTRY GL_Scalex(GLfixed x, GLfixed y, GLfixed z); +ANGLE_EXPORT void GL_APIENTRY GL_ShadeModel(GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_TexCoordPointer(GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvf(GLenum target, GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvi(GLenum target, GLenum pname, GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnviv(GLenum target, GLenum pname, const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvx(GLenum target, GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvxv(GLenum target, GLenum pname, const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterx(GLenum target, GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterxv(GLenum target, GLenum pname, const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_Translatef(GLfloat x, GLfloat y, GLfloat z); +ANGLE_EXPORT void GL_APIENTRY GL_Translatex(GLfixed x, GLfixed y, GLfixed z); +ANGLE_EXPORT void GL_APIENTRY GL_VertexPointer(GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_GLES_1_0_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_autogen.cpp new file mode 100644 index 0000000000..37115793b4 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_autogen.cpp @@ -0,0 +1,3707 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_2_0_autogen.cpp: +// Defines the GLES 2.0 entry points. + +#include "libGLESv2/entry_points_gles_2_0_autogen.h" + +#include "common/entry_points_enum_autogen.h" +#include "libANGLE/Context.h" +#include "libANGLE/Context.inl.h" +#include "libANGLE/capture/capture_gles_2_0_autogen.h" +#include "libANGLE/capture/gl_enum_utils.h" +#include "libANGLE/entry_points_utils.h" +#include "libANGLE/validationES2.h" +#include "libGLESv2/global_state.h" + +using namespace gl; + +extern "C" { +void GL_APIENTRY GL_ActiveTexture(GLenum texture) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLActiveTexture, "context = %d, texture = %s", CID(context), + GLenumToString(GLenumGroup::TextureUnit, texture)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateActiveTexture(context, texture)); + if (isCallValid) + { + context->activeTexture(texture); + } + ANGLE_CAPTURE(ActiveTexture, isCallValid, context, texture); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_AttachShader(GLuint program, GLuint shader) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLAttachShader, "context = %d, program = %u, shader = %u", CID(context), program, + shader); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateAttachShader(context, programPacked, shaderPacked)); + if (isCallValid) + { + context->attachShader(programPacked, shaderPacked); + } + ANGLE_CAPTURE(AttachShader, isCallValid, context, programPacked, shaderPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindAttribLocation(GLuint program, GLuint index, const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindAttribLocation, + "context = %d, program = %u, index = %u, name = 0x%016" PRIxPTR "", CID(context), program, + index, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindAttribLocation(context, programPacked, index, name)); + if (isCallValid) + { + context->bindAttribLocation(programPacked, index, name); + } + ANGLE_CAPTURE(BindAttribLocation, isCallValid, context, programPacked, index, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindBuffer(GLenum target, GLuint buffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindBuffer, "context = %d, target = %s, buffer = %u", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), buffer); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindBuffer(context, targetPacked, bufferPacked)); + if (isCallValid) + { + context->bindBuffer(targetPacked, bufferPacked); + } + ANGLE_CAPTURE(BindBuffer, isCallValid, context, targetPacked, bufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindFramebuffer(GLenum target, GLuint framebuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindFramebuffer, "context = %d, target = %s, framebuffer = %u", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), framebuffer); + + if (context) + { + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindFramebuffer(context, target, framebufferPacked)); + if (isCallValid) + { + context->bindFramebuffer(target, framebufferPacked); + } + ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindRenderbuffer(GLenum target, GLuint renderbuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindRenderbuffer, "context = %d, target = %s, renderbuffer = %u", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), renderbuffer); + + if (context) + { + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindRenderbuffer(context, target, renderbufferPacked)); + if (isCallValid) + { + context->bindRenderbuffer(target, renderbufferPacked); + } + ANGLE_CAPTURE(BindRenderbuffer, isCallValid, context, target, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindTexture(GLenum target, GLuint texture) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindTexture, "context = %d, target = %s, texture = %u", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), texture); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindTexture(context, targetPacked, texturePacked)); + if (isCallValid) + { + context->bindTexture(targetPacked, texturePacked); + } + ANGLE_CAPTURE(BindTexture, isCallValid, context, targetPacked, texturePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendColor, "context = %d, red = %f, green = %f, blue = %f, alpha = %f", + CID(context), red, green, blue, alpha); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendColor(context, red, green, blue, alpha)); + if (isCallValid) + { + context->blendColor(red, green, blue, alpha); + } + ANGLE_CAPTURE(BlendColor, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendEquation(GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquation, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateBlendEquation(context, mode)); + if (isCallValid) + { + context->blendEquation(mode); + } + ANGLE_CAPTURE(BlendEquation, isCallValid, context, mode); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquationSeparate, "context = %d, modeRGB = %s, modeAlpha = %s", + CID(context), GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparate(context, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparate(modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparate, isCallValid, context, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendFunc(GLenum sfactor, GLenum dfactor) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFunc, "context = %d, sfactor = %s, dfactor = %s", CID(context), + GLenumToString(GLenumGroup::BlendingFactor, sfactor), + GLenumToString(GLenumGroup::BlendingFactor, dfactor)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunc(context, sfactor, dfactor)); + if (isCallValid) + { + context->blendFunc(sfactor, dfactor); + } + ANGLE_CAPTURE(BlendFunc, isCallValid, context, sfactor, dfactor); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendFuncSeparate(GLenum sfactorRGB, + GLenum dfactorRGB, + GLenum sfactorAlpha, + GLenum dfactorAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFuncSeparate, + "context = %d, sfactorRGB = %s, dfactorRGB = %s, sfactorAlpha = %s, dfactorAlpha = %s", + CID(context), GLenumToString(GLenumGroup::BlendingFactor, sfactorRGB), + GLenumToString(GLenumGroup::BlendingFactor, dfactorRGB), + GLenumToString(GLenumGroup::BlendingFactor, sfactorAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dfactorAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFuncSeparate(context, sfactorRGB, dfactorRGB, + sfactorAlpha, dfactorAlpha)); + if (isCallValid) + { + context->blendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparate, isCallValid, context, sfactorRGB, dfactorRGB, sfactorAlpha, + dfactorAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBufferData, + "context = %d, target = %s, size = %llu, data = 0x%016" PRIxPTR ", usage = %s", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(size), (uintptr_t)data, + GLenumToString(GLenumGroup::BufferUsageARB, usage)); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferUsage usagePacked = PackParam<BufferUsage>(usage); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferData(context, targetPacked, size, data, usagePacked)); + if (isCallValid) + { + context->bufferData(targetPacked, size, data, usagePacked); + } + ANGLE_CAPTURE(BufferData, isCallValid, context, targetPacked, size, data, usagePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBufferSubData, + "context = %d, target = %s, offset = %llu, size = %llu, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size), + (uintptr_t)data); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferSubData(context, targetPacked, offset, size, data)); + if (isCallValid) + { + context->bufferSubData(targetPacked, offset, size, data); + } + ANGLE_CAPTURE(BufferSubData, isCallValid, context, targetPacked, offset, size, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLenum GL_APIENTRY GL_CheckFramebufferStatus(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCheckFramebufferStatus, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target)); + + GLenum returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCheckFramebufferStatus(context, target)); + if (isCallValid) + { + returnValue = context->checkFramebufferStatus(target); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatus, GLenum>(); + } + ANGLE_CAPTURE(CheckFramebufferStatus, isCallValid, context, target, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatus, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_Clear(GLbitfield mask) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClear, "context = %d, mask = %s", CID(context), + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str()); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClear(context, mask)); + if (isCallValid) + { + context->clear(mask); + } + ANGLE_CAPTURE(Clear, isCallValid, context, mask); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearColor, "context = %d, red = %f, green = %f, blue = %f, alpha = %f", + CID(context), red, green, blue, alpha); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClearColor(context, red, green, blue, alpha)); + if (isCallValid) + { + context->clearColor(red, green, blue, alpha); + } + ANGLE_CAPTURE(ClearColor, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearDepthf(GLfloat d) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearDepthf, "context = %d, d = %f", CID(context), d); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClearDepthf(context, d)); + if (isCallValid) + { + context->clearDepthf(d); + } + ANGLE_CAPTURE(ClearDepthf, isCallValid, context, d); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearStencil(GLint s) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearStencil, "context = %d, s = %d", CID(context), s); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClearStencil(context, s)); + if (isCallValid) + { + context->clearStencil(s); + } + ANGLE_CAPTURE(ClearStencil, isCallValid, context, s); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColorMask, "context = %d, red = %s, green = %s, blue = %s, alpha = %s", + CID(context), GLbooleanToString(red), GLbooleanToString(green), GLbooleanToString(blue), + GLbooleanToString(alpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMask(context, red, green, blue, alpha)); + if (isCallValid) + { + context->colorMask(red, green, blue, alpha); + } + ANGLE_CAPTURE(ColorMask, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompileShader(GLuint shader) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompileShader, "context = %d, shader = %u", CID(context), shader); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompileShader(context, shaderPacked)); + if (isCallValid) + { + context->compileShader(shaderPacked); + } + ANGLE_CAPTURE(CompileShader, isCallValid, context, shaderPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexImage2D, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "border = %d, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, border, + imageSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexImage2D(context, targetPacked, level, internalformat, width, + height, border, imageSize, data)); + if (isCallValid) + { + context->compressedTexImage2D(targetPacked, level, internalformat, width, height, + border, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexImage2D, isCallValid, context, targetPacked, level, + internalformat, width, height, border, imageSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexSubImage2D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::PixelFormat, format), imageSize, + (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexSubImage2D(context, targetPacked, level, xoffset, yoffset, width, + height, format, imageSize, data)); + if (isCallValid) + { + context->compressedTexSubImage2D(targetPacked, level, xoffset, yoffset, width, height, + format, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage2D, isCallValid, context, targetPacked, level, xoffset, + yoffset, width, height, format, imageSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyTexImage2D, + "context = %d, target = %s, level = %d, internalformat = %s, x = %d, y = %d, width = %d, " + "height = %d, border = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), x, y, width, height, border); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexImage2D(context, targetPacked, level, internalformat, x, + y, width, height, border)); + if (isCallValid) + { + context->copyTexImage2D(targetPacked, level, internalformat, x, y, width, height, + border); + } + ANGLE_CAPTURE(CopyTexImage2D, isCallValid, context, targetPacked, level, internalformat, x, + y, width, height, border); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyTexSubImage2D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, x = %d, y = %d, " + "width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + x, y, width, height); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexSubImage2D(context, targetPacked, level, xoffset, + yoffset, x, y, width, height)); + if (isCallValid) + { + context->copyTexSubImage2D(targetPacked, level, xoffset, yoffset, x, y, width, height); + } + ANGLE_CAPTURE(CopyTexSubImage2D, isCallValid, context, targetPacked, level, xoffset, + yoffset, x, y, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLuint GL_APIENTRY GL_CreateProgram() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCreateProgram, "context = %d", CID(context)); + + GLuint returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateCreateProgram(context)); + if (isCallValid) + { + returnValue = context->createProgram(); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateProgram, GLuint>(); + } + ANGLE_CAPTURE(CreateProgram, isCallValid, context, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateProgram, GLuint>(); + } + return returnValue; +} + +GLuint GL_APIENTRY GL_CreateShader(GLenum type) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCreateShader, "context = %d, type = %s", CID(context), + GLenumToString(GLenumGroup::ShaderType, type)); + + GLuint returnValue; + if (context) + { + ShaderType typePacked = PackParam<ShaderType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateCreateShader(context, typePacked)); + if (isCallValid) + { + returnValue = context->createShader(typePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShader, GLuint>(); + } + ANGLE_CAPTURE(CreateShader, isCallValid, context, typePacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShader, GLuint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_CullFace(GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCullFace, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::CullFaceMode, mode)); + + if (context) + { + CullFaceMode modePacked = PackParam<CullFaceMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateCullFace(context, modePacked)); + if (isCallValid) + { + context->cullFace(modePacked); + } + ANGLE_CAPTURE(CullFace, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteBuffers(GLsizei n, const GLuint *buffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteBuffers, "context = %d, n = %d, buffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)buffers); + + if (context) + { + const BufferID *buffersPacked = PackParam<const BufferID *>(buffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteBuffers(context, n, buffersPacked)); + if (isCallValid) + { + context->deleteBuffers(n, buffersPacked); + } + ANGLE_CAPTURE(DeleteBuffers, isCallValid, context, n, buffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteFramebuffers, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)framebuffers); + + if (context) + { + const FramebufferID *framebuffersPacked = PackParam<const FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteFramebuffers(context, n, framebuffersPacked)); + if (isCallValid) + { + context->deleteFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteProgram(GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteProgram, "context = %d, program = %u", CID(context), program); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteProgram(context, programPacked)); + if (isCallValid) + { + context->deleteProgram(programPacked); + } + ANGLE_CAPTURE(DeleteProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteRenderbuffers, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)renderbuffers); + + if (context) + { + const RenderbufferID *renderbuffersPacked = + PackParam<const RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteRenderbuffers(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->deleteRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(DeleteRenderbuffers, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteShader(GLuint shader) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteShader, "context = %d, shader = %u", CID(context), shader); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteShader(context, shaderPacked)); + if (isCallValid) + { + context->deleteShader(shaderPacked); + } + ANGLE_CAPTURE(DeleteShader, isCallValid, context, shaderPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteTextures(GLsizei n, const GLuint *textures) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteTextures, "context = %d, n = %d, textures = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)textures); + + if (context) + { + const TextureID *texturesPacked = PackParam<const TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteTextures(context, n, texturesPacked)); + if (isCallValid) + { + context->deleteTextures(n, texturesPacked); + } + ANGLE_CAPTURE(DeleteTextures, isCallValid, context, n, texturesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DepthFunc(GLenum func) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDepthFunc, "context = %d, func = %s", CID(context), + GLenumToString(GLenumGroup::DepthFunction, func)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthFunc(context, func)); + if (isCallValid) + { + context->depthFunc(func); + } + ANGLE_CAPTURE(DepthFunc, isCallValid, context, func); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DepthMask(GLboolean flag) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDepthMask, "context = %d, flag = %s", CID(context), GLbooleanToString(flag)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthMask(context, flag)); + if (isCallValid) + { + context->depthMask(flag); + } + ANGLE_CAPTURE(DepthMask, isCallValid, context, flag); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DepthRangef(GLfloat n, GLfloat f) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDepthRangef, "context = %d, n = %f, f = %f", CID(context), n, f); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthRangef(context, n, f)); + if (isCallValid) + { + context->depthRangef(n, f); + } + ANGLE_CAPTURE(DepthRangef, isCallValid, context, n, f); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DetachShader(GLuint program, GLuint shader) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDetachShader, "context = %d, program = %u, shader = %u", CID(context), program, + shader); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDetachShader(context, programPacked, shaderPacked)); + if (isCallValid) + { + context->detachShader(programPacked, shaderPacked); + } + ANGLE_CAPTURE(DetachShader, isCallValid, context, programPacked, shaderPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Disable(GLenum cap) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDisable, "context = %d, cap = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, cap)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDisable(context, cap)); + if (isCallValid) + { + context->disable(cap); + } + ANGLE_CAPTURE(Disable, isCallValid, context, cap); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DisableVertexAttribArray(GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDisableVertexAttribArray, "context = %d, index = %u", CID(context), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableVertexAttribArray(context, index)); + if (isCallValid) + { + context->disableVertexAttribArray(index); + } + ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawArrays(GLenum mode, GLint first, GLsizei count) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawArrays, "context = %d, mode = %s, first = %d, count = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), first, count); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawArrays(context, modePacked, first, count)); + if (isCallValid) + { + context->drawArrays(modePacked, first, count); + } + ANGLE_CAPTURE(DrawArrays, isCallValid, context, modePacked, first, count); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElements, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElements(context, modePacked, count, typePacked, indices)); + if (isCallValid) + { + context->drawElements(modePacked, count, typePacked, indices); + } + ANGLE_CAPTURE(DrawElements, isCallValid, context, modePacked, count, typePacked, indices); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Enable(GLenum cap) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEnable, "context = %d, cap = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, cap)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEnable(context, cap)); + if (isCallValid) + { + context->enable(cap); + } + ANGLE_CAPTURE(Enable, isCallValid, context, cap); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EnableVertexAttribArray(GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEnableVertexAttribArray, "context = %d, index = %u", CID(context), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableVertexAttribArray(context, index)); + if (isCallValid) + { + context->enableVertexAttribArray(index); + } + ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Finish() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFinish, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFinish(context)); + if (isCallValid) + { + context->finish(); + } + ANGLE_CAPTURE(Finish, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Flush() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFlush, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFlush(context)); + if (isCallValid) + { + context->flush(); + } + ANGLE_CAPTURE(Flush, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferRenderbuffer, + "context = %d, target = %s, attachment = %s, renderbuffertarget = %s, renderbuffer = %u", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::RenderbufferTarget, renderbuffertarget), renderbuffer); + + if (context) + { + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferRenderbuffer(context, target, attachment, renderbuffertarget, + renderbufferPacked)); + if (isCallValid) + { + context->framebufferRenderbuffer(target, attachment, renderbuffertarget, + renderbufferPacked); + } + ANGLE_CAPTURE(FramebufferRenderbuffer, isCallValid, context, target, attachment, + renderbuffertarget, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTexture2D, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level); + + if (context) + { + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferTexture2D(context, target, attachment, + textargetPacked, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture2D(target, attachment, textargetPacked, texturePacked, + level); + } + ANGLE_CAPTURE(FramebufferTexture2D, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FrontFace(GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFrontFace, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::FrontFaceDirection, mode)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFrontFace(context, mode)); + if (isCallValid) + { + context->frontFace(mode); + } + ANGLE_CAPTURE(FrontFace, isCallValid, context, mode); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenBuffers(GLsizei n, GLuint *buffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenBuffers, "context = %d, n = %d, buffers = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)buffers); + + if (context) + { + BufferID *buffersPacked = PackParam<BufferID *>(buffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenBuffers(context, n, buffersPacked)); + if (isCallValid) + { + context->genBuffers(n, buffersPacked); + } + ANGLE_CAPTURE(GenBuffers, isCallValid, context, n, buffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenFramebuffers(GLsizei n, GLuint *framebuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenFramebuffers, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)framebuffers); + + if (context) + { + FramebufferID *framebuffersPacked = PackParam<FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffersPacked)); + if (isCallValid) + { + context->genFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenRenderbuffers(GLsizei n, GLuint *renderbuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenRenderbuffers, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)renderbuffers); + + if (context) + { + RenderbufferID *renderbuffersPacked = PackParam<RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenRenderbuffers(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->genRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(GenRenderbuffers, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenTextures(GLsizei n, GLuint *textures) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenTextures, "context = %d, n = %d, textures = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)textures); + + if (context) + { + TextureID *texturesPacked = PackParam<TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenTextures(context, n, texturesPacked)); + if (isCallValid) + { + context->genTextures(n, texturesPacked); + } + ANGLE_CAPTURE(GenTextures, isCallValid, context, n, texturesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenerateMipmap(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenerateMipmap, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenerateMipmap(context, targetPacked)); + if (isCallValid) + { + context->generateMipmap(targetPacked); + } + ANGLE_CAPTURE(GenerateMipmap, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetActiveAttrib, + "context = %d, program = %u, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", size = 0x%016" PRIxPTR ", type = 0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, index, bufSize, (uintptr_t)length, (uintptr_t)size, + (uintptr_t)type, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveAttrib(context, programPacked, index, bufSize, length, + size, type, name)); + if (isCallValid) + { + context->getActiveAttrib(programPacked, index, bufSize, length, size, type, name); + } + ANGLE_CAPTURE(GetActiveAttrib, isCallValid, context, programPacked, index, bufSize, length, + size, type, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetActiveUniform, + "context = %d, program = %u, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", size = 0x%016" PRIxPTR ", type = 0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, index, bufSize, (uintptr_t)length, (uintptr_t)size, + (uintptr_t)type, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveUniform(context, programPacked, index, bufSize, length, + size, type, name)); + if (isCallValid) + { + context->getActiveUniform(programPacked, index, bufSize, length, size, type, name); + } + ANGLE_CAPTURE(GetActiveUniform, isCallValid, context, programPacked, index, bufSize, length, + size, type, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetAttachedShaders(GLuint program, + GLsizei maxCount, + GLsizei *count, + GLuint *shaders) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetAttachedShaders, + "context = %d, program = %u, maxCount = %d, count = 0x%016" PRIxPTR + ", shaders = 0x%016" PRIxPTR "", + CID(context), program, maxCount, (uintptr_t)count, (uintptr_t)shaders); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + ShaderProgramID *shadersPacked = PackParam<ShaderProgramID *>(shaders); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetAttachedShaders(context, programPacked, maxCount, count, shadersPacked)); + if (isCallValid) + { + context->getAttachedShaders(programPacked, maxCount, count, shadersPacked); + } + ANGLE_CAPTURE(GetAttachedShaders, isCallValid, context, programPacked, maxCount, count, + shadersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLint GL_APIENTRY GL_GetAttribLocation(GLuint program, const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetAttribLocation, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetAttribLocation(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getAttribLocation(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetAttribLocation, GLint>(); + } + ANGLE_CAPTURE(GetAttribLocation, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetAttribLocation, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetBooleanv(GLenum pname, GLboolean *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBooleanv, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetBooleanv(context, pname, data)); + if (isCallValid) + { + context->getBooleanv(pname, data); + } + ANGLE_CAPTURE(GetBooleanv, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBufferParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameteriv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferParameteriv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferParameteriv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLenum GL_APIENTRY GL_GetError() +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetError, "context = %d", CID(context)); + + GLenum returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetError(context)); + if (isCallValid) + { + returnValue = context->getError(); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetError, GLenum>(); + } + ANGLE_CAPTURE(GetError, isCallValid, context, returnValue); + } + else + { + + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetError, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetFloatv(GLenum pname, GLfloat *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFloatv, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetFloatv(context, pname, data)); + if (isCallValid) + { + context->getFloatv(pname, data); + } + ANGLE_CAPTURE(GetFloatv, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFramebufferAttachmentParameteriv, + "context = %d, target = %s, attachment = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname), + (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetFramebufferAttachmentParameteriv( + context, target, attachment, pname, params)); + if (isCallValid) + { + context->getFramebufferAttachmentParameteriv(target, attachment, pname, params); + } + ANGLE_CAPTURE(GetFramebufferAttachmentParameteriv, isCallValid, context, target, attachment, + pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetIntegerv(GLenum pname, GLint *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetIntegerv, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetIntegerv(context, pname, data)); + if (isCallValid) + { + context->getIntegerv(pname, data); + } + ANGLE_CAPTURE(GetIntegerv, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramInfoLog(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramInfoLog, + "context = %d, program = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), program, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramInfoLog(context, programPacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getProgramInfoLog(programPacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetProgramInfoLog, isCallValid, context, programPacked, bufSize, length, + infoLog); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramiv(GLuint program, GLenum pname, GLint *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetProgramiv, + "context = %d, program = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + program, GLenumToString(GLenumGroup::ProgramPropertyARB, pname), (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramiv(context, programPacked, pname, params)); + if (isCallValid) + { + context->getProgramiv(programPacked, pname, params); + } + ANGLE_CAPTURE(GetProgramiv, isCallValid, context, programPacked, pname, params); + } + else + {} +} + +void GL_APIENTRY GL_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetRenderbufferParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::RenderbufferParameterName, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetRenderbufferParameteriv(context, target, pname, params)); + if (isCallValid) + { + context->getRenderbufferParameteriv(target, pname, params); + } + ANGLE_CAPTURE(GetRenderbufferParameteriv, isCallValid, context, target, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetShaderInfoLog(GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetShaderInfoLog, + "context = %d, shader = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), shader, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetShaderInfoLog(context, shaderPacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getShaderInfoLog(shaderPacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetShaderInfoLog, isCallValid, context, shaderPacked, bufSize, length, + infoLog); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint *range, + GLint *precision) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetShaderPrecisionFormat, + "context = %d, shadertype = %s, precisiontype = %s, range = 0x%016" PRIxPTR + ", precision = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ShaderType, shadertype), + GLenumToString(GLenumGroup::PrecisionType, precisiontype), (uintptr_t)range, + (uintptr_t)precision); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetShaderPrecisionFormat(context, shadertype, precisiontype, + range, precision)); + if (isCallValid) + { + context->getShaderPrecisionFormat(shadertype, precisiontype, range, precision); + } + ANGLE_CAPTURE(GetShaderPrecisionFormat, isCallValid, context, shadertype, precisiontype, + range, precision); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetShaderSource, + "context = %d, shader = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", source = 0x%016" PRIxPTR "", + CID(context), shader, bufSize, (uintptr_t)length, (uintptr_t)source); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetShaderSource(context, shaderPacked, bufSize, length, source)); + if (isCallValid) + { + context->getShaderSource(shaderPacked, bufSize, length, source); + } + ANGLE_CAPTURE(GetShaderSource, isCallValid, context, shaderPacked, bufSize, length, source); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetShaderiv(GLuint shader, GLenum pname, GLint *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetShaderiv, + "context = %d, shader = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), shader, + GLenumToString(GLenumGroup::ShaderParameterName, pname), (uintptr_t)params); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetShaderiv(context, shaderPacked, pname, params)); + if (isCallValid) + { + context->getShaderiv(shaderPacked, pname, params); + } + ANGLE_CAPTURE(GetShaderiv, isCallValid, context, shaderPacked, pname, params); + } + else + {} +} + +const GLubyte *GL_APIENTRY GL_GetString(GLenum name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetString, "context = %d, name = %s", CID(context), + GLenumToString(GLenumGroup::StringName, name)); + + const GLubyte *returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetString(context, name)); + if (isCallValid) + { + returnValue = context->getString(name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetString, const GLubyte *>(); + } + ANGLE_CAPTURE(GetString, isCallValid, context, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetString, const GLubyte *>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterfv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterfv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterfv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterfv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameteriv(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameteriv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameteriv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameteriv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLint GL_APIENTRY GL_GetUniformLocation(GLuint program, const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformLocation, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetUniformLocation(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getUniformLocation(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetUniformLocation, GLint>(); + } + ANGLE_CAPTURE(GetUniformLocation, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetUniformLocation, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetUniformfv(GLuint program, GLint location, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformfv, + "context = %d, program = %u, location = %d, params = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformfv(context, programPacked, locationPacked, params)); + if (isCallValid) + { + context->getUniformfv(programPacked, locationPacked, params); + } + ANGLE_CAPTURE(GetUniformfv, isCallValid, context, programPacked, locationPacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetUniformiv(GLuint program, GLint location, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformiv, + "context = %d, program = %u, location = %d, params = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformiv(context, programPacked, locationPacked, params)); + if (isCallValid) + { + context->getUniformiv(programPacked, locationPacked, params); + } + ANGLE_CAPTURE(GetUniformiv, isCallValid, context, programPacked, locationPacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribPointerv, + "context = %d, index = %u, pname = %s, pointer = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)pointer); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetVertexAttribPointerv(context, index, pname, pointer)); + if (isCallValid) + { + context->getVertexAttribPointerv(index, pname, pointer); + } + ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, index, pname, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribfv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribfv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribfv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribiv(GLuint index, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribiv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribiv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribiv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Hint(GLenum target, GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLHint, "context = %d, target = %s, mode = %s", CID(context), + GLenumToString(GLenumGroup::HintTarget, target), + GLenumToString(GLenumGroup::HintMode, mode)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateHint(context, target, mode)); + if (isCallValid) + { + context->hint(target, mode); + } + ANGLE_CAPTURE(Hint, isCallValid, context, target, mode); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsBuffer(GLuint buffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsBuffer, "context = %d, buffer = %u", CID(context), buffer); + + GLboolean returnValue; + if (context) + { + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsBuffer(context, bufferPacked)); + if (isCallValid) + { + returnValue = context->isBuffer(bufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsBuffer, GLboolean>(); + } + ANGLE_CAPTURE(IsBuffer, isCallValid, context, bufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsBuffer, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsEnabled(GLenum cap) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsEnabled, "context = %d, cap = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, cap)); + + GLboolean returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsEnabled(context, cap)); + if (isCallValid) + { + returnValue = context->isEnabled(cap); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabled, GLboolean>(); + } + ANGLE_CAPTURE(IsEnabled, isCallValid, context, cap, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabled, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsFramebuffer(GLuint framebuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsFramebuffer, "context = %d, framebuffer = %u", CID(context), framebuffer); + + GLboolean returnValue; + if (context) + { + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsFramebuffer(context, framebufferPacked)); + if (isCallValid) + { + returnValue = context->isFramebuffer(framebufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebuffer, GLboolean>(); + } + ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebuffer, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsProgram(GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsProgram, "context = %d, program = %u", CID(context), program); + + GLboolean returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsProgram(context, programPacked)); + if (isCallValid) + { + returnValue = context->isProgram(programPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgram, GLboolean>(); + } + ANGLE_CAPTURE(IsProgram, isCallValid, context, programPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgram, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsRenderbuffer(GLuint renderbuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsRenderbuffer, "context = %d, renderbuffer = %u", CID(context), renderbuffer); + + GLboolean returnValue; + if (context) + { + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsRenderbuffer(context, renderbufferPacked)); + if (isCallValid) + { + returnValue = context->isRenderbuffer(renderbufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbuffer, GLboolean>(); + } + ANGLE_CAPTURE(IsRenderbuffer, isCallValid, context, renderbufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbuffer, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsShader(GLuint shader) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsShader, "context = %d, shader = %u", CID(context), shader); + + GLboolean returnValue; + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsShader(context, shaderPacked)); + if (isCallValid) + { + returnValue = context->isShader(shaderPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsShader, GLboolean>(); + } + ANGLE_CAPTURE(IsShader, isCallValid, context, shaderPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsShader, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsTexture(GLuint texture) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsTexture, "context = %d, texture = %u", CID(context), texture); + + GLboolean returnValue; + if (context) + { + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsTexture(context, texturePacked)); + if (isCallValid) + { + returnValue = context->isTexture(texturePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsTexture, GLboolean>(); + } + ANGLE_CAPTURE(IsTexture, isCallValid, context, texturePacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsTexture, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_LineWidth(GLfloat width) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLineWidth, "context = %d, width = %f", CID(context), width); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLineWidth(context, width)); + if (isCallValid) + { + context->lineWidth(width); + } + ANGLE_CAPTURE(LineWidth, isCallValid, context, width); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LinkProgram(GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLinkProgram, "context = %d, program = %u", CID(context), program); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLinkProgram(context, programPacked)); + if (isCallValid) + { + context->linkProgram(programPacked); + } + ANGLE_CAPTURE(LinkProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PixelStorei(GLenum pname, GLint param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPixelStorei, "context = %d, pname = %s, param = %d", CID(context), + GLenumToString(GLenumGroup::PixelStoreParameter, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePixelStorei(context, pname, param)); + if (isCallValid) + { + context->pixelStorei(pname, param); + } + ANGLE_CAPTURE(PixelStorei, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PolygonOffset(GLfloat factor, GLfloat units) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPolygonOffset, "context = %d, factor = %f, units = %f", CID(context), factor, + units); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePolygonOffset(context, factor, units)); + if (isCallValid) + { + context->polygonOffset(factor, units); + } + ANGLE_CAPTURE(PolygonOffset, isCallValid, context, factor, units); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLReadPixels, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, pixels = " + "0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateReadPixels(context, x, y, width, height, format, type, pixels)); + if (isCallValid) + { + context->readPixels(x, y, width, height, format, type, pixels); + } + ANGLE_CAPTURE(ReadPixels, isCallValid, context, x, y, width, height, format, type, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ReleaseShaderCompiler() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLReleaseShaderCompiler, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateReleaseShaderCompiler(context)); + if (isCallValid) + { + context->releaseShaderCompiler(); + } + ANGLE_CAPTURE(ReleaseShaderCompiler, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRenderbufferStorage, + "context = %d, target = %s, internalformat = %s, width = %d, height = %d", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateRenderbufferStorage(context, target, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorage(target, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorage, isCallValid, context, target, internalformat, width, + height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SampleCoverage(GLfloat value, GLboolean invert) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSampleCoverage, "context = %d, value = %f, invert = %s", CID(context), value, + GLbooleanToString(invert)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleCoverage(context, value, invert)); + if (isCallValid) + { + context->sampleCoverage(value, invert); + } + ANGLE_CAPTURE(SampleCoverage, isCallValid, context, value, invert); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Scissor(GLint x, GLint y, GLsizei width, GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLScissor, "context = %d, x = %d, y = %d, width = %d, height = %d", CID(context), + x, y, width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateScissor(context, x, y, width, height)); + if (isCallValid) + { + context->scissor(x, y, width, height); + } + ANGLE_CAPTURE(Scissor, isCallValid, context, x, y, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ShaderBinary(GLsizei count, + const GLuint *shaders, + GLenum binaryformat, + const void *binary, + GLsizei length) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLShaderBinary, + "context = %d, count = %d, shaders = 0x%016" PRIxPTR + ", binaryformat = %s, binary = 0x%016" PRIxPTR ", length = %d", + CID(context), count, (uintptr_t)shaders, + GLenumToString(GLenumGroup::DefaultGroup, binaryformat), (uintptr_t)binary, length); + + if (context) + { + const ShaderProgramID *shadersPacked = PackParam<const ShaderProgramID *>(shaders); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateShaderBinary(context, count, shadersPacked, binaryformat, binary, length)); + if (isCallValid) + { + context->shaderBinary(count, shadersPacked, binaryformat, binary, length); + } + ANGLE_CAPTURE(ShaderBinary, isCallValid, context, count, shadersPacked, binaryformat, + binary, length); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ShaderSource(GLuint shader, + GLsizei count, + const GLchar *const *string, + const GLint *length) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLShaderSource, + "context = %d, shader = %u, count = %d, string = 0x%016" PRIxPTR + ", length = 0x%016" PRIxPTR "", + CID(context), shader, count, (uintptr_t)string, (uintptr_t)length); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateShaderSource(context, shaderPacked, count, string, length)); + if (isCallValid) + { + context->shaderSource(shaderPacked, count, string, length); + } + ANGLE_CAPTURE(ShaderSource, isCallValid, context, shaderPacked, count, string, length); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_StencilFunc(GLenum func, GLint ref, GLuint mask) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLStencilFunc, "context = %d, func = %s, ref = %d, mask = %u", CID(context), + GLenumToString(GLenumGroup::StencilFunction, func), ref, mask); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateStencilFunc(context, func, ref, mask)); + if (isCallValid) + { + context->stencilFunc(func, ref, mask); + } + ANGLE_CAPTURE(StencilFunc, isCallValid, context, func, ref, mask); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLStencilFuncSeparate, "context = %d, face = %s, func = %s, ref = %d, mask = %u", + CID(context), GLenumToString(GLenumGroup::StencilFaceDirection, face), + GLenumToString(GLenumGroup::StencilFunction, func), ref, mask); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateStencilFuncSeparate(context, face, func, ref, mask)); + if (isCallValid) + { + context->stencilFuncSeparate(face, func, ref, mask); + } + ANGLE_CAPTURE(StencilFuncSeparate, isCallValid, context, face, func, ref, mask); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_StencilMask(GLuint mask) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLStencilMask, "context = %d, mask = %u", CID(context), mask); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateStencilMask(context, mask)); + if (isCallValid) + { + context->stencilMask(mask); + } + ANGLE_CAPTURE(StencilMask, isCallValid, context, mask); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_StencilMaskSeparate(GLenum face, GLuint mask) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLStencilMaskSeparate, "context = %d, face = %s, mask = %u", CID(context), + GLenumToString(GLenumGroup::StencilFaceDirection, face), mask); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateStencilMaskSeparate(context, face, mask)); + if (isCallValid) + { + context->stencilMaskSeparate(face, mask); + } + ANGLE_CAPTURE(StencilMaskSeparate, isCallValid, context, face, mask); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLStencilOp, "context = %d, fail = %s, zfail = %s, zpass = %s", CID(context), + GLenumToString(GLenumGroup::StencilOp, fail), + GLenumToString(GLenumGroup::StencilOp, zfail), + GLenumToString(GLenumGroup::StencilOp, zpass)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateStencilOp(context, fail, zfail, zpass)); + if (isCallValid) + { + context->stencilOp(fail, zfail, zpass); + } + ANGLE_CAPTURE(StencilOp, isCallValid, context, fail, zfail, zpass); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_StencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLStencilOpSeparate, + "context = %d, face = %s, sfail = %s, dpfail = %s, dppass = %s", CID(context), + GLenumToString(GLenumGroup::StencilFaceDirection, face), + GLenumToString(GLenumGroup::StencilOp, sfail), + GLenumToString(GLenumGroup::StencilOp, dpfail), + GLenumToString(GLenumGroup::StencilOp, dppass)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateStencilOpSeparate(context, face, sfail, dpfail, dppass)); + if (isCallValid) + { + context->stencilOpSeparate(face, sfail, dpfail, dppass); + } + ANGLE_CAPTURE(StencilOpSeparate, isCallValid, context, face, sfail, dpfail, dppass); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexImage2D, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "border = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, internalformat, + width, height, border, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexImage2D(context, targetPacked, level, internalformat, width, + height, border, format, type, pixels)); + if (isCallValid) + { + context->texImage2D(targetPacked, level, internalformat, width, height, border, format, + type, pixels); + } + ANGLE_CAPTURE(TexImage2D, isCallValid, context, targetPacked, level, internalformat, width, + height, border, format, type, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterf(GLenum target, GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterf, "context = %d, target = %s, pname = %s, param = %f", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), param); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterf(context, targetPacked, pname, param)); + if (isCallValid) + { + context->texParameterf(targetPacked, pname, param); + } + ANGLE_CAPTURE(TexParameterf, isCallValid, context, targetPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterfv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterfv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterfv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterfv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameteri(GLenum target, GLenum pname, GLint param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameteri, "context = %d, target = %s, pname = %s, param = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), param); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameteri(context, targetPacked, pname, param)); + if (isCallValid) + { + context->texParameteri(targetPacked, pname, param); + } + ANGLE_CAPTURE(TexParameteri, isCallValid, context, targetPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameteriv(GLenum target, GLenum pname, const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameteriv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameteriv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameteriv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexSubImage2D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexSubImage2D(context, targetPacked, level, xoffset, yoffset, + width, height, format, type, pixels)); + if (isCallValid) + { + context->texSubImage2D(targetPacked, level, xoffset, yoffset, width, height, format, + type, pixels); + } + ANGLE_CAPTURE(TexSubImage2D, isCallValid, context, targetPacked, level, xoffset, yoffset, + width, height, format, type, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform1f(GLint location, GLfloat v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform1f, "context = %d, location = %d, v0 = %f", CID(context), location, v0); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform1f(context, locationPacked, v0)); + if (isCallValid) + { + context->uniform1f(locationPacked, v0); + } + ANGLE_CAPTURE(Uniform1f, isCallValid, context, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform1fv(GLint location, GLsizei count, const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform1fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform1fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform1fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform1fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform1i(GLint location, GLint v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform1i, "context = %d, location = %d, v0 = %d", CID(context), location, v0); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform1i(context, locationPacked, v0)); + if (isCallValid) + { + context->uniform1i(locationPacked, v0); + } + ANGLE_CAPTURE(Uniform1i, isCallValid, context, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform1iv(GLint location, GLsizei count, const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform1iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform1iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform1iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform1iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform2f(GLint location, GLfloat v0, GLfloat v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform2f, "context = %d, location = %d, v0 = %f, v1 = %f", CID(context), + location, v0, v1); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform2f(context, locationPacked, v0, v1)); + if (isCallValid) + { + context->uniform2f(locationPacked, v0, v1); + } + ANGLE_CAPTURE(Uniform2f, isCallValid, context, locationPacked, v0, v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform2fv(GLint location, GLsizei count, const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform2fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform2fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform2fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform2fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform2i(GLint location, GLint v0, GLint v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform2i, "context = %d, location = %d, v0 = %d, v1 = %d", CID(context), + location, v0, v1); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform2i(context, locationPacked, v0, v1)); + if (isCallValid) + { + context->uniform2i(locationPacked, v0, v1); + } + ANGLE_CAPTURE(Uniform2i, isCallValid, context, locationPacked, v0, v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform2iv(GLint location, GLsizei count, const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform2iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform2iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform2iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform2iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform3f, "context = %d, location = %d, v0 = %f, v1 = %f, v2 = %f", + CID(context), location, v0, v1, v2); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform3f(context, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->uniform3f(locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(Uniform3f, isCallValid, context, locationPacked, v0, v1, v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform3fv(GLint location, GLsizei count, const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform3fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform3fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform3fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform3fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform3i(GLint location, GLint v0, GLint v1, GLint v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform3i, "context = %d, location = %d, v0 = %d, v1 = %d, v2 = %d", + CID(context), location, v0, v1, v2); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform3i(context, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->uniform3i(locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(Uniform3i, isCallValid, context, locationPacked, v0, v1, v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform3iv(GLint location, GLsizei count, const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform3iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform3iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform3iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform3iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform4f, "context = %d, location = %d, v0 = %f, v1 = %f, v2 = %f, v3 = %f", + CID(context), location, v0, v1, v2, v3); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4f(context, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->uniform4f(locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(Uniform4f, isCallValid, context, locationPacked, v0, v1, v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform4fv(GLint location, GLsizei count, const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform4fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform4fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform4fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform4i, "context = %d, location = %d, v0 = %d, v1 = %d, v2 = %d, v3 = %d", + CID(context), location, v0, v1, v2, v3); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4i(context, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->uniform4i(locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(Uniform4i, isCallValid, context, locationPacked, v0, v1, v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform4iv(GLint location, GLsizei count, const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform4iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform4iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform4iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix2fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix2fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix2fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix2fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix3fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix3fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix3fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix3fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix4fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix4fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix4fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix4fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UseProgram(GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUseProgram, "context = %d, program = %u", CID(context), program); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUseProgram(context, programPacked)); + if (isCallValid) + { + context->useProgram(programPacked); + } + ANGLE_CAPTURE(UseProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ValidateProgram(GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLValidateProgram, "context = %d, program = %u", CID(context), program); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateValidateProgram(context, programPacked)); + if (isCallValid) + { + context->validateProgram(programPacked); + } + ANGLE_CAPTURE(ValidateProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib1f(GLuint index, GLfloat x) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib1f, "context = %d, index = %u, x = %f", CID(context), index, x); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateVertexAttrib1f(context, index, x)); + if (isCallValid) + { + context->vertexAttrib1f(index, x); + } + ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, index, x); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib1fv(GLuint index, const GLfloat *v) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib1fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib1fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib1fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib2f(GLuint index, GLfloat x, GLfloat y) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib2f, "context = %d, index = %u, x = %f, y = %f", CID(context), + index, x, y); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib2f(context, index, x, y)); + if (isCallValid) + { + context->vertexAttrib2f(index, x, y); + } + ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, index, x, y); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib2fv(GLuint index, const GLfloat *v) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib2fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib2fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib2fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib3f, "context = %d, index = %u, x = %f, y = %f, z = %f", + CID(context), index, x, y, z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib3f(context, index, x, y, z)); + if (isCallValid) + { + context->vertexAttrib3f(index, x, y, z); + } + ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, index, x, y, z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib3fv(GLuint index, const GLfloat *v) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib3fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib3fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib3fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib4f, "context = %d, index = %u, x = %f, y = %f, z = %f, w = %f", + CID(context), index, x, y, z, w); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib4f(context, index, x, y, z, w)); + if (isCallValid) + { + context->vertexAttrib4f(index, x, y, z, w); + } + ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, index, x, y, z, w); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttrib4fv(GLuint index, const GLfloat *v) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttrib4fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib4fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib4fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribPointer(GLuint index, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribPointer, + "context = %d, index = %u, size = %d, type = %s, normalized = %s, stride = %d, pointer = " + "0x%016" PRIxPTR "", + CID(context), index, size, GLenumToString(GLenumGroup::VertexAttribPointerType, type), + GLbooleanToString(normalized), stride, (uintptr_t)pointer); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribPointer(context, index, size, typePacked, + normalized, stride, pointer)); + if (isCallValid) + { + context->vertexAttribPointer(index, size, typePacked, normalized, stride, pointer); + } + ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, index, size, typePacked, + normalized, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Viewport(GLint x, GLint y, GLsizei width, GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLViewport, "context = %d, x = %d, y = %d, width = %d, height = %d", + CID(context), x, y, width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateViewport(context, x, y, width, height)); + if (isCallValid) + { + context->viewport(x, y, width, height); + } + ANGLE_CAPTURE(Viewport, isCallValid, context, x, y, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_autogen.h new file mode 100644 index 0000000000..5defcfd65e --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_autogen.h @@ -0,0 +1,309 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_2_0_autogen.h: +// Defines the GLES 2.0 entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_GLES_2_0_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_GLES_2_0_AUTOGEN_H_ + +#include <GLES2/gl2.h> +#include <export.h> + +extern "C" { +ANGLE_EXPORT void GL_APIENTRY GL_ActiveTexture(GLenum texture); +ANGLE_EXPORT void GL_APIENTRY GL_AttachShader(GLuint program, GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_BindAttribLocation(GLuint program, + GLuint index, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_BindBuffer(GLenum target, GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindFramebuffer(GLenum target, GLuint framebuffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindRenderbuffer(GLenum target, GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindTexture(GLenum target, GLuint texture); +ANGLE_EXPORT void GL_APIENTRY GL_BlendColor(GLfloat red, + GLfloat green, + GLfloat blue, + GLfloat alpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquation(GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFunc(GLenum sfactor, GLenum dfactor); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncSeparate(GLenum sfactorRGB, + GLenum dfactorRGB, + GLenum sfactorAlpha, + GLenum dfactorAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BufferData(GLenum target, + GLsizeiptr size, + const void *data, + GLenum usage); +ANGLE_EXPORT void GL_APIENTRY GL_BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void *data); +ANGLE_EXPORT GLenum GL_APIENTRY GL_CheckFramebufferStatus(GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_Clear(GLbitfield mask); +ANGLE_EXPORT void GL_APIENTRY GL_ClearColor(GLfloat red, + GLfloat green, + GLfloat blue, + GLfloat alpha); +ANGLE_EXPORT void GL_APIENTRY GL_ClearDepthf(GLfloat d); +ANGLE_EXPORT void GL_APIENTRY GL_ClearStencil(GLint s); +ANGLE_EXPORT void GL_APIENTRY GL_ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha); +ANGLE_EXPORT void GL_APIENTRY GL_CompileShader(GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateProgram(); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateShader(GLenum type); +ANGLE_EXPORT void GL_APIENTRY GL_CullFace(GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteBuffers(GLsizei n, const GLuint *buffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteProgram(GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteShader(GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteTextures(GLsizei n, const GLuint *textures); +ANGLE_EXPORT void GL_APIENTRY GL_DepthFunc(GLenum func); +ANGLE_EXPORT void GL_APIENTRY GL_DepthMask(GLboolean flag); +ANGLE_EXPORT void GL_APIENTRY GL_DepthRangef(GLfloat n, GLfloat f); +ANGLE_EXPORT void GL_APIENTRY GL_DetachShader(GLuint program, GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_Disable(GLenum cap); +ANGLE_EXPORT void GL_APIENTRY GL_DisableVertexAttribArray(GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArrays(GLenum mode, GLint first, GLsizei count); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElements(GLenum mode, + GLsizei count, + GLenum type, + const void *indices); +ANGLE_EXPORT void GL_APIENTRY GL_Enable(GLenum cap); +ANGLE_EXPORT void GL_APIENTRY GL_EnableVertexAttribArray(GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_Finish(); +ANGLE_EXPORT void GL_APIENTRY GL_Flush(); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level); +ANGLE_EXPORT void GL_APIENTRY GL_FrontFace(GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_GenBuffers(GLsizei n, GLuint *buffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenFramebuffers(GLsizei n, GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenRenderbuffers(GLsizei n, GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenTextures(GLsizei n, GLuint *textures); +ANGLE_EXPORT void GL_APIENTRY GL_GenerateMipmap(GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetAttachedShaders(GLuint program, + GLsizei maxCount, + GLsizei *count, + GLuint *shaders); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetAttribLocation(GLuint program, const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleanv(GLenum pname, GLboolean *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameteriv(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT GLenum GL_APIENTRY GL_GetError(); +ANGLE_EXPORT void GL_APIENTRY GL_GetFloatv(GLenum pname, GLfloat *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegerv(GLenum pname, GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramInfoLog(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramiv(GLuint program, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderInfoLog(GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint *range, + GLint *precision); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderSource(GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *source); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderiv(GLuint shader, GLenum pname, GLint *params); +ANGLE_EXPORT const GLubyte *GL_APIENTRY GL_GetString(GLenum name); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameteriv(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetUniformLocation(GLuint program, const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformfv(GLuint program, GLint location, GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformiv(GLuint program, GLint location, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribPointerv(GLuint index, + GLenum pname, + void **pointer); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribiv(GLuint index, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_Hint(GLenum target, GLenum mode); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsBuffer(GLuint buffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnabled(GLenum cap); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsFramebuffer(GLuint framebuffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsProgram(GLuint program); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsRenderbuffer(GLuint renderbuffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsShader(GLuint shader); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsTexture(GLuint texture); +ANGLE_EXPORT void GL_APIENTRY GL_LineWidth(GLfloat width); +ANGLE_EXPORT void GL_APIENTRY GL_LinkProgram(GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_PixelStorei(GLenum pname, GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_PolygonOffset(GLfloat factor, GLfloat units); +ANGLE_EXPORT void GL_APIENTRY GL_ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_ReleaseShaderCompiler(); +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_SampleCoverage(GLfloat value, GLboolean invert); +ANGLE_EXPORT void GL_APIENTRY GL_Scissor(GLint x, GLint y, GLsizei width, GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_ShaderBinary(GLsizei count, + const GLuint *shaders, + GLenum binaryformat, + const void *binary, + GLsizei length); +ANGLE_EXPORT void GL_APIENTRY GL_ShaderSource(GLuint shader, + GLsizei count, + const GLchar *const *string, + const GLint *length); +ANGLE_EXPORT void GL_APIENTRY GL_StencilFunc(GLenum func, GLint ref, GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilMask(GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilMaskSeparate(GLenum face, GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilOp(GLenum fail, GLenum zfail, GLenum zpass); +ANGLE_EXPORT void GL_APIENTRY GL_StencilOpSeparate(GLenum face, + GLenum sfail, + GLenum dpfail, + GLenum dppass); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterf(GLenum target, GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameteri(GLenum target, GLenum pname, GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameteriv(GLenum target, GLenum pname, const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1f(GLint location, GLfloat v0); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1fv(GLint location, GLsizei count, const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1i(GLint location, GLint v0); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1iv(GLint location, GLsizei count, const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2f(GLint location, GLfloat v0, GLfloat v1); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2fv(GLint location, GLsizei count, const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2i(GLint location, GLint v0, GLint v1); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2iv(GLint location, GLsizei count, const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3fv(GLint location, GLsizei count, const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3i(GLint location, GLint v0, GLint v1, GLint v2); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3iv(GLint location, GLsizei count, const GLint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4fv(GLint location, GLsizei count, const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4iv(GLint location, GLsizei count, const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UseProgram(GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_ValidateProgram(GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib1f(GLuint index, GLfloat x); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib1fv(GLuint index, const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib2f(GLuint index, GLfloat x, GLfloat y); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib2fv(GLuint index, const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib3fv(GLuint index, const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY +GL_VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib4fv(GLuint index, const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribPointer(GLuint index, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_Viewport(GLint x, GLint y, GLsizei width, GLsizei height); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_GLES_2_0_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.cpp new file mode 100644 index 0000000000..d0541b68e8 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.cpp @@ -0,0 +1,2928 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_3_0_autogen.cpp: +// Defines the GLES 3.0 entry points. + +#include "libGLESv2/entry_points_gles_3_0_autogen.h" + +#include "common/entry_points_enum_autogen.h" +#include "libANGLE/Context.h" +#include "libANGLE/Context.inl.h" +#include "libANGLE/capture/capture_gles_3_0_autogen.h" +#include "libANGLE/capture/gl_enum_utils.h" +#include "libANGLE/entry_points_utils.h" +#include "libANGLE/validationES3.h" +#include "libGLESv2/global_state.h" + +using namespace gl; + +extern "C" { +void GL_APIENTRY GL_BeginQuery(GLenum target, GLuint id) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBeginQuery, "context = %d, target = %s, id = %u", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), id); + + if (context) + { + QueryType targetPacked = PackParam<QueryType>(target); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBeginQuery(context, targetPacked, idPacked)); + if (isCallValid) + { + context->beginQuery(targetPacked, idPacked); + } + ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, idPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BeginTransformFeedback(GLenum primitiveMode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBeginTransformFeedback, "context = %d, primitiveMode = %s", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, primitiveMode)); + + if (context) + { + PrimitiveMode primitiveModePacked = PackParam<PrimitiveMode>(primitiveMode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBeginTransformFeedback(context, primitiveModePacked)); + if (isCallValid) + { + context->beginTransformFeedback(primitiveModePacked); + } + ANGLE_CAPTURE(BeginTransformFeedback, isCallValid, context, primitiveModePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindBufferBase(GLenum target, GLuint index, GLuint buffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindBufferBase, "context = %d, target = %s, index = %u, buffer = %u", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), index, buffer); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindBufferBase(context, targetPacked, index, bufferPacked)); + if (isCallValid) + { + context->bindBufferBase(targetPacked, index, bufferPacked); + } + ANGLE_CAPTURE(BindBufferBase, isCallValid, context, targetPacked, index, bufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindBufferRange, + "context = %d, target = %s, index = %u, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), index, buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBindBufferRange(context, targetPacked, index, bufferPacked, offset, size)); + if (isCallValid) + { + context->bindBufferRange(targetPacked, index, bufferPacked, offset, size); + } + ANGLE_CAPTURE(BindBufferRange, isCallValid, context, targetPacked, index, bufferPacked, + offset, size); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindSampler(GLuint unit, GLuint sampler) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindSampler, "context = %d, unit = %u, sampler = %u", CID(context), unit, + sampler); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindSampler(context, unit, samplerPacked)); + if (isCallValid) + { + context->bindSampler(unit, samplerPacked); + } + ANGLE_CAPTURE(BindSampler, isCallValid, context, unit, samplerPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindTransformFeedback(GLenum target, GLuint id) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindTransformFeedback, "context = %d, target = %s, id = %u", CID(context), + GLenumToString(GLenumGroup::BindTransformFeedbackTarget, target), id); + + if (context) + { + TransformFeedbackID idPacked = PackParam<TransformFeedbackID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindTransformFeedback(context, target, idPacked)); + if (isCallValid) + { + context->bindTransformFeedback(target, idPacked); + } + ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, idPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindVertexArray(GLuint array) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindVertexArray, "context = %d, array = %u", CID(context), array); + + if (context) + { + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindVertexArray(context, arrayPacked)); + if (isCallValid) + { + context->bindVertexArray(arrayPacked); + } + ANGLE_CAPTURE(BindVertexArray, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlitFramebuffer(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlitFramebuffer, + "context = %d, srcX0 = %d, srcY0 = %d, srcX1 = %d, srcY1 = %d, dstX0 = %d, dstY0 = %d, " + "dstX1 = %d, dstY1 = %d, mask = %s, filter = %s", + CID(context), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(), + GLenumToString(GLenumGroup::BlitFramebufferFilter, filter)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlitFramebuffer(context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter)); + if (isCallValid) + { + context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); + } + ANGLE_CAPTURE(BlitFramebuffer, isCallValid, context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearBufferfi, + "context = %d, buffer = %s, drawbuffer = %d, depth = %f, stencil = %d", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, depth, stencil); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferfi(context, buffer, drawbuffer, depth, stencil)); + if (isCallValid) + { + context->clearBufferfi(buffer, drawbuffer, depth, stencil); + } + ANGLE_CAPTURE(ClearBufferfi, isCallValid, context, buffer, drawbuffer, depth, stencil); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearBufferfv, + "context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferfv(context, buffer, drawbuffer, value)); + if (isCallValid) + { + context->clearBufferfv(buffer, drawbuffer, value); + } + ANGLE_CAPTURE(ClearBufferfv, isCallValid, context, buffer, drawbuffer, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearBufferiv, + "context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferiv(context, buffer, drawbuffer, value)); + if (isCallValid) + { + context->clearBufferiv(buffer, drawbuffer, value); + } + ANGLE_CAPTURE(ClearBufferiv, isCallValid, context, buffer, drawbuffer, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClearBufferuiv, + "context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferuiv(context, buffer, drawbuffer, value)); + if (isCallValid) + { + context->clearBufferuiv(buffer, drawbuffer, value); + } + ANGLE_CAPTURE(ClearBufferuiv, isCallValid, context, buffer, drawbuffer, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLenum GL_APIENTRY GL_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClientWaitSync, + "context = %d, sync = 0x%016" PRIxPTR ", flags = %s, timeout = %llu", CID(context), + (uintptr_t)sync, GLbitfieldToString(GLenumGroup::SyncObjectMask, flags).c_str(), + static_cast<unsigned long long>(timeout)); + + GLenum returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClientWaitSync(context, sync, flags, timeout)); + if (isCallValid) + { + returnValue = context->clientWaitSync(sync, flags, timeout); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLClientWaitSync, GLenum>(); + } + ANGLE_CAPTURE(ClientWaitSync, isCallValid, context, sync, flags, timeout, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLClientWaitSync, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_CompressedTexImage3D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexImage3D, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, border, + imageSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexImage3D(context, targetPacked, level, internalformat, width, + height, depth, border, imageSize, data)); + if (isCallValid) + { + context->compressedTexImage3D(targetPacked, level, internalformat, width, height, depth, + border, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexImage3D, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, imageSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexSubImage3D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + imageSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCompressedTexSubImage3D(context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, + format, imageSize, data)); + if (isCallValid) + { + context->compressedTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage3D, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, format, imageSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopyBufferSubData(GLenum readTarget, + GLenum writeTarget, + GLintptr readOffset, + GLintptr writeOffset, + GLsizeiptr size) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyBufferSubData, + "context = %d, readTarget = %s, writeTarget = %s, readOffset = %llu, writeOffset = %llu, " + "size = %llu", + CID(context), GLenumToString(GLenumGroup::CopyBufferSubDataTarget, readTarget), + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, writeTarget), + static_cast<unsigned long long>(readOffset), static_cast<unsigned long long>(writeOffset), + static_cast<unsigned long long>(size)); + + if (context) + { + BufferBinding readTargetPacked = PackParam<BufferBinding>(readTarget); + BufferBinding writeTargetPacked = PackParam<BufferBinding>(writeTarget); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyBufferSubData(context, readTargetPacked, writeTargetPacked, + readOffset, writeOffset, size)); + if (isCallValid) + { + context->copyBufferSubData(readTargetPacked, writeTargetPacked, readOffset, writeOffset, + size); + } + ANGLE_CAPTURE(CopyBufferSubData, isCallValid, context, readTargetPacked, writeTargetPacked, + readOffset, writeOffset, size); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopyTexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyTexSubImage3D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, x = " + "%d, y = %d, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, x, y, width, height); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexSubImage3D(context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height)); + if (isCallValid) + { + context->copyTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, x, y, width, + height); + } + ANGLE_CAPTURE(CopyTexSubImage3D, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteQueries(GLsizei n, const GLuint *ids) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteQueries, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)ids); + + if (context) + { + const QueryID *idsPacked = PackParam<const QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteQueries(context, n, idsPacked)); + if (isCallValid) + { + context->deleteQueries(n, idsPacked); + } + ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteSamplers(GLsizei count, const GLuint *samplers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteSamplers, "context = %d, count = %d, samplers = 0x%016" PRIxPTR "", + CID(context), count, (uintptr_t)samplers); + + if (context) + { + const SamplerID *samplersPacked = PackParam<const SamplerID *>(samplers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteSamplers(context, count, samplersPacked)); + if (isCallValid) + { + context->deleteSamplers(count, samplersPacked); + } + ANGLE_CAPTURE(DeleteSamplers, isCallValid, context, count, samplersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteSync(GLsync sync) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteSync, "context = %d, sync = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)sync); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDeleteSync(context, sync)); + if (isCallValid) + { + context->deleteSync(sync); + } + ANGLE_CAPTURE(DeleteSync, isCallValid, context, sync); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteTransformFeedbacks(GLsizei n, const GLuint *ids) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteTransformFeedbacks, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)ids); + + if (context) + { + const TransformFeedbackID *idsPacked = PackParam<const TransformFeedbackID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, idsPacked)); + if (isCallValid) + { + context->deleteTransformFeedbacks(n, idsPacked); + } + ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteVertexArrays(GLsizei n, const GLuint *arrays) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteVertexArrays, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context) + { + const VertexArrayID *arraysPacked = PackParam<const VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteVertexArrays(context, n, arraysPacked)); + if (isCallValid) + { + context->deleteVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(DeleteVertexArrays, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawArraysInstanced(GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawArraysInstanced, + "context = %d, mode = %s, first = %d, count = %d, instancecount = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, instancecount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawArraysInstanced(context, modePacked, first, count, instancecount)); + if (isCallValid) + { + context->drawArraysInstanced(modePacked, first, count, instancecount); + } + ANGLE_CAPTURE(DrawArraysInstanced, isCallValid, context, modePacked, first, count, + instancecount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawBuffers(GLsizei n, const GLenum *bufs) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawBuffers, "context = %d, n = %d, bufs = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)bufs); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawBuffers(context, n, bufs)); + if (isCallValid) + { + context->drawBuffers(n, bufs); + } + ANGLE_CAPTURE(DrawBuffers, isCallValid, context, n, bufs); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstanced(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstanced, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsInstanced(context, modePacked, count, typePacked, + indices, instancecount)); + if (isCallValid) + { + context->drawElementsInstanced(modePacked, count, typePacked, indices, instancecount); + } + ANGLE_CAPTURE(DrawElementsInstanced, isCallValid, context, modePacked, count, typePacked, + indices, instancecount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawRangeElements(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawRangeElements, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawRangeElements(context, modePacked, start, end, + count, typePacked, indices)); + if (isCallValid) + { + context->drawRangeElements(modePacked, start, end, count, typePacked, indices); + } + ANGLE_CAPTURE(DrawRangeElements, isCallValid, context, modePacked, start, end, count, + typePacked, indices); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EndQuery(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEndQuery, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target)); + + if (context) + { + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEndQuery(context, targetPacked)); + if (isCallValid) + { + context->endQuery(targetPacked); + } + ANGLE_CAPTURE(EndQuery, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EndTransformFeedback() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEndTransformFeedback, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEndTransformFeedback(context)); + if (isCallValid) + { + context->endTransformFeedback(); + } + ANGLE_CAPTURE(EndTransformFeedback, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLsync GL_APIENTRY GL_FenceSync(GLenum condition, GLbitfield flags) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFenceSync, "context = %d, condition = %s, flags = %s", CID(context), + GLenumToString(GLenumGroup::SyncCondition, condition), + GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str()); + + GLsync returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFenceSync(context, condition, flags)); + if (isCallValid) + { + returnValue = context->fenceSync(condition, flags); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLFenceSync, GLsync>(); + } + ANGLE_CAPTURE(FenceSync, isCallValid, context, condition, flags, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLFenceSync, GLsync>(); + } + return returnValue; +} + +void GL_APIENTRY GL_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFlushMappedBufferRange, + "context = %d, target = %s, offset = %llu, length = %llu", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length)); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFlushMappedBufferRange(context, targetPacked, offset, length)); + if (isCallValid) + { + context->flushMappedBufferRange(targetPacked, offset, length); + } + ANGLE_CAPTURE(FlushMappedBufferRange, isCallValid, context, targetPacked, offset, length); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferTextureLayer(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint layer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTextureLayer, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d, layer = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level, layer); + + if (context) + { + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferTextureLayer(context, target, attachment, + texturePacked, level, layer)); + if (isCallValid) + { + context->framebufferTextureLayer(target, attachment, texturePacked, level, layer); + } + ANGLE_CAPTURE(FramebufferTextureLayer, isCallValid, context, target, attachment, + texturePacked, level, layer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenQueries(GLsizei n, GLuint *ids) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenQueries, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)ids); + + if (context) + { + QueryID *idsPacked = PackParam<QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, idsPacked)); + if (isCallValid) + { + context->genQueries(n, idsPacked); + } + ANGLE_CAPTURE(GenQueries, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenSamplers(GLsizei count, GLuint *samplers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenSamplers, "context = %d, count = %d, samplers = 0x%016" PRIxPTR "", + CID(context), count, (uintptr_t)samplers); + + if (context) + { + SamplerID *samplersPacked = PackParam<SamplerID *>(samplers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenSamplers(context, count, samplersPacked)); + if (isCallValid) + { + context->genSamplers(count, samplersPacked); + } + ANGLE_CAPTURE(GenSamplers, isCallValid, context, count, samplersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenTransformFeedbacks(GLsizei n, GLuint *ids) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenTransformFeedbacks, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)ids); + + if (context) + { + TransformFeedbackID *idsPacked = PackParam<TransformFeedbackID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, idsPacked)); + if (isCallValid) + { + context->genTransformFeedbacks(n, idsPacked); + } + ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenVertexArrays(GLsizei n, GLuint *arrays) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenVertexArrays, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context) + { + VertexArrayID *arraysPacked = PackParam<VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenVertexArrays(context, n, arraysPacked)); + if (isCallValid) + { + context->genVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(GenVertexArrays, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetActiveUniformBlockName(GLuint program, + GLuint uniformBlockIndex, + GLsizei bufSize, + GLsizei *length, + GLchar *uniformBlockName) +{ + Context *context = GetValidGlobalContext(); + EVENT( + context, GLGetActiveUniformBlockName, + "context = %d, program = %u, uniformBlockIndex = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", uniformBlockName = 0x%016" PRIxPTR "", + CID(context), program, uniformBlockIndex, bufSize, (uintptr_t)length, + (uintptr_t)uniformBlockName); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetActiveUniformBlockName(context, programPacked, uniformBlockIndexPacked, + bufSize, length, uniformBlockName)); + if (isCallValid) + { + context->getActiveUniformBlockName(programPacked, uniformBlockIndexPacked, bufSize, + length, uniformBlockName); + } + ANGLE_CAPTURE(GetActiveUniformBlockName, isCallValid, context, programPacked, + uniformBlockIndexPacked, bufSize, length, uniformBlockName); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetActiveUniformBlockiv(GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetActiveUniformBlockiv, + "context = %d, program = %u, uniformBlockIndex = %u, pname = %s, params = 0x%016" PRIxPTR + "", + CID(context), program, uniformBlockIndex, + GLenumToString(GLenumGroup::UniformBlockPName, pname), (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveUniformBlockiv( + context, programPacked, uniformBlockIndexPacked, pname, params)); + if (isCallValid) + { + context->getActiveUniformBlockiv(programPacked, uniformBlockIndexPacked, pname, params); + } + ANGLE_CAPTURE(GetActiveUniformBlockiv, isCallValid, context, programPacked, + uniformBlockIndexPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetActiveUniformsiv(GLuint program, + GLsizei uniformCount, + const GLuint *uniformIndices, + GLenum pname, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetActiveUniformsiv, + "context = %d, program = %u, uniformCount = %d, uniformIndices = 0x%016" PRIxPTR + ", pname = %s, params = 0x%016" PRIxPTR "", + CID(context), program, uniformCount, (uintptr_t)uniformIndices, + GLenumToString(GLenumGroup::UniformPName, pname), (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveUniformsiv(context, programPacked, uniformCount, + uniformIndices, pname, params)); + if (isCallValid) + { + context->getActiveUniformsiv(programPacked, uniformCount, uniformIndices, pname, + params); + } + ANGLE_CAPTURE(GetActiveUniformsiv, isCallValid, context, programPacked, uniformCount, + uniformIndices, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBufferParameteri64v, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameteri64v(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferParameteri64v(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferParameteri64v, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBufferPointerv(GLenum target, GLenum pname, void **params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBufferPointerv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferPointerv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferPointerv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferPointerv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLint GL_APIENTRY GL_GetFragDataLocation(GLuint program, const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFragDataLocation, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFragDataLocation(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getFragDataLocation(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataLocation, GLint>(); + } + ANGLE_CAPTURE(GetFragDataLocation, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataLocation, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetInteger64i_v(GLenum target, GLuint index, GLint64 *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetInteger64i_v, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TypeEnum, target), index, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetInteger64i_v(context, target, index, data)); + if (isCallValid) + { + context->getInteger64i_v(target, index, data); + } + ANGLE_CAPTURE(GetInteger64i_v, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetInteger64v(GLenum pname, GLint64 *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetInteger64v, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetInteger64v(context, pname, data)); + if (isCallValid) + { + context->getInteger64v(pname, data); + } + ANGLE_CAPTURE(GetInteger64v, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetIntegeri_v(GLenum target, GLuint index, GLint *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetIntegeri_v, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TypeEnum, target), index, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetIntegeri_v(context, target, index, data)); + if (isCallValid) + { + context->getIntegeri_v(target, index, data); + } + ANGLE_CAPTURE(GetIntegeri_v, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetInternalformativ(GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetInternalformativ, + "context = %d, target = %s, internalformat = %s, pname = %s, bufSize = %d, params = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), + GLenumToString(GLenumGroup::InternalFormatPName, pname), bufSize, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetInternalformativ(context, target, internalformat, pname, bufSize, params)); + if (isCallValid) + { + context->getInternalformativ(target, internalformat, pname, bufSize, params); + } + ANGLE_CAPTURE(GetInternalformativ, isCallValid, context, target, internalformat, pname, + bufSize, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramBinary(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramBinary, + "context = %d, program = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", binaryFormat = 0x%016" PRIxPTR ", binary = 0x%016" PRIxPTR "", + CID(context), program, bufSize, (uintptr_t)length, (uintptr_t)binaryFormat, + (uintptr_t)binary); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetProgramBinary(context, programPacked, bufSize, + length, binaryFormat, binary)); + if (isCallValid) + { + context->getProgramBinary(programPacked, bufSize, length, binaryFormat, binary); + } + ANGLE_CAPTURE(GetProgramBinary, isCallValid, context, programPacked, bufSize, length, + binaryFormat, binary); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryObjectuiv, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectuiv(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectuiv(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, idPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryiv(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), + GLenumToString(GLenumGroup::QueryParameterName, pname), (uintptr_t)params); + + if (context) + { + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getQueryiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterfv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterfv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterfv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterfv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameteriv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameteriv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameteriv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameteriv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +const GLubyte *GL_APIENTRY GL_GetStringi(GLenum name, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetStringi, "context = %d, name = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::StringName, name), index); + + const GLubyte *returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetStringi(context, name, index)); + if (isCallValid) + { + returnValue = context->getStringi(name, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetStringi, const GLubyte *>(); + } + ANGLE_CAPTURE(GetStringi, isCallValid, context, name, index, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetStringi, const GLubyte *>(); + } + return returnValue; +} + +void GL_APIENTRY +GL_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetSynciv, + "context = %d, sync = 0x%016" PRIxPTR + ", pname = %s, bufSize = %d, length = 0x%016" PRIxPTR ", values = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)sync, GLenumToString(GLenumGroup::SyncParameterName, pname), + bufSize, (uintptr_t)length, (uintptr_t)values); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSynciv(context, sync, pname, bufSize, length, values)); + if (isCallValid) + { + context->getSynciv(sync, pname, bufSize, length, values); + } + ANGLE_CAPTURE(GetSynciv, isCallValid, context, sync, pname, bufSize, length, values); + } + else + {} +} + +void GL_APIENTRY GL_GetTransformFeedbackVarying(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLsizei *size, + GLenum *type, + GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTransformFeedbackVarying, + "context = %d, program = %u, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", size = 0x%016" PRIxPTR ", type = 0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, index, bufSize, (uintptr_t)length, (uintptr_t)size, + (uintptr_t)type, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTransformFeedbackVarying(context, programPacked, index, + bufSize, length, size, type, name)); + if (isCallValid) + { + context->getTransformFeedbackVarying(programPacked, index, bufSize, length, size, type, + name); + } + ANGLE_CAPTURE(GetTransformFeedbackVarying, isCallValid, context, programPacked, index, + bufSize, length, size, type, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLuint GL_APIENTRY GL_GetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformBlockIndex, + "context = %d, program = %u, uniformBlockName = 0x%016" PRIxPTR "", CID(context), program, + (uintptr_t)uniformBlockName); + + GLuint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformBlockIndex(context, programPacked, uniformBlockName)); + if (isCallValid) + { + returnValue = context->getUniformBlockIndex(programPacked, uniformBlockName); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetUniformBlockIndex, GLuint>(); + } + ANGLE_CAPTURE(GetUniformBlockIndex, isCallValid, context, programPacked, uniformBlockName, + returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetUniformBlockIndex, GLuint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetUniformIndices(GLuint program, + GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint *uniformIndices) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformIndices, + "context = %d, program = %u, uniformCount = %d, uniformNames = 0x%016" PRIxPTR + ", uniformIndices = 0x%016" PRIxPTR "", + CID(context), program, uniformCount, (uintptr_t)uniformNames, (uintptr_t)uniformIndices); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformIndices(context, programPacked, uniformCount, + uniformNames, uniformIndices)); + if (isCallValid) + { + context->getUniformIndices(programPacked, uniformCount, uniformNames, uniformIndices); + } + ANGLE_CAPTURE(GetUniformIndices, isCallValid, context, programPacked, uniformCount, + uniformNames, uniformIndices); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetUniformuiv(GLuint program, GLint location, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformuiv, + "context = %d, program = %u, location = %d, params = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformuiv(context, programPacked, locationPacked, params)); + if (isCallValid) + { + context->getUniformuiv(programPacked, locationPacked, params); + } + ANGLE_CAPTURE(GetUniformuiv, isCallValid, context, programPacked, locationPacked, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribIiv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::VertexAttribEnum, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetVertexAttribIiv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribIiv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribIuiv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::VertexAttribEnum, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetVertexAttribIuiv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribIuiv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_InvalidateFramebuffer(GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLInvalidateFramebuffer, + "context = %d, target = %s, numAttachments = %d, attachments = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), numAttachments, + (uintptr_t)attachments); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateInvalidateFramebuffer(context, target, numAttachments, attachments)); + if (isCallValid) + { + context->invalidateFramebuffer(target, numAttachments, attachments); + } + ANGLE_CAPTURE(InvalidateFramebuffer, isCallValid, context, target, numAttachments, + attachments); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_InvalidateSubFramebuffer(GLenum target, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLInvalidateSubFramebuffer, + "context = %d, target = %s, numAttachments = %d, attachments = 0x%016" PRIxPTR + ", x = %d, y = %d, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), numAttachments, + (uintptr_t)attachments, x, y, width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateInvalidateSubFramebuffer(context, target, numAttachments, + attachments, x, y, width, height)); + if (isCallValid) + { + context->invalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, + height); + } + ANGLE_CAPTURE(InvalidateSubFramebuffer, isCallValid, context, target, numAttachments, + attachments, x, y, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsQuery(GLuint id) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsQuery, "context = %d, id = %u", CID(context), id); + + GLboolean returnValue; + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, idPacked)); + if (isCallValid) + { + returnValue = context->isQuery(idPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQuery, GLboolean>(); + } + ANGLE_CAPTURE(IsQuery, isCallValid, context, idPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQuery, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsSampler(GLuint sampler) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsSampler, "context = %d, sampler = %u", CID(context), sampler); + + GLboolean returnValue; + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsSampler(context, samplerPacked)); + if (isCallValid) + { + returnValue = context->isSampler(samplerPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSampler, GLboolean>(); + } + ANGLE_CAPTURE(IsSampler, isCallValid, context, samplerPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSampler, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsSync(GLsync sync) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsSync, "context = %d, sync = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)sync); + + GLboolean returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsSync(context, sync)); + if (isCallValid) + { + returnValue = context->isSync(sync); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSync, GLboolean>(); + } + ANGLE_CAPTURE(IsSync, isCallValid, context, sync, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSync, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsTransformFeedback(GLuint id) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsTransformFeedback, "context = %d, id = %u", CID(context), id); + + GLboolean returnValue; + if (context) + { + TransformFeedbackID idPacked = PackParam<TransformFeedbackID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsTransformFeedback(context, idPacked)); + if (isCallValid) + { + returnValue = context->isTransformFeedback(idPacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsTransformFeedback, GLboolean>(); + } + ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, idPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsTransformFeedback, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsVertexArray(GLuint array) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsVertexArray, "context = %d, array = %u", CID(context), array); + + GLboolean returnValue; + if (context) + { + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsVertexArray(context, arrayPacked)); + if (isCallValid) + { + returnValue = context->isVertexArray(arrayPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArray, GLboolean>(); + } + ANGLE_CAPTURE(IsVertexArray, isCallValid, context, arrayPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArray, GLboolean>(); + } + return returnValue; +} + +void *GL_APIENTRY GL_MapBufferRange(GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMapBufferRange, + "context = %d, target = %s, offset = %llu, length = %llu, access = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length), + GLbitfieldToString(GLenumGroup::BufferAccessMask, access).c_str()); + + void *returnValue; + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMapBufferRange(context, targetPacked, offset, length, access)); + if (isCallValid) + { + returnValue = context->mapBufferRange(targetPacked, offset, length, access); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRange, void *>(); + } + ANGLE_CAPTURE(MapBufferRange, isCallValid, context, targetPacked, offset, length, access, + returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRange, void *>(); + } + return returnValue; +} + +void GL_APIENTRY GL_PauseTransformFeedback() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPauseTransformFeedback, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePauseTransformFeedback(context)); + if (isCallValid) + { + context->pauseTransformFeedback(); + } + ANGLE_CAPTURE(PauseTransformFeedback, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramBinary(GLuint program, + GLenum binaryFormat, + const void *binary, + GLsizei length) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramBinary, + "context = %d, program = %u, binaryFormat = %s, binary = 0x%016" PRIxPTR ", length = %d", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, binaryFormat), + (uintptr_t)binary, length); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramBinary(context, programPacked, binaryFormat, binary, length)); + if (isCallValid) + { + context->programBinary(programPacked, binaryFormat, binary, length); + } + ANGLE_CAPTURE(ProgramBinary, isCallValid, context, programPacked, binaryFormat, binary, + length); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramParameteri(GLuint program, GLenum pname, GLint value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramParameteri, "context = %d, program = %u, pname = %s, value = %d", + CID(context), program, GLenumToString(GLenumGroup::ProgramParameterPName, pname), value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramParameteri(context, programPacked, pname, value)); + if (isCallValid) + { + context->programParameteri(programPacked, pname, value); + } + ANGLE_CAPTURE(ProgramParameteri, isCallValid, context, programPacked, pname, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ReadBuffer(GLenum src) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLReadBuffer, "context = %d, src = %s", CID(context), + GLenumToString(GLenumGroup::ReadBufferMode, src)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateReadBuffer(context, src)); + if (isCallValid) + { + context->readBuffer(src); + } + ANGLE_CAPTURE(ReadBuffer, isCallValid, context, src); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_RenderbufferStorageMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRenderbufferStorageMultisample, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateRenderbufferStorageMultisample(context, target, samples, + internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorageMultisample(target, samples, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorageMultisample, isCallValid, context, target, samples, + internalformat, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ResumeTransformFeedback() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLResumeTransformFeedback, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateResumeTransformFeedback(context)); + if (isCallValid) + { + context->resumeTransformFeedback(); + } + ANGLE_CAPTURE(ResumeTransformFeedback, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterf, "context = %d, sampler = %u, pname = %s, param = %f", + CID(context), sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterf(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterf(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterf, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterfv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterfv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterfv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterfv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameteri(GLuint sampler, GLenum pname, GLint param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameteri, "context = %d, sampler = %u, pname = %s, param = %d", + CID(context), sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameteri(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameteri(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameteri, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameteriv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameteriv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameteriv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameteriv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexImage3D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexImage3D, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "depth = %d, border = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, internalformat, + width, height, depth, border, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexImage3D(context, targetPacked, level, internalformat, width, + height, depth, border, format, type, pixels)); + if (isCallValid) + { + context->texImage3D(targetPacked, level, internalformat, width, height, depth, border, + format, type, pixels); + } + ANGLE_CAPTURE(TexImage3D, isCallValid, context, targetPacked, level, internalformat, width, + height, depth, border, format, type, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage2D, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2D(context, targetPacked, levels, internalformat, width, height)); + if (isCallValid) + { + context->texStorage2D(targetPacked, levels, internalformat, width, height); + } + ANGLE_CAPTURE(TexStorage2D, isCallValid, context, targetPacked, levels, internalformat, + width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorage3D(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage3D, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorage3D(context, targetPacked, levels, internalformat, + width, height, depth)); + if (isCallValid) + { + context->texStorage3D(targetPacked, levels, internalformat, width, height, depth); + } + ANGLE_CAPTURE(TexStorage3D, isCallValid, context, targetPacked, levels, internalformat, + width, height, depth); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexSubImage3D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, type, pixels)); + if (isCallValid) + { + context->texSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, height, + depth, format, type, pixels); + } + ANGLE_CAPTURE(TexSubImage3D, isCallValid, context, targetPacked, level, xoffset, yoffset, + zoffset, width, height, depth, format, type, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TransformFeedbackVaryings(GLuint program, + GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTransformFeedbackVaryings, + "context = %d, program = %u, count = %d, varyings = 0x%016" PRIxPTR ", bufferMode = %s", + CID(context), program, count, (uintptr_t)varyings, + GLenumToString(GLenumGroup::DefaultGroup, bufferMode)); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTransformFeedbackVaryings( + context, programPacked, count, varyings, bufferMode)); + if (isCallValid) + { + context->transformFeedbackVaryings(programPacked, count, varyings, bufferMode); + } + ANGLE_CAPTURE(TransformFeedbackVaryings, isCallValid, context, programPacked, count, + varyings, bufferMode); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform1ui(GLint location, GLuint v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform1ui, "context = %d, location = %d, v0 = %u", CID(context), location, + v0); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform1ui(context, locationPacked, v0)); + if (isCallValid) + { + context->uniform1ui(locationPacked, v0); + } + ANGLE_CAPTURE(Uniform1ui, isCallValid, context, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform1uiv(GLint location, GLsizei count, const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform1uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform1uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform1uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform1uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform2ui(GLint location, GLuint v0, GLuint v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform2ui, "context = %d, location = %d, v0 = %u, v1 = %u", CID(context), + location, v0, v1); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform2ui(context, locationPacked, v0, v1)); + if (isCallValid) + { + context->uniform2ui(locationPacked, v0, v1); + } + ANGLE_CAPTURE(Uniform2ui, isCallValid, context, locationPacked, v0, v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform2uiv(GLint location, GLsizei count, const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform2uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform2uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform2uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform2uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform3ui, "context = %d, location = %d, v0 = %u, v1 = %u, v2 = %u", + CID(context), location, v0, v1, v2); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform3ui(context, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->uniform3ui(locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(Uniform3ui, isCallValid, context, locationPacked, v0, v1, v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform3uiv(GLint location, GLsizei count, const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform3uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform3uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform3uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform3uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform4ui, "context = %d, location = %d, v0 = %u, v1 = %u, v2 = %u, v3 = %u", + CID(context), location, v0, v1, v2, v3); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4ui(context, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->uniform4ui(locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(Uniform4ui, isCallValid, context, locationPacked, v0, v1, v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Uniform4uiv(GLint location, GLsizei count, const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniform4uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform4uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform4uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformBlockBinding(GLuint program, + GLuint uniformBlockIndex, + GLuint uniformBlockBinding) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformBlockBinding, + "context = %d, program = %u, uniformBlockIndex = %u, uniformBlockBinding = %u", + CID(context), program, uniformBlockIndex, uniformBlockBinding); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformBlockBinding(context, programPacked, uniformBlockIndexPacked, + uniformBlockBinding)); + if (isCallValid) + { + context->uniformBlockBinding(programPacked, uniformBlockIndexPacked, + uniformBlockBinding); + } + ANGLE_CAPTURE(UniformBlockBinding, isCallValid, context, programPacked, + uniformBlockIndexPacked, uniformBlockBinding); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix2x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix2x3fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix2x3fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix2x3fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix2x3fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix2x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix2x4fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix2x4fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix2x4fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix2x4fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix3x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix3x2fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix3x2fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix3x2fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix3x2fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix3x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix3x4fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix3x4fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix3x4fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix3x4fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix4x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix4x2fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix4x2fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix4x2fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix4x2fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UniformMatrix4x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUniformMatrix4x3fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix4x3fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix4x3fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix4x3fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_UnmapBuffer(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUnmapBuffer, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target)); + + GLboolean returnValue; + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUnmapBuffer(context, targetPacked)); + if (isCallValid) + { + returnValue = context->unmapBuffer(targetPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBuffer, GLboolean>(); + } + ANGLE_CAPTURE(UnmapBuffer, isCallValid, context, targetPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBuffer, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_VertexAttribDivisor(GLuint index, GLuint divisor) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribDivisor, "context = %d, index = %u, divisor = %u", CID(context), + index, divisor); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor)); + if (isCallValid) + { + context->vertexAttribDivisor(index, divisor); + } + ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, index, divisor); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribI4i, "context = %d, index = %u, x = %d, y = %d, z = %d, w = %d", + CID(context), index, x, y, z, w); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4i(context, index, x, y, z, w)); + if (isCallValid) + { + context->vertexAttribI4i(index, x, y, z, w); + } + ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, index, x, y, z, w); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribI4iv(GLuint index, const GLint *v) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribI4iv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4iv(context, index, v)); + if (isCallValid) + { + context->vertexAttribI4iv(index, v); + } + ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribI4ui, "context = %d, index = %u, x = %u, y = %u, z = %u, w = %u", + CID(context), index, x, y, z, w); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4ui(context, index, x, y, z, w)); + if (isCallValid) + { + context->vertexAttribI4ui(index, x, y, z, w); + } + ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, index, x, y, z, w); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribI4uiv(GLuint index, const GLuint *v) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribI4uiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4uiv(context, index, v)); + if (isCallValid) + { + context->vertexAttribI4uiv(index, v); + } + ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribIPointer, + "context = %d, index = %u, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR + "", + CID(context), index, size, GLenumToString(GLenumGroup::VertexAttribPointerType, type), + stride, (uintptr_t)pointer); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateVertexAttribIPointer(context, index, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->vertexAttribIPointer(index, size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, index, size, typePacked, stride, + pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLWaitSync, "context = %d, sync = 0x%016" PRIxPTR ", flags = %s, timeout = %llu", + CID(context), (uintptr_t)sync, + GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str(), + static_cast<unsigned long long>(timeout)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateWaitSync(context, sync, flags, timeout)); + if (isCallValid) + { + context->waitSync(sync, flags, timeout); + } + ANGLE_CAPTURE(WaitSync, isCallValid, context, sync, flags, timeout); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.h new file mode 100644 index 0000000000..4ce0f616a0 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.h @@ -0,0 +1,299 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_3_0_autogen.h: +// Defines the GLES 3.0 entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_GLES_3_0_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_GLES_3_0_AUTOGEN_H_ + +#include <GLES3/gl3.h> +#include <export.h> + +extern "C" { +ANGLE_EXPORT void GL_APIENTRY GL_BeginQuery(GLenum target, GLuint id); +ANGLE_EXPORT void GL_APIENTRY GL_BeginTransformFeedback(GLenum primitiveMode); +ANGLE_EXPORT void GL_APIENTRY GL_BindBufferBase(GLenum target, GLuint index, GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY +GL_BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_BindSampler(GLuint unit, GLuint sampler); +ANGLE_EXPORT void GL_APIENTRY GL_BindTransformFeedback(GLenum target, GLuint id); +ANGLE_EXPORT void GL_APIENTRY GL_BindVertexArray(GLuint array); +ANGLE_EXPORT void GL_APIENTRY GL_BlitFramebuffer(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferfi(GLenum buffer, + GLint drawbuffer, + GLfloat depth, + GLint stencil); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferfv(GLenum buffer, + GLint drawbuffer, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferuiv(GLenum buffer, + GLint drawbuffer, + const GLuint *value); +ANGLE_EXPORT GLenum GL_APIENTRY GL_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage3D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CopyBufferSubData(GLenum readTarget, + GLenum writeTarget, + GLintptr readOffset, + GLintptr writeOffset, + GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteQueries(GLsizei n, const GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteSamplers(GLsizei count, const GLuint *samplers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteSync(GLsync sync); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteTransformFeedbacks(GLsizei n, const GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteVertexArrays(GLsizei n, const GLuint *arrays); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstanced(GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawBuffers(GLsizei n, const GLenum *bufs); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstanced(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElements(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices); +ANGLE_EXPORT void GL_APIENTRY GL_EndQuery(GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_EndTransformFeedback(); +ANGLE_EXPORT GLsync GL_APIENTRY GL_FenceSync(GLenum condition, GLbitfield flags); +ANGLE_EXPORT void GL_APIENTRY GL_FlushMappedBufferRange(GLenum target, + GLintptr offset, + GLsizeiptr length); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureLayer(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint layer); +ANGLE_EXPORT void GL_APIENTRY GL_GenQueries(GLsizei n, GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_GenSamplers(GLsizei count, GLuint *samplers); +ANGLE_EXPORT void GL_APIENTRY GL_GenTransformFeedbacks(GLsizei n, GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_GenVertexArrays(GLsizei n, GLuint *arrays); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformBlockName(GLuint program, + GLuint uniformBlockIndex, + GLsizei bufSize, + GLsizei *length, + GLchar *uniformBlockName); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformBlockiv(GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformsiv(GLuint program, + GLsizei uniformCount, + const GLuint *uniformIndices, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameteri64v(GLenum target, + GLenum pname, + GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferPointerv(GLenum target, GLenum pname, void **params); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetFragDataLocation(GLuint program, const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64i_v(GLenum target, GLuint index, GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64v(GLenum pname, GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegeri_v(GLenum target, GLuint index, GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInternalformativ(GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramBinary(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryiv(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterfv(GLuint sampler, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params); +ANGLE_EXPORT const GLubyte *GL_APIENTRY GL_GetStringi(GLenum name, GLuint index); +ANGLE_EXPORT void GL_APIENTRY +GL_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +ANGLE_EXPORT void GL_APIENTRY GL_GetTransformFeedbackVarying(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLsizei *size, + GLenum *type, + GLchar *name); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetUniformBlockIndex(GLuint program, + const GLchar *uniformBlockName); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformIndices(GLuint program, + GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint *uniformIndices); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformuiv(GLuint program, GLint location, GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_InvalidateFramebuffer(GLenum target, + GLsizei numAttachments, + const GLenum *attachments); +ANGLE_EXPORT void GL_APIENTRY GL_InvalidateSubFramebuffer(GLenum target, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsQuery(GLuint id); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsSampler(GLuint sampler); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsSync(GLsync sync); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsTransformFeedback(GLuint id); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsVertexArray(GLuint array); +ANGLE_EXPORT void *GL_APIENTRY GL_MapBufferRange(GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access); +ANGLE_EXPORT void GL_APIENTRY GL_PauseTransformFeedback(); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramBinary(GLuint program, + GLenum binaryFormat, + const void *binary, + GLsizei length); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramParameteri(GLuint program, GLenum pname, GLint value); +ANGLE_EXPORT void GL_APIENTRY GL_ReadBuffer(GLenum src); +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorageMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_ResumeTransformFeedback(); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterfv(GLuint sampler, + GLenum pname, + const GLfloat *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameteri(GLuint sampler, GLenum pname, GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameteriv(GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage3D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage2D(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage3D(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TransformFeedbackVaryings(GLuint program, + GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1ui(GLint location, GLuint v0); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1uiv(GLint location, GLsizei count, const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2ui(GLint location, GLuint v0, GLuint v1); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2uiv(GLint location, GLsizei count, const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3uiv(GLint location, GLsizei count, const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4uiv(GLint location, GLsizei count, const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformBlockBinding(GLuint program, + GLuint uniformBlockIndex, + GLuint uniformBlockBinding); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix2x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix2x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix3x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix3x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix4x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix4x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_UnmapBuffer(GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribDivisor(GLuint index, GLuint divisor); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribI4iv(GLuint index, const GLint *v); +ANGLE_EXPORT void GL_APIENTRY +GL_VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribI4uiv(GLuint index, const GLuint *v); +ANGLE_EXPORT void GL_APIENTRY +GL_VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_GLES_3_0_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_1_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_1_autogen.cpp new file mode 100644 index 0000000000..24d23392ef --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_1_autogen.cpp @@ -0,0 +1,2025 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_3_1_autogen.cpp: +// Defines the GLES 3.1 entry points. + +#include "libGLESv2/entry_points_gles_3_1_autogen.h" + +#include "common/entry_points_enum_autogen.h" +#include "libANGLE/Context.h" +#include "libANGLE/Context.inl.h" +#include "libANGLE/capture/capture_gles_3_1_autogen.h" +#include "libANGLE/capture/gl_enum_utils.h" +#include "libANGLE/entry_points_utils.h" +#include "libANGLE/validationES31.h" +#include "libGLESv2/global_state.h" + +using namespace gl; + +extern "C" { +void GL_APIENTRY GL_ActiveShaderProgram(GLuint pipeline, GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLActiveShaderProgram, "context = %d, pipeline = %u, program = %u", CID(context), + pipeline, program); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateActiveShaderProgram(context, pipelinePacked, programPacked)); + if (isCallValid) + { + context->activeShaderProgram(pipelinePacked, programPacked); + } + ANGLE_CAPTURE(ActiveShaderProgram, isCallValid, context, pipelinePacked, programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindImageTexture(GLuint unit, + GLuint texture, + GLint level, + GLboolean layered, + GLint layer, + GLenum access, + GLenum format) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindImageTexture, + "context = %d, unit = %u, texture = %u, level = %d, layered = %s, layer = %d, access = " + "%s, format = %s", + CID(context), unit, texture, level, GLbooleanToString(layered), layer, + GLenumToString(GLenumGroup::BufferAccessARB, access), + GLenumToString(GLenumGroup::InternalFormat, format)); + + if (context) + { + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindImageTexture(context, unit, texturePacked, level, layered, + layer, access, format)); + if (isCallValid) + { + context->bindImageTexture(unit, texturePacked, level, layered, layer, access, format); + } + ANGLE_CAPTURE(BindImageTexture, isCallValid, context, unit, texturePacked, level, layered, + layer, access, format); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindProgramPipeline(GLuint pipeline) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindProgramPipeline, "context = %d, pipeline = %u", CID(context), pipeline); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindProgramPipeline(context, pipelinePacked)); + if (isCallValid) + { + context->bindProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(BindProgramPipeline, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindVertexBuffer(GLuint bindingindex, + GLuint buffer, + GLintptr offset, + GLsizei stride) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindVertexBuffer, + "context = %d, bindingindex = %u, buffer = %u, offset = %llu, stride = %d", CID(context), + bindingindex, buffer, static_cast<unsigned long long>(offset), stride); + + if (context) + { + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBindVertexBuffer(context, bindingindex, bufferPacked, offset, stride)); + if (isCallValid) + { + context->bindVertexBuffer(bindingindex, bufferPacked, offset, stride); + } + ANGLE_CAPTURE(BindVertexBuffer, isCallValid, context, bindingindex, bufferPacked, offset, + stride); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLuint GL_APIENTRY GL_CreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCreateShaderProgramv, + "context = %d, type = %s, count = %d, strings = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::ShaderType, type), count, (uintptr_t)strings); + + GLuint returnValue; + if (context) + { + ShaderType typePacked = PackParam<ShaderType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCreateShaderProgramv(context, typePacked, count, strings)); + if (isCallValid) + { + returnValue = context->createShaderProgramv(typePacked, count, strings); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramv, GLuint>(); + } + ANGLE_CAPTURE(CreateShaderProgramv, isCallValid, context, typePacked, count, strings, + returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramv, GLuint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteProgramPipelines, "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)pipelines); + + if (context) + { + const ProgramPipelineID *pipelinesPacked = PackParam<const ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteProgramPipelines(context, n, pipelinesPacked)); + if (isCallValid) + { + context->deleteProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(DeleteProgramPipelines, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDispatchCompute, + "context = %d, num_groups_x = %u, num_groups_y = %u, num_groups_z = %u", CID(context), + num_groups_x, num_groups_y, num_groups_z); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z)); + if (isCallValid) + { + context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z); + } + ANGLE_CAPTURE(DispatchCompute, isCallValid, context, num_groups_x, num_groups_y, + num_groups_z); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DispatchComputeIndirect(GLintptr indirect) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDispatchComputeIndirect, "context = %d, indirect = %llu", CID(context), + static_cast<unsigned long long>(indirect)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDispatchComputeIndirect(context, indirect)); + if (isCallValid) + { + context->dispatchComputeIndirect(indirect); + } + ANGLE_CAPTURE(DispatchComputeIndirect, isCallValid, context, indirect); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawArraysIndirect(GLenum mode, const void *indirect) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawArraysIndirect, "context = %d, mode = %s, indirect = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)indirect); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawArraysIndirect(context, modePacked, indirect)); + if (isCallValid) + { + context->drawArraysIndirect(modePacked, indirect); + } + ANGLE_CAPTURE(DrawArraysIndirect, isCallValid, context, modePacked, indirect); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsIndirect, + "context = %d, mode = %s, type = %s, indirect = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indirect); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawElementsIndirect(context, modePacked, typePacked, indirect)); + if (isCallValid) + { + context->drawElementsIndirect(modePacked, typePacked, indirect); + } + ANGLE_CAPTURE(DrawElementsIndirect, isCallValid, context, modePacked, typePacked, indirect); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferParameteri(GLenum target, GLenum pname, GLint param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferParameteri, "context = %d, target = %s, pname = %s, param = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferParameterName, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferParameteri(context, target, pname, param)); + if (isCallValid) + { + context->framebufferParameteri(target, pname, param); + } + ANGLE_CAPTURE(FramebufferParameteri, isCallValid, context, target, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenProgramPipelines(GLsizei n, GLuint *pipelines) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenProgramPipelines, "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)pipelines); + + if (context) + { + ProgramPipelineID *pipelinesPacked = PackParam<ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenProgramPipelines(context, n, pipelinesPacked)); + if (isCallValid) + { + context->genProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(GenProgramPipelines, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBooleani_v(GLenum target, GLuint index, GLboolean *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBooleani_v, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), index, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetBooleani_v(context, target, index, data)); + if (isCallValid) + { + context->getBooleani_v(target, index, data); + } + ANGLE_CAPTURE(GetBooleani_v, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFramebufferParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname), + (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFramebufferParameteriv(context, target, pname, params)); + if (isCallValid) + { + context->getFramebufferParameteriv(target, pname, params); + } + ANGLE_CAPTURE(GetFramebufferParameteriv, isCallValid, context, target, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetMultisamplefv, + "context = %d, pname = %s, index = %u, val = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), index, (uintptr_t)val); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetMultisamplefv(context, pname, index, val)); + if (isCallValid) + { + context->getMultisamplefv(pname, index, val); + } + ANGLE_CAPTURE(GetMultisamplefv, isCallValid, context, pname, index, val); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramInterfaceiv(GLuint program, + GLenum programInterface, + GLenum pname, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramInterfaceiv, + "context = %d, program = %u, programInterface = %s, pname = %s, params = 0x%016" PRIxPTR + "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + GLenumToString(GLenumGroup::ProgramInterfacePName, pname), (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramInterfaceiv(context, programPacked, programInterface, + pname, params)); + if (isCallValid) + { + context->getProgramInterfaceiv(programPacked, programInterface, pname, params); + } + ANGLE_CAPTURE(GetProgramInterfaceiv, isCallValid, context, programPacked, programInterface, + pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramPipelineInfoLog(GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramPipelineInfoLog, + "context = %d, pipeline = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), pipeline, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramPipelineInfoLog(context, pipelinePacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getProgramPipelineInfoLog(pipelinePacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetProgramPipelineInfoLog, isCallValid, context, pipelinePacked, bufSize, + length, infoLog); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramPipelineiv, + "context = %d, pipeline = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + pipeline, GLenumToString(GLenumGroup::PipelineParameterName, pname), (uintptr_t)params); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramPipelineiv(context, pipelinePacked, pname, params)); + if (isCallValid) + { + context->getProgramPipelineiv(pipelinePacked, pname, params); + } + ANGLE_CAPTURE(GetProgramPipelineiv, isCallValid, context, pipelinePacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLuint GL_APIENTRY GL_GetProgramResourceIndex(GLuint program, + GLenum programInterface, + const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramResourceIndex, + "context = %d, program = %u, programInterface = %s, name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + (uintptr_t)name); + + GLuint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramResourceIndex(context, programPacked, programInterface, name)); + if (isCallValid) + { + returnValue = context->getProgramResourceIndex(programPacked, programInterface, name); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceIndex, GLuint>(); + } + ANGLE_CAPTURE(GetProgramResourceIndex, isCallValid, context, programPacked, + programInterface, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceIndex, GLuint>(); + } + return returnValue; +} + +GLint GL_APIENTRY GL_GetProgramResourceLocation(GLuint program, + GLenum programInterface, + const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramResourceLocation, + "context = %d, program = %u, programInterface = %s, name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + (uintptr_t)name); + + GLint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramResourceLocation(context, programPacked, programInterface, name)); + if (isCallValid) + { + returnValue = + context->getProgramResourceLocation(programPacked, programInterface, name); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocation, GLint>(); + } + ANGLE_CAPTURE(GetProgramResourceLocation, isCallValid, context, programPacked, + programInterface, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocation, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetProgramResourceName(GLuint program, + GLenum programInterface, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramResourceName, + "context = %d, program = %u, programInterface = %s, index = %u, bufSize = %d, length = " + "0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + index, bufSize, (uintptr_t)length, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramResourceName(context, programPacked, programInterface, + index, bufSize, length, name)); + if (isCallValid) + { + context->getProgramResourceName(programPacked, programInterface, index, bufSize, length, + name); + } + ANGLE_CAPTURE(GetProgramResourceName, isCallValid, context, programPacked, programInterface, + index, bufSize, length, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramResourceiv(GLuint program, + GLenum programInterface, + GLuint index, + GLsizei propCount, + const GLenum *props, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramResourceiv, + "context = %d, program = %u, programInterface = %s, index = %u, propCount = %d, props = " + "0x%016" PRIxPTR ", bufSize = %d, length = 0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + index, propCount, (uintptr_t)props, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramResourceiv(context, programPacked, programInterface, index, + propCount, props, bufSize, length, params)); + if (isCallValid) + { + context->getProgramResourceiv(programPacked, programInterface, index, propCount, props, + bufSize, length, params); + } + ANGLE_CAPTURE(GetProgramResourceiv, isCallValid, context, programPacked, programInterface, + index, propCount, props, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterfv(GLenum target, + GLint level, + GLenum pname, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexLevelParameterfv, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameterfv(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameterfv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameterfv, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexLevelParameteriv, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameteriv(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameteriv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameteriv, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsProgramPipeline(GLuint pipeline) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsProgramPipeline, "context = %d, pipeline = %u", CID(context), pipeline); + + GLboolean returnValue; + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsProgramPipeline(context, pipelinePacked)); + if (isCallValid) + { + returnValue = context->isProgramPipeline(pipelinePacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipeline, GLboolean>(); + } + ANGLE_CAPTURE(IsProgramPipeline, isCallValid, context, pipelinePacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipeline, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_MemoryBarrier(GLbitfield barriers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMemoryBarrier, "context = %d, barriers = %s", CID(context), + GLbitfieldToString(GLenumGroup::MemoryBarrierMask, barriers).c_str()); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMemoryBarrier(context, barriers)); + if (isCallValid) + { + context->memoryBarrier(barriers); + } + ANGLE_CAPTURE(MemoryBarrier, isCallValid, context, barriers); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MemoryBarrierByRegion(GLbitfield barriers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMemoryBarrierByRegion, "context = %d, barriers = %s", CID(context), + GLbitfieldToString(GLenumGroup::MemoryBarrierMask, barriers).c_str()); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMemoryBarrierByRegion(context, barriers)); + if (isCallValid) + { + context->memoryBarrierByRegion(barriers); + } + ANGLE_CAPTURE(MemoryBarrierByRegion, isCallValid, context, barriers); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1f(GLuint program, GLint location, GLfloat v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1f, "context = %d, program = %u, location = %d, v0 = %f", + CID(context), program, location, v0); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniform1f(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1f(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1f, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1i(GLuint program, GLint location, GLint v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1i, "context = %d, program = %u, location = %d, v0 = %d", + CID(context), program, location, v0); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniform1i(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1i(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1i, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1ui(GLuint program, GLint location, GLuint v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1ui, "context = %d, program = %u, location = %d, v0 = %u", + CID(context), program, location, v0); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniform1ui(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1ui(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1ui, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2f, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f", CID(context), program, + location, v0, v1); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2f(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2f(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2f, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2i, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d", CID(context), program, + location, v0, v1); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2i(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2i(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2i, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2ui, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u", CID(context), program, + location, v0, v1); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2ui(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2ui(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2ui, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3f, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f", CID(context), + program, location, v0, v1, v2); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3f(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3f(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3f, isCallValid, context, programPacked, locationPacked, v0, v1, + v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform3fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3i, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d", CID(context), + program, location, v0, v1, v2); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3i(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3i(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3i, isCallValid, context, programPacked, locationPacked, v0, v1, + v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform3iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3ui, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u", CID(context), + program, location, v0, v1, v2); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3ui(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3ui(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3ui, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform3uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4f, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f, v3 = %f", + CID(context), program, location, v0, v1, v2, v3); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4f(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4f(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4f, isCallValid, context, programPacked, locationPacked, v0, v1, + v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform4fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4i, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d, v3 = %d", + CID(context), program, location, v0, v1, v2, v3); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4i(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4i(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4i, isCallValid, context, programPacked, locationPacked, v0, v1, + v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform4iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4ui, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u, v3 = %u", + CID(context), program, location, v0, v1, v2, v3); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4ui(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4ui(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4ui, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform4uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix2fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2fv(context, programPacked, locationPacked, + count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2fv, isCallValid, context, programPacked, locationPacked, + count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix2x3fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x3fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x3fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix2x4fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x4fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x4fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix3fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3fv(context, programPacked, locationPacked, + count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3fv, isCallValid, context, programPacked, locationPacked, + count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix3x2fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x2fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x2fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix3x4fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x4fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x4fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix4fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4fv(context, programPacked, locationPacked, + count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4fv, isCallValid, context, programPacked, locationPacked, + count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix4x2fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x2fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x2fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix4x3fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x3fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x3fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SampleMaski(GLuint maskNumber, GLbitfield mask) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSampleMaski, "context = %d, maskNumber = %u, mask = %s", CID(context), + maskNumber, GLbitfieldToString(GLenumGroup::DefaultGroup, mask).c_str()); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleMaski(context, maskNumber, mask)); + if (isCallValid) + { + context->sampleMaski(maskNumber, mask); + } + ANGLE_CAPTURE(SampleMaski, isCallValid, context, maskNumber, mask); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorage2DMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage2DMultisample, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, + GLbooleanToString(fixedsamplelocations)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2DMultisample(context, targetPacked, samples, internalformat, width, + height, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height, + fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage2DMultisample, isCallValid, context, targetPacked, samples, + internalformat, width, height, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUseProgramStages, "context = %d, pipeline = %u, stages = %s, program = %u", + CID(context), pipeline, + GLbitfieldToString(GLenumGroup::UseProgramStageMask, stages).c_str(), program); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUseProgramStages(context, pipelinePacked, stages, programPacked)); + if (isCallValid) + { + context->useProgramStages(pipelinePacked, stages, programPacked); + } + ANGLE_CAPTURE(UseProgramStages, isCallValid, context, pipelinePacked, stages, + programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ValidateProgramPipeline(GLuint pipeline) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLValidateProgramPipeline, "context = %d, pipeline = %u", CID(context), + pipeline); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateValidateProgramPipeline(context, pipelinePacked)); + if (isCallValid) + { + context->validateProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(ValidateProgramPipeline, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribBinding(GLuint attribindex, GLuint bindingindex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribBinding, "context = %d, attribindex = %u, bindingindex = %u", + CID(context), attribindex, bindingindex); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribBinding(context, attribindex, bindingindex)); + if (isCallValid) + { + context->vertexAttribBinding(attribindex, bindingindex); + } + ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindex, bindingindex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribFormat(GLuint attribindex, + GLint size, + GLenum type, + GLboolean normalized, + GLuint relativeoffset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribFormat, + "context = %d, attribindex = %u, size = %d, type = %s, normalized = %s, relativeoffset = " + "%u", + CID(context), attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type), + GLbooleanToString(normalized), relativeoffset); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribFormat(context, attribindex, size, typePacked, + normalized, relativeoffset)); + if (isCallValid) + { + context->vertexAttribFormat(attribindex, size, typePacked, normalized, relativeoffset); + } + ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindex, size, typePacked, + normalized, relativeoffset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribIFormat(GLuint attribindex, + GLint size, + GLenum type, + GLuint relativeoffset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribIFormat, + "context = %d, attribindex = %u, size = %d, type = %s, relativeoffset = %u", CID(context), + attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type), relativeoffset); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateVertexAttribIFormat(context, attribindex, size, typePacked, relativeoffset)); + if (isCallValid) + { + context->vertexAttribIFormat(attribindex, size, typePacked, relativeoffset); + } + ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindex, size, typePacked, + relativeoffset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexBindingDivisor(GLuint bindingindex, GLuint divisor) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexBindingDivisor, "context = %d, bindingindex = %u, divisor = %u", + CID(context), bindingindex, divisor); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexBindingDivisor(context, bindingindex, divisor)); + if (isCallValid) + { + context->vertexBindingDivisor(bindingindex, divisor); + } + ANGLE_CAPTURE(VertexBindingDivisor, isCallValid, context, bindingindex, divisor); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_1_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_1_autogen.h new file mode 100644 index 0000000000..91dd7ccd62 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_1_autogen.h @@ -0,0 +1,235 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_3_1_autogen.h: +// Defines the GLES 3.1 entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_GLES_3_1_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_GLES_3_1_AUTOGEN_H_ + +#include <GLES3/gl31.h> +#include <export.h> +#include "common/platform.h" + +extern "C" { +ANGLE_EXPORT void GL_APIENTRY GL_ActiveShaderProgram(GLuint pipeline, GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_BindImageTexture(GLuint unit, + GLuint texture, + GLint level, + GLboolean layered, + GLint layer, + GLenum access, + GLenum format); +ANGLE_EXPORT void GL_APIENTRY GL_BindProgramPipeline(GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_BindVertexBuffer(GLuint bindingindex, + GLuint buffer, + GLintptr offset, + GLsizei stride); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateShaderProgramv(GLenum type, + GLsizei count, + const GLchar *const *strings); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_DispatchCompute(GLuint num_groups_x, + GLuint num_groups_y, + GLuint num_groups_z); +ANGLE_EXPORT void GL_APIENTRY GL_DispatchComputeIndirect(GLintptr indirect); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysIndirect(GLenum mode, const void *indirect); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsIndirect(GLenum mode, + GLenum type, + const void *indirect); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferParameteri(GLenum target, GLenum pname, GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_GenProgramPipelines(GLsizei n, GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleani_v(GLenum target, GLuint index, GLboolean *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferParameteriv(GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramInterfaceiv(GLuint program, + GLenum programInterface, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineInfoLog(GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetProgramResourceIndex(GLuint program, + GLenum programInterface, + const GLchar *name); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetProgramResourceLocation(GLuint program, + GLenum programInterface, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramResourceName(GLuint program, + GLenum programInterface, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramResourceiv(GLuint program, + GLenum programInterface, + GLuint index, + GLsizei propCount, + const GLenum *props, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterfv(GLenum target, + GLint level, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameteriv(GLenum target, + GLint level, + GLenum pname, + GLint *params); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsProgramPipeline(GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_MemoryBarrier(GLbitfield barriers); +ANGLE_EXPORT void GL_APIENTRY GL_MemoryBarrierByRegion(GLbitfield barriers); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1f(GLuint program, GLint location, GLfloat v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1i(GLuint program, GLint location, GLint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1ui(GLuint program, GLint location, GLuint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2f(GLuint program, + GLint location, + GLfloat v0, + GLfloat v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2i(GLuint program, + GLint location, + GLint v0, + GLint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2ui(GLuint program, + GLint location, + GLuint v0, + GLuint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_SampleMaski(GLuint maskNumber, GLbitfield mask); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage2DMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations); +ANGLE_EXPORT void GL_APIENTRY GL_UseProgramStages(GLuint pipeline, + GLbitfield stages, + GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_ValidateProgramPipeline(GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribBinding(GLuint attribindex, GLuint bindingindex); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribFormat(GLuint attribindex, + GLint size, + GLenum type, + GLboolean normalized, + GLuint relativeoffset); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribIFormat(GLuint attribindex, + GLint size, + GLenum type, + GLuint relativeoffset); +ANGLE_EXPORT void GL_APIENTRY GL_VertexBindingDivisor(GLuint bindingindex, GLuint divisor); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_GLES_3_1_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_2_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_2_autogen.cpp new file mode 100644 index 0000000000..032d36d6af --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_2_autogen.cpp @@ -0,0 +1,1273 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_3_2_autogen.cpp: +// Defines the GLES 3.2 entry points. + +#include "libGLESv2/entry_points_gles_3_2_autogen.h" + +#include "common/entry_points_enum_autogen.h" +#include "libANGLE/Context.h" +#include "libANGLE/Context.inl.h" +#include "libANGLE/capture/capture_gles_3_2_autogen.h" +#include "libANGLE/capture/gl_enum_utils.h" +#include "libANGLE/entry_points_utils.h" +#include "libANGLE/validationES32.h" +#include "libGLESv2/global_state.h" + +using namespace gl; + +extern "C" { +void GL_APIENTRY GL_BlendBarrier() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendBarrier, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateBlendBarrier(context)); + if (isCallValid) + { + context->blendBarrier(); + } + ANGLE_CAPTURE(BlendBarrier, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquationSeparatei, "context = %d, buf = %u, modeRGB = %s, modeAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparatei(context, buf, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparatei(buf, modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparatei, isCallValid, context, buf, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendEquationi(GLuint buf, GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquationi, "context = %d, buf = %u, mode = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendEquationi(context, buf, mode)); + if (isCallValid) + { + context->blendEquationi(buf, mode); + } + ANGLE_CAPTURE(BlendEquationi, isCallValid, context, buf, mode); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_BlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFuncSeparatei, + "context = %d, buf = %u, srcRGB = %s, dstRGB = %s, srcAlpha = %s, dstAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendingFactor, srcRGB), + GLenumToString(GLenumGroup::BlendingFactor, dstRGB), + GLenumToString(GLenumGroup::BlendingFactor, srcAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dstAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBlendFuncSeparatei(context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha)); + if (isCallValid) + { + context->blendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparatei, isCallValid, context, buf, srcRGB, dstRGB, srcAlpha, + dstAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendFunci(GLuint buf, GLenum src, GLenum dst) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFunci, "context = %d, buf = %u, src = %s, dst = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendingFactor, src), + GLenumToString(GLenumGroup::BlendingFactor, dst)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunci(context, buf, src, dst)); + if (isCallValid) + { + context->blendFunci(buf, src, dst); + } + ANGLE_CAPTURE(BlendFunci, isCallValid, context, buf, src, dst); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColorMaski, "context = %d, index = %u, r = %s, g = %s, b = %s, a = %s", + CID(context), index, GLbooleanToString(r), GLbooleanToString(g), GLbooleanToString(b), + GLbooleanToString(a)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMaski(context, index, r, g, b, a)); + if (isCallValid) + { + context->colorMaski(index, r, g, b, a); + } + ANGLE_CAPTURE(ColorMaski, isCallValid, context, index, r, g, b, a); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopyImageSubData(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyImageSubData, + "context = %d, srcName = %u, srcTarget = %s, srcLevel = %d, srcX = %d, srcY = %d, srcZ = " + "%d, dstName = %u, dstTarget = %s, dstLevel = %d, dstX = %d, dstY = %d, dstZ = %d, " + "srcWidth = %d, srcHeight = %d, srcDepth = %d", + CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget), + srcLevel, srcX, srcY, srcZ, dstName, + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY, + dstZ, srcWidth, srcHeight, srcDepth); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyImageSubData(context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, + dstY, dstZ, srcWidth, srcHeight, srcDepth)); + if (isCallValid) + { + context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); + } + ANGLE_CAPTURE(CopyImageSubData, isCallValid, context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DebugMessageCallback(GLDEBUGPROC callback, const void *userParam) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDebugMessageCallback, + "context = %d, callback = 0x%016" PRIxPTR ", userParam = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)callback, (uintptr_t)userParam); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDebugMessageCallback(context, callback, userParam)); + if (isCallValid) + { + context->debugMessageCallback(callback, userParam); + } + ANGLE_CAPTURE(DebugMessageCallback, isCallValid, context, callback, userParam); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DebugMessageControl(GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDebugMessageControl, + "context = %d, source = %s, type = %s, severity = %s, count = %d, ids = 0x%016" PRIxPTR + ", enabled = %s", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), + GLenumToString(GLenumGroup::DebugSeverity, severity), count, (uintptr_t)ids, + GLbooleanToString(enabled)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageControl(context, source, type, severity, count, ids, enabled)); + if (isCallValid) + { + context->debugMessageControl(source, type, severity, count, ids, enabled); + } + ANGLE_CAPTURE(DebugMessageControl, isCallValid, context, source, type, severity, count, ids, + enabled); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DebugMessageInsert(GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDebugMessageInsert, + "context = %d, source = %s, type = %s, id = %u, severity = %s, length = %d, buf = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), id, + GLenumToString(GLenumGroup::DebugSeverity, severity), length, (uintptr_t)buf); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageInsert(context, source, type, id, severity, length, buf)); + if (isCallValid) + { + context->debugMessageInsert(source, type, id, severity, length, buf); + } + ANGLE_CAPTURE(DebugMessageInsert, isCallValid, context, source, type, id, severity, length, + buf); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Disablei(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDisablei, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDisablei(context, target, index)); + if (isCallValid) + { + context->disablei(target, index); + } + ANGLE_CAPTURE(Disablei, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsBaseVertex(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsBaseVertex, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsBaseVertex(context, modePacked, count, typePacked, + indices, basevertex)); + if (isCallValid) + { + context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex); + } + ANGLE_CAPTURE(DrawElementsBaseVertex, isCallValid, context, modePacked, count, typePacked, + indices, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertex(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedBaseVertex, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount, + basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertex( + context, modePacked, count, typePacked, + indices, instancecount, basevertex)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices, + instancecount, basevertex); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertex, isCallValid, context, modePacked, count, + typePacked, indices, instancecount, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawRangeElementsBaseVertex(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawRangeElementsBaseVertex, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertex( + context, modePacked, start, end, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices, + basevertex); + } + ANGLE_CAPTURE(DrawRangeElementsBaseVertex, isCallValid, context, modePacked, start, end, + count, typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_Enablei(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEnablei, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEnablei(context, target, index)); + if (isCallValid) + { + context->enablei(target, index); + } + ANGLE_CAPTURE(Enablei, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferTexture(GLenum target, + GLenum attachment, + GLuint texture, + GLint level) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTexture, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level); + + if (context) + { + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTexture(context, target, attachment, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture(target, attachment, texturePacked, level); + } + ANGLE_CAPTURE(FramebufferTexture, isCallValid, context, target, attachment, texturePacked, + level); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLuint GL_APIENTRY GL_GetDebugMessageLog(GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetDebugMessageLog, + "context = %d, count = %u, bufSize = %d, sources = 0x%016" PRIxPTR + ", types = 0x%016" PRIxPTR ", ids = 0x%016" PRIxPTR ", severities = 0x%016" PRIxPTR + ", lengths = 0x%016" PRIxPTR ", messageLog = 0x%016" PRIxPTR "", + CID(context), count, bufSize, (uintptr_t)sources, (uintptr_t)types, (uintptr_t)ids, + (uintptr_t)severities, (uintptr_t)lengths, (uintptr_t)messageLog); + + GLuint returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetDebugMessageLog(context, count, bufSize, sources, types, ids, + severities, lengths, messageLog)); + if (isCallValid) + { + returnValue = context->getDebugMessageLog(count, bufSize, sources, types, ids, + severities, lengths, messageLog); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLog, GLuint>(); + } + ANGLE_CAPTURE(GetDebugMessageLog, isCallValid, context, count, bufSize, sources, types, ids, + severities, lengths, messageLog, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLog, GLuint>(); + } + return returnValue; +} + +GLenum GL_APIENTRY GL_GetGraphicsResetStatus() +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetGraphicsResetStatus, "context = %d", CID(context)); + + GLenum returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetGraphicsResetStatus(context)); + if (isCallValid) + { + returnValue = context->getGraphicsResetStatus(); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatus, GLenum>(); + } + ANGLE_CAPTURE(GetGraphicsResetStatus, isCallValid, context, returnValue); + } + else + { + + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatus, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY +GL_GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetObjectLabel, + "context = %d, identifier = %s, name = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, identifier), name, bufSize, + (uintptr_t)length, (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetObjectLabel(context, identifier, name, bufSize, length, label)); + if (isCallValid) + { + context->getObjectLabel(identifier, name, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectLabel, isCallValid, context, identifier, name, bufSize, length, + label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetObjectPtrLabel(const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetObjectPtrLabel, + "context = %d, ptr = 0x%016" PRIxPTR ", bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, bufSize, (uintptr_t)length, (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetObjectPtrLabel(context, ptr, bufSize, length, label)); + if (isCallValid) + { + context->getObjectPtrLabel(ptr, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectPtrLabel, isCallValid, context, ptr, bufSize, length, label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetPointerv(GLenum pname, void **params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetPointerv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPointervPName, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetPointerv(context, pname, params)); + if (isCallValid) + { + context->getPointerv(pname, params); + } + ANGLE_CAPTURE(GetPointerv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIiv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIiv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIiv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIuiv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIuiv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIuiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuiv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIuiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIuiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformfv, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformfv(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformfv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformfv, isCallValid, context, programPacked, locationPacked, bufSize, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformiv, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformiv(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformiv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformiv, isCallValid, context, programPacked, locationPacked, bufSize, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformuiv, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformuiv(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformuiv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformuiv, isCallValid, context, programPacked, locationPacked, bufSize, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsEnabledi(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsEnabledi, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + GLboolean returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsEnabledi(context, target, index)); + if (isCallValid) + { + returnValue = context->isEnabledi(target, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabledi, GLboolean>(); + } + ANGLE_CAPTURE(IsEnabledi, isCallValid, context, target, index, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabledi, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_MinSampleShading(GLfloat value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMinSampleShading, "context = %d, value = %f", CID(context), value); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMinSampleShading(context, value)); + if (isCallValid) + { + context->minSampleShading(value); + } + ANGLE_CAPTURE(MinSampleShading, isCallValid, context, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLObjectLabel, + "context = %d, identifier = %s, name = %u, length = %d, label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ObjectIdentifier, identifier), name, length, + (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateObjectLabel(context, identifier, name, length, label)); + if (isCallValid) + { + context->objectLabel(identifier, name, length, label); + } + ANGLE_CAPTURE(ObjectLabel, isCallValid, context, identifier, name, length, label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLObjectPtrLabel, + "context = %d, ptr = 0x%016" PRIxPTR ", length = %d, label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, length, (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateObjectPtrLabel(context, ptr, length, label)); + if (isCallValid) + { + context->objectPtrLabel(ptr, length, label); + } + ANGLE_CAPTURE(ObjectPtrLabel, isCallValid, context, ptr, length, label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PatchParameteri(GLenum pname, GLint value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPatchParameteri, "context = %d, pname = %s, value = %d", CID(context), + GLenumToString(GLenumGroup::PatchParameterName, pname), value); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePatchParameteri(context, pname, value)); + if (isCallValid) + { + context->patchParameteri(pname, value); + } + ANGLE_CAPTURE(PatchParameteri, isCallValid, context, pname, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PopDebugGroup() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPopDebugGroup, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopDebugGroup(context)); + if (isCallValid) + { + context->popDebugGroup(); + } + ANGLE_CAPTURE(PopDebugGroup, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PrimitiveBoundingBox(GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPrimitiveBoundingBox, + "context = %d, minX = %f, minY = %f, minZ = %f, minW = %f, maxX = %f, maxY = %f, maxZ = " + "%f, maxW = %f", + CID(context), minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidatePrimitiveBoundingBox(context, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW)); + if (isCallValid) + { + context->primitiveBoundingBox(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + } + ANGLE_CAPTURE(PrimitiveBoundingBox, isCallValid, context, minX, minY, minZ, minW, maxX, + maxY, maxZ, maxW); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPushDebugGroup, + "context = %d, source = %s, id = %u, length = %d, message = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), id, length, + (uintptr_t)message); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePushDebugGroup(context, source, id, length, message)); + if (isCallValid) + { + context->pushDebugGroup(source, id, length, message); + } + ANGLE_CAPTURE(PushDebugGroup, isCallValid, context, source, id, length, message); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ReadnPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLReadnPixels, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, data = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadnPixels(context, x, y, width, height, format, type, bufSize, data)); + if (isCallValid) + { + context->readnPixels(x, y, width, height, format, type, bufSize, data); + } + ANGLE_CAPTURE(ReadnPixels, isCallValid, context, x, y, width, height, format, type, bufSize, + data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIiv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIiv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIiv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIuiv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIuiv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIuiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIuiv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexBuffer(GLenum target, GLenum internalformat, GLuint buffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexBuffer, "context = %d, target = %s, internalformat = %s, buffer = %u", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBuffer(context, targetPacked, internalformat, bufferPacked)); + if (isCallValid) + { + context->texBuffer(targetPacked, internalformat, bufferPacked); + } + ANGLE_CAPTURE(TexBuffer, isCallValid, context, targetPacked, internalformat, bufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexBufferRange(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexBufferRange, + "context = %d, target = %s, internalformat = %s, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBufferRange(context, targetPacked, internalformat, + bufferPacked, offset, size)); + if (isCallValid) + { + context->texBufferRange(targetPacked, internalformat, bufferPacked, offset, size); + } + ANGLE_CAPTURE(TexBufferRange, isCallValid, context, targetPacked, internalformat, + bufferPacked, offset, size); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIiv(GLenum target, GLenum pname, const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIuiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIuiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIuiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorage3DMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage3DMultisample, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, + GLbooleanToString(fixedsamplelocations)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage3DMultisample(context, targetPacked, samples, internalformat, width, + height, depth, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage3DMultisample(targetPacked, samples, internalformat, width, height, + depth, fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage3DMultisample, isCallValid, context, targetPacked, samples, + internalformat, width, height, depth, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_2_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_2_autogen.h new file mode 100644 index 0000000000..02fd24d436 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_2_autogen.h @@ -0,0 +1,172 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.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_gles_3_2_autogen.h: +// Defines the GLES 3.2 entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_GLES_3_2_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_GLES_3_2_AUTOGEN_H_ + +#include <GLES3/gl32.h> +#include <export.h> + +extern "C" { +ANGLE_EXPORT void GL_APIENTRY GL_BlendBarrier(); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparatei(GLuint buf, + GLenum modeRGB, + GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationi(GLuint buf, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY +GL_BlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFunci(GLuint buf, GLenum src, GLenum dst); +ANGLE_EXPORT void GL_APIENTRY +GL_ColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +ANGLE_EXPORT void GL_APIENTRY GL_CopyImageSubData(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageCallback(GLDEBUGPROC callback, const void *userParam); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageControl(GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageInsert(GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf); +ANGLE_EXPORT void GL_APIENTRY GL_Disablei(GLenum target, GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsBaseVertex(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedBaseVertex(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElementsBaseVertex(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_Enablei(GLenum target, GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture(GLenum target, + GLenum attachment, + GLuint texture, + GLint level); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetDebugMessageLog(GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog); +ANGLE_EXPORT GLenum GL_APIENTRY GL_GetGraphicsResetStatus(); +ANGLE_EXPORT void GL_APIENTRY +GL_GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectPtrLabel(const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetPointerv(GLenum pname, void **params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIiv(GLuint sampler, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuiv(GLuint sampler, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformfv(GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformiv(GLuint program, + GLint location, + GLsizei bufSize, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformuiv(GLuint program, + GLint location, + GLsizei bufSize, + GLuint *params); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnabledi(GLenum target, GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_MinSampleShading(GLfloat value); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectLabel(GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectPtrLabel(const void *ptr, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_PatchParameteri(GLenum pname, GLint value); +ANGLE_EXPORT void GL_APIENTRY GL_PopDebugGroup(); +ANGLE_EXPORT void GL_APIENTRY GL_PrimitiveBoundingBox(GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW); +ANGLE_EXPORT void GL_APIENTRY GL_PushDebugGroup(GLenum source, + GLuint id, + GLsizei length, + const GLchar *message); +ANGLE_EXPORT void GL_APIENTRY GL_ReadnPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIiv(GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuiv(GLuint sampler, + GLenum pname, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_TexBuffer(GLenum target, GLenum internalformat, GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferRange(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIiv(GLenum target, GLenum pname, const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuiv(GLenum target, + GLenum pname, + const GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage3DMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_GLES_3_2_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.cpp new file mode 100644 index 0000000000..8290e22a5a --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.cpp @@ -0,0 +1,34520 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.xml and gl_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_gles_ext_autogen.cpp: +// Defines the GLES extension entry points. + +#include "libGLESv2/entry_points_gles_ext_autogen.h" + +#include "common/entry_points_enum_autogen.h" +#include "libANGLE/Context.h" +#include "libANGLE/Context.inl.h" +#include "libANGLE/capture/capture_gles_ext_autogen.h" +#include "libANGLE/capture/gl_enum_utils.h" +#include "libANGLE/entry_points_utils.h" +#include "libANGLE/validationESEXT.h" +#include "libGLESv2/global_state.h" + +using namespace gl; + +#include "libANGLE/capture/capture_gles_1_0_autogen.h" +#include "libANGLE/capture/capture_gles_2_0_autogen.h" +#include "libANGLE/capture/capture_gles_3_0_autogen.h" +#include "libANGLE/capture/capture_gles_3_1_autogen.h" +#include "libANGLE/capture/capture_gles_3_2_autogen.h" +#include "libANGLE/validationES1.h" +#include "libANGLE/validationES2.h" +#include "libANGLE/validationES3.h" +#include "libANGLE/validationES31.h" +#include "libANGLE/validationES32.h" + +using namespace gl; + +extern "C" { + +// GL_ANGLE_base_vertex_base_instance +void GL_APIENTRY GL_DrawArraysInstancedBaseInstanceANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawArraysInstancedBaseInstanceANGLE, + "context = %d, mode = %s, first = %d, count = %d, instanceCount = %d, baseInstance = %u", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, + instanceCount, baseInstance); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawArraysInstancedBaseInstanceANGLE( + context, modePacked, first, count, instanceCount, baseInstance)); + if (isCallValid) + { + context->drawArraysInstancedBaseInstance(modePacked, first, count, instanceCount, + baseInstance); + } + ANGLE_CAPTURE(DrawArraysInstancedBaseInstanceANGLE, isCallValid, context, modePacked, first, + count, instanceCount, baseInstance); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei instanceCounts, + GLint baseVertex, + GLuint baseInstance) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedBaseVertexBaseInstanceANGLE, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instanceCounts = %d, baseVertex = %d, baseInstance = %u", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instanceCounts, + baseVertex, baseInstance); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawElementsInstancedBaseVertexBaseInstanceANGLE( + context, modePacked, count, typePacked, indices, + instanceCounts, baseVertex, baseInstance)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertexBaseInstance( + modePacked, count, typePacked, indices, instanceCounts, baseVertex, baseInstance); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertexBaseInstanceANGLE, isCallValid, context, + modePacked, count, typePacked, indices, instanceCounts, baseVertex, + baseInstance); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultiDrawArraysInstancedBaseInstanceANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + const GLuint *baseInstances, + GLsizei drawcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiDrawArraysInstancedBaseInstanceANGLE, + "context = %d, mode = %s, firsts = 0x%016" PRIxPTR ", counts = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", baseInstances = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)firsts, + (uintptr_t)counts, (uintptr_t)instanceCounts, (uintptr_t)baseInstances, drawcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMultiDrawArraysInstancedBaseInstanceANGLE( + context, modePacked, firsts, counts, instanceCounts, baseInstances, drawcount)); + if (isCallValid) + { + context->multiDrawArraysInstancedBaseInstance(modePacked, firsts, counts, + instanceCounts, baseInstances, drawcount); + } + ANGLE_CAPTURE(MultiDrawArraysInstancedBaseInstanceANGLE, isCallValid, context, modePacked, + firsts, counts, instanceCounts, baseInstances, drawcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + const GLint *baseVertices, + const GLuint *baseInstances, + GLsizei drawcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE, + "context = %d, mode = %s, counts = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", baseVertices = 0x%016" PRIxPTR + ", baseInstances = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)counts, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, + (uintptr_t)instanceCounts, (uintptr_t)baseVertices, (uintptr_t)baseInstances, drawcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE( + context, modePacked, counts, typePacked, indices, instanceCounts, + baseVertices, baseInstances, drawcount)); + if (isCallValid) + { + context->multiDrawElementsInstancedBaseVertexBaseInstance( + modePacked, counts, typePacked, indices, instanceCounts, baseVertices, + baseInstances, drawcount); + } + ANGLE_CAPTURE(MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE, isCallValid, context, + modePacked, counts, typePacked, indices, instanceCounts, baseVertices, + baseInstances, drawcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_copy_texture_3d +void GL_APIENTRY GL_CopyTexture3DANGLE(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyTexture3DANGLE, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, internalFormat = %d, destType = %s, unpackFlipY = %s, unpackPremultiplyAlpha = " + "%s, unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, internalFormat, + GLenumToString(GLenumGroup::DefaultGroup, destType), GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context) + { + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexture3DANGLE( + context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copyTexture3D(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopyTexture3DANGLE, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, internalFormat, destType, + unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopySubTexture3DANGLE(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLint z, + GLint width, + GLint height, + GLint depth, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopySubTexture3DANGLE, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, xoffset = %d, yoffset = %d, zoffset = %d, x = %d, y = %d, z = %d, width = %d, " + "height = %d, depth = %d, unpackFlipY = %s, unpackPremultiplyAlpha = %s, " + "unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, xoffset, + yoffset, zoffset, x, y, z, width, height, depth, GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context) + { + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCopySubTexture3DANGLE(context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, xoffset, yoffset, zoffset, x, y, + z, width, height, depth, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copySubTexture3D(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, xoffset, yoffset, zoffset, x, y, z, width, height, + depth, unpackFlipY, unpackPremultiplyAlpha, + unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopySubTexture3DANGLE, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, xoffset, yoffset, zoffset, x, y, z, + width, height, depth, unpackFlipY, unpackPremultiplyAlpha, + unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_framebuffer_blit +void GL_APIENTRY GL_BlitFramebufferANGLE(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlitFramebufferANGLE, + "context = %d, srcX0 = %d, srcY0 = %d, srcX1 = %d, srcY1 = %d, dstX0 = %d, dstY0 = %d, " + "dstX1 = %d, dstY1 = %d, mask = %s, filter = %s", + CID(context), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(), + GLenumToString(GLenumGroup::BlitFramebufferFilter, filter)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlitFramebufferANGLE(context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter)); + if (isCallValid) + { + context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); + } + ANGLE_CAPTURE(BlitFramebufferANGLE, isCallValid, context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_framebuffer_multisample +void GL_APIENTRY GL_RenderbufferStorageMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRenderbufferStorageMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateRenderbufferStorageMultisampleANGLE( + context, target, samples, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorageMultisample(target, samples, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorageMultisampleANGLE, isCallValid, context, target, samples, + internalformat, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_get_image +void GL_APIENTRY +GL_GetTexImageANGLE(GLenum target, GLint level, GLenum format, GLenum type, void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexImageANGLE, + "context = %d, target = %s, level = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR + "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexImageANGLE(context, targetPacked, level, format, type, pixels)); + if (isCallValid) + { + context->getTexImage(targetPacked, level, format, type, pixels); + } + ANGLE_CAPTURE(GetTexImageANGLE, isCallValid, context, targetPacked, level, format, type, + pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetRenderbufferImageANGLE(GLenum target, + GLenum format, + GLenum type, + void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetRenderbufferImageANGLE, + "context = %d, target = %s, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetRenderbufferImageANGLE(context, target, format, type, pixels)); + if (isCallValid) + { + context->getRenderbufferImage(target, format, type, pixels); + } + ANGLE_CAPTURE(GetRenderbufferImageANGLE, isCallValid, context, target, format, type, + pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_get_tex_level_parameter +void GL_APIENTRY GL_GetTexLevelParameterivANGLE(GLenum target, + GLint level, + GLenum pname, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexLevelParameterivANGLE, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameterivANGLE(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameteriv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameterivANGLE, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterfvANGLE(GLenum target, + GLint level, + GLenum pname, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexLevelParameterfvANGLE, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameterfvANGLE(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameterfv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameterfvANGLE, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_instanced_arrays +void GL_APIENTRY GL_DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawArraysInstancedANGLE, + "context = %d, mode = %s, first = %d, count = %d, primcount = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, primcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawArraysInstancedANGLE(context, modePacked, first, count, primcount)); + if (isCallValid) + { + context->drawArraysInstanced(modePacked, first, count, primcount); + } + ANGLE_CAPTURE(DrawArraysInstancedANGLE, isCallValid, context, modePacked, first, count, + primcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedANGLE, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", primcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::PrimitiveType, type), (uintptr_t)indices, primcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsInstancedANGLE(context, modePacked, count, + typePacked, indices, primcount)); + if (isCallValid) + { + context->drawElementsInstanced(modePacked, count, typePacked, indices, primcount); + } + ANGLE_CAPTURE(DrawElementsInstancedANGLE, isCallValid, context, modePacked, count, + typePacked, indices, primcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribDivisorANGLE(GLuint index, GLuint divisor) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribDivisorANGLE, "context = %d, index = %u, divisor = %u", + CID(context), index, divisor); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribDivisorANGLE(context, index, divisor)); + if (isCallValid) + { + context->vertexAttribDivisor(index, divisor); + } + ANGLE_CAPTURE(VertexAttribDivisorANGLE, isCallValid, context, index, divisor); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_memory_object_flags +void GL_APIENTRY GL_TexStorageMemFlags2DANGLE(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorageMemFlags2DANGLE, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "memory = %u, offset = %llu, createFlags = %s, usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, memory, + static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorageMemFlags2DANGLE( + context, targetPacked, levels, internalFormat, width, height, + memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags2D(targetPacked, levels, internalFormat, width, height, + memoryPacked, offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags2DANGLE, isCallValid, context, targetPacked, levels, + internalFormat, width, height, memoryPacked, offset, createFlags, usageFlags); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorageMemFlags2DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = GetValidGlobalContext(); + EVENT( + context, GLTexStorageMemFlags2DMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "fixedSampleLocations = %s, memory = %u, offset = %llu, createFlags = %s, usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMemFlags2DMultisampleANGLE( + context, targetPacked, samples, internalFormat, width, height, + fixedSampleLocations, memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags2DMultisample(targetPacked, samples, internalFormat, width, + height, fixedSampleLocations, memoryPacked, + offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags2DMultisampleANGLE, isCallValid, context, targetPacked, + samples, internalFormat, width, height, fixedSampleLocations, memoryPacked, + offset, createFlags, usageFlags); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorageMemFlags3DANGLE(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorageMemFlags3DANGLE, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, memory = %u, offset = %llu, createFlags = %s, usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, memory, + static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorageMemFlags3DANGLE( + context, targetPacked, levels, internalFormat, width, height, depth, + memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags3D(targetPacked, levels, internalFormat, width, height, + depth, memoryPacked, offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags3DANGLE, isCallValid, context, targetPacked, levels, + internalFormat, width, height, depth, memoryPacked, offset, createFlags, + usageFlags); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorageMemFlags3DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorageMemFlags3DMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, fixedSampleLocations = %s, memory = %u, offset = %llu, createFlags = %s, " + "usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMemFlags3DMultisampleANGLE( + context, targetPacked, samples, internalFormat, width, height, depth, + fixedSampleLocations, memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags3DMultisample(targetPacked, samples, internalFormat, width, + height, depth, fixedSampleLocations, + memoryPacked, offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags3DMultisampleANGLE, isCallValid, context, targetPacked, + samples, internalFormat, width, height, depth, fixedSampleLocations, + memoryPacked, offset, createFlags, usageFlags); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_memory_object_fuchsia +void GL_APIENTRY GL_ImportMemoryZirconHandleANGLE(GLuint memory, + GLuint64 size, + GLenum handleType, + GLuint handle) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLImportMemoryZirconHandleANGLE, + "context = %d, memory = %u, size = %llu, handleType = %s, handle = %u", CID(context), + memory, static_cast<unsigned long long>(size), + GLenumToString(GLenumGroup::ExternalHandleType, handleType), handle); + + if (context) + { + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateImportMemoryZirconHandleANGLE(context, memoryPacked, size, + handleTypePacked, handle)); + if (isCallValid) + { + context->importMemoryZirconHandle(memoryPacked, size, handleTypePacked, handle); + } + ANGLE_CAPTURE(ImportMemoryZirconHandleANGLE, isCallValid, context, memoryPacked, size, + handleTypePacked, handle); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_multi_draw +void GL_APIENTRY GL_MultiDrawArraysANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + GLsizei drawcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiDrawArraysANGLE, + "context = %d, mode = %s, firsts = 0x%016" PRIxPTR ", counts = 0x%016" PRIxPTR + ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)firsts, + (uintptr_t)counts, drawcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMultiDrawArraysANGLE(context, modePacked, firsts, counts, drawcount)); + if (isCallValid) + { + context->multiDrawArrays(modePacked, firsts, counts, drawcount); + } + ANGLE_CAPTURE(MultiDrawArraysANGLE, isCallValid, context, modePacked, firsts, counts, + drawcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultiDrawArraysInstancedANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiDrawArraysInstancedANGLE, + "context = %d, mode = %s, firsts = 0x%016" PRIxPTR ", counts = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)firsts, + (uintptr_t)counts, (uintptr_t)instanceCounts, drawcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMultiDrawArraysInstancedANGLE( + context, modePacked, firsts, counts, instanceCounts, drawcount)); + if (isCallValid) + { + context->multiDrawArraysInstanced(modePacked, firsts, counts, instanceCounts, + drawcount); + } + ANGLE_CAPTURE(MultiDrawArraysInstancedANGLE, isCallValid, context, modePacked, firsts, + counts, instanceCounts, drawcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultiDrawElementsANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + GLsizei drawcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiDrawElementsANGLE, + "context = %d, mode = %s, counts = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)counts, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, drawcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMultiDrawElementsANGLE(context, modePacked, counts, typePacked, + indices, drawcount)); + if (isCallValid) + { + context->multiDrawElements(modePacked, counts, typePacked, indices, drawcount); + } + ANGLE_CAPTURE(MultiDrawElementsANGLE, isCallValid, context, modePacked, counts, typePacked, + indices, drawcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultiDrawElementsInstancedANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiDrawElementsInstancedANGLE, + "context = %d, mode = %s, counts = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)counts, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, + (uintptr_t)instanceCounts, drawcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMultiDrawElementsInstancedANGLE(context, modePacked, counts, typePacked, + indices, instanceCounts, drawcount)); + if (isCallValid) + { + context->multiDrawElementsInstanced(modePacked, counts, typePacked, indices, + instanceCounts, drawcount); + } + ANGLE_CAPTURE(MultiDrawElementsInstancedANGLE, isCallValid, context, modePacked, counts, + typePacked, indices, instanceCounts, drawcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_program_binary + +// GL_ANGLE_provoking_vertex +void GL_APIENTRY GL_ProvokingVertexANGLE(GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProvokingVertexANGLE, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::VertexProvokingMode, mode)); + + if (context) + { + ProvokingVertexConvention modePacked = PackParam<ProvokingVertexConvention>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateProvokingVertexANGLE(context, modePacked)); + if (isCallValid) + { + context->provokingVertex(modePacked); + } + ANGLE_CAPTURE(ProvokingVertexANGLE, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_request_extension +void GL_APIENTRY GL_RequestExtensionANGLE(const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRequestExtensionANGLE, "context = %d, name = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)name); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateRequestExtensionANGLE(context, name)); + if (isCallValid) + { + context->requestExtension(name); + } + ANGLE_CAPTURE(RequestExtensionANGLE, isCallValid, context, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DisableExtensionANGLE(const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDisableExtensionANGLE, "context = %d, name = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)name); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableExtensionANGLE(context, name)); + if (isCallValid) + { + context->disableExtension(name); + } + ANGLE_CAPTURE(DisableExtensionANGLE, isCallValid, context, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_robust_client_memory +void GL_APIENTRY GL_GetBooleanvRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLboolean *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBooleanvRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetBooleanvRobustANGLE(context, pname, bufSize, length, params)); + if (isCallValid) + { + context->getBooleanvRobust(pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBooleanvRobustANGLE, isCallValid, context, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBufferParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameterivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getBufferParameterivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBufferParameterivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFloatvRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFloatvRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFloatvRobustANGLE(context, pname, bufSize, length, params)); + if (isCallValid) + { + context->getFloatvRobust(pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetFloatvRobustANGLE, isCallValid, context, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFramebufferAttachmentParameterivRobustANGLE(GLenum target, + GLenum attachment, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFramebufferAttachmentParameterivRobustANGLE, + "context = %d, target = %s, attachment = %s, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, attachment), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFramebufferAttachmentParameterivRobustANGLE( + context, target, attachment, pname, bufSize, length, params)); + if (isCallValid) + { + context->getFramebufferAttachmentParameterivRobust(target, attachment, pname, bufSize, + length, params); + } + ANGLE_CAPTURE(GetFramebufferAttachmentParameterivRobustANGLE, isCallValid, context, target, + attachment, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetIntegervRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetIntegervRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetIntegervRobustANGLE(context, pname, bufSize, length, data)); + if (isCallValid) + { + context->getIntegervRobust(pname, bufSize, length, data); + } + ANGLE_CAPTURE(GetIntegervRobustANGLE, isCallValid, context, pname, bufSize, length, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramivRobustANGLE(GLuint program, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetProgramivRobustANGLE, + "context = %d, program = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramivRobustANGLE(context, programPacked, pname, bufSize, + length, params)); + if (isCallValid) + { + context->getProgramivRobust(programPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetProgramivRobustANGLE, isCallValid, context, programPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetRenderbufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetRenderbufferParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetRenderbufferParameterivRobustANGLE( + context, target, pname, bufSize, length, params)); + if (isCallValid) + { + context->getRenderbufferParameterivRobust(target, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetRenderbufferParameterivRobustANGLE, isCallValid, context, target, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetShaderivRobustANGLE(GLuint shader, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetShaderivRobustANGLE, + "context = %d, shader = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), shader, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetShaderivRobustANGLE(context, shaderPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getShaderivRobust(shaderPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetShaderivRobustANGLE, isCallValid, context, shaderPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetTexParameterfvRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterfvRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterfvRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterfvRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterfvRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetUniformfvRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformfvRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformfvRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getUniformfvRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetUniformfvRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetUniformivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformivRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getUniformivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetUniformivRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribfvRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribfvRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetVertexAttribfvRobustANGLE(context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribfvRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribfvRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribivRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetVertexAttribivRobustANGLE(context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribivRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribivRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribPointervRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribPointervRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", pointer = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)pointer); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribPointervRobustANGLE( + context, index, pname, bufSize, length, pointer)); + if (isCallValid) + { + context->getVertexAttribPointervRobust(index, pname, bufSize, length, pointer); + } + ANGLE_CAPTURE(GetVertexAttribPointervRobustANGLE, isCallValid, context, index, pname, + bufSize, length, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ReadPixelsRobustANGLE(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLReadPixelsRobustANGLE, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, length = 0x%016" PRIxPTR ", columns = 0x%016" PRIxPTR ", rows = 0x%016" PRIxPTR + ", pixels = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)length, + (uintptr_t)columns, (uintptr_t)rows, (uintptr_t)pixels); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadPixelsRobustANGLE(context, x, y, width, height, format, type, bufSize, + length, columns, rows, pixels)); + if (isCallValid) + { + context->readPixelsRobust(x, y, width, height, format, type, bufSize, length, columns, + rows, pixels); + } + ANGLE_CAPTURE(ReadPixelsRobustANGLE, isCallValid, context, x, y, width, height, format, + type, bufSize, length, columns, rows, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexImage2DRobustANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexImage2DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "border = %d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, internalformat, + width, height, border, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage2DRobustANGLE(context, targetPacked, level, internalformat, width, + height, border, format, type, bufSize, pixels)); + if (isCallValid) + { + context->texImage2DRobust(targetPacked, level, internalformat, width, height, border, + format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexImage2DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, border, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterfvRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterfvRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterfvRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterfvRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterfvRobustANGLE, isCallValid, context, targetPacked, pname, bufSize, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterivRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterivRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterivRobustANGLE, isCallValid, context, targetPacked, pname, bufSize, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexSubImage2DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexSubImage2DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexSubImage2DRobustANGLE(context, targetPacked, level, xoffset, yoffset, width, + height, format, type, bufSize, pixels)); + if (isCallValid) + { + context->texSubImage2DRobust(targetPacked, level, xoffset, yoffset, width, height, + format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexSubImage2DRobustANGLE, isCallValid, context, targetPacked, level, xoffset, + yoffset, width, height, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexImage3DRobustANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexImage3DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "depth = %d, border = %d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR + "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, internalformat, + width, height, depth, border, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage3DRobustANGLE(context, targetPacked, level, internalformat, width, + height, depth, border, format, type, bufSize, pixels)); + if (isCallValid) + { + context->texImage3DRobust(targetPacked, level, internalformat, width, height, depth, + border, format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexImage3DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexSubImage3DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT( + context, GLTexSubImage3DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width = " + "%d, height = %d, depth = %d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR + "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexSubImage3DRobustANGLE(context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, + format, type, bufSize, pixels)); + if (isCallValid) + { + context->texSubImage3DRobust(targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexSubImage3DRobustANGLE, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexImage2DRobustANGLE(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexImage2DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "border = %d, imageSize = %d, dataSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, internalformat), width, height, border, + imageSize, dataSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompressedTexImage2DRobustANGLE( + context, targetPacked, level, internalformat, width, + height, border, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexImage2DRobust(targetPacked, level, internalformat, width, height, + border, imageSize, dataSize, data); + } + ANGLE_CAPTURE(CompressedTexImage2DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, border, imageSize, dataSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage2DRobustANGLE(GLenum target, + GLint level, + GLsizei xoffset, + GLsizei yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexSubImage2DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, imageSize = %d, dataSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::DefaultGroup, format), imageSize, dataSize, + (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompressedTexSubImage2DRobustANGLE( + context, targetPacked, level, xoffset, yoffset, width, + height, format, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexSubImage2DRobust(targetPacked, level, xoffset, yoffset, width, + height, format, imageSize, dataSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage2DRobustANGLE, isCallValid, context, targetPacked, level, + xoffset, yoffset, width, height, format, imageSize, dataSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexImage3DRobustANGLE(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexImage3DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, imageSize = %d, dataSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, internalformat), width, height, depth, border, + imageSize, dataSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompressedTexImage3DRobustANGLE( + context, targetPacked, level, internalformat, width, + height, depth, border, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexImage3DRobust(targetPacked, level, internalformat, width, height, + depth, border, imageSize, dataSize, data); + } + ANGLE_CAPTURE(CompressedTexImage3DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, imageSize, dataSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage3DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexSubImage3DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, imageSize = %d, dataSize = %d, data = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::DefaultGroup, format), + imageSize, dataSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCompressedTexSubImage3DRobustANGLE( + context, targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexSubImage3DRobust(targetPacked, level, xoffset, yoffset, zoffset, + width, height, depth, format, imageSize, + dataSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage3DRobustANGLE, isCallValid, context, targetPacked, level, + xoffset, yoffset, zoffset, width, height, depth, format, imageSize, dataSize, + data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetQueryivRobustANGLE(context, targetPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryivRobustANGLE, isCallValid, context, targetPacked, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryObjectuivRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryObjectuivRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjectuivRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjectuivRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjectuivRobustANGLE, isCallValid, context, idPacked, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBufferPointervRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBufferPointervRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferPointervRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getBufferPointervRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBufferPointervRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetIntegeri_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetIntegeri_vRobustANGLE, + "context = %d, target = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), index, bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetIntegeri_vRobustANGLE(context, target, index, bufSize, length, data)); + if (isCallValid) + { + context->getIntegeri_vRobust(target, index, bufSize, length, data); + } + ANGLE_CAPTURE(GetIntegeri_vRobustANGLE, isCallValid, context, target, index, bufSize, + length, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetInternalformativRobustANGLE(GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetInternalformativRobustANGLE, + "context = %d, target = %s, internalformat = %s, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, internalformat), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetInternalformativRobustANGLE(context, target, internalformat, + pname, bufSize, length, params)); + if (isCallValid) + { + context->getInternalformativRobust(target, internalformat, pname, bufSize, length, + params); + } + ANGLE_CAPTURE(GetInternalformativRobustANGLE, isCallValid, context, target, internalformat, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribIivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribIivRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetVertexAttribIivRobustANGLE(context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribIivRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribIivRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetVertexAttribIuivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetVertexAttribIuivRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribIuivRobustANGLE( + context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribIuivRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribIuivRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetUniformuivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUniformuivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformuivRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getUniformuivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetUniformuivRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetActiveUniformBlockivRobustANGLE(GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetActiveUniformBlockivRobustANGLE, + "context = %d, program = %u, uniformBlockIndex = %u, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), program, uniformBlockIndex, + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetActiveUniformBlockivRobustANGLE( + context, programPacked, uniformBlockIndexPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getActiveUniformBlockivRobust(programPacked, uniformBlockIndexPacked, pname, + bufSize, length, params); + } + ANGLE_CAPTURE(GetActiveUniformBlockivRobustANGLE, isCallValid, context, programPacked, + uniformBlockIndexPacked, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetInteger64vRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetInteger64vRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetInteger64vRobustANGLE(context, pname, bufSize, length, data)); + if (isCallValid) + { + context->getInteger64vRobust(pname, bufSize, length, data); + } + ANGLE_CAPTURE(GetInteger64vRobustANGLE, isCallValid, context, pname, bufSize, length, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetInteger64i_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetInteger64i_vRobustANGLE, + "context = %d, target = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), index, bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetInteger64i_vRobustANGLE(context, target, index, bufSize, length, data)); + if (isCallValid) + { + context->getInteger64i_vRobust(target, index, bufSize, length, data); + } + ANGLE_CAPTURE(GetInteger64i_vRobustANGLE, isCallValid, context, target, index, bufSize, + length, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBufferParameteri64vRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBufferParameteri64vRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameteri64vRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getBufferParameteri64vRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBufferParameteri64vRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterivRobustANGLE(GLuint sampler, + GLuint pname, + GLsizei bufSize, + const GLint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterivRobustANGLE, + "context = %d, sampler = %u, pname = %u, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, pname, bufSize, (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSamplerParameterivRobustANGLE(context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterivRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterfvRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLfloat *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterfvRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSamplerParameterfvRobustANGLE(context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterfvRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterfvRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterivRobustANGLE(context, samplerPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterivRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterfvRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterfvRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterfvRobustANGLE(context, samplerPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterfvRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterfvRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFramebufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFramebufferParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetFramebufferParameterivRobustANGLE( + context, target, pname, bufSize, length, params)); + if (isCallValid) + { + context->getFramebufferParameterivRobust(target, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetFramebufferParameterivRobustANGLE, isCallValid, context, target, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramInterfaceivRobustANGLE(GLuint program, + GLenum programInterface, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramInterfaceivRobustANGLE, + "context = %d, program = %u, programInterface = %s, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, programInterface), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramInterfaceivRobustANGLE(context, programPacked, programInterface, + pname, bufSize, length, params)); + if (isCallValid) + { + context->getProgramInterfaceivRobust(programPacked, programInterface, pname, bufSize, + length, params); + } + ANGLE_CAPTURE(GetProgramInterfaceivRobustANGLE, isCallValid, context, programPacked, + programInterface, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetBooleani_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLboolean *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBooleani_vRobustANGLE, + "context = %d, target = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), index, bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetBooleani_vRobustANGLE(context, target, index, bufSize, length, data)); + if (isCallValid) + { + context->getBooleani_vRobust(target, index, bufSize, length, data); + } + ANGLE_CAPTURE(GetBooleani_vRobustANGLE, isCallValid, context, target, index, bufSize, + length, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetMultisamplefvRobustANGLE(GLenum pname, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLfloat *val) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetMultisamplefvRobustANGLE, + "context = %d, pname = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", val = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), index, bufSize, + (uintptr_t)length, (uintptr_t)val); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetMultisamplefvRobustANGLE(context, pname, index, bufSize, length, val)); + if (isCallValid) + { + context->getMultisamplefvRobust(pname, index, bufSize, length, val); + } + ANGLE_CAPTURE(GetMultisamplefvRobustANGLE, isCallValid, context, pname, index, bufSize, + length, val); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterivRobustANGLE(GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexLevelParameterivRobustANGLE, + "context = %d, target = %s, level = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexLevelParameterivRobustANGLE( + context, targetPacked, level, pname, bufSize, length, params)); + if (isCallValid) + { + context->getTexLevelParameterivRobust(targetPacked, level, pname, bufSize, length, + params); + } + ANGLE_CAPTURE(GetTexLevelParameterivRobustANGLE, isCallValid, context, targetPacked, level, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterfvRobustANGLE(GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexLevelParameterfvRobustANGLE, + "context = %d, target = %s, level = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexLevelParameterfvRobustANGLE( + context, targetPacked, level, pname, bufSize, length, params)); + if (isCallValid) + { + context->getTexLevelParameterfvRobust(targetPacked, level, pname, bufSize, length, + params); + } + ANGLE_CAPTURE(GetTexLevelParameterfvRobustANGLE, isCallValid, context, targetPacked, level, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetPointervRobustANGLERobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetPointervRobustANGLERobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetPointervRobustANGLERobustANGLE(context, pname, bufSize, length, params)); + if (isCallValid) + { + context->getPointervRobustANGLERobust(pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetPointervRobustANGLERobustANGLE, isCallValid, context, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ReadnPixelsRobustANGLE(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLReadnPixelsRobustANGLE, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, length = 0x%016" PRIxPTR ", columns = 0x%016" PRIxPTR ", rows = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)length, + (uintptr_t)columns, (uintptr_t)rows, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadnPixelsRobustANGLE(context, x, y, width, height, format, type, bufSize, + length, columns, rows, data)); + if (isCallValid) + { + context->readnPixelsRobust(x, y, width, height, format, type, bufSize, length, columns, + rows, data); + } + ANGLE_CAPTURE(ReadnPixelsRobustANGLE, isCallValid, context, x, y, width, height, format, + type, bufSize, length, columns, rows, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetnUniformfvRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformfvRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetnUniformfvRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getnUniformfvRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetnUniformfvRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetnUniformivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetnUniformivRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getnUniformivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetnUniformivRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetnUniformuivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformuivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetnUniformuivRobustANGLE( + context, programPacked, locationPacked, bufSize, length, params)); + if (isCallValid) + { + context->getnUniformuivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetnUniformuivRobustANGLE, isCallValid, context, programPacked, + locationPacked, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterIivRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterIivRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterIivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIuivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIuivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterIuivRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterIuivRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterIuivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterIivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterIivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIuivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIuivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterIuivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterIuivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSamplerParameterIivRobustANGLE(context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterIivRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterIivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIuivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLuint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIuivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSamplerParameterIuivRobustANGLE( + context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterIuivRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterIuivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIivRobustANGLE(context, samplerPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterIivRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterIivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIuivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIuivRobustANGLE( + context, samplerPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterIuivRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuivRobustANGLE, isCallValid, context, samplerPacked, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryObjectivRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetQueryObjectivRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjectivRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjectivRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjectivRobustANGLE, isCallValid, context, idPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjecti64vRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetQueryObjecti64vRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjecti64vRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjecti64vRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjecti64vRobustANGLE, isCallValid, context, idPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjectui64vRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint64 *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryObjectui64vRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjectui64vRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjectui64vRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjectui64vRobustANGLE, isCallValid, context, idPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_semaphore_fuchsia +void GL_APIENTRY GL_ImportSemaphoreZirconHandleANGLE(GLuint semaphore, + GLenum handleType, + GLuint handle) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLImportSemaphoreZirconHandleANGLE, + "context = %d, semaphore = %u, handleType = %s, handle = %u", CID(context), semaphore, + GLenumToString(GLenumGroup::ExternalHandleType, handleType), handle); + + if (context) + { + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateImportSemaphoreZirconHandleANGLE( + context, semaphorePacked, handleTypePacked, handle)); + if (isCallValid) + { + context->importSemaphoreZirconHandle(semaphorePacked, handleTypePacked, handle); + } + ANGLE_CAPTURE(ImportSemaphoreZirconHandleANGLE, isCallValid, context, semaphorePacked, + handleTypePacked, handle); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_texture_external_update +void GL_APIENTRY GL_TexImage2DExternalANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexImage2DExternalANGLE, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "border = %d, format = %s, type = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, internalformat, + width, height, border, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type)); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage2DExternalANGLE(context, targetPacked, level, internalformat, width, + height, border, format, type)); + if (isCallValid) + { + context->texImage2DExternal(targetPacked, level, internalformat, width, height, border, + format, type); + } + ANGLE_CAPTURE(TexImage2DExternalANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, border, format, type); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_InvalidateTextureANGLE(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLInvalidateTextureANGLE, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateInvalidateTextureANGLE(context, targetPacked)); + if (isCallValid) + { + context->invalidateTexture(targetPacked); + } + ANGLE_CAPTURE(InvalidateTextureANGLE, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_ANGLE_texture_multisample +void GL_APIENTRY GL_TexStorage2DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage2DMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalformat), width, height, + GLbooleanToString(fixedsamplelocations)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2DMultisampleANGLE(context, targetPacked, samples, internalformat, + width, height, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height, + fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage2DMultisampleANGLE, isCallValid, context, targetPacked, samples, + internalformat, width, height, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetMultisamplefvANGLE(GLenum pname, GLuint index, GLfloat *val) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetMultisamplefvANGLE, + "context = %d, pname = %s, index = %u, val = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), index, (uintptr_t)val); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetMultisamplefvANGLE(context, pname, index, val)); + if (isCallValid) + { + context->getMultisamplefv(pname, index, val); + } + ANGLE_CAPTURE(GetMultisamplefvANGLE, isCallValid, context, pname, index, val); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SampleMaskiANGLE(GLuint maskNumber, GLbitfield mask) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSampleMaskiANGLE, "context = %d, maskNumber = %u, mask = %s", CID(context), + maskNumber, GLbitfieldToString(GLenumGroup::DefaultGroup, mask).c_str()); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleMaskiANGLE(context, maskNumber, mask)); + if (isCallValid) + { + context->sampleMaski(maskNumber, mask); + } + ANGLE_CAPTURE(SampleMaskiANGLE, isCallValid, context, maskNumber, mask); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GetTexLevelParameterfvANGLE is already defined. + +// GetTexLevelParameterivANGLE is already defined. + +// GL_ANGLE_translated_shader_source +void GL_APIENTRY GL_GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei *length, + GLchar *source) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTranslatedShaderSourceANGLE, + "context = %d, shader = %u, bufsize = %d, length = 0x%016" PRIxPTR + ", source = 0x%016" PRIxPTR "", + CID(context), shader, bufsize, (uintptr_t)length, (uintptr_t)source); + + if (context) + { + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTranslatedShaderSourceANGLE( + context, shaderPacked, bufsize, length, source)); + if (isCallValid) + { + context->getTranslatedShaderSource(shaderPacked, bufsize, length, source); + } + ANGLE_CAPTURE(GetTranslatedShaderSourceANGLE, isCallValid, context, shaderPacked, bufsize, + length, source); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_CHROMIUM_bind_uniform_location +void GL_APIENTRY GL_BindUniformLocationCHROMIUM(GLuint program, GLint location, const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindUniformLocationCHROMIUM, + "context = %d, program = %u, location = %d, name = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBindUniformLocationCHROMIUM(context, programPacked, locationPacked, name)); + if (isCallValid) + { + context->bindUniformLocation(programPacked, locationPacked, name); + } + ANGLE_CAPTURE(BindUniformLocationCHROMIUM, isCallValid, context, programPacked, + locationPacked, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_CHROMIUM_copy_compressed_texture +void GL_APIENTRY GL_CompressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedCopyTextureCHROMIUM, "context = %d, sourceId = %u, destId = %u", + CID(context), sourceId, destId); + + if (context) + { + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedCopyTextureCHROMIUM(context, sourceIdPacked, destIdPacked)); + if (isCallValid) + { + context->compressedCopyTexture(sourceIdPacked, destIdPacked); + } + ANGLE_CAPTURE(CompressedCopyTextureCHROMIUM, isCallValid, context, sourceIdPacked, + destIdPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_CHROMIUM_copy_texture +void GL_APIENTRY GL_CopyTextureCHROMIUM(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyTextureCHROMIUM, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, internalFormat = %d, destType = %s, unpackFlipY = %s, unpackPremultiplyAlpha = " + "%s, unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, internalFormat, + GLenumToString(GLenumGroup::DefaultGroup, destType), GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context) + { + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTextureCHROMIUM( + context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copyTexture(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopyTextureCHROMIUM, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, internalFormat, destType, + unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopySubTextureCHROMIUM(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLint width, + GLint height, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopySubTextureCHROMIUM, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, xoffset = %d, yoffset = %d, x = %d, y = %d, width = %d, height = %d, unpackFlipY " + "= %s, unpackPremultiplyAlpha = %s, unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, xoffset, + yoffset, x, y, width, height, GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context) + { + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopySubTextureCHROMIUM( + context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, xoffset, yoffset, x, y, width, height, + unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copySubTexture(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, xoffset, yoffset, x, y, width, height, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopySubTextureCHROMIUM, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, xoffset, yoffset, x, y, width, + height, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_CHROMIUM_framebuffer_mixed_samples +void GL_APIENTRY GL_CoverageModulationCHROMIUM(GLenum components) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCoverageModulationCHROMIUM, "context = %d, components = %s", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, components)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCoverageModulationCHROMIUM(context, components)); + if (isCallValid) + { + context->coverageModulation(components); + } + ANGLE_CAPTURE(CoverageModulationCHROMIUM, isCallValid, context, components); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_CHROMIUM_lose_context +void GL_APIENTRY GL_LoseContextCHROMIUM(GLenum current, GLenum other) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLoseContextCHROMIUM, "context = %d, current = %s, other = %s", CID(context), + GLenumToString(GLenumGroup::GraphicsResetStatus, current), + GLenumToString(GLenumGroup::GraphicsResetStatus, other)); + + if (context) + { + GraphicsResetStatus currentPacked = PackParam<GraphicsResetStatus>(current); + GraphicsResetStatus otherPacked = PackParam<GraphicsResetStatus>(other); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateLoseContextCHROMIUM(context, currentPacked, otherPacked)); + if (isCallValid) + { + context->loseContext(currentPacked, otherPacked); + } + ANGLE_CAPTURE(LoseContextCHROMIUM, isCallValid, context, currentPacked, otherPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_EGL_image_array + +// GL_EXT_YUV_target + +// GL_EXT_blend_func_extended +void GL_APIENTRY GL_BindFragDataLocationEXT(GLuint program, GLuint color, const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindFragDataLocationEXT, + "context = %d, program = %u, color = %u, name = 0x%016" PRIxPTR "", CID(context), program, + color, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindFragDataLocationEXT(context, programPacked, color, name)); + if (isCallValid) + { + context->bindFragDataLocation(programPacked, color, name); + } + ANGLE_CAPTURE(BindFragDataLocationEXT, isCallValid, context, programPacked, color, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindFragDataLocationIndexedEXT(GLuint program, + GLuint colorNumber, + GLuint index, + const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindFragDataLocationIndexedEXT, + "context = %d, program = %u, colorNumber = %u, index = %u, name = 0x%016" PRIxPTR "", + CID(context), program, colorNumber, index, (uintptr_t)name); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindFragDataLocationIndexedEXT( + context, programPacked, colorNumber, index, name)); + if (isCallValid) + { + context->bindFragDataLocationIndexed(programPacked, colorNumber, index, name); + } + ANGLE_CAPTURE(BindFragDataLocationIndexedEXT, isCallValid, context, programPacked, + colorNumber, index, name); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLint GL_APIENTRY GL_GetFragDataIndexEXT(GLuint program, const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFragDataIndexEXT, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFragDataIndexEXT(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getFragDataIndex(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataIndexEXT, GLint>(); + } + ANGLE_CAPTURE(GetFragDataIndexEXT, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataIndexEXT, GLint>(); + } + return returnValue; +} + +GLint GL_APIENTRY GL_GetProgramResourceLocationIndexEXT(GLuint program, + GLenum programInterface, + const GLchar *name) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramResourceLocationIndexEXT, + "context = %d, program = %u, programInterface = %s, name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + (uintptr_t)name); + + GLint returnValue; + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetProgramResourceLocationIndexEXT( + context, programPacked, programInterface, name)); + if (isCallValid) + { + returnValue = + context->getProgramResourceLocationIndex(programPacked, programInterface, name); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocationIndexEXT, + GLint>(); + } + ANGLE_CAPTURE(GetProgramResourceLocationIndexEXT, isCallValid, context, programPacked, + programInterface, name, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocationIndexEXT, GLint>(); + } + return returnValue; +} + +// GL_EXT_buffer_storage +void GL_APIENTRY GL_BufferStorageEXT(GLenum target, + GLsizeiptr size, + const void *data, + GLbitfield flags) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBufferStorageEXT, + "context = %d, target = %s, size = %llu, data = 0x%016" PRIxPTR ", flags = %s", + CID(context), GLenumToString(GLenumGroup::BufferStorageTarget, target), + static_cast<unsigned long long>(size), (uintptr_t)data, + GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str()); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferStorageEXT(context, targetPacked, size, data, flags)); + if (isCallValid) + { + context->bufferStorage(targetPacked, size, data, flags); + } + ANGLE_CAPTURE(BufferStorageEXT, isCallValid, context, targetPacked, size, data, flags); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_clip_control +void GL_APIENTRY GL_ClipControlEXT(GLenum origin, GLenum depth) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLClipControlEXT, "context = %d, origin = %s, depth = %s", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, origin), + GLenumToString(GLenumGroup::DefaultGroup, depth)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClipControlEXT(context, origin, depth)); + if (isCallValid) + { + context->clipControl(origin, depth); + } + ANGLE_CAPTURE(ClipControlEXT, isCallValid, context, origin, depth); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_copy_image +void GL_APIENTRY GL_CopyImageSubDataEXT(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyImageSubDataEXT, + "context = %d, srcName = %u, srcTarget = %s, srcLevel = %d, srcX = %d, srcY = %d, srcZ = " + "%d, dstName = %u, dstTarget = %s, dstLevel = %d, dstX = %d, dstY = %d, dstZ = %d, " + "srcWidth = %d, srcHeight = %d, srcDepth = %d", + CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget), + srcLevel, srcX, srcY, srcZ, dstName, + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY, + dstZ, srcWidth, srcHeight, srcDepth); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCopyImageSubDataEXT(context, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, + dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth)); + if (isCallValid) + { + context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); + } + ANGLE_CAPTURE(CopyImageSubDataEXT, isCallValid, context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_debug_label +void GL_APIENTRY +GL_GetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetObjectLabelEXT, + "context = %d, type = %s, object = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, type), object, bufSize, + (uintptr_t)length, (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetObjectLabelEXT(context, type, object, bufSize, length, label)); + if (isCallValid) + { + context->getObjectLabel(type, object, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectLabelEXT, isCallValid, context, type, object, bufSize, length, + label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLabelObjectEXT, + "context = %d, type = %s, object = %u, length = %d, label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, type), object, length, + (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateLabelObjectEXT(context, type, object, length, label)); + if (isCallValid) + { + context->labelObject(type, object, length, label); + } + ANGLE_CAPTURE(LabelObjectEXT, isCallValid, context, type, object, length, label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_debug_marker +void GL_APIENTRY GL_InsertEventMarkerEXT(GLsizei length, const GLchar *marker) +{ + Context *context = GetValidGlobalContext(); + // Don't run the EVENT() macro on the EXT_debug_marker entry points. + // It can interfere with the debug events being set by the caller. + // EVENT(context, GLInsertEventMarkerEXT, "context = %d, length = %d, marker = 0x%016" PRIxPTR + // "", CID(context), length, (uintptr_t)marker); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateInsertEventMarkerEXT(context, length, marker)); + if (isCallValid) + { + context->insertEventMarker(length, marker); + } + ANGLE_CAPTURE(InsertEventMarkerEXT, isCallValid, context, length, marker); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PopGroupMarkerEXT() +{ + Context *context = GetValidGlobalContext(); + // Don't run the EVENT() macro on the EXT_debug_marker entry points. + // It can interfere with the debug events being set by the caller. + // EVENT(context, GLPopGroupMarkerEXT, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopGroupMarkerEXT(context)); + if (isCallValid) + { + context->popGroupMarker(); + } + ANGLE_CAPTURE(PopGroupMarkerEXT, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PushGroupMarkerEXT(GLsizei length, const GLchar *marker) +{ + Context *context = GetValidGlobalContext(); + // Don't run the EVENT() macro on the EXT_debug_marker entry points. + // It can interfere with the debug events being set by the caller. + // EVENT(context, GLPushGroupMarkerEXT, "context = %d, length = %d, marker = 0x%016" PRIxPTR "", + // CID(context), length, (uintptr_t)marker); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePushGroupMarkerEXT(context, length, marker)); + if (isCallValid) + { + context->pushGroupMarker(length, marker); + } + ANGLE_CAPTURE(PushGroupMarkerEXT, isCallValid, context, length, marker); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_discard_framebuffer +void GL_APIENTRY GL_DiscardFramebufferEXT(GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDiscardFramebufferEXT, + "context = %d, target = %s, numAttachments = %d, attachments = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), numAttachments, + (uintptr_t)attachments); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDiscardFramebufferEXT(context, target, numAttachments, attachments)); + if (isCallValid) + { + context->discardFramebuffer(target, numAttachments, attachments); + } + ANGLE_CAPTURE(DiscardFramebufferEXT, isCallValid, context, target, numAttachments, + attachments); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_disjoint_timer_query +void GL_APIENTRY GL_BeginQueryEXT(GLenum target, GLuint id) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBeginQueryEXT, "context = %d, target = %s, id = %u", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), id); + + if (context) + { + QueryType targetPacked = PackParam<QueryType>(target); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBeginQueryEXT(context, targetPacked, idPacked)); + if (isCallValid) + { + context->beginQuery(targetPacked, idPacked); + } + ANGLE_CAPTURE(BeginQueryEXT, isCallValid, context, targetPacked, idPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteQueriesEXT(GLsizei n, const GLuint *ids) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteQueriesEXT, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)ids); + + if (context) + { + const QueryID *idsPacked = PackParam<const QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteQueriesEXT(context, n, idsPacked)); + if (isCallValid) + { + context->deleteQueries(n, idsPacked); + } + ANGLE_CAPTURE(DeleteQueriesEXT, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EndQueryEXT(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEndQueryEXT, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target)); + + if (context) + { + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEndQueryEXT(context, targetPacked)); + if (isCallValid) + { + context->endQuery(targetPacked); + } + ANGLE_CAPTURE(EndQueryEXT, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenQueriesEXT(GLsizei n, GLuint *ids) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenQueriesEXT, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)ids); + + if (context) + { + QueryID *idsPacked = PackParam<QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenQueriesEXT(context, n, idsPacked)); + if (isCallValid) + { + context->genQueries(n, idsPacked); + } + ANGLE_CAPTURE(GenQueriesEXT, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetInteger64vEXT(GLenum pname, GLint64 *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetInteger64vEXT, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetInteger64vEXT(context, pname, data)); + if (isCallValid) + { + context->getInteger64v(pname, data); + } + ANGLE_CAPTURE(GetInteger64vEXT, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetQueryObjecti64vEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjecti64vEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjecti64v(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjecti64vEXT, isCallValid, context, idPacked, pname, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params) +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetQueryObjectivEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectivEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectiv(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectivEXT, isCallValid, context, idPacked, pname, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryObjectui64vEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectui64vEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectui64v(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectui64vEXT, isCallValid, context, idPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryObjectuivEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectuivEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectuiv(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectuivEXT, isCallValid, context, idPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetQueryivEXT(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetQueryivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), + GLenumToString(GLenumGroup::QueryParameterName, pname), (uintptr_t)params); + + if (context) + { + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getQueryiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsQueryEXT(GLuint id) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsQueryEXT, "context = %d, id = %u", CID(context), id); + + GLboolean returnValue; + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsQueryEXT(context, idPacked)); + if (isCallValid) + { + returnValue = context->isQuery(idPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQueryEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsQueryEXT, isCallValid, context, idPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQueryEXT, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_QueryCounterEXT(GLuint id, GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLQueryCounterEXT, "context = %d, id = %u, target = %s", CID(context), id, + GLenumToString(GLenumGroup::QueryTarget, target)); + + if (context) + { + QueryID idPacked = PackParam<QueryID>(id); + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateQueryCounterEXT(context, idPacked, targetPacked)); + if (isCallValid) + { + context->queryCounter(idPacked, targetPacked); + } + ANGLE_CAPTURE(QueryCounterEXT, isCallValid, context, idPacked, targetPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_draw_buffers +void GL_APIENTRY GL_DrawBuffersEXT(GLsizei n, const GLenum *bufs) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawBuffersEXT, "context = %d, n = %d, bufs = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)bufs); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawBuffersEXT(context, n, bufs)); + if (isCallValid) + { + context->drawBuffers(n, bufs); + } + ANGLE_CAPTURE(DrawBuffersEXT, isCallValid, context, n, bufs); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_draw_buffers_indexed +void GL_APIENTRY GL_BlendEquationSeparateiEXT(GLuint buf, GLenum modeRGB, GLenum modeAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquationSeparateiEXT, + "context = %d, buf = %u, modeRGB = %s, modeAlpha = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparateiEXT(context, buf, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparatei(buf, modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparateiEXT, isCallValid, context, buf, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendEquationiEXT(GLuint buf, GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquationiEXT, "context = %d, buf = %u, mode = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendEquationiEXT(context, buf, mode)); + if (isCallValid) + { + context->blendEquationi(buf, mode); + } + ANGLE_CAPTURE(BlendEquationiEXT, isCallValid, context, buf, mode); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_BlendFuncSeparateiEXT(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFuncSeparateiEXT, + "context = %d, buf = %u, srcRGB = %s, dstRGB = %s, srcAlpha = %s, dstAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendingFactor, srcRGB), + GLenumToString(GLenumGroup::BlendingFactor, dstRGB), + GLenumToString(GLenumGroup::BlendingFactor, srcAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dstAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBlendFuncSeparateiEXT(context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha)); + if (isCallValid) + { + context->blendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparateiEXT, isCallValid, context, buf, srcRGB, dstRGB, srcAlpha, + dstAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendFunciEXT(GLuint buf, GLenum src, GLenum dst) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFunciEXT, "context = %d, buf = %u, src = %s, dst = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendingFactor, src), + GLenumToString(GLenumGroup::BlendingFactor, dst)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunciEXT(context, buf, src, dst)); + if (isCallValid) + { + context->blendFunci(buf, src, dst); + } + ANGLE_CAPTURE(BlendFunciEXT, isCallValid, context, buf, src, dst); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColorMaskiEXT, "context = %d, index = %u, r = %s, g = %s, b = %s, a = %s", + CID(context), index, GLbooleanToString(r), GLbooleanToString(g), GLbooleanToString(b), + GLbooleanToString(a)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMaskiEXT(context, index, r, g, b, a)); + if (isCallValid) + { + context->colorMaski(index, r, g, b, a); + } + ANGLE_CAPTURE(ColorMaskiEXT, isCallValid, context, index, r, g, b, a); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DisableiEXT(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDisableiEXT, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableiEXT(context, target, index)); + if (isCallValid) + { + context->disablei(target, index); + } + ANGLE_CAPTURE(DisableiEXT, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EnableiEXT(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEnableiEXT, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableiEXT(context, target, index)); + if (isCallValid) + { + context->enablei(target, index); + } + ANGLE_CAPTURE(EnableiEXT, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsEnablediEXT(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsEnablediEXT, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + GLboolean returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsEnablediEXT(context, target, index)); + if (isCallValid) + { + returnValue = context->isEnabledi(target, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsEnablediEXT, isCallValid, context, target, index, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediEXT, GLboolean>(); + } + return returnValue; +} + +// GL_EXT_draw_elements_base_vertex +void GL_APIENTRY GL_DrawElementsBaseVertexEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsBaseVertexEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsBaseVertexEXT(context, modePacked, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex); + } + ANGLE_CAPTURE(DrawElementsBaseVertexEXT, isCallValid, context, modePacked, count, + typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertexEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedBaseVertexEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount, + basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertexEXT( + context, modePacked, count, typePacked, + indices, instancecount, basevertex)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices, + instancecount, basevertex); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertexEXT, isCallValid, context, modePacked, count, + typePacked, indices, instancecount, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawRangeElementsBaseVertexEXT(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawRangeElementsBaseVertexEXT, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertexEXT( + context, modePacked, start, end, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices, + basevertex); + } + ANGLE_CAPTURE(DrawRangeElementsBaseVertexEXT, isCallValid, context, modePacked, start, end, + count, typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MultiDrawElementsBaseVertexEXT(GLenum mode, + const GLsizei *count, + GLenum type, + const void *const *indices, + GLsizei primcount, + const GLint *basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMultiDrawElementsBaseVertexEXT, + "context = %d, mode = %s, count = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", primcount = %d, basevertex = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, primcount, + (uintptr_t)basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMultiDrawElementsBaseVertexEXT( + context, modePacked, count, typePacked, + indices, primcount, basevertex)); + if (isCallValid) + { + context->multiDrawElementsBaseVertex(modePacked, count, typePacked, indices, primcount, + basevertex); + } + ANGLE_CAPTURE(MultiDrawElementsBaseVertexEXT, isCallValid, context, modePacked, count, + typePacked, indices, primcount, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_external_buffer +void GL_APIENTRY GL_BufferStorageExternalEXT(GLenum target, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBufferStorageExternalEXT, + "context = %d, target = %s, offset = %llu, size = %llu, clientBuffer = 0x%016" PRIxPTR + ", flags = %s", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size), + (uintptr_t)clientBuffer, + GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str()); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferStorageExternalEXT(context, targetPacked, offset, size, + clientBuffer, flags)); + if (isCallValid) + { + context->bufferStorageExternal(targetPacked, offset, size, clientBuffer, flags); + } + ANGLE_CAPTURE(BufferStorageExternalEXT, isCallValid, context, targetPacked, offset, size, + clientBuffer, flags); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_NamedBufferStorageExternalEXT(GLuint buffer, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLNamedBufferStorageExternalEXT, + "context = %d, buffer = %u, offset = %llu, size = %llu, clientBuffer = 0x%016" PRIxPTR + ", flags = %s", + CID(context), buffer, static_cast<unsigned long long>(offset), + static_cast<unsigned long long>(size), (uintptr_t)clientBuffer, + GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str()); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateNamedBufferStorageExternalEXT( + context, buffer, offset, size, clientBuffer, flags)); + if (isCallValid) + { + context->namedBufferStorageExternal(buffer, offset, size, clientBuffer, flags); + } + ANGLE_CAPTURE(NamedBufferStorageExternalEXT, isCallValid, context, buffer, offset, size, + clientBuffer, flags); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_geometry_shader +void GL_APIENTRY GL_FramebufferTextureEXT(GLenum target, + GLenum attachment, + GLuint texture, + GLint level) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTextureEXT, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level); + + if (context) + { + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTextureEXT(context, target, attachment, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture(target, attachment, texturePacked, level); + } + ANGLE_CAPTURE(FramebufferTextureEXT, isCallValid, context, target, attachment, + texturePacked, level); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_instanced_arrays +void GL_APIENTRY GL_DrawArraysInstancedEXT(GLenum mode, + GLint start, + GLsizei count, + GLsizei primcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawArraysInstancedEXT, + "context = %d, mode = %s, start = %d, count = %d, primcount = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), start, count, primcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawArraysInstancedEXT(context, modePacked, start, count, primcount)); + if (isCallValid) + { + context->drawArraysInstanced(modePacked, start, count, primcount); + } + ANGLE_CAPTURE(DrawArraysInstancedEXT, isCallValid, context, modePacked, start, count, + primcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", primcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, primcount); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsInstancedEXT(context, modePacked, count, typePacked, + indices, primcount)); + if (isCallValid) + { + context->drawElementsInstanced(modePacked, count, typePacked, indices, primcount); + } + ANGLE_CAPTURE(DrawElementsInstancedEXT, isCallValid, context, modePacked, count, typePacked, + indices, primcount); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_VertexAttribDivisorEXT(GLuint index, GLuint divisor) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLVertexAttribDivisorEXT, "context = %d, index = %u, divisor = %u", CID(context), + index, divisor); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribDivisorEXT(context, index, divisor)); + if (isCallValid) + { + context->vertexAttribDivisor(index, divisor); + } + ANGLE_CAPTURE(VertexAttribDivisorEXT, isCallValid, context, index, divisor); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_map_buffer_range +void GL_APIENTRY GL_FlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFlushMappedBufferRangeEXT, + "context = %d, target = %s, offset = %llu, length = %llu", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length)); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFlushMappedBufferRangeEXT(context, targetPacked, offset, length)); + if (isCallValid) + { + context->flushMappedBufferRange(targetPacked, offset, length); + } + ANGLE_CAPTURE(FlushMappedBufferRangeEXT, isCallValid, context, targetPacked, offset, + length); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void *GL_APIENTRY GL_MapBufferRangeEXT(GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMapBufferRangeEXT, + "context = %d, target = %s, offset = %llu, length = %llu, access = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length), + GLbitfieldToString(GLenumGroup::BufferAccessMask, access).c_str()); + + void *returnValue; + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMapBufferRangeEXT(context, targetPacked, offset, length, access)); + if (isCallValid) + { + returnValue = context->mapBufferRange(targetPacked, offset, length, access); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRangeEXT, void *>(); + } + ANGLE_CAPTURE(MapBufferRangeEXT, isCallValid, context, targetPacked, offset, length, access, + returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRangeEXT, void *>(); + } + return returnValue; +} + +// GL_EXT_memory_object +void GL_APIENTRY GL_BufferStorageMemEXT(GLenum target, + GLsizeiptr size, + GLuint memory, + GLuint64 offset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBufferStorageMemEXT, + "context = %d, target = %s, size = %llu, memory = %u, offset = %llu", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(size), memory, static_cast<unsigned long long>(offset)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBufferStorageMemEXT(context, targetPacked, size, memoryPacked, offset)); + if (isCallValid) + { + context->bufferStorageMem(targetPacked, size, memoryPacked, offset); + } + ANGLE_CAPTURE(BufferStorageMemEXT, isCallValid, context, targetPacked, size, memoryPacked, + offset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CreateMemoryObjectsEXT(GLsizei n, GLuint *memoryObjects) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCreateMemoryObjectsEXT, + "context = %d, n = %d, memoryObjects = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)memoryObjects); + + if (context) + { + MemoryObjectID *memoryObjectsPacked = PackParam<MemoryObjectID *>(memoryObjects); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCreateMemoryObjectsEXT(context, n, memoryObjectsPacked)); + if (isCallValid) + { + context->createMemoryObjects(n, memoryObjectsPacked); + } + ANGLE_CAPTURE(CreateMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteMemoryObjectsEXT(GLsizei n, const GLuint *memoryObjects) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteMemoryObjectsEXT, + "context = %d, n = %d, memoryObjects = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)memoryObjects); + + if (context) + { + const MemoryObjectID *memoryObjectsPacked = + PackParam<const MemoryObjectID *>(memoryObjects); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteMemoryObjectsEXT(context, n, memoryObjectsPacked)); + if (isCallValid) + { + context->deleteMemoryObjects(n, memoryObjectsPacked); + } + ANGLE_CAPTURE(DeleteMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetMemoryObjectParameterivEXT(GLuint memoryObject, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetMemoryObjectParameterivEXT, + "context = %d, memoryObject = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + memoryObject, GLenumToString(GLenumGroup::MemoryObjectParameterName, pname), + (uintptr_t)params); + + if (context) + { + MemoryObjectID memoryObjectPacked = PackParam<MemoryObjectID>(memoryObject); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params)); + if (isCallValid) + { + context->getMemoryObjectParameteriv(memoryObjectPacked, pname, params); + } + ANGLE_CAPTURE(GetMemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked, + pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetUnsignedBytevEXT(GLenum pname, GLubyte *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUnsignedBytevEXT, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetUnsignedBytevEXT(context, pname, data)); + if (isCallValid) + { + context->getUnsignedBytev(pname, data); + } + ANGLE_CAPTURE(GetUnsignedBytevEXT, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetUnsignedBytei_vEXT(GLenum target, GLuint index, GLubyte *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetUnsignedBytei_vEXT, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target), index, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUnsignedBytei_vEXT(context, target, index, data)); + if (isCallValid) + { + context->getUnsignedBytei_v(target, index, data); + } + ANGLE_CAPTURE(GetUnsignedBytei_vEXT, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsMemoryObjectEXT(GLuint memoryObject) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsMemoryObjectEXT, "context = %d, memoryObject = %u", CID(context), + memoryObject); + + GLboolean returnValue; + if (context) + { + MemoryObjectID memoryObjectPacked = PackParam<MemoryObjectID>(memoryObject); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsMemoryObjectEXT(context, memoryObjectPacked)); + if (isCallValid) + { + returnValue = context->isMemoryObject(memoryObjectPacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsMemoryObjectEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsMemoryObjectEXT, isCallValid, context, memoryObjectPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsMemoryObjectEXT, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_MemoryObjectParameterivEXT(GLuint memoryObject, + GLenum pname, + const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMemoryObjectParameterivEXT, + "context = %d, memoryObject = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + memoryObject, GLenumToString(GLenumGroup::MemoryObjectParameterName, pname), + (uintptr_t)params); + + if (context) + { + MemoryObjectID memoryObjectPacked = PackParam<MemoryObjectID>(memoryObject); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params)); + if (isCallValid) + { + context->memoryObjectParameteriv(memoryObjectPacked, pname, params); + } + ANGLE_CAPTURE(MemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorageMem2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorageMem2DEXT, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, memory, + static_cast<unsigned long long>(offset)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMem2DEXT(context, targetPacked, levels, internalFormat, width, + height, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem2D(targetPacked, levels, internalFormat, width, height, + memoryPacked, offset); + } + ANGLE_CAPTURE(TexStorageMem2DEXT, isCallValid, context, targetPacked, levels, + internalFormat, width, height, memoryPacked, offset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorageMem2DMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorageMem2DMultisampleEXT, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "fixedSampleLocations = %s, memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexStorageMem2DMultisampleEXT( + context, targetPacked, samples, internalFormat, width, + height, fixedSampleLocations, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem2DMultisample(targetPacked, samples, internalFormat, width, + height, fixedSampleLocations, memoryPacked, offset); + } + ANGLE_CAPTURE(TexStorageMem2DMultisampleEXT, isCallValid, context, targetPacked, samples, + internalFormat, width, height, fixedSampleLocations, memoryPacked, offset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorageMem3DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorageMem3DEXT, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, memory, + static_cast<unsigned long long>(offset)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMem3DEXT(context, targetPacked, levels, internalFormat, width, + height, depth, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem3D(targetPacked, levels, internalFormat, width, height, depth, + memoryPacked, offset); + } + ANGLE_CAPTURE(TexStorageMem3DEXT, isCallValid, context, targetPacked, levels, + internalFormat, width, height, depth, memoryPacked, offset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorageMem3DMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorageMem3DMultisampleEXT, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, fixedSampleLocations = %s, memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorageMem3DMultisampleEXT( + context, targetPacked, samples, internalFormat, width, height, + depth, fixedSampleLocations, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem3DMultisample(targetPacked, samples, internalFormat, width, + height, depth, fixedSampleLocations, memoryPacked, + offset); + } + ANGLE_CAPTURE(TexStorageMem3DMultisampleEXT, isCallValid, context, targetPacked, samples, + internalFormat, width, height, depth, fixedSampleLocations, memoryPacked, + offset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_memory_object_fd +void GL_APIENTRY GL_ImportMemoryFdEXT(GLuint memory, GLuint64 size, GLenum handleType, GLint fd) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLImportMemoryFdEXT, + "context = %d, memory = %u, size = %llu, handleType = %s, fd = %d", CID(context), memory, + static_cast<unsigned long long>(size), + GLenumToString(GLenumGroup::ExternalHandleType, handleType), fd); + + if (context) + { + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateImportMemoryFdEXT(context, memoryPacked, size, handleTypePacked, fd)); + if (isCallValid) + { + context->importMemoryFd(memoryPacked, size, handleTypePacked, fd); + } + ANGLE_CAPTURE(ImportMemoryFdEXT, isCallValid, context, memoryPacked, size, handleTypePacked, + fd); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_multisampled_render_to_texture +void GL_APIENTRY GL_FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTexture2DMultisampleEXT, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d, " + "samples = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level, samples); + + if (context) + { + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTexture2DMultisampleEXT( + context, target, attachment, textargetPacked, texturePacked, level, samples)); + if (isCallValid) + { + context->framebufferTexture2DMultisample(target, attachment, textargetPacked, + texturePacked, level, samples); + } + ANGLE_CAPTURE(FramebufferTexture2DMultisampleEXT, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level, samples); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRenderbufferStorageMultisampleEXT, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateRenderbufferStorageMultisampleEXT( + context, target, samples, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorageMultisampleEXT(target, samples, internalformat, width, + height); + } + ANGLE_CAPTURE(RenderbufferStorageMultisampleEXT, isCallValid, context, target, samples, + internalformat, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_occlusion_query_boolean +// BeginQueryEXT is already defined. + +// DeleteQueriesEXT is already defined. + +// EndQueryEXT is already defined. + +// GenQueriesEXT is already defined. + +// GetQueryObjectuivEXT is already defined. + +// GetQueryivEXT is already defined. + +// IsQueryEXT is already defined. + +// GL_EXT_primitive_bounding_box +void GL_APIENTRY GL_PrimitiveBoundingBoxEXT(GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPrimitiveBoundingBoxEXT, + "context = %d, minX = %f, minY = %f, minZ = %f, minW = %f, maxX = %f, maxY = %f, maxZ = " + "%f, maxW = %f", + CID(context), minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePrimitiveBoundingBoxEXT(context, minX, minY, minZ, minW, maxX, + maxY, maxZ, maxW)); + if (isCallValid) + { + context->primitiveBoundingBox(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + } + ANGLE_CAPTURE(PrimitiveBoundingBoxEXT, isCallValid, context, minX, minY, minZ, minW, maxX, + maxY, maxZ, maxW); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_read_format_bgra + +// GL_EXT_robustness +GLenum GL_APIENTRY GL_GetGraphicsResetStatusEXT() +{ + Context *context = GetGlobalContext(); + EVENT(context, GLGetGraphicsResetStatusEXT, "context = %d", CID(context)); + + GLenum returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetGraphicsResetStatusEXT(context)); + if (isCallValid) + { + returnValue = context->getGraphicsResetStatus(); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatusEXT, GLenum>(); + } + ANGLE_CAPTURE(GetGraphicsResetStatusEXT, isCallValid, context, returnValue); + } + else + { + + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatusEXT, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetnUniformfvEXT(GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformfvEXT, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformfvEXT(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformfv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformfvEXT, isCallValid, context, programPacked, locationPacked, + bufSize, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetnUniformivEXT, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformivEXT(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformiv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformivEXT, isCallValid, context, programPacked, locationPacked, + bufSize, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ReadnPixelsEXT(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLReadnPixelsEXT, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, data = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)data); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadnPixelsEXT(context, x, y, width, height, format, type, bufSize, data)); + if (isCallValid) + { + context->readnPixels(x, y, width, height, format, type, bufSize, data); + } + ANGLE_CAPTURE(ReadnPixelsEXT, isCallValid, context, x, y, width, height, format, type, + bufSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_sRGB + +// GL_EXT_semaphore +void GL_APIENTRY GL_DeleteSemaphoresEXT(GLsizei n, const GLuint *semaphores) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteSemaphoresEXT, "context = %d, n = %d, semaphores = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)semaphores); + + if (context) + { + const SemaphoreID *semaphoresPacked = PackParam<const SemaphoreID *>(semaphores); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteSemaphoresEXT(context, n, semaphoresPacked)); + if (isCallValid) + { + context->deleteSemaphores(n, semaphoresPacked); + } + ANGLE_CAPTURE(DeleteSemaphoresEXT, isCallValid, context, n, semaphoresPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenSemaphoresEXT(GLsizei n, GLuint *semaphores) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenSemaphoresEXT, "context = %d, n = %d, semaphores = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)semaphores); + + if (context) + { + SemaphoreID *semaphoresPacked = PackParam<SemaphoreID *>(semaphores); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenSemaphoresEXT(context, n, semaphoresPacked)); + if (isCallValid) + { + context->genSemaphores(n, semaphoresPacked); + } + ANGLE_CAPTURE(GenSemaphoresEXT, isCallValid, context, n, semaphoresPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSemaphoreParameterui64vEXT(GLuint semaphore, GLenum pname, GLuint64 *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSemaphoreParameterui64vEXT, + "context = %d, semaphore = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + semaphore, GLenumToString(GLenumGroup::SemaphoreParameterName, pname), (uintptr_t)params); + + if (context) + { + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSemaphoreParameterui64vEXT(context, semaphorePacked, pname, params)); + if (isCallValid) + { + context->getSemaphoreParameterui64v(semaphorePacked, pname, params); + } + ANGLE_CAPTURE(GetSemaphoreParameterui64vEXT, isCallValid, context, semaphorePacked, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsSemaphoreEXT(GLuint semaphore) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsSemaphoreEXT, "context = %d, semaphore = %u", CID(context), semaphore); + + GLboolean returnValue; + if (context) + { + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsSemaphoreEXT(context, semaphorePacked)); + if (isCallValid) + { + returnValue = context->isSemaphore(semaphorePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSemaphoreEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsSemaphoreEXT, isCallValid, context, semaphorePacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSemaphoreEXT, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_SemaphoreParameterui64vEXT(GLuint semaphore, + GLenum pname, + const GLuint64 *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSemaphoreParameterui64vEXT, + "context = %d, semaphore = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + semaphore, GLenumToString(GLenumGroup::SemaphoreParameterName, pname), (uintptr_t)params); + + if (context) + { + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSemaphoreParameterui64vEXT(context, semaphorePacked, pname, params)); + if (isCallValid) + { + context->semaphoreParameterui64v(semaphorePacked, pname, params); + } + ANGLE_CAPTURE(SemaphoreParameterui64vEXT, isCallValid, context, semaphorePacked, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SignalSemaphoreEXT(GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *dstLayouts) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSignalSemaphoreEXT, + "context = %d, semaphore = %u, numBufferBarriers = %u, buffers = 0x%016" PRIxPTR + ", numTextureBarriers = %u, textures = 0x%016" PRIxPTR ", dstLayouts = 0x%016" PRIxPTR "", + CID(context), semaphore, numBufferBarriers, (uintptr_t)buffers, numTextureBarriers, + (uintptr_t)textures, (uintptr_t)dstLayouts); + + if (context) + { + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + const BufferID *buffersPacked = PackParam<const BufferID *>(buffers); + const TextureID *texturesPacked = PackParam<const TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSignalSemaphoreEXT(context, semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, dstLayouts)); + if (isCallValid) + { + context->signalSemaphore(semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, dstLayouts); + } + ANGLE_CAPTURE(SignalSemaphoreEXT, isCallValid, context, semaphorePacked, numBufferBarriers, + buffersPacked, numTextureBarriers, texturesPacked, dstLayouts); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_WaitSemaphoreEXT(GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *srcLayouts) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLWaitSemaphoreEXT, + "context = %d, semaphore = %u, numBufferBarriers = %u, buffers = 0x%016" PRIxPTR + ", numTextureBarriers = %u, textures = 0x%016" PRIxPTR ", srcLayouts = 0x%016" PRIxPTR "", + CID(context), semaphore, numBufferBarriers, (uintptr_t)buffers, numTextureBarriers, + (uintptr_t)textures, (uintptr_t)srcLayouts); + + if (context) + { + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + const BufferID *buffersPacked = PackParam<const BufferID *>(buffers); + const TextureID *texturesPacked = PackParam<const TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateWaitSemaphoreEXT(context, semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, srcLayouts)); + if (isCallValid) + { + context->waitSemaphore(semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, srcLayouts); + } + ANGLE_CAPTURE(WaitSemaphoreEXT, isCallValid, context, semaphorePacked, numBufferBarriers, + buffersPacked, numTextureBarriers, texturesPacked, srcLayouts); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GetUnsignedBytei_vEXT is already defined. + +// GetUnsignedBytevEXT is already defined. + +// GL_EXT_semaphore_fd +void GL_APIENTRY GL_ImportSemaphoreFdEXT(GLuint semaphore, GLenum handleType, GLint fd) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLImportSemaphoreFdEXT, "context = %d, semaphore = %u, handleType = %s, fd = %d", + CID(context), semaphore, GLenumToString(GLenumGroup::ExternalHandleType, handleType), fd); + + if (context) + { + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateImportSemaphoreFdEXT(context, semaphorePacked, handleTypePacked, fd)); + if (isCallValid) + { + context->importSemaphoreFd(semaphorePacked, handleTypePacked, fd); + } + ANGLE_CAPTURE(ImportSemaphoreFdEXT, isCallValid, context, semaphorePacked, handleTypePacked, + fd); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_separate_shader_objects +void GL_APIENTRY GL_ActiveShaderProgramEXT(GLuint pipeline, GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLActiveShaderProgramEXT, "context = %d, pipeline = %u, program = %u", + CID(context), pipeline, program); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateActiveShaderProgramEXT(context, pipelinePacked, programPacked)); + if (isCallValid) + { + context->activeShaderProgram(pipelinePacked, programPacked); + } + ANGLE_CAPTURE(ActiveShaderProgramEXT, isCallValid, context, pipelinePacked, programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindProgramPipelineEXT(GLuint pipeline) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindProgramPipelineEXT, "context = %d, pipeline = %u", CID(context), pipeline); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindProgramPipelineEXT(context, pipelinePacked)); + if (isCallValid) + { + context->bindProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(BindProgramPipelineEXT, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLuint GL_APIENTRY GL_CreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCreateShaderProgramvEXT, + "context = %d, type = %s, count = %d, strings = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::ShaderType, type), count, (uintptr_t)strings); + + GLuint returnValue; + if (context) + { + ShaderType typePacked = PackParam<ShaderType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCreateShaderProgramvEXT(context, typePacked, count, strings)); + if (isCallValid) + { + returnValue = context->createShaderProgramv(typePacked, count, strings); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramvEXT, GLuint>(); + } + ANGLE_CAPTURE(CreateShaderProgramvEXT, isCallValid, context, typePacked, count, strings, + returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramvEXT, GLuint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_DeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteProgramPipelinesEXT, + "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)pipelines); + + if (context) + { + const ProgramPipelineID *pipelinesPacked = PackParam<const ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteProgramPipelinesEXT(context, n, pipelinesPacked)); + if (isCallValid) + { + context->deleteProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(DeleteProgramPipelinesEXT, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenProgramPipelinesEXT, "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)pipelines); + + if (context) + { + ProgramPipelineID *pipelinesPacked = PackParam<ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenProgramPipelinesEXT(context, n, pipelinesPacked)); + if (isCallValid) + { + context->genProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(GenProgramPipelinesEXT, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramPipelineInfoLogEXT(GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramPipelineInfoLogEXT, + "context = %d, pipeline = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), pipeline, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetProgramPipelineInfoLogEXT( + context, pipelinePacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getProgramPipelineInfoLog(pipelinePacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetProgramPipelineInfoLogEXT, isCallValid, context, pipelinePacked, bufSize, + length, infoLog); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramPipelineivEXT, + "context = %d, pipeline = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + pipeline, GLenumToString(GLenumGroup::PipelineParameterName, pname), (uintptr_t)params); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramPipelineivEXT(context, pipelinePacked, pname, params)); + if (isCallValid) + { + context->getProgramPipelineiv(pipelinePacked, pname, params); + } + ANGLE_CAPTURE(GetProgramPipelineivEXT, isCallValid, context, pipelinePacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsProgramPipelineEXT(GLuint pipeline) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsProgramPipelineEXT, "context = %d, pipeline = %u", CID(context), pipeline); + + GLboolean returnValue; + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsProgramPipelineEXT(context, pipelinePacked)); + if (isCallValid) + { + returnValue = context->isProgramPipeline(pipelinePacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipelineEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsProgramPipelineEXT, isCallValid, context, pipelinePacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipelineEXT, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_ProgramParameteriEXT(GLuint program, GLenum pname, GLint value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramParameteriEXT, "context = %d, program = %u, pname = %s, value = %d", + CID(context), program, GLenumToString(GLenumGroup::ProgramParameterPName, pname), value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramParameteriEXT(context, programPacked, pname, value)); + if (isCallValid) + { + context->programParameteri(programPacked, pname, value); + } + ANGLE_CAPTURE(ProgramParameteriEXT, isCallValid, context, programPacked, pname, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1fEXT, "context = %d, program = %u, location = %d, v0 = %f", + CID(context), program, location, v0); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1fEXT(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1f(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1fEXT, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1iEXT(GLuint program, GLint location, GLint v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1iEXT, "context = %d, program = %u, location = %d, v0 = %d", + CID(context), program, location, v0); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1iEXT(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1i(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1iEXT, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1uiEXT, "context = %d, program = %u, location = %d, v0 = %u", + CID(context), program, location, v0); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1uiEXT(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1ui(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1uiEXT, isCallValid, context, programPacked, locationPacked, + v0); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform1uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform1uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2fEXT, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f", CID(context), program, + location, v0, v1); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2fEXT(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2f(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2fEXT, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2iEXT(GLuint program, GLint location, GLint v0, GLint v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2iEXT, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d", CID(context), program, + location, v0, v1); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2iEXT(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2i(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2iEXT, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2uiEXT, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u", CID(context), program, + location, v0, v1); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2uiEXT(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2ui(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2uiEXT, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform2uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform2uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3fEXT, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f", CID(context), + program, location, v0, v1, v2); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3fEXT(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3f(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3fEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform3fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3iEXT, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d", CID(context), + program, location, v0, v1, v2); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3iEXT(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3i(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3iEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform3ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3uiEXT, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u", CID(context), + program, location, v0, v1, v2); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3uiEXT(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3ui(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3uiEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform3uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform3uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform4fEXT(GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4fEXT, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f, v3 = %f", + CID(context), program, location, v0, v1, v2, v3); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4fEXT(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4f(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4fEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform4fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4iEXT, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d, v3 = %d", + CID(context), program, location, v0, v1, v2, v3); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4iEXT(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4i(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4iEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform4ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_ProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4uiEXT, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u, v3 = %u", + CID(context), program, location, v0, v1, v2, v3); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4uiEXT(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4ui(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4uiEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniform4uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniform4uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix2fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix2x3fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x3fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x3fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix2x4fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x4fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x4fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix3fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix3x2fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x2fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x2fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix3x4fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x4fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x4fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix4fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix4x2fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x2fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x2fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramUniformMatrix4x3fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x3fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x3fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_UseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUseProgramStagesEXT, "context = %d, pipeline = %u, stages = %s, program = %u", + CID(context), pipeline, + GLbitfieldToString(GLenumGroup::UseProgramStageMask, stages).c_str(), program); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUseProgramStagesEXT(context, pipelinePacked, stages, programPacked)); + if (isCallValid) + { + context->useProgramStages(pipelinePacked, stages, programPacked); + } + ANGLE_CAPTURE(UseProgramStagesEXT, isCallValid, context, pipelinePacked, stages, + programPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ValidateProgramPipelineEXT(GLuint pipeline) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLValidateProgramPipelineEXT, "context = %d, pipeline = %u", CID(context), + pipeline); + + if (context) + { + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateValidateProgramPipelineEXT(context, pipelinePacked)); + if (isCallValid) + { + context->validateProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(ValidateProgramPipelineEXT, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_shader_framebuffer_fetch_non_coherent +void GL_APIENTRY GL_FramebufferFetchBarrierEXT() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferFetchBarrierEXT, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFramebufferFetchBarrierEXT(context)); + if (isCallValid) + { + context->framebufferFetchBarrier(); + } + ANGLE_CAPTURE(FramebufferFetchBarrierEXT, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_shader_io_blocks + +// GL_EXT_tessellation_shader +void GL_APIENTRY GL_PatchParameteriEXT(GLenum pname, GLint value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPatchParameteriEXT, "context = %d, pname = %s, value = %d", CID(context), + GLenumToString(GLenumGroup::PatchParameterName, pname), value); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePatchParameteriEXT(context, pname, value)); + if (isCallValid) + { + context->patchParameteri(pname, value); + } + ANGLE_CAPTURE(PatchParameteriEXT, isCallValid, context, pname, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_texture_border_clamp +void GL_APIENTRY GL_GetSamplerParameterIivEXT(GLuint sampler, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIivEXT, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIivEXT(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIivEXT, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuivEXT(GLuint sampler, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIuivEXT, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIuivEXT(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIuiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuivEXT, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIivEXT(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIuivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIuivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIivEXT(GLuint sampler, GLenum pname, const GLint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIivEXT, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIivEXT(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIivEXT, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIuivEXT(GLuint sampler, GLenum pname, const GLuint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIuivEXT, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIuivEXT(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIuiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIuivEXT, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIivEXT(GLenum target, GLenum pname, const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIuivEXT(GLenum target, GLenum pname, const GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIuivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIuivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIuivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_texture_buffer +void GL_APIENTRY GL_TexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexBufferEXT, "context = %d, target = %s, internalformat = %s, buffer = %u", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexBufferEXT(context, targetPacked, internalformat, bufferPacked)); + if (isCallValid) + { + context->texBuffer(targetPacked, internalformat, bufferPacked); + } + ANGLE_CAPTURE(TexBufferEXT, isCallValid, context, targetPacked, internalformat, + bufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexBufferRangeEXT(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexBufferRangeEXT, + "context = %d, target = %s, internalformat = %s, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBufferRangeEXT(context, targetPacked, internalformat, + bufferPacked, offset, size)); + if (isCallValid) + { + context->texBufferRange(targetPacked, internalformat, bufferPacked, offset, size); + } + ANGLE_CAPTURE(TexBufferRangeEXT, isCallValid, context, targetPacked, internalformat, + bufferPacked, offset, size); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_EXT_texture_compression_bptc + +// GL_EXT_texture_compression_dxt1 + +// GL_EXT_texture_compression_rgtc + +// GL_EXT_texture_compression_s3tc + +// GL_EXT_texture_compression_s3tc_srgb + +// GL_EXT_texture_cube_map_array + +// GL_EXT_texture_filter_anisotropic + +// GL_EXT_texture_format_BGRA8888 + +// GL_EXT_texture_sRGB_R8 + +// GL_EXT_texture_sRGB_RG8 + +// GL_EXT_texture_storage +void GL_APIENTRY GL_TexStorage1DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage1DEXT, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage1DEXT(context, target, levels, internalformat, width)); + if (isCallValid) + { + context->texStorage1D(target, levels, internalformat, width); + } + ANGLE_CAPTURE(TexStorage1DEXT, isCallValid, context, target, levels, internalformat, width); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage2DEXT, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2DEXT(context, targetPacked, levels, internalformat, width, height)); + if (isCallValid) + { + context->texStorage2D(targetPacked, levels, internalformat, width, height); + } + ANGLE_CAPTURE(TexStorage2DEXT, isCallValid, context, targetPacked, levels, internalformat, + width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexStorage3DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage3DEXT, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorage3DEXT(context, targetPacked, levels, internalformat, + width, height, depth)); + if (isCallValid) + { + context->texStorage3D(targetPacked, levels, internalformat, width, height, depth); + } + ANGLE_CAPTURE(TexStorage3DEXT, isCallValid, context, targetPacked, levels, internalformat, + width, height, depth); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_KHR_blend_equation_advanced +void GL_APIENTRY GL_BlendBarrierKHR() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendBarrierKHR, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateBlendBarrierKHR(context)); + if (isCallValid) + { + context->blendBarrier(); + } + ANGLE_CAPTURE(BlendBarrierKHR, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_KHR_debug +void GL_APIENTRY GL_DebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void *userParam) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDebugMessageCallbackKHR, + "context = %d, callback = 0x%016" PRIxPTR ", userParam = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)callback, (uintptr_t)userParam); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDebugMessageCallbackKHR(context, callback, userParam)); + if (isCallValid) + { + context->debugMessageCallback(callback, userParam); + } + ANGLE_CAPTURE(DebugMessageCallbackKHR, isCallValid, context, callback, userParam); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DebugMessageControlKHR(GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDebugMessageControlKHR, + "context = %d, source = %s, type = %s, severity = %s, count = %d, ids = 0x%016" PRIxPTR + ", enabled = %s", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), + GLenumToString(GLenumGroup::DebugSeverity, severity), count, (uintptr_t)ids, + GLbooleanToString(enabled)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageControlKHR(context, source, type, severity, count, ids, enabled)); + if (isCallValid) + { + context->debugMessageControl(source, type, severity, count, ids, enabled); + } + ANGLE_CAPTURE(DebugMessageControlKHR, isCallValid, context, source, type, severity, count, + ids, enabled); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DebugMessageInsertKHR(GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDebugMessageInsertKHR, + "context = %d, source = %s, type = %s, id = %u, severity = %s, length = %d, buf = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), id, + GLenumToString(GLenumGroup::DebugSeverity, severity), length, (uintptr_t)buf); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageInsertKHR(context, source, type, id, severity, length, buf)); + if (isCallValid) + { + context->debugMessageInsert(source, type, id, severity, length, buf); + } + ANGLE_CAPTURE(DebugMessageInsertKHR, isCallValid, context, source, type, id, severity, + length, buf); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLuint GL_APIENTRY GL_GetDebugMessageLogKHR(GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetDebugMessageLogKHR, + "context = %d, count = %u, bufSize = %d, sources = 0x%016" PRIxPTR + ", types = 0x%016" PRIxPTR ", ids = 0x%016" PRIxPTR ", severities = 0x%016" PRIxPTR + ", lengths = 0x%016" PRIxPTR ", messageLog = 0x%016" PRIxPTR "", + CID(context), count, bufSize, (uintptr_t)sources, (uintptr_t)types, (uintptr_t)ids, + (uintptr_t)severities, (uintptr_t)lengths, (uintptr_t)messageLog); + + GLuint returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetDebugMessageLogKHR(context, count, bufSize, sources, types, + ids, severities, lengths, messageLog)); + if (isCallValid) + { + returnValue = context->getDebugMessageLog(count, bufSize, sources, types, ids, + severities, lengths, messageLog); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLogKHR, GLuint>(); + } + ANGLE_CAPTURE(GetDebugMessageLogKHR, isCallValid, context, count, bufSize, sources, types, + ids, severities, lengths, messageLog, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLogKHR, GLuint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetObjectLabelKHR(GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetObjectLabelKHR, + "context = %d, identifier = %s, name = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, identifier), name, bufSize, + (uintptr_t)length, (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetObjectLabelKHR(context, identifier, name, bufSize, length, label)); + if (isCallValid) + { + context->getObjectLabel(identifier, name, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectLabelKHR, isCallValid, context, identifier, name, bufSize, length, + label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetObjectPtrLabelKHR(const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetObjectPtrLabelKHR, + "context = %d, ptr = 0x%016" PRIxPTR ", bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, bufSize, (uintptr_t)length, (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetObjectPtrLabelKHR(context, ptr, bufSize, length, label)); + if (isCallValid) + { + context->getObjectPtrLabel(ptr, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectPtrLabelKHR, isCallValid, context, ptr, bufSize, length, label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetPointervKHR(GLenum pname, void **params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetPointervKHR, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetPointervKHR(context, pname, params)); + if (isCallValid) + { + context->getPointerv(pname, params); + } + ANGLE_CAPTURE(GetPointervKHR, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ObjectLabelKHR(GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLObjectLabelKHR, + "context = %d, identifier = %s, name = %u, length = %d, label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ObjectIdentifier, identifier), name, length, + (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateObjectLabelKHR(context, identifier, name, length, label)); + if (isCallValid) + { + context->objectLabel(identifier, name, length, label); + } + ANGLE_CAPTURE(ObjectLabelKHR, isCallValid, context, identifier, name, length, label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ObjectPtrLabelKHR(const void *ptr, GLsizei length, const GLchar *label) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLObjectPtrLabelKHR, + "context = %d, ptr = 0x%016" PRIxPTR ", length = %d, label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, length, (uintptr_t)label); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateObjectPtrLabelKHR(context, ptr, length, label)); + if (isCallValid) + { + context->objectPtrLabel(ptr, length, label); + } + ANGLE_CAPTURE(ObjectPtrLabelKHR, isCallValid, context, ptr, length, label); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PopDebugGroupKHR() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPopDebugGroupKHR, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopDebugGroupKHR(context)); + if (isCallValid) + { + context->popDebugGroup(); + } + ANGLE_CAPTURE(PopDebugGroupKHR, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_PushDebugGroupKHR(GLenum source, + GLuint id, + GLsizei length, + const GLchar *message) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPushDebugGroupKHR, + "context = %d, source = %s, id = %u, length = %d, message = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), id, length, + (uintptr_t)message); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePushDebugGroupKHR(context, source, id, length, message)); + if (isCallValid) + { + context->pushDebugGroup(source, id, length, message); + } + ANGLE_CAPTURE(PushDebugGroupKHR, isCallValid, context, source, id, length, message); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_KHR_parallel_shader_compile +void GL_APIENTRY GL_MaxShaderCompilerThreadsKHR(GLuint count) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMaxShaderCompilerThreadsKHR, "context = %d, count = %u", CID(context), count); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaxShaderCompilerThreadsKHR(context, count)); + if (isCallValid) + { + context->maxShaderCompilerThreads(count); + } + ANGLE_CAPTURE(MaxShaderCompilerThreadsKHR, isCallValid, context, count); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_NV_fence +void GL_APIENTRY GL_DeleteFencesNV(GLsizei n, const GLuint *fences) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteFencesNV, "context = %d, n = %d, fences = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)fences); + + if (context) + { + const FenceNVID *fencesPacked = PackParam<const FenceNVID *>(fences); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteFencesNV(context, n, fencesPacked)); + if (isCallValid) + { + context->deleteFencesNV(n, fencesPacked); + } + ANGLE_CAPTURE(DeleteFencesNV, isCallValid, context, n, fencesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FinishFenceNV(GLuint fence) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFinishFenceNV, "context = %d, fence = %u", CID(context), fence); + + if (context) + { + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFinishFenceNV(context, fencePacked)); + if (isCallValid) + { + context->finishFenceNV(fencePacked); + } + ANGLE_CAPTURE(FinishFenceNV, isCallValid, context, fencePacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenFencesNV(GLsizei n, GLuint *fences) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenFencesNV, "context = %d, n = %d, fences = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)fences); + + if (context) + { + FenceNVID *fencesPacked = PackParam<FenceNVID *>(fences); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenFencesNV(context, n, fencesPacked)); + if (isCallValid) + { + context->genFencesNV(n, fencesPacked); + } + ANGLE_CAPTURE(GenFencesNV, isCallValid, context, n, fencesPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFenceivNV(GLuint fence, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFenceivNV, + "context = %d, fence = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), fence, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFenceivNV(context, fencePacked, pname, params)); + if (isCallValid) + { + context->getFenceivNV(fencePacked, pname, params); + } + ANGLE_CAPTURE(GetFenceivNV, isCallValid, context, fencePacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsFenceNV(GLuint fence) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsFenceNV, "context = %d, fence = %u", CID(context), fence); + + GLboolean returnValue; + if (context) + { + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsFenceNV(context, fencePacked)); + if (isCallValid) + { + returnValue = context->isFenceNV(fencePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFenceNV, GLboolean>(); + } + ANGLE_CAPTURE(IsFenceNV, isCallValid, context, fencePacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFenceNV, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_SetFenceNV(GLuint fence, GLenum condition) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSetFenceNV, "context = %d, fence = %u, condition = %s", CID(context), fence, + GLenumToString(GLenumGroup::DefaultGroup, condition)); + + if (context) + { + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSetFenceNV(context, fencePacked, condition)); + if (isCallValid) + { + context->setFenceNV(fencePacked, condition); + } + ANGLE_CAPTURE(SetFenceNV, isCallValid, context, fencePacked, condition); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_TestFenceNV(GLuint fence) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTestFenceNV, "context = %d, fence = %u", CID(context), fence); + + GLboolean returnValue; + if (context) + { + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateTestFenceNV(context, fencePacked)); + if (isCallValid) + { + returnValue = context->testFenceNV(fencePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLTestFenceNV, GLboolean>(); + } + ANGLE_CAPTURE(TestFenceNV, isCallValid, context, fencePacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLTestFenceNV, GLboolean>(); + } + return returnValue; +} + +// GL_NV_framebuffer_blit +void GL_APIENTRY GL_BlitFramebufferNV(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlitFramebufferNV, + "context = %d, srcX0 = %d, srcY0 = %d, srcX1 = %d, srcY1 = %d, dstX0 = %d, dstY0 = %d, " + "dstX1 = %d, dstY1 = %d, mask = %s, filter = %s", + CID(context), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(), + GLenumToString(GLenumGroup::BlitFramebufferFilter, filter)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlitFramebufferNV(context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter)); + if (isCallValid) + { + context->blitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); + } + ANGLE_CAPTURE(BlitFramebufferNV, isCallValid, context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_EGL_image +void GL_APIENTRY GL_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEGLImageTargetRenderbufferStorageOES, + "context = %d, target = %s, image = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target), (uintptr_t)image); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateEGLImageTargetRenderbufferStorageOES(context, target, image)); + if (isCallValid) + { + context->eGLImageTargetRenderbufferStorage(target, image); + } + ANGLE_CAPTURE(EGLImageTargetRenderbufferStorageOES, isCallValid, context, target, image); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEGLImageTargetTexture2DOES, + "context = %d, target = %s, image = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target), (uintptr_t)image); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateEGLImageTargetTexture2DOES(context, targetPacked, image)); + if (isCallValid) + { + context->eGLImageTargetTexture2D(targetPacked, image); + } + ANGLE_CAPTURE(EGLImageTargetTexture2DOES, isCallValid, context, targetPacked, image); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_compressed_ETC1_RGB8_texture + +// GL_OES_copy_image +void GL_APIENTRY GL_CopyImageSubDataOES(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyImageSubDataOES, + "context = %d, srcName = %u, srcTarget = %s, srcLevel = %d, srcX = %d, srcY = %d, srcZ = " + "%d, dstName = %u, dstTarget = %s, dstLevel = %d, dstX = %d, dstY = %d, dstZ = %d, " + "srcWidth = %d, srcHeight = %d, srcDepth = %d", + CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget), + srcLevel, srcX, srcY, srcZ, dstName, + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY, + dstZ, srcWidth, srcHeight, srcDepth); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCopyImageSubDataOES(context, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, + dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth)); + if (isCallValid) + { + context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); + } + ANGLE_CAPTURE(CopyImageSubDataOES, isCallValid, context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_depth32 + +// GL_OES_draw_buffers_indexed +void GL_APIENTRY GL_BlendEquationSeparateiOES(GLuint buf, GLenum modeRGB, GLenum modeAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquationSeparateiOES, + "context = %d, buf = %u, modeRGB = %s, modeAlpha = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparateiOES(context, buf, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparatei(buf, modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparateiOES, isCallValid, context, buf, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendEquationiOES(GLuint buf, GLenum mode) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendEquationiOES, "context = %d, buf = %u, mode = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendEquationiOES(context, buf, mode)); + if (isCallValid) + { + context->blendEquationi(buf, mode); + } + ANGLE_CAPTURE(BlendEquationiOES, isCallValid, context, buf, mode); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY +GL_BlendFuncSeparateiOES(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFuncSeparateiOES, + "context = %d, buf = %u, srcRGB = %s, dstRGB = %s, srcAlpha = %s, dstAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendingFactor, srcRGB), + GLenumToString(GLenumGroup::BlendingFactor, dstRGB), + GLenumToString(GLenumGroup::BlendingFactor, srcAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dstAlpha)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBlendFuncSeparateiOES(context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha)); + if (isCallValid) + { + context->blendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparateiOES, isCallValid, context, buf, srcRGB, dstRGB, srcAlpha, + dstAlpha); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BlendFunciOES(GLuint buf, GLenum src, GLenum dst) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBlendFunciOES, "context = %d, buf = %u, src = %s, dst = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendingFactor, src), + GLenumToString(GLenumGroup::BlendingFactor, dst)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunciOES(context, buf, src, dst)); + if (isCallValid) + { + context->blendFunci(buf, src, dst); + } + ANGLE_CAPTURE(BlendFunciOES, isCallValid, context, buf, src, dst); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ColorMaskiOES(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLColorMaskiOES, "context = %d, index = %u, r = %s, g = %s, b = %s, a = %s", + CID(context), index, GLbooleanToString(r), GLbooleanToString(g), GLbooleanToString(b), + GLbooleanToString(a)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMaskiOES(context, index, r, g, b, a)); + if (isCallValid) + { + context->colorMaski(index, r, g, b, a); + } + ANGLE_CAPTURE(ColorMaskiOES, isCallValid, context, index, r, g, b, a); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DisableiOES(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDisableiOES, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableiOES(context, target, index)); + if (isCallValid) + { + context->disablei(target, index); + } + ANGLE_CAPTURE(DisableiOES, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_EnableiOES(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLEnableiOES, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableiOES(context, target, index)); + if (isCallValid) + { + context->enablei(target, index); + } + ANGLE_CAPTURE(EnableiOES, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsEnablediOES(GLenum target, GLuint index) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsEnablediOES, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + GLboolean returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsEnablediOES(context, target, index)); + if (isCallValid) + { + returnValue = context->isEnabledi(target, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediOES, GLboolean>(); + } + ANGLE_CAPTURE(IsEnablediOES, isCallValid, context, target, index, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediOES, GLboolean>(); + } + return returnValue; +} + +// GL_OES_draw_elements_base_vertex +void GL_APIENTRY GL_DrawElementsBaseVertexOES(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsBaseVertexOES, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsBaseVertexOES(context, modePacked, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex); + } + ANGLE_CAPTURE(DrawElementsBaseVertexOES, isCallValid, context, modePacked, count, + typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertexOES(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedBaseVertexOES, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount, + basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertexOES( + context, modePacked, count, typePacked, + indices, instancecount, basevertex)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices, + instancecount, basevertex); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertexOES, isCallValid, context, modePacked, count, + typePacked, indices, instancecount, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawRangeElementsBaseVertexOES(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawRangeElementsBaseVertexOES, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context) + { + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertexOES( + context, modePacked, start, end, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices, + basevertex); + } + ANGLE_CAPTURE(DrawRangeElementsBaseVertexOES, isCallValid, context, modePacked, start, end, + count, typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// MultiDrawElementsBaseVertexEXT is already defined. + +// GL_OES_draw_texture +void GL_APIENTRY GL_DrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexfOES, "context = %d, x = %f, y = %f, z = %f, width = %f, height = %f", + CID(context), x, y, z, width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexfOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexf(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexfOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawTexfvOES(const GLfloat *coords) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexfvOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexfvOES(context, coords)); + if (isCallValid) + { + context->drawTexfv(coords); + } + ANGLE_CAPTURE(DrawTexfvOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexiOES, "context = %d, x = %d, y = %d, z = %d, width = %d, height = %d", + CID(context), x, y, z, width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexiOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexi(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexiOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawTexivOES(const GLint *coords) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexivOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexivOES(context, coords)); + if (isCallValid) + { + context->drawTexiv(coords); + } + ANGLE_CAPTURE(DrawTexivOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexsOES, "context = %d, x = %d, y = %d, z = %d, width = %d, height = %d", + CID(context), x, y, z, width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexsOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexs(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexsOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawTexsvOES(const GLshort *coords) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexsvOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexsvOES(context, coords)); + if (isCallValid) + { + context->drawTexsv(coords); + } + ANGLE_CAPTURE(DrawTexsvOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexxOES, + "context = %d, x = 0x%X, y = 0x%X, z = 0x%X, width = 0x%X, height = 0x%X", CID(context), + x, y, z, width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexxOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexx(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexxOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawTexxvOES(const GLfixed *coords) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawTexxvOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexxvOES(context, coords)); + if (isCallValid) + { + context->drawTexxv(coords); + } + ANGLE_CAPTURE(DrawTexxvOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_framebuffer_object +void GL_APIENTRY GL_BindFramebufferOES(GLenum target, GLuint framebuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindFramebufferOES, "context = %d, target = %s, framebuffer = %u", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), framebuffer); + + if (context) + { + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindFramebufferOES(context, target, framebufferPacked)); + if (isCallValid) + { + context->bindFramebuffer(target, framebufferPacked); + } + ANGLE_CAPTURE(BindFramebufferOES, isCallValid, context, target, framebufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_BindRenderbufferOES(GLenum target, GLuint renderbuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindRenderbufferOES, "context = %d, target = %s, renderbuffer = %u", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), renderbuffer); + + if (context) + { + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindRenderbufferOES(context, target, renderbufferPacked)); + if (isCallValid) + { + context->bindRenderbuffer(target, renderbufferPacked); + } + ANGLE_CAPTURE(BindRenderbufferOES, isCallValid, context, target, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLenum GL_APIENTRY GL_CheckFramebufferStatusOES(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCheckFramebufferStatusOES, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target)); + + GLenum returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCheckFramebufferStatusOES(context, target)); + if (isCallValid) + { + returnValue = context->checkFramebufferStatus(target); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatusOES, GLenum>(); + } + ANGLE_CAPTURE(CheckFramebufferStatusOES, isCallValid, context, target, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatusOES, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_DeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteFramebuffersOES, + "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)framebuffers); + + if (context) + { + const FramebufferID *framebuffersPacked = PackParam<const FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteFramebuffersOES(context, n, framebuffersPacked)); + if (isCallValid) + { + context->deleteFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(DeleteFramebuffersOES, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteRenderbuffersOES, + "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)renderbuffers); + + if (context) + { + const RenderbufferID *renderbuffersPacked = + PackParam<const RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteRenderbuffersOES(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->deleteRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(DeleteRenderbuffersOES, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferRenderbufferOES(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferRenderbufferOES, + "context = %d, target = %s, attachment = %s, renderbuffertarget = %s, renderbuffer = %u", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::RenderbufferTarget, renderbuffertarget), renderbuffer); + + if (context) + { + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferRenderbufferOES(context, target, attachment, renderbuffertarget, + renderbufferPacked)); + if (isCallValid) + { + context->framebufferRenderbuffer(target, attachment, renderbuffertarget, + renderbufferPacked); + } + ANGLE_CAPTURE(FramebufferRenderbufferOES, isCallValid, context, target, attachment, + renderbuffertarget, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferTexture2DOES(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTexture2DOES, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level); + + if (context) + { + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferTexture2DOES(context, target, attachment, + textargetPacked, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture2D(target, attachment, textargetPacked, texturePacked, + level); + } + ANGLE_CAPTURE(FramebufferTexture2DOES, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenFramebuffersOES(GLsizei n, GLuint *framebuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenFramebuffersOES, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)framebuffers); + + if (context) + { + FramebufferID *framebuffersPacked = PackParam<FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenFramebuffersOES(context, n, framebuffersPacked)); + if (isCallValid) + { + context->genFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(GenFramebuffersOES, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenRenderbuffersOES(GLsizei n, GLuint *renderbuffers) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenRenderbuffersOES, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)renderbuffers); + + if (context) + { + RenderbufferID *renderbuffersPacked = PackParam<RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenRenderbuffersOES(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->genRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(GenRenderbuffersOES, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenerateMipmapOES(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenerateMipmapOES, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenerateMipmapOES(context, targetPacked)); + if (isCallValid) + { + context->generateMipmap(targetPacked); + } + ANGLE_CAPTURE(GenerateMipmapOES, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetFramebufferAttachmentParameterivOES(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetFramebufferAttachmentParameterivOES, + "context = %d, target = %s, attachment = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname), + (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetFramebufferAttachmentParameterivOES( + context, target, attachment, pname, params)); + if (isCallValid) + { + context->getFramebufferAttachmentParameteriv(target, attachment, pname, params); + } + ANGLE_CAPTURE(GetFramebufferAttachmentParameterivOES, isCallValid, context, target, + attachment, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetRenderbufferParameterivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::RenderbufferParameterName, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetRenderbufferParameterivOES(context, target, pname, params)); + if (isCallValid) + { + context->getRenderbufferParameteriv(target, pname, params); + } + ANGLE_CAPTURE(GetRenderbufferParameterivOES, isCallValid, context, target, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsFramebufferOES(GLuint framebuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsFramebufferOES, "context = %d, framebuffer = %u", CID(context), framebuffer); + + GLboolean returnValue; + if (context) + { + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsFramebufferOES(context, framebufferPacked)); + if (isCallValid) + { + returnValue = context->isFramebuffer(framebufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebufferOES, GLboolean>(); + } + ANGLE_CAPTURE(IsFramebufferOES, isCallValid, context, framebufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebufferOES, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsRenderbufferOES(GLuint renderbuffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsRenderbufferOES, "context = %d, renderbuffer = %u", CID(context), + renderbuffer); + + GLboolean returnValue; + if (context) + { + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsRenderbufferOES(context, renderbufferPacked)); + if (isCallValid) + { + returnValue = context->isRenderbuffer(renderbufferPacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbufferOES, GLboolean>(); + } + ANGLE_CAPTURE(IsRenderbufferOES, isCallValid, context, renderbufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbufferOES, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_RenderbufferStorageOES(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLRenderbufferStorageOES, + "context = %d, target = %s, internalformat = %s, width = %d, height = %d", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateRenderbufferStorageOES(context, target, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorage(target, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorageOES, isCallValid, context, target, internalformat, width, + height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_get_program_binary +void GL_APIENTRY GL_GetProgramBinaryOES(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetProgramBinaryOES, + "context = %d, program = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", binaryFormat = 0x%016" PRIxPTR ", binary = 0x%016" PRIxPTR "", + CID(context), program, bufSize, (uintptr_t)length, (uintptr_t)binaryFormat, + (uintptr_t)binary); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramBinaryOES(context, programPacked, bufSize, length, + binaryFormat, binary)); + if (isCallValid) + { + context->getProgramBinary(programPacked, bufSize, length, binaryFormat, binary); + } + ANGLE_CAPTURE(GetProgramBinaryOES, isCallValid, context, programPacked, bufSize, length, + binaryFormat, binary); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_ProgramBinaryOES(GLuint program, + GLenum binaryFormat, + const void *binary, + GLint length) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLProgramBinaryOES, + "context = %d, program = %u, binaryFormat = %s, binary = 0x%016" PRIxPTR ", length = %d", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, binaryFormat), + (uintptr_t)binary, length); + + if (context) + { + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramBinaryOES(context, programPacked, binaryFormat, binary, length)); + if (isCallValid) + { + context->programBinary(programPacked, binaryFormat, binary, length); + } + ANGLE_CAPTURE(ProgramBinaryOES, isCallValid, context, programPacked, binaryFormat, binary, + length); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_mapbuffer +void GL_APIENTRY GL_GetBufferPointervOES(GLenum target, GLenum pname, void **params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetBufferPointervOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferPointervOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferPointerv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferPointervOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void *GL_APIENTRY GL_MapBufferOES(GLenum target, GLenum access) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMapBufferOES, "context = %d, target = %s, access = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::BufferAccessARB, access)); + + void *returnValue; + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMapBufferOES(context, targetPacked, access)); + if (isCallValid) + { + returnValue = context->mapBuffer(targetPacked, access); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferOES, void *>(); + } + ANGLE_CAPTURE(MapBufferOES, isCallValid, context, targetPacked, access, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferOES, void *>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_UnmapBufferOES(GLenum target) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLUnmapBufferOES, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target)); + + GLboolean returnValue; + if (context) + { + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUnmapBufferOES(context, targetPacked)); + if (isCallValid) + { + returnValue = context->unmapBuffer(targetPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBufferOES, GLboolean>(); + } + ANGLE_CAPTURE(UnmapBufferOES, isCallValid, context, targetPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBufferOES, GLboolean>(); + } + return returnValue; +} + +// GL_OES_matrix_palette +void GL_APIENTRY GL_CurrentPaletteMatrixOES(GLuint matrixpaletteindex) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCurrentPaletteMatrixOES, "context = %d, matrixpaletteindex = %u", CID(context), + matrixpaletteindex); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCurrentPaletteMatrixOES(context, matrixpaletteindex)); + if (isCallValid) + { + context->currentPaletteMatrix(matrixpaletteindex); + } + ANGLE_CAPTURE(CurrentPaletteMatrixOES, isCallValid, context, matrixpaletteindex); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_LoadPaletteFromModelViewMatrixOES() +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLLoadPaletteFromModelViewMatrixOES, "context = %d", CID(context)); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLoadPaletteFromModelViewMatrixOES(context)); + if (isCallValid) + { + context->loadPaletteFromModelViewMatrix(); + } + ANGLE_CAPTURE(LoadPaletteFromModelViewMatrixOES, isCallValid, context); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_MatrixIndexPointerOES(GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMatrixIndexPointerOES, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::DefaultGroup, type), stride, + (uintptr_t)pointer); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMatrixIndexPointerOES(context, size, type, stride, pointer)); + if (isCallValid) + { + context->matrixIndexPointer(size, type, stride, pointer); + } + ANGLE_CAPTURE(MatrixIndexPointerOES, isCallValid, context, size, type, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_WeightPointerOES(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLWeightPointerOES, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::DefaultGroup, type), stride, + (uintptr_t)pointer); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateWeightPointerOES(context, size, type, stride, pointer)); + if (isCallValid) + { + context->weightPointer(size, type, stride, pointer); + } + ANGLE_CAPTURE(WeightPointerOES, isCallValid, context, size, type, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_point_size_array +void GL_APIENTRY GL_PointSizePointerOES(GLenum type, GLsizei stride, const void *pointer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLPointSizePointerOES, + "context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, type), stride, (uintptr_t)pointer); + + if (context) + { + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePointSizePointerOES(context, typePacked, stride, pointer)); + if (isCallValid) + { + context->pointSizePointer(typePacked, stride, pointer); + } + ANGLE_CAPTURE(PointSizePointerOES, isCallValid, context, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_query_matrix +GLbitfield GL_APIENTRY GL_QueryMatrixxOES(GLfixed *mantissa, GLint *exponent) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLQueryMatrixxOES, + "context = %d, mantissa = 0x%016" PRIxPTR ", exponent = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)mantissa, (uintptr_t)exponent); + + GLbitfield returnValue; + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateQueryMatrixxOES(context, mantissa, exponent)); + if (isCallValid) + { + returnValue = context->queryMatrixx(mantissa, exponent); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLQueryMatrixxOES, GLbitfield>(); + } + ANGLE_CAPTURE(QueryMatrixxOES, isCallValid, context, mantissa, exponent, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLQueryMatrixxOES, GLbitfield>(); + } + return returnValue; +} + +// GL_OES_sample_shading +void GL_APIENTRY GL_MinSampleShadingOES(GLfloat value) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLMinSampleShadingOES, "context = %d, value = %f", CID(context), value); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMinSampleShadingOES(context, value)); + if (isCallValid) + { + context->minSampleShading(value); + } + ANGLE_CAPTURE(MinSampleShadingOES, isCallValid, context, value); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_shader_io_blocks + +// GL_OES_texture_3D +void GL_APIENTRY GL_CompressedTexImage3DOES(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexImage3DOES, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, border, + imageSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexImage3DOES(context, targetPacked, level, internalformat, width, + height, depth, border, imageSize, data)); + if (isCallValid) + { + context->compressedTexImage3D(targetPacked, level, internalformat, width, height, depth, + border, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexImage3DOES, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, imageSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCompressedTexSubImage3DOES, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + imageSize, (uintptr_t)data); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCompressedTexSubImage3DOES( + context, targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data)); + if (isCallValid) + { + context->compressedTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage3DOES, isCallValid, context, targetPacked, level, + xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_CopyTexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLCopyTexSubImage3DOES, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, x = " + "%d, y = %d, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + zoffset, x, y, width, height); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexSubImage3DOES(context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height)); + if (isCallValid) + { + context->copyTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, x, y, width, + height); + } + ANGLE_CAPTURE(CopyTexSubImage3DOES, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_FramebufferTexture3DOES(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLint zoffset) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTexture3DOES, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d, " + "zoffset = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level, zoffset); + + if (context) + { + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTexture3DOES(context, target, attachment, textargetPacked, + texturePacked, level, zoffset)); + if (isCallValid) + { + context->framebufferTexture3D(target, attachment, textargetPacked, texturePacked, level, + zoffset); + } + ANGLE_CAPTURE(FramebufferTexture3DOES, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level, zoffset); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexImage3DOES(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexImage3DOES, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, border, + GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage3DOES(context, targetPacked, level, internalformat, width, height, + depth, border, format, type, pixels)); + if (isCallValid) + { + context->texImage3D(targetPacked, level, internalformat, width, height, depth, border, + format, type, pixels); + } + ANGLE_CAPTURE(TexImage3DOES, isCallValid, context, targetPacked, level, internalformat, + width, height, depth, border, format, type, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexSubImage3DOES, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context) + { + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexSubImage3DOES(context, targetPacked, level, xoffset, yoffset, zoffset, + width, height, depth, format, type, pixels)); + if (isCallValid) + { + context->texSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, height, + depth, format, type, pixels); + } + ANGLE_CAPTURE(TexSubImage3DOES, isCallValid, context, targetPacked, level, xoffset, yoffset, + zoffset, width, height, depth, format, type, pixels); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_texture_border_clamp +void GL_APIENTRY GL_GetSamplerParameterIivOES(GLuint sampler, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIivOES, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIivOES(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIivOES, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuivOES(GLuint sampler, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetSamplerParameterIuivOES, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIuivOES(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIuiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuivOES, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIivOES(GLenum target, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexParameterIuivOES(GLenum target, GLenum pname, GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexParameterIuivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIuivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIivOES(GLuint sampler, GLenum pname, const GLint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIivOES, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIivOES(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIivOES, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_SamplerParameterIuivOES(GLuint sampler, GLenum pname, const GLuint *param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLSamplerParameterIuivOES, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context) + { + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIuivOES(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIuiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIuivOES, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIivOES(GLenum target, GLenum pname, const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexParameterIuivOES(GLenum target, GLenum pname, const GLuint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexParameterIuivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIuivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIuivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_texture_buffer +void GL_APIENTRY GL_TexBufferOES(GLenum target, GLenum internalformat, GLuint buffer) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexBufferOES, "context = %d, target = %s, internalformat = %s, buffer = %u", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexBufferOES(context, targetPacked, internalformat, bufferPacked)); + if (isCallValid) + { + context->texBuffer(targetPacked, internalformat, bufferPacked); + } + ANGLE_CAPTURE(TexBufferOES, isCallValid, context, targetPacked, internalformat, + bufferPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexBufferRangeOES(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexBufferRangeOES, + "context = %d, target = %s, internalformat = %s, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBufferRangeOES(context, targetPacked, internalformat, + bufferPacked, offset, size)); + if (isCallValid) + { + context->texBufferRange(targetPacked, internalformat, bufferPacked, offset, size); + } + ANGLE_CAPTURE(TexBufferRangeOES, isCallValid, context, targetPacked, internalformat, + bufferPacked, offset, size); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_texture_cube_map +void GL_APIENTRY GL_GetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexGenfvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTexGenfvOES(context, coord, pname, params)); + if (isCallValid) + { + context->getTexGenfv(coord, pname, params); + } + ANGLE_CAPTURE(GetTexGenfvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexGenivOES(GLenum coord, GLenum pname, GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexGenivOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTexGenivOES(context, coord, pname, params)); + if (isCallValid) + { + context->getTexGeniv(coord, pname, params); + } + ANGLE_CAPTURE(GetTexGenivOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGetTexGenxvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTexGenxvOES(context, coord, pname, params)); + if (isCallValid) + { + context->getTexGenxv(coord, pname, params); + } + ANGLE_CAPTURE(GetTexGenxvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexGenfOES(GLenum coord, GLenum pname, GLfloat param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexGenfOES, "context = %d, coord = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenfOES(context, coord, pname, param)); + if (isCallValid) + { + context->texGenf(coord, pname, param); + } + ANGLE_CAPTURE(TexGenfOES, isCallValid, context, coord, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexGenfvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenfvOES(context, coord, pname, params)); + if (isCallValid) + { + context->texGenfv(coord, pname, params); + } + ANGLE_CAPTURE(TexGenfvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexGeniOES(GLenum coord, GLenum pname, GLint param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexGeniOES, "context = %d, coord = %s, pname = %s, param = %d", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGeniOES(context, coord, pname, param)); + if (isCallValid) + { + context->texGeni(coord, pname, param); + } + ANGLE_CAPTURE(TexGeniOES, isCallValid, context, coord, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexGenivOES(GLenum coord, GLenum pname, const GLint *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexGenivOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenivOES(context, coord, pname, params)); + if (isCallValid) + { + context->texGeniv(coord, pname, params); + } + ANGLE_CAPTURE(TexGenivOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexGenxOES(GLenum coord, GLenum pname, GLfixed param) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexGenxOES, "context = %d, coord = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), param); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenxOES(context, coord, pname, param)); + if (isCallValid) + { + context->texGenx(coord, pname, param); + } + ANGLE_CAPTURE(TexGenxOES, isCallValid, context, coord, pname, param); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_TexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexGenxvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context) + { + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenxvOES(context, coord, pname, params)); + if (isCallValid) + { + context->texGenxv(coord, pname, params); + } + ANGLE_CAPTURE(TexGenxvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_texture_cube_map_array + +// GL_OES_texture_half_float + +// GL_OES_texture_stencil8 + +// GL_OES_texture_storage_multisample_2d_array +void GL_APIENTRY GL_TexStorage3DMultisampleOES(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLTexStorage3DMultisampleOES, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, + GLbooleanToString(fixedsamplelocations)); + + if (context) + { + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage3DMultisampleOES(context, targetPacked, samples, internalformat, + width, height, depth, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage3DMultisample(targetPacked, samples, internalformat, width, height, + depth, fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage3DMultisampleOES, isCallValid, context, targetPacked, samples, + internalformat, width, height, depth, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OES_vertex_array_object +void GL_APIENTRY GL_BindVertexArrayOES(GLuint array) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLBindVertexArrayOES, "context = %d, array = %u", CID(context), array); + + if (context) + { + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindVertexArrayOES(context, arrayPacked)); + if (isCallValid) + { + context->bindVertexArray(arrayPacked); + } + ANGLE_CAPTURE(BindVertexArrayOES, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DeleteVertexArraysOES(GLsizei n, const GLuint *arrays) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDeleteVertexArraysOES, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context) + { + const VertexArrayID *arraysPacked = PackParam<const VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteVertexArraysOES(context, n, arraysPacked)); + if (isCallValid) + { + context->deleteVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(DeleteVertexArraysOES, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_GenVertexArraysOES(GLsizei n, GLuint *arrays) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLGenVertexArraysOES, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context) + { + VertexArrayID *arraysPacked = PackParam<VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenVertexArraysOES(context, n, arraysPacked)); + if (isCallValid) + { + context->genVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(GenVertexArraysOES, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +GLboolean GL_APIENTRY GL_IsVertexArrayOES(GLuint array) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLIsVertexArrayOES, "context = %d, array = %u", CID(context), array); + + GLboolean returnValue; + if (context) + { + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsVertexArrayOES(context, arrayPacked)); + if (isCallValid) + { + returnValue = context->isVertexArray(arrayPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArrayOES, GLboolean>(); + } + ANGLE_CAPTURE(IsVertexArrayOES, isCallValid, context, arrayPacked, returnValue); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArrayOES, GLboolean>(); + } + return returnValue; +} + +// GL_OVR_multiview +void GL_APIENTRY GL_FramebufferTextureMultiviewOVR(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint baseViewIndex, + GLsizei numViews) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLFramebufferTextureMultiviewOVR, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d, baseViewIndex = " + "%d, numViews = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level, + baseViewIndex, numViews); + + if (context) + { + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTextureMultiviewOVR(context, target, attachment, texturePacked, + level, baseViewIndex, numViews)); + if (isCallValid) + { + context->framebufferTextureMultiview(target, attachment, texturePacked, level, + baseViewIndex, numViews); + } + ANGLE_CAPTURE(FramebufferTextureMultiviewOVR, isCallValid, context, target, attachment, + texturePacked, level, baseViewIndex, numViews); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +// GL_OVR_multiview2 + +// EGL_ANGLE_explicit_context +void GL_APIENTRY GL_ActiveShaderProgramContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLActiveShaderProgram, "context = %d, pipeline = %u, program = %u", CID(context), + pipeline, program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateActiveShaderProgram(context, pipelinePacked, programPacked)); + if (isCallValid) + { + context->activeShaderProgram(pipelinePacked, programPacked); + } + ANGLE_CAPTURE(ActiveShaderProgram, isCallValid, context, pipelinePacked, programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ActiveShaderProgramEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLActiveShaderProgramEXT, "context = %d, pipeline = %u, program = %u", + CID(context), pipeline, program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateActiveShaderProgramEXT(context, pipelinePacked, programPacked)); + if (isCallValid) + { + context->activeShaderProgram(pipelinePacked, programPacked); + } + ANGLE_CAPTURE(ActiveShaderProgramEXT, isCallValid, context, pipelinePacked, programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ActiveTextureContextANGLE(GLeglContext ctx, GLenum texture) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLActiveTexture, "context = %d, texture = %s", CID(context), + GLenumToString(GLenumGroup::TextureUnit, texture)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateActiveTexture(context, texture)); + if (isCallValid) + { + context->activeTexture(texture); + } + ANGLE_CAPTURE(ActiveTexture, isCallValid, context, texture); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_AlphaFuncContextANGLE(GLeglContext ctx, GLenum func, GLfloat ref) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLAlphaFunc, "context = %d, func = %s, ref = %f", CID(context), + GLenumToString(GLenumGroup::AlphaFunction, func), ref); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateAlphaFunc(context, funcPacked, ref)); + if (isCallValid) + { + context->alphaFunc(funcPacked, ref); + } + ANGLE_CAPTURE(AlphaFunc, isCallValid, context, funcPacked, ref); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_AlphaFuncxContextANGLE(GLeglContext ctx, GLenum func, GLfixed ref) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLAlphaFuncx, "context = %d, func = %s, ref = 0x%X", CID(context), + GLenumToString(GLenumGroup::AlphaFunction, func), ref); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateAlphaFuncx(context, funcPacked, ref)); + if (isCallValid) + { + context->alphaFuncx(funcPacked, ref); + } + ANGLE_CAPTURE(AlphaFuncx, isCallValid, context, funcPacked, ref); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_AttachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLAttachShader, "context = %d, program = %u, shader = %u", CID(context), program, + shader); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateAttachShader(context, programPacked, shaderPacked)); + if (isCallValid) + { + context->attachShader(programPacked, shaderPacked); + } + ANGLE_CAPTURE(AttachShader, isCallValid, context, programPacked, shaderPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BeginQueryContextANGLE(GLeglContext ctx, GLenum target, GLuint id) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBeginQuery, "context = %d, target = %s, id = %u", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), id); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryType targetPacked = PackParam<QueryType>(target); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBeginQuery(context, targetPacked, idPacked)); + if (isCallValid) + { + context->beginQuery(targetPacked, idPacked); + } + ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, idPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BeginQueryEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint id) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBeginQueryEXT, "context = %d, target = %s, id = %u", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), id); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryType targetPacked = PackParam<QueryType>(target); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBeginQueryEXT(context, targetPacked, idPacked)); + if (isCallValid) + { + context->beginQuery(targetPacked, idPacked); + } + ANGLE_CAPTURE(BeginQueryEXT, isCallValid, context, targetPacked, idPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BeginTransformFeedbackContextANGLE(GLeglContext ctx, GLenum primitiveMode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBeginTransformFeedback, "context = %d, primitiveMode = %s", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, primitiveMode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode primitiveModePacked = PackParam<PrimitiveMode>(primitiveMode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBeginTransformFeedback(context, primitiveModePacked)); + if (isCallValid) + { + context->beginTransformFeedback(primitiveModePacked); + } + ANGLE_CAPTURE(BeginTransformFeedback, isCallValid, context, primitiveModePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindAttribLocationContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindAttribLocation, + "context = %d, program = %u, index = %u, name = 0x%016" PRIxPTR "", CID(context), program, + index, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindAttribLocation(context, programPacked, index, name)); + if (isCallValid) + { + context->bindAttribLocation(programPacked, index, name); + } + ANGLE_CAPTURE(BindAttribLocation, isCallValid, context, programPacked, index, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindBufferContextANGLE(GLeglContext ctx, GLenum target, GLuint buffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindBuffer, "context = %d, target = %s, buffer = %u", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), buffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindBuffer(context, targetPacked, bufferPacked)); + if (isCallValid) + { + context->bindBuffer(targetPacked, bufferPacked); + } + ANGLE_CAPTURE(BindBuffer, isCallValid, context, targetPacked, bufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindBufferBaseContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLuint buffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindBufferBase, "context = %d, target = %s, index = %u, buffer = %u", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), index, buffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindBufferBase(context, targetPacked, index, bufferPacked)); + if (isCallValid) + { + context->bindBufferBase(targetPacked, index, bufferPacked); + } + ANGLE_CAPTURE(BindBufferBase, isCallValid, context, targetPacked, index, bufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindBufferRange, + "context = %d, target = %s, index = %u, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), index, buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBindBufferRange(context, targetPacked, index, bufferPacked, offset, size)); + if (isCallValid) + { + context->bindBufferRange(targetPacked, index, bufferPacked, offset, size); + } + ANGLE_CAPTURE(BindBufferRange, isCallValid, context, targetPacked, index, bufferPacked, + offset, size); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindFragDataLocationEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLuint color, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindFragDataLocationEXT, + "context = %d, program = %u, color = %u, name = 0x%016" PRIxPTR "", CID(context), program, + color, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindFragDataLocationEXT(context, programPacked, color, name)); + if (isCallValid) + { + context->bindFragDataLocation(programPacked, color, name); + } + ANGLE_CAPTURE(BindFragDataLocationEXT, isCallValid, context, programPacked, color, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindFragDataLocationIndexedEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLuint colorNumber, + GLuint index, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindFragDataLocationIndexedEXT, + "context = %d, program = %u, colorNumber = %u, index = %u, name = 0x%016" PRIxPTR "", + CID(context), program, colorNumber, index, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindFragDataLocationIndexedEXT( + context, programPacked, colorNumber, index, name)); + if (isCallValid) + { + context->bindFragDataLocationIndexed(programPacked, colorNumber, index, name); + } + ANGLE_CAPTURE(BindFragDataLocationIndexedEXT, isCallValid, context, programPacked, + colorNumber, index, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindFramebufferContextANGLE(GLeglContext ctx, GLenum target, GLuint framebuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindFramebuffer, "context = %d, target = %s, framebuffer = %u", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), framebuffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindFramebuffer(context, target, framebufferPacked)); + if (isCallValid) + { + context->bindFramebuffer(target, framebufferPacked); + } + ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindFramebufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint framebuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindFramebufferOES, "context = %d, target = %s, framebuffer = %u", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), framebuffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindFramebufferOES(context, target, framebufferPacked)); + if (isCallValid) + { + context->bindFramebuffer(target, framebufferPacked); + } + ANGLE_CAPTURE(BindFramebufferOES, isCallValid, context, target, framebufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindImageTextureContextANGLE(GLeglContext ctx, + GLuint unit, + GLuint texture, + GLint level, + GLboolean layered, + GLint layer, + GLenum access, + GLenum format) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindImageTexture, + "context = %d, unit = %u, texture = %u, level = %d, layered = %s, layer = %d, access = " + "%s, format = %s", + CID(context), unit, texture, level, GLbooleanToString(layered), layer, + GLenumToString(GLenumGroup::BufferAccessARB, access), + GLenumToString(GLenumGroup::InternalFormat, format)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindImageTexture(context, unit, texturePacked, level, layered, + layer, access, format)); + if (isCallValid) + { + context->bindImageTexture(unit, texturePacked, level, layered, layer, access, format); + } + ANGLE_CAPTURE(BindImageTexture, isCallValid, context, unit, texturePacked, level, layered, + layer, access, format); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindProgramPipeline, "context = %d, pipeline = %u", CID(context), pipeline); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindProgramPipeline(context, pipelinePacked)); + if (isCallValid) + { + context->bindProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(BindProgramPipeline, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindProgramPipelineEXTContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindProgramPipelineEXT, "context = %d, pipeline = %u", CID(context), pipeline); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindProgramPipelineEXT(context, pipelinePacked)); + if (isCallValid) + { + context->bindProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(BindProgramPipelineEXT, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindRenderbufferContextANGLE(GLeglContext ctx, + GLenum target, + GLuint renderbuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindRenderbuffer, "context = %d, target = %s, renderbuffer = %u", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), renderbuffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindRenderbuffer(context, target, renderbufferPacked)); + if (isCallValid) + { + context->bindRenderbuffer(target, renderbufferPacked); + } + ANGLE_CAPTURE(BindRenderbuffer, isCallValid, context, target, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindRenderbufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint renderbuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindRenderbufferOES, "context = %d, target = %s, renderbuffer = %u", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), renderbuffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindRenderbufferOES(context, target, renderbufferPacked)); + if (isCallValid) + { + context->bindRenderbuffer(target, renderbufferPacked); + } + ANGLE_CAPTURE(BindRenderbufferOES, isCallValid, context, target, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindSamplerContextANGLE(GLeglContext ctx, GLuint unit, GLuint sampler) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindSampler, "context = %d, unit = %u, sampler = %u", CID(context), unit, + sampler); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindSampler(context, unit, samplerPacked)); + if (isCallValid) + { + context->bindSampler(unit, samplerPacked); + } + ANGLE_CAPTURE(BindSampler, isCallValid, context, unit, samplerPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindTextureContextANGLE(GLeglContext ctx, GLenum target, GLuint texture) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindTexture, "context = %d, target = %s, texture = %u", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), texture); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBindTexture(context, targetPacked, texturePacked)); + if (isCallValid) + { + context->bindTexture(targetPacked, texturePacked); + } + ANGLE_CAPTURE(BindTexture, isCallValid, context, targetPacked, texturePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindTransformFeedbackContextANGLE(GLeglContext ctx, GLenum target, GLuint id) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindTransformFeedback, "context = %d, target = %s, id = %u", CID(context), + GLenumToString(GLenumGroup::BindTransformFeedbackTarget, target), id); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TransformFeedbackID idPacked = PackParam<TransformFeedbackID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindTransformFeedback(context, target, idPacked)); + if (isCallValid) + { + context->bindTransformFeedback(target, idPacked); + } + ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, idPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindVertexArrayContextANGLE(GLeglContext ctx, GLuint array) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindVertexArray, "context = %d, array = %u", CID(context), array); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindVertexArray(context, arrayPacked)); + if (isCallValid) + { + context->bindVertexArray(arrayPacked); + } + ANGLE_CAPTURE(BindVertexArray, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindVertexArrayOES, "context = %d, array = %u", CID(context), array); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBindVertexArrayOES(context, arrayPacked)); + if (isCallValid) + { + context->bindVertexArray(arrayPacked); + } + ANGLE_CAPTURE(BindVertexArrayOES, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindVertexBufferContextANGLE(GLeglContext ctx, + GLuint bindingindex, + GLuint buffer, + GLintptr offset, + GLsizei stride) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindVertexBuffer, + "context = %d, bindingindex = %u, buffer = %u, offset = %llu, stride = %d", CID(context), + bindingindex, buffer, static_cast<unsigned long long>(offset), stride); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBindVertexBuffer(context, bindingindex, bufferPacked, offset, stride)); + if (isCallValid) + { + context->bindVertexBuffer(bindingindex, bufferPacked, offset, stride); + } + ANGLE_CAPTURE(BindVertexBuffer, isCallValid, context, bindingindex, bufferPacked, offset, + stride); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendBarrierContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendBarrier, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateBlendBarrier(context)); + if (isCallValid) + { + context->blendBarrier(); + } + ANGLE_CAPTURE(BlendBarrier, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendBarrierKHRContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendBarrierKHR, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateBlendBarrierKHR(context)); + if (isCallValid) + { + context->blendBarrier(); + } + ANGLE_CAPTURE(BlendBarrierKHR, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_BlendColorContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendColor, "context = %d, red = %f, green = %f, blue = %f, alpha = %f", + CID(context), red, green, blue, alpha); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendColor(context, red, green, blue, alpha)); + if (isCallValid) + { + context->blendColor(red, green, blue, alpha); + } + ANGLE_CAPTURE(BlendColor, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationContextANGLE(GLeglContext ctx, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquation, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateBlendEquation(context, mode)); + if (isCallValid) + { + context->blendEquation(mode); + } + ANGLE_CAPTURE(BlendEquation, isCallValid, context, mode); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationSeparateContextANGLE(GLeglContext ctx, + GLenum modeRGB, + GLenum modeAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquationSeparate, "context = %d, modeRGB = %s, modeAlpha = %s", + CID(context), GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparate(context, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparate(modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparate, isCallValid, context, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationSeparateiContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquationSeparatei, "context = %d, buf = %u, modeRGB = %s, modeAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparatei(context, buf, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparatei(buf, modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparatei, isCallValid, context, buf, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationSeparateiEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquationSeparateiEXT, + "context = %d, buf = %u, modeRGB = %s, modeAlpha = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparateiEXT(context, buf, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparatei(buf, modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparateiEXT, isCallValid, context, buf, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationSeparateiOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquationSeparateiOES, + "context = %d, buf = %u, modeRGB = %s, modeAlpha = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB), + GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlendEquationSeparateiOES(context, buf, modeRGB, modeAlpha)); + if (isCallValid) + { + context->blendEquationSeparatei(buf, modeRGB, modeAlpha); + } + ANGLE_CAPTURE(BlendEquationSeparateiOES, isCallValid, context, buf, modeRGB, modeAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationiContextANGLE(GLeglContext ctx, GLuint buf, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquationi, "context = %d, buf = %u, mode = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendEquationi(context, buf, mode)); + if (isCallValid) + { + context->blendEquationi(buf, mode); + } + ANGLE_CAPTURE(BlendEquationi, isCallValid, context, buf, mode); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationiEXTContextANGLE(GLeglContext ctx, GLuint buf, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquationiEXT, "context = %d, buf = %u, mode = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendEquationiEXT(context, buf, mode)); + if (isCallValid) + { + context->blendEquationi(buf, mode); + } + ANGLE_CAPTURE(BlendEquationiEXT, isCallValid, context, buf, mode); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendEquationiOESContextANGLE(GLeglContext ctx, GLuint buf, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendEquationiOES, "context = %d, buf = %u, mode = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendEquationModeEXT, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendEquationiOES(context, buf, mode)); + if (isCallValid) + { + context->blendEquationi(buf, mode); + } + ANGLE_CAPTURE(BlendEquationiOES, isCallValid, context, buf, mode); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFuncContextANGLE(GLeglContext ctx, GLenum sfactor, GLenum dfactor) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFunc, "context = %d, sfactor = %s, dfactor = %s", CID(context), + GLenumToString(GLenumGroup::BlendingFactor, sfactor), + GLenumToString(GLenumGroup::BlendingFactor, dfactor)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunc(context, sfactor, dfactor)); + if (isCallValid) + { + context->blendFunc(sfactor, dfactor); + } + ANGLE_CAPTURE(BlendFunc, isCallValid, context, sfactor, dfactor); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFuncSeparateContextANGLE(GLeglContext ctx, + GLenum sfactorRGB, + GLenum dfactorRGB, + GLenum sfactorAlpha, + GLenum dfactorAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFuncSeparate, + "context = %d, sfactorRGB = %s, dfactorRGB = %s, sfactorAlpha = %s, dfactorAlpha = %s", + CID(context), GLenumToString(GLenumGroup::BlendingFactor, sfactorRGB), + GLenumToString(GLenumGroup::BlendingFactor, dfactorRGB), + GLenumToString(GLenumGroup::BlendingFactor, sfactorAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dfactorAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFuncSeparate(context, sfactorRGB, dfactorRGB, + sfactorAlpha, dfactorAlpha)); + if (isCallValid) + { + context->blendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparate, isCallValid, context, sfactorRGB, dfactorRGB, sfactorAlpha, + dfactorAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFuncSeparateiContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFuncSeparatei, + "context = %d, buf = %u, srcRGB = %s, dstRGB = %s, srcAlpha = %s, dstAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendingFactor, srcRGB), + GLenumToString(GLenumGroup::BlendingFactor, dstRGB), + GLenumToString(GLenumGroup::BlendingFactor, srcAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dstAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBlendFuncSeparatei(context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha)); + if (isCallValid) + { + context->blendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparatei, isCallValid, context, buf, srcRGB, dstRGB, srcAlpha, + dstAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFuncSeparateiEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFuncSeparateiEXT, + "context = %d, buf = %u, srcRGB = %s, dstRGB = %s, srcAlpha = %s, dstAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendingFactor, srcRGB), + GLenumToString(GLenumGroup::BlendingFactor, dstRGB), + GLenumToString(GLenumGroup::BlendingFactor, srcAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dstAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBlendFuncSeparateiEXT(context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha)); + if (isCallValid) + { + context->blendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparateiEXT, isCallValid, context, buf, srcRGB, dstRGB, srcAlpha, + dstAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFuncSeparateiOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFuncSeparateiOES, + "context = %d, buf = %u, srcRGB = %s, dstRGB = %s, srcAlpha = %s, dstAlpha = %s", + CID(context), buf, GLenumToString(GLenumGroup::BlendingFactor, srcRGB), + GLenumToString(GLenumGroup::BlendingFactor, dstRGB), + GLenumToString(GLenumGroup::BlendingFactor, srcAlpha), + GLenumToString(GLenumGroup::BlendingFactor, dstAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBlendFuncSeparateiOES(context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha)); + if (isCallValid) + { + context->blendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + } + ANGLE_CAPTURE(BlendFuncSeparateiOES, isCallValid, context, buf, srcRGB, dstRGB, srcAlpha, + dstAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFunciContextANGLE(GLeglContext ctx, GLuint buf, GLenum src, GLenum dst) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFunci, "context = %d, buf = %u, src = %s, dst = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendingFactor, src), + GLenumToString(GLenumGroup::BlendingFactor, dst)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunci(context, buf, src, dst)); + if (isCallValid) + { + context->blendFunci(buf, src, dst); + } + ANGLE_CAPTURE(BlendFunci, isCallValid, context, buf, src, dst); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFunciEXTContextANGLE(GLeglContext ctx, GLuint buf, GLenum src, GLenum dst) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFunciEXT, "context = %d, buf = %u, src = %s, dst = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendingFactor, src), + GLenumToString(GLenumGroup::BlendingFactor, dst)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunciEXT(context, buf, src, dst)); + if (isCallValid) + { + context->blendFunci(buf, src, dst); + } + ANGLE_CAPTURE(BlendFunciEXT, isCallValid, context, buf, src, dst); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlendFunciOESContextANGLE(GLeglContext ctx, GLuint buf, GLenum src, GLenum dst) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlendFunciOES, "context = %d, buf = %u, src = %s, dst = %s", CID(context), buf, + GLenumToString(GLenumGroup::BlendingFactor, src), + GLenumToString(GLenumGroup::BlendingFactor, dst)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateBlendFunciOES(context, buf, src, dst)); + if (isCallValid) + { + context->blendFunci(buf, src, dst); + } + ANGLE_CAPTURE(BlendFunciOES, isCallValid, context, buf, src, dst); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlitFramebufferContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlitFramebuffer, + "context = %d, srcX0 = %d, srcY0 = %d, srcX1 = %d, srcY1 = %d, dstX0 = %d, dstY0 = %d, " + "dstX1 = %d, dstY1 = %d, mask = %s, filter = %s", + CID(context), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(), + GLenumToString(GLenumGroup::BlitFramebufferFilter, filter)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlitFramebuffer(context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter)); + if (isCallValid) + { + context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); + } + ANGLE_CAPTURE(BlitFramebuffer, isCallValid, context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlitFramebufferANGLEContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlitFramebufferANGLE, + "context = %d, srcX0 = %d, srcY0 = %d, srcX1 = %d, srcY1 = %d, dstX0 = %d, dstY0 = %d, " + "dstX1 = %d, dstY1 = %d, mask = %s, filter = %s", + CID(context), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(), + GLenumToString(GLenumGroup::BlitFramebufferFilter, filter)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlitFramebufferANGLE(context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter)); + if (isCallValid) + { + context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); + } + ANGLE_CAPTURE(BlitFramebufferANGLE, isCallValid, context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BlitFramebufferNVContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBlitFramebufferNV, + "context = %d, srcX0 = %d, srcY0 = %d, srcX1 = %d, srcY1 = %d, dstX0 = %d, dstY0 = %d, " + "dstX1 = %d, dstY1 = %d, mask = %s, filter = %s", + CID(context), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(), + GLenumToString(GLenumGroup::BlitFramebufferFilter, filter)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBlitFramebufferNV(context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter)); + if (isCallValid) + { + context->blitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); + } + ANGLE_CAPTURE(BlitFramebufferNV, isCallValid, context, srcX0, srcY0, srcX1, srcY1, dstX0, + dstY0, dstX1, dstY1, mask, filter); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BufferDataContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + const void *data, + GLenum usage) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBufferData, + "context = %d, target = %s, size = %llu, data = 0x%016" PRIxPTR ", usage = %s", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(size), (uintptr_t)data, + GLenumToString(GLenumGroup::BufferUsageARB, usage)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + BufferUsage usagePacked = PackParam<BufferUsage>(usage); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferData(context, targetPacked, size, data, usagePacked)); + if (isCallValid) + { + context->bufferData(targetPacked, size, data, usagePacked); + } + ANGLE_CAPTURE(BufferData, isCallValid, context, targetPacked, size, data, usagePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BufferStorageEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + const void *data, + GLbitfield flags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBufferStorageEXT, + "context = %d, target = %s, size = %llu, data = 0x%016" PRIxPTR ", flags = %s", + CID(context), GLenumToString(GLenumGroup::BufferStorageTarget, target), + static_cast<unsigned long long>(size), (uintptr_t)data, + GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferStorageEXT(context, targetPacked, size, data, flags)); + if (isCallValid) + { + context->bufferStorage(targetPacked, size, data, flags); + } + ANGLE_CAPTURE(BufferStorageEXT, isCallValid, context, targetPacked, size, data, flags); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BufferStorageExternalEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBufferStorageExternalEXT, + "context = %d, target = %s, offset = %llu, size = %llu, clientBuffer = 0x%016" PRIxPTR + ", flags = %s", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size), + (uintptr_t)clientBuffer, + GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferStorageExternalEXT(context, targetPacked, offset, size, + clientBuffer, flags)); + if (isCallValid) + { + context->bufferStorageExternal(targetPacked, offset, size, clientBuffer, flags); + } + ANGLE_CAPTURE(BufferStorageExternalEXT, isCallValid, context, targetPacked, offset, size, + clientBuffer, flags); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BufferStorageMemEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + GLuint memory, + GLuint64 offset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBufferStorageMemEXT, + "context = %d, target = %s, size = %llu, memory = %u, offset = %llu", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(size), memory, static_cast<unsigned long long>(offset)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBufferStorageMemEXT(context, targetPacked, size, memoryPacked, offset)); + if (isCallValid) + { + context->bufferStorageMem(targetPacked, size, memoryPacked, offset); + } + ANGLE_CAPTURE(BufferStorageMemEXT, isCallValid, context, targetPacked, size, memoryPacked, + offset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BufferSubDataContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr size, + const void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBufferSubData, + "context = %d, target = %s, offset = %llu, size = %llu, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size), + (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateBufferSubData(context, targetPacked, offset, size, data)); + if (isCallValid) + { + context->bufferSubData(targetPacked, offset, size, data); + } + ANGLE_CAPTURE(BufferSubData, isCallValid, context, targetPacked, offset, size, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLenum GL_APIENTRY GL_CheckFramebufferStatusContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCheckFramebufferStatus, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target)); + + GLenum returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCheckFramebufferStatus(context, target)); + if (isCallValid) + { + returnValue = context->checkFramebufferStatus(target); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatus, GLenum>(); + } + ANGLE_CAPTURE(CheckFramebufferStatus, isCallValid, context, target, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatus, GLenum>(); + } + return returnValue; +} + +GLenum GL_APIENTRY GL_CheckFramebufferStatusOESContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCheckFramebufferStatusOES, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target)); + + GLenum returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCheckFramebufferStatusOES(context, target)); + if (isCallValid) + { + returnValue = context->checkFramebufferStatus(target); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatusOES, GLenum>(); + } + ANGLE_CAPTURE(CheckFramebufferStatusOES, isCallValid, context, target, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatusOES, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_ClearContextANGLE(GLeglContext ctx, GLbitfield mask) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClear, "context = %d, mask = %s", CID(context), + GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClear(context, mask)); + if (isCallValid) + { + context->clear(mask); + } + ANGLE_CAPTURE(Clear, isCallValid, context, mask); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearBufferfiContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + GLfloat depth, + GLint stencil) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearBufferfi, + "context = %d, buffer = %s, drawbuffer = %d, depth = %f, stencil = %d", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, depth, stencil); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferfi(context, buffer, drawbuffer, depth, stencil)); + if (isCallValid) + { + context->clearBufferfi(buffer, drawbuffer, depth, stencil); + } + ANGLE_CAPTURE(ClearBufferfi, isCallValid, context, buffer, drawbuffer, depth, stencil); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearBufferfvContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearBufferfv, + "context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferfv(context, buffer, drawbuffer, value)); + if (isCallValid) + { + context->clearBufferfv(buffer, drawbuffer, value); + } + ANGLE_CAPTURE(ClearBufferfv, isCallValid, context, buffer, drawbuffer, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearBufferivContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearBufferiv, + "context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferiv(context, buffer, drawbuffer, value)); + if (isCallValid) + { + context->clearBufferiv(buffer, drawbuffer, value); + } + ANGLE_CAPTURE(ClearBufferiv, isCallValid, context, buffer, drawbuffer, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearBufferuivContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearBufferuiv, + "context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateClearBufferuiv(context, buffer, drawbuffer, value)); + if (isCallValid) + { + context->clearBufferuiv(buffer, drawbuffer, value); + } + ANGLE_CAPTURE(ClearBufferuiv, isCallValid, context, buffer, drawbuffer, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_ClearColorContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearColor, "context = %d, red = %f, green = %f, blue = %f, alpha = %f", + CID(context), red, green, blue, alpha); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClearColor(context, red, green, blue, alpha)); + if (isCallValid) + { + context->clearColor(red, green, blue, alpha); + } + ANGLE_CAPTURE(ClearColor, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearColorxContextANGLE(GLeglContext ctx, + GLfixed red, + GLfixed green, + GLfixed blue, + GLfixed alpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearColorx, + "context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X", CID(context), red, + green, blue, alpha); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClearColorx(context, red, green, blue, alpha)); + if (isCallValid) + { + context->clearColorx(red, green, blue, alpha); + } + ANGLE_CAPTURE(ClearColorx, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearDepthfContextANGLE(GLeglContext ctx, GLfloat d) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearDepthf, "context = %d, d = %f", CID(context), d); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClearDepthf(context, d)); + if (isCallValid) + { + context->clearDepthf(d); + } + ANGLE_CAPTURE(ClearDepthf, isCallValid, context, d); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearDepthxContextANGLE(GLeglContext ctx, GLfixed depth) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearDepthx, "context = %d, depth = 0x%X", CID(context), depth); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClearDepthx(context, depth)); + if (isCallValid) + { + context->clearDepthx(depth); + } + ANGLE_CAPTURE(ClearDepthx, isCallValid, context, depth); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClearStencilContextANGLE(GLeglContext ctx, GLint s) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClearStencil, "context = %d, s = %d", CID(context), s); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClearStencil(context, s)); + if (isCallValid) + { + context->clearStencil(s); + } + ANGLE_CAPTURE(ClearStencil, isCallValid, context, s); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClientActiveTextureContextANGLE(GLeglContext ctx, GLenum texture) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClientActiveTexture, "context = %d, texture = %s", CID(context), + GLenumToString(GLenumGroup::TextureUnit, texture)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClientActiveTexture(context, texture)); + if (isCallValid) + { + context->clientActiveTexture(texture); + } + ANGLE_CAPTURE(ClientActiveTexture, isCallValid, context, texture); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLenum GL_APIENTRY GL_ClientWaitSyncContextANGLE(GLeglContext ctx, + GLsync sync, + GLbitfield flags, + GLuint64 timeout) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClientWaitSync, + "context = %d, sync = 0x%016" PRIxPTR ", flags = %s, timeout = %llu", CID(context), + (uintptr_t)sync, GLbitfieldToString(GLenumGroup::SyncObjectMask, flags).c_str(), + static_cast<unsigned long long>(timeout)); + + GLenum returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClientWaitSync(context, sync, flags, timeout)); + if (isCallValid) + { + returnValue = context->clientWaitSync(sync, flags, timeout); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLClientWaitSync, GLenum>(); + } + ANGLE_CAPTURE(ClientWaitSync, isCallValid, context, sync, flags, timeout, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLClientWaitSync, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_ClipControlEXTContextANGLE(GLeglContext ctx, GLenum origin, GLenum depth) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClipControlEXT, "context = %d, origin = %s, depth = %s", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, origin), + GLenumToString(GLenumGroup::DefaultGroup, depth)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClipControlEXT(context, origin, depth)); + if (isCallValid) + { + context->clipControl(origin, depth); + } + ANGLE_CAPTURE(ClipControlEXT, isCallValid, context, origin, depth); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClipPlanefContextANGLE(GLeglContext ctx, GLenum p, const GLfloat *eqn) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClipPlanef, "context = %d, p = %s, eqn = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::ClipPlaneName, p), (uintptr_t)eqn); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateClipPlanef(context, p, eqn)); + if (isCallValid) + { + context->clipPlanef(p, eqn); + } + ANGLE_CAPTURE(ClipPlanef, isCallValid, context, p, eqn); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ClipPlanexContextANGLE(GLeglContext ctx, GLenum plane, const GLfixed *equation) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateClipPlanex(context, plane, equation)); + if (isCallValid) + { + context->clipPlanex(plane, equation); + } + ANGLE_CAPTURE(ClipPlanex, isCallValid, context, plane, equation); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_Color4fContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColor4f, "context = %d, red = %f, green = %f, blue = %f, alpha = %f", + CID(context), red, green, blue, alpha); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColor4f(context, red, green, blue, alpha)); + if (isCallValid) + { + context->color4f(red, green, blue, alpha); + } + ANGLE_CAPTURE(Color4f, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_Color4ubContextANGLE(GLeglContext ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColor4ub, "context = %d, red = %d, green = %d, blue = %d, alpha = %d", + CID(context), red, green, blue, alpha); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColor4ub(context, red, green, blue, alpha)); + if (isCallValid) + { + context->color4ub(red, green, blue, alpha); + } + ANGLE_CAPTURE(Color4ub, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_Color4xContextANGLE(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColor4x, "context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X", + CID(context), red, green, blue, alpha); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColor4x(context, red, green, blue, alpha)); + if (isCallValid) + { + context->color4x(red, green, blue, alpha); + } + ANGLE_CAPTURE(Color4x, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ColorMaskContextANGLE(GLeglContext ctx, + GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColorMask, "context = %d, red = %s, green = %s, blue = %s, alpha = %s", + CID(context), GLbooleanToString(red), GLbooleanToString(green), GLbooleanToString(blue), + GLbooleanToString(alpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMask(context, red, green, blue, alpha)); + if (isCallValid) + { + context->colorMask(red, green, blue, alpha); + } + ANGLE_CAPTURE(ColorMask, isCallValid, context, red, green, blue, alpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ColorMaskiContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColorMaski, "context = %d, index = %u, r = %s, g = %s, b = %s, a = %s", + CID(context), index, GLbooleanToString(r), GLbooleanToString(g), GLbooleanToString(b), + GLbooleanToString(a)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMaski(context, index, r, g, b, a)); + if (isCallValid) + { + context->colorMaski(index, r, g, b, a); + } + ANGLE_CAPTURE(ColorMaski, isCallValid, context, index, r, g, b, a); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ColorMaskiEXTContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColorMaskiEXT, "context = %d, index = %u, r = %s, g = %s, b = %s, a = %s", + CID(context), index, GLbooleanToString(r), GLbooleanToString(g), GLbooleanToString(b), + GLbooleanToString(a)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMaskiEXT(context, index, r, g, b, a)); + if (isCallValid) + { + context->colorMaski(index, r, g, b, a); + } + ANGLE_CAPTURE(ColorMaskiEXT, isCallValid, context, index, r, g, b, a); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ColorMaskiOESContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColorMaskiOES, "context = %d, index = %u, r = %s, g = %s, b = %s, a = %s", + CID(context), index, GLbooleanToString(r), GLbooleanToString(g), GLbooleanToString(b), + GLbooleanToString(a)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateColorMaskiOES(context, index, r, g, b, a)); + if (isCallValid) + { + context->colorMaski(index, r, g, b, a); + } + ANGLE_CAPTURE(ColorMaskiOES, isCallValid, context, index, r, g, b, a); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ColorPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLColorPointer, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::ColorPointerType, type), stride, + (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateColorPointer(context, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->colorPointer(size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(ColorPointer, isCallValid, context, size, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompileShaderContextANGLE(GLeglContext ctx, GLuint shader) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompileShader, "context = %d, shader = %u", CID(context), shader); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompileShader(context, shaderPacked)); + if (isCallValid) + { + context->compileShader(shaderPacked); + } + ANGLE_CAPTURE(CompileShader, isCallValid, context, shaderPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexImage2D, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "border = %d, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, border, + imageSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexImage2D(context, targetPacked, level, internalformat, width, + height, border, imageSize, data)); + if (isCallValid) + { + context->compressedTexImage2D(targetPacked, level, internalformat, width, height, + border, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexImage2D, isCallValid, context, targetPacked, level, + internalformat, width, height, border, imageSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexImage3D, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, border, + imageSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexImage3D(context, targetPacked, level, internalformat, width, + height, depth, border, imageSize, data)); + if (isCallValid) + { + context->compressedTexImage3D(targetPacked, level, internalformat, width, height, depth, + border, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexImage3D, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, imageSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexImage3DOES, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, border, + imageSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexImage3DOES(context, targetPacked, level, internalformat, width, + height, depth, border, imageSize, data)); + if (isCallValid) + { + context->compressedTexImage3D(targetPacked, level, internalformat, width, height, depth, + border, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexImage3DOES, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, imageSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexSubImage2D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::PixelFormat, format), imageSize, + (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedTexSubImage2D(context, targetPacked, level, xoffset, yoffset, width, + height, format, imageSize, data)); + if (isCallValid) + { + context->compressedTexSubImage2D(targetPacked, level, xoffset, yoffset, width, height, + format, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage2D, isCallValid, context, targetPacked, level, xoffset, + yoffset, width, height, format, imageSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexSubImage3D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + imageSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCompressedTexSubImage3D(context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, + format, imageSize, data)); + if (isCallValid) + { + context->compressedTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage3D, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, format, imageSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexSubImage3DOES, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, imageSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + imageSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCompressedTexSubImage3DOES( + context, targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data)); + if (isCallValid) + { + context->compressedTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage3DOES, isCallValid, context, targetPacked, level, + xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyBufferSubDataContextANGLE(GLeglContext ctx, + GLenum readTarget, + GLenum writeTarget, + GLintptr readOffset, + GLintptr writeOffset, + GLsizeiptr size) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyBufferSubData, + "context = %d, readTarget = %s, writeTarget = %s, readOffset = %llu, writeOffset = %llu, " + "size = %llu", + CID(context), GLenumToString(GLenumGroup::CopyBufferSubDataTarget, readTarget), + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, writeTarget), + static_cast<unsigned long long>(readOffset), static_cast<unsigned long long>(writeOffset), + static_cast<unsigned long long>(size)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding readTargetPacked = PackParam<BufferBinding>(readTarget); + BufferBinding writeTargetPacked = PackParam<BufferBinding>(writeTarget); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyBufferSubData(context, readTargetPacked, writeTargetPacked, + readOffset, writeOffset, size)); + if (isCallValid) + { + context->copyBufferSubData(readTargetPacked, writeTargetPacked, readOffset, writeOffset, + size); + } + ANGLE_CAPTURE(CopyBufferSubData, isCallValid, context, readTargetPacked, writeTargetPacked, + readOffset, writeOffset, size); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyImageSubDataContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyImageSubData, + "context = %d, srcName = %u, srcTarget = %s, srcLevel = %d, srcX = %d, srcY = %d, srcZ = " + "%d, dstName = %u, dstTarget = %s, dstLevel = %d, dstX = %d, dstY = %d, dstZ = %d, " + "srcWidth = %d, srcHeight = %d, srcDepth = %d", + CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget), + srcLevel, srcX, srcY, srcZ, dstName, + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY, + dstZ, srcWidth, srcHeight, srcDepth); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyImageSubData(context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, + dstY, dstZ, srcWidth, srcHeight, srcDepth)); + if (isCallValid) + { + context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); + } + ANGLE_CAPTURE(CopyImageSubData, isCallValid, context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyImageSubDataEXTContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyImageSubDataEXT, + "context = %d, srcName = %u, srcTarget = %s, srcLevel = %d, srcX = %d, srcY = %d, srcZ = " + "%d, dstName = %u, dstTarget = %s, dstLevel = %d, dstX = %d, dstY = %d, dstZ = %d, " + "srcWidth = %d, srcHeight = %d, srcDepth = %d", + CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget), + srcLevel, srcX, srcY, srcZ, dstName, + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY, + dstZ, srcWidth, srcHeight, srcDepth); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCopyImageSubDataEXT(context, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, + dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth)); + if (isCallValid) + { + context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); + } + ANGLE_CAPTURE(CopyImageSubDataEXT, isCallValid, context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyImageSubDataOESContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyImageSubDataOES, + "context = %d, srcName = %u, srcTarget = %s, srcLevel = %d, srcX = %d, srcY = %d, srcZ = " + "%d, dstName = %u, dstTarget = %s, dstLevel = %d, dstX = %d, dstY = %d, dstZ = %d, " + "srcWidth = %d, srcHeight = %d, srcDepth = %d", + CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget), + srcLevel, srcX, srcY, srcZ, dstName, + GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY, + dstZ, srcWidth, srcHeight, srcDepth); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCopyImageSubDataOES(context, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, + dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth)); + if (isCallValid) + { + context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); + } + ANGLE_CAPTURE(CopyImageSubDataOES, isCallValid, context, srcName, srcTarget, srcLevel, srcX, + srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyTexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyTexImage2D, + "context = %d, target = %s, level = %d, internalformat = %s, x = %d, y = %d, width = %d, " + "height = %d, border = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), x, y, width, height, border); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexImage2D(context, targetPacked, level, internalformat, x, + y, width, height, border)); + if (isCallValid) + { + context->copyTexImage2D(targetPacked, level, internalformat, x, y, width, height, + border); + } + ANGLE_CAPTURE(CopyTexImage2D, isCallValid, context, targetPacked, level, internalformat, x, + y, width, height, border); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyTexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyTexSubImage2D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, x = %d, y = %d, " + "width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + x, y, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexSubImage2D(context, targetPacked, level, xoffset, + yoffset, x, y, width, height)); + if (isCallValid) + { + context->copyTexSubImage2D(targetPacked, level, xoffset, yoffset, x, y, width, height); + } + ANGLE_CAPTURE(CopyTexSubImage2D, isCallValid, context, targetPacked, level, xoffset, + yoffset, x, y, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyTexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyTexSubImage3D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, x = " + "%d, y = %d, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, x, y, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexSubImage3D(context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height)); + if (isCallValid) + { + context->copyTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, x, y, width, + height); + } + ANGLE_CAPTURE(CopyTexSubImage3D, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyTexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyTexSubImage3DOES, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, x = " + "%d, y = %d, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + zoffset, x, y, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexSubImage3DOES(context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height)); + if (isCallValid) + { + context->copyTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, x, y, width, + height); + } + ANGLE_CAPTURE(CopyTexSubImage3DOES, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, x, y, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CreateMemoryObjectsEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *memoryObjects) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCreateMemoryObjectsEXT, + "context = %d, n = %d, memoryObjects = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)memoryObjects); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MemoryObjectID *memoryObjectsPacked = PackParam<MemoryObjectID *>(memoryObjects); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCreateMemoryObjectsEXT(context, n, memoryObjectsPacked)); + if (isCallValid) + { + context->createMemoryObjects(n, memoryObjectsPacked); + } + ANGLE_CAPTURE(CreateMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLuint GL_APIENTRY GL_CreateProgramContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCreateProgram, "context = %d", CID(context)); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateCreateProgram(context)); + if (isCallValid) + { + returnValue = context->createProgram(); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateProgram, GLuint>(); + } + ANGLE_CAPTURE(CreateProgram, isCallValid, context, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateProgram, GLuint>(); + } + return returnValue; +} + +GLuint GL_APIENTRY GL_CreateShaderContextANGLE(GLeglContext ctx, GLenum type) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCreateShader, "context = %d, type = %s", CID(context), + GLenumToString(GLenumGroup::ShaderType, type)); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderType typePacked = PackParam<ShaderType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateCreateShader(context, typePacked)); + if (isCallValid) + { + returnValue = context->createShader(typePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShader, GLuint>(); + } + ANGLE_CAPTURE(CreateShader, isCallValid, context, typePacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShader, GLuint>(); + } + return returnValue; +} + +GLuint GL_APIENTRY GL_CreateShaderProgramvContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei count, + const GLchar *const *strings) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCreateShaderProgramv, + "context = %d, type = %s, count = %d, strings = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::ShaderType, type), count, (uintptr_t)strings); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderType typePacked = PackParam<ShaderType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCreateShaderProgramv(context, typePacked, count, strings)); + if (isCallValid) + { + returnValue = context->createShaderProgramv(typePacked, count, strings); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramv, GLuint>(); + } + ANGLE_CAPTURE(CreateShaderProgramv, isCallValid, context, typePacked, count, strings, + returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramv, GLuint>(); + } + return returnValue; +} + +GLuint GL_APIENTRY GL_CreateShaderProgramvEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei count, + const GLchar **strings) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCreateShaderProgramvEXT, + "context = %d, type = %s, count = %d, strings = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::ShaderType, type), count, (uintptr_t)strings); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderType typePacked = PackParam<ShaderType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCreateShaderProgramvEXT(context, typePacked, count, strings)); + if (isCallValid) + { + returnValue = context->createShaderProgramv(typePacked, count, strings); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramvEXT, GLuint>(); + } + ANGLE_CAPTURE(CreateShaderProgramvEXT, isCallValid, context, typePacked, count, strings, + returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCreateShaderProgramvEXT, GLuint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_CullFaceContextANGLE(GLeglContext ctx, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCullFace, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::CullFaceMode, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + CullFaceMode modePacked = PackParam<CullFaceMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateCullFace(context, modePacked)); + if (isCallValid) + { + context->cullFace(modePacked); + } + ANGLE_CAPTURE(CullFace, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CurrentPaletteMatrixOESContextANGLE(GLeglContext ctx, GLuint matrixpaletteindex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCurrentPaletteMatrixOES, "context = %d, matrixpaletteindex = %u", CID(context), + matrixpaletteindex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCurrentPaletteMatrixOES(context, matrixpaletteindex)); + if (isCallValid) + { + context->currentPaletteMatrix(matrixpaletteindex); + } + ANGLE_CAPTURE(CurrentPaletteMatrixOES, isCallValid, context, matrixpaletteindex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DebugMessageCallbackContextANGLE(GLeglContext ctx, + GLDEBUGPROC callback, + const void *userParam) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDebugMessageCallback, + "context = %d, callback = 0x%016" PRIxPTR ", userParam = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)callback, (uintptr_t)userParam); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDebugMessageCallback(context, callback, userParam)); + if (isCallValid) + { + context->debugMessageCallback(callback, userParam); + } + ANGLE_CAPTURE(DebugMessageCallback, isCallValid, context, callback, userParam); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DebugMessageCallbackKHRContextANGLE(GLeglContext ctx, + GLDEBUGPROCKHR callback, + const void *userParam) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDebugMessageCallbackKHR, + "context = %d, callback = 0x%016" PRIxPTR ", userParam = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)callback, (uintptr_t)userParam); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDebugMessageCallbackKHR(context, callback, userParam)); + if (isCallValid) + { + context->debugMessageCallback(callback, userParam); + } + ANGLE_CAPTURE(DebugMessageCallbackKHR, isCallValid, context, callback, userParam); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DebugMessageControlContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDebugMessageControl, + "context = %d, source = %s, type = %s, severity = %s, count = %d, ids = 0x%016" PRIxPTR + ", enabled = %s", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), + GLenumToString(GLenumGroup::DebugSeverity, severity), count, (uintptr_t)ids, + GLbooleanToString(enabled)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageControl(context, source, type, severity, count, ids, enabled)); + if (isCallValid) + { + context->debugMessageControl(source, type, severity, count, ids, enabled); + } + ANGLE_CAPTURE(DebugMessageControl, isCallValid, context, source, type, severity, count, ids, + enabled); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DebugMessageControlKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDebugMessageControlKHR, + "context = %d, source = %s, type = %s, severity = %s, count = %d, ids = 0x%016" PRIxPTR + ", enabled = %s", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), + GLenumToString(GLenumGroup::DebugSeverity, severity), count, (uintptr_t)ids, + GLbooleanToString(enabled)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageControlKHR(context, source, type, severity, count, ids, enabled)); + if (isCallValid) + { + context->debugMessageControl(source, type, severity, count, ids, enabled); + } + ANGLE_CAPTURE(DebugMessageControlKHR, isCallValid, context, source, type, severity, count, + ids, enabled); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DebugMessageInsertContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDebugMessageInsert, + "context = %d, source = %s, type = %s, id = %u, severity = %s, length = %d, buf = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), id, + GLenumToString(GLenumGroup::DebugSeverity, severity), length, (uintptr_t)buf); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageInsert(context, source, type, id, severity, length, buf)); + if (isCallValid) + { + context->debugMessageInsert(source, type, id, severity, length, buf); + } + ANGLE_CAPTURE(DebugMessageInsert, isCallValid, context, source, type, id, severity, length, + buf); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DebugMessageInsertKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDebugMessageInsertKHR, + "context = %d, source = %s, type = %s, id = %u, severity = %s, length = %d, buf = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), + GLenumToString(GLenumGroup::DebugType, type), id, + GLenumToString(GLenumGroup::DebugSeverity, severity), length, (uintptr_t)buf); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDebugMessageInsertKHR(context, source, type, id, severity, length, buf)); + if (isCallValid) + { + context->debugMessageInsert(source, type, id, severity, length, buf); + } + ANGLE_CAPTURE(DebugMessageInsertKHR, isCallValid, context, source, type, id, severity, + length, buf); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteBuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *buffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteBuffers, "context = %d, n = %d, buffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)buffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const BufferID *buffersPacked = PackParam<const BufferID *>(buffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteBuffers(context, n, buffersPacked)); + if (isCallValid) + { + context->deleteBuffers(n, buffersPacked); + } + ANGLE_CAPTURE(DeleteBuffers, isCallValid, context, n, buffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteFencesNVContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *fences) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteFencesNV, "context = %d, n = %d, fences = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)fences); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const FenceNVID *fencesPacked = PackParam<const FenceNVID *>(fences); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteFencesNV(context, n, fencesPacked)); + if (isCallValid) + { + context->deleteFencesNV(n, fencesPacked); + } + ANGLE_CAPTURE(DeleteFencesNV, isCallValid, context, n, fencesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteFramebuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *framebuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteFramebuffers, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)framebuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const FramebufferID *framebuffersPacked = PackParam<const FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteFramebuffers(context, n, framebuffersPacked)); + if (isCallValid) + { + context->deleteFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteFramebuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *framebuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteFramebuffersOES, + "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)framebuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const FramebufferID *framebuffersPacked = PackParam<const FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteFramebuffersOES(context, n, framebuffersPacked)); + if (isCallValid) + { + context->deleteFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(DeleteFramebuffersOES, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteMemoryObjectsEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *memoryObjects) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteMemoryObjectsEXT, + "context = %d, n = %d, memoryObjects = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)memoryObjects); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const MemoryObjectID *memoryObjectsPacked = + PackParam<const MemoryObjectID *>(memoryObjects); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteMemoryObjectsEXT(context, n, memoryObjectsPacked)); + if (isCallValid) + { + context->deleteMemoryObjects(n, memoryObjectsPacked); + } + ANGLE_CAPTURE(DeleteMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteProgram, "context = %d, program = %u", CID(context), program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteProgram(context, programPacked)); + if (isCallValid) + { + context->deleteProgram(programPacked); + } + ANGLE_CAPTURE(DeleteProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteProgramPipelinesContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *pipelines) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteProgramPipelines, "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)pipelines); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const ProgramPipelineID *pipelinesPacked = PackParam<const ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteProgramPipelines(context, n, pipelinesPacked)); + if (isCallValid) + { + context->deleteProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(DeleteProgramPipelines, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteProgramPipelinesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *pipelines) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteProgramPipelinesEXT, + "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)pipelines); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const ProgramPipelineID *pipelinesPacked = PackParam<const ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteProgramPipelinesEXT(context, n, pipelinesPacked)); + if (isCallValid) + { + context->deleteProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(DeleteProgramPipelinesEXT, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteQueriesContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *ids) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteQueries, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)ids); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const QueryID *idsPacked = PackParam<const QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteQueries(context, n, idsPacked)); + if (isCallValid) + { + context->deleteQueries(n, idsPacked); + } + ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *ids) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteQueriesEXT, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)ids); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const QueryID *idsPacked = PackParam<const QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteQueriesEXT(context, n, idsPacked)); + if (isCallValid) + { + context->deleteQueries(n, idsPacked); + } + ANGLE_CAPTURE(DeleteQueriesEXT, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteRenderbuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *renderbuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteRenderbuffers, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)renderbuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const RenderbufferID *renderbuffersPacked = + PackParam<const RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteRenderbuffers(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->deleteRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(DeleteRenderbuffers, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteRenderbuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *renderbuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteRenderbuffersOES, + "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)renderbuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const RenderbufferID *renderbuffersPacked = + PackParam<const RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteRenderbuffersOES(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->deleteRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(DeleteRenderbuffersOES, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteSamplersContextANGLE(GLeglContext ctx, + GLsizei count, + const GLuint *samplers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteSamplers, "context = %d, count = %d, samplers = 0x%016" PRIxPTR "", + CID(context), count, (uintptr_t)samplers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const SamplerID *samplersPacked = PackParam<const SamplerID *>(samplers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteSamplers(context, count, samplersPacked)); + if (isCallValid) + { + context->deleteSamplers(count, samplersPacked); + } + ANGLE_CAPTURE(DeleteSamplers, isCallValid, context, count, samplersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteSemaphoresEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *semaphores) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteSemaphoresEXT, "context = %d, n = %d, semaphores = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)semaphores); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const SemaphoreID *semaphoresPacked = PackParam<const SemaphoreID *>(semaphores); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDeleteSemaphoresEXT(context, n, semaphoresPacked)); + if (isCallValid) + { + context->deleteSemaphores(n, semaphoresPacked); + } + ANGLE_CAPTURE(DeleteSemaphoresEXT, isCallValid, context, n, semaphoresPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteShaderContextANGLE(GLeglContext ctx, GLuint shader) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteShader, "context = %d, shader = %u", CID(context), shader); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteShader(context, shaderPacked)); + if (isCallValid) + { + context->deleteShader(shaderPacked); + } + ANGLE_CAPTURE(DeleteShader, isCallValid, context, shaderPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteSyncContextANGLE(GLeglContext ctx, GLsync sync) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteSync, "context = %d, sync = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)sync); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDeleteSync(context, sync)); + if (isCallValid) + { + context->deleteSync(sync); + } + ANGLE_CAPTURE(DeleteSync, isCallValid, context, sync); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteTexturesContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *textures) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteTextures, "context = %d, n = %d, textures = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)textures); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const TextureID *texturesPacked = PackParam<const TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteTextures(context, n, texturesPacked)); + if (isCallValid) + { + context->deleteTextures(n, texturesPacked); + } + ANGLE_CAPTURE(DeleteTextures, isCallValid, context, n, texturesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteTransformFeedbacksContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *ids) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteTransformFeedbacks, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)ids); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const TransformFeedbackID *idsPacked = PackParam<const TransformFeedbackID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, idsPacked)); + if (isCallValid) + { + context->deleteTransformFeedbacks(n, idsPacked); + } + ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteVertexArraysContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *arrays) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteVertexArrays, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const VertexArrayID *arraysPacked = PackParam<const VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteVertexArrays(context, n, arraysPacked)); + if (isCallValid) + { + context->deleteVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(DeleteVertexArrays, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DeleteVertexArraysOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *arrays) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDeleteVertexArraysOES, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const VertexArrayID *arraysPacked = PackParam<const VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDeleteVertexArraysOES(context, n, arraysPacked)); + if (isCallValid) + { + context->deleteVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(DeleteVertexArraysOES, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DepthFuncContextANGLE(GLeglContext ctx, GLenum func) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDepthFunc, "context = %d, func = %s", CID(context), + GLenumToString(GLenumGroup::DepthFunction, func)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthFunc(context, func)); + if (isCallValid) + { + context->depthFunc(func); + } + ANGLE_CAPTURE(DepthFunc, isCallValid, context, func); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DepthMaskContextANGLE(GLeglContext ctx, GLboolean flag) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDepthMask, "context = %d, flag = %s", CID(context), GLbooleanToString(flag)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthMask(context, flag)); + if (isCallValid) + { + context->depthMask(flag); + } + ANGLE_CAPTURE(DepthMask, isCallValid, context, flag); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DepthRangefContextANGLE(GLeglContext ctx, GLfloat n, GLfloat f) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDepthRangef, "context = %d, n = %f, f = %f", CID(context), n, f); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthRangef(context, n, f)); + if (isCallValid) + { + context->depthRangef(n, f); + } + ANGLE_CAPTURE(DepthRangef, isCallValid, context, n, f); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DepthRangexContextANGLE(GLeglContext ctx, GLfixed n, GLfixed f) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDepthRangex, "context = %d, n = 0x%X, f = 0x%X", CID(context), n, f); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDepthRangex(context, n, f)); + if (isCallValid) + { + context->depthRangex(n, f); + } + ANGLE_CAPTURE(DepthRangex, isCallValid, context, n, f); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DetachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDetachShader, "context = %d, program = %u, shader = %u", CID(context), program, + shader); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDetachShader(context, programPacked, shaderPacked)); + if (isCallValid) + { + context->detachShader(programPacked, shaderPacked); + } + ANGLE_CAPTURE(DetachShader, isCallValid, context, programPacked, shaderPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DisableContextANGLE(GLeglContext ctx, GLenum cap) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDisable, "context = %d, cap = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, cap)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDisable(context, cap)); + if (isCallValid) + { + context->disable(cap); + } + ANGLE_CAPTURE(Disable, isCallValid, context, cap); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DisableClientStateContextANGLE(GLeglContext ctx, GLenum array) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDisableClientState, "context = %d, array = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, array)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableClientState(context, arrayPacked)); + if (isCallValid) + { + context->disableClientState(arrayPacked); + } + ANGLE_CAPTURE(DisableClientState, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DisableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDisableVertexAttribArray, "context = %d, index = %u", CID(context), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableVertexAttribArray(context, index)); + if (isCallValid) + { + context->disableVertexAttribArray(index); + } + ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DisableiContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDisablei, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDisablei(context, target, index)); + if (isCallValid) + { + context->disablei(target, index); + } + ANGLE_CAPTURE(Disablei, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DisableiEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDisableiEXT, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableiEXT(context, target, index)); + if (isCallValid) + { + context->disablei(target, index); + } + ANGLE_CAPTURE(DisableiEXT, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DisableiOESContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDisableiOES, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableiOES(context, target, index)); + if (isCallValid) + { + context->disablei(target, index); + } + ANGLE_CAPTURE(DisableiOES, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DiscardFramebufferEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDiscardFramebufferEXT, + "context = %d, target = %s, numAttachments = %d, attachments = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), numAttachments, + (uintptr_t)attachments); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDiscardFramebufferEXT(context, target, numAttachments, attachments)); + if (isCallValid) + { + context->discardFramebuffer(target, numAttachments, attachments); + } + ANGLE_CAPTURE(DiscardFramebufferEXT, isCallValid, context, target, numAttachments, + attachments); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DispatchComputeContextANGLE(GLeglContext ctx, + GLuint num_groups_x, + GLuint num_groups_y, + GLuint num_groups_z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDispatchCompute, + "context = %d, num_groups_x = %u, num_groups_y = %u, num_groups_z = %u", CID(context), + num_groups_x, num_groups_y, num_groups_z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z)); + if (isCallValid) + { + context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z); + } + ANGLE_CAPTURE(DispatchCompute, isCallValid, context, num_groups_x, num_groups_y, + num_groups_z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DispatchComputeIndirectContextANGLE(GLeglContext ctx, GLintptr indirect) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDispatchComputeIndirect, "context = %d, indirect = %llu", CID(context), + static_cast<unsigned long long>(indirect)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDispatchComputeIndirect(context, indirect)); + if (isCallValid) + { + context->dispatchComputeIndirect(indirect); + } + ANGLE_CAPTURE(DispatchComputeIndirect, isCallValid, context, indirect); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawArraysContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawArrays, "context = %d, mode = %s, first = %d, count = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), first, count); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawArrays(context, modePacked, first, count)); + if (isCallValid) + { + context->drawArrays(modePacked, first, count); + } + ANGLE_CAPTURE(DrawArrays, isCallValid, context, modePacked, first, count); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawArraysIndirectContextANGLE(GLeglContext ctx, + GLenum mode, + const void *indirect) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawArraysIndirect, "context = %d, mode = %s, indirect = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)indirect); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawArraysIndirect(context, modePacked, indirect)); + if (isCallValid) + { + context->drawArraysIndirect(modePacked, indirect); + } + ANGLE_CAPTURE(DrawArraysIndirect, isCallValid, context, modePacked, indirect); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawArraysInstancedContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawArraysInstanced, + "context = %d, mode = %s, first = %d, count = %d, instancecount = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, instancecount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawArraysInstanced(context, modePacked, first, count, instancecount)); + if (isCallValid) + { + context->drawArraysInstanced(modePacked, first, count, instancecount); + } + ANGLE_CAPTURE(DrawArraysInstanced, isCallValid, context, modePacked, first, count, + instancecount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawArraysInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawArraysInstancedANGLE, + "context = %d, mode = %s, first = %d, count = %d, primcount = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, primcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawArraysInstancedANGLE(context, modePacked, first, count, primcount)); + if (isCallValid) + { + context->drawArraysInstanced(modePacked, first, count, primcount); + } + ANGLE_CAPTURE(DrawArraysInstancedANGLE, isCallValid, context, modePacked, first, count, + primcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawArraysInstancedEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLint start, + GLsizei count, + GLsizei primcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawArraysInstancedEXT, + "context = %d, mode = %s, start = %d, count = %d, primcount = %d", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), start, count, primcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawArraysInstancedEXT(context, modePacked, start, count, primcount)); + if (isCallValid) + { + context->drawArraysInstanced(modePacked, start, count, primcount); + } + ANGLE_CAPTURE(DrawArraysInstancedEXT, isCallValid, context, modePacked, start, count, + primcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawBuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLenum *bufs) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawBuffers, "context = %d, n = %d, bufs = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)bufs); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawBuffers(context, n, bufs)); + if (isCallValid) + { + context->drawBuffers(n, bufs); + } + ANGLE_CAPTURE(DrawBuffers, isCallValid, context, n, bufs); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawBuffersEXTContextANGLE(GLeglContext ctx, GLsizei n, const GLenum *bufs) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawBuffersEXT, "context = %d, n = %d, bufs = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)bufs); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawBuffersEXT(context, n, bufs)); + if (isCallValid) + { + context->drawBuffers(n, bufs); + } + ANGLE_CAPTURE(DrawBuffersEXT, isCallValid, context, n, bufs); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElements, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElements(context, modePacked, count, typePacked, indices)); + if (isCallValid) + { + context->drawElements(modePacked, count, typePacked, indices); + } + ANGLE_CAPTURE(DrawElements, isCallValid, context, modePacked, count, typePacked, indices); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsBaseVertex, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsBaseVertex(context, modePacked, count, typePacked, + indices, basevertex)); + if (isCallValid) + { + context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex); + } + ANGLE_CAPTURE(DrawElementsBaseVertex, isCallValid, context, modePacked, count, typePacked, + indices, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsBaseVertexEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsBaseVertexEXT(context, modePacked, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex); + } + ANGLE_CAPTURE(DrawElementsBaseVertexEXT, isCallValid, context, modePacked, count, + typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsBaseVertexOES, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsBaseVertexOES(context, modePacked, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex); + } + ANGLE_CAPTURE(DrawElementsBaseVertexOES, isCallValid, context, modePacked, count, + typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsIndirectContextANGLE(GLeglContext ctx, + GLenum mode, + GLenum type, + const void *indirect) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsIndirect, + "context = %d, mode = %s, type = %s, indirect = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::PrimitiveType, mode), + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indirect); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawElementsIndirect(context, modePacked, typePacked, indirect)); + if (isCallValid) + { + context->drawElementsIndirect(modePacked, typePacked, indirect); + } + ANGLE_CAPTURE(DrawElementsIndirect, isCallValid, context, modePacked, typePacked, indirect); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsInstanced, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsInstanced(context, modePacked, count, typePacked, + indices, instancecount)); + if (isCallValid) + { + context->drawElementsInstanced(modePacked, count, typePacked, indices, instancecount); + } + ANGLE_CAPTURE(DrawElementsInstanced, isCallValid, context, modePacked, count, typePacked, + indices, instancecount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsInstancedANGLE, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", primcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::PrimitiveType, type), (uintptr_t)indices, primcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsInstancedANGLE(context, modePacked, count, + typePacked, indices, primcount)); + if (isCallValid) + { + context->drawElementsInstanced(modePacked, count, typePacked, indices, primcount); + } + ANGLE_CAPTURE(DrawElementsInstancedANGLE, isCallValid, context, modePacked, count, + typePacked, indices, primcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsInstancedBaseVertex, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount, + basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertex( + context, modePacked, count, typePacked, + indices, instancecount, basevertex)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices, + instancecount, basevertex); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertex, isCallValid, context, modePacked, count, + typePacked, indices, instancecount, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsInstancedBaseVertexEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount, + basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertexEXT( + context, modePacked, count, typePacked, + indices, instancecount, basevertex)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices, + instancecount, basevertex); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertexEXT, isCallValid, context, modePacked, count, + typePacked, indices, instancecount, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsInstancedBaseVertexOES, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount, + basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertexOES( + context, modePacked, count, typePacked, + indices, instancecount, basevertex)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices, + instancecount, basevertex); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertexOES, isCallValid, context, modePacked, count, + typePacked, indices, instancecount, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsInstancedEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", primcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, primcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsInstancedEXT(context, modePacked, count, typePacked, + indices, primcount)); + if (isCallValid) + { + context->drawElementsInstanced(modePacked, count, typePacked, indices, primcount); + } + ANGLE_CAPTURE(DrawElementsInstancedEXT, isCallValid, context, modePacked, count, typePacked, + indices, primcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawRangeElementsContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawRangeElements, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawRangeElements(context, modePacked, start, end, + count, typePacked, indices)); + if (isCallValid) + { + context->drawRangeElements(modePacked, start, end, count, typePacked, indices); + } + ANGLE_CAPTURE(DrawRangeElements, isCallValid, context, modePacked, start, end, count, + typePacked, indices); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawRangeElementsBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawRangeElementsBaseVertex, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertex( + context, modePacked, start, end, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices, + basevertex); + } + ANGLE_CAPTURE(DrawRangeElementsBaseVertex, isCallValid, context, modePacked, start, end, + count, typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawRangeElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawRangeElementsBaseVertexEXT, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertexEXT( + context, modePacked, start, end, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices, + basevertex); + } + ANGLE_CAPTURE(DrawRangeElementsBaseVertexEXT, isCallValid, context, modePacked, start, end, + count, typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawRangeElementsBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawRangeElementsBaseVertexOES, + "context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = " + "0x%016" PRIxPTR ", basevertex = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertexOES( + context, modePacked, start, end, count, + typePacked, indices, basevertex)); + if (isCallValid) + { + context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices, + basevertex); + } + ANGLE_CAPTURE(DrawRangeElementsBaseVertexOES, isCallValid, context, modePacked, start, end, + count, typePacked, indices, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawTexfOESContextANGLE(GLeglContext ctx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat width, + GLfloat height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexfOES, "context = %d, x = %f, y = %f, z = %f, width = %f, height = %f", + CID(context), x, y, z, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexfOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexf(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexfOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawTexfvOESContextANGLE(GLeglContext ctx, const GLfloat *coords) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexfvOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexfvOES(context, coords)); + if (isCallValid) + { + context->drawTexfv(coords); + } + ANGLE_CAPTURE(DrawTexfvOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_DrawTexiOESContextANGLE(GLeglContext ctx, GLint x, GLint y, GLint z, GLint width, GLint height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexiOES, "context = %d, x = %d, y = %d, z = %d, width = %d, height = %d", + CID(context), x, y, z, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexiOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexi(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexiOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawTexivOESContextANGLE(GLeglContext ctx, const GLint *coords) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexivOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexivOES(context, coords)); + if (isCallValid) + { + context->drawTexiv(coords); + } + ANGLE_CAPTURE(DrawTexivOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawTexsOESContextANGLE(GLeglContext ctx, + GLshort x, + GLshort y, + GLshort z, + GLshort width, + GLshort height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexsOES, "context = %d, x = %d, y = %d, z = %d, width = %d, height = %d", + CID(context), x, y, z, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexsOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexs(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexsOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawTexsvOESContextANGLE(GLeglContext ctx, const GLshort *coords) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexsvOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexsvOES(context, coords)); + if (isCallValid) + { + context->drawTexsv(coords); + } + ANGLE_CAPTURE(DrawTexsvOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawTexxOESContextANGLE(GLeglContext ctx, + GLfixed x, + GLfixed y, + GLfixed z, + GLfixed width, + GLfixed height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexxOES, + "context = %d, x = 0x%X, y = 0x%X, z = 0x%X, width = 0x%X, height = 0x%X", CID(context), + x, y, z, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawTexxOES(context, x, y, z, width, height)); + if (isCallValid) + { + context->drawTexx(x, y, z, width, height); + } + ANGLE_CAPTURE(DrawTexxOES, isCallValid, context, x, y, z, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawTexxvOESContextANGLE(GLeglContext ctx, const GLfixed *coords) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawTexxvOES, "context = %d, coords = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)coords); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateDrawTexxvOES(context, coords)); + if (isCallValid) + { + context->drawTexxv(coords); + } + ANGLE_CAPTURE(DrawTexxvOES, isCallValid, context, coords); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EGLImageTargetRenderbufferStorageOESContextANGLE(GLeglContext ctx, + GLenum target, + GLeglImageOES image) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEGLImageTargetRenderbufferStorageOES, + "context = %d, target = %s, image = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target), (uintptr_t)image); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateEGLImageTargetRenderbufferStorageOES(context, target, image)); + if (isCallValid) + { + context->eGLImageTargetRenderbufferStorage(target, image); + } + ANGLE_CAPTURE(EGLImageTargetRenderbufferStorageOES, isCallValid, context, target, image); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EGLImageTargetTexture2DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLeglImageOES image) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEGLImageTargetTexture2DOES, + "context = %d, target = %s, image = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target), (uintptr_t)image); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateEGLImageTargetTexture2DOES(context, targetPacked, image)); + if (isCallValid) + { + context->eGLImageTargetTexture2D(targetPacked, image); + } + ANGLE_CAPTURE(EGLImageTargetTexture2DOES, isCallValid, context, targetPacked, image); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EnableContextANGLE(GLeglContext ctx, GLenum cap) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEnable, "context = %d, cap = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, cap)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEnable(context, cap)); + if (isCallValid) + { + context->enable(cap); + } + ANGLE_CAPTURE(Enable, isCallValid, context, cap); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EnableClientStateContextANGLE(GLeglContext ctx, GLenum array) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEnableClientState, "context = %d, array = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, array)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableClientState(context, arrayPacked)); + if (isCallValid) + { + context->enableClientState(arrayPacked); + } + ANGLE_CAPTURE(EnableClientState, isCallValid, context, arrayPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EnableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEnableVertexAttribArray, "context = %d, index = %u", CID(context), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableVertexAttribArray(context, index)); + if (isCallValid) + { + context->enableVertexAttribArray(index); + } + ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EnableiContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEnablei, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEnablei(context, target, index)); + if (isCallValid) + { + context->enablei(target, index); + } + ANGLE_CAPTURE(Enablei, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EnableiEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEnableiEXT, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableiEXT(context, target, index)); + if (isCallValid) + { + context->enablei(target, index); + } + ANGLE_CAPTURE(EnableiEXT, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EnableiOESContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEnableiOES, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEnableiOES(context, target, index)); + if (isCallValid) + { + context->enablei(target, index); + } + ANGLE_CAPTURE(EnableiOES, isCallValid, context, target, index); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EndQueryContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEndQuery, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEndQuery(context, targetPacked)); + if (isCallValid) + { + context->endQuery(targetPacked); + } + ANGLE_CAPTURE(EndQuery, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EndQueryEXTContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEndQueryEXT, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateEndQueryEXT(context, targetPacked)); + if (isCallValid) + { + context->endQuery(targetPacked); + } + ANGLE_CAPTURE(EndQueryEXT, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_EndTransformFeedbackContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLEndTransformFeedback, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateEndTransformFeedback(context)); + if (isCallValid) + { + context->endTransformFeedback(); + } + ANGLE_CAPTURE(EndTransformFeedback, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLsync GL_APIENTRY GL_FenceSyncContextANGLE(GLeglContext ctx, GLenum condition, GLbitfield flags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFenceSync, "context = %d, condition = %s, flags = %s", CID(context), + GLenumToString(GLenumGroup::SyncCondition, condition), + GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str()); + + GLsync returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFenceSync(context, condition, flags)); + if (isCallValid) + { + returnValue = context->fenceSync(condition, flags); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLFenceSync, GLsync>(); + } + ANGLE_CAPTURE(FenceSync, isCallValid, context, condition, flags, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLFenceSync, GLsync>(); + } + return returnValue; +} + +void GL_APIENTRY GL_FinishContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFinish, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFinish(context)); + if (isCallValid) + { + context->finish(); + } + ANGLE_CAPTURE(Finish, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FinishFenceNVContextANGLE(GLeglContext ctx, GLuint fence) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFinishFenceNV, "context = %d, fence = %u", CID(context), fence); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFinishFenceNV(context, fencePacked)); + if (isCallValid) + { + context->finishFenceNV(fencePacked); + } + ANGLE_CAPTURE(FinishFenceNV, isCallValid, context, fencePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FlushContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFlush, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFlush(context)); + if (isCallValid) + { + context->flush(); + } + ANGLE_CAPTURE(Flush, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FlushMappedBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFlushMappedBufferRange, + "context = %d, target = %s, offset = %llu, length = %llu", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFlushMappedBufferRange(context, targetPacked, offset, length)); + if (isCallValid) + { + context->flushMappedBufferRange(targetPacked, offset, length); + } + ANGLE_CAPTURE(FlushMappedBufferRange, isCallValid, context, targetPacked, offset, length); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FlushMappedBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFlushMappedBufferRangeEXT, + "context = %d, target = %s, offset = %llu, length = %llu", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFlushMappedBufferRangeEXT(context, targetPacked, offset, length)); + if (isCallValid) + { + context->flushMappedBufferRange(targetPacked, offset, length); + } + ANGLE_CAPTURE(FlushMappedBufferRangeEXT, isCallValid, context, targetPacked, offset, + length); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FogfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFogf, "context = %d, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::FogParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogf(context, pname, param)); + if (isCallValid) + { + context->fogf(pname, param); + } + ANGLE_CAPTURE(Fogf, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FogfvContextANGLE(GLeglContext ctx, GLenum pname, const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFogfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::FogParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogfv(context, pname, params)); + if (isCallValid) + { + context->fogfv(pname, params); + } + ANGLE_CAPTURE(Fogfv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FogxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFogx, "context = %d, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::FogPName, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogx(context, pname, param)); + if (isCallValid) + { + context->fogx(pname, param); + } + ANGLE_CAPTURE(Fogx, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FogxvContextANGLE(GLeglContext ctx, GLenum pname, const GLfixed *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFogxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::FogPName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFogxv(context, pname, param)); + if (isCallValid) + { + context->fogxv(pname, param); + } + ANGLE_CAPTURE(Fogxv, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferFetchBarrierEXTContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferFetchBarrierEXT, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFramebufferFetchBarrierEXT(context)); + if (isCallValid) + { + context->framebufferFetchBarrier(); + } + ANGLE_CAPTURE(FramebufferFetchBarrierEXT, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferParameteriContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferParameteri, "context = %d, target = %s, pname = %s, param = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferParameterName, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferParameteri(context, target, pname, param)); + if (isCallValid) + { + context->framebufferParameteri(target, pname, param); + } + ANGLE_CAPTURE(FramebufferParameteri, isCallValid, context, target, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferRenderbufferContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferRenderbuffer, + "context = %d, target = %s, attachment = %s, renderbuffertarget = %s, renderbuffer = %u", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::RenderbufferTarget, renderbuffertarget), renderbuffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferRenderbuffer(context, target, attachment, renderbuffertarget, + renderbufferPacked)); + if (isCallValid) + { + context->framebufferRenderbuffer(target, attachment, renderbuffertarget, + renderbufferPacked); + } + ANGLE_CAPTURE(FramebufferRenderbuffer, isCallValid, context, target, attachment, + renderbuffertarget, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferRenderbufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferRenderbufferOES, + "context = %d, target = %s, attachment = %s, renderbuffertarget = %s, renderbuffer = %u", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::RenderbufferTarget, renderbuffertarget), renderbuffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferRenderbufferOES(context, target, attachment, renderbuffertarget, + renderbufferPacked)); + if (isCallValid) + { + context->framebufferRenderbuffer(target, attachment, renderbuffertarget, + renderbufferPacked); + } + ANGLE_CAPTURE(FramebufferRenderbufferOES, isCallValid, context, target, attachment, + renderbuffertarget, renderbufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTextureContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTexture, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTexture(context, target, attachment, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture(target, attachment, texturePacked, level); + } + ANGLE_CAPTURE(FramebufferTexture, isCallValid, context, target, attachment, texturePacked, + level); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTexture2DContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTexture2D, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferTexture2D(context, target, attachment, + textargetPacked, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture2D(target, attachment, textargetPacked, texturePacked, + level); + } + ANGLE_CAPTURE(FramebufferTexture2D, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTexture2DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTexture2DMultisampleEXT, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d, " + "samples = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level, samples); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTexture2DMultisampleEXT( + context, target, attachment, textargetPacked, texturePacked, level, samples)); + if (isCallValid) + { + context->framebufferTexture2DMultisample(target, attachment, textargetPacked, + texturePacked, level, samples); + } + ANGLE_CAPTURE(FramebufferTexture2DMultisampleEXT, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level, samples); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTexture2DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTexture2DOES, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferTexture2DOES(context, target, attachment, + textargetPacked, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture2D(target, attachment, textargetPacked, texturePacked, + level); + } + ANGLE_CAPTURE(FramebufferTexture2DOES, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTexture3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLint zoffset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTexture3DOES, + "context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d, " + "zoffset = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level, zoffset); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget textargetPacked = PackParam<TextureTarget>(textarget); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTexture3DOES(context, target, attachment, textargetPacked, + texturePacked, level, zoffset)); + if (isCallValid) + { + context->framebufferTexture3D(target, attachment, textargetPacked, texturePacked, level, + zoffset); + } + ANGLE_CAPTURE(FramebufferTexture3DOES, isCallValid, context, target, attachment, + textargetPacked, texturePacked, level, zoffset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTextureEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTextureEXT, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTextureEXT(context, target, attachment, texturePacked, level)); + if (isCallValid) + { + context->framebufferTexture(target, attachment, texturePacked, level); + } + ANGLE_CAPTURE(FramebufferTextureEXT, isCallValid, context, target, attachment, + texturePacked, level); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTextureLayerContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint layer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTextureLayer, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d, layer = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level, layer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateFramebufferTextureLayer(context, target, attachment, + texturePacked, level, layer)); + if (isCallValid) + { + context->framebufferTextureLayer(target, attachment, texturePacked, level, layer); + } + ANGLE_CAPTURE(FramebufferTextureLayer, isCallValid, context, target, attachment, + texturePacked, level, layer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FramebufferTextureMultiviewOVRContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint baseViewIndex, + GLsizei numViews) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFramebufferTextureMultiviewOVR, + "context = %d, target = %s, attachment = %s, texture = %u, level = %d, baseViewIndex = " + "%d, numViews = %d", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level, + baseViewIndex, numViews); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateFramebufferTextureMultiviewOVR(context, target, attachment, texturePacked, + level, baseViewIndex, numViews)); + if (isCallValid) + { + context->framebufferTextureMultiview(target, attachment, texturePacked, level, + baseViewIndex, numViews); + } + ANGLE_CAPTURE(FramebufferTextureMultiviewOVR, isCallValid, context, target, attachment, + texturePacked, level, baseViewIndex, numViews); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FrontFaceContextANGLE(GLeglContext ctx, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFrontFace, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::FrontFaceDirection, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateFrontFace(context, mode)); + if (isCallValid) + { + context->frontFace(mode); + } + ANGLE_CAPTURE(FrontFace, isCallValid, context, mode); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FrustumfContextANGLE(GLeglContext ctx, + GLfloat l, + GLfloat r, + GLfloat b, + GLfloat t, + GLfloat n, + GLfloat f) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFrustumf, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f", + CID(context), l, r, b, t, n, f); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFrustumf(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->frustumf(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Frustumf, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_FrustumxContextANGLE(GLeglContext ctx, + GLfixed l, + GLfixed r, + GLfixed b, + GLfixed t, + GLfixed n, + GLfixed f) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLFrustumx, + "context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context), + l, r, b, t, n, f); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateFrustumx(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->frustumx(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Frustumx, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenBuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *buffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenBuffers, "context = %d, n = %d, buffers = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)buffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferID *buffersPacked = PackParam<BufferID *>(buffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenBuffers(context, n, buffersPacked)); + if (isCallValid) + { + context->genBuffers(n, buffersPacked); + } + ANGLE_CAPTURE(GenBuffers, isCallValid, context, n, buffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenFencesNVContextANGLE(GLeglContext ctx, GLsizei n, GLuint *fences) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenFencesNV, "context = %d, n = %d, fences = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)fences); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FenceNVID *fencesPacked = PackParam<FenceNVID *>(fences); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenFencesNV(context, n, fencesPacked)); + if (isCallValid) + { + context->genFencesNV(n, fencesPacked); + } + ANGLE_CAPTURE(GenFencesNV, isCallValid, context, n, fencesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenFramebuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *framebuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenFramebuffers, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)framebuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FramebufferID *framebuffersPacked = PackParam<FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffersPacked)); + if (isCallValid) + { + context->genFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenFramebuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *framebuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenFramebuffersOES, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)framebuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FramebufferID *framebuffersPacked = PackParam<FramebufferID *>(framebuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenFramebuffersOES(context, n, framebuffersPacked)); + if (isCallValid) + { + context->genFramebuffers(n, framebuffersPacked); + } + ANGLE_CAPTURE(GenFramebuffersOES, isCallValid, context, n, framebuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenProgramPipelinesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *pipelines) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenProgramPipelines, "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)pipelines); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID *pipelinesPacked = PackParam<ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenProgramPipelines(context, n, pipelinesPacked)); + if (isCallValid) + { + context->genProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(GenProgramPipelines, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenProgramPipelinesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *pipelines) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenProgramPipelinesEXT, "context = %d, n = %d, pipelines = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)pipelines); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID *pipelinesPacked = PackParam<ProgramPipelineID *>(pipelines); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenProgramPipelinesEXT(context, n, pipelinesPacked)); + if (isCallValid) + { + context->genProgramPipelines(n, pipelinesPacked); + } + ANGLE_CAPTURE(GenProgramPipelinesEXT, isCallValid, context, n, pipelinesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenQueriesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenQueries, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", CID(context), n, + (uintptr_t)ids); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID *idsPacked = PackParam<QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, idsPacked)); + if (isCallValid) + { + context->genQueries(n, idsPacked); + } + ANGLE_CAPTURE(GenQueries, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenQueriesEXT, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", CID(context), + n, (uintptr_t)ids); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID *idsPacked = PackParam<QueryID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenQueriesEXT(context, n, idsPacked)); + if (isCallValid) + { + context->genQueries(n, idsPacked); + } + ANGLE_CAPTURE(GenQueriesEXT, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenRenderbuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *renderbuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenRenderbuffers, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)renderbuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID *renderbuffersPacked = PackParam<RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenRenderbuffers(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->genRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(GenRenderbuffers, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenRenderbuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *renderbuffers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenRenderbuffersOES, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)renderbuffers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID *renderbuffersPacked = PackParam<RenderbufferID *>(renderbuffers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGenRenderbuffersOES(context, n, renderbuffersPacked)); + if (isCallValid) + { + context->genRenderbuffers(n, renderbuffersPacked); + } + ANGLE_CAPTURE(GenRenderbuffersOES, isCallValid, context, n, renderbuffersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenSamplersContextANGLE(GLeglContext ctx, GLsizei count, GLuint *samplers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenSamplers, "context = %d, count = %d, samplers = 0x%016" PRIxPTR "", + CID(context), count, (uintptr_t)samplers); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID *samplersPacked = PackParam<SamplerID *>(samplers); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenSamplers(context, count, samplersPacked)); + if (isCallValid) + { + context->genSamplers(count, samplersPacked); + } + ANGLE_CAPTURE(GenSamplers, isCallValid, context, count, samplersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenSemaphoresEXTContextANGLE(GLeglContext ctx, GLsizei n, GLuint *semaphores) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenSemaphoresEXT, "context = %d, n = %d, semaphores = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)semaphores); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID *semaphoresPacked = PackParam<SemaphoreID *>(semaphores); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenSemaphoresEXT(context, n, semaphoresPacked)); + if (isCallValid) + { + context->genSemaphores(n, semaphoresPacked); + } + ANGLE_CAPTURE(GenSemaphoresEXT, isCallValid, context, n, semaphoresPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenTexturesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *textures) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenTextures, "context = %d, n = %d, textures = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)textures); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID *texturesPacked = PackParam<TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenTextures(context, n, texturesPacked)); + if (isCallValid) + { + context->genTextures(n, texturesPacked); + } + ANGLE_CAPTURE(GenTextures, isCallValid, context, n, texturesPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenTransformFeedbacksContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenTransformFeedbacks, "context = %d, n = %d, ids = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)ids); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TransformFeedbackID *idsPacked = PackParam<TransformFeedbackID *>(ids); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, idsPacked)); + if (isCallValid) + { + context->genTransformFeedbacks(n, idsPacked); + } + ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, idsPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenVertexArraysContextANGLE(GLeglContext ctx, GLsizei n, GLuint *arrays) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenVertexArrays, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexArrayID *arraysPacked = PackParam<VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenVertexArrays(context, n, arraysPacked)); + if (isCallValid) + { + context->genVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(GenVertexArrays, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenVertexArraysOESContextANGLE(GLeglContext ctx, GLsizei n, GLuint *arrays) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenVertexArraysOES, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "", + CID(context), n, (uintptr_t)arrays); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexArrayID *arraysPacked = PackParam<VertexArrayID *>(arrays); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenVertexArraysOES(context, n, arraysPacked)); + if (isCallValid) + { + context->genVertexArrays(n, arraysPacked); + } + ANGLE_CAPTURE(GenVertexArraysOES, isCallValid, context, n, arraysPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenerateMipmapContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenerateMipmap, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenerateMipmap(context, targetPacked)); + if (isCallValid) + { + context->generateMipmap(targetPacked); + } + ANGLE_CAPTURE(GenerateMipmap, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GenerateMipmapOESContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGenerateMipmapOES, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGenerateMipmapOES(context, targetPacked)); + if (isCallValid) + { + context->generateMipmap(targetPacked); + } + ANGLE_CAPTURE(GenerateMipmapOES, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetActiveAttribContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetActiveAttrib, + "context = %d, program = %u, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", size = 0x%016" PRIxPTR ", type = 0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, index, bufSize, (uintptr_t)length, (uintptr_t)size, + (uintptr_t)type, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveAttrib(context, programPacked, index, bufSize, length, + size, type, name)); + if (isCallValid) + { + context->getActiveAttrib(programPacked, index, bufSize, length, size, type, name); + } + ANGLE_CAPTURE(GetActiveAttrib, isCallValid, context, programPacked, index, bufSize, length, + size, type, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetActiveUniformContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetActiveUniform, + "context = %d, program = %u, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", size = 0x%016" PRIxPTR ", type = 0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, index, bufSize, (uintptr_t)length, (uintptr_t)size, + (uintptr_t)type, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveUniform(context, programPacked, index, bufSize, length, + size, type, name)); + if (isCallValid) + { + context->getActiveUniform(programPacked, index, bufSize, length, size, type, name); + } + ANGLE_CAPTURE(GetActiveUniform, isCallValid, context, programPacked, index, bufSize, length, + size, type, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetActiveUniformBlockNameContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLsizei bufSize, + GLsizei *length, + GLchar *uniformBlockName) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT( + context, GLGetActiveUniformBlockName, + "context = %d, program = %u, uniformBlockIndex = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", uniformBlockName = 0x%016" PRIxPTR "", + CID(context), program, uniformBlockIndex, bufSize, (uintptr_t)length, + (uintptr_t)uniformBlockName); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetActiveUniformBlockName(context, programPacked, uniformBlockIndexPacked, + bufSize, length, uniformBlockName)); + if (isCallValid) + { + context->getActiveUniformBlockName(programPacked, uniformBlockIndexPacked, bufSize, + length, uniformBlockName); + } + ANGLE_CAPTURE(GetActiveUniformBlockName, isCallValid, context, programPacked, + uniformBlockIndexPacked, bufSize, length, uniformBlockName); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetActiveUniformBlockivContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetActiveUniformBlockiv, + "context = %d, program = %u, uniformBlockIndex = %u, pname = %s, params = 0x%016" PRIxPTR + "", + CID(context), program, uniformBlockIndex, + GLenumToString(GLenumGroup::UniformBlockPName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveUniformBlockiv( + context, programPacked, uniformBlockIndexPacked, pname, params)); + if (isCallValid) + { + context->getActiveUniformBlockiv(programPacked, uniformBlockIndexPacked, pname, params); + } + ANGLE_CAPTURE(GetActiveUniformBlockiv, isCallValid, context, programPacked, + uniformBlockIndexPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetActiveUniformsivContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei uniformCount, + const GLuint *uniformIndices, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetActiveUniformsiv, + "context = %d, program = %u, uniformCount = %d, uniformIndices = 0x%016" PRIxPTR + ", pname = %s, params = 0x%016" PRIxPTR "", + CID(context), program, uniformCount, (uintptr_t)uniformIndices, + GLenumToString(GLenumGroup::UniformPName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetActiveUniformsiv(context, programPacked, uniformCount, + uniformIndices, pname, params)); + if (isCallValid) + { + context->getActiveUniformsiv(programPacked, uniformCount, uniformIndices, pname, + params); + } + ANGLE_CAPTURE(GetActiveUniformsiv, isCallValid, context, programPacked, uniformCount, + uniformIndices, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetAttachedShadersContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei maxCount, + GLsizei *count, + GLuint *shaders) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetAttachedShaders, + "context = %d, program = %u, maxCount = %d, count = 0x%016" PRIxPTR + ", shaders = 0x%016" PRIxPTR "", + CID(context), program, maxCount, (uintptr_t)count, (uintptr_t)shaders); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + ShaderProgramID *shadersPacked = PackParam<ShaderProgramID *>(shaders); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetAttachedShaders(context, programPacked, maxCount, count, shadersPacked)); + if (isCallValid) + { + context->getAttachedShaders(programPacked, maxCount, count, shadersPacked); + } + ANGLE_CAPTURE(GetAttachedShaders, isCallValid, context, programPacked, maxCount, count, + shadersPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLint GL_APIENTRY GL_GetAttribLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetAttribLocation, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetAttribLocation(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getAttribLocation(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetAttribLocation, GLint>(); + } + ANGLE_CAPTURE(GetAttribLocation, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetAttribLocation, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetBooleani_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLboolean *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBooleani_v, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), index, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetBooleani_v(context, target, index, data)); + if (isCallValid) + { + context->getBooleani_v(target, index, data); + } + ANGLE_CAPTURE(GetBooleani_v, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBooleanvContextANGLE(GLeglContext ctx, GLenum pname, GLboolean *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBooleanv, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetBooleanv(context, pname, data)); + if (isCallValid) + { + context->getBooleanv(pname, data); + } + ANGLE_CAPTURE(GetBooleanv, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBufferParameteri64vContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBufferParameteri64v, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameteri64v(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferParameteri64v(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferParameteri64v, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBufferParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameteriv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferParameteriv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferParameteriv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBufferPointervContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + void **params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBufferPointerv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferPointerv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferPointerv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferPointerv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBufferPointervOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + void **params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBufferPointervOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferPointervOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getBufferPointerv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetBufferPointervOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetClipPlanefContextANGLE(GLeglContext ctx, GLenum plane, GLfloat *equation) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetClipPlanef, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetClipPlanef(context, plane, equation)); + if (isCallValid) + { + context->getClipPlanef(plane, equation); + } + ANGLE_CAPTURE(GetClipPlanef, isCallValid, context, plane, equation); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetClipPlanexContextANGLE(GLeglContext ctx, GLenum plane, GLfixed *equation) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetClipPlanex(context, plane, equation)); + if (isCallValid) + { + context->getClipPlanex(plane, equation); + } + ANGLE_CAPTURE(GetClipPlanex, isCallValid, context, plane, equation); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLuint GL_APIENTRY GL_GetDebugMessageLogContextANGLE(GLeglContext ctx, + GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetDebugMessageLog, + "context = %d, count = %u, bufSize = %d, sources = 0x%016" PRIxPTR + ", types = 0x%016" PRIxPTR ", ids = 0x%016" PRIxPTR ", severities = 0x%016" PRIxPTR + ", lengths = 0x%016" PRIxPTR ", messageLog = 0x%016" PRIxPTR "", + CID(context), count, bufSize, (uintptr_t)sources, (uintptr_t)types, (uintptr_t)ids, + (uintptr_t)severities, (uintptr_t)lengths, (uintptr_t)messageLog); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetDebugMessageLog(context, count, bufSize, sources, types, ids, + severities, lengths, messageLog)); + if (isCallValid) + { + returnValue = context->getDebugMessageLog(count, bufSize, sources, types, ids, + severities, lengths, messageLog); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLog, GLuint>(); + } + ANGLE_CAPTURE(GetDebugMessageLog, isCallValid, context, count, bufSize, sources, types, ids, + severities, lengths, messageLog, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLog, GLuint>(); + } + return returnValue; +} + +GLuint GL_APIENTRY GL_GetDebugMessageLogKHRContextANGLE(GLeglContext ctx, + GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetDebugMessageLogKHR, + "context = %d, count = %u, bufSize = %d, sources = 0x%016" PRIxPTR + ", types = 0x%016" PRIxPTR ", ids = 0x%016" PRIxPTR ", severities = 0x%016" PRIxPTR + ", lengths = 0x%016" PRIxPTR ", messageLog = 0x%016" PRIxPTR "", + CID(context), count, bufSize, (uintptr_t)sources, (uintptr_t)types, (uintptr_t)ids, + (uintptr_t)severities, (uintptr_t)lengths, (uintptr_t)messageLog); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetDebugMessageLogKHR(context, count, bufSize, sources, types, + ids, severities, lengths, messageLog)); + if (isCallValid) + { + returnValue = context->getDebugMessageLog(count, bufSize, sources, types, ids, + severities, lengths, messageLog); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLogKHR, GLuint>(); + } + ANGLE_CAPTURE(GetDebugMessageLogKHR, isCallValid, context, count, bufSize, sources, types, + ids, severities, lengths, messageLog, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetDebugMessageLogKHR, GLuint>(); + } + return returnValue; +} + +GLenum GL_APIENTRY GL_GetErrorContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetError, "context = %d", CID(context)); + + GLenum returnValue; + if (context) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetError(context)); + if (isCallValid) + { + returnValue = context->getError(); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetError, GLenum>(); + } + ANGLE_CAPTURE(GetError, isCallValid, context, returnValue); + } + else + { + + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetError, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetFenceivNVContextANGLE(GLeglContext ctx, + GLuint fence, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFenceivNV, + "context = %d, fence = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), fence, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFenceivNV(context, fencePacked, pname, params)); + if (isCallValid) + { + context->getFenceivNV(fencePacked, pname, params); + } + ANGLE_CAPTURE(GetFenceivNV, isCallValid, context, fencePacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetFixedvContextANGLE(GLeglContext ctx, GLenum pname, GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFixedv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetFixedv(context, pname, params)); + if (isCallValid) + { + context->getFixedv(pname, params); + } + ANGLE_CAPTURE(GetFixedv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetFloatvContextANGLE(GLeglContext ctx, GLenum pname, GLfloat *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFloatv, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetFloatv(context, pname, data)); + if (isCallValid) + { + context->getFloatv(pname, data); + } + ANGLE_CAPTURE(GetFloatv, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLint GL_APIENTRY GL_GetFragDataIndexEXTContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFragDataIndexEXT, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFragDataIndexEXT(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getFragDataIndex(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataIndexEXT, GLint>(); + } + ANGLE_CAPTURE(GetFragDataIndexEXT, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataIndexEXT, GLint>(); + } + return returnValue; +} + +GLint GL_APIENTRY GL_GetFragDataLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFragDataLocation, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFragDataLocation(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getFragDataLocation(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataLocation, GLint>(); + } + ANGLE_CAPTURE(GetFragDataLocation, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataLocation, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetFramebufferAttachmentParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFramebufferAttachmentParameteriv, + "context = %d, target = %s, attachment = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname), + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetFramebufferAttachmentParameteriv( + context, target, attachment, pname, params)); + if (isCallValid) + { + context->getFramebufferAttachmentParameteriv(target, attachment, pname, params); + } + ANGLE_CAPTURE(GetFramebufferAttachmentParameteriv, isCallValid, context, target, attachment, + pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetFramebufferAttachmentParameterivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFramebufferAttachmentParameterivOES, + "context = %d, target = %s, attachment = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachment, attachment), + GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname), + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetFramebufferAttachmentParameterivOES( + context, target, attachment, pname, params)); + if (isCallValid) + { + context->getFramebufferAttachmentParameteriv(target, attachment, pname, params); + } + ANGLE_CAPTURE(GetFramebufferAttachmentParameterivOES, isCallValid, context, target, + attachment, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetFramebufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFramebufferParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::FramebufferTarget, target), + GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname), + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFramebufferParameteriv(context, target, pname, params)); + if (isCallValid) + { + context->getFramebufferParameteriv(target, pname, params); + } + ANGLE_CAPTURE(GetFramebufferParameteriv, isCallValid, context, target, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLenum GL_APIENTRY GL_GetGraphicsResetStatusContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetGraphicsResetStatus, "context = %d", CID(context)); + + GLenum returnValue; + if (context) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetGraphicsResetStatus(context)); + if (isCallValid) + { + returnValue = context->getGraphicsResetStatus(); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatus, GLenum>(); + } + ANGLE_CAPTURE(GetGraphicsResetStatus, isCallValid, context, returnValue); + } + else + { + + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatus, GLenum>(); + } + return returnValue; +} + +GLenum GL_APIENTRY GL_GetGraphicsResetStatusEXTContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetGraphicsResetStatusEXT, "context = %d", CID(context)); + + GLenum returnValue; + if (context) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetGraphicsResetStatusEXT(context)); + if (isCallValid) + { + returnValue = context->getGraphicsResetStatus(); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatusEXT, GLenum>(); + } + ANGLE_CAPTURE(GetGraphicsResetStatusEXT, isCallValid, context, returnValue); + } + else + { + + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetGraphicsResetStatusEXT, GLenum>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetInteger64i_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLint64 *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetInteger64i_v, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TypeEnum, target), index, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetInteger64i_v(context, target, index, data)); + if (isCallValid) + { + context->getInteger64i_v(target, index, data); + } + ANGLE_CAPTURE(GetInteger64i_v, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetInteger64vContextANGLE(GLeglContext ctx, GLenum pname, GLint64 *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetInteger64v, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetInteger64v(context, pname, data)); + if (isCallValid) + { + context->getInteger64v(pname, data); + } + ANGLE_CAPTURE(GetInteger64v, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetInteger64vEXTContextANGLE(GLeglContext ctx, GLenum pname, GLint64 *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetInteger64vEXT, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetInteger64vEXT(context, pname, data)); + if (isCallValid) + { + context->getInteger64v(pname, data); + } + ANGLE_CAPTURE(GetInteger64vEXT, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetIntegeri_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLint *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetIntegeri_v, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TypeEnum, target), index, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetIntegeri_v(context, target, index, data)); + if (isCallValid) + { + context->getIntegeri_v(target, index, data); + } + ANGLE_CAPTURE(GetIntegeri_v, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetIntegervContextANGLE(GLeglContext ctx, GLenum pname, GLint *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetIntegerv, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetIntegerv(context, pname, data)); + if (isCallValid) + { + context->getIntegerv(pname, data); + } + ANGLE_CAPTURE(GetIntegerv, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetInternalformativContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetInternalformativ, + "context = %d, target = %s, internalformat = %s, pname = %s, bufSize = %d, params = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), + GLenumToString(GLenumGroup::InternalFormatPName, pname), bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetInternalformativ(context, target, internalformat, pname, bufSize, params)); + if (isCallValid) + { + context->getInternalformativ(target, internalformat, pname, bufSize, params); + } + ANGLE_CAPTURE(GetInternalformativ, isCallValid, context, target, internalformat, pname, + bufSize, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetLightfvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetLightfv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->getLightfv(light, pnamePacked, params); + } + ANGLE_CAPTURE(GetLightfv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetLightxvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetLightxv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->getLightxv(light, pnamePacked, params); + } + ANGLE_CAPTURE(GetLightxv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetMaterialfvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetMaterialfv, + "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetMaterialfv(context, face, pnamePacked, params)); + if (isCallValid) + { + context->getMaterialfv(face, pnamePacked, params); + } + ANGLE_CAPTURE(GetMaterialfv, isCallValid, context, face, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetMaterialxvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetMaterialxv, + "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetMaterialxv(context, face, pnamePacked, params)); + if (isCallValid) + { + context->getMaterialxv(face, pnamePacked, params); + } + ANGLE_CAPTURE(GetMaterialxv, isCallValid, context, face, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetMemoryObjectParameterivEXTContextANGLE(GLeglContext ctx, + GLuint memoryObject, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetMemoryObjectParameterivEXT, + "context = %d, memoryObject = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + memoryObject, GLenumToString(GLenumGroup::MemoryObjectParameterName, pname), + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MemoryObjectID memoryObjectPacked = PackParam<MemoryObjectID>(memoryObject); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params)); + if (isCallValid) + { + context->getMemoryObjectParameteriv(memoryObjectPacked, pname, params); + } + ANGLE_CAPTURE(GetMemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked, + pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetMultisamplefvContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLfloat *val) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetMultisamplefv, + "context = %d, pname = %s, index = %u, val = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), index, (uintptr_t)val); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetMultisamplefv(context, pname, index, val)); + if (isCallValid) + { + context->getMultisamplefv(pname, index, val); + } + ANGLE_CAPTURE(GetMultisamplefv, isCallValid, context, pname, index, val); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetObjectLabelContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetObjectLabel, + "context = %d, identifier = %s, name = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, identifier), name, bufSize, + (uintptr_t)length, (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetObjectLabel(context, identifier, name, bufSize, length, label)); + if (isCallValid) + { + context->getObjectLabel(identifier, name, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectLabel, isCallValid, context, identifier, name, bufSize, length, + label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetObjectLabelEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLuint object, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetObjectLabelEXT, + "context = %d, type = %s, object = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, type), object, bufSize, + (uintptr_t)length, (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetObjectLabelEXT(context, type, object, bufSize, length, label)); + if (isCallValid) + { + context->getObjectLabel(type, object, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectLabelEXT, isCallValid, context, type, object, bufSize, length, + label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetObjectLabelKHRContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetObjectLabelKHR, + "context = %d, identifier = %s, name = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, identifier), name, bufSize, + (uintptr_t)length, (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetObjectLabelKHR(context, identifier, name, bufSize, length, label)); + if (isCallValid) + { + context->getObjectLabel(identifier, name, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectLabelKHR, isCallValid, context, identifier, name, bufSize, length, + label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetObjectPtrLabelContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetObjectPtrLabel, + "context = %d, ptr = 0x%016" PRIxPTR ", bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, bufSize, (uintptr_t)length, (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetObjectPtrLabel(context, ptr, bufSize, length, label)); + if (isCallValid) + { + context->getObjectPtrLabel(ptr, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectPtrLabel, isCallValid, context, ptr, bufSize, length, label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetObjectPtrLabelKHRContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetObjectPtrLabelKHR, + "context = %d, ptr = 0x%016" PRIxPTR ", bufSize = %d, length = 0x%016" PRIxPTR + ", label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, bufSize, (uintptr_t)length, (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetObjectPtrLabelKHR(context, ptr, bufSize, length, label)); + if (isCallValid) + { + context->getObjectPtrLabel(ptr, bufSize, length, label); + } + ANGLE_CAPTURE(GetObjectPtrLabelKHR, isCallValid, context, ptr, bufSize, length, label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetPointervContextANGLE(GLeglContext ctx, GLenum pname, void **params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetPointerv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPointervPName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetPointerv(context, pname, params)); + if (isCallValid) + { + context->getPointerv(pname, params); + } + ANGLE_CAPTURE(GetPointerv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetPointervKHRContextANGLE(GLeglContext ctx, GLenum pname, void **params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetPointervKHR, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetPointervKHR(context, pname, params)); + if (isCallValid) + { + context->getPointerv(pname, params); + } + ANGLE_CAPTURE(GetPointervKHR, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramBinaryContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramBinary, + "context = %d, program = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", binaryFormat = 0x%016" PRIxPTR ", binary = 0x%016" PRIxPTR "", + CID(context), program, bufSize, (uintptr_t)length, (uintptr_t)binaryFormat, + (uintptr_t)binary); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetProgramBinary(context, programPacked, bufSize, + length, binaryFormat, binary)); + if (isCallValid) + { + context->getProgramBinary(programPacked, bufSize, length, binaryFormat, binary); + } + ANGLE_CAPTURE(GetProgramBinary, isCallValid, context, programPacked, bufSize, length, + binaryFormat, binary); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramBinaryOESContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramBinaryOES, + "context = %d, program = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", binaryFormat = 0x%016" PRIxPTR ", binary = 0x%016" PRIxPTR "", + CID(context), program, bufSize, (uintptr_t)length, (uintptr_t)binaryFormat, + (uintptr_t)binary); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramBinaryOES(context, programPacked, bufSize, length, + binaryFormat, binary)); + if (isCallValid) + { + context->getProgramBinary(programPacked, bufSize, length, binaryFormat, binary); + } + ANGLE_CAPTURE(GetProgramBinaryOES, isCallValid, context, programPacked, bufSize, length, + binaryFormat, binary); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramInfoLogContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramInfoLog, + "context = %d, program = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), program, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramInfoLog(context, programPacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getProgramInfoLog(programPacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetProgramInfoLog, isCallValid, context, programPacked, bufSize, length, + infoLog); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramInterfaceivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramInterfaceiv, + "context = %d, program = %u, programInterface = %s, pname = %s, params = 0x%016" PRIxPTR + "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + GLenumToString(GLenumGroup::ProgramInterfacePName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramInterfaceiv(context, programPacked, programInterface, + pname, params)); + if (isCallValid) + { + context->getProgramInterfaceiv(programPacked, programInterface, pname, params); + } + ANGLE_CAPTURE(GetProgramInterfaceiv, isCallValid, context, programPacked, programInterface, + pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramPipelineInfoLogContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramPipelineInfoLog, + "context = %d, pipeline = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), pipeline, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramPipelineInfoLog(context, pipelinePacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getProgramPipelineInfoLog(pipelinePacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetProgramPipelineInfoLog, isCallValid, context, pipelinePacked, bufSize, + length, infoLog); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramPipelineInfoLogEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramPipelineInfoLogEXT, + "context = %d, pipeline = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), pipeline, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetProgramPipelineInfoLogEXT( + context, pipelinePacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getProgramPipelineInfoLog(pipelinePacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetProgramPipelineInfoLogEXT, isCallValid, context, pipelinePacked, bufSize, + length, infoLog); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramPipelineivContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramPipelineiv, + "context = %d, pipeline = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + pipeline, GLenumToString(GLenumGroup::PipelineParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramPipelineiv(context, pipelinePacked, pname, params)); + if (isCallValid) + { + context->getProgramPipelineiv(pipelinePacked, pname, params); + } + ANGLE_CAPTURE(GetProgramPipelineiv, isCallValid, context, pipelinePacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramPipelineivEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramPipelineivEXT, + "context = %d, pipeline = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + pipeline, GLenumToString(GLenumGroup::PipelineParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramPipelineivEXT(context, pipelinePacked, pname, params)); + if (isCallValid) + { + context->getProgramPipelineiv(pipelinePacked, pname, params); + } + ANGLE_CAPTURE(GetProgramPipelineivEXT, isCallValid, context, pipelinePacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLuint GL_APIENTRY GL_GetProgramResourceIndexContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramResourceIndex, + "context = %d, program = %u, programInterface = %s, name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + (uintptr_t)name); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramResourceIndex(context, programPacked, programInterface, name)); + if (isCallValid) + { + returnValue = context->getProgramResourceIndex(programPacked, programInterface, name); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceIndex, GLuint>(); + } + ANGLE_CAPTURE(GetProgramResourceIndex, isCallValid, context, programPacked, + programInterface, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceIndex, GLuint>(); + } + return returnValue; +} + +GLint GL_APIENTRY GL_GetProgramResourceLocationContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramResourceLocation, + "context = %d, program = %u, programInterface = %s, name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + (uintptr_t)name); + + GLint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramResourceLocation(context, programPacked, programInterface, name)); + if (isCallValid) + { + returnValue = + context->getProgramResourceLocation(programPacked, programInterface, name); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocation, GLint>(); + } + ANGLE_CAPTURE(GetProgramResourceLocation, isCallValid, context, programPacked, + programInterface, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocation, GLint>(); + } + return returnValue; +} + +GLint GL_APIENTRY GL_GetProgramResourceLocationIndexEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramResourceLocationIndexEXT, + "context = %d, program = %u, programInterface = %s, name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + (uintptr_t)name); + + GLint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetProgramResourceLocationIndexEXT( + context, programPacked, programInterface, name)); + if (isCallValid) + { + returnValue = + context->getProgramResourceLocationIndex(programPacked, programInterface, name); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocationIndexEXT, + GLint>(); + } + ANGLE_CAPTURE(GetProgramResourceLocationIndexEXT, isCallValid, context, programPacked, + programInterface, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetProgramResourceLocationIndexEXT, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetProgramResourceNameContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramResourceName, + "context = %d, program = %u, programInterface = %s, index = %u, bufSize = %d, length = " + "0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + index, bufSize, (uintptr_t)length, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramResourceName(context, programPacked, programInterface, + index, bufSize, length, name)); + if (isCallValid) + { + context->getProgramResourceName(programPacked, programInterface, index, bufSize, length, + name); + } + ANGLE_CAPTURE(GetProgramResourceName, isCallValid, context, programPacked, programInterface, + index, bufSize, length, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramResourceivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLuint index, + GLsizei propCount, + const GLenum *props, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramResourceiv, + "context = %d, program = %u, programInterface = %s, index = %u, propCount = %d, props = " + "0x%016" PRIxPTR ", bufSize = %d, length = 0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface), + index, propCount, (uintptr_t)props, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramResourceiv(context, programPacked, programInterface, index, + propCount, props, bufSize, length, params)); + if (isCallValid) + { + context->getProgramResourceiv(programPacked, programInterface, index, propCount, props, + bufSize, length, params); + } + ANGLE_CAPTURE(GetProgramResourceiv, isCallValid, context, programPacked, programInterface, + index, propCount, props, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramiv, + "context = %d, program = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + program, GLenumToString(GLenumGroup::ProgramPropertyARB, pname), (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramiv(context, programPacked, pname, params)); + if (isCallValid) + { + context->getProgramiv(programPacked, pname, params); + } + ANGLE_CAPTURE(GetProgramiv, isCallValid, context, programPacked, pname, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjecti64vEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjecti64vEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjecti64vEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjecti64v(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjecti64vEXT, isCallValid, context, idPacked, pname, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjectivEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjectivEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectivEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectiv(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectivEXT, isCallValid, context, idPacked, pname, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjectui64vEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjectui64vEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectui64vEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectui64v(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectui64vEXT, isCallValid, context, idPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetQueryObjectuivContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjectuiv, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectuiv(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectuiv(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, idPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetQueryObjectuivEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjectuivEXT, + "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id, + GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryObjectuivEXT(context, idPacked, pname, params)); + if (isCallValid) + { + context->getQueryObjectuiv(idPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryObjectuivEXT, isCallValid, context, idPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetQueryivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), + GLenumToString(GLenumGroup::QueryParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getQueryiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetQueryivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::QueryTarget, target), + GLenumToString(GLenumGroup::QueryParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetQueryivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getQueryiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetQueryivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetRenderbufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetRenderbufferParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::RenderbufferParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetRenderbufferParameteriv(context, target, pname, params)); + if (isCallValid) + { + context->getRenderbufferParameteriv(target, pname, params); + } + ANGLE_CAPTURE(GetRenderbufferParameteriv, isCallValid, context, target, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetRenderbufferParameterivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetRenderbufferParameterivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::RenderbufferParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetRenderbufferParameterivOES(context, target, pname, params)); + if (isCallValid) + { + context->getRenderbufferParameteriv(target, pname, params); + } + ANGLE_CAPTURE(GetRenderbufferParameterivOES, isCallValid, context, target, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIiv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIiv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIiv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIivEXT, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIivEXT(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIivEXT, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIivOES, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIivOES(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIivOES, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIuiv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIuiv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIuiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuiv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIuivEXT, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIuivEXT(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIuiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuivEXT, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIuivOES, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSamplerParameterIuivOES(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterIuiv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuivOES, isCallValid, context, samplerPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterfvContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterfv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterfv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameterfv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameterfv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameteriv, + "context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameteriv(context, samplerPacked, pname, params)); + if (isCallValid) + { + context->getSamplerParameteriv(samplerPacked, pname, params); + } + ANGLE_CAPTURE(GetSamplerParameteriv, isCallValid, context, samplerPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSemaphoreParameterui64vEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum pname, + GLuint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSemaphoreParameterui64vEXT, + "context = %d, semaphore = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + semaphore, GLenumToString(GLenumGroup::SemaphoreParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetSemaphoreParameterui64vEXT(context, semaphorePacked, pname, params)); + if (isCallValid) + { + context->getSemaphoreParameterui64v(semaphorePacked, pname, params); + } + ANGLE_CAPTURE(GetSemaphoreParameterui64vEXT, isCallValid, context, semaphorePacked, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetShaderInfoLogContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetShaderInfoLog, + "context = %d, shader = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", infoLog = 0x%016" PRIxPTR "", + CID(context), shader, bufSize, (uintptr_t)length, (uintptr_t)infoLog); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetShaderInfoLog(context, shaderPacked, bufSize, length, infoLog)); + if (isCallValid) + { + context->getShaderInfoLog(shaderPacked, bufSize, length, infoLog); + } + ANGLE_CAPTURE(GetShaderInfoLog, isCallValid, context, shaderPacked, bufSize, length, + infoLog); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetShaderPrecisionFormatContextANGLE(GLeglContext ctx, + GLenum shadertype, + GLenum precisiontype, + GLint *range, + GLint *precision) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetShaderPrecisionFormat, + "context = %d, shadertype = %s, precisiontype = %s, range = 0x%016" PRIxPTR + ", precision = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ShaderType, shadertype), + GLenumToString(GLenumGroup::PrecisionType, precisiontype), (uintptr_t)range, + (uintptr_t)precision); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetShaderPrecisionFormat(context, shadertype, precisiontype, + range, precision)); + if (isCallValid) + { + context->getShaderPrecisionFormat(shadertype, precisiontype, range, precision); + } + ANGLE_CAPTURE(GetShaderPrecisionFormat, isCallValid, context, shadertype, precisiontype, + range, precision); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetShaderSourceContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *source) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetShaderSource, + "context = %d, shader = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", source = 0x%016" PRIxPTR "", + CID(context), shader, bufSize, (uintptr_t)length, (uintptr_t)source); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetShaderSource(context, shaderPacked, bufSize, length, source)); + if (isCallValid) + { + context->getShaderSource(shaderPacked, bufSize, length, source); + } + ANGLE_CAPTURE(GetShaderSource, isCallValid, context, shaderPacked, bufSize, length, source); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetShaderivContextANGLE(GLeglContext ctx, + GLuint shader, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetShaderiv, + "context = %d, shader = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), shader, + GLenumToString(GLenumGroup::ShaderParameterName, pname), (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetShaderiv(context, shaderPacked, pname, params)); + if (isCallValid) + { + context->getShaderiv(shaderPacked, pname, params); + } + ANGLE_CAPTURE(GetShaderiv, isCallValid, context, shaderPacked, pname, params); + } + else + {} +} + +const GLubyte *GL_APIENTRY GL_GetStringContextANGLE(GLeglContext ctx, GLenum name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetString, "context = %d, name = %s", CID(context), + GLenumToString(GLenumGroup::StringName, name)); + + const GLubyte *returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetString(context, name)); + if (isCallValid) + { + returnValue = context->getString(name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetString, const GLubyte *>(); + } + ANGLE_CAPTURE(GetString, isCallValid, context, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetString, const GLubyte *>(); + } + return returnValue; +} + +const GLubyte *GL_APIENTRY GL_GetStringiContextANGLE(GLeglContext ctx, GLenum name, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetStringi, "context = %d, name = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::StringName, name), index); + + const GLubyte *returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateGetStringi(context, name, index)); + if (isCallValid) + { + returnValue = context->getStringi(name, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetStringi, const GLubyte *>(); + } + ANGLE_CAPTURE(GetStringi, isCallValid, context, name, index, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetStringi, const GLubyte *>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetSyncivContextANGLE(GLeglContext ctx, + GLsync sync, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *values) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSynciv, + "context = %d, sync = 0x%016" PRIxPTR + ", pname = %s, bufSize = %d, length = 0x%016" PRIxPTR ", values = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)sync, GLenumToString(GLenumGroup::SyncParameterName, pname), + bufSize, (uintptr_t)length, (uintptr_t)values); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSynciv(context, sync, pname, bufSize, length, values)); + if (isCallValid) + { + context->getSynciv(sync, pname, bufSize, length, values); + } + ANGLE_CAPTURE(GetSynciv, isCallValid, context, sync, pname, bufSize, length, values); + } + else + {} +} + +void GL_APIENTRY GL_GetTexEnvfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexEnvfv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexEnvfv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->getTexEnvfv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(GetTexEnvfv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexEnvivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexEnviv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexEnviv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->getTexEnviv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(GetTexEnviv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexEnvxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexEnvxv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexEnvxv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->getTexEnvxv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(GetTexEnvxv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexGenfvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexGenfvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTexGenfvOES(context, coord, pname, params)); + if (isCallValid) + { + context->getTexGenfv(coord, pname, params); + } + ANGLE_CAPTURE(GetTexGenfvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexGenivOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexGenivOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTexGenivOES(context, coord, pname, params)); + if (isCallValid) + { + context->getTexGeniv(coord, pname, params); + } + ANGLE_CAPTURE(GetTexGenivOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexGenxvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexGenxvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTexGenxvOES(context, coord, pname, params)); + if (isCallValid) + { + context->getTexGenxv(coord, pname, params); + } + ANGLE_CAPTURE(GetTexGenxvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexLevelParameterfv, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameterfv(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameterfv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameterfv, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexLevelParameteriv, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameteriv(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameteriv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameteriv, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIuivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIuiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIuiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIuivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIuivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIuivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIuivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIuivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterIuivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterfv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterfv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterfv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterfv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameteriv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameteriv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameteriv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterxv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterxv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->getTexParameterxv(targetPacked, pname, params); + } + ANGLE_CAPTURE(GetTexParameterxv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTransformFeedbackVaryingContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLsizei *size, + GLenum *type, + GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTransformFeedbackVarying, + "context = %d, program = %u, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", size = 0x%016" PRIxPTR ", type = 0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "", + CID(context), program, index, bufSize, (uintptr_t)length, (uintptr_t)size, + (uintptr_t)type, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTransformFeedbackVarying(context, programPacked, index, + bufSize, length, size, type, name)); + if (isCallValid) + { + context->getTransformFeedbackVarying(programPacked, index, bufSize, length, size, type, + name); + } + ANGLE_CAPTURE(GetTransformFeedbackVarying, isCallValid, context, programPacked, index, + bufSize, length, size, type, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTranslatedShaderSourceANGLEContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufsize, + GLsizei *length, + GLchar *source) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTranslatedShaderSourceANGLE, + "context = %d, shader = %u, bufsize = %d, length = 0x%016" PRIxPTR + ", source = 0x%016" PRIxPTR "", + CID(context), shader, bufsize, (uintptr_t)length, (uintptr_t)source); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetTranslatedShaderSourceANGLE( + context, shaderPacked, bufsize, length, source)); + if (isCallValid) + { + context->getTranslatedShaderSource(shaderPacked, bufsize, length, source); + } + ANGLE_CAPTURE(GetTranslatedShaderSourceANGLE, isCallValid, context, shaderPacked, bufsize, + length, source); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLuint GL_APIENTRY GL_GetUniformBlockIndexContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *uniformBlockName) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformBlockIndex, + "context = %d, program = %u, uniformBlockName = 0x%016" PRIxPTR "", CID(context), program, + (uintptr_t)uniformBlockName); + + GLuint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformBlockIndex(context, programPacked, uniformBlockName)); + if (isCallValid) + { + returnValue = context->getUniformBlockIndex(programPacked, uniformBlockName); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLGetUniformBlockIndex, GLuint>(); + } + ANGLE_CAPTURE(GetUniformBlockIndex, isCallValid, context, programPacked, uniformBlockName, + returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetUniformBlockIndex, GLuint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetUniformIndicesContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint *uniformIndices) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformIndices, + "context = %d, program = %u, uniformCount = %d, uniformNames = 0x%016" PRIxPTR + ", uniformIndices = 0x%016" PRIxPTR "", + CID(context), program, uniformCount, (uintptr_t)uniformNames, (uintptr_t)uniformIndices); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformIndices(context, programPacked, uniformCount, + uniformNames, uniformIndices)); + if (isCallValid) + { + context->getUniformIndices(programPacked, uniformCount, uniformNames, uniformIndices); + } + ANGLE_CAPTURE(GetUniformIndices, isCallValid, context, programPacked, uniformCount, + uniformNames, uniformIndices); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLint GL_APIENTRY GL_GetUniformLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformLocation, "context = %d, program = %u, name = 0x%016" PRIxPTR "", + CID(context), program, (uintptr_t)name); + + GLint returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetUniformLocation(context, programPacked, name)); + if (isCallValid) + { + returnValue = context->getUniformLocation(programPacked, name); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetUniformLocation, GLint>(); + } + ANGLE_CAPTURE(GetUniformLocation, isCallValid, context, programPacked, name, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetUniformLocation, GLint>(); + } + return returnValue; +} + +void GL_APIENTRY GL_GetUniformfvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformfv, + "context = %d, program = %u, location = %d, params = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformfv(context, programPacked, locationPacked, params)); + if (isCallValid) + { + context->getUniformfv(programPacked, locationPacked, params); + } + ANGLE_CAPTURE(GetUniformfv, isCallValid, context, programPacked, locationPacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetUniformivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformiv, + "context = %d, program = %u, location = %d, params = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformiv(context, programPacked, locationPacked, params)); + if (isCallValid) + { + context->getUniformiv(programPacked, locationPacked, params); + } + ANGLE_CAPTURE(GetUniformiv, isCallValid, context, programPacked, locationPacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetUniformuivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformuiv, + "context = %d, program = %u, location = %d, params = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformuiv(context, programPacked, locationPacked, params)); + if (isCallValid) + { + context->getUniformuiv(programPacked, locationPacked, params); + } + ANGLE_CAPTURE(GetUniformuiv, isCallValid, context, programPacked, locationPacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetUnsignedBytevEXTContextANGLE(GLeglContext ctx, GLenum pname, GLubyte *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUnsignedBytevEXT, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetUnsignedBytevEXT(context, pname, data)); + if (isCallValid) + { + context->getUnsignedBytev(pname, data); + } + ANGLE_CAPTURE(GetUnsignedBytevEXT, isCallValid, context, pname, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetUnsignedBytei_vEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLubyte *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUnsignedBytei_vEXT, + "context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target), index, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUnsignedBytei_vEXT(context, target, index, data)); + if (isCallValid) + { + context->getUnsignedBytei_v(target, index, data); + } + ANGLE_CAPTURE(GetUnsignedBytei_vEXT, isCallValid, context, target, index, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribIivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribIiv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::VertexAttribEnum, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetVertexAttribIiv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribIiv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribIuivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribIuiv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::VertexAttribEnum, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetVertexAttribIuiv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribIuiv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribPointervContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + void **pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribPointerv, + "context = %d, index = %u, pname = %s, pointer = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetVertexAttribPointerv(context, index, pname, pointer)); + if (isCallValid) + { + context->getVertexAttribPointerv(index, pname, pointer); + } + ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, index, pname, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribfvContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribfv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribfv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribfv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribiv, + "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribiv(context, index, pname, params)); + if (isCallValid) + { + context->getVertexAttribiv(index, pname, params); + } + ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, index, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformfvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformfv, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformfv(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformfv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformfv, isCallValid, context, programPacked, locationPacked, bufSize, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformfvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformfvEXT, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformfvEXT(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformfv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformfvEXT, isCallValid, context, programPacked, locationPacked, + bufSize, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformiv, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformiv(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformiv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformiv, isCallValid, context, programPacked, locationPacked, bufSize, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformivEXT, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformivEXT(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformiv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformivEXT, isCallValid, context, programPacked, locationPacked, + bufSize, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformuivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformuiv, + "context = %d, program = %u, location = %d, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetnUniformuiv(context, programPacked, locationPacked, bufSize, params)); + if (isCallValid) + { + context->getnUniformuiv(programPacked, locationPacked, bufSize, params); + } + ANGLE_CAPTURE(GetnUniformuiv, isCallValid, context, programPacked, locationPacked, bufSize, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_HintContextANGLE(GLeglContext ctx, GLenum target, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLHint, "context = %d, target = %s, mode = %s", CID(context), + GLenumToString(GLenumGroup::HintTarget, target), + GLenumToString(GLenumGroup::HintMode, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateHint(context, target, mode)); + if (isCallValid) + { + context->hint(target, mode); + } + ANGLE_CAPTURE(Hint, isCallValid, context, target, mode); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ImportMemoryFdEXTContextANGLE(GLeglContext ctx, + GLuint memory, + GLuint64 size, + GLenum handleType, + GLint fd) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLImportMemoryFdEXT, + "context = %d, memory = %u, size = %llu, handleType = %s, fd = %d", CID(context), memory, + static_cast<unsigned long long>(size), + GLenumToString(GLenumGroup::ExternalHandleType, handleType), fd); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateImportMemoryFdEXT(context, memoryPacked, size, handleTypePacked, fd)); + if (isCallValid) + { + context->importMemoryFd(memoryPacked, size, handleTypePacked, fd); + } + ANGLE_CAPTURE(ImportMemoryFdEXT, isCallValid, context, memoryPacked, size, handleTypePacked, + fd); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ImportSemaphoreFdEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum handleType, + GLint fd) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLImportSemaphoreFdEXT, "context = %d, semaphore = %u, handleType = %s, fd = %d", + CID(context), semaphore, GLenumToString(GLenumGroup::ExternalHandleType, handleType), fd); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateImportSemaphoreFdEXT(context, semaphorePacked, handleTypePacked, fd)); + if (isCallValid) + { + context->importSemaphoreFd(semaphorePacked, handleTypePacked, fd); + } + ANGLE_CAPTURE(ImportSemaphoreFdEXT, isCallValid, context, semaphorePacked, handleTypePacked, + fd); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_InsertEventMarkerEXTContextANGLE(GLeglContext ctx, + GLsizei length, + const GLchar *marker) +{ + Context *context = static_cast<gl::Context *>(ctx); + // Don't run the EVENT() macro on the EXT_debug_marker entry points. + // It can interfere with the debug events being set by the caller. + // EVENT(context, GLInsertEventMarkerEXT, "context = %d, length = %d, marker = 0x%016" PRIxPTR + // "", CID(context), length, (uintptr_t)marker); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateInsertEventMarkerEXT(context, length, marker)); + if (isCallValid) + { + context->insertEventMarker(length, marker); + } + ANGLE_CAPTURE(InsertEventMarkerEXT, isCallValid, context, length, marker); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_InvalidateFramebufferContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLInvalidateFramebuffer, + "context = %d, target = %s, numAttachments = %d, attachments = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), numAttachments, + (uintptr_t)attachments); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateInvalidateFramebuffer(context, target, numAttachments, attachments)); + if (isCallValid) + { + context->invalidateFramebuffer(target, numAttachments, attachments); + } + ANGLE_CAPTURE(InvalidateFramebuffer, isCallValid, context, target, numAttachments, + attachments); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_InvalidateSubFramebufferContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLInvalidateSubFramebuffer, + "context = %d, target = %s, numAttachments = %d, attachments = 0x%016" PRIxPTR + ", x = %d, y = %d, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), numAttachments, + (uintptr_t)attachments, x, y, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateInvalidateSubFramebuffer(context, target, numAttachments, + attachments, x, y, width, height)); + if (isCallValid) + { + context->invalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, + height); + } + ANGLE_CAPTURE(InvalidateSubFramebuffer, isCallValid, context, target, numAttachments, + attachments, x, y, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLboolean GL_APIENTRY GL_IsBufferContextANGLE(GLeglContext ctx, GLuint buffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsBuffer, "context = %d, buffer = %u", CID(context), buffer); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsBuffer(context, bufferPacked)); + if (isCallValid) + { + returnValue = context->isBuffer(bufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsBuffer, GLboolean>(); + } + ANGLE_CAPTURE(IsBuffer, isCallValid, context, bufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsBuffer, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsEnabledContextANGLE(GLeglContext ctx, GLenum cap) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsEnabled, "context = %d, cap = %s", CID(context), + GLenumToString(GLenumGroup::EnableCap, cap)); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsEnabled(context, cap)); + if (isCallValid) + { + returnValue = context->isEnabled(cap); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabled, GLboolean>(); + } + ANGLE_CAPTURE(IsEnabled, isCallValid, context, cap, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabled, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsEnablediContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsEnabledi, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsEnabledi(context, target, index)); + if (isCallValid) + { + returnValue = context->isEnabledi(target, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabledi, GLboolean>(); + } + ANGLE_CAPTURE(IsEnabledi, isCallValid, context, target, index, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabledi, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsEnablediEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsEnablediEXT, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsEnablediEXT(context, target, index)); + if (isCallValid) + { + returnValue = context->isEnabledi(target, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsEnablediEXT, isCallValid, context, target, index, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediEXT, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsEnablediOESContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsEnablediOES, "context = %d, target = %s, index = %u", CID(context), + GLenumToString(GLenumGroup::EnableCap, target), index); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsEnablediOES(context, target, index)); + if (isCallValid) + { + returnValue = context->isEnabledi(target, index); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediOES, GLboolean>(); + } + ANGLE_CAPTURE(IsEnablediOES, isCallValid, context, target, index, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnablediOES, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsFenceNVContextANGLE(GLeglContext ctx, GLuint fence) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsFenceNV, "context = %d, fence = %u", CID(context), fence); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsFenceNV(context, fencePacked)); + if (isCallValid) + { + returnValue = context->isFenceNV(fencePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFenceNV, GLboolean>(); + } + ANGLE_CAPTURE(IsFenceNV, isCallValid, context, fencePacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFenceNV, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsFramebufferContextANGLE(GLeglContext ctx, GLuint framebuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsFramebuffer, "context = %d, framebuffer = %u", CID(context), framebuffer); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsFramebuffer(context, framebufferPacked)); + if (isCallValid) + { + returnValue = context->isFramebuffer(framebufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebuffer, GLboolean>(); + } + ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebuffer, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsFramebufferOESContextANGLE(GLeglContext ctx, GLuint framebuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsFramebufferOES, "context = %d, framebuffer = %u", CID(context), framebuffer); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsFramebufferOES(context, framebufferPacked)); + if (isCallValid) + { + returnValue = context->isFramebuffer(framebufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebufferOES, GLboolean>(); + } + ANGLE_CAPTURE(IsFramebufferOES, isCallValid, context, framebufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebufferOES, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsMemoryObjectEXTContextANGLE(GLeglContext ctx, GLuint memoryObject) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsMemoryObjectEXT, "context = %d, memoryObject = %u", CID(context), + memoryObject); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MemoryObjectID memoryObjectPacked = PackParam<MemoryObjectID>(memoryObject); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsMemoryObjectEXT(context, memoryObjectPacked)); + if (isCallValid) + { + returnValue = context->isMemoryObject(memoryObjectPacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsMemoryObjectEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsMemoryObjectEXT, isCallValid, context, memoryObjectPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsMemoryObjectEXT, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsProgram, "context = %d, program = %u", CID(context), program); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsProgram(context, programPacked)); + if (isCallValid) + { + returnValue = context->isProgram(programPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgram, GLboolean>(); + } + ANGLE_CAPTURE(IsProgram, isCallValid, context, programPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgram, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsProgramPipeline, "context = %d, pipeline = %u", CID(context), pipeline); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsProgramPipeline(context, pipelinePacked)); + if (isCallValid) + { + returnValue = context->isProgramPipeline(pipelinePacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipeline, GLboolean>(); + } + ANGLE_CAPTURE(IsProgramPipeline, isCallValid, context, pipelinePacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipeline, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsProgramPipelineEXTContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsProgramPipelineEXT, "context = %d, pipeline = %u", CID(context), pipeline); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsProgramPipelineEXT(context, pipelinePacked)); + if (isCallValid) + { + returnValue = context->isProgramPipeline(pipelinePacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipelineEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsProgramPipelineEXT, isCallValid, context, pipelinePacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsProgramPipelineEXT, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsQueryContextANGLE(GLeglContext ctx, GLuint id) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsQuery, "context = %d, id = %u", CID(context), id); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, idPacked)); + if (isCallValid) + { + returnValue = context->isQuery(idPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQuery, GLboolean>(); + } + ANGLE_CAPTURE(IsQuery, isCallValid, context, idPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQuery, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsQueryEXTContextANGLE(GLeglContext ctx, GLuint id) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsQueryEXT, "context = %d, id = %u", CID(context), id); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsQueryEXT(context, idPacked)); + if (isCallValid) + { + returnValue = context->isQuery(idPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQueryEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsQueryEXT, isCallValid, context, idPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsQueryEXT, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsRenderbufferContextANGLE(GLeglContext ctx, GLuint renderbuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsRenderbuffer, "context = %d, renderbuffer = %u", CID(context), renderbuffer); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsRenderbuffer(context, renderbufferPacked)); + if (isCallValid) + { + returnValue = context->isRenderbuffer(renderbufferPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbuffer, GLboolean>(); + } + ANGLE_CAPTURE(IsRenderbuffer, isCallValid, context, renderbufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbuffer, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsRenderbufferOESContextANGLE(GLeglContext ctx, GLuint renderbuffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsRenderbufferOES, "context = %d, renderbuffer = %u", CID(context), + renderbuffer); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsRenderbufferOES(context, renderbufferPacked)); + if (isCallValid) + { + returnValue = context->isRenderbuffer(renderbufferPacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbufferOES, GLboolean>(); + } + ANGLE_CAPTURE(IsRenderbufferOES, isCallValid, context, renderbufferPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbufferOES, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsSemaphoreEXTContextANGLE(GLeglContext ctx, GLuint semaphore) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsSemaphoreEXT, "context = %d, semaphore = %u", CID(context), semaphore); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsSemaphoreEXT(context, semaphorePacked)); + if (isCallValid) + { + returnValue = context->isSemaphore(semaphorePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSemaphoreEXT, GLboolean>(); + } + ANGLE_CAPTURE(IsSemaphoreEXT, isCallValid, context, semaphorePacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSemaphoreEXT, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsSamplerContextANGLE(GLeglContext ctx, GLuint sampler) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsSampler, "context = %d, sampler = %u", CID(context), sampler); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsSampler(context, samplerPacked)); + if (isCallValid) + { + returnValue = context->isSampler(samplerPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSampler, GLboolean>(); + } + ANGLE_CAPTURE(IsSampler, isCallValid, context, samplerPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSampler, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsShaderContextANGLE(GLeglContext ctx, GLuint shader) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsShader, "context = %d, shader = %u", CID(context), shader); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsShader(context, shaderPacked)); + if (isCallValid) + { + returnValue = context->isShader(shaderPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsShader, GLboolean>(); + } + ANGLE_CAPTURE(IsShader, isCallValid, context, shaderPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsShader, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsSyncContextANGLE(GLeglContext ctx, GLsync sync) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsSync, "context = %d, sync = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)sync); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsSync(context, sync)); + if (isCallValid) + { + returnValue = context->isSync(sync); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSync, GLboolean>(); + } + ANGLE_CAPTURE(IsSync, isCallValid, context, sync, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSync, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsTextureContextANGLE(GLeglContext ctx, GLuint texture) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsTexture, "context = %d, texture = %u", CID(context), texture); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID texturePacked = PackParam<TextureID>(texture); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateIsTexture(context, texturePacked)); + if (isCallValid) + { + returnValue = context->isTexture(texturePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsTexture, GLboolean>(); + } + ANGLE_CAPTURE(IsTexture, isCallValid, context, texturePacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsTexture, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsTransformFeedbackContextANGLE(GLeglContext ctx, GLuint id) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsTransformFeedback, "context = %d, id = %u", CID(context), id); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TransformFeedbackID idPacked = PackParam<TransformFeedbackID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsTransformFeedback(context, idPacked)); + if (isCallValid) + { + returnValue = context->isTransformFeedback(idPacked); + } + else + { + returnValue = + GetDefaultReturnValue<angle::EntryPoint::GLIsTransformFeedback, GLboolean>(); + } + ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, idPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsTransformFeedback, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsVertexArrayContextANGLE(GLeglContext ctx, GLuint array) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsVertexArray, "context = %d, array = %u", CID(context), array); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsVertexArray(context, arrayPacked)); + if (isCallValid) + { + returnValue = context->isVertexArray(arrayPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArray, GLboolean>(); + } + ANGLE_CAPTURE(IsVertexArray, isCallValid, context, arrayPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArray, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_IsVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLIsVertexArrayOES, "context = %d, array = %u", CID(context), array); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexArrayID arrayPacked = PackParam<VertexArrayID>(array); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateIsVertexArrayOES(context, arrayPacked)); + if (isCallValid) + { + returnValue = context->isVertexArray(arrayPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArrayOES, GLboolean>(); + } + ANGLE_CAPTURE(IsVertexArrayOES, isCallValid, context, arrayPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArrayOES, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_LabelObjectEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLuint object, + GLsizei length, + const GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLabelObjectEXT, + "context = %d, type = %s, object = %u, length = %d, label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, type), object, length, + (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateLabelObjectEXT(context, type, object, length, label)); + if (isCallValid) + { + context->labelObject(type, object, length, label); + } + ANGLE_CAPTURE(LabelObjectEXT, isCallValid, context, type, object, length, label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightModelfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightModelf, "context = %d, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::LightModelParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelf(context, pname, param)); + if (isCallValid) + { + context->lightModelf(pname, param); + } + ANGLE_CAPTURE(LightModelf, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightModelfvContextANGLE(GLeglContext ctx, GLenum pname, const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightModelfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelfv(context, pname, params)); + if (isCallValid) + { + context->lightModelfv(pname, params); + } + ANGLE_CAPTURE(LightModelfv, isCallValid, context, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightModelxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightModelx, "context = %d, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::LightModelParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelx(context, pname, param)); + if (isCallValid) + { + context->lightModelx(pname, param); + } + ANGLE_CAPTURE(LightModelx, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightModelxvContextANGLE(GLeglContext ctx, GLenum pname, const GLfixed *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightModelxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightModelxv(context, pname, param)); + if (isCallValid) + { + context->lightModelxv(pname, param); + } + ANGLE_CAPTURE(LightModelxv, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightfContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightf, "context = %d, light = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightf(context, light, pnamePacked, param)); + if (isCallValid) + { + context->lightf(light, pnamePacked, param); + } + ANGLE_CAPTURE(Lightf, isCallValid, context, light, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightfvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightfv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->lightfv(light, pnamePacked, params); + } + ANGLE_CAPTURE(Lightfv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightxContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightx, "context = %d, light = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightx(context, light, pnamePacked, param)); + if (isCallValid) + { + context->lightx(light, pnamePacked, param); + } + ANGLE_CAPTURE(Lightx, isCallValid, context, light, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LightxvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + const GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::LightName, light), + GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + LightParameter pnamePacked = PackParam<LightParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLightxv(context, light, pnamePacked, params)); + if (isCallValid) + { + context->lightxv(light, pnamePacked, params); + } + ANGLE_CAPTURE(Lightxv, isCallValid, context, light, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LineWidthContextANGLE(GLeglContext ctx, GLfloat width) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLineWidth, "context = %d, width = %f", CID(context), width); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLineWidth(context, width)); + if (isCallValid) + { + context->lineWidth(width); + } + ANGLE_CAPTURE(LineWidth, isCallValid, context, width); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LineWidthxContextANGLE(GLeglContext ctx, GLfixed width) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLineWidthx, "context = %d, width = 0x%X", CID(context), width); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLineWidthx(context, width)); + if (isCallValid) + { + context->lineWidthx(width); + } + ANGLE_CAPTURE(LineWidthx, isCallValid, context, width); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LinkProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLinkProgram, "context = %d, program = %u", CID(context), program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLinkProgram(context, programPacked)); + if (isCallValid) + { + context->linkProgram(programPacked); + } + ANGLE_CAPTURE(LinkProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LoadIdentityContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLoadIdentity, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLoadIdentity(context)); + if (isCallValid) + { + context->loadIdentity(); + } + ANGLE_CAPTURE(LoadIdentity, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LoadMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLoadMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLoadMatrixf(context, m)); + if (isCallValid) + { + context->loadMatrixf(m); + } + ANGLE_CAPTURE(LoadMatrixf, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LoadMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLoadMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLoadMatrixx(context, m)); + if (isCallValid) + { + context->loadMatrixx(m); + } + ANGLE_CAPTURE(LoadMatrixx, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LoadPaletteFromModelViewMatrixOESContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLoadPaletteFromModelViewMatrixOES, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateLoadPaletteFromModelViewMatrixOES(context)); + if (isCallValid) + { + context->loadPaletteFromModelViewMatrix(); + } + ANGLE_CAPTURE(LoadPaletteFromModelViewMatrixOES, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LogicOpContextANGLE(GLeglContext ctx, GLenum opcode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLogicOp, "context = %d, opcode = %s", CID(context), + GLenumToString(GLenumGroup::LogicOp, opcode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + LogicalOperation opcodePacked = PackParam<LogicalOperation>(opcode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateLogicOp(context, opcodePacked)); + if (isCallValid) + { + context->logicOp(opcodePacked); + } + ANGLE_CAPTURE(LogicOp, isCallValid, context, opcodePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void *GL_APIENTRY GL_MapBufferOESContextANGLE(GLeglContext ctx, GLenum target, GLenum access) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMapBufferOES, "context = %d, target = %s, access = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + GLenumToString(GLenumGroup::BufferAccessARB, access)); + + void *returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMapBufferOES(context, targetPacked, access)); + if (isCallValid) + { + returnValue = context->mapBuffer(targetPacked, access); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferOES, void *>(); + } + ANGLE_CAPTURE(MapBufferOES, isCallValid, context, targetPacked, access, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferOES, void *>(); + } + return returnValue; +} + +void *GL_APIENTRY GL_MapBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMapBufferRange, + "context = %d, target = %s, offset = %llu, length = %llu, access = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length), + GLbitfieldToString(GLenumGroup::BufferAccessMask, access).c_str()); + + void *returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMapBufferRange(context, targetPacked, offset, length, access)); + if (isCallValid) + { + returnValue = context->mapBufferRange(targetPacked, offset, length, access); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRange, void *>(); + } + ANGLE_CAPTURE(MapBufferRange, isCallValid, context, targetPacked, offset, length, access, + returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRange, void *>(); + } + return returnValue; +} + +void *GL_APIENTRY GL_MapBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMapBufferRangeEXT, + "context = %d, target = %s, offset = %llu, length = %llu, access = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target), + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length), + GLbitfieldToString(GLenumGroup::BufferAccessMask, access).c_str()); + + void *returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMapBufferRangeEXT(context, targetPacked, offset, length, access)); + if (isCallValid) + { + returnValue = context->mapBufferRange(targetPacked, offset, length, access); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRangeEXT, void *>(); + } + ANGLE_CAPTURE(MapBufferRangeEXT, isCallValid, context, targetPacked, offset, length, access, + returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRangeEXT, void *>(); + } + return returnValue; +} + +void GL_APIENTRY GL_MaterialfContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMaterialf, "context = %d, face = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialf(context, face, pnamePacked, param)); + if (isCallValid) + { + context->materialf(face, pnamePacked, param); + } + ANGLE_CAPTURE(Materialf, isCallValid, context, face, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MaterialfvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMaterialfv, "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialfv(context, face, pnamePacked, params)); + if (isCallValid) + { + context->materialfv(face, pnamePacked, params); + } + ANGLE_CAPTURE(Materialfv, isCallValid, context, face, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MaterialxContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMaterialx, "context = %d, face = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialx(context, face, pnamePacked, param)); + if (isCallValid) + { + context->materialx(face, pnamePacked, param); + } + ANGLE_CAPTURE(Materialx, isCallValid, context, face, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MaterialxvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + const GLfixed *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMaterialxv, "context = %d, face = %s, pname = %s, param = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::MaterialFace, face), + GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaterialxv(context, face, pnamePacked, param)); + if (isCallValid) + { + context->materialxv(face, pnamePacked, param); + } + ANGLE_CAPTURE(Materialxv, isCallValid, context, face, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MatrixIndexPointerOESContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMatrixIndexPointerOES, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::DefaultGroup, type), stride, + (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMatrixIndexPointerOES(context, size, type, stride, pointer)); + if (isCallValid) + { + context->matrixIndexPointer(size, type, stride, pointer); + } + ANGLE_CAPTURE(MatrixIndexPointerOES, isCallValid, context, size, type, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MatrixModeContextANGLE(GLeglContext ctx, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMatrixMode, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::MatrixMode, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MatrixType modePacked = PackParam<MatrixType>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMatrixMode(context, modePacked)); + if (isCallValid) + { + context->matrixMode(modePacked); + } + ANGLE_CAPTURE(MatrixMode, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MaxShaderCompilerThreadsKHRContextANGLE(GLeglContext ctx, GLuint count) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMaxShaderCompilerThreadsKHR, "context = %d, count = %u", CID(context), count); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMaxShaderCompilerThreadsKHR(context, count)); + if (isCallValid) + { + context->maxShaderCompilerThreads(count); + } + ANGLE_CAPTURE(MaxShaderCompilerThreadsKHR, isCallValid, context, count); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MemoryBarrierContextANGLE(GLeglContext ctx, GLbitfield barriers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMemoryBarrier, "context = %d, barriers = %s", CID(context), + GLbitfieldToString(GLenumGroup::MemoryBarrierMask, barriers).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMemoryBarrier(context, barriers)); + if (isCallValid) + { + context->memoryBarrier(barriers); + } + ANGLE_CAPTURE(MemoryBarrier, isCallValid, context, barriers); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MemoryBarrierByRegionContextANGLE(GLeglContext ctx, GLbitfield barriers) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMemoryBarrierByRegion, "context = %d, barriers = %s", CID(context), + GLbitfieldToString(GLenumGroup::MemoryBarrierMask, barriers).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMemoryBarrierByRegion(context, barriers)); + if (isCallValid) + { + context->memoryBarrierByRegion(barriers); + } + ANGLE_CAPTURE(MemoryBarrierByRegion, isCallValid, context, barriers); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MemoryObjectParameterivEXTContextANGLE(GLeglContext ctx, + GLuint memoryObject, + GLenum pname, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMemoryObjectParameterivEXT, + "context = %d, memoryObject = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + memoryObject, GLenumToString(GLenumGroup::MemoryObjectParameterName, pname), + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MemoryObjectID memoryObjectPacked = PackParam<MemoryObjectID>(memoryObject); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params)); + if (isCallValid) + { + context->memoryObjectParameteriv(memoryObjectPacked, pname, params); + } + ANGLE_CAPTURE(MemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MinSampleShadingContextANGLE(GLeglContext ctx, GLfloat value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMinSampleShading, "context = %d, value = %f", CID(context), value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMinSampleShading(context, value)); + if (isCallValid) + { + context->minSampleShading(value); + } + ANGLE_CAPTURE(MinSampleShading, isCallValid, context, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MinSampleShadingOESContextANGLE(GLeglContext ctx, GLfloat value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMinSampleShadingOES, "context = %d, value = %f", CID(context), value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMinSampleShadingOES(context, value)); + if (isCallValid) + { + context->minSampleShading(value); + } + ANGLE_CAPTURE(MinSampleShadingOES, isCallValid, context, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMultMatrixf(context, m)); + if (isCallValid) + { + context->multMatrixf(m); + } + ANGLE_CAPTURE(MultMatrixf, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)m); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMultMatrixx(context, m)); + if (isCallValid) + { + context->multMatrixx(m); + } + ANGLE_CAPTURE(MultMatrixx, isCallValid, context, m); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultiDrawElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *count, + GLenum type, + const void *const *indices, + GLsizei primcount, + const GLint *basevertex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiDrawElementsBaseVertexEXT, + "context = %d, mode = %s, count = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", primcount = %d, basevertex = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, primcount, + (uintptr_t)basevertex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateMultiDrawElementsBaseVertexEXT( + context, modePacked, count, typePacked, + indices, primcount, basevertex)); + if (isCallValid) + { + context->multiDrawElementsBaseVertex(modePacked, count, typePacked, indices, primcount, + basevertex); + } + ANGLE_CAPTURE(MultiDrawElementsBaseVertexEXT, isCallValid, context, modePacked, count, + typePacked, indices, primcount, basevertex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultiTexCoord4fContextANGLE(GLeglContext ctx, + GLenum target, + GLfloat s, + GLfloat t, + GLfloat r, + GLfloat q) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiTexCoord4f, "context = %d, target = %s, s = %f, t = %f, r = %f, q = %f", + CID(context), GLenumToString(GLenumGroup::TextureUnit, target), s, t, r, q); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMultiTexCoord4f(context, target, s, t, r, q)); + if (isCallValid) + { + context->multiTexCoord4f(target, s, t, r, q); + } + ANGLE_CAPTURE(MultiTexCoord4f, isCallValid, context, target, s, t, r, q); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultiTexCoord4xContextANGLE(GLeglContext ctx, + GLenum texture, + GLfixed s, + GLfixed t, + GLfixed r, + GLfixed q) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiTexCoord4x, + "context = %d, texture = %s, s = 0x%X, t = 0x%X, r = 0x%X, q = 0x%X", CID(context), + GLenumToString(GLenumGroup::TextureUnit, texture), s, t, r, q); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateMultiTexCoord4x(context, texture, s, t, r, q)); + if (isCallValid) + { + context->multiTexCoord4x(texture, s, t, r, q); + } + ANGLE_CAPTURE(MultiTexCoord4x, isCallValid, context, texture, s, t, r, q); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_NamedBufferStorageExternalEXTContextANGLE(GLeglContext ctx, + GLuint buffer, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLNamedBufferStorageExternalEXT, + "context = %d, buffer = %u, offset = %llu, size = %llu, clientBuffer = 0x%016" PRIxPTR + ", flags = %s", + CID(context), buffer, static_cast<unsigned long long>(offset), + static_cast<unsigned long long>(size), (uintptr_t)clientBuffer, + GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateNamedBufferStorageExternalEXT( + context, buffer, offset, size, clientBuffer, flags)); + if (isCallValid) + { + context->namedBufferStorageExternal(buffer, offset, size, clientBuffer, flags); + } + ANGLE_CAPTURE(NamedBufferStorageExternalEXT, isCallValid, context, buffer, offset, size, + clientBuffer, flags); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Normal3fContextANGLE(GLeglContext ctx, GLfloat nx, GLfloat ny, GLfloat nz) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLNormal3f, "context = %d, nx = %f, ny = %f, nz = %f", CID(context), nx, ny, nz); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateNormal3f(context, nx, ny, nz)); + if (isCallValid) + { + context->normal3f(nx, ny, nz); + } + ANGLE_CAPTURE(Normal3f, isCallValid, context, nx, ny, nz); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Normal3xContextANGLE(GLeglContext ctx, GLfixed nx, GLfixed ny, GLfixed nz) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLNormal3x, "context = %d, nx = 0x%X, ny = 0x%X, nz = 0x%X", CID(context), nx, + ny, nz); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateNormal3x(context, nx, ny, nz)); + if (isCallValid) + { + context->normal3x(nx, ny, nz); + } + ANGLE_CAPTURE(Normal3x, isCallValid, context, nx, ny, nz); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_NormalPointerContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLNormalPointer, + "context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::NormalPointerType, type), stride, (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateNormalPointer(context, typePacked, stride, pointer)); + if (isCallValid) + { + context->normalPointer(typePacked, stride, pointer); + } + ANGLE_CAPTURE(NormalPointer, isCallValid, context, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ObjectLabelContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLObjectLabel, + "context = %d, identifier = %s, name = %u, length = %d, label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ObjectIdentifier, identifier), name, length, + (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateObjectLabel(context, identifier, name, length, label)); + if (isCallValid) + { + context->objectLabel(identifier, name, length, label); + } + ANGLE_CAPTURE(ObjectLabel, isCallValid, context, identifier, name, length, label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ObjectLabelKHRContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLObjectLabelKHR, + "context = %d, identifier = %s, name = %u, length = %d, label = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::ObjectIdentifier, identifier), name, length, + (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateObjectLabelKHR(context, identifier, name, length, label)); + if (isCallValid) + { + context->objectLabel(identifier, name, length, label); + } + ANGLE_CAPTURE(ObjectLabelKHR, isCallValid, context, identifier, name, length, label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ObjectPtrLabelContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei length, + const GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLObjectPtrLabel, + "context = %d, ptr = 0x%016" PRIxPTR ", length = %d, label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, length, (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateObjectPtrLabel(context, ptr, length, label)); + if (isCallValid) + { + context->objectPtrLabel(ptr, length, label); + } + ANGLE_CAPTURE(ObjectPtrLabel, isCallValid, context, ptr, length, label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ObjectPtrLabelKHRContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei length, + const GLchar *label) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLObjectPtrLabelKHR, + "context = %d, ptr = 0x%016" PRIxPTR ", length = %d, label = 0x%016" PRIxPTR "", + CID(context), (uintptr_t)ptr, length, (uintptr_t)label); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateObjectPtrLabelKHR(context, ptr, length, label)); + if (isCallValid) + { + context->objectPtrLabel(ptr, length, label); + } + ANGLE_CAPTURE(ObjectPtrLabelKHR, isCallValid, context, ptr, length, label); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_OrthofContextANGLE(GLeglContext ctx, + GLfloat l, + GLfloat r, + GLfloat b, + GLfloat t, + GLfloat n, + GLfloat f) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLOrthof, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f", + CID(context), l, r, b, t, n, f); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateOrthof(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->orthof(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Orthof, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_OrthoxContextANGLE(GLeglContext ctx, + GLfixed l, + GLfixed r, + GLfixed b, + GLfixed t, + GLfixed n, + GLfixed f) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLOrthox, + "context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context), + l, r, b, t, n, f); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateOrthox(context, l, r, b, t, n, f)); + if (isCallValid) + { + context->orthox(l, r, b, t, n, f); + } + ANGLE_CAPTURE(Orthox, isCallValid, context, l, r, b, t, n, f); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PatchParameteriContextANGLE(GLeglContext ctx, GLenum pname, GLint value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPatchParameteri, "context = %d, pname = %s, value = %d", CID(context), + GLenumToString(GLenumGroup::PatchParameterName, pname), value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePatchParameteri(context, pname, value)); + if (isCallValid) + { + context->patchParameteri(pname, value); + } + ANGLE_CAPTURE(PatchParameteri, isCallValid, context, pname, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PatchParameteriEXTContextANGLE(GLeglContext ctx, GLenum pname, GLint value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPatchParameteriEXT, "context = %d, pname = %s, value = %d", CID(context), + GLenumToString(GLenumGroup::PatchParameterName, pname), value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePatchParameteriEXT(context, pname, value)); + if (isCallValid) + { + context->patchParameteri(pname, value); + } + ANGLE_CAPTURE(PatchParameteriEXT, isCallValid, context, pname, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PauseTransformFeedbackContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPauseTransformFeedback, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePauseTransformFeedback(context)); + if (isCallValid) + { + context->pauseTransformFeedback(); + } + ANGLE_CAPTURE(PauseTransformFeedback, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PixelStoreiContextANGLE(GLeglContext ctx, GLenum pname, GLint param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPixelStorei, "context = %d, pname = %s, param = %d", CID(context), + GLenumToString(GLenumGroup::PixelStoreParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePixelStorei(context, pname, param)); + if (isCallValid) + { + context->pixelStorei(pname, param); + } + ANGLE_CAPTURE(PixelStorei, isCallValid, context, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PointParameterfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPointParameterf, "context = %d, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterf(context, pnamePacked, param)); + if (isCallValid) + { + context->pointParameterf(pnamePacked, param); + } + ANGLE_CAPTURE(PointParameterf, isCallValid, context, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PointParameterfvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPointParameterfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterfv(context, pnamePacked, params)); + if (isCallValid) + { + context->pointParameterfv(pnamePacked, params); + } + ANGLE_CAPTURE(PointParameterfv, isCallValid, context, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PointParameterxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPointParameterx, "context = %d, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterx(context, pnamePacked, param)); + if (isCallValid) + { + context->pointParameterx(pnamePacked, param); + } + ANGLE_CAPTURE(PointParameterx, isCallValid, context, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PointParameterxvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPointParameterxv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PointParameter pnamePacked = PackParam<PointParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePointParameterxv(context, pnamePacked, params)); + if (isCallValid) + { + context->pointParameterxv(pnamePacked, params); + } + ANGLE_CAPTURE(PointParameterxv, isCallValid, context, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PointSizeContextANGLE(GLeglContext ctx, GLfloat size) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPointSize, "context = %d, size = %f", CID(context), size); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePointSize(context, size)); + if (isCallValid) + { + context->pointSize(size); + } + ANGLE_CAPTURE(PointSize, isCallValid, context, size); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PointSizePointerOESContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPointSizePointerOES, + "context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, type), stride, (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePointSizePointerOES(context, typePacked, stride, pointer)); + if (isCallValid) + { + context->pointSizePointer(typePacked, stride, pointer); + } + ANGLE_CAPTURE(PointSizePointerOES, isCallValid, context, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PointSizexContextANGLE(GLeglContext ctx, GLfixed size) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPointSizex, "context = %d, size = 0x%X", CID(context), size); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePointSizex(context, size)); + if (isCallValid) + { + context->pointSizex(size); + } + ANGLE_CAPTURE(PointSizex, isCallValid, context, size); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PolygonOffsetContextANGLE(GLeglContext ctx, GLfloat factor, GLfloat units) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPolygonOffset, "context = %d, factor = %f, units = %f", CID(context), factor, + units); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePolygonOffset(context, factor, units)); + if (isCallValid) + { + context->polygonOffset(factor, units); + } + ANGLE_CAPTURE(PolygonOffset, isCallValid, context, factor, units); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PolygonOffsetxContextANGLE(GLeglContext ctx, GLfixed factor, GLfixed units) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPolygonOffsetx, "context = %d, factor = 0x%X, units = 0x%X", CID(context), + factor, units); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePolygonOffsetx(context, factor, units)); + if (isCallValid) + { + context->polygonOffsetx(factor, units); + } + ANGLE_CAPTURE(PolygonOffsetx, isCallValid, context, factor, units); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PopDebugGroupContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPopDebugGroup, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopDebugGroup(context)); + if (isCallValid) + { + context->popDebugGroup(); + } + ANGLE_CAPTURE(PopDebugGroup, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PopDebugGroupKHRContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPopDebugGroupKHR, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopDebugGroupKHR(context)); + if (isCallValid) + { + context->popDebugGroup(); + } + ANGLE_CAPTURE(PopDebugGroupKHR, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PopGroupMarkerEXTContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + // Don't run the EVENT() macro on the EXT_debug_marker entry points. + // It can interfere with the debug events being set by the caller. + // EVENT(context, GLPopGroupMarkerEXT, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopGroupMarkerEXT(context)); + if (isCallValid) + { + context->popGroupMarker(); + } + ANGLE_CAPTURE(PopGroupMarkerEXT, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PopMatrixContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPopMatrix, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePopMatrix(context)); + if (isCallValid) + { + context->popMatrix(); + } + ANGLE_CAPTURE(PopMatrix, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PrimitiveBoundingBoxContextANGLE(GLeglContext ctx, + GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPrimitiveBoundingBox, + "context = %d, minX = %f, minY = %f, minZ = %f, minW = %f, maxX = %f, maxY = %f, maxZ = " + "%f, maxW = %f", + CID(context), minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidatePrimitiveBoundingBox(context, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW)); + if (isCallValid) + { + context->primitiveBoundingBox(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + } + ANGLE_CAPTURE(PrimitiveBoundingBox, isCallValid, context, minX, minY, minZ, minW, maxX, + maxY, maxZ, maxW); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PrimitiveBoundingBoxEXTContextANGLE(GLeglContext ctx, + GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPrimitiveBoundingBoxEXT, + "context = %d, minX = %f, minY = %f, minZ = %f, minW = %f, maxX = %f, maxY = %f, maxZ = " + "%f, maxW = %f", + CID(context), minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePrimitiveBoundingBoxEXT(context, minX, minY, minZ, minW, maxX, + maxY, maxZ, maxW)); + if (isCallValid) + { + context->primitiveBoundingBox(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); + } + ANGLE_CAPTURE(PrimitiveBoundingBoxEXT, isCallValid, context, minX, minY, minZ, minW, maxX, + maxY, maxZ, maxW); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramBinaryContextANGLE(GLeglContext ctx, + GLuint program, + GLenum binaryFormat, + const void *binary, + GLsizei length) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramBinary, + "context = %d, program = %u, binaryFormat = %s, binary = 0x%016" PRIxPTR ", length = %d", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, binaryFormat), + (uintptr_t)binary, length); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramBinary(context, programPacked, binaryFormat, binary, length)); + if (isCallValid) + { + context->programBinary(programPacked, binaryFormat, binary, length); + } + ANGLE_CAPTURE(ProgramBinary, isCallValid, context, programPacked, binaryFormat, binary, + length); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramBinaryOESContextANGLE(GLeglContext ctx, + GLuint program, + GLenum binaryFormat, + const void *binary, + GLint length) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramBinaryOES, + "context = %d, program = %u, binaryFormat = %s, binary = 0x%016" PRIxPTR ", length = %d", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, binaryFormat), + (uintptr_t)binary, length); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramBinaryOES(context, programPacked, binaryFormat, binary, length)); + if (isCallValid) + { + context->programBinary(programPacked, binaryFormat, binary, length); + } + ANGLE_CAPTURE(ProgramBinaryOES, isCallValid, context, programPacked, binaryFormat, binary, + length); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramParameteriContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramParameteri, "context = %d, program = %u, pname = %s, value = %d", + CID(context), program, GLenumToString(GLenumGroup::ProgramParameterPName, pname), value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramParameteri(context, programPacked, pname, value)); + if (isCallValid) + { + context->programParameteri(programPacked, pname, value); + } + ANGLE_CAPTURE(ProgramParameteri, isCallValid, context, programPacked, pname, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramParameteriEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramParameteriEXT, "context = %d, program = %u, pname = %s, value = %d", + CID(context), program, GLenumToString(GLenumGroup::ProgramParameterPName, pname), value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramParameteriEXT(context, programPacked, pname, value)); + if (isCallValid) + { + context->programParameteri(programPacked, pname, value); + } + ANGLE_CAPTURE(ProgramParameteriEXT, isCallValid, context, programPacked, pname, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1f, "context = %d, program = %u, location = %d, v0 = %f", + CID(context), program, location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniform1f(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1f(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1f, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1fEXT, "context = %d, program = %u, location = %d, v0 = %f", + CID(context), program, location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1fEXT(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1f(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1fEXT, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1i, "context = %d, program = %u, location = %d, v0 = %d", + CID(context), program, location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniform1i(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1i(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1i, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1iEXT, "context = %d, program = %u, location = %d, v0 = %d", + CID(context), program, location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1iEXT(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1i(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1iEXT, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1ui, "context = %d, program = %u, location = %d, v0 = %u", + CID(context), program, location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniform1ui(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1ui(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1ui, isCallValid, context, programPacked, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1uiEXT, "context = %d, program = %u, location = %d, v0 = %u", + CID(context), program, location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1uiEXT(context, programPacked, locationPacked, v0)); + if (isCallValid) + { + context->programUniform1ui(programPacked, locationPacked, v0); + } + ANGLE_CAPTURE(ProgramUniform1uiEXT, isCallValid, context, programPacked, locationPacked, + v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform1uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform1uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform1uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform1uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform1uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2f, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f", CID(context), program, + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2f(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2f(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2f, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2fEXT, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f", CID(context), program, + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2fEXT(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2f(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2fEXT, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2i, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d", CID(context), program, + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2i(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2i(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2i, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2iEXT, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d", CID(context), program, + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2iEXT(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2i(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2iEXT, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2ui, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u", CID(context), program, + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2ui(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2ui(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2ui, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2uiEXT, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u", CID(context), program, + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2uiEXT(context, programPacked, locationPacked, v0, v1)); + if (isCallValid) + { + context->programUniform2ui(programPacked, locationPacked, v0, v1); + } + ANGLE_CAPTURE(ProgramUniform2uiEXT, isCallValid, context, programPacked, locationPacked, v0, + v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform2uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform2uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform2uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform2uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform2uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3f, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f", CID(context), + program, location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3f(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3f(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3f, isCallValid, context, programPacked, locationPacked, v0, v1, + v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3fEXT, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f", CID(context), + program, location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3fEXT(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3f(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3fEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3i, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d", CID(context), + program, location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3i(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3i(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3i, isCallValid, context, programPacked, locationPacked, v0, v1, + v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3iEXT, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d", CID(context), + program, location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3iEXT(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3i(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3iEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3ui, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u", CID(context), + program, location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3ui(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3ui(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3ui, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3uiEXT, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u", CID(context), + program, location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3uiEXT(context, programPacked, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->programUniform3ui(programPacked, locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(ProgramUniform3uiEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform3uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform3uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform3uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform3uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform3uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4f, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f, v3 = %f", + CID(context), program, location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4f(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4f(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4f, isCallValid, context, programPacked, locationPacked, v0, v1, + v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4fEXT, + "context = %d, program = %u, location = %d, v0 = %f, v1 = %f, v2 = %f, v3 = %f", + CID(context), program, location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4fEXT(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4f(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4fEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4fv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4fv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4fv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4fvEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4fvEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4fv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4fvEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2, + GLint v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4i, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d, v3 = %d", + CID(context), program, location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4i(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4i(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4i, isCallValid, context, programPacked, locationPacked, v0, v1, + v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2, + GLint v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4iEXT, + "context = %d, program = %u, location = %d, v0 = %d, v1 = %d, v2 = %d, v3 = %d", + CID(context), program, location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4iEXT(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4i(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4iEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4iv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4iv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4iv, isCallValid, context, programPacked, locationPacked, count, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4ivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4ivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4iv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4ivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4ui, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u, v3 = %u", + CID(context), program, location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4ui(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4ui(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4ui, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4uiEXT, + "context = %d, program = %u, location = %d, v0 = %u, v1 = %u, v2 = %u, v3 = %u", + CID(context), program, location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4uiEXT(context, programPacked, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->programUniform4ui(programPacked, locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(ProgramUniform4uiEXT, isCallValid, context, programPacked, locationPacked, v0, + v1, v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4uiv, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4uiv(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4uiv, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniform4uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniform4uivEXT, + "context = %d, program = %u, location = %d, count = %d, value = 0x%016" PRIxPTR "", + CID(context), program, location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateProgramUniform4uivEXT(context, programPacked, locationPacked, count, value)); + if (isCallValid) + { + context->programUniform4uiv(programPacked, locationPacked, count, value); + } + ANGLE_CAPTURE(ProgramUniform4uivEXT, isCallValid, context, programPacked, locationPacked, + count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix2fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2fv(context, programPacked, locationPacked, + count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2fv, isCallValid, context, programPacked, locationPacked, + count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix2fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix2x3fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x3fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x3fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix2x3fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x3fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x3fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix2x4fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x4fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x4fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix2x4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix2x4fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix2x4fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix2x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix2x4fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix3fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3fv(context, programPacked, locationPacked, + count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3fv, isCallValid, context, programPacked, locationPacked, + count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix3fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix3x2fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x2fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x2fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix3x2fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x2fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x2fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix3x4fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x4fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x4fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix3x4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix3x4fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix3x4fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix3x4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix3x4fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix4fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4fv(context, programPacked, locationPacked, + count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4fv, isCallValid, context, programPacked, locationPacked, + count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix4fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix4x2fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x2fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x2fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix4x2fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x2fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x2fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x2fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix4x3fv, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x3fv( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x3fv, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProgramUniformMatrix4x3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProgramUniformMatrix4x3fvEXT, + "context = %d, program = %u, location = %d, count = %d, transpose = %s, value = " + "0x%016" PRIxPTR "", + CID(context), program, location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateProgramUniformMatrix4x3fvEXT( + context, programPacked, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->programUniformMatrix4x3fv(programPacked, locationPacked, count, transpose, + value); + } + ANGLE_CAPTURE(ProgramUniformMatrix4x3fvEXT, isCallValid, context, programPacked, + locationPacked, count, transpose, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PushDebugGroupContextANGLE(GLeglContext ctx, + GLenum source, + GLuint id, + GLsizei length, + const GLchar *message) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPushDebugGroup, + "context = %d, source = %s, id = %u, length = %d, message = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), id, length, + (uintptr_t)message); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePushDebugGroup(context, source, id, length, message)); + if (isCallValid) + { + context->pushDebugGroup(source, id, length, message); + } + ANGLE_CAPTURE(PushDebugGroup, isCallValid, context, source, id, length, message); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PushDebugGroupKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLuint id, + GLsizei length, + const GLchar *message) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPushDebugGroupKHR, + "context = %d, source = %s, id = %u, length = %d, message = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DebugSource, source), id, length, + (uintptr_t)message); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidatePushDebugGroupKHR(context, source, id, length, message)); + if (isCallValid) + { + context->pushDebugGroup(source, id, length, message); + } + ANGLE_CAPTURE(PushDebugGroupKHR, isCallValid, context, source, id, length, message); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PushGroupMarkerEXTContextANGLE(GLeglContext ctx, + GLsizei length, + const GLchar *marker) +{ + Context *context = static_cast<gl::Context *>(ctx); + // Don't run the EVENT() macro on the EXT_debug_marker entry points. + // It can interfere with the debug events being set by the caller. + // EVENT(context, GLPushGroupMarkerEXT, "context = %d, length = %d, marker = 0x%016" PRIxPTR "", + // CID(context), length, (uintptr_t)marker); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidatePushGroupMarkerEXT(context, length, marker)); + if (isCallValid) + { + context->pushGroupMarker(length, marker); + } + ANGLE_CAPTURE(PushGroupMarkerEXT, isCallValid, context, length, marker); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_PushMatrixContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLPushMatrix, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidatePushMatrix(context)); + if (isCallValid) + { + context->pushMatrix(); + } + ANGLE_CAPTURE(PushMatrix, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_QueryCounterEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLQueryCounterEXT, "context = %d, id = %u, target = %s", CID(context), id, + GLenumToString(GLenumGroup::QueryTarget, target)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateQueryCounterEXT(context, idPacked, targetPacked)); + if (isCallValid) + { + context->queryCounter(idPacked, targetPacked); + } + ANGLE_CAPTURE(QueryCounterEXT, isCallValid, context, idPacked, targetPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLbitfield GL_APIENTRY GL_QueryMatrixxOESContextANGLE(GLeglContext ctx, + GLfixed *mantissa, + GLint *exponent) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLQueryMatrixxOES, + "context = %d, mantissa = 0x%016" PRIxPTR ", exponent = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)mantissa, (uintptr_t)exponent); + + GLbitfield returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateQueryMatrixxOES(context, mantissa, exponent)); + if (isCallValid) + { + returnValue = context->queryMatrixx(mantissa, exponent); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLQueryMatrixxOES, GLbitfield>(); + } + ANGLE_CAPTURE(QueryMatrixxOES, isCallValid, context, mantissa, exponent, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLQueryMatrixxOES, GLbitfield>(); + } + return returnValue; +} + +void GL_APIENTRY GL_ReadBufferContextANGLE(GLeglContext ctx, GLenum src) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLReadBuffer, "context = %d, src = %s", CID(context), + GLenumToString(GLenumGroup::ReadBufferMode, src)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateReadBuffer(context, src)); + if (isCallValid) + { + context->readBuffer(src); + } + ANGLE_CAPTURE(ReadBuffer, isCallValid, context, src); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ReadPixelsContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLReadPixels, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, pixels = " + "0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateReadPixels(context, x, y, width, height, format, type, pixels)); + if (isCallValid) + { + context->readPixels(x, y, width, height, format, type, pixels); + } + ANGLE_CAPTURE(ReadPixels, isCallValid, context, x, y, width, height, format, type, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ReadnPixelsContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLReadnPixels, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, data = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadnPixels(context, x, y, width, height, format, type, bufSize, data)); + if (isCallValid) + { + context->readnPixels(x, y, width, height, format, type, bufSize, data); + } + ANGLE_CAPTURE(ReadnPixels, isCallValid, context, x, y, width, height, format, type, bufSize, + data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ReadnPixelsEXTContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLReadnPixelsEXT, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, data = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadnPixelsEXT(context, x, y, width, height, format, type, bufSize, data)); + if (isCallValid) + { + context->readnPixels(x, y, width, height, format, type, bufSize, data); + } + ANGLE_CAPTURE(ReadnPixelsEXT, isCallValid, context, x, y, width, height, format, type, + bufSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ReleaseShaderCompilerContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLReleaseShaderCompiler, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateReleaseShaderCompiler(context)); + if (isCallValid) + { + context->releaseShaderCompiler(); + } + ANGLE_CAPTURE(ReleaseShaderCompiler, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_RenderbufferStorageContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRenderbufferStorage, + "context = %d, target = %s, internalformat = %s, width = %d, height = %d", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateRenderbufferStorage(context, target, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorage(target, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorage, isCallValid, context, target, internalformat, width, + height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_RenderbufferStorageMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRenderbufferStorageMultisample, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateRenderbufferStorageMultisample(context, target, samples, + internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorageMultisample(target, samples, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorageMultisample, isCallValid, context, target, samples, + internalformat, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_RenderbufferStorageMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRenderbufferStorageMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateRenderbufferStorageMultisampleANGLE( + context, target, samples, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorageMultisample(target, samples, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorageMultisampleANGLE, isCallValid, context, target, samples, + internalformat, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_RenderbufferStorageMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRenderbufferStorageMultisampleEXT, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateRenderbufferStorageMultisampleEXT( + context, target, samples, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorageMultisampleEXT(target, samples, internalformat, width, + height); + } + ANGLE_CAPTURE(RenderbufferStorageMultisampleEXT, isCallValid, context, target, samples, + internalformat, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_RenderbufferStorageOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRenderbufferStorageOES, + "context = %d, target = %s, internalformat = %s, width = %d, height = %d", CID(context), + GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateRenderbufferStorageOES(context, target, internalformat, width, height)); + if (isCallValid) + { + context->renderbufferStorage(target, internalformat, width, height); + } + ANGLE_CAPTURE(RenderbufferStorageOES, isCallValid, context, target, internalformat, width, + height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ResumeTransformFeedbackContextANGLE(GLeglContext ctx) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLResumeTransformFeedback, "context = %d", CID(context)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateResumeTransformFeedback(context)); + if (isCallValid) + { + context->resumeTransformFeedback(); + } + ANGLE_CAPTURE(ResumeTransformFeedback, isCallValid, context); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_RotatefContextANGLE(GLeglContext ctx, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRotatef, "context = %d, angle = %f, x = %f, y = %f, z = %f", CID(context), + angle, x, y, z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateRotatef(context, angle, x, y, z)); + if (isCallValid) + { + context->rotatef(angle, x, y, z); + } + ANGLE_CAPTURE(Rotatef, isCallValid, context, angle, x, y, z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_RotatexContextANGLE(GLeglContext ctx, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRotatex, "context = %d, angle = 0x%X, x = 0x%X, y = 0x%X, z = 0x%X", + CID(context), angle, x, y, z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateRotatex(context, angle, x, y, z)); + if (isCallValid) + { + context->rotatex(angle, x, y, z); + } + ANGLE_CAPTURE(Rotatex, isCallValid, context, angle, x, y, z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SampleCoverageContextANGLE(GLeglContext ctx, GLfloat value, GLboolean invert) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSampleCoverage, "context = %d, value = %f, invert = %s", CID(context), value, + GLbooleanToString(invert)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleCoverage(context, value, invert)); + if (isCallValid) + { + context->sampleCoverage(value, invert); + } + ANGLE_CAPTURE(SampleCoverage, isCallValid, context, value, invert); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SampleCoveragexContextANGLE(GLeglContext ctx, GLclampx value, GLboolean invert) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSampleCoveragex, "context = %d, value = 0x%X, invert = %s", CID(context), + value, GLbooleanToString(invert)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleCoveragex(context, value, invert)); + if (isCallValid) + { + context->sampleCoveragex(value, invert); + } + ANGLE_CAPTURE(SampleCoveragex, isCallValid, context, value, invert); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SampleMaskiContextANGLE(GLeglContext ctx, GLuint maskNumber, GLbitfield mask) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSampleMaski, "context = %d, maskNumber = %u, mask = %s", CID(context), + maskNumber, GLbitfieldToString(GLenumGroup::DefaultGroup, mask).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleMaski(context, maskNumber, mask)); + if (isCallValid) + { + context->sampleMaski(maskNumber, mask); + } + ANGLE_CAPTURE(SampleMaski, isCallValid, context, maskNumber, mask); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIiv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIiv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIiv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIivEXT, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIivEXT(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIivEXT, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIivOES, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIivOES(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIivOES, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIuivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIuiv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIuiv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIuiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIuiv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIuivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIuivEXT, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIuivEXT(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIuiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIuivEXT, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIuivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIuivOES, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterIuivOES(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterIuiv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterIuivOES, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterfContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterf, "context = %d, sampler = %u, pname = %s, param = %f", + CID(context), sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterf(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterf(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterf, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterfvContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLfloat *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterfv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameterfv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameterfv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameterfv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameteriContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameteri, "context = %d, sampler = %u, pname = %s, param = %d", + CID(context), sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameteri(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameteri(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameteri, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameteriv, + "context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context), + sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateSamplerParameteriv(context, samplerPacked, pname, param)); + if (isCallValid) + { + context->samplerParameteriv(samplerPacked, pname, param); + } + ANGLE_CAPTURE(SamplerParameteriv, isCallValid, context, samplerPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ScalefContextANGLE(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLScalef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateScalef(context, x, y, z)); + if (isCallValid) + { + context->scalef(x, y, z); + } + ANGLE_CAPTURE(Scalef, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ScalexContextANGLE(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLScalex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y, z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateScalex(context, x, y, z)); + if (isCallValid) + { + context->scalex(x, y, z); + } + ANGLE_CAPTURE(Scalex, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_ScissorContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLScissor, "context = %d, x = %d, y = %d, width = %d, height = %d", CID(context), + x, y, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateScissor(context, x, y, width, height)); + if (isCallValid) + { + context->scissor(x, y, width, height); + } + ANGLE_CAPTURE(Scissor, isCallValid, context, x, y, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SemaphoreParameterui64vEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum pname, + const GLuint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSemaphoreParameterui64vEXT, + "context = %d, semaphore = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + semaphore, GLenumToString(GLenumGroup::SemaphoreParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSemaphoreParameterui64vEXT(context, semaphorePacked, pname, params)); + if (isCallValid) + { + context->semaphoreParameterui64v(semaphorePacked, pname, params); + } + ANGLE_CAPTURE(SemaphoreParameterui64vEXT, isCallValid, context, semaphorePacked, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SetFenceNVContextANGLE(GLeglContext ctx, GLuint fence, GLenum condition) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSetFenceNV, "context = %d, fence = %u, condition = %s", CID(context), fence, + GLenumToString(GLenumGroup::DefaultGroup, condition)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSetFenceNV(context, fencePacked, condition)); + if (isCallValid) + { + context->setFenceNV(fencePacked, condition); + } + ANGLE_CAPTURE(SetFenceNV, isCallValid, context, fencePacked, condition); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ShadeModelContextANGLE(GLeglContext ctx, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLShadeModel, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::ShadingModel, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShadingModel modePacked = PackParam<ShadingModel>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateShadeModel(context, modePacked)); + if (isCallValid) + { + context->shadeModel(modePacked); + } + ANGLE_CAPTURE(ShadeModel, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ShaderBinaryContextANGLE(GLeglContext ctx, + GLsizei count, + const GLuint *shaders, + GLenum binaryformat, + const void *binary, + GLsizei length) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLShaderBinary, + "context = %d, count = %d, shaders = 0x%016" PRIxPTR + ", binaryformat = %s, binary = 0x%016" PRIxPTR ", length = %d", + CID(context), count, (uintptr_t)shaders, + GLenumToString(GLenumGroup::DefaultGroup, binaryformat), (uintptr_t)binary, length); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + const ShaderProgramID *shadersPacked = PackParam<const ShaderProgramID *>(shaders); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateShaderBinary(context, count, shadersPacked, binaryformat, binary, length)); + if (isCallValid) + { + context->shaderBinary(count, shadersPacked, binaryformat, binary, length); + } + ANGLE_CAPTURE(ShaderBinary, isCallValid, context, count, shadersPacked, binaryformat, + binary, length); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ShaderSourceContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei count, + const GLchar *const *string, + const GLint *length) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLShaderSource, + "context = %d, shader = %u, count = %d, string = 0x%016" PRIxPTR + ", length = 0x%016" PRIxPTR "", + CID(context), shader, count, (uintptr_t)string, (uintptr_t)length); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateShaderSource(context, shaderPacked, count, string, length)); + if (isCallValid) + { + context->shaderSource(shaderPacked, count, string, length); + } + ANGLE_CAPTURE(ShaderSource, isCallValid, context, shaderPacked, count, string, length); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SignalSemaphoreEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *dstLayouts) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSignalSemaphoreEXT, + "context = %d, semaphore = %u, numBufferBarriers = %u, buffers = 0x%016" PRIxPTR + ", numTextureBarriers = %u, textures = 0x%016" PRIxPTR ", dstLayouts = 0x%016" PRIxPTR "", + CID(context), semaphore, numBufferBarriers, (uintptr_t)buffers, numTextureBarriers, + (uintptr_t)textures, (uintptr_t)dstLayouts); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + const BufferID *buffersPacked = PackParam<const BufferID *>(buffers); + const TextureID *texturesPacked = PackParam<const TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSignalSemaphoreEXT(context, semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, dstLayouts)); + if (isCallValid) + { + context->signalSemaphore(semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, dstLayouts); + } + ANGLE_CAPTURE(SignalSemaphoreEXT, isCallValid, context, semaphorePacked, numBufferBarriers, + buffersPacked, numTextureBarriers, texturesPacked, dstLayouts); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_StencilFuncContextANGLE(GLeglContext ctx, GLenum func, GLint ref, GLuint mask) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLStencilFunc, "context = %d, func = %s, ref = %d, mask = %u", CID(context), + GLenumToString(GLenumGroup::StencilFunction, func), ref, mask); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateStencilFunc(context, func, ref, mask)); + if (isCallValid) + { + context->stencilFunc(func, ref, mask); + } + ANGLE_CAPTURE(StencilFunc, isCallValid, context, func, ref, mask); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_StencilFuncSeparateContextANGLE(GLeglContext ctx, + GLenum face, + GLenum func, + GLint ref, + GLuint mask) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLStencilFuncSeparate, "context = %d, face = %s, func = %s, ref = %d, mask = %u", + CID(context), GLenumToString(GLenumGroup::StencilFaceDirection, face), + GLenumToString(GLenumGroup::StencilFunction, func), ref, mask); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateStencilFuncSeparate(context, face, func, ref, mask)); + if (isCallValid) + { + context->stencilFuncSeparate(face, func, ref, mask); + } + ANGLE_CAPTURE(StencilFuncSeparate, isCallValid, context, face, func, ref, mask); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_StencilMaskContextANGLE(GLeglContext ctx, GLuint mask) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLStencilMask, "context = %d, mask = %u", CID(context), mask); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateStencilMask(context, mask)); + if (isCallValid) + { + context->stencilMask(mask); + } + ANGLE_CAPTURE(StencilMask, isCallValid, context, mask); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_StencilMaskSeparateContextANGLE(GLeglContext ctx, GLenum face, GLuint mask) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLStencilMaskSeparate, "context = %d, face = %s, mask = %u", CID(context), + GLenumToString(GLenumGroup::StencilFaceDirection, face), mask); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateStencilMaskSeparate(context, face, mask)); + if (isCallValid) + { + context->stencilMaskSeparate(face, mask); + } + ANGLE_CAPTURE(StencilMaskSeparate, isCallValid, context, face, mask); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_StencilOpContextANGLE(GLeglContext ctx, GLenum fail, GLenum zfail, GLenum zpass) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLStencilOp, "context = %d, fail = %s, zfail = %s, zpass = %s", CID(context), + GLenumToString(GLenumGroup::StencilOp, fail), + GLenumToString(GLenumGroup::StencilOp, zfail), + GLenumToString(GLenumGroup::StencilOp, zpass)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateStencilOp(context, fail, zfail, zpass)); + if (isCallValid) + { + context->stencilOp(fail, zfail, zpass); + } + ANGLE_CAPTURE(StencilOp, isCallValid, context, fail, zfail, zpass); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_StencilOpSeparateContextANGLE(GLeglContext ctx, + GLenum face, + GLenum sfail, + GLenum dpfail, + GLenum dppass) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLStencilOpSeparate, + "context = %d, face = %s, sfail = %s, dpfail = %s, dppass = %s", CID(context), + GLenumToString(GLenumGroup::StencilFaceDirection, face), + GLenumToString(GLenumGroup::StencilOp, sfail), + GLenumToString(GLenumGroup::StencilOp, dpfail), + GLenumToString(GLenumGroup::StencilOp, dppass)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateStencilOpSeparate(context, face, sfail, dpfail, dppass)); + if (isCallValid) + { + context->stencilOpSeparate(face, sfail, dpfail, dppass); + } + ANGLE_CAPTURE(StencilOpSeparate, isCallValid, context, face, sfail, dpfail, dppass); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLboolean GL_APIENTRY GL_TestFenceNVContextANGLE(GLeglContext ctx, GLuint fence) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTestFenceNV, "context = %d, fence = %u", CID(context), fence); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + FenceNVID fencePacked = PackParam<FenceNVID>(fence); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateTestFenceNV(context, fencePacked)); + if (isCallValid) + { + returnValue = context->testFenceNV(fencePacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLTestFenceNV, GLboolean>(); + } + ANGLE_CAPTURE(TestFenceNV, isCallValid, context, fencePacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLTestFenceNV, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_TexBufferContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexBuffer, "context = %d, target = %s, internalformat = %s, buffer = %u", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBuffer(context, targetPacked, internalformat, bufferPacked)); + if (isCallValid) + { + context->texBuffer(targetPacked, internalformat, bufferPacked); + } + ANGLE_CAPTURE(TexBuffer, isCallValid, context, targetPacked, internalformat, bufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexBufferEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexBufferEXT, "context = %d, target = %s, internalformat = %s, buffer = %u", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexBufferEXT(context, targetPacked, internalformat, bufferPacked)); + if (isCallValid) + { + context->texBuffer(targetPacked, internalformat, bufferPacked); + } + ANGLE_CAPTURE(TexBufferEXT, isCallValid, context, targetPacked, internalformat, + bufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexBufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexBufferOES, "context = %d, target = %s, internalformat = %s, buffer = %u", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexBufferOES(context, targetPacked, internalformat, bufferPacked)); + if (isCallValid) + { + context->texBuffer(targetPacked, internalformat, bufferPacked); + } + ANGLE_CAPTURE(TexBufferOES, isCallValid, context, targetPacked, internalformat, + bufferPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexBufferRange, + "context = %d, target = %s, internalformat = %s, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBufferRange(context, targetPacked, internalformat, + bufferPacked, offset, size)); + if (isCallValid) + { + context->texBufferRange(targetPacked, internalformat, bufferPacked, offset, size); + } + ANGLE_CAPTURE(TexBufferRange, isCallValid, context, targetPacked, internalformat, + bufferPacked, offset, size); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexBufferRangeEXT, + "context = %d, target = %s, internalformat = %s, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBufferRangeEXT(context, targetPacked, internalformat, + bufferPacked, offset, size)); + if (isCallValid) + { + context->texBufferRange(targetPacked, internalformat, bufferPacked, offset, size); + } + ANGLE_CAPTURE(TexBufferRangeEXT, isCallValid, context, targetPacked, internalformat, + bufferPacked, offset, size); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexBufferRangeOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexBufferRangeOES, + "context = %d, target = %s, internalformat = %s, buffer = %u, offset = %llu, size = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer, + static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + BufferID bufferPacked = PackParam<BufferID>(buffer); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexBufferRangeOES(context, targetPacked, internalformat, + bufferPacked, offset, size)); + if (isCallValid) + { + context->texBufferRange(targetPacked, internalformat, bufferPacked, offset, size); + } + ANGLE_CAPTURE(TexBufferRangeOES, isCallValid, context, targetPacked, internalformat, + bufferPacked, offset, size); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexCoordPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexCoordPointer, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::TexCoordPointerType, type), stride, + (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexCoordPointer(context, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->texCoordPointer(size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(TexCoordPointer, isCallValid, context, size, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexEnvfContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexEnvf, "context = %d, target = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvf(context, targetPacked, pnamePacked, param)); + if (isCallValid) + { + context->texEnvf(targetPacked, pnamePacked, param); + } + ANGLE_CAPTURE(TexEnvf, isCallValid, context, targetPacked, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexEnvfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexEnvfv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvfv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->texEnvfv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(TexEnvfv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexEnviContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexEnvi, "context = %d, target = %s, pname = %s, param = %d", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvi(context, targetPacked, pnamePacked, param)); + if (isCallValid) + { + context->texEnvi(targetPacked, pnamePacked, param); + } + ANGLE_CAPTURE(TexEnvi, isCallValid, context, targetPacked, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexEnvivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexEnviv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnviv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->texEnviv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(TexEnviv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexEnvxContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexEnvx, "context = %d, target = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvx(context, targetPacked, pnamePacked, param)); + if (isCallValid) + { + context->texEnvx(targetPacked, pnamePacked, param); + } + ANGLE_CAPTURE(TexEnvx, isCallValid, context, targetPacked, pnamePacked, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexEnvxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexEnvxv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target), + GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target); + TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexEnvxv(context, targetPacked, pnamePacked, params)); + if (isCallValid) + { + context->texEnvxv(targetPacked, pnamePacked, params); + } + ANGLE_CAPTURE(TexEnvxv, isCallValid, context, targetPacked, pnamePacked, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexGenfOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexGenfOES, "context = %d, coord = %s, pname = %s, param = %f", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenfOES(context, coord, pname, param)); + if (isCallValid) + { + context->texGenf(coord, pname, param); + } + ANGLE_CAPTURE(TexGenfOES, isCallValid, context, coord, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexGenfvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexGenfvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenfvOES(context, coord, pname, params)); + if (isCallValid) + { + context->texGenfv(coord, pname, params); + } + ANGLE_CAPTURE(TexGenfvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexGeniOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLint param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexGeniOES, "context = %d, coord = %s, pname = %s, param = %d", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGeniOES(context, coord, pname, param)); + if (isCallValid) + { + context->texGeni(coord, pname, param); + } + ANGLE_CAPTURE(TexGeniOES, isCallValid, context, coord, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexGenivOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexGenivOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenivOES(context, coord, pname, params)); + if (isCallValid) + { + context->texGeniv(coord, pname, params); + } + ANGLE_CAPTURE(TexGenivOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexGenxOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexGenxOES, "context = %d, coord = %s, pname = %s, param = 0x%X", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenxOES(context, coord, pname, param)); + if (isCallValid) + { + context->texGenx(coord, pname, param); + } + ANGLE_CAPTURE(TexGenxOES, isCallValid, context, coord, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexGenxvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexGenxvOES, + "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureCoordName, coord), + GLenumToString(GLenumGroup::TextureGenParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexGenxvOES(context, coord, pname, params)); + if (isCallValid) + { + context->texGenxv(coord, pname, params); + } + ANGLE_CAPTURE(TexGenxvOES, isCallValid, context, coord, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexImage2D, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "border = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, internalformat, + width, height, border, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexImage2D(context, targetPacked, level, internalformat, width, + height, border, format, type, pixels)); + if (isCallValid) + { + context->texImage2D(targetPacked, level, internalformat, width, height, border, format, + type, pixels); + } + ANGLE_CAPTURE(TexImage2D, isCallValid, context, targetPacked, level, internalformat, width, + height, border, format, type, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexImage3D, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "depth = %d, border = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, internalformat, + width, height, depth, border, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexImage3D(context, targetPacked, level, internalformat, width, + height, depth, border, format, type, pixels)); + if (isCallValid) + { + context->texImage3D(targetPacked, level, internalformat, width, height, depth, border, + format, type, pixels); + } + ANGLE_CAPTURE(TexImage3D, isCallValid, context, targetPacked, level, internalformat, width, + height, depth, border, format, type, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexImage3DOES, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, border, + GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage3DOES(context, targetPacked, level, internalformat, width, height, + depth, border, format, type, pixels)); + if (isCallValid) + { + context->texImage3D(targetPacked, level, internalformat, width, height, depth, border, + format, type, pixels); + } + ANGLE_CAPTURE(TexImage3DOES, isCallValid, context, targetPacked, level, internalformat, + width, height, depth, border, format, type, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIuivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIuiv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIuiv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIuiv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIuivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIuivEXT, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIuivEXT(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIuivEXT, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIuivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIuivOES, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterIuivOES(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterIuiv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterIuivOES, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterfContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterf, "context = %d, target = %s, pname = %s, param = %f", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterf(context, targetPacked, pname, param)); + if (isCallValid) + { + context->texParameterf(targetPacked, pname, param); + } + ANGLE_CAPTURE(TexParameterf, isCallValid, context, targetPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterfv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterfv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterfv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterfv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameteriContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameteri, "context = %d, target = %s, pname = %s, param = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameteri(context, targetPacked, pname, param)); + if (isCallValid) + { + context->texParameteri(targetPacked, pname, param); + } + ANGLE_CAPTURE(TexParameteri, isCallValid, context, targetPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameteriv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameteriv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameteriv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameteriv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterxContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterx, "context = %d, target = %s, pname = %s, param = 0x%X", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterx(context, targetPacked, pname, param)); + if (isCallValid) + { + context->texParameterx(targetPacked, pname, param); + } + ANGLE_CAPTURE(TexParameterx, isCallValid, context, targetPacked, pname, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfixed *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterxv, + "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexParameterxv(context, targetPacked, pname, params)); + if (isCallValid) + { + context->texParameterxv(targetPacked, pname, params); + } + ANGLE_CAPTURE(TexParameterxv, isCallValid, context, targetPacked, pname, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage1DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage1DEXT, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage1DEXT(context, target, levels, internalformat, width)); + if (isCallValid) + { + context->texStorage1D(target, levels, internalformat, width); + } + ANGLE_CAPTURE(TexStorage1DEXT, isCallValid, context, target, levels, internalformat, width); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage2D, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2D(context, targetPacked, levels, internalformat, width, height)); + if (isCallValid) + { + context->texStorage2D(targetPacked, levels, internalformat, width, height); + } + ANGLE_CAPTURE(TexStorage2D, isCallValid, context, targetPacked, levels, internalformat, + width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage2DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage2DEXT, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2DEXT(context, targetPacked, levels, internalformat, width, height)); + if (isCallValid) + { + context->texStorage2D(targetPacked, levels, internalformat, width, height); + } + ANGLE_CAPTURE(TexStorage2DEXT, isCallValid, context, targetPacked, levels, internalformat, + width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage2DMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage2DMultisample, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, + GLbooleanToString(fixedsamplelocations)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2DMultisample(context, targetPacked, samples, internalformat, width, + height, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height, + fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage2DMultisample, isCallValid, context, targetPacked, samples, + internalformat, width, height, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage3D, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorage3D(context, targetPacked, levels, internalformat, + width, height, depth)); + if (isCallValid) + { + context->texStorage3D(targetPacked, levels, internalformat, width, height, depth); + } + ANGLE_CAPTURE(TexStorage3D, isCallValid, context, targetPacked, levels, internalformat, + width, height, depth); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage3DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage3DEXT, + "context = %d, target = %s, levels = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorage3DEXT(context, targetPacked, levels, internalformat, + width, height, depth)); + if (isCallValid) + { + context->texStorage3D(targetPacked, levels, internalformat, width, height, depth); + } + ANGLE_CAPTURE(TexStorage3DEXT, isCallValid, context, targetPacked, levels, internalformat, + width, height, depth); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage3DMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage3DMultisample, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, + GLbooleanToString(fixedsamplelocations)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage3DMultisample(context, targetPacked, samples, internalformat, width, + height, depth, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage3DMultisample(targetPacked, samples, internalformat, width, height, + depth, fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage3DMultisample, isCallValid, context, targetPacked, samples, + internalformat, width, height, depth, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage3DMultisampleOESContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage3DMultisampleOES, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth, + GLbooleanToString(fixedsamplelocations)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage3DMultisampleOES(context, targetPacked, samples, internalformat, + width, height, depth, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage3DMultisample(targetPacked, samples, internalformat, width, height, + depth, fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage3DMultisampleOES, isCallValid, context, targetPacked, samples, + internalformat, width, height, depth, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMem2DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorageMem2DEXT, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, memory, + static_cast<unsigned long long>(offset)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMem2DEXT(context, targetPacked, levels, internalFormat, width, + height, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem2D(targetPacked, levels, internalFormat, width, height, + memoryPacked, offset); + } + ANGLE_CAPTURE(TexStorageMem2DEXT, isCallValid, context, targetPacked, levels, + internalFormat, width, height, memoryPacked, offset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMem2DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorageMem2DMultisampleEXT, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "fixedSampleLocations = %s, memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTexStorageMem2DMultisampleEXT( + context, targetPacked, samples, internalFormat, width, + height, fixedSampleLocations, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem2DMultisample(targetPacked, samples, internalFormat, width, + height, fixedSampleLocations, memoryPacked, offset); + } + ANGLE_CAPTURE(TexStorageMem2DMultisampleEXT, isCallValid, context, targetPacked, samples, + internalFormat, width, height, fixedSampleLocations, memoryPacked, offset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMem3DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorageMem3DEXT, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, memory, + static_cast<unsigned long long>(offset)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMem3DEXT(context, targetPacked, levels, internalFormat, width, + height, depth, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem3D(targetPacked, levels, internalFormat, width, height, depth, + memoryPacked, offset); + } + ANGLE_CAPTURE(TexStorageMem3DEXT, isCallValid, context, targetPacked, levels, + internalFormat, width, height, depth, memoryPacked, offset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMem3DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorageMem3DMultisampleEXT, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, fixedSampleLocations = %s, memory = %u, offset = %llu", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorageMem3DMultisampleEXT( + context, targetPacked, samples, internalFormat, width, height, + depth, fixedSampleLocations, memoryPacked, offset)); + if (isCallValid) + { + context->texStorageMem3DMultisample(targetPacked, samples, internalFormat, width, + height, depth, fixedSampleLocations, memoryPacked, + offset); + } + ANGLE_CAPTURE(TexStorageMem3DMultisampleEXT, isCallValid, context, targetPacked, samples, + internalFormat, width, height, depth, fixedSampleLocations, memoryPacked, + offset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexSubImage2D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexSubImage2D(context, targetPacked, level, xoffset, yoffset, + width, height, format, type, pixels)); + if (isCallValid) + { + context->texSubImage2D(targetPacked, level, xoffset, yoffset, width, height, format, + type, pixels); + } + ANGLE_CAPTURE(TexSubImage2D, isCallValid, context, targetPacked, level, xoffset, yoffset, + width, height, format, type, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexSubImage3D, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, type, pixels)); + if (isCallValid) + { + context->texSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, height, + depth, format, type, pixels); + } + ANGLE_CAPTURE(TexSubImage3D, isCallValid, context, targetPacked, level, xoffset, yoffset, + zoffset, width, height, depth, format, type, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexSubImage3DOES, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexSubImage3DOES(context, targetPacked, level, xoffset, yoffset, zoffset, + width, height, depth, format, type, pixels)); + if (isCallValid) + { + context->texSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, height, + depth, format, type, pixels); + } + ANGLE_CAPTURE(TexSubImage3DOES, isCallValid, context, targetPacked, level, xoffset, yoffset, + zoffset, width, height, depth, format, type, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TransformFeedbackVaryingsContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTransformFeedbackVaryings, + "context = %d, program = %u, count = %d, varyings = 0x%016" PRIxPTR ", bufferMode = %s", + CID(context), program, count, (uintptr_t)varyings, + GLenumToString(GLenumGroup::DefaultGroup, bufferMode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateTransformFeedbackVaryings( + context, programPacked, count, varyings, bufferMode)); + if (isCallValid) + { + context->transformFeedbackVaryings(programPacked, count, varyings, bufferMode); + } + ANGLE_CAPTURE(TransformFeedbackVaryings, isCallValid, context, programPacked, count, + varyings, bufferMode); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TranslatefContextANGLE(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTranslatef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateTranslatef(context, x, y, z)); + if (isCallValid) + { + context->translatef(x, y, z); + } + ANGLE_CAPTURE(Translatef, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TranslatexContextANGLE(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTranslatex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y, + z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateTranslatex(context, x, y, z)); + if (isCallValid) + { + context->translatex(x, y, z); + } + ANGLE_CAPTURE(Translatex, isCallValid, context, x, y, z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform1fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform1f, "context = %d, location = %d, v0 = %f", CID(context), location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform1f(context, locationPacked, v0)); + if (isCallValid) + { + context->uniform1f(locationPacked, v0); + } + ANGLE_CAPTURE(Uniform1f, isCallValid, context, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform1fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform1fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform1fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform1fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform1fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform1iContextANGLE(GLeglContext ctx, GLint location, GLint v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform1i, "context = %d, location = %d, v0 = %d", CID(context), location, v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform1i(context, locationPacked, v0)); + if (isCallValid) + { + context->uniform1i(locationPacked, v0); + } + ANGLE_CAPTURE(Uniform1i, isCallValid, context, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform1ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform1iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform1iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform1iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform1iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform1uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform1ui, "context = %d, location = %d, v0 = %u", CID(context), location, + v0); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform1ui(context, locationPacked, v0)); + if (isCallValid) + { + context->uniform1ui(locationPacked, v0); + } + ANGLE_CAPTURE(Uniform1ui, isCallValid, context, locationPacked, v0); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform1uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform1uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform1uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform1uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform1uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform2fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform2f, "context = %d, location = %d, v0 = %f, v1 = %f", CID(context), + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform2f(context, locationPacked, v0, v1)); + if (isCallValid) + { + context->uniform2f(locationPacked, v0, v1); + } + ANGLE_CAPTURE(Uniform2f, isCallValid, context, locationPacked, v0, v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform2fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform2fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform2fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform2fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform2iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform2i, "context = %d, location = %d, v0 = %d, v1 = %d", CID(context), + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform2i(context, locationPacked, v0, v1)); + if (isCallValid) + { + context->uniform2i(locationPacked, v0, v1); + } + ANGLE_CAPTURE(Uniform2i, isCallValid, context, locationPacked, v0, v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform2ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform2iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform2iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform2iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform2iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform2uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform2ui, "context = %d, location = %d, v0 = %u, v1 = %u", CID(context), + location, v0, v1); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform2ui(context, locationPacked, v0, v1)); + if (isCallValid) + { + context->uniform2ui(locationPacked, v0, v1); + } + ANGLE_CAPTURE(Uniform2ui, isCallValid, context, locationPacked, v0, v1); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform2uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform2uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform2uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform2uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform2uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_Uniform3fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform3f, "context = %d, location = %d, v0 = %f, v1 = %f, v2 = %f", + CID(context), location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform3f(context, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->uniform3f(locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(Uniform3f, isCallValid, context, locationPacked, v0, v1, v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform3fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform3fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform3fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform3fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_Uniform3iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform3i, "context = %d, location = %d, v0 = %d, v1 = %d, v2 = %d", + CID(context), location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform3i(context, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->uniform3i(locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(Uniform3i, isCallValid, context, locationPacked, v0, v1, v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform3ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform3iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform3iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform3iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform3iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_Uniform3uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform3ui, "context = %d, location = %d, v0 = %u, v1 = %u, v2 = %u", + CID(context), location, v0, v1, v2); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUniform3ui(context, locationPacked, v0, v1, v2)); + if (isCallValid) + { + context->uniform3ui(locationPacked, v0, v1, v2); + } + ANGLE_CAPTURE(Uniform3ui, isCallValid, context, locationPacked, v0, v1, v2); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform3uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform3uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform3uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform3uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform3uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform4fContextANGLE(GLeglContext ctx, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform4f, "context = %d, location = %d, v0 = %f, v1 = %f, v2 = %f, v3 = %f", + CID(context), location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4f(context, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->uniform4f(locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(Uniform4f, isCallValid, context, locationPacked, v0, v1, v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform4fv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4fv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform4fv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform4fv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_Uniform4iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform4i, "context = %d, location = %d, v0 = %d, v1 = %d, v2 = %d, v3 = %d", + CID(context), location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4i(context, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->uniform4i(locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(Uniform4i, isCallValid, context, locationPacked, v0, v1, v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform4ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform4iv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4iv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform4iv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform4iv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform4uiContextANGLE(GLeglContext ctx, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform4ui, "context = %d, location = %d, v0 = %u, v1 = %u, v2 = %u, v3 = %u", + CID(context), location, v0, v1, v2, v3); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4ui(context, locationPacked, v0, v1, v2, v3)); + if (isCallValid) + { + context->uniform4ui(locationPacked, v0, v1, v2, v3); + } + ANGLE_CAPTURE(Uniform4ui, isCallValid, context, locationPacked, v0, v1, v2, v3); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_Uniform4uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniform4uiv, + "context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context), + location, count, (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateUniform4uiv(context, locationPacked, count, value)); + if (isCallValid) + { + context->uniform4uiv(locationPacked, count, value); + } + ANGLE_CAPTURE(Uniform4uiv, isCallValid, context, locationPacked, count, value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformBlockBindingContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLuint uniformBlockBinding) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformBlockBinding, + "context = %d, program = %u, uniformBlockIndex = %u, uniformBlockBinding = %u", + CID(context), program, uniformBlockIndex, uniformBlockBinding); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformBlockBinding(context, programPacked, uniformBlockIndexPacked, + uniformBlockBinding)); + if (isCallValid) + { + context->uniformBlockBinding(programPacked, uniformBlockIndexPacked, + uniformBlockBinding); + } + ANGLE_CAPTURE(UniformBlockBinding, isCallValid, context, programPacked, + uniformBlockIndexPacked, uniformBlockBinding); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix2fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix2fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix2fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix2fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix2x3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix2x3fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix2x3fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix2x3fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix2x3fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix2x4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix2x4fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix2x4fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix2x4fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix2x4fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix3fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix3fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix3fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix3fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix3x2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix3x2fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix3x2fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix3x2fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix3x2fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix3x4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix3x4fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix3x4fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix3x4fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix3x4fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix4fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix4fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix4fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix4fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix4x2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix4x2fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix4x2fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix4x2fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix4x2fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UniformMatrix4x3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUniformMatrix4x3fv, + "context = %d, location = %d, count = %d, transpose = %s, value = 0x%016" PRIxPTR "", + CID(context), location, count, GLbooleanToString(transpose), (uintptr_t)value); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUniformMatrix4x3fv(context, locationPacked, count, transpose, value)); + if (isCallValid) + { + context->uniformMatrix4x3fv(locationPacked, count, transpose, value); + } + ANGLE_CAPTURE(UniformMatrix4x3fv, isCallValid, context, locationPacked, count, transpose, + value); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +GLboolean GL_APIENTRY GL_UnmapBufferContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUnmapBuffer, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::BufferTargetARB, target)); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUnmapBuffer(context, targetPacked)); + if (isCallValid) + { + returnValue = context->unmapBuffer(targetPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBuffer, GLboolean>(); + } + ANGLE_CAPTURE(UnmapBuffer, isCallValid, context, targetPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBuffer, GLboolean>(); + } + return returnValue; +} + +GLboolean GL_APIENTRY GL_UnmapBufferOESContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUnmapBufferOES, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, target)); + + GLboolean returnValue; + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUnmapBufferOES(context, targetPacked)); + if (isCallValid) + { + returnValue = context->unmapBuffer(targetPacked); + } + else + { + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBufferOES, GLboolean>(); + } + ANGLE_CAPTURE(UnmapBufferOES, isCallValid, context, targetPacked, returnValue); + } + else + { + GenerateContextLostErrorOnContext(context); + returnValue = GetDefaultReturnValue<angle::EntryPoint::GLUnmapBufferOES, GLboolean>(); + } + return returnValue; +} + +void GL_APIENTRY GL_UseProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUseProgram, "context = %d, program = %u", CID(context), program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateUseProgram(context, programPacked)); + if (isCallValid) + { + context->useProgram(programPacked); + } + ANGLE_CAPTURE(UseProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UseProgramStagesContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLbitfield stages, + GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUseProgramStages, "context = %d, pipeline = %u, stages = %s, program = %u", + CID(context), pipeline, + GLbitfieldToString(GLenumGroup::UseProgramStageMask, stages).c_str(), program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUseProgramStages(context, pipelinePacked, stages, programPacked)); + if (isCallValid) + { + context->useProgramStages(pipelinePacked, stages, programPacked); + } + ANGLE_CAPTURE(UseProgramStages, isCallValid, context, pipelinePacked, stages, + programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_UseProgramStagesEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLbitfield stages, + GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLUseProgramStagesEXT, "context = %d, pipeline = %u, stages = %s, program = %u", + CID(context), pipeline, + GLbitfieldToString(GLenumGroup::UseProgramStageMask, stages).c_str(), program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateUseProgramStagesEXT(context, pipelinePacked, stages, programPacked)); + if (isCallValid) + { + context->useProgramStages(pipelinePacked, stages, programPacked); + } + ANGLE_CAPTURE(UseProgramStagesEXT, isCallValid, context, pipelinePacked, stages, + programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ValidateProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLValidateProgram, "context = %d, program = %u", CID(context), program); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateValidateProgram(context, programPacked)); + if (isCallValid) + { + context->validateProgram(programPacked); + } + ANGLE_CAPTURE(ValidateProgram, isCallValid, context, programPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ValidateProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLValidateProgramPipeline, "context = %d, pipeline = %u", CID(context), + pipeline); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateValidateProgramPipeline(context, pipelinePacked)); + if (isCallValid) + { + context->validateProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(ValidateProgramPipeline, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ValidateProgramPipelineEXTContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLValidateProgramPipelineEXT, "context = %d, pipeline = %u", CID(context), + pipeline); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProgramPipelineID pipelinePacked = PackParam<ProgramPipelineID>(pipeline); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateValidateProgramPipelineEXT(context, pipelinePacked)); + if (isCallValid) + { + context->validateProgramPipeline(pipelinePacked); + } + ANGLE_CAPTURE(ValidateProgramPipelineEXT, isCallValid, context, pipelinePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttrib1fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib1f, "context = %d, index = %u, x = %f", CID(context), index, x); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || ValidateVertexAttrib1f(context, index, x)); + if (isCallValid) + { + context->vertexAttrib1f(index, x); + } + ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, index, x); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttrib1fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib1fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib1fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib1fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttrib2fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib2f, "context = %d, index = %u, x = %f, y = %f", CID(context), + index, x, y); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib2f(context, index, x, y)); + if (isCallValid) + { + context->vertexAttrib2f(index, x, y); + } + ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, index, x, y); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttrib2fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib2fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib2fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib2fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_VertexAttrib3fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib3f, "context = %d, index = %u, x = %f, y = %f, z = %f", + CID(context), index, x, y, z); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib3f(context, index, x, y, z)); + if (isCallValid) + { + context->vertexAttrib3f(index, x, y, z); + } + ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, index, x, y, z); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttrib3fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib3fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib3fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib3fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttrib4fContextANGLE(GLeglContext ctx, + GLuint index, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib4f, "context = %d, index = %u, x = %f, y = %f, z = %f, w = %f", + CID(context), index, x, y, z, w); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib4f(context, index, x, y, z, w)); + if (isCallValid) + { + context->vertexAttrib4f(index, x, y, z, w); + } + ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, index, x, y, z, w); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttrib4fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttrib4fv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttrib4fv(context, index, v)); + if (isCallValid) + { + context->vertexAttrib4fv(index, v); + } + ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribBindingContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLuint bindingindex) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribBinding, "context = %d, attribindex = %u, bindingindex = %u", + CID(context), attribindex, bindingindex); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribBinding(context, attribindex, bindingindex)); + if (isCallValid) + { + context->vertexAttribBinding(attribindex, bindingindex); + } + ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindex, bindingindex); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribDivisorContextANGLE(GLeglContext ctx, GLuint index, GLuint divisor) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribDivisor, "context = %d, index = %u, divisor = %u", CID(context), + index, divisor); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor)); + if (isCallValid) + { + context->vertexAttribDivisor(index, divisor); + } + ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, index, divisor); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribDivisorANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLuint divisor) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribDivisorANGLE, "context = %d, index = %u, divisor = %u", + CID(context), index, divisor); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribDivisorANGLE(context, index, divisor)); + if (isCallValid) + { + context->vertexAttribDivisor(index, divisor); + } + ANGLE_CAPTURE(VertexAttribDivisorANGLE, isCallValid, context, index, divisor); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribDivisorEXTContextANGLE(GLeglContext ctx, + GLuint index, + GLuint divisor) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribDivisorEXT, "context = %d, index = %u, divisor = %u", CID(context), + index, divisor); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribDivisorEXT(context, index, divisor)); + if (isCallValid) + { + context->vertexAttribDivisor(index, divisor); + } + ANGLE_CAPTURE(VertexAttribDivisorEXT, isCallValid, context, index, divisor); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribFormatContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLint size, + GLenum type, + GLboolean normalized, + GLuint relativeoffset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribFormat, + "context = %d, attribindex = %u, size = %d, type = %s, normalized = %s, relativeoffset = " + "%u", + CID(context), attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type), + GLbooleanToString(normalized), relativeoffset); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribFormat(context, attribindex, size, typePacked, + normalized, relativeoffset)); + if (isCallValid) + { + context->vertexAttribFormat(attribindex, size, typePacked, normalized, relativeoffset); + } + ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindex, size, typePacked, + normalized, relativeoffset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_VertexAttribI4iContextANGLE(GLeglContext ctx, GLuint index, GLint x, GLint y, GLint z, GLint w) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribI4i, "context = %d, index = %u, x = %d, y = %d, z = %d, w = %d", + CID(context), index, x, y, z, w); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4i(context, index, x, y, z, w)); + if (isCallValid) + { + context->vertexAttribI4i(index, x, y, z, w); + } + ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, index, x, y, z, w); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribI4ivContextANGLE(GLeglContext ctx, GLuint index, const GLint *v) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribI4iv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4iv(context, index, v)); + if (isCallValid) + { + context->vertexAttribI4iv(index, v); + } + ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribI4uiContextANGLE(GLeglContext ctx, + GLuint index, + GLuint x, + GLuint y, + GLuint z, + GLuint w) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribI4ui, "context = %d, index = %u, x = %u, y = %u, z = %u, w = %u", + CID(context), index, x, y, z, w); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4ui(context, index, x, y, z, w)); + if (isCallValid) + { + context->vertexAttribI4ui(index, x, y, z, w); + } + ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, index, x, y, z, w); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribI4uivContextANGLE(GLeglContext ctx, GLuint index, const GLuint *v) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribI4uiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "", + CID(context), index, (uintptr_t)v); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateVertexAttribI4uiv(context, index, v)); + if (isCallValid) + { + context->vertexAttribI4uiv(index, v); + } + ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, index, v); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribIFormatContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLint size, + GLenum type, + GLuint relativeoffset) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribIFormat, + "context = %d, attribindex = %u, size = %d, type = %s, relativeoffset = %u", CID(context), + attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type), relativeoffset); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateVertexAttribIFormat(context, attribindex, size, typePacked, relativeoffset)); + if (isCallValid) + { + context->vertexAttribIFormat(attribindex, size, typePacked, relativeoffset); + } + ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindex, size, typePacked, + relativeoffset); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribIPointerContextANGLE(GLeglContext ctx, + GLuint index, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribIPointer, + "context = %d, index = %u, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR + "", + CID(context), index, size, GLenumToString(GLenumGroup::VertexAttribPointerType, type), + stride, (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateVertexAttribIPointer(context, index, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->vertexAttribIPointer(index, size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, index, size, typePacked, stride, + pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexAttribPointerContextANGLE(GLeglContext ctx, + GLuint index, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexAttribPointer, + "context = %d, index = %u, size = %d, type = %s, normalized = %s, stride = %d, pointer = " + "0x%016" PRIxPTR "", + CID(context), index, size, GLenumToString(GLenumGroup::VertexAttribPointerType, type), + GLbooleanToString(normalized), stride, (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexAttribPointer(context, index, size, typePacked, + normalized, stride, pointer)); + if (isCallValid) + { + context->vertexAttribPointer(index, size, typePacked, normalized, stride, pointer); + } + ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, index, size, typePacked, + normalized, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexBindingDivisorContextANGLE(GLeglContext ctx, + GLuint bindingindex, + GLuint divisor) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexBindingDivisor, "context = %d, bindingindex = %u, divisor = %u", + CID(context), bindingindex, divisor); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexBindingDivisor(context, bindingindex, divisor)); + if (isCallValid) + { + context->vertexBindingDivisor(bindingindex, divisor); + } + ANGLE_CAPTURE(VertexBindingDivisor, isCallValid, context, bindingindex, divisor); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_VertexPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLVertexPointer, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::VertexPointerType, type), stride, + (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + VertexAttribType typePacked = PackParam<VertexAttribType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateVertexPointer(context, size, typePacked, stride, pointer)); + if (isCallValid) + { + context->vertexPointer(size, typePacked, stride, pointer); + } + ANGLE_CAPTURE(VertexPointer, isCallValid, context, size, typePacked, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_ViewportContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLViewport, "context = %d, x = %d, y = %d, width = %d, height = %d", + CID(context), x, y, width, height); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateViewport(context, x, y, width, height)); + if (isCallValid) + { + context->viewport(x, y, width, height); + } + ANGLE_CAPTURE(Viewport, isCallValid, context, x, y, width, height); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_WaitSemaphoreEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *srcLayouts) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLWaitSemaphoreEXT, + "context = %d, semaphore = %u, numBufferBarriers = %u, buffers = 0x%016" PRIxPTR + ", numTextureBarriers = %u, textures = 0x%016" PRIxPTR ", srcLayouts = 0x%016" PRIxPTR "", + CID(context), semaphore, numBufferBarriers, (uintptr_t)buffers, numTextureBarriers, + (uintptr_t)textures, (uintptr_t)srcLayouts); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + const BufferID *buffersPacked = PackParam<const BufferID *>(buffers); + const TextureID *texturesPacked = PackParam<const TextureID *>(textures); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateWaitSemaphoreEXT(context, semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, srcLayouts)); + if (isCallValid) + { + context->waitSemaphore(semaphorePacked, numBufferBarriers, buffersPacked, + numTextureBarriers, texturesPacked, srcLayouts); + } + ANGLE_CAPTURE(WaitSemaphoreEXT, isCallValid, context, semaphorePacked, numBufferBarriers, + buffersPacked, numTextureBarriers, texturesPacked, srcLayouts); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_WaitSyncContextANGLE(GLeglContext ctx, + GLsync sync, + GLbitfield flags, + GLuint64 timeout) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLWaitSync, "context = %d, sync = 0x%016" PRIxPTR ", flags = %s, timeout = %llu", + CID(context), (uintptr_t)sync, + GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str(), + static_cast<unsigned long long>(timeout)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateWaitSync(context, sync, flags, timeout)); + if (isCallValid) + { + context->waitSync(sync, flags, timeout); + } + ANGLE_CAPTURE(WaitSync, isCallValid, context, sync, flags, timeout); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_WeightPointerOESContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLWeightPointerOES, + "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", + CID(context), size, GLenumToString(GLenumGroup::DefaultGroup, type), stride, + (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateWeightPointerOES(context, size, type, stride, pointer)); + if (isCallValid) + { + context->weightPointer(size, type, stride, pointer); + } + ANGLE_CAPTURE(WeightPointerOES, isCallValid, context, size, type, stride, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_BindUniformLocationCHROMIUMContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLBindUniformLocationCHROMIUM, + "context = %d, program = %u, location = %d, name = 0x%016" PRIxPTR "", CID(context), + program, location, (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateBindUniformLocationCHROMIUM(context, programPacked, locationPacked, name)); + if (isCallValid) + { + context->bindUniformLocation(programPacked, locationPacked, name); + } + ANGLE_CAPTURE(BindUniformLocationCHROMIUM, isCallValid, context, programPacked, + locationPacked, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CoverageModulationCHROMIUMContextANGLE(GLeglContext ctx, GLenum components) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCoverageModulationCHROMIUM, "context = %d, components = %s", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, components)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCoverageModulationCHROMIUM(context, components)); + if (isCallValid) + { + context->coverageModulation(components); + } + ANGLE_CAPTURE(CoverageModulationCHROMIUM, isCallValid, context, components); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyTextureCHROMIUM, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, internalFormat = %d, destType = %s, unpackFlipY = %s, unpackPremultiplyAlpha = " + "%s, unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, internalFormat, + GLenumToString(GLenumGroup::DefaultGroup, destType), GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTextureCHROMIUM( + context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copyTexture(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopyTextureCHROMIUM, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, internalFormat, destType, + unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopySubTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLint width, + GLint height, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopySubTextureCHROMIUM, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, xoffset = %d, yoffset = %d, x = %d, y = %d, width = %d, height = %d, unpackFlipY " + "= %s, unpackPremultiplyAlpha = %s, unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, xoffset, + yoffset, x, y, width, height, GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopySubTextureCHROMIUM( + context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, xoffset, yoffset, x, y, width, height, + unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copySubTexture(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, xoffset, yoffset, x, y, width, height, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopySubTextureCHROMIUM, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, xoffset, yoffset, x, y, width, + height, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedCopyTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLuint destId) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedCopyTextureCHROMIUM, "context = %d, sourceId = %u, destId = %u", + CID(context), sourceId, destId); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCompressedCopyTextureCHROMIUM(context, sourceIdPacked, destIdPacked)); + if (isCallValid) + { + context->compressedCopyTexture(sourceIdPacked, destIdPacked); + } + ANGLE_CAPTURE(CompressedCopyTextureCHROMIUM, isCallValid, context, sourceIdPacked, + destIdPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_RequestExtensionANGLEContextANGLE(GLeglContext ctx, const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLRequestExtensionANGLE, "context = %d, name = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateRequestExtensionANGLE(context, name)); + if (isCallValid) + { + context->requestExtension(name); + } + ANGLE_CAPTURE(RequestExtensionANGLE, isCallValid, context, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DisableExtensionANGLEContextANGLE(GLeglContext ctx, const GLchar *name) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDisableExtensionANGLE, "context = %d, name = 0x%016" PRIxPTR "", CID(context), + (uintptr_t)name); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDisableExtensionANGLE(context, name)); + if (isCallValid) + { + context->disableExtension(name); + } + ANGLE_CAPTURE(DisableExtensionANGLE, isCallValid, context, name); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBooleanvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLboolean *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBooleanvRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetBooleanvRobustANGLE(context, pname, bufSize, length, params)); + if (isCallValid) + { + context->getBooleanvRobust(pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBooleanvRobustANGLE, isCallValid, context, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBufferParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameterivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getBufferParameterivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBufferParameterivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetFloatvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFloatvRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFloatvRobustANGLE(context, pname, bufSize, length, params)); + if (isCallValid) + { + context->getFloatvRobust(pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetFloatvRobustANGLE, isCallValid, context, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetFramebufferAttachmentParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFramebufferAttachmentParameterivRobustANGLE, + "context = %d, target = %s, attachment = %s, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, attachment), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetFramebufferAttachmentParameterivRobustANGLE( + context, target, attachment, pname, bufSize, length, params)); + if (isCallValid) + { + context->getFramebufferAttachmentParameterivRobust(target, attachment, pname, bufSize, + length, params); + } + ANGLE_CAPTURE(GetFramebufferAttachmentParameterivRobustANGLE, isCallValid, context, target, + attachment, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetIntegervRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetIntegervRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetIntegervRobustANGLE(context, pname, bufSize, length, data)); + if (isCallValid) + { + context->getIntegervRobust(pname, bufSize, length, data); + } + ANGLE_CAPTURE(GetIntegervRobustANGLE, isCallValid, context, pname, bufSize, length, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramivRobustANGLE, + "context = %d, program = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetProgramivRobustANGLE(context, programPacked, pname, bufSize, + length, params)); + if (isCallValid) + { + context->getProgramivRobust(programPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetProgramivRobustANGLE, isCallValid, context, programPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetRenderbufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetRenderbufferParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetRenderbufferParameterivRobustANGLE( + context, target, pname, bufSize, length, params)); + if (isCallValid) + { + context->getRenderbufferParameterivRobust(target, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetRenderbufferParameterivRobustANGLE, isCallValid, context, target, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetShaderivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint shader, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetShaderivRobustANGLE, + "context = %d, shader = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), shader, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID shaderPacked = PackParam<ShaderProgramID>(shader); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetShaderivRobustANGLE(context, shaderPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getShaderivRobust(shaderPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetShaderivRobustANGLE, isCallValid, context, shaderPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetTexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterfvRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterfvRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterfvRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterfvRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetUniformfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformfvRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformfvRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getUniformfvRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetUniformfvRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetUniformivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformivRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getUniformivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetUniformivRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribfvRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetVertexAttribfvRobustANGLE(context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribfvRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribfvRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribivRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetVertexAttribivRobustANGLE(context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribivRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribivRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribPointervRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **pointer) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribPointervRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", pointer = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)pointer); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribPointervRobustANGLE( + context, index, pname, bufSize, length, pointer)); + if (isCallValid) + { + context->getVertexAttribPointervRobust(index, pname, bufSize, length, pointer); + } + ANGLE_CAPTURE(GetVertexAttribPointervRobustANGLE, isCallValid, context, index, pname, + bufSize, length, pointer); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ReadPixelsRobustANGLEContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLReadPixelsRobustANGLE, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, length = 0x%016" PRIxPTR ", columns = 0x%016" PRIxPTR ", rows = 0x%016" PRIxPTR + ", pixels = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)length, + (uintptr_t)columns, (uintptr_t)rows, (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadPixelsRobustANGLE(context, x, y, width, height, format, type, bufSize, + length, columns, rows, pixels)); + if (isCallValid) + { + context->readPixelsRobust(x, y, width, height, format, type, bufSize, length, columns, + rows, pixels); + } + ANGLE_CAPTURE(ReadPixelsRobustANGLE, isCallValid, context, x, y, width, height, format, + type, bufSize, length, columns, rows, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexImage2DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "border = %d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, internalformat, + width, height, border, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage2DRobustANGLE(context, targetPacked, level, internalformat, width, + height, border, format, type, bufSize, pixels)); + if (isCallValid) + { + context->texImage2DRobust(targetPacked, level, internalformat, width, height, border, + format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexImage2DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, border, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterfvRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterfvRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterfvRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterfvRobustANGLE, isCallValid, context, targetPacked, pname, bufSize, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterivRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterivRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterivRobustANGLE, isCallValid, context, targetPacked, pname, bufSize, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexSubImage2DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexSubImage2DRobustANGLE(context, targetPacked, level, xoffset, yoffset, width, + height, format, type, bufSize, pixels)); + if (isCallValid) + { + context->texSubImage2DRobust(targetPacked, level, xoffset, yoffset, width, height, + format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexSubImage2DRobustANGLE, isCallValid, context, targetPacked, level, xoffset, + yoffset, width, height, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexImage3DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "depth = %d, border = %d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR + "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, internalformat, + width, height, depth, border, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage3DRobustANGLE(context, targetPacked, level, internalformat, width, + height, depth, border, format, type, bufSize, pixels)); + if (isCallValid) + { + context->texImage3DRobust(targetPacked, level, internalformat, width, height, depth, + border, format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexImage3DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT( + context, GLTexSubImage3DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width = " + "%d, height = %d, depth = %d, format = %s, type = %s, bufSize = %d, pixels = 0x%016" PRIxPTR + "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexSubImage3DRobustANGLE(context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, + format, type, bufSize, pixels)); + if (isCallValid) + { + context->texSubImage3DRobust(targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, type, bufSize, pixels); + } + ANGLE_CAPTURE(TexSubImage3DRobustANGLE, isCallValid, context, targetPacked, level, xoffset, + yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexImage2DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "border = %d, imageSize = %d, dataSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, internalformat), width, height, border, + imageSize, dataSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompressedTexImage2DRobustANGLE( + context, targetPacked, level, internalformat, width, + height, border, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexImage2DRobust(targetPacked, level, internalformat, width, height, + border, imageSize, dataSize, data); + } + ANGLE_CAPTURE(CompressedTexImage2DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, border, imageSize, dataSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLsizei xoffset, + GLsizei yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexSubImage2DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, width = %d, height = " + "%d, format = %s, imageSize = %d, dataSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + width, height, GLenumToString(GLenumGroup::DefaultGroup, format), imageSize, dataSize, + (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompressedTexSubImage2DRobustANGLE( + context, targetPacked, level, xoffset, yoffset, width, + height, format, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexSubImage2DRobust(targetPacked, level, xoffset, yoffset, width, + height, format, imageSize, dataSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage2DRobustANGLE, isCallValid, context, targetPacked, level, + xoffset, yoffset, width, height, format, imageSize, dataSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexImage3DRobustANGLE, + "context = %d, target = %s, level = %d, internalformat = %s, width = %d, height = %d, " + "depth = %d, border = %d, imageSize = %d, dataSize = %d, data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, internalformat), width, height, depth, border, + imageSize, dataSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateCompressedTexImage3DRobustANGLE( + context, targetPacked, level, internalformat, width, + height, depth, border, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexImage3DRobust(targetPacked, level, internalformat, width, height, + depth, border, imageSize, dataSize, data); + } + ANGLE_CAPTURE(CompressedTexImage3DRobustANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, depth, border, imageSize, dataSize, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CompressedTexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCompressedTexSubImage3DRobustANGLE, + "context = %d, target = %s, level = %d, xoffset = %d, yoffset = %d, zoffset = %d, width " + "= %d, height = %d, depth = %d, format = %s, imageSize = %d, dataSize = %d, data = " + "0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, xoffset, yoffset, + zoffset, width, height, depth, GLenumToString(GLenumGroup::DefaultGroup, format), + imageSize, dataSize, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCompressedTexSubImage3DRobustANGLE( + context, targetPacked, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, dataSize, data)); + if (isCallValid) + { + context->compressedTexSubImage3DRobust(targetPacked, level, xoffset, yoffset, zoffset, + width, height, depth, format, imageSize, + dataSize, data); + } + ANGLE_CAPTURE(CompressedTexSubImage3DRobustANGLE, isCallValid, context, targetPacked, level, + xoffset, yoffset, zoffset, width, height, depth, format, imageSize, dataSize, + data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetQueryivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryType targetPacked = PackParam<QueryType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetQueryivRobustANGLE(context, targetPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryivRobustANGLE, isCallValid, context, targetPacked, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetQueryObjectuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjectuivRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjectuivRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjectuivRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjectuivRobustANGLE, isCallValid, context, idPacked, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBufferPointervRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBufferPointervRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferPointervRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getBufferPointervRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBufferPointervRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetIntegeri_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetIntegeri_vRobustANGLE, + "context = %d, target = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), index, bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetIntegeri_vRobustANGLE(context, target, index, bufSize, length, data)); + if (isCallValid) + { + context->getIntegeri_vRobust(target, index, bufSize, length, data); + } + ANGLE_CAPTURE(GetIntegeri_vRobustANGLE, isCallValid, context, target, index, bufSize, + length, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetInternalformativRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetInternalformativRobustANGLE, + "context = %d, target = %s, internalformat = %s, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, internalformat), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetInternalformativRobustANGLE(context, target, internalformat, + pname, bufSize, length, params)); + if (isCallValid) + { + context->getInternalformativRobust(target, internalformat, pname, bufSize, length, + params); + } + ANGLE_CAPTURE(GetInternalformativRobustANGLE, isCallValid, context, target, internalformat, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribIivRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetVertexAttribIivRobustANGLE(context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribIivRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribIivRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetVertexAttribIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetVertexAttribIuivRobustANGLE, + "context = %d, index = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), index, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetVertexAttribIuivRobustANGLE( + context, index, pname, bufSize, length, params)); + if (isCallValid) + { + context->getVertexAttribIuivRobust(index, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetVertexAttribIuivRobustANGLE, isCallValid, context, index, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetUniformuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetUniformuivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetUniformuivRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getUniformuivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetUniformuivRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetActiveUniformBlockivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetActiveUniformBlockivRobustANGLE, + "context = %d, program = %u, uniformBlockIndex = %u, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), program, uniformBlockIndex, + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetActiveUniformBlockivRobustANGLE( + context, programPacked, uniformBlockIndexPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getActiveUniformBlockivRobust(programPacked, uniformBlockIndexPacked, pname, + bufSize, length, params); + } + ANGLE_CAPTURE(GetActiveUniformBlockivRobustANGLE, isCallValid, context, programPacked, + uniformBlockIndexPacked, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetInteger64vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetInteger64vRobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetInteger64vRobustANGLE(context, pname, bufSize, length, data)); + if (isCallValid) + { + context->getInteger64vRobust(pname, bufSize, length, data); + } + ANGLE_CAPTURE(GetInteger64vRobustANGLE, isCallValid, context, pname, bufSize, length, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetInteger64i_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetInteger64i_vRobustANGLE, + "context = %d, target = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), index, bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetInteger64i_vRobustANGLE(context, target, index, bufSize, length, data)); + if (isCallValid) + { + context->getInteger64i_vRobust(target, index, bufSize, length, data); + } + ANGLE_CAPTURE(GetInteger64i_vRobustANGLE, isCallValid, context, target, index, bufSize, + length, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBufferParameteri64vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBufferParameteri64vRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + BufferBinding targetPacked = PackParam<BufferBinding>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetBufferParameteri64vRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getBufferParameteri64vRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetBufferParameteri64vRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLuint pname, + GLsizei bufSize, + const GLint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterivRobustANGLE, + "context = %d, sampler = %u, pname = %u, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, pname, bufSize, (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSamplerParameterivRobustANGLE(context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterivRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLfloat *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterfvRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSamplerParameterfvRobustANGLE(context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterfvRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterfvRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterivRobustANGLE(context, samplerPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterivRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterfvRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterfvRobustANGLE(context, samplerPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterfvRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterfvRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetFramebufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetFramebufferParameterivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetFramebufferParameterivRobustANGLE( + context, target, pname, bufSize, length, params)); + if (isCallValid) + { + context->getFramebufferParameterivRobust(target, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetFramebufferParameterivRobustANGLE, isCallValid, context, target, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetProgramInterfaceivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetProgramInterfaceivRobustANGLE, + "context = %d, program = %u, programInterface = %s, pname = %s, bufSize = %d, length = " + "0x%016" PRIxPTR ", params = 0x%016" PRIxPTR "", + CID(context), program, GLenumToString(GLenumGroup::DefaultGroup, programInterface), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetProgramInterfaceivRobustANGLE(context, programPacked, programInterface, + pname, bufSize, length, params)); + if (isCallValid) + { + context->getProgramInterfaceivRobust(programPacked, programInterface, pname, bufSize, + length, params); + } + ANGLE_CAPTURE(GetProgramInterfaceivRobustANGLE, isCallValid, context, programPacked, + programInterface, pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetBooleani_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLboolean *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetBooleani_vRobustANGLE, + "context = %d, target = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), index, bufSize, + (uintptr_t)length, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetBooleani_vRobustANGLE(context, target, index, bufSize, length, data)); + if (isCallValid) + { + context->getBooleani_vRobust(target, index, bufSize, length, data); + } + ANGLE_CAPTURE(GetBooleani_vRobustANGLE, isCallValid, context, target, index, bufSize, + length, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetMultisamplefvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLfloat *val) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetMultisamplefvRobustANGLE, + "context = %d, pname = %s, index = %u, bufSize = %d, length = 0x%016" PRIxPTR + ", val = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), index, bufSize, + (uintptr_t)length, (uintptr_t)val); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetMultisamplefvRobustANGLE(context, pname, index, bufSize, length, val)); + if (isCallValid) + { + context->getMultisamplefvRobust(pname, index, bufSize, length, val); + } + ANGLE_CAPTURE(GetMultisamplefvRobustANGLE, isCallValid, context, pname, index, bufSize, + length, val); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexLevelParameterivRobustANGLE, + "context = %d, target = %s, level = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexLevelParameterivRobustANGLE( + context, targetPacked, level, pname, bufSize, length, params)); + if (isCallValid) + { + context->getTexLevelParameterivRobust(targetPacked, level, pname, bufSize, length, + params); + } + ANGLE_CAPTURE(GetTexLevelParameterivRobustANGLE, isCallValid, context, targetPacked, level, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexLevelParameterfvRobustANGLE, + "context = %d, target = %s, level = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexLevelParameterfvRobustANGLE( + context, targetPacked, level, pname, bufSize, length, params)); + if (isCallValid) + { + context->getTexLevelParameterfvRobust(targetPacked, level, pname, bufSize, length, + params); + } + ANGLE_CAPTURE(GetTexLevelParameterfvRobustANGLE, isCallValid, context, targetPacked, level, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetPointervRobustANGLERobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetPointervRobustANGLERobustANGLE, + "context = %d, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetPointervRobustANGLERobustANGLE(context, pname, bufSize, length, params)); + if (isCallValid) + { + context->getPointervRobustANGLERobust(pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetPointervRobustANGLERobustANGLE, isCallValid, context, pname, bufSize, + length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ReadnPixelsRobustANGLEContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *data) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLReadnPixelsRobustANGLE, + "context = %d, x = %d, y = %d, width = %d, height = %d, format = %s, type = %s, bufSize " + "= %d, length = 0x%016" PRIxPTR ", columns = 0x%016" PRIxPTR ", rows = 0x%016" PRIxPTR + ", data = 0x%016" PRIxPTR "", + CID(context), x, y, width, height, GLenumToString(GLenumGroup::DefaultGroup, format), + GLenumToString(GLenumGroup::DefaultGroup, type), bufSize, (uintptr_t)length, + (uintptr_t)columns, (uintptr_t)rows, (uintptr_t)data); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateReadnPixelsRobustANGLE(context, x, y, width, height, format, type, bufSize, + length, columns, rows, data)); + if (isCallValid) + { + context->readnPixelsRobust(x, y, width, height, format, type, bufSize, length, columns, + rows, data); + } + ANGLE_CAPTURE(ReadnPixelsRobustANGLE, isCallValid, context, x, y, width, height, format, + type, bufSize, length, columns, rows, data); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformfvRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetnUniformfvRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getnUniformfvRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetnUniformfvRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetnUniformivRobustANGLE(context, programPacked, locationPacked, + bufSize, length, params)); + if (isCallValid) + { + context->getnUniformivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetnUniformivRobustANGLE, isCallValid, context, programPacked, locationPacked, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetnUniformuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetnUniformuivRobustANGLE, + "context = %d, program = %u, location = %d, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), program, location, bufSize, (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ShaderProgramID programPacked = PackParam<ShaderProgramID>(program); + UniformLocation locationPacked = PackParam<UniformLocation>(location); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetnUniformuivRobustANGLE( + context, programPacked, locationPacked, bufSize, length, params)); + if (isCallValid) + { + context->getnUniformuivRobust(programPacked, locationPacked, bufSize, length, params); + } + ANGLE_CAPTURE(GetnUniformuivRobustANGLE, isCallValid, context, programPacked, + locationPacked, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterIivRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterIivRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterIivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexParameterIuivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexParameterIuivRobustANGLE(context, targetPacked, pname, bufSize, params)); + if (isCallValid) + { + context->texParameterIuivRobust(targetPacked, pname, bufSize, params); + } + ANGLE_CAPTURE(TexParameterIuivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterIivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterIivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexParameterIuivRobustANGLE, + "context = %d, target = %s, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), + GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, (uintptr_t)length, + (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetTexParameterIuivRobustANGLE(context, targetPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getTexParameterIuivRobust(targetPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetTexParameterIuivRobustANGLE, isCallValid, context, targetPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateSamplerParameterIivRobustANGLE(context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterIivRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterIivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLuint *param) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSamplerParameterIuivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, param = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)param); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSamplerParameterIuivRobustANGLE( + context, samplerPacked, pname, bufSize, param)); + if (isCallValid) + { + context->samplerParameterIuivRobust(samplerPacked, pname, bufSize, param); + } + ANGLE_CAPTURE(SamplerParameterIuivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, param); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIivRobustANGLE(context, samplerPacked, pname, + bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterIivRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterIivRobustANGLE, isCallValid, context, samplerPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetSamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetSamplerParameterIuivRobustANGLE, + "context = %d, sampler = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), sampler, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SamplerID samplerPacked = PackParam<SamplerID>(sampler); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetSamplerParameterIuivRobustANGLE( + context, samplerPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getSamplerParameterIuivRobust(samplerPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetSamplerParameterIuivRobustANGLE, isCallValid, context, samplerPacked, + pname, bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetQueryObjectivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjectivRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjectivRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjectivRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjectivRobustANGLE, isCallValid, context, idPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjecti64vRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjecti64vRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjecti64vRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjecti64vRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjecti64vRobustANGLE, isCallValid, context, idPacked, pname, bufSize, + length, params); + } + else + {} +} + +void GL_APIENTRY GL_GetQueryObjectui64vRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint64 *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetQueryObjectui64vRobustANGLE, + "context = %d, id = %u, pname = %s, bufSize = %d, length = 0x%016" PRIxPTR + ", params = 0x%016" PRIxPTR "", + CID(context), id, GLenumToString(GLenumGroup::DefaultGroup, pname), bufSize, + (uintptr_t)length, (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + QueryID idPacked = PackParam<QueryID>(id); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateGetQueryObjectui64vRobustANGLE( + context, idPacked, pname, bufSize, length, params)); + if (isCallValid) + { + context->getQueryObjectui64vRobust(idPacked, pname, bufSize, length, params); + } + ANGLE_CAPTURE(GetQueryObjectui64vRobustANGLE, isCallValid, context, idPacked, pname, + bufSize, length, params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopyTexture3DANGLEContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopyTexture3DANGLE, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, internalFormat = %d, destType = %s, unpackFlipY = %s, unpackPremultiplyAlpha = " + "%s, unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, internalFormat, + GLenumToString(GLenumGroup::DefaultGroup, destType), GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateCopyTexture3DANGLE( + context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copyTexture3D(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopyTexture3DANGLE, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, internalFormat, destType, + unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_CopySubTexture3DANGLEContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLint z, + GLint width, + GLint height, + GLint depth, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLCopySubTexture3DANGLE, + "context = %d, sourceId = %u, sourceLevel = %d, destTarget = %s, destId = %u, destLevel " + "= %d, xoffset = %d, yoffset = %d, zoffset = %d, x = %d, y = %d, z = %d, width = %d, " + "height = %d, depth = %d, unpackFlipY = %s, unpackPremultiplyAlpha = %s, " + "unpackUnmultiplyAlpha = %s", + CID(context), sourceId, sourceLevel, + GLenumToString(GLenumGroup::DefaultGroup, destTarget), destId, destLevel, xoffset, + yoffset, zoffset, x, y, z, width, height, depth, GLbooleanToString(unpackFlipY), + GLbooleanToString(unpackPremultiplyAlpha), GLbooleanToString(unpackUnmultiplyAlpha)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureID sourceIdPacked = PackParam<TextureID>(sourceId); + TextureTarget destTargetPacked = PackParam<TextureTarget>(destTarget); + TextureID destIdPacked = PackParam<TextureID>(destId); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateCopySubTexture3DANGLE(context, sourceIdPacked, sourceLevel, destTargetPacked, + destIdPacked, destLevel, xoffset, yoffset, zoffset, x, y, + z, width, height, depth, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha)); + if (isCallValid) + { + context->copySubTexture3D(sourceIdPacked, sourceLevel, destTargetPacked, destIdPacked, + destLevel, xoffset, yoffset, zoffset, x, y, z, width, height, + depth, unpackFlipY, unpackPremultiplyAlpha, + unpackUnmultiplyAlpha); + } + ANGLE_CAPTURE(CopySubTexture3DANGLE, isCallValid, context, sourceIdPacked, sourceLevel, + destTargetPacked, destIdPacked, destLevel, xoffset, yoffset, zoffset, x, y, z, + width, height, depth, unpackFlipY, unpackPremultiplyAlpha, + unpackUnmultiplyAlpha); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorage2DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorage2DMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, " + "fixedsamplelocations = %s", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalformat), width, height, + GLbooleanToString(fixedsamplelocations)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorage2DMultisampleANGLE(context, targetPacked, samples, internalformat, + width, height, fixedsamplelocations)); + if (isCallValid) + { + context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height, + fixedsamplelocations); + } + ANGLE_CAPTURE(TexStorage2DMultisampleANGLE, isCallValid, context, targetPacked, samples, + internalformat, width, height, fixedsamplelocations); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterivANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLint *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexLevelParameterivANGLE, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameterivANGLE(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameteriv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameterivANGLE, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexLevelParameterfvANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLfloat *params) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexLevelParameterfvANGLE, + "context = %d, target = %s, level = %d, pname = %s, params = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), level, + GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexLevelParameterfvANGLE(context, targetPacked, level, pname, params)); + if (isCallValid) + { + context->getTexLevelParameterfv(targetPacked, level, pname, params); + } + ANGLE_CAPTURE(GetTexLevelParameterfvANGLE, isCallValid, context, targetPacked, level, pname, + params); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultiDrawArraysANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + GLsizei drawcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiDrawArraysANGLE, + "context = %d, mode = %s, firsts = 0x%016" PRIxPTR ", counts = 0x%016" PRIxPTR + ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)firsts, + (uintptr_t)counts, drawcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMultiDrawArraysANGLE(context, modePacked, firsts, counts, drawcount)); + if (isCallValid) + { + context->multiDrawArrays(modePacked, firsts, counts, drawcount); + } + ANGLE_CAPTURE(MultiDrawArraysANGLE, isCallValid, context, modePacked, firsts, counts, + drawcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultiDrawArraysInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiDrawArraysInstancedANGLE, + "context = %d, mode = %s, firsts = 0x%016" PRIxPTR ", counts = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)firsts, + (uintptr_t)counts, (uintptr_t)instanceCounts, drawcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMultiDrawArraysInstancedANGLE( + context, modePacked, firsts, counts, instanceCounts, drawcount)); + if (isCallValid) + { + context->multiDrawArraysInstanced(modePacked, firsts, counts, instanceCounts, + drawcount); + } + ANGLE_CAPTURE(MultiDrawArraysInstancedANGLE, isCallValid, context, modePacked, firsts, + counts, instanceCounts, drawcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultiDrawElementsANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + GLsizei drawcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiDrawElementsANGLE, + "context = %d, mode = %s, counts = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)counts, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, drawcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMultiDrawElementsANGLE(context, modePacked, counts, typePacked, + indices, drawcount)); + if (isCallValid) + { + context->multiDrawElements(modePacked, counts, typePacked, indices, drawcount); + } + ANGLE_CAPTURE(MultiDrawElementsANGLE, isCallValid, context, modePacked, counts, typePacked, + indices, drawcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_MultiDrawElementsInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiDrawElementsInstancedANGLE, + "context = %d, mode = %s, counts = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)counts, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, + (uintptr_t)instanceCounts, drawcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMultiDrawElementsInstancedANGLE(context, modePacked, counts, typePacked, + indices, instanceCounts, drawcount)); + if (isCallValid) + { + context->multiDrawElementsInstanced(modePacked, counts, typePacked, indices, + instanceCounts, drawcount); + } + ANGLE_CAPTURE(MultiDrawElementsInstancedANGLE, isCallValid, context, modePacked, counts, + typePacked, indices, instanceCounts, drawcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_DrawArraysInstancedBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawArraysInstancedBaseInstanceANGLE, + "context = %d, mode = %s, first = %d, count = %d, instanceCount = %d, baseInstance = %u", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, + instanceCount, baseInstance); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawArraysInstancedBaseInstanceANGLE( + context, modePacked, first, count, instanceCount, baseInstance)); + if (isCallValid) + { + context->drawArraysInstancedBaseInstance(modePacked, first, count, instanceCount, + baseInstance); + } + ANGLE_CAPTURE(DrawArraysInstancedBaseInstanceANGLE, isCallValid, context, modePacked, first, + count, instanceCount, baseInstance); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_DrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei instanceCounts, + GLint baseVertex, + GLuint baseInstance) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLDrawElementsInstancedBaseVertexBaseInstanceANGLE, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instanceCounts = %d, baseVertex = %d, baseInstance = %u", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instanceCounts, + baseVertex, baseInstance); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateDrawElementsInstancedBaseVertexBaseInstanceANGLE( + context, modePacked, count, typePacked, indices, + instanceCounts, baseVertex, baseInstance)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertexBaseInstance( + modePacked, count, typePacked, indices, instanceCounts, baseVertex, baseInstance); + } + ANGLE_CAPTURE(DrawElementsInstancedBaseVertexBaseInstanceANGLE, isCallValid, context, + modePacked, count, typePacked, indices, instanceCounts, baseVertex, + baseInstance); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_MultiDrawArraysInstancedBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + const GLuint *baseInstances, + GLsizei drawcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiDrawArraysInstancedBaseInstanceANGLE, + "context = %d, mode = %s, firsts = 0x%016" PRIxPTR ", counts = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", baseInstances = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)firsts, + (uintptr_t)counts, (uintptr_t)instanceCounts, (uintptr_t)baseInstances, drawcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateMultiDrawArraysInstancedBaseInstanceANGLE( + context, modePacked, firsts, counts, instanceCounts, baseInstances, drawcount)); + if (isCallValid) + { + context->multiDrawArraysInstancedBaseInstance(modePacked, firsts, counts, + instanceCounts, baseInstances, drawcount); + } + ANGLE_CAPTURE(MultiDrawArraysInstancedBaseInstanceANGLE, isCallValid, context, modePacked, + firsts, counts, instanceCounts, baseInstances, drawcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY +GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + const GLint *baseVertices, + const GLuint *baseInstances, + GLsizei drawcount) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE, + "context = %d, mode = %s, counts = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR + ", instanceCounts = 0x%016" PRIxPTR ", baseVertices = 0x%016" PRIxPTR + ", baseInstances = 0x%016" PRIxPTR ", drawcount = %d", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)counts, + GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, + (uintptr_t)instanceCounts, (uintptr_t)baseVertices, (uintptr_t)baseInstances, drawcount); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode); + DrawElementsType typePacked = PackParam<DrawElementsType>(type); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE( + context, modePacked, counts, typePacked, indices, instanceCounts, + baseVertices, baseInstances, drawcount)); + if (isCallValid) + { + context->multiDrawElementsInstancedBaseVertexBaseInstance( + modePacked, counts, typePacked, indices, instanceCounts, baseVertices, + baseInstances, drawcount); + } + ANGLE_CAPTURE(MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE, isCallValid, context, + modePacked, counts, typePacked, indices, instanceCounts, baseVertices, + baseInstances, drawcount); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetMultisamplefvANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLfloat *val) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetMultisamplefvANGLE, + "context = %d, pname = %s, index = %u, val = 0x%016" PRIxPTR "", CID(context), + GLenumToString(GLenumGroup::DefaultGroup, pname), index, (uintptr_t)val); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateGetMultisamplefvANGLE(context, pname, index, val)); + if (isCallValid) + { + context->getMultisamplefv(pname, index, val); + } + ANGLE_CAPTURE(GetMultisamplefvANGLE, isCallValid, context, pname, index, val); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_SampleMaskiANGLEContextANGLE(GLeglContext ctx, + GLuint maskNumber, + GLbitfield mask) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLSampleMaskiANGLE, "context = %d, maskNumber = %u, mask = %s", CID(context), + maskNumber, GLbitfieldToString(GLenumGroup::DefaultGroup, mask).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateSampleMaskiANGLE(context, maskNumber, mask)); + if (isCallValid) + { + context->sampleMaski(maskNumber, mask); + } + ANGLE_CAPTURE(SampleMaskiANGLE, isCallValid, context, maskNumber, mask); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ProvokingVertexANGLEContextANGLE(GLeglContext ctx, GLenum mode) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLProvokingVertexANGLE, "context = %d, mode = %s", CID(context), + GLenumToString(GLenumGroup::VertexProvokingMode, mode)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + ProvokingVertexConvention modePacked = PackParam<ProvokingVertexConvention>(mode); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateProvokingVertexANGLE(context, modePacked)); + if (isCallValid) + { + context->provokingVertex(modePacked); + } + ANGLE_CAPTURE(ProvokingVertexANGLE, isCallValid, context, modePacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_LoseContextCHROMIUMContextANGLE(GLeglContext ctx, GLenum current, GLenum other) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLLoseContextCHROMIUM, "context = %d, current = %s, other = %s", CID(context), + GLenumToString(GLenumGroup::GraphicsResetStatus, current), + GLenumToString(GLenumGroup::GraphicsResetStatus, other)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + GraphicsResetStatus currentPacked = PackParam<GraphicsResetStatus>(current); + GraphicsResetStatus otherPacked = PackParam<GraphicsResetStatus>(other); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateLoseContextCHROMIUM(context, currentPacked, otherPacked)); + if (isCallValid) + { + context->loseContext(currentPacked, otherPacked); + } + ANGLE_CAPTURE(LoseContextCHROMIUM, isCallValid, context, currentPacked, otherPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexImage2DExternalANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexImage2DExternalANGLE, + "context = %d, target = %s, level = %d, internalformat = %d, width = %d, height = %d, " + "border = %d, format = %s, type = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, internalformat, + width, height, border, GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexImage2DExternalANGLE(context, targetPacked, level, internalformat, width, + height, border, format, type)); + if (isCallValid) + { + context->texImage2DExternal(targetPacked, level, internalformat, width, height, border, + format, type); + } + ANGLE_CAPTURE(TexImage2DExternalANGLE, isCallValid, context, targetPacked, level, + internalformat, width, height, border, format, type); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_InvalidateTextureANGLEContextANGLE(GLeglContext ctx, GLenum target) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLInvalidateTextureANGLE, "context = %d, target = %s", CID(context), + GLenumToString(GLenumGroup::TextureTarget, target)); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateInvalidateTextureANGLE(context, targetPacked)); + if (isCallValid) + { + context->invalidateTexture(targetPacked); + } + ANGLE_CAPTURE(InvalidateTextureANGLE, isCallValid, context, targetPacked); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetTexImageANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum format, + GLenum type, + void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetTexImageANGLE, + "context = %d, target = %s, level = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR + "", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level, + GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureTarget targetPacked = PackParam<TextureTarget>(target); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetTexImageANGLE(context, targetPacked, level, format, type, pixels)); + if (isCallValid) + { + context->getTexImage(targetPacked, level, format, type, pixels); + } + ANGLE_CAPTURE(GetTexImageANGLE, isCallValid, context, targetPacked, level, format, type, + pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_GetRenderbufferImageANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum format, + GLenum type, + void *pixels) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLGetRenderbufferImageANGLE, + "context = %d, target = %s, format = %s, type = %s, pixels = 0x%016" PRIxPTR "", + CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), + GLenumToString(GLenumGroup::PixelFormat, format), + GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateGetRenderbufferImageANGLE(context, target, format, type, pixels)); + if (isCallValid) + { + context->getRenderbufferImage(target, format, type, pixels); + } + ANGLE_CAPTURE(GetRenderbufferImageANGLE, isCallValid, context, target, format, type, + pixels); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMemFlags2DANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorageMemFlags2DANGLE, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "memory = %u, offset = %llu, createFlags = %s, usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, memory, + static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorageMemFlags2DANGLE( + context, targetPacked, levels, internalFormat, width, height, + memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags2D(targetPacked, levels, internalFormat, width, height, + memoryPacked, offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags2DANGLE, isCallValid, context, targetPacked, levels, + internalFormat, width, height, memoryPacked, offset, createFlags, usageFlags); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMemFlags2DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT( + context, GLTexStorageMemFlags2DMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "fixedSampleLocations = %s, memory = %u, offset = %llu, createFlags = %s, usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMemFlags2DMultisampleANGLE( + context, targetPacked, samples, internalFormat, width, height, + fixedSampleLocations, memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags2DMultisample(targetPacked, samples, internalFormat, width, + height, fixedSampleLocations, memoryPacked, + offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags2DMultisampleANGLE, isCallValid, context, targetPacked, + samples, internalFormat, width, height, fixedSampleLocations, memoryPacked, + offset, createFlags, usageFlags); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMemFlags3DANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorageMemFlags3DANGLE, + "context = %d, target = %s, levels = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, memory = %u, offset = %llu, createFlags = %s, usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), levels, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, memory, + static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateTexStorageMemFlags3DANGLE( + context, targetPacked, levels, internalFormat, width, height, depth, + memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags3D(targetPacked, levels, internalFormat, width, height, + depth, memoryPacked, offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags3DANGLE, isCallValid, context, targetPacked, levels, + internalFormat, width, height, depth, memoryPacked, offset, createFlags, + usageFlags); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_TexStorageMemFlags3DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLTexStorageMemFlags3DMultisampleANGLE, + "context = %d, target = %s, samples = %d, internalFormat = %s, width = %d, height = %d, " + "depth = %d, fixedSampleLocations = %s, memory = %u, offset = %llu, createFlags = %s, " + "usageFlags = %s", + CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples, + GLenumToString(GLenumGroup::DefaultGroup, internalFormat), width, height, depth, + GLbooleanToString(fixedSampleLocations), memory, static_cast<unsigned long long>(offset), + GLbitfieldToString(GLenumGroup::DefaultGroup, createFlags).c_str(), + GLbitfieldToString(GLenumGroup::DefaultGroup, usageFlags).c_str()); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + TextureType targetPacked = PackParam<TextureType>(target); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateTexStorageMemFlags3DMultisampleANGLE( + context, targetPacked, samples, internalFormat, width, height, depth, + fixedSampleLocations, memoryPacked, offset, createFlags, usageFlags)); + if (isCallValid) + { + context->texStorageMemFlags3DMultisample(targetPacked, samples, internalFormat, width, + height, depth, fixedSampleLocations, + memoryPacked, offset, createFlags, usageFlags); + } + ANGLE_CAPTURE(TexStorageMemFlags3DMultisampleANGLE, isCallValid, context, targetPacked, + samples, internalFormat, width, height, depth, fixedSampleLocations, + memoryPacked, offset, createFlags, usageFlags); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ImportMemoryZirconHandleANGLEContextANGLE(GLeglContext ctx, + GLuint memory, + GLuint64 size, + GLenum handleType, + GLuint handle) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLImportMemoryZirconHandleANGLE, + "context = %d, memory = %u, size = %llu, handleType = %s, handle = %u", CID(context), + memory, static_cast<unsigned long long>(size), + GLenumToString(GLenumGroup::ExternalHandleType, handleType), handle); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + MemoryObjectID memoryPacked = PackParam<MemoryObjectID>(memory); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateImportMemoryZirconHandleANGLE(context, memoryPacked, size, + handleTypePacked, handle)); + if (isCallValid) + { + context->importMemoryZirconHandle(memoryPacked, size, handleTypePacked, handle); + } + ANGLE_CAPTURE(ImportMemoryZirconHandleANGLE, isCallValid, context, memoryPacked, size, + handleTypePacked, handle); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +void GL_APIENTRY GL_ImportSemaphoreZirconHandleANGLEContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum handleType, + GLuint handle) +{ + Context *context = static_cast<gl::Context *>(ctx); + EVENT(context, GLImportSemaphoreZirconHandleANGLE, + "context = %d, semaphore = %u, handleType = %s, handle = %u", CID(context), semaphore, + GLenumToString(GLenumGroup::ExternalHandleType, handleType), handle); + + if (context && !context->isContextLost()) + { + ASSERT(context == GetValidGlobalContext()); + SemaphoreID semaphorePacked = PackParam<SemaphoreID>(semaphore); + HandleType handleTypePacked = PackParam<HandleType>(handleType); + std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || ValidateImportSemaphoreZirconHandleANGLE( + context, semaphorePacked, handleTypePacked, handle)); + if (isCallValid) + { + context->importSemaphoreZirconHandle(semaphorePacked, handleTypePacked, handle); + } + ANGLE_CAPTURE(ImportSemaphoreZirconHandleANGLE, isCallValid, context, semaphorePacked, + handleTypePacked, handle); + } + else + { + GenerateContextLostErrorOnContext(context); + } +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.h b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.h new file mode 100644 index 0000000000..335d9d33d6 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.h @@ -0,0 +1,5049 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.xml and gl_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_gles_ext_autogen.h: +// Defines the GLES extension entry points. + +#ifndef LIBGLESV2_ENTRY_POINTS_GLES_EXT_AUTOGEN_H_ +#define LIBGLESV2_ENTRY_POINTS_GLES_EXT_AUTOGEN_H_ + +#include <GLES/gl.h> +#include <GLES/glext.h> +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> +#include <GLES3/gl32.h> +#include <export.h> + +extern "C" { + +// GL_ANGLE_base_vertex_base_instance +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstancedBaseInstanceANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei instanceCounts, + GLint baseVertex, + GLuint baseInstance); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiDrawArraysInstancedBaseInstanceANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + const GLuint *baseInstances, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + const GLint *baseVertices, + const GLuint *baseInstances, + GLsizei drawcount); + +// GL_ANGLE_copy_texture_3d +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexture3DANGLE(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_CopySubTexture3DANGLE(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLint z, + GLint width, + GLint height, + GLint depth, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); + +// GL_ANGLE_framebuffer_blit +ANGLE_EXPORT void GL_APIENTRY GL_BlitFramebufferANGLE(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter); + +// GL_ANGLE_framebuffer_multisample +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorageMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height); + +// GL_ANGLE_get_image +ANGLE_EXPORT void GL_APIENTRY +GL_GetTexImageANGLE(GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferImageANGLE(GLenum target, + GLenum format, + GLenum type, + void *pixels); + +// GL_ANGLE_get_tex_level_parameter +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterivANGLE(GLenum target, + GLint level, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterfvANGLE(GLenum target, + GLint level, + GLenum pname, + GLfloat *params); + +// GL_ANGLE_instanced_arrays +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribDivisorANGLE(GLuint index, GLuint divisor); + +// GL_ANGLE_memory_object_flags +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMemFlags2DANGLE(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorageMemFlags2DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMemFlags3DANGLE(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorageMemFlags3DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); + +// GL_ANGLE_memory_object_fuchsia +ANGLE_EXPORT void GL_APIENTRY GL_ImportMemoryZirconHandleANGLE(GLuint memory, + GLuint64 size, + GLenum handleType, + GLuint handle); + +// GL_ANGLE_multi_draw +ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawArraysANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawArraysInstancedANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawElementsANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawElementsInstancedANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + GLsizei drawcount); + +// GL_ANGLE_program_binary + +// GL_ANGLE_provoking_vertex +ANGLE_EXPORT void GL_APIENTRY GL_ProvokingVertexANGLE(GLenum mode); + +// GL_ANGLE_request_extension +ANGLE_EXPORT void GL_APIENTRY GL_RequestExtensionANGLE(const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_DisableExtensionANGLE(const GLchar *name); + +// GL_ANGLE_robust_client_memory +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleanvRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLboolean *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFloatvRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferAttachmentParameterivRobustANGLE(GLenum target, + GLenum attachment, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegervRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramivRobustANGLE(GLuint program, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderivRobustANGLE(GLuint shader, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterfvRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformfvRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribfvRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribPointervRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **pointer); +ANGLE_EXPORT void GL_APIENTRY GL_ReadPixelsRobustANGLE(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage2DRobustANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterfvRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage2DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage3DRobustANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage3DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage2DRobustANGLE(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage2DRobustANGLE(GLenum target, + GLint level, + GLsizei xoffset, + GLsizei yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage3DRobustANGLE(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage3DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectuivRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferPointervRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegeri_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInternalformativRobustANGLE(GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIuivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformuivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformBlockivRobustANGLE(GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64vRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64i_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameteri64vRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterivRobustANGLE(GLuint sampler, + GLuint pname, + GLsizei bufSize, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterfvRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLfloat *param); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterfvRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramInterfaceivRobustANGLE(GLuint program, + GLenum programInterface, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleani_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLboolean *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetMultisamplefvRobustANGLE(GLenum pname, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLfloat *val); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterivRobustANGLE(GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterfvRobustANGLE(GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetPointervRobustANGLERobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_ReadnPixelsRobustANGLE(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformfvRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformuivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectivRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjecti64vRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectui64vRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint64 *params); + +// GL_ANGLE_semaphore_fuchsia +ANGLE_EXPORT void GL_APIENTRY GL_ImportSemaphoreZirconHandleANGLE(GLuint semaphore, + GLenum handleType, + GLuint handle); + +// GL_ANGLE_texture_external_update +ANGLE_EXPORT void GL_APIENTRY GL_TexImage2DExternalANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type); +ANGLE_EXPORT void GL_APIENTRY GL_InvalidateTextureANGLE(GLenum target); + +// GL_ANGLE_texture_multisample +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage2DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations); +ANGLE_EXPORT void GL_APIENTRY GL_GetMultisamplefvANGLE(GLenum pname, GLuint index, GLfloat *val); +ANGLE_EXPORT void GL_APIENTRY GL_SampleMaskiANGLE(GLuint maskNumber, GLbitfield mask); + +// GL_ANGLE_translated_shader_source +ANGLE_EXPORT void GL_APIENTRY GL_GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei *length, + GLchar *source); + +// GL_CHROMIUM_bind_uniform_location +ANGLE_EXPORT void GL_APIENTRY GL_BindUniformLocationCHROMIUM(GLuint program, + GLint location, + const GLchar *name); + +// GL_CHROMIUM_copy_compressed_texture +ANGLE_EXPORT void GL_APIENTRY GL_CompressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId); + +// GL_CHROMIUM_copy_texture +ANGLE_EXPORT void GL_APIENTRY GL_CopyTextureCHROMIUM(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_CopySubTextureCHROMIUM(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLint width, + GLint height, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); + +// GL_CHROMIUM_framebuffer_mixed_samples +ANGLE_EXPORT void GL_APIENTRY GL_CoverageModulationCHROMIUM(GLenum components); + +// GL_CHROMIUM_lose_context +ANGLE_EXPORT void GL_APIENTRY GL_LoseContextCHROMIUM(GLenum current, GLenum other); + +// GL_EXT_EGL_image_array + +// GL_EXT_YUV_target + +// GL_EXT_blend_func_extended +ANGLE_EXPORT void GL_APIENTRY GL_BindFragDataLocationEXT(GLuint program, + GLuint color, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_BindFragDataLocationIndexedEXT(GLuint program, + GLuint colorNumber, + GLuint index, + const GLchar *name); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetFragDataIndexEXT(GLuint program, const GLchar *name); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetProgramResourceLocationIndexEXT(GLuint program, + GLenum programInterface, + const GLchar *name); + +// GL_EXT_buffer_storage +ANGLE_EXPORT void GL_APIENTRY GL_BufferStorageEXT(GLenum target, + GLsizeiptr size, + const void *data, + GLbitfield flags); + +// GL_EXT_clip_control +ANGLE_EXPORT void GL_APIENTRY GL_ClipControlEXT(GLenum origin, GLenum depth); + +// GL_EXT_copy_image +ANGLE_EXPORT void GL_APIENTRY GL_CopyImageSubDataEXT(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth); + +// GL_EXT_debug_label +ANGLE_EXPORT void GL_APIENTRY +GL_GetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_LabelObjectEXT(GLenum type, + GLuint object, + GLsizei length, + const GLchar *label); + +// GL_EXT_debug_marker +ANGLE_EXPORT void GL_APIENTRY GL_InsertEventMarkerEXT(GLsizei length, const GLchar *marker); +ANGLE_EXPORT void GL_APIENTRY GL_PopGroupMarkerEXT(); +ANGLE_EXPORT void GL_APIENTRY GL_PushGroupMarkerEXT(GLsizei length, const GLchar *marker); + +// GL_EXT_discard_framebuffer +ANGLE_EXPORT void GL_APIENTRY GL_DiscardFramebufferEXT(GLenum target, + GLsizei numAttachments, + const GLenum *attachments); + +// GL_EXT_disjoint_timer_query +ANGLE_EXPORT void GL_APIENTRY GL_BeginQueryEXT(GLenum target, GLuint id); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteQueriesEXT(GLsizei n, const GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_EndQueryEXT(GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_GenQueriesEXT(GLsizei n, GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64vEXT(GLenum pname, GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryivEXT(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsQueryEXT(GLuint id); +ANGLE_EXPORT void GL_APIENTRY GL_QueryCounterEXT(GLuint id, GLenum target); + +// GL_EXT_draw_buffers +ANGLE_EXPORT void GL_APIENTRY GL_DrawBuffersEXT(GLsizei n, const GLenum *bufs); + +// GL_EXT_draw_buffers_indexed +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparateiEXT(GLuint buf, + GLenum modeRGB, + GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationiEXT(GLuint buf, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncSeparateiEXT(GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFunciEXT(GLuint buf, GLenum src, GLenum dst); +ANGLE_EXPORT void GL_APIENTRY +GL_ColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +ANGLE_EXPORT void GL_APIENTRY GL_DisableiEXT(GLenum target, GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_EnableiEXT(GLenum target, GLuint index); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnablediEXT(GLenum target, GLuint index); + +// GL_EXT_draw_elements_base_vertex +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsBaseVertexEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedBaseVertexEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElementsBaseVertexEXT(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawElementsBaseVertexEXT(GLenum mode, + const GLsizei *count, + GLenum type, + const void *const *indices, + GLsizei primcount, + const GLint *basevertex); + +// GL_EXT_external_buffer +ANGLE_EXPORT void GL_APIENTRY GL_BufferStorageExternalEXT(GLenum target, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags); +ANGLE_EXPORT void GL_APIENTRY GL_NamedBufferStorageExternalEXT(GLuint buffer, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags); + +// GL_EXT_geometry_shader +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureEXT(GLenum target, + GLenum attachment, + GLuint texture, + GLint level); + +// GL_EXT_instanced_arrays +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstancedEXT(GLenum mode, + GLint start, + GLsizei count, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribDivisorEXT(GLuint index, GLuint divisor); + +// GL_EXT_map_buffer_range +ANGLE_EXPORT void GL_APIENTRY GL_FlushMappedBufferRangeEXT(GLenum target, + GLintptr offset, + GLsizeiptr length); +ANGLE_EXPORT void *GL_APIENTRY GL_MapBufferRangeEXT(GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access); + +// GL_EXT_memory_object +ANGLE_EXPORT void GL_APIENTRY GL_BufferStorageMemEXT(GLenum target, + GLsizeiptr size, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY GL_CreateMemoryObjectsEXT(GLsizei n, GLuint *memoryObjects); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteMemoryObjectsEXT(GLsizei n, const GLuint *memoryObjects); +ANGLE_EXPORT void GL_APIENTRY GL_GetMemoryObjectParameterivEXT(GLuint memoryObject, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUnsignedBytevEXT(GLenum pname, GLubyte *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetUnsignedBytei_vEXT(GLenum target, GLuint index, GLubyte *data); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsMemoryObjectEXT(GLuint memoryObject); +ANGLE_EXPORT void GL_APIENTRY GL_MemoryObjectParameterivEXT(GLuint memoryObject, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMem2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMem2DMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMem3DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMem3DMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset); + +// GL_EXT_memory_object_fd +ANGLE_EXPORT void GL_APIENTRY GL_ImportMemoryFdEXT(GLuint memory, + GLuint64 size, + GLenum handleType, + GLint fd); + +// GL_EXT_multisampled_render_to_texture +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples); +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height); + +// GL_EXT_occlusion_query_boolean + +// GL_EXT_primitive_bounding_box +ANGLE_EXPORT void GL_APIENTRY GL_PrimitiveBoundingBoxEXT(GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW); + +// GL_EXT_read_format_bgra + +// GL_EXT_robustness +ANGLE_EXPORT GLenum GL_APIENTRY GL_GetGraphicsResetStatusEXT(); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformfvEXT(GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformivEXT(GLuint program, + GLint location, + GLsizei bufSize, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_ReadnPixelsEXT(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data); + +// GL_EXT_sRGB + +// GL_EXT_semaphore +ANGLE_EXPORT void GL_APIENTRY GL_DeleteSemaphoresEXT(GLsizei n, const GLuint *semaphores); +ANGLE_EXPORT void GL_APIENTRY GL_GenSemaphoresEXT(GLsizei n, GLuint *semaphores); +ANGLE_EXPORT void GL_APIENTRY GL_GetSemaphoreParameterui64vEXT(GLuint semaphore, + GLenum pname, + GLuint64 *params); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsSemaphoreEXT(GLuint semaphore); +ANGLE_EXPORT void GL_APIENTRY GL_SemaphoreParameterui64vEXT(GLuint semaphore, + GLenum pname, + const GLuint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_SignalSemaphoreEXT(GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *dstLayouts); +ANGLE_EXPORT void GL_APIENTRY GL_WaitSemaphoreEXT(GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *srcLayouts); + +// GL_EXT_semaphore_fd +ANGLE_EXPORT void GL_APIENTRY GL_ImportSemaphoreFdEXT(GLuint semaphore, + GLenum handleType, + GLint fd); + +// GL_EXT_separate_shader_objects +ANGLE_EXPORT void GL_APIENTRY GL_ActiveShaderProgramEXT(GLuint pipeline, GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_BindProgramPipelineEXT(GLuint pipeline); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateShaderProgramvEXT(GLenum type, + GLsizei count, + const GLchar **strings); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_GenProgramPipelinesEXT(GLsizei n, GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineInfoLogEXT(GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineivEXT(GLuint pipeline, + GLenum pname, + GLint *params); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsProgramPipelineEXT(GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramParameteriEXT(GLuint program, GLenum pname, GLint value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1iEXT(GLuint program, GLint location, GLint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2fEXT(GLuint program, + GLint location, + GLfloat v0, + GLfloat v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2iEXT(GLuint program, + GLint location, + GLint v0, + GLint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2uiEXT(GLuint program, + GLint location, + GLuint v0, + GLuint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4fEXT(GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_ProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UseProgramStagesEXT(GLuint pipeline, + GLbitfield stages, + GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_ValidateProgramPipelineEXT(GLuint pipeline); + +// GL_EXT_shader_framebuffer_fetch_non_coherent +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferFetchBarrierEXT(); + +// GL_EXT_shader_io_blocks + +// GL_EXT_tessellation_shader +ANGLE_EXPORT void GL_APIENTRY GL_PatchParameteriEXT(GLenum pname, GLint value); + +// GL_EXT_texture_border_clamp +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIivEXT(GLuint sampler, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuivEXT(GLuint sampler, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIivEXT(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuivEXT(GLenum target, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIivEXT(GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuivEXT(GLuint sampler, + GLenum pname, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIivEXT(GLenum target, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuivEXT(GLenum target, + GLenum pname, + const GLuint *params); + +// GL_EXT_texture_buffer +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferRangeEXT(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size); + +// GL_EXT_texture_compression_bptc + +// GL_EXT_texture_compression_dxt1 + +// GL_EXT_texture_compression_rgtc + +// GL_EXT_texture_compression_s3tc + +// GL_EXT_texture_compression_s3tc_srgb + +// GL_EXT_texture_cube_map_array + +// GL_EXT_texture_filter_anisotropic + +// GL_EXT_texture_format_BGRA8888 + +// GL_EXT_texture_sRGB_R8 + +// GL_EXT_texture_sRGB_RG8 + +// GL_EXT_texture_storage +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage1DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage3DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth); + +// GL_KHR_blend_equation_advanced +ANGLE_EXPORT void GL_APIENTRY GL_BlendBarrierKHR(); + +// GL_KHR_debug +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageCallbackKHR(GLDEBUGPROCKHR callback, + const void *userParam); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageControlKHR(GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageInsertKHR(GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetDebugMessageLogKHR(GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectLabelKHR(GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectPtrLabelKHR(const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetPointervKHR(GLenum pname, void **params); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectLabelKHR(GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectPtrLabelKHR(const void *ptr, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_PopDebugGroupKHR(); +ANGLE_EXPORT void GL_APIENTRY GL_PushDebugGroupKHR(GLenum source, + GLuint id, + GLsizei length, + const GLchar *message); + +// GL_KHR_parallel_shader_compile +ANGLE_EXPORT void GL_APIENTRY GL_MaxShaderCompilerThreadsKHR(GLuint count); + +// GL_NV_fence +ANGLE_EXPORT void GL_APIENTRY GL_DeleteFencesNV(GLsizei n, const GLuint *fences); +ANGLE_EXPORT void GL_APIENTRY GL_FinishFenceNV(GLuint fence); +ANGLE_EXPORT void GL_APIENTRY GL_GenFencesNV(GLsizei n, GLuint *fences); +ANGLE_EXPORT void GL_APIENTRY GL_GetFenceivNV(GLuint fence, GLenum pname, GLint *params); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsFenceNV(GLuint fence); +ANGLE_EXPORT void GL_APIENTRY GL_SetFenceNV(GLuint fence, GLenum condition); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_TestFenceNV(GLuint fence); + +// GL_NV_framebuffer_blit +ANGLE_EXPORT void GL_APIENTRY GL_BlitFramebufferNV(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter); + +// GL_OES_EGL_image +ANGLE_EXPORT void GL_APIENTRY GL_EGLImageTargetRenderbufferStorageOES(GLenum target, + GLeglImageOES image); +ANGLE_EXPORT void GL_APIENTRY GL_EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image); + +// GL_OES_compressed_ETC1_RGB8_texture + +// GL_OES_copy_image +ANGLE_EXPORT void GL_APIENTRY GL_CopyImageSubDataOES(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth); + +// GL_OES_depth32 + +// GL_OES_draw_buffers_indexed +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparateiOES(GLuint buf, + GLenum modeRGB, + GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationiOES(GLuint buf, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncSeparateiOES(GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFunciOES(GLuint buf, GLenum src, GLenum dst); +ANGLE_EXPORT void GL_APIENTRY +GL_ColorMaskiOES(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +ANGLE_EXPORT void GL_APIENTRY GL_DisableiOES(GLenum target, GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_EnableiOES(GLenum target, GLuint index); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnablediOES(GLenum target, GLuint index); + +// GL_OES_draw_elements_base_vertex +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsBaseVertexOES(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedBaseVertexOES(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElementsBaseVertexOES(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); + +// GL_OES_draw_texture +ANGLE_EXPORT void GL_APIENTRY +GL_DrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexfvOES(const GLfloat *coords); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexivOES(const GLint *coords); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexsvOES(const GLshort *coords); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexxvOES(const GLfixed *coords); + +// GL_OES_framebuffer_object +ANGLE_EXPORT void GL_APIENTRY GL_BindFramebufferOES(GLenum target, GLuint framebuffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindRenderbufferOES(GLenum target, GLuint renderbuffer); +ANGLE_EXPORT GLenum GL_APIENTRY GL_CheckFramebufferStatusOES(GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferRenderbufferOES(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture2DOES(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level); +ANGLE_EXPORT void GL_APIENTRY GL_GenFramebuffersOES(GLsizei n, GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenRenderbuffersOES(GLsizei n, GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenerateMipmapOES(GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferAttachmentParameterivOES(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferParameterivOES(GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsFramebufferOES(GLuint framebuffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsRenderbufferOES(GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorageOES(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height); + +// GL_OES_get_program_binary +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramBinaryOES(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramBinaryOES(GLuint program, + GLenum binaryFormat, + const void *binary, + GLint length); + +// GL_OES_mapbuffer +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferPointervOES(GLenum target, GLenum pname, void **params); +ANGLE_EXPORT void *GL_APIENTRY GL_MapBufferOES(GLenum target, GLenum access); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_UnmapBufferOES(GLenum target); + +// GL_OES_matrix_palette +ANGLE_EXPORT void GL_APIENTRY GL_CurrentPaletteMatrixOES(GLuint matrixpaletteindex); +ANGLE_EXPORT void GL_APIENTRY GL_LoadPaletteFromModelViewMatrixOES(); +ANGLE_EXPORT void GL_APIENTRY GL_MatrixIndexPointerOES(GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_WeightPointerOES(GLint size, + GLenum type, + GLsizei stride, + const void *pointer); + +// GL_OES_point_size_array +ANGLE_EXPORT void GL_APIENTRY GL_PointSizePointerOES(GLenum type, + GLsizei stride, + const void *pointer); + +// GL_OES_query_matrix +ANGLE_EXPORT GLbitfield GL_APIENTRY GL_QueryMatrixxOES(GLfixed *mantissa, GLint *exponent); + +// GL_OES_sample_shading +ANGLE_EXPORT void GL_APIENTRY GL_MinSampleShadingOES(GLfloat value); + +// GL_OES_shader_io_blocks + +// GL_OES_texture_3D +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage3DOES(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture3DOES(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLint zoffset); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage3DOES(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels); + +// GL_OES_texture_border_clamp +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIivOES(GLuint sampler, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuivOES(GLuint sampler, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIivOES(GLenum target, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuivOES(GLenum target, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIivOES(GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuivOES(GLuint sampler, + GLenum pname, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIivOES(GLenum target, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuivOES(GLenum target, + GLenum pname, + const GLuint *params); + +// GL_OES_texture_buffer +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferOES(GLenum target, GLenum internalformat, GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferRangeOES(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size); + +// GL_OES_texture_cube_map +ANGLE_EXPORT void GL_APIENTRY GL_GetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexGenivOES(GLenum coord, GLenum pname, GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenfOES(GLenum coord, GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexGeniOES(GLenum coord, GLenum pname, GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenivOES(GLenum coord, GLenum pname, const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenxOES(GLenum coord, GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params); + +// GL_OES_texture_cube_map_array + +// GL_OES_texture_half_float + +// GL_OES_texture_stencil8 + +// GL_OES_texture_storage_multisample_2d_array +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage3DMultisampleOES(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations); + +// GL_OES_vertex_array_object +ANGLE_EXPORT void GL_APIENTRY GL_BindVertexArrayOES(GLuint array); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteVertexArraysOES(GLsizei n, const GLuint *arrays); +ANGLE_EXPORT void GL_APIENTRY GL_GenVertexArraysOES(GLsizei n, GLuint *arrays); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsVertexArrayOES(GLuint array); + +// GL_OVR_multiview +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureMultiviewOVR(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint baseViewIndex, + GLsizei numViews); + +// GL_OVR_multiview2 + +// EGL_ANGLE_explicit_context +ANGLE_EXPORT void GL_APIENTRY GL_ActiveShaderProgramContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_ActiveShaderProgramEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_ActiveTextureContextANGLE(GLeglContext ctx, GLenum texture); +ANGLE_EXPORT void GL_APIENTRY GL_AlphaFuncContextANGLE(GLeglContext ctx, GLenum func, GLfloat ref); +ANGLE_EXPORT void GL_APIENTRY GL_AlphaFuncxContextANGLE(GLeglContext ctx, GLenum func, GLfixed ref); +ANGLE_EXPORT void GL_APIENTRY GL_AttachShaderContextANGLE(GLeglContext ctx, + GLuint program, + GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_BeginQueryContextANGLE(GLeglContext ctx, GLenum target, GLuint id); +ANGLE_EXPORT void GL_APIENTRY GL_BeginQueryEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLuint id); +ANGLE_EXPORT void GL_APIENTRY GL_BeginTransformFeedbackContextANGLE(GLeglContext ctx, + GLenum primitiveMode); +ANGLE_EXPORT void GL_APIENTRY GL_BindAttribLocationContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_BindBufferContextANGLE(GLeglContext ctx, + GLenum target, + GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindBufferBaseContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLuint buffer, + GLintptr offset, + GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_BindFragDataLocationEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLuint color, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_BindFragDataLocationIndexedEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLuint colorNumber, + GLuint index, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_BindFramebufferContextANGLE(GLeglContext ctx, + GLenum target, + GLuint framebuffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindFramebufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint framebuffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindImageTextureContextANGLE(GLeglContext ctx, + GLuint unit, + GLuint texture, + GLint level, + GLboolean layered, + GLint layer, + GLenum access, + GLenum format); +ANGLE_EXPORT void GL_APIENTRY GL_BindProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_BindProgramPipelineEXTContextANGLE(GLeglContext ctx, + GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_BindRenderbufferContextANGLE(GLeglContext ctx, + GLenum target, + GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindRenderbufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_BindSamplerContextANGLE(GLeglContext ctx, + GLuint unit, + GLuint sampler); +ANGLE_EXPORT void GL_APIENTRY GL_BindTextureContextANGLE(GLeglContext ctx, + GLenum target, + GLuint texture); +ANGLE_EXPORT void GL_APIENTRY GL_BindTransformFeedbackContextANGLE(GLeglContext ctx, + GLenum target, + GLuint id); +ANGLE_EXPORT void GL_APIENTRY GL_BindVertexArrayContextANGLE(GLeglContext ctx, GLuint array); +ANGLE_EXPORT void GL_APIENTRY GL_BindVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array); +ANGLE_EXPORT void GL_APIENTRY GL_BindVertexBufferContextANGLE(GLeglContext ctx, + GLuint bindingindex, + GLuint buffer, + GLintptr offset, + GLsizei stride); +ANGLE_EXPORT void GL_APIENTRY GL_BlendBarrierContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_BlendBarrierKHRContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_BlendColorContextANGLE(GLeglContext ctx, + GLfloat red, + GLfloat green, + GLfloat blue, + GLfloat alpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationContextANGLE(GLeglContext ctx, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparateContextANGLE(GLeglContext ctx, + GLenum modeRGB, + GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparateiContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparateiEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationSeparateiOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationiContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationiEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_BlendEquationiOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncContextANGLE(GLeglContext ctx, + GLenum sfactor, + GLenum dfactor); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncSeparateContextANGLE(GLeglContext ctx, + GLenum sfactorRGB, + GLenum dfactorRGB, + GLenum sfactorAlpha, + GLenum dfactorAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncSeparateiContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncSeparateiEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFuncSeparateiOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFunciContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum src, + GLenum dst); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFunciEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum src, + GLenum dst); +ANGLE_EXPORT void GL_APIENTRY GL_BlendFunciOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum src, + GLenum dst); +ANGLE_EXPORT void GL_APIENTRY GL_BlitFramebufferContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter); +ANGLE_EXPORT void GL_APIENTRY GL_BlitFramebufferANGLEContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter); +ANGLE_EXPORT void GL_APIENTRY GL_BlitFramebufferNVContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter); +ANGLE_EXPORT void GL_APIENTRY GL_BufferDataContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + const void *data, + GLenum usage); +ANGLE_EXPORT void GL_APIENTRY GL_BufferStorageEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + const void *data, + GLbitfield flags); +ANGLE_EXPORT void GL_APIENTRY +GL_BufferStorageExternalEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags); +ANGLE_EXPORT void GL_APIENTRY GL_BufferStorageMemEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY GL_BufferSubDataContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr size, + const void *data); +ANGLE_EXPORT GLenum GL_APIENTRY GL_CheckFramebufferStatusContextANGLE(GLeglContext ctx, + GLenum target); +ANGLE_EXPORT GLenum GL_APIENTRY GL_CheckFramebufferStatusOESContextANGLE(GLeglContext ctx, + GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_ClearContextANGLE(GLeglContext ctx, GLbitfield mask); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferfiContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + GLfloat depth, + GLint stencil); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferfvContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferivContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ClearBufferuivContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ClearColorContextANGLE(GLeglContext ctx, + GLfloat red, + GLfloat green, + GLfloat blue, + GLfloat alpha); +ANGLE_EXPORT void GL_APIENTRY GL_ClearColorxContextANGLE(GLeglContext ctx, + GLfixed red, + GLfixed green, + GLfixed blue, + GLfixed alpha); +ANGLE_EXPORT void GL_APIENTRY GL_ClearDepthfContextANGLE(GLeglContext ctx, GLfloat d); +ANGLE_EXPORT void GL_APIENTRY GL_ClearDepthxContextANGLE(GLeglContext ctx, GLfixed depth); +ANGLE_EXPORT void GL_APIENTRY GL_ClearStencilContextANGLE(GLeglContext ctx, GLint s); +ANGLE_EXPORT void GL_APIENTRY GL_ClientActiveTextureContextANGLE(GLeglContext ctx, GLenum texture); +ANGLE_EXPORT GLenum GL_APIENTRY GL_ClientWaitSyncContextANGLE(GLeglContext ctx, + GLsync sync, + GLbitfield flags, + GLuint64 timeout); +ANGLE_EXPORT void GL_APIENTRY GL_ClipControlEXTContextANGLE(GLeglContext ctx, + GLenum origin, + GLenum depth); +ANGLE_EXPORT void GL_APIENTRY GL_ClipPlanefContextANGLE(GLeglContext ctx, + GLenum p, + const GLfloat *eqn); +ANGLE_EXPORT void GL_APIENTRY GL_ClipPlanexContextANGLE(GLeglContext ctx, + GLenum plane, + const GLfixed *equation); +ANGLE_EXPORT void GL_APIENTRY +GL_Color4fContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +ANGLE_EXPORT void GL_APIENTRY +GL_Color4ubContextANGLE(GLeglContext ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +ANGLE_EXPORT void GL_APIENTRY +GL_Color4xContextANGLE(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +ANGLE_EXPORT void GL_APIENTRY GL_ColorMaskContextANGLE(GLeglContext ctx, + GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha); +ANGLE_EXPORT void GL_APIENTRY GL_ColorMaskiContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a); +ANGLE_EXPORT void GL_APIENTRY GL_ColorMaskiEXTContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a); +ANGLE_EXPORT void GL_APIENTRY GL_ColorMaskiOESContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a); +ANGLE_EXPORT void GL_APIENTRY GL_ColorPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_CompileShaderContextANGLE(GLeglContext ctx, GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data); +ANGLE_EXPORT void GL_APIENTRY GL_CopyBufferSubDataContextANGLE(GLeglContext ctx, + GLenum readTarget, + GLenum writeTarget, + GLintptr readOffset, + GLintptr writeOffset, + GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_CopyImageSubDataContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth); +ANGLE_EXPORT void GL_APIENTRY GL_CopyImageSubDataEXTContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth); +ANGLE_EXPORT void GL_APIENTRY GL_CopyImageSubDataOESContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_CreateMemoryObjectsEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *memoryObjects); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateProgramContextANGLE(GLeglContext ctx); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateShaderContextANGLE(GLeglContext ctx, GLenum type); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateShaderProgramvContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei count, + const GLchar *const *strings); +ANGLE_EXPORT GLuint GL_APIENTRY GL_CreateShaderProgramvEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei count, + const GLchar **strings); +ANGLE_EXPORT void GL_APIENTRY GL_CullFaceContextANGLE(GLeglContext ctx, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_CurrentPaletteMatrixOESContextANGLE(GLeglContext ctx, + GLuint matrixpaletteindex); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageCallbackContextANGLE(GLeglContext ctx, + GLDEBUGPROC callback, + const void *userParam); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageCallbackKHRContextANGLE(GLeglContext ctx, + GLDEBUGPROCKHR callback, + const void *userParam); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageControlContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageControlKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageInsertContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf); +ANGLE_EXPORT void GL_APIENTRY GL_DebugMessageInsertKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteBuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *buffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteFencesNVContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *fences); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteFramebuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteFramebuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteMemoryObjectsEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *memoryObjects); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteProgramContextANGLE(GLeglContext ctx, GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteProgramPipelinesContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteProgramPipelinesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteQueriesContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteQueriesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteRenderbuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteRenderbuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteSamplersContextANGLE(GLeglContext ctx, + GLsizei count, + const GLuint *samplers); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteSemaphoresEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *semaphores); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteShaderContextANGLE(GLeglContext ctx, GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteSyncContextANGLE(GLeglContext ctx, GLsync sync); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteTexturesContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *textures); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteTransformFeedbacksContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteVertexArraysContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *arrays); +ANGLE_EXPORT void GL_APIENTRY GL_DeleteVertexArraysOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *arrays); +ANGLE_EXPORT void GL_APIENTRY GL_DepthFuncContextANGLE(GLeglContext ctx, GLenum func); +ANGLE_EXPORT void GL_APIENTRY GL_DepthMaskContextANGLE(GLeglContext ctx, GLboolean flag); +ANGLE_EXPORT void GL_APIENTRY GL_DepthRangefContextANGLE(GLeglContext ctx, GLfloat n, GLfloat f); +ANGLE_EXPORT void GL_APIENTRY GL_DepthRangexContextANGLE(GLeglContext ctx, GLfixed n, GLfixed f); +ANGLE_EXPORT void GL_APIENTRY GL_DetachShaderContextANGLE(GLeglContext ctx, + GLuint program, + GLuint shader); +ANGLE_EXPORT void GL_APIENTRY GL_DisableContextANGLE(GLeglContext ctx, GLenum cap); +ANGLE_EXPORT void GL_APIENTRY GL_DisableClientStateContextANGLE(GLeglContext ctx, GLenum array); +ANGLE_EXPORT void GL_APIENTRY GL_DisableVertexAttribArrayContextANGLE(GLeglContext ctx, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_DisableiContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_DisableiEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_DisableiOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_DiscardFramebufferEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments); +ANGLE_EXPORT void GL_APIENTRY GL_DispatchComputeContextANGLE(GLeglContext ctx, + GLuint num_groups_x, + GLuint num_groups_y, + GLuint num_groups_z); +ANGLE_EXPORT void GL_APIENTRY GL_DispatchComputeIndirectContextANGLE(GLeglContext ctx, + GLintptr indirect); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysIndirectContextANGLE(GLeglContext ctx, + GLenum mode, + const void *indirect); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstancedContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstancedEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLint start, + GLsizei count, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawBuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLenum *bufs); +ANGLE_EXPORT void GL_APIENTRY GL_DrawBuffersEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLenum *bufs); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsIndirectContextANGLE(GLeglContext ctx, + GLenum mode, + GLenum type, + const void *indirect); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawElementsInstancedBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawElementsInstancedBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElementsContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElementsBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawRangeElementsBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexfOESContextANGLE(GLeglContext ctx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat width, + GLfloat height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexfvOESContextANGLE(GLeglContext ctx, const GLfloat *coords); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawTexiOESContextANGLE(GLeglContext ctx, GLint x, GLint y, GLint z, GLint width, GLint height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexivOESContextANGLE(GLeglContext ctx, const GLint *coords); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexsOESContextANGLE(GLeglContext ctx, + GLshort x, + GLshort y, + GLshort z, + GLshort width, + GLshort height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexsvOESContextANGLE(GLeglContext ctx, const GLshort *coords); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexxOESContextANGLE(GLeglContext ctx, + GLfixed x, + GLfixed y, + GLfixed z, + GLfixed width, + GLfixed height); +ANGLE_EXPORT void GL_APIENTRY GL_DrawTexxvOESContextANGLE(GLeglContext ctx, const GLfixed *coords); +ANGLE_EXPORT void GL_APIENTRY +GL_EGLImageTargetRenderbufferStorageOESContextANGLE(GLeglContext ctx, + GLenum target, + GLeglImageOES image); +ANGLE_EXPORT void GL_APIENTRY GL_EGLImageTargetTexture2DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLeglImageOES image); +ANGLE_EXPORT void GL_APIENTRY GL_EnableContextANGLE(GLeglContext ctx, GLenum cap); +ANGLE_EXPORT void GL_APIENTRY GL_EnableClientStateContextANGLE(GLeglContext ctx, GLenum array); +ANGLE_EXPORT void GL_APIENTRY GL_EnableVertexAttribArrayContextANGLE(GLeglContext ctx, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_EnableiContextANGLE(GLeglContext ctx, GLenum target, GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_EnableiEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_EnableiOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_EndQueryContextANGLE(GLeglContext ctx, GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_EndQueryEXTContextANGLE(GLeglContext ctx, GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_EndTransformFeedbackContextANGLE(GLeglContext ctx); +ANGLE_EXPORT GLsync GL_APIENTRY GL_FenceSyncContextANGLE(GLeglContext ctx, + GLenum condition, + GLbitfield flags); +ANGLE_EXPORT void GL_APIENTRY GL_FinishContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_FinishFenceNVContextANGLE(GLeglContext ctx, GLuint fence); +ANGLE_EXPORT void GL_APIENTRY GL_FlushContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_FlushMappedBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length); +ANGLE_EXPORT void GL_APIENTRY GL_FlushMappedBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length); +ANGLE_EXPORT void GL_APIENTRY GL_FogfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_FogfvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_FogxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_FogxvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfixed *param); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferFetchBarrierEXTContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferParameteriContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferRenderbufferContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferRenderbufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture2DContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture2DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture2DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTexture3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLint zoffset); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureLayerContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint layer); +ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureMultiviewOVRContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint baseViewIndex, + GLsizei numViews); +ANGLE_EXPORT void GL_APIENTRY GL_FrontFaceContextANGLE(GLeglContext ctx, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_FrustumfContextANGLE(GLeglContext ctx, + GLfloat l, + GLfloat r, + GLfloat b, + GLfloat t, + GLfloat n, + GLfloat f); +ANGLE_EXPORT void GL_APIENTRY GL_FrustumxContextANGLE(GLeglContext ctx, + GLfixed l, + GLfixed r, + GLfixed b, + GLfixed t, + GLfixed n, + GLfixed f); +ANGLE_EXPORT void GL_APIENTRY GL_GenBuffersContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *buffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenFencesNVContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *fences); +ANGLE_EXPORT void GL_APIENTRY GL_GenFramebuffersContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenFramebuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *framebuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenProgramPipelinesContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_GenProgramPipelinesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *pipelines); +ANGLE_EXPORT void GL_APIENTRY GL_GenQueriesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_GenQueriesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_GenRenderbuffersContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenRenderbuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *renderbuffers); +ANGLE_EXPORT void GL_APIENTRY GL_GenSamplersContextANGLE(GLeglContext ctx, + GLsizei count, + GLuint *samplers); +ANGLE_EXPORT void GL_APIENTRY GL_GenSemaphoresEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *semaphores); +ANGLE_EXPORT void GL_APIENTRY GL_GenTexturesContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *textures); +ANGLE_EXPORT void GL_APIENTRY GL_GenTransformFeedbacksContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *ids); +ANGLE_EXPORT void GL_APIENTRY GL_GenVertexArraysContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *arrays); +ANGLE_EXPORT void GL_APIENTRY GL_GenVertexArraysOESContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *arrays); +ANGLE_EXPORT void GL_APIENTRY GL_GenerateMipmapContextANGLE(GLeglContext ctx, GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_GenerateMipmapOESContextANGLE(GLeglContext ctx, GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveAttribContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformBlockNameContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLsizei bufSize, + GLsizei *length, + GLchar *uniformBlockName); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformBlockivContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetActiveUniformsivContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei uniformCount, + const GLuint *uniformIndices, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetAttachedShadersContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei maxCount, + GLsizei *count, + GLuint *shaders); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetAttribLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleani_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLboolean *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleanvContextANGLE(GLeglContext ctx, + GLenum pname, + GLboolean *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameteri64vContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferPointervContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferPointervOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_GetClipPlanefContextANGLE(GLeglContext ctx, + GLenum plane, + GLfloat *equation); +ANGLE_EXPORT void GL_APIENTRY GL_GetClipPlanexContextANGLE(GLeglContext ctx, + GLenum plane, + GLfixed *equation); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetDebugMessageLogContextANGLE(GLeglContext ctx, + GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetDebugMessageLogKHRContextANGLE(GLeglContext ctx, + GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog); +ANGLE_EXPORT GLenum GL_APIENTRY GL_GetErrorContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_GetFenceivNVContextANGLE(GLeglContext ctx, + GLuint fence, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFixedvContextANGLE(GLeglContext ctx, + GLenum pname, + GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFloatvContextANGLE(GLeglContext ctx, + GLenum pname, + GLfloat *data); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetFragDataIndexEXTContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetFragDataLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferAttachmentParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY +GL_GetFramebufferAttachmentParameterivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT GLenum GL_APIENTRY GL_GetGraphicsResetStatusContextANGLE(GLeglContext ctx); +ANGLE_EXPORT GLenum GL_APIENTRY GL_GetGraphicsResetStatusEXTContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64i_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64vContextANGLE(GLeglContext ctx, + GLenum pname, + GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64vEXTContextANGLE(GLeglContext ctx, + GLenum pname, + GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegeri_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegervContextANGLE(GLeglContext ctx, + GLenum pname, + GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInternalformativContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetLightfvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetLightxvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetMaterialfvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetMaterialxvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetMemoryObjectParameterivEXTContextANGLE(GLeglContext ctx, + GLuint memoryObject, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetMultisamplefvContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLfloat *val); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectLabelContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectLabelEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLuint object, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectLabelKHRContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectPtrLabelContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetObjectPtrLabelKHRContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_GetPointervContextANGLE(GLeglContext ctx, + GLenum pname, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_GetPointervKHRContextANGLE(GLeglContext ctx, + GLenum pname, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramBinaryContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramBinaryOESContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramInfoLogContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramInterfaceivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineInfoLogContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineInfoLogEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineivContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramPipelineivEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLenum pname, + GLint *params); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetProgramResourceIndexContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetProgramResourceLocationContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name); +ANGLE_EXPORT GLint GL_APIENTRY +GL_GetProgramResourceLocationIndexEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramResourceNameContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramResourceivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLuint index, + GLsizei propCount, + const GLenum *props, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjecti64vEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectivEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectui64vEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectuivContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectuivEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferParameterivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterfvContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSemaphoreParameterui64vEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum pname, + GLuint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderInfoLogContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderPrecisionFormatContextANGLE(GLeglContext ctx, + GLenum shadertype, + GLenum precisiontype, + GLint *range, + GLint *precision); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderSourceContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *source); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderivContextANGLE(GLeglContext ctx, + GLuint shader, + GLenum pname, + GLint *params); +ANGLE_EXPORT const GLubyte *GL_APIENTRY GL_GetStringContextANGLE(GLeglContext ctx, GLenum name); +ANGLE_EXPORT const GLubyte *GL_APIENTRY GL_GetStringiContextANGLE(GLeglContext ctx, + GLenum name, + GLuint index); +ANGLE_EXPORT void GL_APIENTRY GL_GetSyncivContextANGLE(GLeglContext ctx, + GLsync sync, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *values); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexEnvfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexEnvivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexEnvxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexGenfvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexGenivOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexGenxvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTransformFeedbackVaryingContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLsizei *size, + GLenum *type, + GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetTranslatedShaderSourceANGLEContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufsize, + GLsizei *length, + GLchar *source); +ANGLE_EXPORT GLuint GL_APIENTRY GL_GetUniformBlockIndexContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *uniformBlockName); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformIndicesContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint *uniformIndices); +ANGLE_EXPORT GLint GL_APIENTRY GL_GetUniformLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformfvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformuivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUnsignedBytevEXTContextANGLE(GLeglContext ctx, + GLenum pname, + GLubyte *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetUnsignedBytei_vEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLubyte *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIuivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribPointervContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + void **pointer); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribfvContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformfvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformfvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformuivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_HintContextANGLE(GLeglContext ctx, GLenum target, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_ImportMemoryFdEXTContextANGLE(GLeglContext ctx, + GLuint memory, + GLuint64 size, + GLenum handleType, + GLint fd); +ANGLE_EXPORT void GL_APIENTRY GL_ImportSemaphoreFdEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum handleType, + GLint fd); +ANGLE_EXPORT void GL_APIENTRY GL_InsertEventMarkerEXTContextANGLE(GLeglContext ctx, + GLsizei length, + const GLchar *marker); +ANGLE_EXPORT void GL_APIENTRY GL_InvalidateFramebufferContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments); +ANGLE_EXPORT void GL_APIENTRY GL_InvalidateSubFramebufferContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, + GLint y, + GLsizei width, + GLsizei height); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsBufferContextANGLE(GLeglContext ctx, GLuint buffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnabledContextANGLE(GLeglContext ctx, GLenum cap); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnablediContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnablediEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsEnablediOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsFenceNVContextANGLE(GLeglContext ctx, GLuint fence); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsFramebufferContextANGLE(GLeglContext ctx, + GLuint framebuffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsFramebufferOESContextANGLE(GLeglContext ctx, + GLuint framebuffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsMemoryObjectEXTContextANGLE(GLeglContext ctx, + GLuint memoryObject); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsProgramContextANGLE(GLeglContext ctx, GLuint program); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsProgramPipelineContextANGLE(GLeglContext ctx, + GLuint pipeline); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsProgramPipelineEXTContextANGLE(GLeglContext ctx, + GLuint pipeline); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsQueryContextANGLE(GLeglContext ctx, GLuint id); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsQueryEXTContextANGLE(GLeglContext ctx, GLuint id); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsRenderbufferContextANGLE(GLeglContext ctx, + GLuint renderbuffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsRenderbufferOESContextANGLE(GLeglContext ctx, + GLuint renderbuffer); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsSemaphoreEXTContextANGLE(GLeglContext ctx, + GLuint semaphore); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsSamplerContextANGLE(GLeglContext ctx, GLuint sampler); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsShaderContextANGLE(GLeglContext ctx, GLuint shader); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsSyncContextANGLE(GLeglContext ctx, GLsync sync); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsTextureContextANGLE(GLeglContext ctx, GLuint texture); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsTransformFeedbackContextANGLE(GLeglContext ctx, GLuint id); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsVertexArrayContextANGLE(GLeglContext ctx, GLuint array); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_IsVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array); +ANGLE_EXPORT void GL_APIENTRY GL_LabelObjectEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLuint object, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelfContextANGLE(GLeglContext ctx, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelfvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelxContextANGLE(GLeglContext ctx, + GLenum pname, + GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_LightModelxvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfixed *param); +ANGLE_EXPORT void GL_APIENTRY GL_LightfContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_LightfvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_LightxContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_LightxvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_LineWidthContextANGLE(GLeglContext ctx, GLfloat width); +ANGLE_EXPORT void GL_APIENTRY GL_LineWidthxContextANGLE(GLeglContext ctx, GLfixed width); +ANGLE_EXPORT void GL_APIENTRY GL_LinkProgramContextANGLE(GLeglContext ctx, GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_LoadIdentityContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_LoadMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m); +ANGLE_EXPORT void GL_APIENTRY GL_LoadMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m); +ANGLE_EXPORT void GL_APIENTRY GL_LoadPaletteFromModelViewMatrixOESContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_LogicOpContextANGLE(GLeglContext ctx, GLenum opcode); +ANGLE_EXPORT void *GL_APIENTRY GL_MapBufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum access); +ANGLE_EXPORT void *GL_APIENTRY GL_MapBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access); +ANGLE_EXPORT void *GL_APIENTRY GL_MapBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access); +ANGLE_EXPORT void GL_APIENTRY GL_MaterialfContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_MaterialfvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_MaterialxContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_MaterialxvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + const GLfixed *param); +ANGLE_EXPORT void GL_APIENTRY GL_MatrixIndexPointerOESContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_MatrixModeContextANGLE(GLeglContext ctx, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_MaxShaderCompilerThreadsKHRContextANGLE(GLeglContext ctx, + GLuint count); +ANGLE_EXPORT void GL_APIENTRY GL_MemoryBarrierContextANGLE(GLeglContext ctx, GLbitfield barriers); +ANGLE_EXPORT void GL_APIENTRY GL_MemoryBarrierByRegionContextANGLE(GLeglContext ctx, + GLbitfield barriers); +ANGLE_EXPORT void GL_APIENTRY GL_MemoryObjectParameterivEXTContextANGLE(GLeglContext ctx, + GLuint memoryObject, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_MinSampleShadingContextANGLE(GLeglContext ctx, GLfloat value); +ANGLE_EXPORT void GL_APIENTRY GL_MinSampleShadingOESContextANGLE(GLeglContext ctx, GLfloat value); +ANGLE_EXPORT void GL_APIENTRY GL_MultMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m); +ANGLE_EXPORT void GL_APIENTRY GL_MultMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiDrawElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *count, + GLenum type, + const void *const *indices, + GLsizei primcount, + const GLint *basevertex); +ANGLE_EXPORT void GL_APIENTRY GL_MultiTexCoord4fContextANGLE(GLeglContext ctx, + GLenum target, + GLfloat s, + GLfloat t, + GLfloat r, + GLfloat q); +ANGLE_EXPORT void GL_APIENTRY GL_MultiTexCoord4xContextANGLE(GLeglContext ctx, + GLenum texture, + GLfixed s, + GLfixed t, + GLfixed r, + GLfixed q); +ANGLE_EXPORT void GL_APIENTRY +GL_NamedBufferStorageExternalEXTContextANGLE(GLeglContext ctx, + GLuint buffer, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags); +ANGLE_EXPORT void GL_APIENTRY GL_Normal3fContextANGLE(GLeglContext ctx, + GLfloat nx, + GLfloat ny, + GLfloat nz); +ANGLE_EXPORT void GL_APIENTRY GL_Normal3xContextANGLE(GLeglContext ctx, + GLfixed nx, + GLfixed ny, + GLfixed nz); +ANGLE_EXPORT void GL_APIENTRY GL_NormalPointerContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectLabelContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectLabelKHRContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectPtrLabelContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_ObjectPtrLabelKHRContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei length, + const GLchar *label); +ANGLE_EXPORT void GL_APIENTRY GL_OrthofContextANGLE(GLeglContext ctx, + GLfloat l, + GLfloat r, + GLfloat b, + GLfloat t, + GLfloat n, + GLfloat f); +ANGLE_EXPORT void GL_APIENTRY GL_OrthoxContextANGLE(GLeglContext ctx, + GLfixed l, + GLfixed r, + GLfixed b, + GLfixed t, + GLfixed n, + GLfixed f); +ANGLE_EXPORT void GL_APIENTRY GL_PatchParameteriContextANGLE(GLeglContext ctx, + GLenum pname, + GLint value); +ANGLE_EXPORT void GL_APIENTRY GL_PatchParameteriEXTContextANGLE(GLeglContext ctx, + GLenum pname, + GLint value); +ANGLE_EXPORT void GL_APIENTRY GL_PauseTransformFeedbackContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_PixelStoreiContextANGLE(GLeglContext ctx, + GLenum pname, + GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterfContextANGLE(GLeglContext ctx, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterfvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterxContextANGLE(GLeglContext ctx, + GLenum pname, + GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_PointParameterxvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_PointSizeContextANGLE(GLeglContext ctx, GLfloat size); +ANGLE_EXPORT void GL_APIENTRY GL_PointSizePointerOESContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_PointSizexContextANGLE(GLeglContext ctx, GLfixed size); +ANGLE_EXPORT void GL_APIENTRY GL_PolygonOffsetContextANGLE(GLeglContext ctx, + GLfloat factor, + GLfloat units); +ANGLE_EXPORT void GL_APIENTRY GL_PolygonOffsetxContextANGLE(GLeglContext ctx, + GLfixed factor, + GLfixed units); +ANGLE_EXPORT void GL_APIENTRY GL_PopDebugGroupContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_PopDebugGroupKHRContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_PopGroupMarkerEXTContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_PopMatrixContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_PrimitiveBoundingBoxContextANGLE(GLeglContext ctx, + GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW); +ANGLE_EXPORT void GL_APIENTRY GL_PrimitiveBoundingBoxEXTContextANGLE(GLeglContext ctx, + GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramBinaryContextANGLE(GLeglContext ctx, + GLuint program, + GLenum binaryFormat, + const void *binary, + GLsizei length); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramBinaryOESContextANGLE(GLeglContext ctx, + GLuint program, + GLenum binaryFormat, + const void *binary, + GLint length); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramParameteriContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramParameteriEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform1uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform2uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform3uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2, + GLint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2, + GLint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniform4uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix2x4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix3x4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_ProgramUniformMatrix4x3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_PushDebugGroupContextANGLE(GLeglContext ctx, + GLenum source, + GLuint id, + GLsizei length, + const GLchar *message); +ANGLE_EXPORT void GL_APIENTRY GL_PushDebugGroupKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLuint id, + GLsizei length, + const GLchar *message); +ANGLE_EXPORT void GL_APIENTRY GL_PushGroupMarkerEXTContextANGLE(GLeglContext ctx, + GLsizei length, + const GLchar *marker); +ANGLE_EXPORT void GL_APIENTRY GL_PushMatrixContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_QueryCounterEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum target); +ANGLE_EXPORT GLbitfield GL_APIENTRY GL_QueryMatrixxOESContextANGLE(GLeglContext ctx, + GLfixed *mantissa, + GLint *exponent); +ANGLE_EXPORT void GL_APIENTRY GL_ReadBufferContextANGLE(GLeglContext ctx, GLenum src); +ANGLE_EXPORT void GL_APIENTRY GL_ReadPixelsContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_ReadnPixelsContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data); +ANGLE_EXPORT void GL_APIENTRY GL_ReadnPixelsEXTContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data); +ANGLE_EXPORT void GL_APIENTRY GL_ReleaseShaderCompilerContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorageContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorageMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY +GL_RenderbufferStorageMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY +GL_RenderbufferStorageMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_RenderbufferStorageOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_ResumeTransformFeedbackContextANGLE(GLeglContext ctx); +ANGLE_EXPORT void GL_APIENTRY +GL_RotatefContextANGLE(GLeglContext ctx, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +ANGLE_EXPORT void GL_APIENTRY +GL_RotatexContextANGLE(GLeglContext ctx, GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +ANGLE_EXPORT void GL_APIENTRY GL_SampleCoverageContextANGLE(GLeglContext ctx, + GLfloat value, + GLboolean invert); +ANGLE_EXPORT void GL_APIENTRY GL_SampleCoveragexContextANGLE(GLeglContext ctx, + GLclampx value, + GLboolean invert); +ANGLE_EXPORT void GL_APIENTRY GL_SampleMaskiContextANGLE(GLeglContext ctx, + GLuint maskNumber, + GLbitfield mask); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterfContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterfvContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLfloat *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameteriContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_ScalefContextANGLE(GLeglContext ctx, + GLfloat x, + GLfloat y, + GLfloat z); +ANGLE_EXPORT void GL_APIENTRY GL_ScalexContextANGLE(GLeglContext ctx, + GLfixed x, + GLfixed y, + GLfixed z); +ANGLE_EXPORT void GL_APIENTRY +GL_ScissorContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_SemaphoreParameterui64vEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum pname, + const GLuint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_SetFenceNVContextANGLE(GLeglContext ctx, + GLuint fence, + GLenum condition); +ANGLE_EXPORT void GL_APIENTRY GL_ShadeModelContextANGLE(GLeglContext ctx, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_ShaderBinaryContextANGLE(GLeglContext ctx, + GLsizei count, + const GLuint *shaders, + GLenum binaryformat, + const void *binary, + GLsizei length); +ANGLE_EXPORT void GL_APIENTRY GL_ShaderSourceContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei count, + const GLchar *const *string, + const GLint *length); +ANGLE_EXPORT void GL_APIENTRY GL_SignalSemaphoreEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *dstLayouts); +ANGLE_EXPORT void GL_APIENTRY GL_StencilFuncContextANGLE(GLeglContext ctx, + GLenum func, + GLint ref, + GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilFuncSeparateContextANGLE(GLeglContext ctx, + GLenum face, + GLenum func, + GLint ref, + GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilMaskContextANGLE(GLeglContext ctx, GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilMaskSeparateContextANGLE(GLeglContext ctx, + GLenum face, + GLuint mask); +ANGLE_EXPORT void GL_APIENTRY GL_StencilOpContextANGLE(GLeglContext ctx, + GLenum fail, + GLenum zfail, + GLenum zpass); +ANGLE_EXPORT void GL_APIENTRY GL_StencilOpSeparateContextANGLE(GLeglContext ctx, + GLenum face, + GLenum sfail, + GLenum dpfail, + GLenum dppass); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_TestFenceNVContextANGLE(GLeglContext ctx, GLuint fence); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_TexBufferRangeOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size); +ANGLE_EXPORT void GL_APIENTRY GL_TexCoordPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvfContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnviContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvxContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_TexEnvxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenfOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenfvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexGeniOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenivOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenxOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_TexGenxvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterfContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameteriContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterxContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed param); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfixed *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage1DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage2DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorage2DMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorage3DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorage3DMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorage3DMultisampleOESContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMem2DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorageMem2DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMem3DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorageMem3DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY +GL_TransformFeedbackVaryingsContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode); +ANGLE_EXPORT void GL_APIENTRY GL_TranslatefContextANGLE(GLeglContext ctx, + GLfloat x, + GLfloat y, + GLfloat z); +ANGLE_EXPORT void GL_APIENTRY GL_TranslatexContextANGLE(GLeglContext ctx, + GLfixed x, + GLfixed y, + GLfixed z); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1fContextANGLE(GLeglContext ctx, + GLint location, + GLfloat v0); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1iContextANGLE(GLeglContext ctx, GLint location, GLint v0); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1uiContextANGLE(GLeglContext ctx, + GLint location, + GLuint v0); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform1uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2fContextANGLE(GLeglContext ctx, + GLint location, + GLfloat v0, + GLfloat v1); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2iContextANGLE(GLeglContext ctx, + GLint location, + GLint v0, + GLint v1); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2uiContextANGLE(GLeglContext ctx, + GLint location, + GLuint v0, + GLuint v1); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform2uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_Uniform3fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY +GL_Uniform3iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY +GL_Uniform3uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1, GLuint v2); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform3uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4fContextANGLE(GLeglContext ctx, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY +GL_Uniform4iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4uiContextANGLE(GLeglContext ctx, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3); +ANGLE_EXPORT void GL_APIENTRY GL_Uniform4uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformBlockBindingContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLuint uniformBlockBinding); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix2x3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix2x4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix3x2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix3x4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix4x2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT void GL_APIENTRY GL_UniformMatrix4x3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_UnmapBufferContextANGLE(GLeglContext ctx, GLenum target); +ANGLE_EXPORT GLboolean GL_APIENTRY GL_UnmapBufferOESContextANGLE(GLeglContext ctx, GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_UseProgramContextANGLE(GLeglContext ctx, GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_UseProgramStagesContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLbitfield stages, + GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_UseProgramStagesEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLbitfield stages, + GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_ValidateProgramContextANGLE(GLeglContext ctx, GLuint program); +ANGLE_EXPORT void GL_APIENTRY GL_ValidateProgramPipelineContextANGLE(GLeglContext ctx, + GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_ValidateProgramPipelineEXTContextANGLE(GLeglContext ctx, + GLuint pipeline); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib1fContextANGLE(GLeglContext ctx, + GLuint index, + GLfloat x); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib1fvContextANGLE(GLeglContext ctx, + GLuint index, + const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib2fContextANGLE(GLeglContext ctx, + GLuint index, + GLfloat x, + GLfloat y); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib2fvContextANGLE(GLeglContext ctx, + GLuint index, + const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY +GL_VertexAttrib3fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y, GLfloat z); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib3fvContextANGLE(GLeglContext ctx, + GLuint index, + const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib4fContextANGLE(GLeglContext ctx, + GLuint index, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttrib4fvContextANGLE(GLeglContext ctx, + GLuint index, + const GLfloat *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribBindingContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLuint bindingindex); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribDivisorContextANGLE(GLeglContext ctx, + GLuint index, + GLuint divisor); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribDivisorANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLuint divisor); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribDivisorEXTContextANGLE(GLeglContext ctx, + GLuint index, + GLuint divisor); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribFormatContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLint size, + GLenum type, + GLboolean normalized, + GLuint relativeoffset); +ANGLE_EXPORT void GL_APIENTRY +GL_VertexAttribI4iContextANGLE(GLeglContext ctx, GLuint index, GLint x, GLint y, GLint z, GLint w); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribI4ivContextANGLE(GLeglContext ctx, + GLuint index, + const GLint *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribI4uiContextANGLE(GLeglContext ctx, + GLuint index, + GLuint x, + GLuint y, + GLuint z, + GLuint w); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribI4uivContextANGLE(GLeglContext ctx, + GLuint index, + const GLuint *v); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribIFormatContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLint size, + GLenum type, + GLuint relativeoffset); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribIPointerContextANGLE(GLeglContext ctx, + GLuint index, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_VertexAttribPointerContextANGLE(GLeglContext ctx, + GLuint index, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_VertexBindingDivisorContextANGLE(GLeglContext ctx, + GLuint bindingindex, + GLuint divisor); +ANGLE_EXPORT void GL_APIENTRY GL_VertexPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY +GL_ViewportContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height); +ANGLE_EXPORT void GL_APIENTRY GL_WaitSemaphoreEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *srcLayouts); +ANGLE_EXPORT void GL_APIENTRY GL_WaitSyncContextANGLE(GLeglContext ctx, + GLsync sync, + GLbitfield flags, + GLuint64 timeout); +ANGLE_EXPORT void GL_APIENTRY GL_WeightPointerOESContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer); +ANGLE_EXPORT void GL_APIENTRY GL_BindUniformLocationCHROMIUMContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_CoverageModulationCHROMIUMContextANGLE(GLeglContext ctx, + GLenum components); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); +ANGLE_EXPORT void GL_APIENTRY +GL_CopySubTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLint width, + GLint height, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedCopyTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLuint destId); +ANGLE_EXPORT void GL_APIENTRY GL_RequestExtensionANGLEContextANGLE(GLeglContext ctx, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_DisableExtensionANGLEContextANGLE(GLeglContext ctx, + const GLchar *name); +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleanvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLboolean *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFloatvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY +GL_GetFramebufferAttachmentParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegervRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetProgramivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetShaderivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint shader, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribPointervRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **pointer); +ANGLE_EXPORT void GL_APIENTRY GL_ReadPixelsRobustANGLEContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLsizei xoffset, + GLsizei yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_CompressedTexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferPointervRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_GetIntegeri_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInternalformativRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetVertexAttribIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetUniformuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY +GL_GetActiveUniformBlockivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetInteger64i_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint64 *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetBufferParameteri64vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLuint pname, + GLsizei bufSize, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLfloat *param); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetFramebufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY +GL_GetProgramInterfaceivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetBooleani_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLboolean *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetMultisamplefvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLfloat *val); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetPointervRobustANGLERobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params); +ANGLE_EXPORT void GL_APIENTRY GL_ReadnPixelsRobustANGLEContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *data); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetnUniformuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_TexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLint *param); +ANGLE_EXPORT void GL_APIENTRY GL_SamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLuint *param); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetSamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjecti64vRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetQueryObjectui64vRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint64 *params); +ANGLE_EXPORT void GL_APIENTRY GL_CopyTexture3DANGLEContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); +ANGLE_EXPORT void GL_APIENTRY GL_CopySubTexture3DANGLEContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLint z, + GLint width, + GLint height, + GLint depth, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorage2DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterivANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLint *params); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexLevelParameterfvANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLfloat *params); +ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawArraysANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiDrawArraysInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawElementsANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiDrawElementsInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawArraysInstancedBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei instanceCounts, + GLint baseVertex, + GLuint baseInstance); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiDrawArraysInstancedBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + const GLuint *baseInstances, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY +GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + const GLint *baseVertices, + const GLuint *baseInstances, + GLsizei drawcount); +ANGLE_EXPORT void GL_APIENTRY GL_GetMultisamplefvANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLfloat *val); +ANGLE_EXPORT void GL_APIENTRY GL_SampleMaskiANGLEContextANGLE(GLeglContext ctx, + GLuint maskNumber, + GLbitfield mask); +ANGLE_EXPORT void GL_APIENTRY GL_ProvokingVertexANGLEContextANGLE(GLeglContext ctx, GLenum mode); +ANGLE_EXPORT void GL_APIENTRY GL_LoseContextCHROMIUMContextANGLE(GLeglContext ctx, + GLenum current, + GLenum other); +ANGLE_EXPORT void GL_APIENTRY GL_TexImage2DExternalANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type); +ANGLE_EXPORT void GL_APIENTRY GL_InvalidateTextureANGLEContextANGLE(GLeglContext ctx, + GLenum target); +ANGLE_EXPORT void GL_APIENTRY GL_GetTexImageANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum format, + GLenum type, + void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_GetRenderbufferImageANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum format, + GLenum type, + void *pixels); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMemFlags2DANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorageMemFlags2DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); +ANGLE_EXPORT void GL_APIENTRY GL_TexStorageMemFlags3DANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); +ANGLE_EXPORT void GL_APIENTRY +GL_TexStorageMemFlags3DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags); +ANGLE_EXPORT void GL_APIENTRY GL_ImportMemoryZirconHandleANGLEContextANGLE(GLeglContext ctx, + GLuint memory, + GLuint64 size, + GLenum handleType, + GLuint handle); +ANGLE_EXPORT void GL_APIENTRY GL_ImportSemaphoreZirconHandleANGLEContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum handleType, + GLuint handle); +} // extern "C" + +#endif // LIBGLESV2_ENTRY_POINTS_GLES_EXT_AUTOGEN_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/global_state.cpp b/gfx/angle/checkout/src/libGLESv2/global_state.cpp new file mode 100644 index 0000000000..17070c787f --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/global_state.cpp @@ -0,0 +1,241 @@ +// +// Copyright 2014 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. +// + +// global_state.cpp : Implements functions for querying the thread-local GL and EGL state. + +#include "libGLESv2/global_state.h" + +#include "common/debug.h" +#include "common/platform.h" +#include "common/system_utils.h" +#include "libANGLE/ErrorStrings.h" +#include "libANGLE/Thread.h" +#include "libGLESv2/resource.h" + +#include <atomic> + +namespace egl +{ +namespace +{ +ANGLE_REQUIRE_CONSTANT_INIT std::atomic<angle::GlobalMutex *> g_Mutex(nullptr); +static_assert(std::is_trivially_destructible<decltype(g_Mutex)>::value, + "global mutex is not trivially destructible"); + +ANGLE_REQUIRE_CONSTANT_INIT gl::Context *g_LastContext(nullptr); +static_assert(std::is_trivially_destructible<decltype(g_LastContext)>::value, + "global last context is not trivially destructible"); + +void SetContextToAndroidOpenGLTLSSlot(gl::Context *value) +{ +#if defined(ANGLE_PLATFORM_ANDROID) + if (angle::gUseAndroidOpenGLTlsSlot) + { + ANGLE_ANDROID_GET_GL_TLS()[angle::kAndroidOpenGLTlsSlot] = static_cast<void *>(value); + } +#endif +} + +Thread *AllocateCurrentThread() +{ + { + // Global thread intentionally leaked + ANGLE_SCOPED_DISABLE_LSAN(); + gCurrentThread = new Thread(); + } + + // Initialize fast TLS slot + SetContextToAndroidOpenGLTLSSlot(nullptr); + gl::gCurrentValidContext = nullptr; + + return gCurrentThread; +} + +void AllocateMutex() +{ + if (g_Mutex == nullptr) + { + std::unique_ptr<angle::GlobalMutex> newMutex(new angle::GlobalMutex()); + angle::GlobalMutex *expected = nullptr; + if (g_Mutex.compare_exchange_strong(expected, newMutex.get())) + { + newMutex.release(); + } + } +} + +} // anonymous namespace + +thread_local Thread *gCurrentThread = nullptr; + +angle::GlobalMutex &GetGlobalMutex() +{ + AllocateMutex(); + return *g_Mutex; +} + +gl::Context *GetGlobalLastContext() +{ + return g_LastContext; +} + +void SetGlobalLastContext(gl::Context *context) +{ + g_LastContext = context; +} + +Thread *GetCurrentThread() +{ + Thread *current = gCurrentThread; + return (current ? current : AllocateCurrentThread()); +} + +void SetContextCurrent(Thread *thread, gl::Context *context) +{ + ASSERT(gCurrentThread); + gCurrentThread->setCurrent(context); + SetContextToAndroidOpenGLTLSSlot(context); + gl::gCurrentValidContext = context; +#if defined(ANGLE_FORCE_CONTEXT_CHECK_EVERY_CALL) + DirtyContextIfNeeded(context); +#endif +} + +} // namespace egl + +namespace gl +{ +void GenerateContextLostErrorOnContext(Context *context) +{ + if (context && context->isContextLost()) + { + context->validationError(GL_CONTEXT_LOST, err::kContextLost); + } +} + +void GenerateContextLostErrorOnCurrentGlobalContext() +{ + GenerateContextLostErrorOnContext(GetGlobalContext()); +} +} // namespace gl + +#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(ANGLE_STATIC) +namespace egl +{ + +namespace +{ +void DeallocateCurrentThread() +{ + SafeDelete(gCurrentThread); +} + +void DeallocateMutex() +{ + angle::GlobalMutex *mutex = g_Mutex.exchange(nullptr); + { + // Wait for the mutex to become released by other threads before deleting. + std::lock_guard<angle::GlobalMutex> lock(*mutex); + } + SafeDelete(mutex); +} + +bool InitializeProcess() +{ + EnsureDebugAllocated(); + AllocateMutex(); + return AllocateCurrentThread() != nullptr; +} + +void TerminateProcess() +{ + DeallocateDebug(); + DeallocateMutex(); + DeallocateCurrentThread(); +} + +} // anonymous namespace + +} // namespace egl + +namespace +{ +// The following WaitForDebugger code is based on SwiftShader. See: +// https://cs.chromium.org/chromium/src/third_party/swiftshader/src/Vulkan/main.cpp +# if defined(ANGLE_ENABLE_ASSERTS) && !defined(ANGLE_ENABLE_WINDOWS_UWP) +INT_PTR CALLBACK DebuggerWaitDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + RECT rect; + + switch (uMsg) + { + case WM_INITDIALOG: + ::GetWindowRect(GetDesktopWindow(), &rect); + ::SetWindowPos(hwnd, HWND_TOP, rect.right / 2, rect.bottom / 2, 0, 0, SWP_NOSIZE); + ::SetTimer(hwnd, 1, 100, NULL); + return TRUE; + case WM_COMMAND: + if (LOWORD(wParam) == IDCANCEL) + { + ::EndDialog(hwnd, 0); + } + break; + case WM_TIMER: + if (angle::IsDebuggerAttached()) + { + ::EndDialog(hwnd, 0); + } + } + + return FALSE; +} + +void WaitForDebugger(HINSTANCE instance) +{ + if (angle::IsDebuggerAttached()) + return; + + HRSRC dialog = ::FindResourceA(instance, MAKEINTRESOURCEA(IDD_DIALOG1), MAKEINTRESOURCEA(5)); + if (!dialog) + { + printf("Error finding wait for debugger dialog. Error %lu.\n", ::GetLastError()); + return; + } + + DLGTEMPLATE *dialogTemplate = reinterpret_cast<DLGTEMPLATE *>(::LoadResource(instance, dialog)); + ::DialogBoxIndirectA(instance, dialogTemplate, NULL, DebuggerWaitDialogProc); +} +# else +void WaitForDebugger(HINSTANCE instance) {} +# endif // defined(ANGLE_ENABLE_ASSERTS) && !defined(ANGLE_ENABLE_WINDOWS_UWP) +} // namespace + +extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID) +{ + switch (reason) + { + case DLL_PROCESS_ATTACH: + if (angle::GetEnvironmentVar("ANGLE_WAIT_FOR_DEBUGGER") == "1") + { + WaitForDebugger(instance); + } + return static_cast<BOOL>(egl::InitializeProcess()); + + case DLL_THREAD_ATTACH: + return static_cast<BOOL>(egl::AllocateCurrentThread() != nullptr); + + case DLL_THREAD_DETACH: + egl::DeallocateCurrentThread(); + break; + + case DLL_PROCESS_DETACH: + egl::TerminateProcess(); + break; + } + + return TRUE; +} +#endif // defined(ANGLE_PLATFORM_WINDOWS) && !defined(ANGLE_STATIC) diff --git a/gfx/angle/checkout/src/libGLESv2/global_state.h b/gfx/angle/checkout/src/libGLESv2/global_state.h new file mode 100644 index 0000000000..c1bf274633 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/global_state.h @@ -0,0 +1,172 @@ +// +// Copyright 2014 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. +// + +// global_state.h : Defines functions for querying the thread-local GL and EGL state. + +#ifndef LIBGLESV2_GLOBALSTATE_H_ +#define LIBGLESV2_GLOBALSTATE_H_ + +#include "libANGLE/Context.h" +#include "libANGLE/Debug.h" +#include "libANGLE/Thread.h" +#include "libANGLE/features.h" + +#include <mutex> + +namespace angle +{ +using GlobalMutex = std::recursive_mutex; + +// - TLS_SLOT_OPENGL and TLS_SLOT_OPENGL_API: These two aren't used by bionic +// itself, but allow the graphics code to access TLS directly rather than +// using the pthread API. +// +// Choose the TLS_SLOT_OPENGL TLS slot with the value that matches value in the header file in +// bionic(tls_defines.h) +constexpr size_t kAndroidOpenGLTlsSlot = 3; + +#if defined(ANGLE_PLATFORM_ANDROID) + +// The following ASM variant provides a much more performant store/retrieve interface +// compared to those provided by the pthread library. These have been derived from code +// in the bionic module of Android -> +// https://cs.android.com/android/platform/superproject/+/master:bionic/libc/platform/bionic/tls.h;l=30 + +# if defined(__aarch64__) +# define ANGLE_ANDROID_GET_GL_TLS() \ + ({ \ + void **__val; \ + __asm__("mrs %0, tpidr_el0" : "=r"(__val)); \ + __val; \ + }) +# elif defined(__arm__) +# define ANGLE_ANDROID_GET_GL_TLS() \ + ({ \ + void **__val; \ + __asm__("mrc p15, 0, %0, c13, c0, 3" : "=r"(__val)); \ + __val; \ + }) +# elif defined(__mips__) +// On mips32r1, this goes via a kernel illegal instruction trap that's +// optimized for v1 +# define ANGLE_ANDROID_GET_GL_TLS() \ + ({ \ + register void **__val asm("v1"); \ + __asm__( \ + ".set push\n" \ + ".set mips32r2\n" \ + "rdhwr %0,$29\n" \ + ".set pop\n" \ + : "=r"(__val)); \ + __val; \ + }) +# elif defined(__i386__) +# define ANGLE_ANDROID_GET_GL_TLS() \ + ({ \ + void **__val; \ + __asm__("movl %%gs:0, %0" : "=r"(__val)); \ + __val; \ + }) +# elif defined(__x86_64__) +# define ANGLE_ANDROID_GET_GL_TLS() \ + ({ \ + void **__val; \ + __asm__("mov %%fs:0, %0" : "=r"(__val)); \ + __val; \ + }) +# else +# error unsupported architecture +# endif + +#endif // ANGLE_PLATFORM_ANDROID +} // namespace angle + +namespace egl +{ +class Debug; +class Thread; + +extern thread_local Thread *gCurrentThread; + +angle::GlobalMutex &GetGlobalMutex(); +gl::Context *GetGlobalLastContext(); +void SetGlobalLastContext(gl::Context *context); +Thread *GetCurrentThread(); +Debug *GetDebug(); +void SetContextCurrent(Thread *thread, gl::Context *context); +} // namespace egl + +#define ANGLE_SCOPED_GLOBAL_LOCK() \ + std::lock_guard<angle::GlobalMutex> globalMutexLock(egl::GetGlobalMutex()) + +namespace gl +{ +ANGLE_INLINE Context *GetGlobalContext() +{ +#if defined(ANGLE_PLATFORM_ANDROID) + // TODO: Replace this branch with a compile time flag (http://anglebug.com/4764) + if (angle::gUseAndroidOpenGLTlsSlot) + { + return static_cast<gl::Context *>(ANGLE_ANDROID_GET_GL_TLS()[angle::kAndroidOpenGLTlsSlot]); + } +#endif + + ASSERT(egl::gCurrentThread); + return egl::gCurrentThread->getContext(); +} + +ANGLE_INLINE Context *GetValidGlobalContext() +{ +#if defined(ANGLE_PLATFORM_ANDROID) + // TODO: Replace this branch with a compile time flag (http://anglebug.com/4764) + if (angle::gUseAndroidOpenGLTlsSlot) + { + Context *context = + static_cast<gl::Context *>(ANGLE_ANDROID_GET_GL_TLS()[angle::kAndroidOpenGLTlsSlot]); + if (context && !context->isContextLost()) + { + return context; + } + } +#endif + + return gCurrentValidContext; +} + +// Generate a context lost error on the context if it is non-null and lost. +void GenerateContextLostErrorOnContext(Context *context); +void GenerateContextLostErrorOnCurrentGlobalContext(); + +#if defined(ANGLE_FORCE_CONTEXT_CHECK_EVERY_CALL) +// TODO(b/177574181): This should be handled in a backend-specific way. +// if previous context different from current context, dirty all state +static ANGLE_INLINE void DirtyContextIfNeeded(Context *context) +{ + if (context && context != egl::GetGlobalLastContext()) + { + context->dirtyAllState(); + SetGlobalLastContext(context); + } +} + +#endif + +ANGLE_INLINE std::unique_lock<angle::GlobalMutex> GetContextLock(Context *context) +{ +#if defined(ANGLE_FORCE_CONTEXT_CHECK_EVERY_CALL) + auto lock = std::unique_lock<angle::GlobalMutex>(egl::GetGlobalMutex()); + + DirtyContextIfNeeded(context); + return lock; +#else + return context->isShared() ? std::unique_lock<angle::GlobalMutex>(egl::GetGlobalMutex()) + : std::unique_lock<angle::GlobalMutex>(); +#endif +} + +} // namespace gl + +#endif // LIBGLESV2_GLOBALSTATE_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/libGLESv2.rc b/gfx/angle/checkout/src/libGLESv2/libGLESv2.rc new file mode 100644 index 0000000000..2d2c9f9681 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/libGLESv2.rc @@ -0,0 +1,137 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include <windows.h> +#include "../common/angle_version.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "#include ""../common/version.h""\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION ANGLE_MAJOR_VERSION,ANGLE_MINOR_VERSION,ANGLE_REVISION,0 + PRODUCTVERSION ANGLE_MAJOR_VERSION,ANGLE_MINOR_VERSION,ANGLE_REVISION,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "ANGLE libGLESv2 Dynamic Link Library" + VALUE "FileVersion", ANGLE_VERSION_STRING + VALUE "InternalName", "libGLESv2" + VALUE "LegalCopyright", "Copyright (C) 2015 Google Inc." + VALUE "OriginalFilename", "libGLESv2.dll" + VALUE "PrivateBuild", ANGLE_VERSION_STRING + VALUE "ProductName", "ANGLE libGLESv2 Dynamic Link Library" + VALUE "ProductVersion", ANGLE_VERSION_STRING + VALUE "Comments", "Build Date: " ANGLE_COMMIT_DATE + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG1 DIALOGEX 0, 0, 129, 47 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Waiting for debugger" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN +PUSHBUTTON "Cancel",IDCANCEL,72,26,50,14 +LTEXT "Attach a debugger or ESC to cancel",IDC_STATIC,7,7,115,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN +IDD_DIALOG1, DIALOG +BEGIN +LEFTMARGIN, 7 +RIGHTMARGIN, 122 +TOPMARGIN, 7 +BOTTOMMARGIN, 40 +END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.cpp new file mode 100644 index 0000000000..7ab49c7c5d --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.cpp @@ -0,0 +1,11930 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by generate_entry_points.py using data from gl.xml and gl_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. +// +// libGLESv2_autogen.cpp: Implements the exported OpenGL ES functions. + +#include "angle_gl.h" + +#include "libGLESv2/entry_points_gles_1_0_autogen.h" +#include "libGLESv2/entry_points_gles_2_0_autogen.h" +#include "libGLESv2/entry_points_gles_3_0_autogen.h" +#include "libGLESv2/entry_points_gles_3_1_autogen.h" +#include "libGLESv2/entry_points_gles_3_2_autogen.h" +#include "libGLESv2/entry_points_gles_ext_autogen.h" + +#include "common/event_tracer.h" + +extern "C" { + +// OpenGL ES 2.0 +void GL_APIENTRY glActiveTexture(GLenum texture) +{ + return GL_ActiveTexture(texture); +} + +void GL_APIENTRY glAttachShader(GLuint program, GLuint shader) +{ + return GL_AttachShader(program, shader); +} + +void GL_APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar *name) +{ + return GL_BindAttribLocation(program, index, name); +} + +void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer) +{ + return GL_BindBuffer(target, buffer); +} + +void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer) +{ + return GL_BindFramebuffer(target, framebuffer); +} + +void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer) +{ + return GL_BindRenderbuffer(target, renderbuffer); +} + +void GL_APIENTRY glBindTexture(GLenum target, GLuint texture) +{ + return GL_BindTexture(target, texture); +} + +void GL_APIENTRY glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + return GL_BlendColor(red, green, blue, alpha); +} + +void GL_APIENTRY glBlendEquation(GLenum mode) +{ + return GL_BlendEquation(mode); +} + +void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) +{ + return GL_BlendEquationSeparate(modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor) +{ + return GL_BlendFunc(sfactor, dfactor); +} + +void GL_APIENTRY glBlendFuncSeparate(GLenum sfactorRGB, + GLenum dfactorRGB, + GLenum sfactorAlpha, + GLenum dfactorAlpha) +{ + return GL_BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); +} + +void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage) +{ + return GL_BufferData(target, size, data, usage); +} + +void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data) +{ + return GL_BufferSubData(target, offset, size, data); +} + +GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target) +{ + return GL_CheckFramebufferStatus(target); +} + +void GL_APIENTRY glClear(GLbitfield mask) +{ + return GL_Clear(mask); +} + +void GL_APIENTRY glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + return GL_ClearColor(red, green, blue, alpha); +} + +void GL_APIENTRY glClearDepthf(GLfloat d) +{ + return GL_ClearDepthf(d); +} + +void GL_APIENTRY glClearStencil(GLint s) +{ + return GL_ClearStencil(s); +} + +void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +{ + return GL_ColorMask(red, green, blue, alpha); +} + +void GL_APIENTRY glCompileShader(GLuint shader) +{ + return GL_CompileShader(shader); +} + +void GL_APIENTRY glCompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, + data); +} + +void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, + imageSize, data); +} + +void GL_APIENTRY glCopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) +{ + return GL_CopyTexImage2D(target, level, internalformat, x, y, width, height, border); +} + +void GL_APIENTRY glCopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +} + +GLuint GL_APIENTRY glCreateProgram() +{ + return GL_CreateProgram(); +} + +GLuint GL_APIENTRY glCreateShader(GLenum type) +{ + return GL_CreateShader(type); +} + +void GL_APIENTRY glCullFace(GLenum mode) +{ + return GL_CullFace(mode); +} + +void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffers) +{ + return GL_DeleteBuffers(n, buffers); +} + +void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) +{ + return GL_DeleteFramebuffers(n, framebuffers); +} + +void GL_APIENTRY glDeleteProgram(GLuint program) +{ + return GL_DeleteProgram(program); +} + +void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) +{ + return GL_DeleteRenderbuffers(n, renderbuffers); +} + +void GL_APIENTRY glDeleteShader(GLuint shader) +{ + return GL_DeleteShader(shader); +} + +void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures) +{ + return GL_DeleteTextures(n, textures); +} + +void GL_APIENTRY glDepthFunc(GLenum func) +{ + return GL_DepthFunc(func); +} + +void GL_APIENTRY glDepthMask(GLboolean flag) +{ + return GL_DepthMask(flag); +} + +void GL_APIENTRY glDepthRangef(GLfloat n, GLfloat f) +{ + return GL_DepthRangef(n, f); +} + +void GL_APIENTRY glDetachShader(GLuint program, GLuint shader) +{ + return GL_DetachShader(program, shader); +} + +void GL_APIENTRY glDisable(GLenum cap) +{ + return GL_Disable(cap); +} + +void GL_APIENTRY glDisableVertexAttribArray(GLuint index) +{ + return GL_DisableVertexAttribArray(index); +} + +void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) +{ + return GL_DrawArrays(mode, first, count); +} + +void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) +{ + return GL_DrawElements(mode, count, type, indices); +} + +void GL_APIENTRY glEnable(GLenum cap) +{ + return GL_Enable(cap); +} + +void GL_APIENTRY glEnableVertexAttribArray(GLuint index) +{ + return GL_EnableVertexAttribArray(index); +} + +void GL_APIENTRY glFinish() +{ + return GL_Finish(); +} + +void GL_APIENTRY glFlush() +{ + return GL_Flush(); +} + +void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + return GL_FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +} + +void GL_APIENTRY glFramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + return GL_FramebufferTexture2D(target, attachment, textarget, texture, level); +} + +void GL_APIENTRY glFrontFace(GLenum mode) +{ + return GL_FrontFace(mode); +} + +void GL_APIENTRY glGenBuffers(GLsizei n, GLuint *buffers) +{ + return GL_GenBuffers(n, buffers); +} + +void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint *framebuffers) +{ + return GL_GenFramebuffers(n, framebuffers); +} + +void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint *renderbuffers) +{ + return GL_GenRenderbuffers(n, renderbuffers); +} + +void GL_APIENTRY glGenTextures(GLsizei n, GLuint *textures) +{ + return GL_GenTextures(n, textures); +} + +void GL_APIENTRY glGenerateMipmap(GLenum target) +{ + return GL_GenerateMipmap(target); +} + +void GL_APIENTRY glGetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + return GL_GetActiveAttrib(program, index, bufSize, length, size, type, name); +} + +void GL_APIENTRY glGetActiveUniform(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + return GL_GetActiveUniform(program, index, bufSize, length, size, type, name); +} + +void GL_APIENTRY glGetAttachedShaders(GLuint program, + GLsizei maxCount, + GLsizei *count, + GLuint *shaders) +{ + return GL_GetAttachedShaders(program, maxCount, count, shaders); +} + +GLint GL_APIENTRY glGetAttribLocation(GLuint program, const GLchar *name) +{ + return GL_GetAttribLocation(program, name); +} + +void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean *data) +{ + return GL_GetBooleanv(pname, data); +} + +void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetBufferParameteriv(target, pname, params); +} + +GLenum GL_APIENTRY glGetError() +{ + return GL_GetError(); +} + +void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat *data) +{ + return GL_GetFloatv(pname, data); +} + +void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + return GL_GetFramebufferAttachmentParameteriv(target, attachment, pname, params); +} + +void GL_APIENTRY glGetIntegerv(GLenum pname, GLint *data) +{ + return GL_GetIntegerv(pname, data); +} + +void GL_APIENTRY glGetProgramInfoLog(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetProgramInfoLog(program, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint *params) +{ + return GL_GetProgramiv(program, pname, params); +} + +void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetRenderbufferParameteriv(target, pname, params); +} + +void GL_APIENTRY glGetShaderInfoLog(GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetShaderInfoLog(shader, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint *range, + GLint *precision) +{ + return GL_GetShaderPrecisionFormat(shadertype, precisiontype, range, precision); +} + +void GL_APIENTRY glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) +{ + return GL_GetShaderSource(shader, bufSize, length, source); +} + +void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint *params) +{ + return GL_GetShaderiv(shader, pname, params); +} + +const GLubyte *GL_APIENTRY glGetString(GLenum name) +{ + return GL_GetString(name); +} + +void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) +{ + return GL_GetTexParameterfv(target, pname, params); +} + +void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetTexParameteriv(target, pname, params); +} + +GLint GL_APIENTRY glGetUniformLocation(GLuint program, const GLchar *name) +{ + return GL_GetUniformLocation(program, name); +} + +void GL_APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat *params) +{ + return GL_GetUniformfv(program, location, params); +} + +void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint *params) +{ + return GL_GetUniformiv(program, location, params); +} + +void GL_APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer) +{ + return GL_GetVertexAttribPointerv(index, pname, pointer); +} + +void GL_APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) +{ + return GL_GetVertexAttribfv(index, pname, params); +} + +void GL_APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params) +{ + return GL_GetVertexAttribiv(index, pname, params); +} + +void GL_APIENTRY glHint(GLenum target, GLenum mode) +{ + return GL_Hint(target, mode); +} + +GLboolean GL_APIENTRY glIsBuffer(GLuint buffer) +{ + return GL_IsBuffer(buffer); +} + +GLboolean GL_APIENTRY glIsEnabled(GLenum cap) +{ + return GL_IsEnabled(cap); +} + +GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer) +{ + return GL_IsFramebuffer(framebuffer); +} + +GLboolean GL_APIENTRY glIsProgram(GLuint program) +{ + return GL_IsProgram(program); +} + +GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer) +{ + return GL_IsRenderbuffer(renderbuffer); +} + +GLboolean GL_APIENTRY glIsShader(GLuint shader) +{ + return GL_IsShader(shader); +} + +GLboolean GL_APIENTRY glIsTexture(GLuint texture) +{ + return GL_IsTexture(texture); +} + +void GL_APIENTRY glLineWidth(GLfloat width) +{ + return GL_LineWidth(width); +} + +void GL_APIENTRY glLinkProgram(GLuint program) +{ + return GL_LinkProgram(program); +} + +void GL_APIENTRY glPixelStorei(GLenum pname, GLint param) +{ + return GL_PixelStorei(pname, param); +} + +void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units) +{ + return GL_PolygonOffset(factor, units); +} + +void GL_APIENTRY glReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void *pixels) +{ + return GL_ReadPixels(x, y, width, height, format, type, pixels); +} + +void GL_APIENTRY glReleaseShaderCompiler() +{ + return GL_ReleaseShaderCompiler(); +} + +void GL_APIENTRY glRenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorage(target, internalformat, width, height); +} + +void GL_APIENTRY glSampleCoverage(GLfloat value, GLboolean invert) +{ + return GL_SampleCoverage(value, invert); +} + +void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) +{ + return GL_Scissor(x, y, width, height); +} + +void GL_APIENTRY glShaderBinary(GLsizei count, + const GLuint *shaders, + GLenum binaryformat, + const void *binary, + GLsizei length) +{ + return GL_ShaderBinary(count, shaders, binaryformat, binary, length); +} + +void GL_APIENTRY glShaderSource(GLuint shader, + GLsizei count, + const GLchar *const *string, + const GLint *length) +{ + return GL_ShaderSource(shader, count, string, length); +} + +void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask) +{ + return GL_StencilFunc(func, ref, mask); +} + +void GL_APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) +{ + return GL_StencilFuncSeparate(face, func, ref, mask); +} + +void GL_APIENTRY glStencilMask(GLuint mask) +{ + return GL_StencilMask(mask); +} + +void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask) +{ + return GL_StencilMaskSeparate(face, mask); +} + +void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) +{ + return GL_StencilOp(fail, zfail, zpass); +} + +void GL_APIENTRY glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) +{ + return GL_StencilOpSeparate(face, sfail, dpfail, dppass); +} + +void GL_APIENTRY glTexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexImage2D(target, level, internalformat, width, height, border, format, type, + pixels); +} + +void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param) +{ + return GL_TexParameterf(target, pname, param); +} + +void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) +{ + return GL_TexParameterfv(target, pname, params); +} + +void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param) +{ + return GL_TexParameteri(target, pname, param); +} + +void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params) +{ + return GL_TexParameteriv(target, pname, params); +} + +void GL_APIENTRY glTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); +} + +void GL_APIENTRY glUniform1f(GLint location, GLfloat v0) +{ + return GL_Uniform1f(location, v0); +} + +void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat *value) +{ + return GL_Uniform1fv(location, count, value); +} + +void GL_APIENTRY glUniform1i(GLint location, GLint v0) +{ + return GL_Uniform1i(location, v0); +} + +void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint *value) +{ + return GL_Uniform1iv(location, count, value); +} + +void GL_APIENTRY glUniform2f(GLint location, GLfloat v0, GLfloat v1) +{ + return GL_Uniform2f(location, v0, v1); +} + +void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat *value) +{ + return GL_Uniform2fv(location, count, value); +} + +void GL_APIENTRY glUniform2i(GLint location, GLint v0, GLint v1) +{ + return GL_Uniform2i(location, v0, v1); +} + +void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint *value) +{ + return GL_Uniform2iv(location, count, value); +} + +void GL_APIENTRY glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + return GL_Uniform3f(location, v0, v1, v2); +} + +void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat *value) +{ + return GL_Uniform3fv(location, count, value); +} + +void GL_APIENTRY glUniform3i(GLint location, GLint v0, GLint v1, GLint v2) +{ + return GL_Uniform3i(location, v0, v1, v2); +} + +void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint *value) +{ + return GL_Uniform3iv(location, count, value); +} + +void GL_APIENTRY glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +{ + return GL_Uniform4f(location, v0, v1, v2, v3); +} + +void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat *value) +{ + return GL_Uniform4fv(location, count, value); +} + +void GL_APIENTRY glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + return GL_Uniform4i(location, v0, v1, v2, v3); +} + +void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint *value) +{ + return GL_Uniform4iv(location, count, value); +} + +void GL_APIENTRY glUniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix2fv(location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix3fv(location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix4fv(location, count, transpose, value); +} + +void GL_APIENTRY glUseProgram(GLuint program) +{ + return GL_UseProgram(program); +} + +void GL_APIENTRY glValidateProgram(GLuint program) +{ + return GL_ValidateProgram(program); +} + +void GL_APIENTRY glVertexAttrib1f(GLuint index, GLfloat x) +{ + return GL_VertexAttrib1f(index, x); +} + +void GL_APIENTRY glVertexAttrib1fv(GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib1fv(index, v); +} + +void GL_APIENTRY glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) +{ + return GL_VertexAttrib2f(index, x, y); +} + +void GL_APIENTRY glVertexAttrib2fv(GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib2fv(index, v); +} + +void GL_APIENTRY glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + return GL_VertexAttrib3f(index, x, y, z); +} + +void GL_APIENTRY glVertexAttrib3fv(GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib3fv(index, v); +} + +void GL_APIENTRY glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + return GL_VertexAttrib4f(index, x, y, z, w); +} + +void GL_APIENTRY glVertexAttrib4fv(GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib4fv(index, v); +} + +void GL_APIENTRY glVertexAttribPointer(GLuint index, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void *pointer) +{ + return GL_VertexAttribPointer(index, size, type, normalized, stride, pointer); +} + +void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height) +{ + return GL_Viewport(x, y, width, height); +} + +// OpenGL ES 3.0 +void GL_APIENTRY glBeginQuery(GLenum target, GLuint id) +{ + return GL_BeginQuery(target, id); +} + +void GL_APIENTRY glBeginTransformFeedback(GLenum primitiveMode) +{ + return GL_BeginTransformFeedback(primitiveMode); +} + +void GL_APIENTRY glBindBufferBase(GLenum target, GLuint index, GLuint buffer) +{ + return GL_BindBufferBase(target, index, buffer); +} + +void GL_APIENTRY +glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) +{ + return GL_BindBufferRange(target, index, buffer, offset, size); +} + +void GL_APIENTRY glBindSampler(GLuint unit, GLuint sampler) +{ + return GL_BindSampler(unit, sampler); +} + +void GL_APIENTRY glBindTransformFeedback(GLenum target, GLuint id) +{ + return GL_BindTransformFeedback(target, id); +} + +void GL_APIENTRY glBindVertexArray(GLuint array) +{ + return GL_BindVertexArray(array); +} + +void GL_APIENTRY glBlitFramebuffer(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + return GL_BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +} + +void GL_APIENTRY glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) +{ + return GL_ClearBufferfi(buffer, drawbuffer, depth, stencil); +} + +void GL_APIENTRY glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) +{ + return GL_ClearBufferfv(buffer, drawbuffer, value); +} + +void GL_APIENTRY glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) +{ + return GL_ClearBufferiv(buffer, drawbuffer, value); +} + +void GL_APIENTRY glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) +{ + return GL_ClearBufferuiv(buffer, drawbuffer, value); +} + +GLenum GL_APIENTRY glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) +{ + return GL_ClientWaitSync(sync, flags, timeout); +} + +void GL_APIENTRY glCompressedTexImage3D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexImage3D(target, level, internalformat, width, height, depth, border, + imageSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, + depth, format, imageSize, data); +} + +void GL_APIENTRY glCopyBufferSubData(GLenum readTarget, + GLenum writeTarget, + GLintptr readOffset, + GLintptr writeOffset, + GLsizeiptr size) +{ + return GL_CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); +} + +void GL_APIENTRY glCopyTexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + +void GL_APIENTRY glDeleteQueries(GLsizei n, const GLuint *ids) +{ + return GL_DeleteQueries(n, ids); +} + +void GL_APIENTRY glDeleteSamplers(GLsizei count, const GLuint *samplers) +{ + return GL_DeleteSamplers(count, samplers); +} + +void GL_APIENTRY glDeleteSync(GLsync sync) +{ + return GL_DeleteSync(sync); +} + +void GL_APIENTRY glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids) +{ + return GL_DeleteTransformFeedbacks(n, ids); +} + +void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays) +{ + return GL_DeleteVertexArrays(n, arrays); +} + +void GL_APIENTRY glDrawArraysInstanced(GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount) +{ + return GL_DrawArraysInstanced(mode, first, count, instancecount); +} + +void GL_APIENTRY glDrawBuffers(GLsizei n, const GLenum *bufs) +{ + return GL_DrawBuffers(n, bufs); +} + +void GL_APIENTRY glDrawElementsInstanced(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount) +{ + return GL_DrawElementsInstanced(mode, count, type, indices, instancecount); +} + +void GL_APIENTRY glDrawRangeElements(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices) +{ + return GL_DrawRangeElements(mode, start, end, count, type, indices); +} + +void GL_APIENTRY glEndQuery(GLenum target) +{ + return GL_EndQuery(target); +} + +void GL_APIENTRY glEndTransformFeedback() +{ + return GL_EndTransformFeedback(); +} + +GLsync GL_APIENTRY glFenceSync(GLenum condition, GLbitfield flags) +{ + return GL_FenceSync(condition, flags); +} + +void GL_APIENTRY glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) +{ + return GL_FlushMappedBufferRange(target, offset, length); +} + +void GL_APIENTRY glFramebufferTextureLayer(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint layer) +{ + return GL_FramebufferTextureLayer(target, attachment, texture, level, layer); +} + +void GL_APIENTRY glGenQueries(GLsizei n, GLuint *ids) +{ + return GL_GenQueries(n, ids); +} + +void GL_APIENTRY glGenSamplers(GLsizei count, GLuint *samplers) +{ + return GL_GenSamplers(count, samplers); +} + +void GL_APIENTRY glGenTransformFeedbacks(GLsizei n, GLuint *ids) +{ + return GL_GenTransformFeedbacks(n, ids); +} + +void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays) +{ + return GL_GenVertexArrays(n, arrays); +} + +void GL_APIENTRY glGetActiveUniformBlockName(GLuint program, + GLuint uniformBlockIndex, + GLsizei bufSize, + GLsizei *length, + GLchar *uniformBlockName) +{ + return GL_GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, + uniformBlockName); +} + +void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLint *params) +{ + return GL_GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); +} + +void GL_APIENTRY glGetActiveUniformsiv(GLuint program, + GLsizei uniformCount, + const GLuint *uniformIndices, + GLenum pname, + GLint *params) +{ + return GL_GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); +} + +void GL_APIENTRY glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params) +{ + return GL_GetBufferParameteri64v(target, pname, params); +} + +void GL_APIENTRY glGetBufferPointerv(GLenum target, GLenum pname, void **params) +{ + return GL_GetBufferPointerv(target, pname, params); +} + +GLint GL_APIENTRY glGetFragDataLocation(GLuint program, const GLchar *name) +{ + return GL_GetFragDataLocation(program, name); +} + +void GL_APIENTRY glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data) +{ + return GL_GetInteger64i_v(target, index, data); +} + +void GL_APIENTRY glGetInteger64v(GLenum pname, GLint64 *data) +{ + return GL_GetInteger64v(pname, data); +} + +void GL_APIENTRY glGetIntegeri_v(GLenum target, GLuint index, GLint *data) +{ + return GL_GetIntegeri_v(target, index, data); +} + +void GL_APIENTRY glGetInternalformativ(GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLint *params) +{ + return GL_GetInternalformativ(target, internalformat, pname, bufSize, params); +} + +void GL_APIENTRY glGetProgramBinary(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + return GL_GetProgramBinary(program, bufSize, length, binaryFormat, binary); +} + +void GL_APIENTRY glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) +{ + return GL_GetQueryObjectuiv(id, pname, params); +} + +void GL_APIENTRY glGetQueryiv(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetQueryiv(target, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) +{ + return GL_GetSamplerParameterfv(sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) +{ + return GL_GetSamplerParameteriv(sampler, pname, params); +} + +const GLubyte *GL_APIENTRY glGetStringi(GLenum name, GLuint index) +{ + return GL_GetStringi(name, index); +} + +void GL_APIENTRY +glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) +{ + return GL_GetSynciv(sync, pname, bufSize, length, values); +} + +void GL_APIENTRY glGetTransformFeedbackVarying(GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLsizei *size, + GLenum *type, + GLchar *name) +{ + return GL_GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); +} + +GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) +{ + return GL_GetUniformBlockIndex(program, uniformBlockName); +} + +void GL_APIENTRY glGetUniformIndices(GLuint program, + GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint *uniformIndices) +{ + return GL_GetUniformIndices(program, uniformCount, uniformNames, uniformIndices); +} + +void GL_APIENTRY glGetUniformuiv(GLuint program, GLint location, GLuint *params) +{ + return GL_GetUniformuiv(program, location, params); +} + +void GL_APIENTRY glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) +{ + return GL_GetVertexAttribIiv(index, pname, params); +} + +void GL_APIENTRY glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) +{ + return GL_GetVertexAttribIuiv(index, pname, params); +} + +void GL_APIENTRY glInvalidateFramebuffer(GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + return GL_InvalidateFramebuffer(target, numAttachments, attachments); +} + +void GL_APIENTRY glInvalidateSubFramebuffer(GLenum target, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); +} + +GLboolean GL_APIENTRY glIsQuery(GLuint id) +{ + return GL_IsQuery(id); +} + +GLboolean GL_APIENTRY glIsSampler(GLuint sampler) +{ + return GL_IsSampler(sampler); +} + +GLboolean GL_APIENTRY glIsSync(GLsync sync) +{ + return GL_IsSync(sync); +} + +GLboolean GL_APIENTRY glIsTransformFeedback(GLuint id) +{ + return GL_IsTransformFeedback(id); +} + +GLboolean GL_APIENTRY glIsVertexArray(GLuint array) +{ + return GL_IsVertexArray(array); +} + +void *GL_APIENTRY glMapBufferRange(GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + return GL_MapBufferRange(target, offset, length, access); +} + +void GL_APIENTRY glPauseTransformFeedback() +{ + return GL_PauseTransformFeedback(); +} + +void GL_APIENTRY glProgramBinary(GLuint program, + GLenum binaryFormat, + const void *binary, + GLsizei length) +{ + return GL_ProgramBinary(program, binaryFormat, binary, length); +} + +void GL_APIENTRY glProgramParameteri(GLuint program, GLenum pname, GLint value) +{ + return GL_ProgramParameteri(program, pname, value); +} + +void GL_APIENTRY glReadBuffer(GLenum src) +{ + return GL_ReadBuffer(src); +} + +void GL_APIENTRY glRenderbufferStorageMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageMultisample(target, samples, internalformat, width, height); +} + +void GL_APIENTRY glResumeTransformFeedback() +{ + return GL_ResumeTransformFeedback(); +} + +void GL_APIENTRY glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) +{ + return GL_SamplerParameterf(sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param) +{ + return GL_SamplerParameterfv(sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) +{ + return GL_SamplerParameteri(sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param) +{ + return GL_SamplerParameteriv(sampler, pname, param); +} + +void GL_APIENTRY glTexImage3D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexImage3D(target, level, internalformat, width, height, depth, border, format, type, + pixels); +} + +void GL_APIENTRY +glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +{ + return GL_TexStorage2D(target, levels, internalformat, width, height); +} + +void GL_APIENTRY glTexStorage3D(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + return GL_TexStorage3D(target, levels, internalformat, width, height, depth); +} + +void GL_APIENTRY glTexSubImage3D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, + type, pixels); +} + +void GL_APIENTRY glTransformFeedbackVaryings(GLuint program, + GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode) +{ + return GL_TransformFeedbackVaryings(program, count, varyings, bufferMode); +} + +void GL_APIENTRY glUniform1ui(GLint location, GLuint v0) +{ + return GL_Uniform1ui(location, v0); +} + +void GL_APIENTRY glUniform1uiv(GLint location, GLsizei count, const GLuint *value) +{ + return GL_Uniform1uiv(location, count, value); +} + +void GL_APIENTRY glUniform2ui(GLint location, GLuint v0, GLuint v1) +{ + return GL_Uniform2ui(location, v0, v1); +} + +void GL_APIENTRY glUniform2uiv(GLint location, GLsizei count, const GLuint *value) +{ + return GL_Uniform2uiv(location, count, value); +} + +void GL_APIENTRY glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + return GL_Uniform3ui(location, v0, v1, v2); +} + +void GL_APIENTRY glUniform3uiv(GLint location, GLsizei count, const GLuint *value) +{ + return GL_Uniform3uiv(location, count, value); +} + +void GL_APIENTRY glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +{ + return GL_Uniform4ui(location, v0, v1, v2, v3); +} + +void GL_APIENTRY glUniform4uiv(GLint location, GLsizei count, const GLuint *value) +{ + return GL_Uniform4uiv(location, count, value); +} + +void GL_APIENTRY glUniformBlockBinding(GLuint program, + GLuint uniformBlockIndex, + GLuint uniformBlockBinding) +{ + return GL_UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); +} + +void GL_APIENTRY glUniformMatrix2x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix2x3fv(location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix2x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix2x4fv(location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix3x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix3x2fv(location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix3x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix3x4fv(location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix4x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix4x2fv(location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix4x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix4x3fv(location, count, transpose, value); +} + +GLboolean GL_APIENTRY glUnmapBuffer(GLenum target) +{ + return GL_UnmapBuffer(target); +} + +void GL_APIENTRY glVertexAttribDivisor(GLuint index, GLuint divisor) +{ + return GL_VertexAttribDivisor(index, divisor); +} + +void GL_APIENTRY glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) +{ + return GL_VertexAttribI4i(index, x, y, z, w); +} + +void GL_APIENTRY glVertexAttribI4iv(GLuint index, const GLint *v) +{ + return GL_VertexAttribI4iv(index, v); +} + +void GL_APIENTRY glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) +{ + return GL_VertexAttribI4ui(index, x, y, z, w); +} + +void GL_APIENTRY glVertexAttribI4uiv(GLuint index, const GLuint *v) +{ + return GL_VertexAttribI4uiv(index, v); +} + +void GL_APIENTRY +glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + return GL_VertexAttribIPointer(index, size, type, stride, pointer); +} + +void GL_APIENTRY glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) +{ + return GL_WaitSync(sync, flags, timeout); +} + +// OpenGL ES 3.1 +void GL_APIENTRY glActiveShaderProgram(GLuint pipeline, GLuint program) +{ + return GL_ActiveShaderProgram(pipeline, program); +} + +void GL_APIENTRY glBindImageTexture(GLuint unit, + GLuint texture, + GLint level, + GLboolean layered, + GLint layer, + GLenum access, + GLenum format) +{ + return GL_BindImageTexture(unit, texture, level, layered, layer, access, format); +} + +void GL_APIENTRY glBindProgramPipeline(GLuint pipeline) +{ + return GL_BindProgramPipeline(pipeline); +} + +void GL_APIENTRY glBindVertexBuffer(GLuint bindingindex, + GLuint buffer, + GLintptr offset, + GLsizei stride) +{ + return GL_BindVertexBuffer(bindingindex, buffer, offset, stride); +} + +GLuint GL_APIENTRY glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings) +{ + return GL_CreateShaderProgramv(type, count, strings); +} + +void GL_APIENTRY glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines) +{ + return GL_DeleteProgramPipelines(n, pipelines); +} + +void GL_APIENTRY glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +{ + return GL_DispatchCompute(num_groups_x, num_groups_y, num_groups_z); +} + +void GL_APIENTRY glDispatchComputeIndirect(GLintptr indirect) +{ + return GL_DispatchComputeIndirect(indirect); +} + +void GL_APIENTRY glDrawArraysIndirect(GLenum mode, const void *indirect) +{ + return GL_DrawArraysIndirect(mode, indirect); +} + +void GL_APIENTRY glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) +{ + return GL_DrawElementsIndirect(mode, type, indirect); +} + +void GL_APIENTRY glFramebufferParameteri(GLenum target, GLenum pname, GLint param) +{ + return GL_FramebufferParameteri(target, pname, param); +} + +void GL_APIENTRY glGenProgramPipelines(GLsizei n, GLuint *pipelines) +{ + return GL_GenProgramPipelines(n, pipelines); +} + +void GL_APIENTRY glGetBooleani_v(GLenum target, GLuint index, GLboolean *data) +{ + return GL_GetBooleani_v(target, index, data); +} + +void GL_APIENTRY glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetFramebufferParameteriv(target, pname, params); +} + +void GL_APIENTRY glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val) +{ + return GL_GetMultisamplefv(pname, index, val); +} + +void GL_APIENTRY glGetProgramInterfaceiv(GLuint program, + GLenum programInterface, + GLenum pname, + GLint *params) +{ + return GL_GetProgramInterfaceiv(program, programInterface, pname, params); +} + +void GL_APIENTRY glGetProgramPipelineInfoLog(GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params) +{ + return GL_GetProgramPipelineiv(pipeline, pname, params); +} + +GLuint GL_APIENTRY glGetProgramResourceIndex(GLuint program, + GLenum programInterface, + const GLchar *name) +{ + return GL_GetProgramResourceIndex(program, programInterface, name); +} + +GLint GL_APIENTRY glGetProgramResourceLocation(GLuint program, + GLenum programInterface, + const GLchar *name) +{ + return GL_GetProgramResourceLocation(program, programInterface, name); +} + +void GL_APIENTRY glGetProgramResourceName(GLuint program, + GLenum programInterface, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLchar *name) +{ + return GL_GetProgramResourceName(program, programInterface, index, bufSize, length, name); +} + +void GL_APIENTRY glGetProgramResourceiv(GLuint program, + GLenum programInterface, + GLuint index, + GLsizei propCount, + const GLenum *props, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, + length, params); +} + +void GL_APIENTRY glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params) +{ + return GL_GetTexLevelParameterfv(target, level, pname, params); +} + +void GL_APIENTRY glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) +{ + return GL_GetTexLevelParameteriv(target, level, pname, params); +} + +GLboolean GL_APIENTRY glIsProgramPipeline(GLuint pipeline) +{ + return GL_IsProgramPipeline(pipeline); +} + +void GL_APIENTRY glMemoryBarrier(GLbitfield barriers) +{ + return GL_MemoryBarrier(barriers); +} + +void GL_APIENTRY glMemoryBarrierByRegion(GLbitfield barriers) +{ + return GL_MemoryBarrierByRegion(barriers); +} + +void GL_APIENTRY glProgramUniform1f(GLuint program, GLint location, GLfloat v0) +{ + return GL_ProgramUniform1f(program, location, v0); +} + +void GL_APIENTRY glProgramUniform1fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform1fv(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1i(GLuint program, GLint location, GLint v0) +{ + return GL_ProgramUniform1i(program, location, v0); +} + +void GL_APIENTRY glProgramUniform1iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform1iv(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1ui(GLuint program, GLint location, GLuint v0) +{ + return GL_ProgramUniform1ui(program, location, v0); +} + +void GL_APIENTRY glProgramUniform1uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform1uiv(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1) +{ + return GL_ProgramUniform2f(program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform2fv(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1) +{ + return GL_ProgramUniform2i(program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform2iv(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1) +{ + return GL_ProgramUniform2ui(program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform2uiv(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + return GL_ProgramUniform3f(program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform3fv(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) +{ + return GL_ProgramUniform3i(program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform3iv(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + return GL_ProgramUniform3ui(program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform3uiv(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +{ + return GL_ProgramUniform4f(program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4fv(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform4fv(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + return GL_ProgramUniform4i(program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4iv(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform4iv(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +{ + return GL_ProgramUniform4ui(program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4uiv(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform4uiv(program, location, count, value); +} + +void GL_APIENTRY glProgramUniformMatrix2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix2x3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x3fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix2x4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x4fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix3x2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x2fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix3x4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x4fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix4fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix4x2fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x2fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix4x3fv(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x3fv(program, location, count, transpose, value); +} + +void GL_APIENTRY glSampleMaski(GLuint maskNumber, GLbitfield mask) +{ + return GL_SampleMaski(maskNumber, mask); +} + +void GL_APIENTRY glTexStorage2DMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage2DMultisample(target, samples, internalformat, width, height, + fixedsamplelocations); +} + +void GL_APIENTRY glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) +{ + return GL_UseProgramStages(pipeline, stages, program); +} + +void GL_APIENTRY glValidateProgramPipeline(GLuint pipeline) +{ + return GL_ValidateProgramPipeline(pipeline); +} + +void GL_APIENTRY glVertexAttribBinding(GLuint attribindex, GLuint bindingindex) +{ + return GL_VertexAttribBinding(attribindex, bindingindex); +} + +void GL_APIENTRY glVertexAttribFormat(GLuint attribindex, + GLint size, + GLenum type, + GLboolean normalized, + GLuint relativeoffset) +{ + return GL_VertexAttribFormat(attribindex, size, type, normalized, relativeoffset); +} + +void GL_APIENTRY glVertexAttribIFormat(GLuint attribindex, + GLint size, + GLenum type, + GLuint relativeoffset) +{ + return GL_VertexAttribIFormat(attribindex, size, type, relativeoffset); +} + +void GL_APIENTRY glVertexBindingDivisor(GLuint bindingindex, GLuint divisor) +{ + return GL_VertexBindingDivisor(bindingindex, divisor); +} + +// OpenGL ES 3.2 +void GL_APIENTRY glBlendBarrier() +{ + return GL_BlendBarrier(); +} + +void GL_APIENTRY glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha) +{ + return GL_BlendEquationSeparatei(buf, modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendEquationi(GLuint buf, GLenum mode) +{ + return GL_BlendEquationi(buf, mode); +} + +void GL_APIENTRY +glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + return GL_BlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void GL_APIENTRY glBlendFunci(GLuint buf, GLenum src, GLenum dst) +{ + return GL_BlendFunci(buf, src, dst); +} + +void GL_APIENTRY glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ + return GL_ColorMaski(index, r, g, b, a); +} + +void GL_APIENTRY glCopyImageSubData(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + return GL_CopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, + dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); +} + +void GL_APIENTRY glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam) +{ + return GL_DebugMessageCallback(callback, userParam); +} + +void GL_APIENTRY glDebugMessageControl(GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + return GL_DebugMessageControl(source, type, severity, count, ids, enabled); +} + +void GL_APIENTRY glDebugMessageInsert(GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + return GL_DebugMessageInsert(source, type, id, severity, length, buf); +} + +void GL_APIENTRY glDisablei(GLenum target, GLuint index) +{ + return GL_Disablei(target, index); +} + +void GL_APIENTRY glDrawElementsBaseVertex(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawElementsBaseVertex(mode, count, type, indices, basevertex); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertex(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + return GL_DrawElementsInstancedBaseVertex(mode, count, type, indices, instancecount, + basevertex); +} + +void GL_APIENTRY glDrawRangeElementsBaseVertex(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); +} + +void GL_APIENTRY glEnablei(GLenum target, GLuint index) +{ + return GL_Enablei(target, index); +} + +void GL_APIENTRY glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level) +{ + return GL_FramebufferTexture(target, attachment, texture, level); +} + +GLuint GL_APIENTRY glGetDebugMessageLog(GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + return GL_GetDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths, + messageLog); +} + +GLenum GL_APIENTRY glGetGraphicsResetStatus() +{ + return GL_GetGraphicsResetStatus(); +} + +void GL_APIENTRY +glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + return GL_GetObjectLabel(identifier, name, bufSize, length, label); +} + +void GL_APIENTRY glGetObjectPtrLabel(const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + return GL_GetObjectPtrLabel(ptr, bufSize, length, label); +} + +void GL_APIENTRY glGetPointerv(GLenum pname, void **params) +{ + return GL_GetPointerv(pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params) +{ + return GL_GetSamplerParameterIiv(sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params) +{ + return GL_GetSamplerParameterIuiv(sampler, pname, params); +} + +void GL_APIENTRY glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetTexParameterIiv(target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params) +{ + return GL_GetTexParameterIuiv(target, pname, params); +} + +void GL_APIENTRY glGetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params) +{ + return GL_GetnUniformfv(program, location, bufSize, params); +} + +void GL_APIENTRY glGetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params) +{ + return GL_GetnUniformiv(program, location, bufSize, params); +} + +void GL_APIENTRY glGetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params) +{ + return GL_GetnUniformuiv(program, location, bufSize, params); +} + +GLboolean GL_APIENTRY glIsEnabledi(GLenum target, GLuint index) +{ + return GL_IsEnabledi(target, index); +} + +void GL_APIENTRY glMinSampleShading(GLfloat value) +{ + return GL_MinSampleShading(value); +} + +void GL_APIENTRY glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label) +{ + return GL_ObjectLabel(identifier, name, length, label); +} + +void GL_APIENTRY glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label) +{ + return GL_ObjectPtrLabel(ptr, length, label); +} + +void GL_APIENTRY glPatchParameteri(GLenum pname, GLint value) +{ + return GL_PatchParameteri(pname, value); +} + +void GL_APIENTRY glPopDebugGroup() +{ + return GL_PopDebugGroup(); +} + +void GL_APIENTRY glPrimitiveBoundingBox(GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + return GL_PrimitiveBoundingBox(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); +} + +void GL_APIENTRY glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message) +{ + return GL_PushDebugGroup(source, id, length, message); +} + +void GL_APIENTRY glReadnPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + return GL_ReadnPixels(x, y, width, height, format, type, bufSize, data); +} + +void GL_APIENTRY glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param) +{ + return GL_SamplerParameterIiv(sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param) +{ + return GL_SamplerParameterIuiv(sampler, pname, param); +} + +void GL_APIENTRY glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer) +{ + return GL_TexBuffer(target, internalformat, buffer); +} + +void GL_APIENTRY glTexBufferRange(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + return GL_TexBufferRange(target, internalformat, buffer, offset, size); +} + +void GL_APIENTRY glTexParameterIiv(GLenum target, GLenum pname, const GLint *params) +{ + return GL_TexParameterIiv(target, pname, params); +} + +void GL_APIENTRY glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params) +{ + return GL_TexParameterIuiv(target, pname, params); +} + +void GL_APIENTRY glTexStorage3DMultisample(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage3DMultisample(target, samples, internalformat, width, height, depth, + fixedsamplelocations); +} + +// OpenGL ES 1.0 +void GL_APIENTRY glAlphaFunc(GLenum func, GLfloat ref) +{ + return GL_AlphaFunc(func, ref); +} + +void GL_APIENTRY glAlphaFuncx(GLenum func, GLfixed ref) +{ + return GL_AlphaFuncx(func, ref); +} + +void GL_APIENTRY glClearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + return GL_ClearColorx(red, green, blue, alpha); +} + +void GL_APIENTRY glClearDepthx(GLfixed depth) +{ + return GL_ClearDepthx(depth); +} + +void GL_APIENTRY glClientActiveTexture(GLenum texture) +{ + return GL_ClientActiveTexture(texture); +} + +void GL_APIENTRY glClipPlanef(GLenum p, const GLfloat *eqn) +{ + return GL_ClipPlanef(p, eqn); +} + +void GL_APIENTRY glClipPlanex(GLenum plane, const GLfixed *equation) +{ + return GL_ClipPlanex(plane, equation); +} + +void GL_APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + return GL_Color4f(red, green, blue, alpha); +} + +void GL_APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ + return GL_Color4ub(red, green, blue, alpha); +} + +void GL_APIENTRY glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + return GL_Color4x(red, green, blue, alpha); +} + +void GL_APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + return GL_ColorPointer(size, type, stride, pointer); +} + +void GL_APIENTRY glDepthRangex(GLfixed n, GLfixed f) +{ + return GL_DepthRangex(n, f); +} + +void GL_APIENTRY glDisableClientState(GLenum array) +{ + return GL_DisableClientState(array); +} + +void GL_APIENTRY glEnableClientState(GLenum array) +{ + return GL_EnableClientState(array); +} + +void GL_APIENTRY glFogf(GLenum pname, GLfloat param) +{ + return GL_Fogf(pname, param); +} + +void GL_APIENTRY glFogfv(GLenum pname, const GLfloat *params) +{ + return GL_Fogfv(pname, params); +} + +void GL_APIENTRY glFogx(GLenum pname, GLfixed param) +{ + return GL_Fogx(pname, param); +} + +void GL_APIENTRY glFogxv(GLenum pname, const GLfixed *param) +{ + return GL_Fogxv(pname, param); +} + +void GL_APIENTRY glFrustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) +{ + return GL_Frustumf(l, r, b, t, n, f); +} + +void GL_APIENTRY glFrustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) +{ + return GL_Frustumx(l, r, b, t, n, f); +} + +void GL_APIENTRY glGetClipPlanef(GLenum plane, GLfloat *equation) +{ + return GL_GetClipPlanef(plane, equation); +} + +void GL_APIENTRY glGetClipPlanex(GLenum plane, GLfixed *equation) +{ + return GL_GetClipPlanex(plane, equation); +} + +void GL_APIENTRY glGetFixedv(GLenum pname, GLfixed *params) +{ + return GL_GetFixedv(pname, params); +} + +void GL_APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params) +{ + return GL_GetLightfv(light, pname, params); +} + +void GL_APIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed *params) +{ + return GL_GetLightxv(light, pname, params); +} + +void GL_APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) +{ + return GL_GetMaterialfv(face, pname, params); +} + +void GL_APIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) +{ + return GL_GetMaterialxv(face, pname, params); +} + +void GL_APIENTRY glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) +{ + return GL_GetTexEnvfv(target, pname, params); +} + +void GL_APIENTRY glGetTexEnviv(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetTexEnviv(target, pname, params); +} + +void GL_APIENTRY glGetTexEnvxv(GLenum target, GLenum pname, GLfixed *params) +{ + return GL_GetTexEnvxv(target, pname, params); +} + +void GL_APIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) +{ + return GL_GetTexParameterxv(target, pname, params); +} + +void GL_APIENTRY glLightModelf(GLenum pname, GLfloat param) +{ + return GL_LightModelf(pname, param); +} + +void GL_APIENTRY glLightModelfv(GLenum pname, const GLfloat *params) +{ + return GL_LightModelfv(pname, params); +} + +void GL_APIENTRY glLightModelx(GLenum pname, GLfixed param) +{ + return GL_LightModelx(pname, param); +} + +void GL_APIENTRY glLightModelxv(GLenum pname, const GLfixed *param) +{ + return GL_LightModelxv(pname, param); +} + +void GL_APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param) +{ + return GL_Lightf(light, pname, param); +} + +void GL_APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params) +{ + return GL_Lightfv(light, pname, params); +} + +void GL_APIENTRY glLightx(GLenum light, GLenum pname, GLfixed param) +{ + return GL_Lightx(light, pname, param); +} + +void GL_APIENTRY glLightxv(GLenum light, GLenum pname, const GLfixed *params) +{ + return GL_Lightxv(light, pname, params); +} + +void GL_APIENTRY glLineWidthx(GLfixed width) +{ + return GL_LineWidthx(width); +} + +void GL_APIENTRY glLoadIdentity() +{ + return GL_LoadIdentity(); +} + +void GL_APIENTRY glLoadMatrixf(const GLfloat *m) +{ + return GL_LoadMatrixf(m); +} + +void GL_APIENTRY glLoadMatrixx(const GLfixed *m) +{ + return GL_LoadMatrixx(m); +} + +void GL_APIENTRY glLogicOp(GLenum opcode) +{ + return GL_LogicOp(opcode); +} + +void GL_APIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param) +{ + return GL_Materialf(face, pname, param); +} + +void GL_APIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) +{ + return GL_Materialfv(face, pname, params); +} + +void GL_APIENTRY glMaterialx(GLenum face, GLenum pname, GLfixed param) +{ + return GL_Materialx(face, pname, param); +} + +void GL_APIENTRY glMaterialxv(GLenum face, GLenum pname, const GLfixed *param) +{ + return GL_Materialxv(face, pname, param); +} + +void GL_APIENTRY glMatrixMode(GLenum mode) +{ + return GL_MatrixMode(mode); +} + +void GL_APIENTRY glMultMatrixf(const GLfloat *m) +{ + return GL_MultMatrixf(m); +} + +void GL_APIENTRY glMultMatrixx(const GLfixed *m) +{ + return GL_MultMatrixx(m); +} + +void GL_APIENTRY glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + return GL_MultiTexCoord4f(target, s, t, r, q); +} + +void GL_APIENTRY glMultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +{ + return GL_MultiTexCoord4x(texture, s, t, r, q); +} + +void GL_APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) +{ + return GL_Normal3f(nx, ny, nz); +} + +void GL_APIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) +{ + return GL_Normal3x(nx, ny, nz); +} + +void GL_APIENTRY glNormalPointer(GLenum type, GLsizei stride, const void *pointer) +{ + return GL_NormalPointer(type, stride, pointer); +} + +void GL_APIENTRY glOrthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) +{ + return GL_Orthof(l, r, b, t, n, f); +} + +void GL_APIENTRY glOrthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) +{ + return GL_Orthox(l, r, b, t, n, f); +} + +void GL_APIENTRY glPointParameterf(GLenum pname, GLfloat param) +{ + return GL_PointParameterf(pname, param); +} + +void GL_APIENTRY glPointParameterfv(GLenum pname, const GLfloat *params) +{ + return GL_PointParameterfv(pname, params); +} + +void GL_APIENTRY glPointParameterx(GLenum pname, GLfixed param) +{ + return GL_PointParameterx(pname, param); +} + +void GL_APIENTRY glPointParameterxv(GLenum pname, const GLfixed *params) +{ + return GL_PointParameterxv(pname, params); +} + +void GL_APIENTRY glPointSize(GLfloat size) +{ + return GL_PointSize(size); +} + +void GL_APIENTRY glPointSizex(GLfixed size) +{ + return GL_PointSizex(size); +} + +void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units) +{ + return GL_PolygonOffsetx(factor, units); +} + +void GL_APIENTRY glPopMatrix() +{ + return GL_PopMatrix(); +} + +void GL_APIENTRY glPushMatrix() +{ + return GL_PushMatrix(); +} + +void GL_APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +{ + return GL_Rotatef(angle, x, y, z); +} + +void GL_APIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +{ + return GL_Rotatex(angle, x, y, z); +} + +void GL_APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert) +{ + return GL_SampleCoveragex(value, invert); +} + +void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z) +{ + return GL_Scalef(x, y, z); +} + +void GL_APIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z) +{ + return GL_Scalex(x, y, z); +} + +void GL_APIENTRY glShadeModel(GLenum mode) +{ + return GL_ShadeModel(mode); +} + +void GL_APIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + return GL_TexCoordPointer(size, type, stride, pointer); +} + +void GL_APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param) +{ + return GL_TexEnvf(target, pname, param); +} + +void GL_APIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) +{ + return GL_TexEnvfv(target, pname, params); +} + +void GL_APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param) +{ + return GL_TexEnvi(target, pname, param); +} + +void GL_APIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint *params) +{ + return GL_TexEnviv(target, pname, params); +} + +void GL_APIENTRY glTexEnvx(GLenum target, GLenum pname, GLfixed param) +{ + return GL_TexEnvx(target, pname, param); +} + +void GL_APIENTRY glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) +{ + return GL_TexEnvxv(target, pname, params); +} + +void GL_APIENTRY glTexParameterx(GLenum target, GLenum pname, GLfixed param) +{ + return GL_TexParameterx(target, pname, param); +} + +void GL_APIENTRY glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) +{ + return GL_TexParameterxv(target, pname, params); +} + +void GL_APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z) +{ + return GL_Translatef(x, y, z); +} + +void GL_APIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z) +{ + return GL_Translatex(x, y, z); +} + +void GL_APIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + return GL_VertexPointer(size, type, stride, pointer); +} + +// GL_ANGLE_base_vertex_base_instance +void GL_APIENTRY glDrawArraysInstancedBaseInstanceANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance) +{ + return GL_DrawArraysInstancedBaseInstanceANGLE(mode, first, count, instanceCount, baseInstance); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei instanceCounts, + GLint baseVertex, + GLuint baseInstance) +{ + return GL_DrawElementsInstancedBaseVertexBaseInstanceANGLE( + mode, count, type, indices, instanceCounts, baseVertex, baseInstance); +} + +void GL_APIENTRY glMultiDrawArraysInstancedBaseInstanceANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + const GLuint *baseInstances, + GLsizei drawcount) +{ + return GL_MultiDrawArraysInstancedBaseInstanceANGLE(mode, firsts, counts, instanceCounts, + baseInstances, drawcount); +} + +void GL_APIENTRY +glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + const GLint *baseVertices, + const GLuint *baseInstances, + GLsizei drawcount) +{ + return GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE( + mode, counts, type, indices, instanceCounts, baseVertices, baseInstances, drawcount); +} + +// GL_ANGLE_copy_texture_3d +void GL_APIENTRY glCopyTexture3DANGLE(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopyTexture3DANGLE(sourceId, sourceLevel, destTarget, destId, destLevel, + internalFormat, destType, unpackFlipY, unpackPremultiplyAlpha, + unpackUnmultiplyAlpha); +} + +void GL_APIENTRY glCopySubTexture3DANGLE(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLint z, + GLint width, + GLint height, + GLint depth, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopySubTexture3DANGLE(sourceId, sourceLevel, destTarget, destId, destLevel, xoffset, + yoffset, zoffset, x, y, z, width, height, depth, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); +} + +// GL_ANGLE_framebuffer_blit +void GL_APIENTRY glBlitFramebufferANGLE(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + return GL_BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); +} + +// GL_ANGLE_framebuffer_multisample +void GL_APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height); +} + +// GL_ANGLE_get_image +void GL_APIENTRY +glGetTexImageANGLE(GLenum target, GLint level, GLenum format, GLenum type, void *pixels) +{ + return GL_GetTexImageANGLE(target, level, format, type, pixels); +} + +void GL_APIENTRY glGetRenderbufferImageANGLE(GLenum target, + GLenum format, + GLenum type, + void *pixels) +{ + return GL_GetRenderbufferImageANGLE(target, format, type, pixels); +} + +// GL_ANGLE_get_tex_level_parameter +void GL_APIENTRY glGetTexLevelParameterivANGLE(GLenum target, + GLint level, + GLenum pname, + GLint *params) +{ + return GL_GetTexLevelParameterivANGLE(target, level, pname, params); +} + +void GL_APIENTRY glGetTexLevelParameterfvANGLE(GLenum target, + GLint level, + GLenum pname, + GLfloat *params) +{ + return GL_GetTexLevelParameterfvANGLE(target, level, pname, params); +} + +// GL_ANGLE_instanced_arrays +void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) +{ + return GL_DrawArraysInstancedANGLE(mode, first, count, primcount); +} + +void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + return GL_DrawElementsInstancedANGLE(mode, count, type, indices, primcount); +} + +void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) +{ + return GL_VertexAttribDivisorANGLE(index, divisor); +} + +// GL_ANGLE_memory_object_flags +void GL_APIENTRY glTexStorageMemFlags2DANGLE(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags2DANGLE(target, levels, internalFormat, width, height, memory, + offset, createFlags, usageFlags); +} + +void GL_APIENTRY glTexStorageMemFlags2DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags2DMultisampleANGLE(target, samples, internalFormat, width, height, + fixedSampleLocations, memory, offset, + createFlags, usageFlags); +} + +void GL_APIENTRY glTexStorageMemFlags3DANGLE(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags3DANGLE(target, levels, internalFormat, width, height, depth, + memory, offset, createFlags, usageFlags); +} + +void GL_APIENTRY glTexStorageMemFlags3DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags3DMultisampleANGLE(target, samples, internalFormat, width, height, + depth, fixedSampleLocations, memory, offset, + createFlags, usageFlags); +} + +// GL_ANGLE_memory_object_fuchsia +void GL_APIENTRY glImportMemoryZirconHandleANGLE(GLuint memory, + GLuint64 size, + GLenum handleType, + GLuint handle) +{ + return GL_ImportMemoryZirconHandleANGLE(memory, size, handleType, handle); +} + +// GL_ANGLE_multi_draw +void GL_APIENTRY glMultiDrawArraysANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + GLsizei drawcount) +{ + return GL_MultiDrawArraysANGLE(mode, firsts, counts, drawcount); +} + +void GL_APIENTRY glMultiDrawArraysInstancedANGLE(GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + return GL_MultiDrawArraysInstancedANGLE(mode, firsts, counts, instanceCounts, drawcount); +} + +void GL_APIENTRY glMultiDrawElementsANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + GLsizei drawcount) +{ + return GL_MultiDrawElementsANGLE(mode, counts, type, indices, drawcount); +} + +void GL_APIENTRY glMultiDrawElementsInstancedANGLE(GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + return GL_MultiDrawElementsInstancedANGLE(mode, counts, type, indices, instanceCounts, + drawcount); +} + +// GL_ANGLE_program_binary + +// GL_ANGLE_provoking_vertex +void GL_APIENTRY glProvokingVertexANGLE(GLenum mode) +{ + return GL_ProvokingVertexANGLE(mode); +} + +// GL_ANGLE_request_extension +void GL_APIENTRY glRequestExtensionANGLE(const GLchar *name) +{ + return GL_RequestExtensionANGLE(name); +} + +void GL_APIENTRY glDisableExtensionANGLE(const GLchar *name) +{ + return GL_DisableExtensionANGLE(name); +} + +// GL_ANGLE_robust_client_memory +void GL_APIENTRY glGetBooleanvRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLboolean *params) +{ + return GL_GetBooleanvRobustANGLE(pname, bufSize, length, params); +} + +void GL_APIENTRY glGetBufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetBufferParameterivRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetFloatvRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetFloatvRobustANGLE(pname, bufSize, length, params); +} + +void GL_APIENTRY glGetFramebufferAttachmentParameterivRobustANGLE(GLenum target, + GLenum attachment, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetFramebufferAttachmentParameterivRobustANGLE(target, attachment, pname, bufSize, + length, params); +} + +void GL_APIENTRY glGetIntegervRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + return GL_GetIntegervRobustANGLE(pname, bufSize, length, data); +} + +void GL_APIENTRY glGetProgramivRobustANGLE(GLuint program, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetProgramivRobustANGLE(program, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetRenderbufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetRenderbufferParameterivRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetShaderivRobustANGLE(GLuint shader, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetShaderivRobustANGLE(shader, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetTexParameterfvRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetTexParameterfvRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetTexParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetTexParameterivRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetUniformfvRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetUniformfvRobustANGLE(program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetUniformivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetUniformivRobustANGLE(program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribfvRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetVertexAttribfvRobustANGLE(index, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetVertexAttribivRobustANGLE(index, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribPointervRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **pointer) +{ + return GL_GetVertexAttribPointervRobustANGLE(index, pname, bufSize, length, pointer); +} + +void GL_APIENTRY glReadPixelsRobustANGLE(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *pixels) +{ + return GL_ReadPixelsRobustANGLE(x, y, width, height, format, type, bufSize, length, columns, + rows, pixels); +} + +void GL_APIENTRY glTexImage2DRobustANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexImage2DRobustANGLE(target, level, internalformat, width, height, border, format, + type, bufSize, pixels); +} + +void GL_APIENTRY glTexParameterfvRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLfloat *params) +{ + return GL_TexParameterfvRobustANGLE(target, pname, bufSize, params); +} + +void GL_APIENTRY glTexParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + return GL_TexParameterivRobustANGLE(target, pname, bufSize, params); +} + +void GL_APIENTRY glTexSubImage2DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexSubImage2DRobustANGLE(target, level, xoffset, yoffset, width, height, format, type, + bufSize, pixels); +} + +void GL_APIENTRY glTexImage3DRobustANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexImage3DRobustANGLE(target, level, internalformat, width, height, depth, border, + format, type, bufSize, pixels); +} + +void GL_APIENTRY glTexSubImage3DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexSubImage3DRobustANGLE(target, level, xoffset, yoffset, zoffset, width, height, + depth, format, type, bufSize, pixels); +} + +void GL_APIENTRY glCompressedTexImage2DRobustANGLE(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexImage2DRobustANGLE(target, level, internalformat, width, height, border, + imageSize, dataSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage2DRobustANGLE(GLenum target, + GLint level, + GLsizei xoffset, + GLsizei yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexSubImage2DRobustANGLE(target, level, xoffset, yoffset, width, height, + format, imageSize, dataSize, data); +} + +void GL_APIENTRY glCompressedTexImage3DRobustANGLE(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexImage3DRobustANGLE(target, level, internalformat, width, height, depth, + border, imageSize, dataSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage3DRobustANGLE(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexSubImage3DRobustANGLE(target, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, dataSize, data); +} + +void GL_APIENTRY glGetQueryivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetQueryivRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetQueryObjectuivRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetQueryObjectuivRobustANGLE(id, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetBufferPointervRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + return GL_GetBufferPointervRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetIntegeri_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + return GL_GetIntegeri_vRobustANGLE(target, index, bufSize, length, data); +} + +void GL_APIENTRY glGetInternalformativRobustANGLE(GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetInternalformativRobustANGLE(target, internalformat, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetVertexAttribIivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetVertexAttribIivRobustANGLE(index, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribIuivRobustANGLE(GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetVertexAttribIuivRobustANGLE(index, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetUniformuivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetUniformuivRobustANGLE(program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetActiveUniformBlockivRobustANGLE(GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetActiveUniformBlockivRobustANGLE(program, uniformBlockIndex, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetInteger64vRobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + return GL_GetInteger64vRobustANGLE(pname, bufSize, length, data); +} + +void GL_APIENTRY glGetInteger64i_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + return GL_GetInteger64i_vRobustANGLE(target, index, bufSize, length, data); +} + +void GL_APIENTRY glGetBufferParameteri64vRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + return GL_GetBufferParameteri64vRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glSamplerParameterivRobustANGLE(GLuint sampler, + GLuint pname, + GLsizei bufSize, + const GLint *param) +{ + return GL_SamplerParameterivRobustANGLE(sampler, pname, bufSize, param); +} + +void GL_APIENTRY glSamplerParameterfvRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLfloat *param) +{ + return GL_SamplerParameterfvRobustANGLE(sampler, pname, bufSize, param); +} + +void GL_APIENTRY glGetSamplerParameterivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetSamplerParameterivRobustANGLE(sampler, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetSamplerParameterfvRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetSamplerParameterfvRobustANGLE(sampler, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetFramebufferParameterivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetFramebufferParameterivRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetProgramInterfaceivRobustANGLE(GLuint program, + GLenum programInterface, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetProgramInterfaceivRobustANGLE(program, programInterface, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetBooleani_vRobustANGLE(GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLboolean *data) +{ + return GL_GetBooleani_vRobustANGLE(target, index, bufSize, length, data); +} + +void GL_APIENTRY glGetMultisamplefvRobustANGLE(GLenum pname, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLfloat *val) +{ + return GL_GetMultisamplefvRobustANGLE(pname, index, bufSize, length, val); +} + +void GL_APIENTRY glGetTexLevelParameterivRobustANGLE(GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetTexLevelParameterivRobustANGLE(target, level, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetTexLevelParameterfvRobustANGLE(GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetTexLevelParameterfvRobustANGLE(target, level, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetPointervRobustANGLERobustANGLE(GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + return GL_GetPointervRobustANGLERobustANGLE(pname, bufSize, length, params); +} + +void GL_APIENTRY glReadnPixelsRobustANGLE(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *data) +{ + return GL_ReadnPixelsRobustANGLE(x, y, width, height, format, type, bufSize, length, columns, + rows, data); +} + +void GL_APIENTRY glGetnUniformfvRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetnUniformfvRobustANGLE(program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetnUniformivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetnUniformivRobustANGLE(program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetnUniformuivRobustANGLE(GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetnUniformuivRobustANGLE(program, location, bufSize, length, params); +} + +void GL_APIENTRY glTexParameterIivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + return GL_TexParameterIivRobustANGLE(target, pname, bufSize, params); +} + +void GL_APIENTRY glTexParameterIuivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + const GLuint *params) +{ + return GL_TexParameterIuivRobustANGLE(target, pname, bufSize, params); +} + +void GL_APIENTRY glGetTexParameterIivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetTexParameterIivRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetTexParameterIuivRobustANGLE(GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetTexParameterIuivRobustANGLE(target, pname, bufSize, length, params); +} + +void GL_APIENTRY glSamplerParameterIivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLint *param) +{ + return GL_SamplerParameterIivRobustANGLE(sampler, pname, bufSize, param); +} + +void GL_APIENTRY glSamplerParameterIuivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLuint *param) +{ + return GL_SamplerParameterIuivRobustANGLE(sampler, pname, bufSize, param); +} + +void GL_APIENTRY glGetSamplerParameterIivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetSamplerParameterIivRobustANGLE(sampler, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetSamplerParameterIuivRobustANGLE(GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetSamplerParameterIuivRobustANGLE(sampler, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetQueryObjectivRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetQueryObjectivRobustANGLE(id, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetQueryObjecti64vRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + return GL_GetQueryObjecti64vRobustANGLE(id, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetQueryObjectui64vRobustANGLE(GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint64 *params) +{ + return GL_GetQueryObjectui64vRobustANGLE(id, pname, bufSize, length, params); +} + +// GL_ANGLE_semaphore_fuchsia +void GL_APIENTRY glImportSemaphoreZirconHandleANGLE(GLuint semaphore, + GLenum handleType, + GLuint handle) +{ + return GL_ImportSemaphoreZirconHandleANGLE(semaphore, handleType, handle); +} + +// GL_ANGLE_texture_external_update +void GL_APIENTRY glTexImage2DExternalANGLE(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type) +{ + return GL_TexImage2DExternalANGLE(target, level, internalformat, width, height, border, format, + type); +} + +void GL_APIENTRY glInvalidateTextureANGLE(GLenum target) +{ + return GL_InvalidateTextureANGLE(target); +} + +// GL_ANGLE_texture_multisample +void GL_APIENTRY glTexStorage2DMultisampleANGLE(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage2DMultisampleANGLE(target, samples, internalformat, width, height, + fixedsamplelocations); +} + +void GL_APIENTRY glGetMultisamplefvANGLE(GLenum pname, GLuint index, GLfloat *val) +{ + return GL_GetMultisamplefvANGLE(pname, index, val); +} + +void GL_APIENTRY glSampleMaskiANGLE(GLuint maskNumber, GLbitfield mask) +{ + return GL_SampleMaskiANGLE(maskNumber, mask); +} + +// GL_ANGLE_translated_shader_source +void GL_APIENTRY glGetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei *length, + GLchar *source) +{ + return GL_GetTranslatedShaderSourceANGLE(shader, bufsize, length, source); +} + +// GL_CHROMIUM_bind_uniform_location +void GL_APIENTRY glBindUniformLocationCHROMIUM(GLuint program, GLint location, const GLchar *name) +{ + return GL_BindUniformLocationCHROMIUM(program, location, name); +} + +// GL_CHROMIUM_copy_compressed_texture +void GL_APIENTRY glCompressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId) +{ + return GL_CompressedCopyTextureCHROMIUM(sourceId, destId); +} + +// GL_CHROMIUM_copy_texture +void GL_APIENTRY glCopyTextureCHROMIUM(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopyTextureCHROMIUM(sourceId, sourceLevel, destTarget, destId, destLevel, + internalFormat, destType, unpackFlipY, unpackPremultiplyAlpha, + unpackUnmultiplyAlpha); +} + +void GL_APIENTRY glCopySubTextureCHROMIUM(GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLint width, + GLint height, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopySubTextureCHROMIUM(sourceId, sourceLevel, destTarget, destId, destLevel, xoffset, + yoffset, x, y, width, height, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); +} + +// GL_CHROMIUM_framebuffer_mixed_samples +void GL_APIENTRY glCoverageModulationCHROMIUM(GLenum components) +{ + return GL_CoverageModulationCHROMIUM(components); +} + +// GL_CHROMIUM_lose_context +void GL_APIENTRY glLoseContextCHROMIUM(GLenum current, GLenum other) +{ + return GL_LoseContextCHROMIUM(current, other); +} + +// GL_EXT_EGL_image_array + +// GL_EXT_YUV_target + +// GL_EXT_blend_func_extended +void GL_APIENTRY glBindFragDataLocationEXT(GLuint program, GLuint color, const GLchar *name) +{ + return GL_BindFragDataLocationEXT(program, color, name); +} + +void GL_APIENTRY glBindFragDataLocationIndexedEXT(GLuint program, + GLuint colorNumber, + GLuint index, + const GLchar *name) +{ + return GL_BindFragDataLocationIndexedEXT(program, colorNumber, index, name); +} + +GLint GL_APIENTRY glGetFragDataIndexEXT(GLuint program, const GLchar *name) +{ + return GL_GetFragDataIndexEXT(program, name); +} + +GLint GL_APIENTRY glGetProgramResourceLocationIndexEXT(GLuint program, + GLenum programInterface, + const GLchar *name) +{ + return GL_GetProgramResourceLocationIndexEXT(program, programInterface, name); +} + +// GL_EXT_buffer_storage +void GL_APIENTRY glBufferStorageEXT(GLenum target, + GLsizeiptr size, + const void *data, + GLbitfield flags) +{ + return GL_BufferStorageEXT(target, size, data, flags); +} + +// GL_EXT_clip_control +void GL_APIENTRY glClipControlEXT(GLenum origin, GLenum depth) +{ + return GL_ClipControlEXT(origin, depth); +} + +// GL_EXT_copy_image +void GL_APIENTRY glCopyImageSubDataEXT(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + return GL_CopyImageSubDataEXT(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); +} + +// GL_EXT_debug_label +void GL_APIENTRY +glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + return GL_GetObjectLabelEXT(type, object, bufSize, length, label); +} + +void GL_APIENTRY glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label) +{ + return GL_LabelObjectEXT(type, object, length, label); +} + +// GL_EXT_debug_marker +void GL_APIENTRY glInsertEventMarkerEXT(GLsizei length, const GLchar *marker) +{ + return GL_InsertEventMarkerEXT(length, marker); +} + +void GL_APIENTRY glPopGroupMarkerEXT() +{ + return GL_PopGroupMarkerEXT(); +} + +void GL_APIENTRY glPushGroupMarkerEXT(GLsizei length, const GLchar *marker) +{ + return GL_PushGroupMarkerEXT(length, marker); +} + +// GL_EXT_discard_framebuffer +void GL_APIENTRY glDiscardFramebufferEXT(GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + return GL_DiscardFramebufferEXT(target, numAttachments, attachments); +} + +// GL_EXT_disjoint_timer_query +void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint id) +{ + return GL_BeginQueryEXT(target, id); +} + +void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint *ids) +{ + return GL_DeleteQueriesEXT(n, ids); +} + +void GL_APIENTRY glEndQueryEXT(GLenum target) +{ + return GL_EndQueryEXT(target); +} + +void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint *ids) +{ + return GL_GenQueriesEXT(n, ids); +} + +void GL_APIENTRY glGetInteger64vEXT(GLenum pname, GLint64 *data) +{ + return GL_GetInteger64vEXT(pname, data); +} + +void GL_APIENTRY glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params) +{ + return GL_GetQueryObjecti64vEXT(id, pname, params); +} + +void GL_APIENTRY glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params) +{ + return GL_GetQueryObjectivEXT(id, pname, params); +} + +void GL_APIENTRY glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params) +{ + return GL_GetQueryObjectui64vEXT(id, pname, params); +} + +void GL_APIENTRY glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) +{ + return GL_GetQueryObjectuivEXT(id, pname, params); +} + +void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetQueryivEXT(target, pname, params); +} + +GLboolean GL_APIENTRY glIsQueryEXT(GLuint id) +{ + return GL_IsQueryEXT(id); +} + +void GL_APIENTRY glQueryCounterEXT(GLuint id, GLenum target) +{ + return GL_QueryCounterEXT(id, target); +} + +// GL_EXT_draw_buffers +void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum *bufs) +{ + return GL_DrawBuffersEXT(n, bufs); +} + +// GL_EXT_draw_buffers_indexed +void GL_APIENTRY glBlendEquationSeparateiEXT(GLuint buf, GLenum modeRGB, GLenum modeAlpha) +{ + return GL_BlendEquationSeparateiEXT(buf, modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendEquationiEXT(GLuint buf, GLenum mode) +{ + return GL_BlendEquationiEXT(buf, mode); +} + +void GL_APIENTRY +glBlendFuncSeparateiEXT(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + return GL_BlendFuncSeparateiEXT(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void GL_APIENTRY glBlendFunciEXT(GLuint buf, GLenum src, GLenum dst) +{ + return GL_BlendFunciEXT(buf, src, dst); +} + +void GL_APIENTRY glColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ + return GL_ColorMaskiEXT(index, r, g, b, a); +} + +void GL_APIENTRY glDisableiEXT(GLenum target, GLuint index) +{ + return GL_DisableiEXT(target, index); +} + +void GL_APIENTRY glEnableiEXT(GLenum target, GLuint index) +{ + return GL_EnableiEXT(target, index); +} + +GLboolean GL_APIENTRY glIsEnablediEXT(GLenum target, GLuint index) +{ + return GL_IsEnablediEXT(target, index); +} + +// GL_EXT_draw_elements_base_vertex +void GL_APIENTRY glDrawElementsBaseVertexEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawElementsBaseVertexEXT(mode, count, type, indices, basevertex); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertexEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + return GL_DrawElementsInstancedBaseVertexEXT(mode, count, type, indices, instancecount, + basevertex); +} + +void GL_APIENTRY glDrawRangeElementsBaseVertexEXT(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawRangeElementsBaseVertexEXT(mode, start, end, count, type, indices, basevertex); +} + +void GL_APIENTRY glMultiDrawElementsBaseVertexEXT(GLenum mode, + const GLsizei *count, + GLenum type, + const void *const *indices, + GLsizei primcount, + const GLint *basevertex) +{ + return GL_MultiDrawElementsBaseVertexEXT(mode, count, type, indices, primcount, basevertex); +} + +// GL_EXT_external_buffer +void GL_APIENTRY glBufferStorageExternalEXT(GLenum target, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + return GL_BufferStorageExternalEXT(target, offset, size, clientBuffer, flags); +} + +void GL_APIENTRY glNamedBufferStorageExternalEXT(GLuint buffer, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + return GL_NamedBufferStorageExternalEXT(buffer, offset, size, clientBuffer, flags); +} + +// GL_EXT_geometry_shader +void GL_APIENTRY glFramebufferTextureEXT(GLenum target, + GLenum attachment, + GLuint texture, + GLint level) +{ + return GL_FramebufferTextureEXT(target, attachment, texture, level); +} + +// GL_EXT_instanced_arrays +void GL_APIENTRY glDrawArraysInstancedEXT(GLenum mode, + GLint start, + GLsizei count, + GLsizei primcount) +{ + return GL_DrawArraysInstancedEXT(mode, start, count, primcount); +} + +void GL_APIENTRY glDrawElementsInstancedEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + return GL_DrawElementsInstancedEXT(mode, count, type, indices, primcount); +} + +void GL_APIENTRY glVertexAttribDivisorEXT(GLuint index, GLuint divisor) +{ + return GL_VertexAttribDivisorEXT(index, divisor); +} + +// GL_EXT_map_buffer_range +void GL_APIENTRY glFlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length) +{ + return GL_FlushMappedBufferRangeEXT(target, offset, length); +} + +void *GL_APIENTRY glMapBufferRangeEXT(GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + return GL_MapBufferRangeEXT(target, offset, length, access); +} + +// GL_EXT_memory_object +void GL_APIENTRY glBufferStorageMemEXT(GLenum target, + GLsizeiptr size, + GLuint memory, + GLuint64 offset) +{ + return GL_BufferStorageMemEXT(target, size, memory, offset); +} + +void GL_APIENTRY glCreateMemoryObjectsEXT(GLsizei n, GLuint *memoryObjects) +{ + return GL_CreateMemoryObjectsEXT(n, memoryObjects); +} + +void GL_APIENTRY glDeleteMemoryObjectsEXT(GLsizei n, const GLuint *memoryObjects) +{ + return GL_DeleteMemoryObjectsEXT(n, memoryObjects); +} + +void GL_APIENTRY glGetMemoryObjectParameterivEXT(GLuint memoryObject, GLenum pname, GLint *params) +{ + return GL_GetMemoryObjectParameterivEXT(memoryObject, pname, params); +} + +void GL_APIENTRY glGetUnsignedBytevEXT(GLenum pname, GLubyte *data) +{ + return GL_GetUnsignedBytevEXT(pname, data); +} + +void GL_APIENTRY glGetUnsignedBytei_vEXT(GLenum target, GLuint index, GLubyte *data) +{ + return GL_GetUnsignedBytei_vEXT(target, index, data); +} + +GLboolean GL_APIENTRY glIsMemoryObjectEXT(GLuint memoryObject) +{ + return GL_IsMemoryObjectEXT(memoryObject); +} + +void GL_APIENTRY glMemoryObjectParameterivEXT(GLuint memoryObject, + GLenum pname, + const GLint *params) +{ + return GL_MemoryObjectParameterivEXT(memoryObject, pname, params); +} + +void GL_APIENTRY glTexStorageMem2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem2DEXT(target, levels, internalFormat, width, height, memory, offset); +} + +void GL_APIENTRY glTexStorageMem2DMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem2DMultisampleEXT(target, samples, internalFormat, width, height, + fixedSampleLocations, memory, offset); +} + +void GL_APIENTRY glTexStorageMem3DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem3DEXT(target, levels, internalFormat, width, height, depth, memory, + offset); +} + +void GL_APIENTRY glTexStorageMem3DMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem3DMultisampleEXT(target, samples, internalFormat, width, height, depth, + fixedSampleLocations, memory, offset); +} + +// GL_EXT_memory_object_fd +void GL_APIENTRY glImportMemoryFdEXT(GLuint memory, GLuint64 size, GLenum handleType, GLint fd) +{ + return GL_ImportMemoryFdEXT(memory, size, handleType, fd); +} + +// GL_EXT_multisampled_render_to_texture +void GL_APIENTRY glFramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) +{ + return GL_FramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, + samples); +} + +void GL_APIENTRY glRenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); +} + +// GL_EXT_occlusion_query_boolean + +// GL_EXT_primitive_bounding_box +void GL_APIENTRY glPrimitiveBoundingBoxEXT(GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + return GL_PrimitiveBoundingBoxEXT(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); +} + +// GL_EXT_read_format_bgra + +// GL_EXT_robustness +GLenum GL_APIENTRY glGetGraphicsResetStatusEXT() +{ + return GL_GetGraphicsResetStatusEXT(); +} + +void GL_APIENTRY glGetnUniformfvEXT(GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params) +{ + return GL_GetnUniformfvEXT(program, location, bufSize, params); +} + +void GL_APIENTRY glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params) +{ + return GL_GetnUniformivEXT(program, location, bufSize, params); +} + +void GL_APIENTRY glReadnPixelsEXT(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + return GL_ReadnPixelsEXT(x, y, width, height, format, type, bufSize, data); +} + +// GL_EXT_sRGB + +// GL_EXT_semaphore +void GL_APIENTRY glDeleteSemaphoresEXT(GLsizei n, const GLuint *semaphores) +{ + return GL_DeleteSemaphoresEXT(n, semaphores); +} + +void GL_APIENTRY glGenSemaphoresEXT(GLsizei n, GLuint *semaphores) +{ + return GL_GenSemaphoresEXT(n, semaphores); +} + +void GL_APIENTRY glGetSemaphoreParameterui64vEXT(GLuint semaphore, GLenum pname, GLuint64 *params) +{ + return GL_GetSemaphoreParameterui64vEXT(semaphore, pname, params); +} + +GLboolean GL_APIENTRY glIsSemaphoreEXT(GLuint semaphore) +{ + return GL_IsSemaphoreEXT(semaphore); +} + +void GL_APIENTRY glSemaphoreParameterui64vEXT(GLuint semaphore, + GLenum pname, + const GLuint64 *params) +{ + return GL_SemaphoreParameterui64vEXT(semaphore, pname, params); +} + +void GL_APIENTRY glSignalSemaphoreEXT(GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *dstLayouts) +{ + return GL_SignalSemaphoreEXT(semaphore, numBufferBarriers, buffers, numTextureBarriers, + textures, dstLayouts); +} + +void GL_APIENTRY glWaitSemaphoreEXT(GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *srcLayouts) +{ + return GL_WaitSemaphoreEXT(semaphore, numBufferBarriers, buffers, numTextureBarriers, textures, + srcLayouts); +} + +// GL_EXT_semaphore_fd +void GL_APIENTRY glImportSemaphoreFdEXT(GLuint semaphore, GLenum handleType, GLint fd) +{ + return GL_ImportSemaphoreFdEXT(semaphore, handleType, fd); +} + +// GL_EXT_separate_shader_objects +void GL_APIENTRY glActiveShaderProgramEXT(GLuint pipeline, GLuint program) +{ + return GL_ActiveShaderProgramEXT(pipeline, program); +} + +void GL_APIENTRY glBindProgramPipelineEXT(GLuint pipeline) +{ + return GL_BindProgramPipelineEXT(pipeline); +} + +GLuint GL_APIENTRY glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings) +{ + return GL_CreateShaderProgramvEXT(type, count, strings); +} + +void GL_APIENTRY glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) +{ + return GL_DeleteProgramPipelinesEXT(n, pipelines); +} + +void GL_APIENTRY glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) +{ + return GL_GenProgramPipelinesEXT(n, pipelines); +} + +void GL_APIENTRY glGetProgramPipelineInfoLogEXT(GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) +{ + return GL_GetProgramPipelineivEXT(pipeline, pname, params); +} + +GLboolean GL_APIENTRY glIsProgramPipelineEXT(GLuint pipeline) +{ + return GL_IsProgramPipelineEXT(pipeline); +} + +void GL_APIENTRY glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) +{ + return GL_ProgramParameteriEXT(program, pname, value); +} + +void GL_APIENTRY glProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0) +{ + return GL_ProgramUniform1fEXT(program, location, v0); +} + +void GL_APIENTRY glProgramUniform1fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform1fvEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1iEXT(GLuint program, GLint location, GLint v0) +{ + return GL_ProgramUniform1iEXT(program, location, v0); +} + +void GL_APIENTRY glProgramUniform1ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform1ivEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0) +{ + return GL_ProgramUniform1uiEXT(program, location, v0); +} + +void GL_APIENTRY glProgramUniform1uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform1uivEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1) +{ + return GL_ProgramUniform2fEXT(program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform2fvEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2iEXT(GLuint program, GLint location, GLint v0, GLint v1) +{ + return GL_ProgramUniform2iEXT(program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform2ivEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1) +{ + return GL_ProgramUniform2uiEXT(program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform2uivEXT(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + return GL_ProgramUniform3fEXT(program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform3fvEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) +{ + return GL_ProgramUniform3iEXT(program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform3ivEXT(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + return GL_ProgramUniform3uiEXT(program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform3uivEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniform4fEXT(GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + return GL_ProgramUniform4fEXT(program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4fvEXT(GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform4fvEXT(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + return GL_ProgramUniform4iEXT(program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4ivEXT(GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform4ivEXT(program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +{ + return GL_ProgramUniform4uiEXT(program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4uivEXT(GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform4uivEXT(program, location, count, value); +} + +void GL_APIENTRY glProgramUniformMatrix2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix2x3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix2x4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix3x2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix3x4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix4fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix4x2fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix4x3fvEXT(GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value); +} + +void GL_APIENTRY glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) +{ + return GL_UseProgramStagesEXT(pipeline, stages, program); +} + +void GL_APIENTRY glValidateProgramPipelineEXT(GLuint pipeline) +{ + return GL_ValidateProgramPipelineEXT(pipeline); +} + +// GL_EXT_shader_framebuffer_fetch_non_coherent +void GL_APIENTRY glFramebufferFetchBarrierEXT() +{ + return GL_FramebufferFetchBarrierEXT(); +} + +// GL_EXT_shader_io_blocks + +// GL_EXT_tessellation_shader +void GL_APIENTRY glPatchParameteriEXT(GLenum pname, GLint value) +{ + return GL_PatchParameteriEXT(pname, value); +} + +// GL_EXT_texture_border_clamp +void GL_APIENTRY glGetSamplerParameterIivEXT(GLuint sampler, GLenum pname, GLint *params) +{ + return GL_GetSamplerParameterIivEXT(sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIuivEXT(GLuint sampler, GLenum pname, GLuint *params) +{ + return GL_GetSamplerParameterIuivEXT(sampler, pname, params); +} + +void GL_APIENTRY glGetTexParameterIivEXT(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetTexParameterIivEXT(target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint *params) +{ + return GL_GetTexParameterIuivEXT(target, pname, params); +} + +void GL_APIENTRY glSamplerParameterIivEXT(GLuint sampler, GLenum pname, const GLint *param) +{ + return GL_SamplerParameterIivEXT(sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIuivEXT(GLuint sampler, GLenum pname, const GLuint *param) +{ + return GL_SamplerParameterIuivEXT(sampler, pname, param); +} + +void GL_APIENTRY glTexParameterIivEXT(GLenum target, GLenum pname, const GLint *params) +{ + return GL_TexParameterIivEXT(target, pname, params); +} + +void GL_APIENTRY glTexParameterIuivEXT(GLenum target, GLenum pname, const GLuint *params) +{ + return GL_TexParameterIuivEXT(target, pname, params); +} + +// GL_EXT_texture_buffer +void GL_APIENTRY glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer) +{ + return GL_TexBufferEXT(target, internalformat, buffer); +} + +void GL_APIENTRY glTexBufferRangeEXT(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + return GL_TexBufferRangeEXT(target, internalformat, buffer, offset, size); +} + +// GL_EXT_texture_compression_bptc + +// GL_EXT_texture_compression_dxt1 + +// GL_EXT_texture_compression_rgtc + +// GL_EXT_texture_compression_s3tc + +// GL_EXT_texture_compression_s3tc_srgb + +// GL_EXT_texture_cube_map_array + +// GL_EXT_texture_filter_anisotropic + +// GL_EXT_texture_format_BGRA8888 + +// GL_EXT_texture_sRGB_R8 + +// GL_EXT_texture_sRGB_RG8 + +// GL_EXT_texture_storage +void GL_APIENTRY glTexStorage1DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width) +{ + return GL_TexStorage1DEXT(target, levels, internalformat, width); +} + +void GL_APIENTRY glTexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_TexStorage2DEXT(target, levels, internalformat, width, height); +} + +void GL_APIENTRY glTexStorage3DEXT(GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + return GL_TexStorage3DEXT(target, levels, internalformat, width, height, depth); +} + +// GL_KHR_blend_equation_advanced +void GL_APIENTRY glBlendBarrierKHR() +{ + return GL_BlendBarrierKHR(); +} + +// GL_KHR_debug +void GL_APIENTRY glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void *userParam) +{ + return GL_DebugMessageCallbackKHR(callback, userParam); +} + +void GL_APIENTRY glDebugMessageControlKHR(GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + return GL_DebugMessageControlKHR(source, type, severity, count, ids, enabled); +} + +void GL_APIENTRY glDebugMessageInsertKHR(GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + return GL_DebugMessageInsertKHR(source, type, id, severity, length, buf); +} + +GLuint GL_APIENTRY glGetDebugMessageLogKHR(GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + return GL_GetDebugMessageLogKHR(count, bufSize, sources, types, ids, severities, lengths, + messageLog); +} + +void GL_APIENTRY +glGetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + return GL_GetObjectLabelKHR(identifier, name, bufSize, length, label); +} + +void GL_APIENTRY glGetObjectPtrLabelKHR(const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + return GL_GetObjectPtrLabelKHR(ptr, bufSize, length, label); +} + +void GL_APIENTRY glGetPointervKHR(GLenum pname, void **params) +{ + return GL_GetPointervKHR(pname, params); +} + +void GL_APIENTRY glObjectLabelKHR(GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label) +{ + return GL_ObjectLabelKHR(identifier, name, length, label); +} + +void GL_APIENTRY glObjectPtrLabelKHR(const void *ptr, GLsizei length, const GLchar *label) +{ + return GL_ObjectPtrLabelKHR(ptr, length, label); +} + +void GL_APIENTRY glPopDebugGroupKHR() +{ + return GL_PopDebugGroupKHR(); +} + +void GL_APIENTRY glPushDebugGroupKHR(GLenum source, + GLuint id, + GLsizei length, + const GLchar *message) +{ + return GL_PushDebugGroupKHR(source, id, length, message); +} + +// GL_KHR_parallel_shader_compile +void GL_APIENTRY glMaxShaderCompilerThreadsKHR(GLuint count) +{ + return GL_MaxShaderCompilerThreadsKHR(count); +} + +// GL_NV_fence +void GL_APIENTRY glDeleteFencesNV(GLsizei n, const GLuint *fences) +{ + return GL_DeleteFencesNV(n, fences); +} + +void GL_APIENTRY glFinishFenceNV(GLuint fence) +{ + return GL_FinishFenceNV(fence); +} + +void GL_APIENTRY glGenFencesNV(GLsizei n, GLuint *fences) +{ + return GL_GenFencesNV(n, fences); +} + +void GL_APIENTRY glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) +{ + return GL_GetFenceivNV(fence, pname, params); +} + +GLboolean GL_APIENTRY glIsFenceNV(GLuint fence) +{ + return GL_IsFenceNV(fence); +} + +void GL_APIENTRY glSetFenceNV(GLuint fence, GLenum condition) +{ + return GL_SetFenceNV(fence, condition); +} + +GLboolean GL_APIENTRY glTestFenceNV(GLuint fence) +{ + return GL_TestFenceNV(fence); +} + +// GL_NV_framebuffer_blit +void GL_APIENTRY glBlitFramebufferNV(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + return GL_BlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, + filter); +} + +// GL_OES_EGL_image +void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) +{ + return GL_EGLImageTargetRenderbufferStorageOES(target, image); +} + +void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) +{ + return GL_EGLImageTargetTexture2DOES(target, image); +} + +// GL_OES_compressed_ETC1_RGB8_texture + +// GL_OES_copy_image +void GL_APIENTRY glCopyImageSubDataOES(GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + return GL_CopyImageSubDataOES(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, + dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, + srcDepth); +} + +// GL_OES_depth32 + +// GL_OES_draw_buffers_indexed +void GL_APIENTRY glBlendEquationSeparateiOES(GLuint buf, GLenum modeRGB, GLenum modeAlpha) +{ + return GL_BlendEquationSeparateiOES(buf, modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendEquationiOES(GLuint buf, GLenum mode) +{ + return GL_BlendEquationiOES(buf, mode); +} + +void GL_APIENTRY +glBlendFuncSeparateiOES(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + return GL_BlendFuncSeparateiOES(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void GL_APIENTRY glBlendFunciOES(GLuint buf, GLenum src, GLenum dst) +{ + return GL_BlendFunciOES(buf, src, dst); +} + +void GL_APIENTRY glColorMaskiOES(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ + return GL_ColorMaskiOES(index, r, g, b, a); +} + +void GL_APIENTRY glDisableiOES(GLenum target, GLuint index) +{ + return GL_DisableiOES(target, index); +} + +void GL_APIENTRY glEnableiOES(GLenum target, GLuint index) +{ + return GL_EnableiOES(target, index); +} + +GLboolean GL_APIENTRY glIsEnablediOES(GLenum target, GLuint index) +{ + return GL_IsEnablediOES(target, index); +} + +// GL_OES_draw_elements_base_vertex +void GL_APIENTRY glDrawElementsBaseVertexOES(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawElementsBaseVertexOES(mode, count, type, indices, basevertex); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertexOES(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + return GL_DrawElementsInstancedBaseVertexOES(mode, count, type, indices, instancecount, + basevertex); +} + +void GL_APIENTRY glDrawRangeElementsBaseVertexOES(GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawRangeElementsBaseVertexOES(mode, start, end, count, type, indices, basevertex); +} + +// GL_OES_draw_texture +void GL_APIENTRY glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) +{ + return GL_DrawTexfOES(x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexfvOES(const GLfloat *coords) +{ + return GL_DrawTexfvOES(coords); +} + +void GL_APIENTRY glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) +{ + return GL_DrawTexiOES(x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexivOES(const GLint *coords) +{ + return GL_DrawTexivOES(coords); +} + +void GL_APIENTRY glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) +{ + return GL_DrawTexsOES(x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexsvOES(const GLshort *coords) +{ + return GL_DrawTexsvOES(coords); +} + +void GL_APIENTRY glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) +{ + return GL_DrawTexxOES(x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexxvOES(const GLfixed *coords) +{ + return GL_DrawTexxvOES(coords); +} + +// GL_OES_framebuffer_object +void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer) +{ + return GL_BindFramebufferOES(target, framebuffer); +} + +void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer) +{ + return GL_BindRenderbufferOES(target, renderbuffer); +} + +GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target) +{ + return GL_CheckFramebufferStatusOES(target); +} + +void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers) +{ + return GL_DeleteFramebuffersOES(n, framebuffers); +} + +void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers) +{ + return GL_DeleteRenderbuffersOES(n, renderbuffers); +} + +void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + return GL_FramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); +} + +void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + return GL_FramebufferTexture2DOES(target, attachment, textarget, texture, level); +} + +void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint *framebuffers) +{ + return GL_GenFramebuffersOES(n, framebuffers); +} + +void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint *renderbuffers) +{ + return GL_GenRenderbuffersOES(n, renderbuffers); +} + +void GL_APIENTRY glGenerateMipmapOES(GLenum target) +{ + return GL_GenerateMipmapOES(target); +} + +void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + return GL_GetFramebufferAttachmentParameterivOES(target, attachment, pname, params); +} + +void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetRenderbufferParameterivOES(target, pname, params); +} + +GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer) +{ + return GL_IsFramebufferOES(framebuffer); +} + +GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer) +{ + return GL_IsRenderbufferOES(renderbuffer); +} + +void GL_APIENTRY glRenderbufferStorageOES(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageOES(target, internalformat, width, height); +} + +// GL_OES_get_program_binary +void GL_APIENTRY glGetProgramBinaryOES(GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + return GL_GetProgramBinaryOES(program, bufSize, length, binaryFormat, binary); +} + +void GL_APIENTRY glProgramBinaryOES(GLuint program, + GLenum binaryFormat, + const void *binary, + GLint length) +{ + return GL_ProgramBinaryOES(program, binaryFormat, binary, length); +} + +// GL_OES_mapbuffer +void GL_APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, void **params) +{ + return GL_GetBufferPointervOES(target, pname, params); +} + +void *GL_APIENTRY glMapBufferOES(GLenum target, GLenum access) +{ + return GL_MapBufferOES(target, access); +} + +GLboolean GL_APIENTRY glUnmapBufferOES(GLenum target) +{ + return GL_UnmapBufferOES(target); +} + +// GL_OES_matrix_palette +void GL_APIENTRY glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) +{ + return GL_CurrentPaletteMatrixOES(matrixpaletteindex); +} + +void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES() +{ + return GL_LoadPaletteFromModelViewMatrixOES(); +} + +void GL_APIENTRY glMatrixIndexPointerOES(GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_MatrixIndexPointerOES(size, type, stride, pointer); +} + +void GL_APIENTRY glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const void *pointer) +{ + return GL_WeightPointerOES(size, type, stride, pointer); +} + +// GL_OES_point_size_array +void GL_APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride, const void *pointer) +{ + return GL_PointSizePointerOES(type, stride, pointer); +} + +// GL_OES_query_matrix +GLbitfield GL_APIENTRY glQueryMatrixxOES(GLfixed *mantissa, GLint *exponent) +{ + return GL_QueryMatrixxOES(mantissa, exponent); +} + +// GL_OES_sample_shading +void GL_APIENTRY glMinSampleShadingOES(GLfloat value) +{ + return GL_MinSampleShadingOES(value); +} + +// GL_OES_shader_io_blocks + +// GL_OES_texture_3D +void GL_APIENTRY glCompressedTexImage3DOES(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, + imageSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, + depth, format, imageSize, data); +} + +void GL_APIENTRY glCopyTexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_CopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + +void GL_APIENTRY glFramebufferTexture3DOES(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLint zoffset) +{ + return GL_FramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); +} + +void GL_APIENTRY glTexImage3DOES(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexImage3DOES(target, level, internalformat, width, height, depth, border, format, + type, pixels); +} + +void GL_APIENTRY glTexSubImage3DOES(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, + format, type, pixels); +} + +// GL_OES_texture_border_clamp +void GL_APIENTRY glGetSamplerParameterIivOES(GLuint sampler, GLenum pname, GLint *params) +{ + return GL_GetSamplerParameterIivOES(sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIuivOES(GLuint sampler, GLenum pname, GLuint *params) +{ + return GL_GetSamplerParameterIuivOES(sampler, pname, params); +} + +void GL_APIENTRY glGetTexParameterIivOES(GLenum target, GLenum pname, GLint *params) +{ + return GL_GetTexParameterIivOES(target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIuivOES(GLenum target, GLenum pname, GLuint *params) +{ + return GL_GetTexParameterIuivOES(target, pname, params); +} + +void GL_APIENTRY glSamplerParameterIivOES(GLuint sampler, GLenum pname, const GLint *param) +{ + return GL_SamplerParameterIivOES(sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIuivOES(GLuint sampler, GLenum pname, const GLuint *param) +{ + return GL_SamplerParameterIuivOES(sampler, pname, param); +} + +void GL_APIENTRY glTexParameterIivOES(GLenum target, GLenum pname, const GLint *params) +{ + return GL_TexParameterIivOES(target, pname, params); +} + +void GL_APIENTRY glTexParameterIuivOES(GLenum target, GLenum pname, const GLuint *params) +{ + return GL_TexParameterIuivOES(target, pname, params); +} + +// GL_OES_texture_buffer +void GL_APIENTRY glTexBufferOES(GLenum target, GLenum internalformat, GLuint buffer) +{ + return GL_TexBufferOES(target, internalformat, buffer); +} + +void GL_APIENTRY glTexBufferRangeOES(GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + return GL_TexBufferRangeOES(target, internalformat, buffer, offset, size); +} + +// GL_OES_texture_cube_map +void GL_APIENTRY glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) +{ + return GL_GetTexGenfvOES(coord, pname, params); +} + +void GL_APIENTRY glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) +{ + return GL_GetTexGenivOES(coord, pname, params); +} + +void GL_APIENTRY glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) +{ + return GL_GetTexGenxvOES(coord, pname, params); +} + +void GL_APIENTRY glTexGenfOES(GLenum coord, GLenum pname, GLfloat param) +{ + return GL_TexGenfOES(coord, pname, param); +} + +void GL_APIENTRY glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) +{ + return GL_TexGenfvOES(coord, pname, params); +} + +void GL_APIENTRY glTexGeniOES(GLenum coord, GLenum pname, GLint param) +{ + return GL_TexGeniOES(coord, pname, param); +} + +void GL_APIENTRY glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) +{ + return GL_TexGenivOES(coord, pname, params); +} + +void GL_APIENTRY glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) +{ + return GL_TexGenxOES(coord, pname, param); +} + +void GL_APIENTRY glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) +{ + return GL_TexGenxvOES(coord, pname, params); +} + +// GL_OES_texture_cube_map_array + +// GL_OES_texture_half_float + +// GL_OES_texture_stencil8 + +// GL_OES_texture_storage_multisample_2d_array +void GL_APIENTRY glTexStorage3DMultisampleOES(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage3DMultisampleOES(target, samples, internalformat, width, height, depth, + fixedsamplelocations); +} + +// GL_OES_vertex_array_object +void GL_APIENTRY glBindVertexArrayOES(GLuint array) +{ + return GL_BindVertexArrayOES(array); +} + +void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) +{ + return GL_DeleteVertexArraysOES(n, arrays); +} + +void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint *arrays) +{ + return GL_GenVertexArraysOES(n, arrays); +} + +GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array) +{ + return GL_IsVertexArrayOES(array); +} + +// GL_OVR_multiview +void GL_APIENTRY glFramebufferTextureMultiviewOVR(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint baseViewIndex, + GLsizei numViews) +{ + return GL_FramebufferTextureMultiviewOVR(target, attachment, texture, level, baseViewIndex, + numViews); +} + +// GL_OVR_multiview2 + +// EGL_ANGLE_explicit_context +void GL_APIENTRY glActiveShaderProgramContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLuint program) +{ + return GL_ActiveShaderProgramContextANGLE(ctx, pipeline, program); +} + +void GL_APIENTRY glActiveShaderProgramEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLuint program) +{ + return GL_ActiveShaderProgramEXTContextANGLE(ctx, pipeline, program); +} + +void GL_APIENTRY glActiveTextureContextANGLE(GLeglContext ctx, GLenum texture) +{ + return GL_ActiveTextureContextANGLE(ctx, texture); +} + +void GL_APIENTRY glAlphaFuncContextANGLE(GLeglContext ctx, GLenum func, GLfloat ref) +{ + return GL_AlphaFuncContextANGLE(ctx, func, ref); +} + +void GL_APIENTRY glAlphaFuncxContextANGLE(GLeglContext ctx, GLenum func, GLfixed ref) +{ + return GL_AlphaFuncxContextANGLE(ctx, func, ref); +} + +void GL_APIENTRY glAttachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader) +{ + return GL_AttachShaderContextANGLE(ctx, program, shader); +} + +void GL_APIENTRY glBeginQueryContextANGLE(GLeglContext ctx, GLenum target, GLuint id) +{ + return GL_BeginQueryContextANGLE(ctx, target, id); +} + +void GL_APIENTRY glBeginQueryEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint id) +{ + return GL_BeginQueryEXTContextANGLE(ctx, target, id); +} + +void GL_APIENTRY glBeginTransformFeedbackContextANGLE(GLeglContext ctx, GLenum primitiveMode) +{ + return GL_BeginTransformFeedbackContextANGLE(ctx, primitiveMode); +} + +void GL_APIENTRY glBindAttribLocationContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + const GLchar *name) +{ + return GL_BindAttribLocationContextANGLE(ctx, program, index, name); +} + +void GL_APIENTRY glBindBufferContextANGLE(GLeglContext ctx, GLenum target, GLuint buffer) +{ + return GL_BindBufferContextANGLE(ctx, target, buffer); +} + +void GL_APIENTRY glBindBufferBaseContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLuint buffer) +{ + return GL_BindBufferBaseContextANGLE(ctx, target, index, buffer); +} + +void GL_APIENTRY glBindBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + return GL_BindBufferRangeContextANGLE(ctx, target, index, buffer, offset, size); +} + +void GL_APIENTRY glBindFragDataLocationEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLuint color, + const GLchar *name) +{ + return GL_BindFragDataLocationEXTContextANGLE(ctx, program, color, name); +} + +void GL_APIENTRY glBindFragDataLocationIndexedEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLuint colorNumber, + GLuint index, + const GLchar *name) +{ + return GL_BindFragDataLocationIndexedEXTContextANGLE(ctx, program, colorNumber, index, name); +} + +void GL_APIENTRY glBindFramebufferContextANGLE(GLeglContext ctx, GLenum target, GLuint framebuffer) +{ + return GL_BindFramebufferContextANGLE(ctx, target, framebuffer); +} + +void GL_APIENTRY glBindFramebufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint framebuffer) +{ + return GL_BindFramebufferOESContextANGLE(ctx, target, framebuffer); +} + +void GL_APIENTRY glBindImageTextureContextANGLE(GLeglContext ctx, + GLuint unit, + GLuint texture, + GLint level, + GLboolean layered, + GLint layer, + GLenum access, + GLenum format) +{ + return GL_BindImageTextureContextANGLE(ctx, unit, texture, level, layered, layer, access, + format); +} + +void GL_APIENTRY glBindProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + return GL_BindProgramPipelineContextANGLE(ctx, pipeline); +} + +void GL_APIENTRY glBindProgramPipelineEXTContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + return GL_BindProgramPipelineEXTContextANGLE(ctx, pipeline); +} + +void GL_APIENTRY glBindRenderbufferContextANGLE(GLeglContext ctx, + GLenum target, + GLuint renderbuffer) +{ + return GL_BindRenderbufferContextANGLE(ctx, target, renderbuffer); +} + +void GL_APIENTRY glBindRenderbufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLuint renderbuffer) +{ + return GL_BindRenderbufferOESContextANGLE(ctx, target, renderbuffer); +} + +void GL_APIENTRY glBindSamplerContextANGLE(GLeglContext ctx, GLuint unit, GLuint sampler) +{ + return GL_BindSamplerContextANGLE(ctx, unit, sampler); +} + +void GL_APIENTRY glBindTextureContextANGLE(GLeglContext ctx, GLenum target, GLuint texture) +{ + return GL_BindTextureContextANGLE(ctx, target, texture); +} + +void GL_APIENTRY glBindTransformFeedbackContextANGLE(GLeglContext ctx, GLenum target, GLuint id) +{ + return GL_BindTransformFeedbackContextANGLE(ctx, target, id); +} + +void GL_APIENTRY glBindVertexArrayContextANGLE(GLeglContext ctx, GLuint array) +{ + return GL_BindVertexArrayContextANGLE(ctx, array); +} + +void GL_APIENTRY glBindVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array) +{ + return GL_BindVertexArrayOESContextANGLE(ctx, array); +} + +void GL_APIENTRY glBindVertexBufferContextANGLE(GLeglContext ctx, + GLuint bindingindex, + GLuint buffer, + GLintptr offset, + GLsizei stride) +{ + return GL_BindVertexBufferContextANGLE(ctx, bindingindex, buffer, offset, stride); +} + +void GL_APIENTRY glBlendBarrierContextANGLE(GLeglContext ctx) +{ + return GL_BlendBarrierContextANGLE(ctx); +} + +void GL_APIENTRY glBlendBarrierKHRContextANGLE(GLeglContext ctx) +{ + return GL_BlendBarrierKHRContextANGLE(ctx); +} + +void GL_APIENTRY +glBlendColorContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + return GL_BlendColorContextANGLE(ctx, red, green, blue, alpha); +} + +void GL_APIENTRY glBlendEquationContextANGLE(GLeglContext ctx, GLenum mode) +{ + return GL_BlendEquationContextANGLE(ctx, mode); +} + +void GL_APIENTRY glBlendEquationSeparateContextANGLE(GLeglContext ctx, + GLenum modeRGB, + GLenum modeAlpha) +{ + return GL_BlendEquationSeparateContextANGLE(ctx, modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendEquationSeparateiContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha) +{ + return GL_BlendEquationSeparateiContextANGLE(ctx, buf, modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendEquationSeparateiEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha) +{ + return GL_BlendEquationSeparateiEXTContextANGLE(ctx, buf, modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendEquationSeparateiOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum modeRGB, + GLenum modeAlpha) +{ + return GL_BlendEquationSeparateiOESContextANGLE(ctx, buf, modeRGB, modeAlpha); +} + +void GL_APIENTRY glBlendEquationiContextANGLE(GLeglContext ctx, GLuint buf, GLenum mode) +{ + return GL_BlendEquationiContextANGLE(ctx, buf, mode); +} + +void GL_APIENTRY glBlendEquationiEXTContextANGLE(GLeglContext ctx, GLuint buf, GLenum mode) +{ + return GL_BlendEquationiEXTContextANGLE(ctx, buf, mode); +} + +void GL_APIENTRY glBlendEquationiOESContextANGLE(GLeglContext ctx, GLuint buf, GLenum mode) +{ + return GL_BlendEquationiOESContextANGLE(ctx, buf, mode); +} + +void GL_APIENTRY glBlendFuncContextANGLE(GLeglContext ctx, GLenum sfactor, GLenum dfactor) +{ + return GL_BlendFuncContextANGLE(ctx, sfactor, dfactor); +} + +void GL_APIENTRY glBlendFuncSeparateContextANGLE(GLeglContext ctx, + GLenum sfactorRGB, + GLenum dfactorRGB, + GLenum sfactorAlpha, + GLenum dfactorAlpha) +{ + return GL_BlendFuncSeparateContextANGLE(ctx, sfactorRGB, dfactorRGB, sfactorAlpha, + dfactorAlpha); +} + +void GL_APIENTRY glBlendFuncSeparateiContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) +{ + return GL_BlendFuncSeparateiContextANGLE(ctx, buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void GL_APIENTRY glBlendFuncSeparateiEXTContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) +{ + return GL_BlendFuncSeparateiEXTContextANGLE(ctx, buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void GL_APIENTRY glBlendFuncSeparateiOESContextANGLE(GLeglContext ctx, + GLuint buf, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) +{ + return GL_BlendFuncSeparateiOESContextANGLE(ctx, buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void GL_APIENTRY glBlendFunciContextANGLE(GLeglContext ctx, GLuint buf, GLenum src, GLenum dst) +{ + return GL_BlendFunciContextANGLE(ctx, buf, src, dst); +} + +void GL_APIENTRY glBlendFunciEXTContextANGLE(GLeglContext ctx, GLuint buf, GLenum src, GLenum dst) +{ + return GL_BlendFunciEXTContextANGLE(ctx, buf, src, dst); +} + +void GL_APIENTRY glBlendFunciOESContextANGLE(GLeglContext ctx, GLuint buf, GLenum src, GLenum dst) +{ + return GL_BlendFunciOESContextANGLE(ctx, buf, src, dst); +} + +void GL_APIENTRY glBlitFramebufferContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + return GL_BlitFramebufferContextANGLE(ctx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, + dstY1, mask, filter); +} + +void GL_APIENTRY glBlitFramebufferANGLEContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + return GL_BlitFramebufferANGLEContextANGLE(ctx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, + dstY1, mask, filter); +} + +void GL_APIENTRY glBlitFramebufferNVContextANGLE(GLeglContext ctx, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) +{ + return GL_BlitFramebufferNVContextANGLE(ctx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, + dstY1, mask, filter); +} + +void GL_APIENTRY glBufferDataContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + const void *data, + GLenum usage) +{ + return GL_BufferDataContextANGLE(ctx, target, size, data, usage); +} + +void GL_APIENTRY glBufferStorageEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + const void *data, + GLbitfield flags) +{ + return GL_BufferStorageEXTContextANGLE(ctx, target, size, data, flags); +} + +void GL_APIENTRY glBufferStorageExternalEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + return GL_BufferStorageExternalEXTContextANGLE(ctx, target, offset, size, clientBuffer, flags); +} + +void GL_APIENTRY glBufferStorageMemEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizeiptr size, + GLuint memory, + GLuint64 offset) +{ + return GL_BufferStorageMemEXTContextANGLE(ctx, target, size, memory, offset); +} + +void GL_APIENTRY glBufferSubDataContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr size, + const void *data) +{ + return GL_BufferSubDataContextANGLE(ctx, target, offset, size, data); +} + +GLenum GL_APIENTRY glCheckFramebufferStatusContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_CheckFramebufferStatusContextANGLE(ctx, target); +} + +GLenum GL_APIENTRY glCheckFramebufferStatusOESContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_CheckFramebufferStatusOESContextANGLE(ctx, target); +} + +void GL_APIENTRY glClearContextANGLE(GLeglContext ctx, GLbitfield mask) +{ + return GL_ClearContextANGLE(ctx, mask); +} + +void GL_APIENTRY glClearBufferfiContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + GLfloat depth, + GLint stencil) +{ + return GL_ClearBufferfiContextANGLE(ctx, buffer, drawbuffer, depth, stencil); +} + +void GL_APIENTRY glClearBufferfvContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLfloat *value) +{ + return GL_ClearBufferfvContextANGLE(ctx, buffer, drawbuffer, value); +} + +void GL_APIENTRY glClearBufferivContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLint *value) +{ + return GL_ClearBufferivContextANGLE(ctx, buffer, drawbuffer, value); +} + +void GL_APIENTRY glClearBufferuivContextANGLE(GLeglContext ctx, + GLenum buffer, + GLint drawbuffer, + const GLuint *value) +{ + return GL_ClearBufferuivContextANGLE(ctx, buffer, drawbuffer, value); +} + +void GL_APIENTRY +glClearColorContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + return GL_ClearColorContextANGLE(ctx, red, green, blue, alpha); +} + +void GL_APIENTRY +glClearColorxContextANGLE(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + return GL_ClearColorxContextANGLE(ctx, red, green, blue, alpha); +} + +void GL_APIENTRY glClearDepthfContextANGLE(GLeglContext ctx, GLfloat d) +{ + return GL_ClearDepthfContextANGLE(ctx, d); +} + +void GL_APIENTRY glClearDepthxContextANGLE(GLeglContext ctx, GLfixed depth) +{ + return GL_ClearDepthxContextANGLE(ctx, depth); +} + +void GL_APIENTRY glClearStencilContextANGLE(GLeglContext ctx, GLint s) +{ + return GL_ClearStencilContextANGLE(ctx, s); +} + +void GL_APIENTRY glClientActiveTextureContextANGLE(GLeglContext ctx, GLenum texture) +{ + return GL_ClientActiveTextureContextANGLE(ctx, texture); +} + +GLenum GL_APIENTRY glClientWaitSyncContextANGLE(GLeglContext ctx, + GLsync sync, + GLbitfield flags, + GLuint64 timeout) +{ + return GL_ClientWaitSyncContextANGLE(ctx, sync, flags, timeout); +} + +void GL_APIENTRY glClipControlEXTContextANGLE(GLeglContext ctx, GLenum origin, GLenum depth) +{ + return GL_ClipControlEXTContextANGLE(ctx, origin, depth); +} + +void GL_APIENTRY glClipPlanefContextANGLE(GLeglContext ctx, GLenum p, const GLfloat *eqn) +{ + return GL_ClipPlanefContextANGLE(ctx, p, eqn); +} + +void GL_APIENTRY glClipPlanexContextANGLE(GLeglContext ctx, GLenum plane, const GLfixed *equation) +{ + return GL_ClipPlanexContextANGLE(ctx, plane, equation); +} + +void GL_APIENTRY +glColor4fContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + return GL_Color4fContextANGLE(ctx, red, green, blue, alpha); +} + +void GL_APIENTRY +glColor4ubContextANGLE(GLeglContext ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ + return GL_Color4ubContextANGLE(ctx, red, green, blue, alpha); +} + +void GL_APIENTRY +glColor4xContextANGLE(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + return GL_Color4xContextANGLE(ctx, red, green, blue, alpha); +} + +void GL_APIENTRY glColorMaskContextANGLE(GLeglContext ctx, + GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) +{ + return GL_ColorMaskContextANGLE(ctx, red, green, blue, alpha); +} + +void GL_APIENTRY glColorMaskiContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a) +{ + return GL_ColorMaskiContextANGLE(ctx, index, r, g, b, a); +} + +void GL_APIENTRY glColorMaskiEXTContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a) +{ + return GL_ColorMaskiEXTContextANGLE(ctx, index, r, g, b, a); +} + +void GL_APIENTRY glColorMaskiOESContextANGLE(GLeglContext ctx, + GLuint index, + GLboolean r, + GLboolean g, + GLboolean b, + GLboolean a) +{ + return GL_ColorMaskiOESContextANGLE(ctx, index, r, g, b, a); +} + +void GL_APIENTRY glColorPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_ColorPointerContextANGLE(ctx, size, type, stride, pointer); +} + +void GL_APIENTRY glCompileShaderContextANGLE(GLeglContext ctx, GLuint shader) +{ + return GL_CompileShaderContextANGLE(ctx, shader); +} + +void GL_APIENTRY glCompressedTexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexImage2DContextANGLE(ctx, target, level, internalformat, width, height, + border, imageSize, data); +} + +void GL_APIENTRY glCompressedTexImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexImage3DContextANGLE(ctx, target, level, internalformat, width, height, + depth, border, imageSize, data); +} + +void GL_APIENTRY glCompressedTexImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexImage3DOESContextANGLE(ctx, target, level, internalformat, width, height, + depth, border, imageSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexSubImage2DContextANGLE(ctx, target, level, xoffset, yoffset, width, + height, format, imageSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexSubImage3DContextANGLE(ctx, target, level, xoffset, yoffset, zoffset, + width, height, depth, format, imageSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + const void *data) +{ + return GL_CompressedTexSubImage3DOESContextANGLE(ctx, target, level, xoffset, yoffset, zoffset, + width, height, depth, format, imageSize, data); +} + +void GL_APIENTRY glCopyBufferSubDataContextANGLE(GLeglContext ctx, + GLenum readTarget, + GLenum writeTarget, + GLintptr readOffset, + GLintptr writeOffset, + GLsizeiptr size) +{ + return GL_CopyBufferSubDataContextANGLE(ctx, readTarget, writeTarget, readOffset, writeOffset, + size); +} + +void GL_APIENTRY glCopyImageSubDataContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + return GL_CopyImageSubDataContextANGLE(ctx, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, + dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, + srcHeight, srcDepth); +} + +void GL_APIENTRY glCopyImageSubDataEXTContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + return GL_CopyImageSubDataEXTContextANGLE(ctx, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, + dstName, dstTarget, dstLevel, dstX, dstY, dstZ, + srcWidth, srcHeight, srcDepth); +} + +void GL_APIENTRY glCopyImageSubDataOESContextANGLE(GLeglContext ctx, + GLuint srcName, + GLenum srcTarget, + GLint srcLevel, + GLint srcX, + GLint srcY, + GLint srcZ, + GLuint dstName, + GLenum dstTarget, + GLint dstLevel, + GLint dstX, + GLint dstY, + GLint dstZ, + GLsizei srcWidth, + GLsizei srcHeight, + GLsizei srcDepth) +{ + return GL_CopyImageSubDataOESContextANGLE(ctx, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, + dstName, dstTarget, dstLevel, dstX, dstY, dstZ, + srcWidth, srcHeight, srcDepth); +} + +void GL_APIENTRY glCopyTexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) +{ + return GL_CopyTexImage2DContextANGLE(ctx, target, level, internalformat, x, y, width, height, + border); +} + +void GL_APIENTRY glCopyTexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_CopyTexSubImage2DContextANGLE(ctx, target, level, xoffset, yoffset, x, y, width, + height); +} + +void GL_APIENTRY glCopyTexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_CopyTexSubImage3DContextANGLE(ctx, target, level, xoffset, yoffset, zoffset, x, y, + width, height); +} + +void GL_APIENTRY glCopyTexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_CopyTexSubImage3DOESContextANGLE(ctx, target, level, xoffset, yoffset, zoffset, x, y, + width, height); +} + +void GL_APIENTRY glCreateMemoryObjectsEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *memoryObjects) +{ + return GL_CreateMemoryObjectsEXTContextANGLE(ctx, n, memoryObjects); +} + +GLuint GL_APIENTRY glCreateProgramContextANGLE(GLeglContext ctx) +{ + return GL_CreateProgramContextANGLE(ctx); +} + +GLuint GL_APIENTRY glCreateShaderContextANGLE(GLeglContext ctx, GLenum type) +{ + return GL_CreateShaderContextANGLE(ctx, type); +} + +GLuint GL_APIENTRY glCreateShaderProgramvContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei count, + const GLchar *const *strings) +{ + return GL_CreateShaderProgramvContextANGLE(ctx, type, count, strings); +} + +GLuint GL_APIENTRY glCreateShaderProgramvEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei count, + const GLchar **strings) +{ + return GL_CreateShaderProgramvEXTContextANGLE(ctx, type, count, strings); +} + +void GL_APIENTRY glCullFaceContextANGLE(GLeglContext ctx, GLenum mode) +{ + return GL_CullFaceContextANGLE(ctx, mode); +} + +void GL_APIENTRY glCurrentPaletteMatrixOESContextANGLE(GLeglContext ctx, GLuint matrixpaletteindex) +{ + return GL_CurrentPaletteMatrixOESContextANGLE(ctx, matrixpaletteindex); +} + +void GL_APIENTRY glDebugMessageCallbackContextANGLE(GLeglContext ctx, + GLDEBUGPROC callback, + const void *userParam) +{ + return GL_DebugMessageCallbackContextANGLE(ctx, callback, userParam); +} + +void GL_APIENTRY glDebugMessageCallbackKHRContextANGLE(GLeglContext ctx, + GLDEBUGPROCKHR callback, + const void *userParam) +{ + return GL_DebugMessageCallbackKHRContextANGLE(ctx, callback, userParam); +} + +void GL_APIENTRY glDebugMessageControlContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + return GL_DebugMessageControlContextANGLE(ctx, source, type, severity, count, ids, enabled); +} + +void GL_APIENTRY glDebugMessageControlKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLenum severity, + GLsizei count, + const GLuint *ids, + GLboolean enabled) +{ + return GL_DebugMessageControlKHRContextANGLE(ctx, source, type, severity, count, ids, enabled); +} + +void GL_APIENTRY glDebugMessageInsertContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + return GL_DebugMessageInsertContextANGLE(ctx, source, type, id, severity, length, buf); +} + +void GL_APIENTRY glDebugMessageInsertKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLenum type, + GLuint id, + GLenum severity, + GLsizei length, + const GLchar *buf) +{ + return GL_DebugMessageInsertKHRContextANGLE(ctx, source, type, id, severity, length, buf); +} + +void GL_APIENTRY glDeleteBuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *buffers) +{ + return GL_DeleteBuffersContextANGLE(ctx, n, buffers); +} + +void GL_APIENTRY glDeleteFencesNVContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *fences) +{ + return GL_DeleteFencesNVContextANGLE(ctx, n, fences); +} + +void GL_APIENTRY glDeleteFramebuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *framebuffers) +{ + return GL_DeleteFramebuffersContextANGLE(ctx, n, framebuffers); +} + +void GL_APIENTRY glDeleteFramebuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *framebuffers) +{ + return GL_DeleteFramebuffersOESContextANGLE(ctx, n, framebuffers); +} + +void GL_APIENTRY glDeleteMemoryObjectsEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *memoryObjects) +{ + return GL_DeleteMemoryObjectsEXTContextANGLE(ctx, n, memoryObjects); +} + +void GL_APIENTRY glDeleteProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + return GL_DeleteProgramContextANGLE(ctx, program); +} + +void GL_APIENTRY glDeleteProgramPipelinesContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *pipelines) +{ + return GL_DeleteProgramPipelinesContextANGLE(ctx, n, pipelines); +} + +void GL_APIENTRY glDeleteProgramPipelinesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *pipelines) +{ + return GL_DeleteProgramPipelinesEXTContextANGLE(ctx, n, pipelines); +} + +void GL_APIENTRY glDeleteQueriesContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *ids) +{ + return GL_DeleteQueriesContextANGLE(ctx, n, ids); +} + +void GL_APIENTRY glDeleteQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *ids) +{ + return GL_DeleteQueriesEXTContextANGLE(ctx, n, ids); +} + +void GL_APIENTRY glDeleteRenderbuffersContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *renderbuffers) +{ + return GL_DeleteRenderbuffersContextANGLE(ctx, n, renderbuffers); +} + +void GL_APIENTRY glDeleteRenderbuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *renderbuffers) +{ + return GL_DeleteRenderbuffersOESContextANGLE(ctx, n, renderbuffers); +} + +void GL_APIENTRY glDeleteSamplersContextANGLE(GLeglContext ctx, + GLsizei count, + const GLuint *samplers) +{ + return GL_DeleteSamplersContextANGLE(ctx, count, samplers); +} + +void GL_APIENTRY glDeleteSemaphoresEXTContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *semaphores) +{ + return GL_DeleteSemaphoresEXTContextANGLE(ctx, n, semaphores); +} + +void GL_APIENTRY glDeleteShaderContextANGLE(GLeglContext ctx, GLuint shader) +{ + return GL_DeleteShaderContextANGLE(ctx, shader); +} + +void GL_APIENTRY glDeleteSyncContextANGLE(GLeglContext ctx, GLsync sync) +{ + return GL_DeleteSyncContextANGLE(ctx, sync); +} + +void GL_APIENTRY glDeleteTexturesContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *textures) +{ + return GL_DeleteTexturesContextANGLE(ctx, n, textures); +} + +void GL_APIENTRY glDeleteTransformFeedbacksContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *ids) +{ + return GL_DeleteTransformFeedbacksContextANGLE(ctx, n, ids); +} + +void GL_APIENTRY glDeleteVertexArraysContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *arrays) +{ + return GL_DeleteVertexArraysContextANGLE(ctx, n, arrays); +} + +void GL_APIENTRY glDeleteVertexArraysOESContextANGLE(GLeglContext ctx, + GLsizei n, + const GLuint *arrays) +{ + return GL_DeleteVertexArraysOESContextANGLE(ctx, n, arrays); +} + +void GL_APIENTRY glDepthFuncContextANGLE(GLeglContext ctx, GLenum func) +{ + return GL_DepthFuncContextANGLE(ctx, func); +} + +void GL_APIENTRY glDepthMaskContextANGLE(GLeglContext ctx, GLboolean flag) +{ + return GL_DepthMaskContextANGLE(ctx, flag); +} + +void GL_APIENTRY glDepthRangefContextANGLE(GLeglContext ctx, GLfloat n, GLfloat f) +{ + return GL_DepthRangefContextANGLE(ctx, n, f); +} + +void GL_APIENTRY glDepthRangexContextANGLE(GLeglContext ctx, GLfixed n, GLfixed f) +{ + return GL_DepthRangexContextANGLE(ctx, n, f); +} + +void GL_APIENTRY glDetachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader) +{ + return GL_DetachShaderContextANGLE(ctx, program, shader); +} + +void GL_APIENTRY glDisableContextANGLE(GLeglContext ctx, GLenum cap) +{ + return GL_DisableContextANGLE(ctx, cap); +} + +void GL_APIENTRY glDisableClientStateContextANGLE(GLeglContext ctx, GLenum array) +{ + return GL_DisableClientStateContextANGLE(ctx, array); +} + +void GL_APIENTRY glDisableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint index) +{ + return GL_DisableVertexAttribArrayContextANGLE(ctx, index); +} + +void GL_APIENTRY glDisableiContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_DisableiContextANGLE(ctx, target, index); +} + +void GL_APIENTRY glDisableiEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_DisableiEXTContextANGLE(ctx, target, index); +} + +void GL_APIENTRY glDisableiOESContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_DisableiOESContextANGLE(ctx, target, index); +} + +void GL_APIENTRY glDiscardFramebufferEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + return GL_DiscardFramebufferEXTContextANGLE(ctx, target, numAttachments, attachments); +} + +void GL_APIENTRY glDispatchComputeContextANGLE(GLeglContext ctx, + GLuint num_groups_x, + GLuint num_groups_y, + GLuint num_groups_z) +{ + return GL_DispatchComputeContextANGLE(ctx, num_groups_x, num_groups_y, num_groups_z); +} + +void GL_APIENTRY glDispatchComputeIndirectContextANGLE(GLeglContext ctx, GLintptr indirect) +{ + return GL_DispatchComputeIndirectContextANGLE(ctx, indirect); +} + +void GL_APIENTRY glDrawArraysContextANGLE(GLeglContext ctx, GLenum mode, GLint first, GLsizei count) +{ + return GL_DrawArraysContextANGLE(ctx, mode, first, count); +} + +void GL_APIENTRY glDrawArraysIndirectContextANGLE(GLeglContext ctx, + GLenum mode, + const void *indirect) +{ + return GL_DrawArraysIndirectContextANGLE(ctx, mode, indirect); +} + +void GL_APIENTRY glDrawArraysInstancedContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount) +{ + return GL_DrawArraysInstancedContextANGLE(ctx, mode, first, count, instancecount); +} + +void GL_APIENTRY glDrawArraysInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) +{ + return GL_DrawArraysInstancedANGLEContextANGLE(ctx, mode, first, count, primcount); +} + +void GL_APIENTRY glDrawArraysInstancedEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLint start, + GLsizei count, + GLsizei primcount) +{ + return GL_DrawArraysInstancedEXTContextANGLE(ctx, mode, start, count, primcount); +} + +void GL_APIENTRY glDrawBuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLenum *bufs) +{ + return GL_DrawBuffersContextANGLE(ctx, n, bufs); +} + +void GL_APIENTRY glDrawBuffersEXTContextANGLE(GLeglContext ctx, GLsizei n, const GLenum *bufs) +{ + return GL_DrawBuffersEXTContextANGLE(ctx, n, bufs); +} + +void GL_APIENTRY glDrawElementsContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices) +{ + return GL_DrawElementsContextANGLE(ctx, mode, count, type, indices); +} + +void GL_APIENTRY glDrawElementsBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawElementsBaseVertexContextANGLE(ctx, mode, count, type, indices, basevertex); +} + +void GL_APIENTRY glDrawElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawElementsBaseVertexEXTContextANGLE(ctx, mode, count, type, indices, basevertex); +} + +void GL_APIENTRY glDrawElementsBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawElementsBaseVertexOESContextANGLE(ctx, mode, count, type, indices, basevertex); +} + +void GL_APIENTRY glDrawElementsIndirectContextANGLE(GLeglContext ctx, + GLenum mode, + GLenum type, + const void *indirect) +{ + return GL_DrawElementsIndirectContextANGLE(ctx, mode, type, indirect); +} + +void GL_APIENTRY glDrawElementsInstancedContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount) +{ + return GL_DrawElementsInstancedContextANGLE(ctx, mode, count, type, indices, instancecount); +} + +void GL_APIENTRY glDrawElementsInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + return GL_DrawElementsInstancedANGLEContextANGLE(ctx, mode, count, type, indices, primcount); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + return GL_DrawElementsInstancedBaseVertexContextANGLE(ctx, mode, count, type, indices, + instancecount, basevertex); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + return GL_DrawElementsInstancedBaseVertexEXTContextANGLE(ctx, mode, count, type, indices, + instancecount, basevertex); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex) +{ + return GL_DrawElementsInstancedBaseVertexOESContextANGLE(ctx, mode, count, type, indices, + instancecount, basevertex); +} + +void GL_APIENTRY glDrawElementsInstancedEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount) +{ + return GL_DrawElementsInstancedEXTContextANGLE(ctx, mode, count, type, indices, primcount); +} + +void GL_APIENTRY glDrawRangeElementsContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices) +{ + return GL_DrawRangeElementsContextANGLE(ctx, mode, start, end, count, type, indices); +} + +void GL_APIENTRY glDrawRangeElementsBaseVertexContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawRangeElementsBaseVertexContextANGLE(ctx, mode, start, end, count, type, indices, + basevertex); +} + +void GL_APIENTRY glDrawRangeElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawRangeElementsBaseVertexEXTContextANGLE(ctx, mode, start, end, count, type, + indices, basevertex); +} + +void GL_APIENTRY glDrawRangeElementsBaseVertexOESContextANGLE(GLeglContext ctx, + GLenum mode, + GLuint start, + GLuint end, + GLsizei count, + GLenum type, + const void *indices, + GLint basevertex) +{ + return GL_DrawRangeElementsBaseVertexOESContextANGLE(ctx, mode, start, end, count, type, + indices, basevertex); +} + +void GL_APIENTRY glDrawTexfOESContextANGLE(GLeglContext ctx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat width, + GLfloat height) +{ + return GL_DrawTexfOESContextANGLE(ctx, x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexfvOESContextANGLE(GLeglContext ctx, const GLfloat *coords) +{ + return GL_DrawTexfvOESContextANGLE(ctx, coords); +} + +void GL_APIENTRY +glDrawTexiOESContextANGLE(GLeglContext ctx, GLint x, GLint y, GLint z, GLint width, GLint height) +{ + return GL_DrawTexiOESContextANGLE(ctx, x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexivOESContextANGLE(GLeglContext ctx, const GLint *coords) +{ + return GL_DrawTexivOESContextANGLE(ctx, coords); +} + +void GL_APIENTRY glDrawTexsOESContextANGLE(GLeglContext ctx, + GLshort x, + GLshort y, + GLshort z, + GLshort width, + GLshort height) +{ + return GL_DrawTexsOESContextANGLE(ctx, x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexsvOESContextANGLE(GLeglContext ctx, const GLshort *coords) +{ + return GL_DrawTexsvOESContextANGLE(ctx, coords); +} + +void GL_APIENTRY glDrawTexxOESContextANGLE(GLeglContext ctx, + GLfixed x, + GLfixed y, + GLfixed z, + GLfixed width, + GLfixed height) +{ + return GL_DrawTexxOESContextANGLE(ctx, x, y, z, width, height); +} + +void GL_APIENTRY glDrawTexxvOESContextANGLE(GLeglContext ctx, const GLfixed *coords) +{ + return GL_DrawTexxvOESContextANGLE(ctx, coords); +} + +void GL_APIENTRY glEGLImageTargetRenderbufferStorageOESContextANGLE(GLeglContext ctx, + GLenum target, + GLeglImageOES image) +{ + return GL_EGLImageTargetRenderbufferStorageOESContextANGLE(ctx, target, image); +} + +void GL_APIENTRY glEGLImageTargetTexture2DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLeglImageOES image) +{ + return GL_EGLImageTargetTexture2DOESContextANGLE(ctx, target, image); +} + +void GL_APIENTRY glEnableContextANGLE(GLeglContext ctx, GLenum cap) +{ + return GL_EnableContextANGLE(ctx, cap); +} + +void GL_APIENTRY glEnableClientStateContextANGLE(GLeglContext ctx, GLenum array) +{ + return GL_EnableClientStateContextANGLE(ctx, array); +} + +void GL_APIENTRY glEnableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint index) +{ + return GL_EnableVertexAttribArrayContextANGLE(ctx, index); +} + +void GL_APIENTRY glEnableiContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_EnableiContextANGLE(ctx, target, index); +} + +void GL_APIENTRY glEnableiEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_EnableiEXTContextANGLE(ctx, target, index); +} + +void GL_APIENTRY glEnableiOESContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_EnableiOESContextANGLE(ctx, target, index); +} + +void GL_APIENTRY glEndQueryContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_EndQueryContextANGLE(ctx, target); +} + +void GL_APIENTRY glEndQueryEXTContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_EndQueryEXTContextANGLE(ctx, target); +} + +void GL_APIENTRY glEndTransformFeedbackContextANGLE(GLeglContext ctx) +{ + return GL_EndTransformFeedbackContextANGLE(ctx); +} + +GLsync GL_APIENTRY glFenceSyncContextANGLE(GLeglContext ctx, GLenum condition, GLbitfield flags) +{ + return GL_FenceSyncContextANGLE(ctx, condition, flags); +} + +void GL_APIENTRY glFinishContextANGLE(GLeglContext ctx) +{ + return GL_FinishContextANGLE(ctx); +} + +void GL_APIENTRY glFinishFenceNVContextANGLE(GLeglContext ctx, GLuint fence) +{ + return GL_FinishFenceNVContextANGLE(ctx, fence); +} + +void GL_APIENTRY glFlushContextANGLE(GLeglContext ctx) +{ + return GL_FlushContextANGLE(ctx); +} + +void GL_APIENTRY glFlushMappedBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length) +{ + return GL_FlushMappedBufferRangeContextANGLE(ctx, target, offset, length); +} + +void GL_APIENTRY glFlushMappedBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length) +{ + return GL_FlushMappedBufferRangeEXTContextANGLE(ctx, target, offset, length); +} + +void GL_APIENTRY glFogfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param) +{ + return GL_FogfContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glFogfvContextANGLE(GLeglContext ctx, GLenum pname, const GLfloat *params) +{ + return GL_FogfvContextANGLE(ctx, pname, params); +} + +void GL_APIENTRY glFogxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param) +{ + return GL_FogxContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glFogxvContextANGLE(GLeglContext ctx, GLenum pname, const GLfixed *param) +{ + return GL_FogxvContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glFramebufferFetchBarrierEXTContextANGLE(GLeglContext ctx) +{ + return GL_FramebufferFetchBarrierEXTContextANGLE(ctx); +} + +void GL_APIENTRY glFramebufferParameteriContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint param) +{ + return GL_FramebufferParameteriContextANGLE(ctx, target, pname, param); +} + +void GL_APIENTRY glFramebufferRenderbufferContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + return GL_FramebufferRenderbufferContextANGLE(ctx, target, attachment, renderbuffertarget, + renderbuffer); +} + +void GL_APIENTRY glFramebufferRenderbufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + return GL_FramebufferRenderbufferOESContextANGLE(ctx, target, attachment, renderbuffertarget, + renderbuffer); +} + +void GL_APIENTRY glFramebufferTextureContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level) +{ + return GL_FramebufferTextureContextANGLE(ctx, target, attachment, texture, level); +} + +void GL_APIENTRY glFramebufferTexture2DContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + return GL_FramebufferTexture2DContextANGLE(ctx, target, attachment, textarget, texture, level); +} + +void GL_APIENTRY glFramebufferTexture2DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) +{ + return GL_FramebufferTexture2DMultisampleEXTContextANGLE(ctx, target, attachment, textarget, + texture, level, samples); +} + +void GL_APIENTRY glFramebufferTexture2DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) +{ + return GL_FramebufferTexture2DOESContextANGLE(ctx, target, attachment, textarget, texture, + level); +} + +void GL_APIENTRY glFramebufferTexture3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLint zoffset) +{ + return GL_FramebufferTexture3DOESContextANGLE(ctx, target, attachment, textarget, texture, + level, zoffset); +} + +void GL_APIENTRY glFramebufferTextureEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level) +{ + return GL_FramebufferTextureEXTContextANGLE(ctx, target, attachment, texture, level); +} + +void GL_APIENTRY glFramebufferTextureLayerContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint layer) +{ + return GL_FramebufferTextureLayerContextANGLE(ctx, target, attachment, texture, level, layer); +} + +void GL_APIENTRY glFramebufferTextureMultiviewOVRContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLuint texture, + GLint level, + GLint baseViewIndex, + GLsizei numViews) +{ + return GL_FramebufferTextureMultiviewOVRContextANGLE(ctx, target, attachment, texture, level, + baseViewIndex, numViews); +} + +void GL_APIENTRY glFrontFaceContextANGLE(GLeglContext ctx, GLenum mode) +{ + return GL_FrontFaceContextANGLE(ctx, mode); +} + +void GL_APIENTRY glFrustumfContextANGLE(GLeglContext ctx, + GLfloat l, + GLfloat r, + GLfloat b, + GLfloat t, + GLfloat n, + GLfloat f) +{ + return GL_FrustumfContextANGLE(ctx, l, r, b, t, n, f); +} + +void GL_APIENTRY glFrustumxContextANGLE(GLeglContext ctx, + GLfixed l, + GLfixed r, + GLfixed b, + GLfixed t, + GLfixed n, + GLfixed f) +{ + return GL_FrustumxContextANGLE(ctx, l, r, b, t, n, f); +} + +void GL_APIENTRY glGenBuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *buffers) +{ + return GL_GenBuffersContextANGLE(ctx, n, buffers); +} + +void GL_APIENTRY glGenFencesNVContextANGLE(GLeglContext ctx, GLsizei n, GLuint *fences) +{ + return GL_GenFencesNVContextANGLE(ctx, n, fences); +} + +void GL_APIENTRY glGenFramebuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *framebuffers) +{ + return GL_GenFramebuffersContextANGLE(ctx, n, framebuffers); +} + +void GL_APIENTRY glGenFramebuffersOESContextANGLE(GLeglContext ctx, GLsizei n, GLuint *framebuffers) +{ + return GL_GenFramebuffersOESContextANGLE(ctx, n, framebuffers); +} + +void GL_APIENTRY glGenProgramPipelinesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *pipelines) +{ + return GL_GenProgramPipelinesContextANGLE(ctx, n, pipelines); +} + +void GL_APIENTRY glGenProgramPipelinesEXTContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *pipelines) +{ + return GL_GenProgramPipelinesEXTContextANGLE(ctx, n, pipelines); +} + +void GL_APIENTRY glGenQueriesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids) +{ + return GL_GenQueriesContextANGLE(ctx, n, ids); +} + +void GL_APIENTRY glGenQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids) +{ + return GL_GenQueriesEXTContextANGLE(ctx, n, ids); +} + +void GL_APIENTRY glGenRenderbuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *renderbuffers) +{ + return GL_GenRenderbuffersContextANGLE(ctx, n, renderbuffers); +} + +void GL_APIENTRY glGenRenderbuffersOESContextANGLE(GLeglContext ctx, + GLsizei n, + GLuint *renderbuffers) +{ + return GL_GenRenderbuffersOESContextANGLE(ctx, n, renderbuffers); +} + +void GL_APIENTRY glGenSamplersContextANGLE(GLeglContext ctx, GLsizei count, GLuint *samplers) +{ + return GL_GenSamplersContextANGLE(ctx, count, samplers); +} + +void GL_APIENTRY glGenSemaphoresEXTContextANGLE(GLeglContext ctx, GLsizei n, GLuint *semaphores) +{ + return GL_GenSemaphoresEXTContextANGLE(ctx, n, semaphores); +} + +void GL_APIENTRY glGenTexturesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *textures) +{ + return GL_GenTexturesContextANGLE(ctx, n, textures); +} + +void GL_APIENTRY glGenTransformFeedbacksContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids) +{ + return GL_GenTransformFeedbacksContextANGLE(ctx, n, ids); +} + +void GL_APIENTRY glGenVertexArraysContextANGLE(GLeglContext ctx, GLsizei n, GLuint *arrays) +{ + return GL_GenVertexArraysContextANGLE(ctx, n, arrays); +} + +void GL_APIENTRY glGenVertexArraysOESContextANGLE(GLeglContext ctx, GLsizei n, GLuint *arrays) +{ + return GL_GenVertexArraysOESContextANGLE(ctx, n, arrays); +} + +void GL_APIENTRY glGenerateMipmapContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_GenerateMipmapContextANGLE(ctx, target); +} + +void GL_APIENTRY glGenerateMipmapOESContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_GenerateMipmapOESContextANGLE(ctx, target); +} + +void GL_APIENTRY glGetActiveAttribContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + return GL_GetActiveAttribContextANGLE(ctx, program, index, bufSize, length, size, type, name); +} + +void GL_APIENTRY glGetActiveUniformContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *size, + GLenum *type, + GLchar *name) +{ + return GL_GetActiveUniformContextANGLE(ctx, program, index, bufSize, length, size, type, name); +} + +void GL_APIENTRY glGetActiveUniformBlockNameContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLsizei bufSize, + GLsizei *length, + GLchar *uniformBlockName) +{ + return GL_GetActiveUniformBlockNameContextANGLE(ctx, program, uniformBlockIndex, bufSize, + length, uniformBlockName); +} + +void GL_APIENTRY glGetActiveUniformBlockivContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLint *params) +{ + return GL_GetActiveUniformBlockivContextANGLE(ctx, program, uniformBlockIndex, pname, params); +} + +void GL_APIENTRY glGetActiveUniformsivContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei uniformCount, + const GLuint *uniformIndices, + GLenum pname, + GLint *params) +{ + return GL_GetActiveUniformsivContextANGLE(ctx, program, uniformCount, uniformIndices, pname, + params); +} + +void GL_APIENTRY glGetAttachedShadersContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei maxCount, + GLsizei *count, + GLuint *shaders) +{ + return GL_GetAttachedShadersContextANGLE(ctx, program, maxCount, count, shaders); +} + +GLint GL_APIENTRY glGetAttribLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + return GL_GetAttribLocationContextANGLE(ctx, program, name); +} + +void GL_APIENTRY glGetBooleani_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLboolean *data) +{ + return GL_GetBooleani_vContextANGLE(ctx, target, index, data); +} + +void GL_APIENTRY glGetBooleanvContextANGLE(GLeglContext ctx, GLenum pname, GLboolean *data) +{ + return GL_GetBooleanvContextANGLE(ctx, pname, data); +} + +void GL_APIENTRY glGetBufferParameteri64vContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint64 *params) +{ + return GL_GetBufferParameteri64vContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetBufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetBufferParameterivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetBufferPointervContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + void **params) +{ + return GL_GetBufferPointervContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetBufferPointervOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + void **params) +{ + return GL_GetBufferPointervOESContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetClipPlanefContextANGLE(GLeglContext ctx, GLenum plane, GLfloat *equation) +{ + return GL_GetClipPlanefContextANGLE(ctx, plane, equation); +} + +void GL_APIENTRY glGetClipPlanexContextANGLE(GLeglContext ctx, GLenum plane, GLfixed *equation) +{ + return GL_GetClipPlanexContextANGLE(ctx, plane, equation); +} + +GLuint GL_APIENTRY glGetDebugMessageLogContextANGLE(GLeglContext ctx, + GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + return GL_GetDebugMessageLogContextANGLE(ctx, count, bufSize, sources, types, ids, severities, + lengths, messageLog); +} + +GLuint GL_APIENTRY glGetDebugMessageLogKHRContextANGLE(GLeglContext ctx, + GLuint count, + GLsizei bufSize, + GLenum *sources, + GLenum *types, + GLuint *ids, + GLenum *severities, + GLsizei *lengths, + GLchar *messageLog) +{ + return GL_GetDebugMessageLogKHRContextANGLE(ctx, count, bufSize, sources, types, ids, + severities, lengths, messageLog); +} + +GLenum GL_APIENTRY glGetErrorContextANGLE(GLeglContext ctx) +{ + return GL_GetErrorContextANGLE(ctx); +} + +void GL_APIENTRY glGetFenceivNVContextANGLE(GLeglContext ctx, + GLuint fence, + GLenum pname, + GLint *params) +{ + return GL_GetFenceivNVContextANGLE(ctx, fence, pname, params); +} + +void GL_APIENTRY glGetFixedvContextANGLE(GLeglContext ctx, GLenum pname, GLfixed *params) +{ + return GL_GetFixedvContextANGLE(ctx, pname, params); +} + +void GL_APIENTRY glGetFloatvContextANGLE(GLeglContext ctx, GLenum pname, GLfloat *data) +{ + return GL_GetFloatvContextANGLE(ctx, pname, data); +} + +GLint GL_APIENTRY glGetFragDataIndexEXTContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + return GL_GetFragDataIndexEXTContextANGLE(ctx, program, name); +} + +GLint GL_APIENTRY glGetFragDataLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + return GL_GetFragDataLocationContextANGLE(ctx, program, name); +} + +void GL_APIENTRY glGetFramebufferAttachmentParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + return GL_GetFramebufferAttachmentParameterivContextANGLE(ctx, target, attachment, pname, + params); +} + +void GL_APIENTRY glGetFramebufferAttachmentParameterivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLint *params) +{ + return GL_GetFramebufferAttachmentParameterivOESContextANGLE(ctx, target, attachment, pname, + params); +} + +void GL_APIENTRY glGetFramebufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetFramebufferParameterivContextANGLE(ctx, target, pname, params); +} + +GLenum GL_APIENTRY glGetGraphicsResetStatusContextANGLE(GLeglContext ctx) +{ + return GL_GetGraphicsResetStatusContextANGLE(ctx); +} + +GLenum GL_APIENTRY glGetGraphicsResetStatusEXTContextANGLE(GLeglContext ctx) +{ + return GL_GetGraphicsResetStatusEXTContextANGLE(ctx); +} + +void GL_APIENTRY glGetInteger64i_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLint64 *data) +{ + return GL_GetInteger64i_vContextANGLE(ctx, target, index, data); +} + +void GL_APIENTRY glGetInteger64vContextANGLE(GLeglContext ctx, GLenum pname, GLint64 *data) +{ + return GL_GetInteger64vContextANGLE(ctx, pname, data); +} + +void GL_APIENTRY glGetInteger64vEXTContextANGLE(GLeglContext ctx, GLenum pname, GLint64 *data) +{ + return GL_GetInteger64vEXTContextANGLE(ctx, pname, data); +} + +void GL_APIENTRY glGetIntegeri_vContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLint *data) +{ + return GL_GetIntegeri_vContextANGLE(ctx, target, index, data); +} + +void GL_APIENTRY glGetIntegervContextANGLE(GLeglContext ctx, GLenum pname, GLint *data) +{ + return GL_GetIntegervContextANGLE(ctx, pname, data); +} + +void GL_APIENTRY glGetInternalformativContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLint *params) +{ + return GL_GetInternalformativContextANGLE(ctx, target, internalformat, pname, bufSize, params); +} + +void GL_APIENTRY glGetLightfvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfloat *params) +{ + return GL_GetLightfvContextANGLE(ctx, light, pname, params); +} + +void GL_APIENTRY glGetLightxvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + GLfixed *params) +{ + return GL_GetLightxvContextANGLE(ctx, light, pname, params); +} + +void GL_APIENTRY glGetMaterialfvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfloat *params) +{ + return GL_GetMaterialfvContextANGLE(ctx, face, pname, params); +} + +void GL_APIENTRY glGetMaterialxvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + GLfixed *params) +{ + return GL_GetMaterialxvContextANGLE(ctx, face, pname, params); +} + +void GL_APIENTRY glGetMemoryObjectParameterivEXTContextANGLE(GLeglContext ctx, + GLuint memoryObject, + GLenum pname, + GLint *params) +{ + return GL_GetMemoryObjectParameterivEXTContextANGLE(ctx, memoryObject, pname, params); +} + +void GL_APIENTRY glGetMultisamplefvContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLfloat *val) +{ + return GL_GetMultisamplefvContextANGLE(ctx, pname, index, val); +} + +void GL_APIENTRY glGetObjectLabelContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + return GL_GetObjectLabelContextANGLE(ctx, identifier, name, bufSize, length, label); +} + +void GL_APIENTRY glGetObjectLabelEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLuint object, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + return GL_GetObjectLabelEXTContextANGLE(ctx, type, object, bufSize, length, label); +} + +void GL_APIENTRY glGetObjectLabelKHRContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + return GL_GetObjectLabelKHRContextANGLE(ctx, identifier, name, bufSize, length, label); +} + +void GL_APIENTRY glGetObjectPtrLabelContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + return GL_GetObjectPtrLabelContextANGLE(ctx, ptr, bufSize, length, label); +} + +void GL_APIENTRY glGetObjectPtrLabelKHRContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei bufSize, + GLsizei *length, + GLchar *label) +{ + return GL_GetObjectPtrLabelKHRContextANGLE(ctx, ptr, bufSize, length, label); +} + +void GL_APIENTRY glGetPointervContextANGLE(GLeglContext ctx, GLenum pname, void **params) +{ + return GL_GetPointervContextANGLE(ctx, pname, params); +} + +void GL_APIENTRY glGetPointervKHRContextANGLE(GLeglContext ctx, GLenum pname, void **params) +{ + return GL_GetPointervKHRContextANGLE(ctx, pname, params); +} + +void GL_APIENTRY glGetProgramBinaryContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + return GL_GetProgramBinaryContextANGLE(ctx, program, bufSize, length, binaryFormat, binary); +} + +void GL_APIENTRY glGetProgramBinaryOESContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) +{ + return GL_GetProgramBinaryOESContextANGLE(ctx, program, bufSize, length, binaryFormat, binary); +} + +void GL_APIENTRY glGetProgramInfoLogContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetProgramInfoLogContextANGLE(ctx, program, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetProgramInterfaceivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLenum pname, + GLint *params) +{ + return GL_GetProgramInterfaceivContextANGLE(ctx, program, programInterface, pname, params); +} + +void GL_APIENTRY glGetProgramPipelineInfoLogContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetProgramPipelineInfoLogContextANGLE(ctx, pipeline, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetProgramPipelineInfoLogEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetProgramPipelineInfoLogEXTContextANGLE(ctx, pipeline, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetProgramPipelineivContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLenum pname, + GLint *params) +{ + return GL_GetProgramPipelineivContextANGLE(ctx, pipeline, pname, params); +} + +void GL_APIENTRY glGetProgramPipelineivEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLenum pname, + GLint *params) +{ + return GL_GetProgramPipelineivEXTContextANGLE(ctx, pipeline, pname, params); +} + +GLuint GL_APIENTRY glGetProgramResourceIndexContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name) +{ + return GL_GetProgramResourceIndexContextANGLE(ctx, program, programInterface, name); +} + +GLint GL_APIENTRY glGetProgramResourceLocationContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name) +{ + return GL_GetProgramResourceLocationContextANGLE(ctx, program, programInterface, name); +} + +GLint GL_APIENTRY glGetProgramResourceLocationIndexEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + const GLchar *name) +{ + return GL_GetProgramResourceLocationIndexEXTContextANGLE(ctx, program, programInterface, name); +} + +void GL_APIENTRY glGetProgramResourceNameContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLchar *name) +{ + return GL_GetProgramResourceNameContextANGLE(ctx, program, programInterface, index, bufSize, + length, name); +} + +void GL_APIENTRY glGetProgramResourceivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLuint index, + GLsizei propCount, + const GLenum *props, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetProgramResourceivContextANGLE(ctx, program, programInterface, index, propCount, + props, bufSize, length, params); +} + +void GL_APIENTRY glGetProgramivContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint *params) +{ + return GL_GetProgramivContextANGLE(ctx, program, pname, params); +} + +void GL_APIENTRY glGetQueryObjecti64vEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLint64 *params) +{ + return GL_GetQueryObjecti64vEXTContextANGLE(ctx, id, pname, params); +} + +void GL_APIENTRY glGetQueryObjectivEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLint *params) +{ + return GL_GetQueryObjectivEXTContextANGLE(ctx, id, pname, params); +} + +void GL_APIENTRY glGetQueryObjectui64vEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint64 *params) +{ + return GL_GetQueryObjectui64vEXTContextANGLE(ctx, id, pname, params); +} + +void GL_APIENTRY glGetQueryObjectuivContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint *params) +{ + return GL_GetQueryObjectuivContextANGLE(ctx, id, pname, params); +} + +void GL_APIENTRY glGetQueryObjectuivEXTContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLuint *params) +{ + return GL_GetQueryObjectuivEXTContextANGLE(ctx, id, pname, params); +} + +void GL_APIENTRY glGetQueryivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetQueryivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetQueryivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetQueryivEXTContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetRenderbufferParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetRenderbufferParameterivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetRenderbufferParameterivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetRenderbufferParameterivOESContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + return GL_GetSamplerParameterIivContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + return GL_GetSamplerParameterIivEXTContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + return GL_GetSamplerParameterIivOESContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIuivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params) +{ + return GL_GetSamplerParameterIuivContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIuivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params) +{ + return GL_GetSamplerParameterIuivEXTContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterIuivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLuint *params) +{ + return GL_GetSamplerParameterIuivOESContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterfvContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLfloat *params) +{ + return GL_GetSamplerParameterfvContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSamplerParameterivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint *params) +{ + return GL_GetSamplerParameterivContextANGLE(ctx, sampler, pname, params); +} + +void GL_APIENTRY glGetSemaphoreParameterui64vEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum pname, + GLuint64 *params) +{ + return GL_GetSemaphoreParameterui64vEXTContextANGLE(ctx, semaphore, pname, params); +} + +void GL_APIENTRY glGetShaderInfoLogContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *infoLog) +{ + return GL_GetShaderInfoLogContextANGLE(ctx, shader, bufSize, length, infoLog); +} + +void GL_APIENTRY glGetShaderPrecisionFormatContextANGLE(GLeglContext ctx, + GLenum shadertype, + GLenum precisiontype, + GLint *range, + GLint *precision) +{ + return GL_GetShaderPrecisionFormatContextANGLE(ctx, shadertype, precisiontype, range, + precision); +} + +void GL_APIENTRY glGetShaderSourceContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufSize, + GLsizei *length, + GLchar *source) +{ + return GL_GetShaderSourceContextANGLE(ctx, shader, bufSize, length, source); +} + +void GL_APIENTRY glGetShaderivContextANGLE(GLeglContext ctx, + GLuint shader, + GLenum pname, + GLint *params) +{ + return GL_GetShaderivContextANGLE(ctx, shader, pname, params); +} + +const GLubyte *GL_APIENTRY glGetStringContextANGLE(GLeglContext ctx, GLenum name) +{ + return GL_GetStringContextANGLE(ctx, name); +} + +const GLubyte *GL_APIENTRY glGetStringiContextANGLE(GLeglContext ctx, GLenum name, GLuint index) +{ + return GL_GetStringiContextANGLE(ctx, name, index); +} + +void GL_APIENTRY glGetSyncivContextANGLE(GLeglContext ctx, + GLsync sync, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *values) +{ + return GL_GetSyncivContextANGLE(ctx, sync, pname, bufSize, length, values); +} + +void GL_APIENTRY glGetTexEnvfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat *params) +{ + return GL_GetTexEnvfvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexEnvivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetTexEnvivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexEnvxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed *params) +{ + return GL_GetTexEnvxvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexGenfvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfloat *params) +{ + return GL_GetTexGenfvOESContextANGLE(ctx, coord, pname, params); +} + +void GL_APIENTRY glGetTexGenivOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLint *params) +{ + return GL_GetTexGenivOESContextANGLE(ctx, coord, pname, params); +} + +void GL_APIENTRY glGetTexGenxvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfixed *params) +{ + return GL_GetTexGenxvOESContextANGLE(ctx, coord, pname, params); +} + +void GL_APIENTRY glGetTexLevelParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLfloat *params) +{ + return GL_GetTexLevelParameterfvContextANGLE(ctx, target, level, pname, params); +} + +void GL_APIENTRY glGetTexLevelParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLint *params) +{ + return GL_GetTexLevelParameterivContextANGLE(ctx, target, level, pname, params); +} + +void GL_APIENTRY glGetTexParameterIivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetTexParameterIivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetTexParameterIivEXTContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetTexParameterIivOESContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIuivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params) +{ + return GL_GetTexParameterIuivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIuivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params) +{ + return GL_GetTexParameterIuivEXTContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterIuivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLuint *params) +{ + return GL_GetTexParameterIuivOESContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat *params) +{ + return GL_GetTexParameterfvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint *params) +{ + return GL_GetTexParameterivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTexParameterxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed *params) +{ + return GL_GetTexParameterxvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glGetTransformFeedbackVaryingContextANGLE(GLeglContext ctx, + GLuint program, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLsizei *size, + GLenum *type, + GLchar *name) +{ + return GL_GetTransformFeedbackVaryingContextANGLE(ctx, program, index, bufSize, length, size, + type, name); +} + +void GL_APIENTRY glGetTranslatedShaderSourceANGLEContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei bufsize, + GLsizei *length, + GLchar *source) +{ + return GL_GetTranslatedShaderSourceANGLEContextANGLE(ctx, shader, bufsize, length, source); +} + +GLuint GL_APIENTRY glGetUniformBlockIndexContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *uniformBlockName) +{ + return GL_GetUniformBlockIndexContextANGLE(ctx, program, uniformBlockName); +} + +void GL_APIENTRY glGetUniformIndicesContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint *uniformIndices) +{ + return GL_GetUniformIndicesContextANGLE(ctx, program, uniformCount, uniformNames, + uniformIndices); +} + +GLint GL_APIENTRY glGetUniformLocationContextANGLE(GLeglContext ctx, + GLuint program, + const GLchar *name) +{ + return GL_GetUniformLocationContextANGLE(ctx, program, name); +} + +void GL_APIENTRY glGetUniformfvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat *params) +{ + return GL_GetUniformfvContextANGLE(ctx, program, location, params); +} + +void GL_APIENTRY glGetUniformivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint *params) +{ + return GL_GetUniformivContextANGLE(ctx, program, location, params); +} + +void GL_APIENTRY glGetUniformuivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint *params) +{ + return GL_GetUniformuivContextANGLE(ctx, program, location, params); +} + +void GL_APIENTRY glGetUnsignedBytevEXTContextANGLE(GLeglContext ctx, GLenum pname, GLubyte *data) +{ + return GL_GetUnsignedBytevEXTContextANGLE(ctx, pname, data); +} + +void GL_APIENTRY glGetUnsignedBytei_vEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLubyte *data) +{ + return GL_GetUnsignedBytei_vEXTContextANGLE(ctx, target, index, data); +} + +void GL_APIENTRY glGetVertexAttribIivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLint *params) +{ + return GL_GetVertexAttribIivContextANGLE(ctx, index, pname, params); +} + +void GL_APIENTRY glGetVertexAttribIuivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLuint *params) +{ + return GL_GetVertexAttribIuivContextANGLE(ctx, index, pname, params); +} + +void GL_APIENTRY glGetVertexAttribPointervContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + void **pointer) +{ + return GL_GetVertexAttribPointervContextANGLE(ctx, index, pname, pointer); +} + +void GL_APIENTRY glGetVertexAttribfvContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLfloat *params) +{ + return GL_GetVertexAttribfvContextANGLE(ctx, index, pname, params); +} + +void GL_APIENTRY glGetVertexAttribivContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLint *params) +{ + return GL_GetVertexAttribivContextANGLE(ctx, index, pname, params); +} + +void GL_APIENTRY glGetnUniformfvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params) +{ + return GL_GetnUniformfvContextANGLE(ctx, program, location, bufSize, params); +} + +void GL_APIENTRY glGetnUniformfvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLfloat *params) +{ + return GL_GetnUniformfvEXTContextANGLE(ctx, program, location, bufSize, params); +} + +void GL_APIENTRY glGetnUniformivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLint *params) +{ + return GL_GetnUniformivContextANGLE(ctx, program, location, bufSize, params); +} + +void GL_APIENTRY glGetnUniformivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLint *params) +{ + return GL_GetnUniformivEXTContextANGLE(ctx, program, location, bufSize, params); +} + +void GL_APIENTRY glGetnUniformuivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLuint *params) +{ + return GL_GetnUniformuivContextANGLE(ctx, program, location, bufSize, params); +} + +void GL_APIENTRY glHintContextANGLE(GLeglContext ctx, GLenum target, GLenum mode) +{ + return GL_HintContextANGLE(ctx, target, mode); +} + +void GL_APIENTRY glImportMemoryFdEXTContextANGLE(GLeglContext ctx, + GLuint memory, + GLuint64 size, + GLenum handleType, + GLint fd) +{ + return GL_ImportMemoryFdEXTContextANGLE(ctx, memory, size, handleType, fd); +} + +void GL_APIENTRY glImportSemaphoreFdEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum handleType, + GLint fd) +{ + return GL_ImportSemaphoreFdEXTContextANGLE(ctx, semaphore, handleType, fd); +} + +void GL_APIENTRY glInsertEventMarkerEXTContextANGLE(GLeglContext ctx, + GLsizei length, + const GLchar *marker) +{ + return GL_InsertEventMarkerEXTContextANGLE(ctx, length, marker); +} + +void GL_APIENTRY glInvalidateFramebufferContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments) +{ + return GL_InvalidateFramebufferContextANGLE(ctx, target, numAttachments, attachments); +} + +void GL_APIENTRY glInvalidateSubFramebufferContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, + GLint y, + GLsizei width, + GLsizei height) +{ + return GL_InvalidateSubFramebufferContextANGLE(ctx, target, numAttachments, attachments, x, y, + width, height); +} + +GLboolean GL_APIENTRY glIsBufferContextANGLE(GLeglContext ctx, GLuint buffer) +{ + return GL_IsBufferContextANGLE(ctx, buffer); +} + +GLboolean GL_APIENTRY glIsEnabledContextANGLE(GLeglContext ctx, GLenum cap) +{ + return GL_IsEnabledContextANGLE(ctx, cap); +} + +GLboolean GL_APIENTRY glIsEnablediContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_IsEnablediContextANGLE(ctx, target, index); +} + +GLboolean GL_APIENTRY glIsEnablediEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_IsEnablediEXTContextANGLE(ctx, target, index); +} + +GLboolean GL_APIENTRY glIsEnablediOESContextANGLE(GLeglContext ctx, GLenum target, GLuint index) +{ + return GL_IsEnablediOESContextANGLE(ctx, target, index); +} + +GLboolean GL_APIENTRY glIsFenceNVContextANGLE(GLeglContext ctx, GLuint fence) +{ + return GL_IsFenceNVContextANGLE(ctx, fence); +} + +GLboolean GL_APIENTRY glIsFramebufferContextANGLE(GLeglContext ctx, GLuint framebuffer) +{ + return GL_IsFramebufferContextANGLE(ctx, framebuffer); +} + +GLboolean GL_APIENTRY glIsFramebufferOESContextANGLE(GLeglContext ctx, GLuint framebuffer) +{ + return GL_IsFramebufferOESContextANGLE(ctx, framebuffer); +} + +GLboolean GL_APIENTRY glIsMemoryObjectEXTContextANGLE(GLeglContext ctx, GLuint memoryObject) +{ + return GL_IsMemoryObjectEXTContextANGLE(ctx, memoryObject); +} + +GLboolean GL_APIENTRY glIsProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + return GL_IsProgramContextANGLE(ctx, program); +} + +GLboolean GL_APIENTRY glIsProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + return GL_IsProgramPipelineContextANGLE(ctx, pipeline); +} + +GLboolean GL_APIENTRY glIsProgramPipelineEXTContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + return GL_IsProgramPipelineEXTContextANGLE(ctx, pipeline); +} + +GLboolean GL_APIENTRY glIsQueryContextANGLE(GLeglContext ctx, GLuint id) +{ + return GL_IsQueryContextANGLE(ctx, id); +} + +GLboolean GL_APIENTRY glIsQueryEXTContextANGLE(GLeglContext ctx, GLuint id) +{ + return GL_IsQueryEXTContextANGLE(ctx, id); +} + +GLboolean GL_APIENTRY glIsRenderbufferContextANGLE(GLeglContext ctx, GLuint renderbuffer) +{ + return GL_IsRenderbufferContextANGLE(ctx, renderbuffer); +} + +GLboolean GL_APIENTRY glIsRenderbufferOESContextANGLE(GLeglContext ctx, GLuint renderbuffer) +{ + return GL_IsRenderbufferOESContextANGLE(ctx, renderbuffer); +} + +GLboolean GL_APIENTRY glIsSemaphoreEXTContextANGLE(GLeglContext ctx, GLuint semaphore) +{ + return GL_IsSemaphoreEXTContextANGLE(ctx, semaphore); +} + +GLboolean GL_APIENTRY glIsSamplerContextANGLE(GLeglContext ctx, GLuint sampler) +{ + return GL_IsSamplerContextANGLE(ctx, sampler); +} + +GLboolean GL_APIENTRY glIsShaderContextANGLE(GLeglContext ctx, GLuint shader) +{ + return GL_IsShaderContextANGLE(ctx, shader); +} + +GLboolean GL_APIENTRY glIsSyncContextANGLE(GLeglContext ctx, GLsync sync) +{ + return GL_IsSyncContextANGLE(ctx, sync); +} + +GLboolean GL_APIENTRY glIsTextureContextANGLE(GLeglContext ctx, GLuint texture) +{ + return GL_IsTextureContextANGLE(ctx, texture); +} + +GLboolean GL_APIENTRY glIsTransformFeedbackContextANGLE(GLeglContext ctx, GLuint id) +{ + return GL_IsTransformFeedbackContextANGLE(ctx, id); +} + +GLboolean GL_APIENTRY glIsVertexArrayContextANGLE(GLeglContext ctx, GLuint array) +{ + return GL_IsVertexArrayContextANGLE(ctx, array); +} + +GLboolean GL_APIENTRY glIsVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array) +{ + return GL_IsVertexArrayOESContextANGLE(ctx, array); +} + +void GL_APIENTRY glLabelObjectEXTContextANGLE(GLeglContext ctx, + GLenum type, + GLuint object, + GLsizei length, + const GLchar *label) +{ + return GL_LabelObjectEXTContextANGLE(ctx, type, object, length, label); +} + +void GL_APIENTRY glLightModelfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param) +{ + return GL_LightModelfContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glLightModelfvContextANGLE(GLeglContext ctx, GLenum pname, const GLfloat *params) +{ + return GL_LightModelfvContextANGLE(ctx, pname, params); +} + +void GL_APIENTRY glLightModelxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param) +{ + return GL_LightModelxContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glLightModelxvContextANGLE(GLeglContext ctx, GLenum pname, const GLfixed *param) +{ + return GL_LightModelxvContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glLightfContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfloat param) +{ + return GL_LightfContextANGLE(ctx, light, pname, param); +} + +void GL_APIENTRY glLightfvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + const GLfloat *params) +{ + return GL_LightfvContextANGLE(ctx, light, pname, params); +} + +void GL_APIENTRY glLightxContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfixed param) +{ + return GL_LightxContextANGLE(ctx, light, pname, param); +} + +void GL_APIENTRY glLightxvContextANGLE(GLeglContext ctx, + GLenum light, + GLenum pname, + const GLfixed *params) +{ + return GL_LightxvContextANGLE(ctx, light, pname, params); +} + +void GL_APIENTRY glLineWidthContextANGLE(GLeglContext ctx, GLfloat width) +{ + return GL_LineWidthContextANGLE(ctx, width); +} + +void GL_APIENTRY glLineWidthxContextANGLE(GLeglContext ctx, GLfixed width) +{ + return GL_LineWidthxContextANGLE(ctx, width); +} + +void GL_APIENTRY glLinkProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + return GL_LinkProgramContextANGLE(ctx, program); +} + +void GL_APIENTRY glLoadIdentityContextANGLE(GLeglContext ctx) +{ + return GL_LoadIdentityContextANGLE(ctx); +} + +void GL_APIENTRY glLoadMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m) +{ + return GL_LoadMatrixfContextANGLE(ctx, m); +} + +void GL_APIENTRY glLoadMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m) +{ + return GL_LoadMatrixxContextANGLE(ctx, m); +} + +void GL_APIENTRY glLoadPaletteFromModelViewMatrixOESContextANGLE(GLeglContext ctx) +{ + return GL_LoadPaletteFromModelViewMatrixOESContextANGLE(ctx); +} + +void GL_APIENTRY glLogicOpContextANGLE(GLeglContext ctx, GLenum opcode) +{ + return GL_LogicOpContextANGLE(ctx, opcode); +} + +void *GL_APIENTRY glMapBufferOESContextANGLE(GLeglContext ctx, GLenum target, GLenum access) +{ + return GL_MapBufferOESContextANGLE(ctx, target, access); +} + +void *GL_APIENTRY glMapBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + return GL_MapBufferRangeContextANGLE(ctx, target, offset, length, access); +} + +void *GL_APIENTRY glMapBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) +{ + return GL_MapBufferRangeEXTContextANGLE(ctx, target, offset, length, access); +} + +void GL_APIENTRY glMaterialfContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, GLfloat param) +{ + return GL_MaterialfContextANGLE(ctx, face, pname, param); +} + +void GL_APIENTRY glMaterialfvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + const GLfloat *params) +{ + return GL_MaterialfvContextANGLE(ctx, face, pname, params); +} + +void GL_APIENTRY glMaterialxContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, GLfixed param) +{ + return GL_MaterialxContextANGLE(ctx, face, pname, param); +} + +void GL_APIENTRY glMaterialxvContextANGLE(GLeglContext ctx, + GLenum face, + GLenum pname, + const GLfixed *param) +{ + return GL_MaterialxvContextANGLE(ctx, face, pname, param); +} + +void GL_APIENTRY glMatrixIndexPointerOESContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_MatrixIndexPointerOESContextANGLE(ctx, size, type, stride, pointer); +} + +void GL_APIENTRY glMatrixModeContextANGLE(GLeglContext ctx, GLenum mode) +{ + return GL_MatrixModeContextANGLE(ctx, mode); +} + +void GL_APIENTRY glMaxShaderCompilerThreadsKHRContextANGLE(GLeglContext ctx, GLuint count) +{ + return GL_MaxShaderCompilerThreadsKHRContextANGLE(ctx, count); +} + +void GL_APIENTRY glMemoryBarrierContextANGLE(GLeglContext ctx, GLbitfield barriers) +{ + return GL_MemoryBarrierContextANGLE(ctx, barriers); +} + +void GL_APIENTRY glMemoryBarrierByRegionContextANGLE(GLeglContext ctx, GLbitfield barriers) +{ + return GL_MemoryBarrierByRegionContextANGLE(ctx, barriers); +} + +void GL_APIENTRY glMemoryObjectParameterivEXTContextANGLE(GLeglContext ctx, + GLuint memoryObject, + GLenum pname, + const GLint *params) +{ + return GL_MemoryObjectParameterivEXTContextANGLE(ctx, memoryObject, pname, params); +} + +void GL_APIENTRY glMinSampleShadingContextANGLE(GLeglContext ctx, GLfloat value) +{ + return GL_MinSampleShadingContextANGLE(ctx, value); +} + +void GL_APIENTRY glMinSampleShadingOESContextANGLE(GLeglContext ctx, GLfloat value) +{ + return GL_MinSampleShadingOESContextANGLE(ctx, value); +} + +void GL_APIENTRY glMultMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m) +{ + return GL_MultMatrixfContextANGLE(ctx, m); +} + +void GL_APIENTRY glMultMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m) +{ + return GL_MultMatrixxContextANGLE(ctx, m); +} + +void GL_APIENTRY glMultiDrawElementsBaseVertexEXTContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *count, + GLenum type, + const void *const *indices, + GLsizei primcount, + const GLint *basevertex) +{ + return GL_MultiDrawElementsBaseVertexEXTContextANGLE(ctx, mode, count, type, indices, primcount, + basevertex); +} + +void GL_APIENTRY glMultiTexCoord4fContextANGLE(GLeglContext ctx, + GLenum target, + GLfloat s, + GLfloat t, + GLfloat r, + GLfloat q) +{ + return GL_MultiTexCoord4fContextANGLE(ctx, target, s, t, r, q); +} + +void GL_APIENTRY glMultiTexCoord4xContextANGLE(GLeglContext ctx, + GLenum texture, + GLfixed s, + GLfixed t, + GLfixed r, + GLfixed q) +{ + return GL_MultiTexCoord4xContextANGLE(ctx, texture, s, t, r, q); +} + +void GL_APIENTRY glNamedBufferStorageExternalEXTContextANGLE(GLeglContext ctx, + GLuint buffer, + GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags) +{ + return GL_NamedBufferStorageExternalEXTContextANGLE(ctx, buffer, offset, size, clientBuffer, + flags); +} + +void GL_APIENTRY glNormal3fContextANGLE(GLeglContext ctx, GLfloat nx, GLfloat ny, GLfloat nz) +{ + return GL_Normal3fContextANGLE(ctx, nx, ny, nz); +} + +void GL_APIENTRY glNormal3xContextANGLE(GLeglContext ctx, GLfixed nx, GLfixed ny, GLfixed nz) +{ + return GL_Normal3xContextANGLE(ctx, nx, ny, nz); +} + +void GL_APIENTRY glNormalPointerContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_NormalPointerContextANGLE(ctx, type, stride, pointer); +} + +void GL_APIENTRY glObjectLabelContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label) +{ + return GL_ObjectLabelContextANGLE(ctx, identifier, name, length, label); +} + +void GL_APIENTRY glObjectLabelKHRContextANGLE(GLeglContext ctx, + GLenum identifier, + GLuint name, + GLsizei length, + const GLchar *label) +{ + return GL_ObjectLabelKHRContextANGLE(ctx, identifier, name, length, label); +} + +void GL_APIENTRY glObjectPtrLabelContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei length, + const GLchar *label) +{ + return GL_ObjectPtrLabelContextANGLE(ctx, ptr, length, label); +} + +void GL_APIENTRY glObjectPtrLabelKHRContextANGLE(GLeglContext ctx, + const void *ptr, + GLsizei length, + const GLchar *label) +{ + return GL_ObjectPtrLabelKHRContextANGLE(ctx, ptr, length, label); +} + +void GL_APIENTRY glOrthofContextANGLE(GLeglContext ctx, + GLfloat l, + GLfloat r, + GLfloat b, + GLfloat t, + GLfloat n, + GLfloat f) +{ + return GL_OrthofContextANGLE(ctx, l, r, b, t, n, f); +} + +void GL_APIENTRY glOrthoxContextANGLE(GLeglContext ctx, + GLfixed l, + GLfixed r, + GLfixed b, + GLfixed t, + GLfixed n, + GLfixed f) +{ + return GL_OrthoxContextANGLE(ctx, l, r, b, t, n, f); +} + +void GL_APIENTRY glPatchParameteriContextANGLE(GLeglContext ctx, GLenum pname, GLint value) +{ + return GL_PatchParameteriContextANGLE(ctx, pname, value); +} + +void GL_APIENTRY glPatchParameteriEXTContextANGLE(GLeglContext ctx, GLenum pname, GLint value) +{ + return GL_PatchParameteriEXTContextANGLE(ctx, pname, value); +} + +void GL_APIENTRY glPauseTransformFeedbackContextANGLE(GLeglContext ctx) +{ + return GL_PauseTransformFeedbackContextANGLE(ctx); +} + +void GL_APIENTRY glPixelStoreiContextANGLE(GLeglContext ctx, GLenum pname, GLint param) +{ + return GL_PixelStoreiContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glPointParameterfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param) +{ + return GL_PointParameterfContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glPointParameterfvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfloat *params) +{ + return GL_PointParameterfvContextANGLE(ctx, pname, params); +} + +void GL_APIENTRY glPointParameterxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param) +{ + return GL_PointParameterxContextANGLE(ctx, pname, param); +} + +void GL_APIENTRY glPointParameterxvContextANGLE(GLeglContext ctx, + GLenum pname, + const GLfixed *params) +{ + return GL_PointParameterxvContextANGLE(ctx, pname, params); +} + +void GL_APIENTRY glPointSizeContextANGLE(GLeglContext ctx, GLfloat size) +{ + return GL_PointSizeContextANGLE(ctx, size); +} + +void GL_APIENTRY glPointSizePointerOESContextANGLE(GLeglContext ctx, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_PointSizePointerOESContextANGLE(ctx, type, stride, pointer); +} + +void GL_APIENTRY glPointSizexContextANGLE(GLeglContext ctx, GLfixed size) +{ + return GL_PointSizexContextANGLE(ctx, size); +} + +void GL_APIENTRY glPolygonOffsetContextANGLE(GLeglContext ctx, GLfloat factor, GLfloat units) +{ + return GL_PolygonOffsetContextANGLE(ctx, factor, units); +} + +void GL_APIENTRY glPolygonOffsetxContextANGLE(GLeglContext ctx, GLfixed factor, GLfixed units) +{ + return GL_PolygonOffsetxContextANGLE(ctx, factor, units); +} + +void GL_APIENTRY glPopDebugGroupContextANGLE(GLeglContext ctx) +{ + return GL_PopDebugGroupContextANGLE(ctx); +} + +void GL_APIENTRY glPopDebugGroupKHRContextANGLE(GLeglContext ctx) +{ + return GL_PopDebugGroupKHRContextANGLE(ctx); +} + +void GL_APIENTRY glPopGroupMarkerEXTContextANGLE(GLeglContext ctx) +{ + return GL_PopGroupMarkerEXTContextANGLE(ctx); +} + +void GL_APIENTRY glPopMatrixContextANGLE(GLeglContext ctx) +{ + return GL_PopMatrixContextANGLE(ctx); +} + +void GL_APIENTRY glPrimitiveBoundingBoxContextANGLE(GLeglContext ctx, + GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + return GL_PrimitiveBoundingBoxContextANGLE(ctx, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); +} + +void GL_APIENTRY glPrimitiveBoundingBoxEXTContextANGLE(GLeglContext ctx, + GLfloat minX, + GLfloat minY, + GLfloat minZ, + GLfloat minW, + GLfloat maxX, + GLfloat maxY, + GLfloat maxZ, + GLfloat maxW) +{ + return GL_PrimitiveBoundingBoxEXTContextANGLE(ctx, minX, minY, minZ, minW, maxX, maxY, maxZ, + maxW); +} + +void GL_APIENTRY glProgramBinaryContextANGLE(GLeglContext ctx, + GLuint program, + GLenum binaryFormat, + const void *binary, + GLsizei length) +{ + return GL_ProgramBinaryContextANGLE(ctx, program, binaryFormat, binary, length); +} + +void GL_APIENTRY glProgramBinaryOESContextANGLE(GLeglContext ctx, + GLuint program, + GLenum binaryFormat, + const void *binary, + GLint length) +{ + return GL_ProgramBinaryOESContextANGLE(ctx, program, binaryFormat, binary, length); +} + +void GL_APIENTRY glProgramParameteriContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint value) +{ + return GL_ProgramParameteriContextANGLE(ctx, program, pname, value); +} + +void GL_APIENTRY glProgramParameteriEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLint value) +{ + return GL_ProgramParameteriEXTContextANGLE(ctx, program, pname, value); +} + +void GL_APIENTRY glProgramUniform1fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0) +{ + return GL_ProgramUniform1fContextANGLE(ctx, program, location, v0); +} + +void GL_APIENTRY glProgramUniform1fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0) +{ + return GL_ProgramUniform1fEXTContextANGLE(ctx, program, location, v0); +} + +void GL_APIENTRY glProgramUniform1fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform1fvContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform1fvEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0) +{ + return GL_ProgramUniform1iContextANGLE(ctx, program, location, v0); +} + +void GL_APIENTRY glProgramUniform1iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0) +{ + return GL_ProgramUniform1iEXTContextANGLE(ctx, program, location, v0); +} + +void GL_APIENTRY glProgramUniform1ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform1ivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform1ivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0) +{ + return GL_ProgramUniform1uiContextANGLE(ctx, program, location, v0); +} + +void GL_APIENTRY glProgramUniform1uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0) +{ + return GL_ProgramUniform1uiEXTContextANGLE(ctx, program, location, v0); +} + +void GL_APIENTRY glProgramUniform1uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform1uivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform1uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform1uivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1) +{ + return GL_ProgramUniform2fContextANGLE(ctx, program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1) +{ + return GL_ProgramUniform2fEXTContextANGLE(ctx, program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform2fvContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform2fvEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY +glProgramUniform2iContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLint v0, GLint v1) +{ + return GL_ProgramUniform2iContextANGLE(ctx, program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1) +{ + return GL_ProgramUniform2iEXTContextANGLE(ctx, program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform2ivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform2ivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1) +{ + return GL_ProgramUniform2uiContextANGLE(ctx, program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1) +{ + return GL_ProgramUniform2uiEXTContextANGLE(ctx, program, location, v0, v1); +} + +void GL_APIENTRY glProgramUniform2uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform2uivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform2uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform2uivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2) +{ + return GL_ProgramUniform3fContextANGLE(ctx, program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2) +{ + return GL_ProgramUniform3fEXTContextANGLE(ctx, program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform3fvContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform3fvEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2) +{ + return GL_ProgramUniform3iContextANGLE(ctx, program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2) +{ + return GL_ProgramUniform3iEXTContextANGLE(ctx, program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform3ivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform3ivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2) +{ + return GL_ProgramUniform3uiContextANGLE(ctx, program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2) +{ + return GL_ProgramUniform3uiEXTContextANGLE(ctx, program, location, v0, v1, v2); +} + +void GL_APIENTRY glProgramUniform3uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform3uivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform3uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform3uivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform4fContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + return GL_ProgramUniform4fContextANGLE(ctx, program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4fEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + return GL_ProgramUniform4fEXTContextANGLE(ctx, program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform4fvContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_ProgramUniform4fvEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform4iContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2, + GLint v3) +{ + return GL_ProgramUniform4iContextANGLE(ctx, program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4iEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLint v0, + GLint v1, + GLint v2, + GLint v3) +{ + return GL_ProgramUniform4iEXTContextANGLE(ctx, program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4ivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform4ivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform4ivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_ProgramUniform4ivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform4uiContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3) +{ + return GL_ProgramUniform4uiContextANGLE(ctx, program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4uiEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3) +{ + return GL_ProgramUniform4uiEXTContextANGLE(ctx, program, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glProgramUniform4uivContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform4uivContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniform4uivEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_ProgramUniform4uivEXTContextANGLE(ctx, program, location, count, value); +} + +void GL_APIENTRY glProgramUniformMatrix2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2fvContextANGLE(ctx, program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix2x3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x3fvContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix2x3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x3fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix2x4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x4fvContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix2x4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix2x4fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3fvContextANGLE(ctx, program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix3x2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x2fvContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix3x2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x2fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix3x4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x4fvContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix3x4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix3x4fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix4fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4fvContextANGLE(ctx, program, location, count, transpose, value); +} + +void GL_APIENTRY glProgramUniformMatrix4fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix4x2fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x2fvContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix4x2fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x2fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix4x3fvContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x3fvContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glProgramUniformMatrix4x3fvEXTContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_ProgramUniformMatrix4x3fvEXTContextANGLE(ctx, program, location, count, transpose, + value); +} + +void GL_APIENTRY glPushDebugGroupContextANGLE(GLeglContext ctx, + GLenum source, + GLuint id, + GLsizei length, + const GLchar *message) +{ + return GL_PushDebugGroupContextANGLE(ctx, source, id, length, message); +} + +void GL_APIENTRY glPushDebugGroupKHRContextANGLE(GLeglContext ctx, + GLenum source, + GLuint id, + GLsizei length, + const GLchar *message) +{ + return GL_PushDebugGroupKHRContextANGLE(ctx, source, id, length, message); +} + +void GL_APIENTRY glPushGroupMarkerEXTContextANGLE(GLeglContext ctx, + GLsizei length, + const GLchar *marker) +{ + return GL_PushGroupMarkerEXTContextANGLE(ctx, length, marker); +} + +void GL_APIENTRY glPushMatrixContextANGLE(GLeglContext ctx) +{ + return GL_PushMatrixContextANGLE(ctx); +} + +void GL_APIENTRY glQueryCounterEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum target) +{ + return GL_QueryCounterEXTContextANGLE(ctx, id, target); +} + +GLbitfield GL_APIENTRY glQueryMatrixxOESContextANGLE(GLeglContext ctx, + GLfixed *mantissa, + GLint *exponent) +{ + return GL_QueryMatrixxOESContextANGLE(ctx, mantissa, exponent); +} + +void GL_APIENTRY glReadBufferContextANGLE(GLeglContext ctx, GLenum src) +{ + return GL_ReadBufferContextANGLE(ctx, src); +} + +void GL_APIENTRY glReadPixelsContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void *pixels) +{ + return GL_ReadPixelsContextANGLE(ctx, x, y, width, height, format, type, pixels); +} + +void GL_APIENTRY glReadnPixelsContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + return GL_ReadnPixelsContextANGLE(ctx, x, y, width, height, format, type, bufSize, data); +} + +void GL_APIENTRY glReadnPixelsEXTContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + void *data) +{ + return GL_ReadnPixelsEXTContextANGLE(ctx, x, y, width, height, format, type, bufSize, data); +} + +void GL_APIENTRY glReleaseShaderCompilerContextANGLE(GLeglContext ctx) +{ + return GL_ReleaseShaderCompilerContextANGLE(ctx); +} + +void GL_APIENTRY glRenderbufferStorageContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageContextANGLE(ctx, target, internalformat, width, height); +} + +void GL_APIENTRY glRenderbufferStorageMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageMultisampleContextANGLE(ctx, target, samples, internalformat, + width, height); +} + +void GL_APIENTRY glRenderbufferStorageMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageMultisampleANGLEContextANGLE(ctx, target, samples, internalformat, + width, height); +} + +void GL_APIENTRY glRenderbufferStorageMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageMultisampleEXTContextANGLE(ctx, target, samples, internalformat, + width, height); +} + +void GL_APIENTRY glRenderbufferStorageOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_RenderbufferStorageOESContextANGLE(ctx, target, internalformat, width, height); +} + +void GL_APIENTRY glResumeTransformFeedbackContextANGLE(GLeglContext ctx) +{ + return GL_ResumeTransformFeedbackContextANGLE(ctx); +} + +void GL_APIENTRY +glRotatefContextANGLE(GLeglContext ctx, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +{ + return GL_RotatefContextANGLE(ctx, angle, x, y, z); +} + +void GL_APIENTRY +glRotatexContextANGLE(GLeglContext ctx, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +{ + return GL_RotatexContextANGLE(ctx, angle, x, y, z); +} + +void GL_APIENTRY glSampleCoverageContextANGLE(GLeglContext ctx, GLfloat value, GLboolean invert) +{ + return GL_SampleCoverageContextANGLE(ctx, value, invert); +} + +void GL_APIENTRY glSampleCoveragexContextANGLE(GLeglContext ctx, GLclampx value, GLboolean invert) +{ + return GL_SampleCoveragexContextANGLE(ctx, value, invert); +} + +void GL_APIENTRY glSampleMaskiContextANGLE(GLeglContext ctx, GLuint maskNumber, GLbitfield mask) +{ + return GL_SampleMaskiContextANGLE(ctx, maskNumber, mask); +} + +void GL_APIENTRY glSamplerParameterIivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + return GL_SamplerParameterIivContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + return GL_SamplerParameterIivEXTContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + return GL_SamplerParameterIivOESContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIuivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param) +{ + return GL_SamplerParameterIuivContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIuivEXTContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param) +{ + return GL_SamplerParameterIuivEXTContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterIuivOESContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLuint *param) +{ + return GL_SamplerParameterIuivOESContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterfContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLfloat param) +{ + return GL_SamplerParameterfContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterfvContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLfloat *param) +{ + return GL_SamplerParameterfvContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameteriContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLint param) +{ + return GL_SamplerParameteriContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glSamplerParameterivContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + const GLint *param) +{ + return GL_SamplerParameterivContextANGLE(ctx, sampler, pname, param); +} + +void GL_APIENTRY glScalefContextANGLE(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z) +{ + return GL_ScalefContextANGLE(ctx, x, y, z); +} + +void GL_APIENTRY glScalexContextANGLE(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z) +{ + return GL_ScalexContextANGLE(ctx, x, y, z); +} + +void GL_APIENTRY +glScissorContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height) +{ + return GL_ScissorContextANGLE(ctx, x, y, width, height); +} + +void GL_APIENTRY glSemaphoreParameterui64vEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum pname, + const GLuint64 *params) +{ + return GL_SemaphoreParameterui64vEXTContextANGLE(ctx, semaphore, pname, params); +} + +void GL_APIENTRY glSetFenceNVContextANGLE(GLeglContext ctx, GLuint fence, GLenum condition) +{ + return GL_SetFenceNVContextANGLE(ctx, fence, condition); +} + +void GL_APIENTRY glShadeModelContextANGLE(GLeglContext ctx, GLenum mode) +{ + return GL_ShadeModelContextANGLE(ctx, mode); +} + +void GL_APIENTRY glShaderBinaryContextANGLE(GLeglContext ctx, + GLsizei count, + const GLuint *shaders, + GLenum binaryformat, + const void *binary, + GLsizei length) +{ + return GL_ShaderBinaryContextANGLE(ctx, count, shaders, binaryformat, binary, length); +} + +void GL_APIENTRY glShaderSourceContextANGLE(GLeglContext ctx, + GLuint shader, + GLsizei count, + const GLchar *const *string, + const GLint *length) +{ + return GL_ShaderSourceContextANGLE(ctx, shader, count, string, length); +} + +void GL_APIENTRY glSignalSemaphoreEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *dstLayouts) +{ + return GL_SignalSemaphoreEXTContextANGLE(ctx, semaphore, numBufferBarriers, buffers, + numTextureBarriers, textures, dstLayouts); +} + +void GL_APIENTRY glStencilFuncContextANGLE(GLeglContext ctx, GLenum func, GLint ref, GLuint mask) +{ + return GL_StencilFuncContextANGLE(ctx, func, ref, mask); +} + +void GL_APIENTRY glStencilFuncSeparateContextANGLE(GLeglContext ctx, + GLenum face, + GLenum func, + GLint ref, + GLuint mask) +{ + return GL_StencilFuncSeparateContextANGLE(ctx, face, func, ref, mask); +} + +void GL_APIENTRY glStencilMaskContextANGLE(GLeglContext ctx, GLuint mask) +{ + return GL_StencilMaskContextANGLE(ctx, mask); +} + +void GL_APIENTRY glStencilMaskSeparateContextANGLE(GLeglContext ctx, GLenum face, GLuint mask) +{ + return GL_StencilMaskSeparateContextANGLE(ctx, face, mask); +} + +void GL_APIENTRY glStencilOpContextANGLE(GLeglContext ctx, GLenum fail, GLenum zfail, GLenum zpass) +{ + return GL_StencilOpContextANGLE(ctx, fail, zfail, zpass); +} + +void GL_APIENTRY glStencilOpSeparateContextANGLE(GLeglContext ctx, + GLenum face, + GLenum sfail, + GLenum dpfail, + GLenum dppass) +{ + return GL_StencilOpSeparateContextANGLE(ctx, face, sfail, dpfail, dppass); +} + +GLboolean GL_APIENTRY glTestFenceNVContextANGLE(GLeglContext ctx, GLuint fence) +{ + return GL_TestFenceNVContextANGLE(ctx, fence); +} + +void GL_APIENTRY glTexBufferContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer) +{ + return GL_TexBufferContextANGLE(ctx, target, internalformat, buffer); +} + +void GL_APIENTRY glTexBufferEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer) +{ + return GL_TexBufferEXTContextANGLE(ctx, target, internalformat, buffer); +} + +void GL_APIENTRY glTexBufferOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer) +{ + return GL_TexBufferOESContextANGLE(ctx, target, internalformat, buffer); +} + +void GL_APIENTRY glTexBufferRangeContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + return GL_TexBufferRangeContextANGLE(ctx, target, internalformat, buffer, offset, size); +} + +void GL_APIENTRY glTexBufferRangeEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + return GL_TexBufferRangeEXTContextANGLE(ctx, target, internalformat, buffer, offset, size); +} + +void GL_APIENTRY glTexBufferRangeOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLuint buffer, + GLintptr offset, + GLsizeiptr size) +{ + return GL_TexBufferRangeOESContextANGLE(ctx, target, internalformat, buffer, offset, size); +} + +void GL_APIENTRY glTexCoordPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_TexCoordPointerContextANGLE(ctx, size, type, stride, pointer); +} + +void GL_APIENTRY glTexEnvfContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfloat param) +{ + return GL_TexEnvfContextANGLE(ctx, target, pname, param); +} + +void GL_APIENTRY glTexEnvfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfloat *params) +{ + return GL_TexEnvfvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexEnviContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint param) +{ + return GL_TexEnviContextANGLE(ctx, target, pname, param); +} + +void GL_APIENTRY glTexEnvivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + return GL_TexEnvivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexEnvxContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfixed param) +{ + return GL_TexEnvxContextANGLE(ctx, target, pname, param); +} + +void GL_APIENTRY glTexEnvxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfixed *params) +{ + return GL_TexEnvxvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexGenfOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfloat param) +{ + return GL_TexGenfOESContextANGLE(ctx, coord, pname, param); +} + +void GL_APIENTRY glTexGenfvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLfloat *params) +{ + return GL_TexGenfvOESContextANGLE(ctx, coord, pname, params); +} + +void GL_APIENTRY glTexGeniOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, GLint param) +{ + return GL_TexGeniOESContextANGLE(ctx, coord, pname, param); +} + +void GL_APIENTRY glTexGenivOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLint *params) +{ + return GL_TexGenivOESContextANGLE(ctx, coord, pname, params); +} + +void GL_APIENTRY glTexGenxOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + GLfixed param) +{ + return GL_TexGenxOESContextANGLE(ctx, coord, pname, param); +} + +void GL_APIENTRY glTexGenxvOESContextANGLE(GLeglContext ctx, + GLenum coord, + GLenum pname, + const GLfixed *params) +{ + return GL_TexGenxvOESContextANGLE(ctx, coord, pname, params); +} + +void GL_APIENTRY glTexImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexImage2DContextANGLE(ctx, target, level, internalformat, width, height, border, + format, type, pixels); +} + +void GL_APIENTRY glTexImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexImage3DContextANGLE(ctx, target, level, internalformat, width, height, depth, + border, format, type, pixels); +} + +void GL_APIENTRY glTexImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexImage3DOESContextANGLE(ctx, target, level, internalformat, width, height, depth, + border, format, type, pixels); +} + +void GL_APIENTRY glTexParameterIivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + return GL_TexParameterIivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameterIivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + return GL_TexParameterIivEXTContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameterIivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + return GL_TexParameterIivOESContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameterIuivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params) +{ + return GL_TexParameterIuivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameterIuivEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params) +{ + return GL_TexParameterIuivEXTContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameterIuivOESContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLuint *params) +{ + return GL_TexParameterIuivOESContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameterfContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfloat param) +{ + return GL_TexParameterfContextANGLE(ctx, target, pname, param); +} + +void GL_APIENTRY glTexParameterfvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfloat *params) +{ + return GL_TexParameterfvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameteriContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLint param) +{ + return GL_TexParameteriContextANGLE(ctx, target, pname, param); +} + +void GL_APIENTRY glTexParameterivContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLint *params) +{ + return GL_TexParameterivContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexParameterxContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLfixed param) +{ + return GL_TexParameterxContextANGLE(ctx, target, pname, param); +} + +void GL_APIENTRY glTexParameterxvContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + const GLfixed *params) +{ + return GL_TexParameterxvContextANGLE(ctx, target, pname, params); +} + +void GL_APIENTRY glTexStorage1DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width) +{ + return GL_TexStorage1DEXTContextANGLE(ctx, target, levels, internalformat, width); +} + +void GL_APIENTRY glTexStorage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_TexStorage2DContextANGLE(ctx, target, levels, internalformat, width, height); +} + +void GL_APIENTRY glTexStorage2DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height) +{ + return GL_TexStorage2DEXTContextANGLE(ctx, target, levels, internalformat, width, height); +} + +void GL_APIENTRY glTexStorage2DMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage2DMultisampleContextANGLE(ctx, target, samples, internalformat, width, + height, fixedsamplelocations); +} + +void GL_APIENTRY glTexStorage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + return GL_TexStorage3DContextANGLE(ctx, target, levels, internalformat, width, height, depth); +} + +void GL_APIENTRY glTexStorage3DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth) +{ + return GL_TexStorage3DEXTContextANGLE(ctx, target, levels, internalformat, width, height, + depth); +} + +void GL_APIENTRY glTexStorage3DMultisampleContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage3DMultisampleContextANGLE(ctx, target, samples, internalformat, width, + height, depth, fixedsamplelocations); +} + +void GL_APIENTRY glTexStorage3DMultisampleOESContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage3DMultisampleOESContextANGLE(ctx, target, samples, internalformat, width, + height, depth, fixedsamplelocations); +} + +void GL_APIENTRY glTexStorageMem2DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem2DEXTContextANGLE(ctx, target, levels, internalFormat, width, height, + memory, offset); +} + +void GL_APIENTRY glTexStorageMem2DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem2DMultisampleEXTContextANGLE( + ctx, target, samples, internalFormat, width, height, fixedSampleLocations, memory, offset); +} + +void GL_APIENTRY glTexStorageMem3DEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem3DEXTContextANGLE(ctx, target, levels, internalFormat, width, height, + depth, memory, offset); +} + +void GL_APIENTRY glTexStorageMem3DMultisampleEXTContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset) +{ + return GL_TexStorageMem3DMultisampleEXTContextANGLE(ctx, target, samples, internalFormat, width, + height, depth, fixedSampleLocations, memory, + offset); +} + +void GL_APIENTRY glTexSubImage2DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexSubImage2DContextANGLE(ctx, target, level, xoffset, yoffset, width, height, format, + type, pixels); +} + +void GL_APIENTRY glTexSubImage3DContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexSubImage3DContextANGLE(ctx, target, level, xoffset, yoffset, zoffset, width, + height, depth, format, type, pixels); +} + +void GL_APIENTRY glTexSubImage3DOESContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + const void *pixels) +{ + return GL_TexSubImage3DOESContextANGLE(ctx, target, level, xoffset, yoffset, zoffset, width, + height, depth, format, type, pixels); +} + +void GL_APIENTRY glTransformFeedbackVaryingsContextANGLE(GLeglContext ctx, + GLuint program, + GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode) +{ + return GL_TransformFeedbackVaryingsContextANGLE(ctx, program, count, varyings, bufferMode); +} + +void GL_APIENTRY glTranslatefContextANGLE(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z) +{ + return GL_TranslatefContextANGLE(ctx, x, y, z); +} + +void GL_APIENTRY glTranslatexContextANGLE(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z) +{ + return GL_TranslatexContextANGLE(ctx, x, y, z); +} + +void GL_APIENTRY glUniform1fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0) +{ + return GL_Uniform1fContextANGLE(ctx, location, v0); +} + +void GL_APIENTRY glUniform1fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_Uniform1fvContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniform1iContextANGLE(GLeglContext ctx, GLint location, GLint v0) +{ + return GL_Uniform1iContextANGLE(ctx, location, v0); +} + +void GL_APIENTRY glUniform1ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_Uniform1ivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniform1uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0) +{ + return GL_Uniform1uiContextANGLE(ctx, location, v0); +} + +void GL_APIENTRY glUniform1uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_Uniform1uivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniform2fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1) +{ + return GL_Uniform2fContextANGLE(ctx, location, v0, v1); +} + +void GL_APIENTRY glUniform2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_Uniform2fvContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniform2iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1) +{ + return GL_Uniform2iContextANGLE(ctx, location, v0, v1); +} + +void GL_APIENTRY glUniform2ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_Uniform2ivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniform2uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1) +{ + return GL_Uniform2uiContextANGLE(ctx, location, v0, v1); +} + +void GL_APIENTRY glUniform2uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_Uniform2uivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY +glUniform3fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + return GL_Uniform3fContextANGLE(ctx, location, v0, v1, v2); +} + +void GL_APIENTRY glUniform3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_Uniform3fvContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY +glUniform3iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2) +{ + return GL_Uniform3iContextANGLE(ctx, location, v0, v1, v2); +} + +void GL_APIENTRY glUniform3ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_Uniform3ivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY +glUniform3uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1, GLuint v2) +{ + return GL_Uniform3uiContextANGLE(ctx, location, v0, v1, v2); +} + +void GL_APIENTRY glUniform3uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_Uniform3uivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniform4fContextANGLE(GLeglContext ctx, + GLint location, + GLfloat v0, + GLfloat v1, + GLfloat v2, + GLfloat v3) +{ + return GL_Uniform4fContextANGLE(ctx, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glUniform4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLfloat *value) +{ + return GL_Uniform4fvContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY +glUniform4iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + return GL_Uniform4iContextANGLE(ctx, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glUniform4ivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLint *value) +{ + return GL_Uniform4ivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniform4uiContextANGLE(GLeglContext ctx, + GLint location, + GLuint v0, + GLuint v1, + GLuint v2, + GLuint v3) +{ + return GL_Uniform4uiContextANGLE(ctx, location, v0, v1, v2, v3); +} + +void GL_APIENTRY glUniform4uivContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + const GLuint *value) +{ + return GL_Uniform4uivContextANGLE(ctx, location, count, value); +} + +void GL_APIENTRY glUniformBlockBindingContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLuint uniformBlockBinding) +{ + return GL_UniformBlockBindingContextANGLE(ctx, program, uniformBlockIndex, uniformBlockBinding); +} + +void GL_APIENTRY glUniformMatrix2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix2fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix2x3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix2x3fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix2x4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix2x4fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix3fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix3x2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix3x2fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix3x4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix3x4fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix4fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix4fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix4x2fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix4x2fvContextANGLE(ctx, location, count, transpose, value); +} + +void GL_APIENTRY glUniformMatrix4x3fvContextANGLE(GLeglContext ctx, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + return GL_UniformMatrix4x3fvContextANGLE(ctx, location, count, transpose, value); +} + +GLboolean GL_APIENTRY glUnmapBufferContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_UnmapBufferContextANGLE(ctx, target); +} + +GLboolean GL_APIENTRY glUnmapBufferOESContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_UnmapBufferOESContextANGLE(ctx, target); +} + +void GL_APIENTRY glUseProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + return GL_UseProgramContextANGLE(ctx, program); +} + +void GL_APIENTRY glUseProgramStagesContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLbitfield stages, + GLuint program) +{ + return GL_UseProgramStagesContextANGLE(ctx, pipeline, stages, program); +} + +void GL_APIENTRY glUseProgramStagesEXTContextANGLE(GLeglContext ctx, + GLuint pipeline, + GLbitfield stages, + GLuint program) +{ + return GL_UseProgramStagesEXTContextANGLE(ctx, pipeline, stages, program); +} + +void GL_APIENTRY glValidateProgramContextANGLE(GLeglContext ctx, GLuint program) +{ + return GL_ValidateProgramContextANGLE(ctx, program); +} + +void GL_APIENTRY glValidateProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + return GL_ValidateProgramPipelineContextANGLE(ctx, pipeline); +} + +void GL_APIENTRY glValidateProgramPipelineEXTContextANGLE(GLeglContext ctx, GLuint pipeline) +{ + return GL_ValidateProgramPipelineEXTContextANGLE(ctx, pipeline); +} + +void GL_APIENTRY glVertexAttrib1fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x) +{ + return GL_VertexAttrib1fContextANGLE(ctx, index, x); +} + +void GL_APIENTRY glVertexAttrib1fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib1fvContextANGLE(ctx, index, v); +} + +void GL_APIENTRY glVertexAttrib2fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y) +{ + return GL_VertexAttrib2fContextANGLE(ctx, index, x, y); +} + +void GL_APIENTRY glVertexAttrib2fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib2fvContextANGLE(ctx, index, v); +} + +void GL_APIENTRY +glVertexAttrib3fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + return GL_VertexAttrib3fContextANGLE(ctx, index, x, y, z); +} + +void GL_APIENTRY glVertexAttrib3fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib3fvContextANGLE(ctx, index, v); +} + +void GL_APIENTRY glVertexAttrib4fContextANGLE(GLeglContext ctx, + GLuint index, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) +{ + return GL_VertexAttrib4fContextANGLE(ctx, index, x, y, z, w); +} + +void GL_APIENTRY glVertexAttrib4fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v) +{ + return GL_VertexAttrib4fvContextANGLE(ctx, index, v); +} + +void GL_APIENTRY glVertexAttribBindingContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLuint bindingindex) +{ + return GL_VertexAttribBindingContextANGLE(ctx, attribindex, bindingindex); +} + +void GL_APIENTRY glVertexAttribDivisorContextANGLE(GLeglContext ctx, GLuint index, GLuint divisor) +{ + return GL_VertexAttribDivisorContextANGLE(ctx, index, divisor); +} + +void GL_APIENTRY glVertexAttribDivisorANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLuint divisor) +{ + return GL_VertexAttribDivisorANGLEContextANGLE(ctx, index, divisor); +} + +void GL_APIENTRY glVertexAttribDivisorEXTContextANGLE(GLeglContext ctx, + GLuint index, + GLuint divisor) +{ + return GL_VertexAttribDivisorEXTContextANGLE(ctx, index, divisor); +} + +void GL_APIENTRY glVertexAttribFormatContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLint size, + GLenum type, + GLboolean normalized, + GLuint relativeoffset) +{ + return GL_VertexAttribFormatContextANGLE(ctx, attribindex, size, type, normalized, + relativeoffset); +} + +void GL_APIENTRY +glVertexAttribI4iContextANGLE(GLeglContext ctx, GLuint index, GLint x, GLint y, GLint z, GLint w) +{ + return GL_VertexAttribI4iContextANGLE(ctx, index, x, y, z, w); +} + +void GL_APIENTRY glVertexAttribI4ivContextANGLE(GLeglContext ctx, GLuint index, const GLint *v) +{ + return GL_VertexAttribI4ivContextANGLE(ctx, index, v); +} + +void GL_APIENTRY glVertexAttribI4uiContextANGLE(GLeglContext ctx, + GLuint index, + GLuint x, + GLuint y, + GLuint z, + GLuint w) +{ + return GL_VertexAttribI4uiContextANGLE(ctx, index, x, y, z, w); +} + +void GL_APIENTRY glVertexAttribI4uivContextANGLE(GLeglContext ctx, GLuint index, const GLuint *v) +{ + return GL_VertexAttribI4uivContextANGLE(ctx, index, v); +} + +void GL_APIENTRY glVertexAttribIFormatContextANGLE(GLeglContext ctx, + GLuint attribindex, + GLint size, + GLenum type, + GLuint relativeoffset) +{ + return GL_VertexAttribIFormatContextANGLE(ctx, attribindex, size, type, relativeoffset); +} + +void GL_APIENTRY glVertexAttribIPointerContextANGLE(GLeglContext ctx, + GLuint index, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_VertexAttribIPointerContextANGLE(ctx, index, size, type, stride, pointer); +} + +void GL_APIENTRY glVertexAttribPointerContextANGLE(GLeglContext ctx, + GLuint index, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void *pointer) +{ + return GL_VertexAttribPointerContextANGLE(ctx, index, size, type, normalized, stride, pointer); +} + +void GL_APIENTRY glVertexBindingDivisorContextANGLE(GLeglContext ctx, + GLuint bindingindex, + GLuint divisor) +{ + return GL_VertexBindingDivisorContextANGLE(ctx, bindingindex, divisor); +} + +void GL_APIENTRY glVertexPointerContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_VertexPointerContextANGLE(ctx, size, type, stride, pointer); +} + +void GL_APIENTRY +glViewportContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height) +{ + return GL_ViewportContextANGLE(ctx, x, y, width, height); +} + +void GL_APIENTRY glWaitSemaphoreEXTContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *srcLayouts) +{ + return GL_WaitSemaphoreEXTContextANGLE(ctx, semaphore, numBufferBarriers, buffers, + numTextureBarriers, textures, srcLayouts); +} + +void GL_APIENTRY glWaitSyncContextANGLE(GLeglContext ctx, + GLsync sync, + GLbitfield flags, + GLuint64 timeout) +{ + return GL_WaitSyncContextANGLE(ctx, sync, flags, timeout); +} + +void GL_APIENTRY glWeightPointerOESContextANGLE(GLeglContext ctx, + GLint size, + GLenum type, + GLsizei stride, + const void *pointer) +{ + return GL_WeightPointerOESContextANGLE(ctx, size, type, stride, pointer); +} + +void GL_APIENTRY glBindUniformLocationCHROMIUMContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + const GLchar *name) +{ + return GL_BindUniformLocationCHROMIUMContextANGLE(ctx, program, location, name); +} + +void GL_APIENTRY glCoverageModulationCHROMIUMContextANGLE(GLeglContext ctx, GLenum components) +{ + return GL_CoverageModulationCHROMIUMContextANGLE(ctx, components); +} + +void GL_APIENTRY glCopyTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopyTextureCHROMIUMContextANGLE(ctx, sourceId, sourceLevel, destTarget, destId, + destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); +} + +void GL_APIENTRY glCopySubTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLint width, + GLint height, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopySubTextureCHROMIUMContextANGLE( + ctx, sourceId, sourceLevel, destTarget, destId, destLevel, xoffset, yoffset, x, y, width, + height, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); +} + +void GL_APIENTRY glCompressedCopyTextureCHROMIUMContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLuint destId) +{ + return GL_CompressedCopyTextureCHROMIUMContextANGLE(ctx, sourceId, destId); +} + +void GL_APIENTRY glRequestExtensionANGLEContextANGLE(GLeglContext ctx, const GLchar *name) +{ + return GL_RequestExtensionANGLEContextANGLE(ctx, name); +} + +void GL_APIENTRY glDisableExtensionANGLEContextANGLE(GLeglContext ctx, const GLchar *name) +{ + return GL_DisableExtensionANGLEContextANGLE(ctx, name); +} + +void GL_APIENTRY glGetBooleanvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLboolean *params) +{ + return GL_GetBooleanvRobustANGLEContextANGLE(ctx, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetBufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetBufferParameterivRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetFloatvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetFloatvRobustANGLEContextANGLE(ctx, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetFramebufferAttachmentParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum attachment, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetFramebufferAttachmentParameterivRobustANGLEContextANGLE( + ctx, target, attachment, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetIntegervRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + return GL_GetIntegervRobustANGLEContextANGLE(ctx, pname, bufSize, length, data); +} + +void GL_APIENTRY glGetProgramivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetProgramivRobustANGLEContextANGLE(ctx, program, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetRenderbufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetRenderbufferParameterivRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetShaderivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint shader, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetShaderivRobustANGLEContextANGLE(ctx, shader, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetTexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetTexParameterfvRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetTexParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetTexParameterivRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetUniformfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetUniformfvRobustANGLEContextANGLE(ctx, program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetUniformivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetUniformivRobustANGLEContextANGLE(ctx, program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetVertexAttribfvRobustANGLEContextANGLE(ctx, index, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetVertexAttribivRobustANGLEContextANGLE(ctx, index, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribPointervRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **pointer) +{ + return GL_GetVertexAttribPointervRobustANGLEContextANGLE(ctx, index, pname, bufSize, length, + pointer); +} + +void GL_APIENTRY glReadPixelsRobustANGLEContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *pixels) +{ + return GL_ReadPixelsRobustANGLEContextANGLE(ctx, x, y, width, height, format, type, bufSize, + length, columns, rows, pixels); +} + +void GL_APIENTRY glTexImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexImage2DRobustANGLEContextANGLE(ctx, target, level, internalformat, width, height, + border, format, type, bufSize, pixels); +} + +void GL_APIENTRY glTexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLfloat *params) +{ + return GL_TexParameterfvRobustANGLEContextANGLE(ctx, target, pname, bufSize, params); +} + +void GL_APIENTRY glTexParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + return GL_TexParameterivRobustANGLEContextANGLE(ctx, target, pname, bufSize, params); +} + +void GL_APIENTRY glTexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexSubImage2DRobustANGLEContextANGLE(ctx, target, level, xoffset, yoffset, width, + height, format, type, bufSize, pixels); +} + +void GL_APIENTRY glTexImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexImage3DRobustANGLEContextANGLE(ctx, target, level, internalformat, width, height, + depth, border, format, type, bufSize, pixels); +} + +void GL_APIENTRY glTexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLenum type, + GLsizei bufSize, + const void *pixels) +{ + return GL_TexSubImage3DRobustANGLEContextANGLE(ctx, target, level, xoffset, yoffset, zoffset, + width, height, depth, format, type, bufSize, + pixels); +} + +void GL_APIENTRY glCompressedTexImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexImage2DRobustANGLEContextANGLE( + ctx, target, level, internalformat, width, height, border, imageSize, dataSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLsizei xoffset, + GLsizei yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexSubImage2DRobustANGLEContextANGLE( + ctx, target, level, xoffset, yoffset, width, height, format, imageSize, dataSize, data); +} + +void GL_APIENTRY glCompressedTexImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLint border, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexImage3DRobustANGLEContextANGLE(ctx, target, level, internalformat, width, + height, depth, border, imageSize, + dataSize, data); +} + +void GL_APIENTRY glCompressedTexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLsizei width, + GLsizei height, + GLsizei depth, + GLenum format, + GLsizei imageSize, + GLsizei dataSize, + const GLvoid *data) +{ + return GL_CompressedTexSubImage3DRobustANGLEContextANGLE(ctx, target, level, xoffset, yoffset, + zoffset, width, height, depth, format, + imageSize, dataSize, data); +} + +void GL_APIENTRY glGetQueryivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetQueryivRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetQueryObjectuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetQueryObjectuivRobustANGLEContextANGLE(ctx, id, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetBufferPointervRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + return GL_GetBufferPointervRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetIntegeri_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint *data) +{ + return GL_GetIntegeri_vRobustANGLEContextANGLE(ctx, target, index, bufSize, length, data); +} + +void GL_APIENTRY glGetInternalformativRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum internalformat, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetInternalformativRobustANGLEContextANGLE(ctx, target, internalformat, pname, + bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetVertexAttribIivRobustANGLEContextANGLE(ctx, index, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetVertexAttribIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint index, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetVertexAttribIuivRobustANGLEContextANGLE(ctx, index, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetUniformuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetUniformuivRobustANGLEContextANGLE(ctx, program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetActiveUniformBlockivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLuint uniformBlockIndex, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetActiveUniformBlockivRobustANGLEContextANGLE(ctx, program, uniformBlockIndex, pname, + bufSize, length, params); +} + +void GL_APIENTRY glGetInteger64vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + return GL_GetInteger64vRobustANGLEContextANGLE(ctx, pname, bufSize, length, data); +} + +void GL_APIENTRY glGetInteger64i_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLint64 *data) +{ + return GL_GetInteger64i_vRobustANGLEContextANGLE(ctx, target, index, bufSize, length, data); +} + +void GL_APIENTRY glGetBufferParameteri64vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + return GL_GetBufferParameteri64vRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, + params); +} + +void GL_APIENTRY glSamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLuint pname, + GLsizei bufSize, + const GLint *param) +{ + return GL_SamplerParameterivRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, param); +} + +void GL_APIENTRY glSamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLfloat *param) +{ + return GL_SamplerParameterfvRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, param); +} + +void GL_APIENTRY glGetSamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetSamplerParameterivRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetSamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetSamplerParameterfvRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetFramebufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetFramebufferParameterivRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetProgramInterfaceivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLenum programInterface, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetProgramInterfaceivRobustANGLEContextANGLE(ctx, program, programInterface, pname, + bufSize, length, params); +} + +void GL_APIENTRY glGetBooleani_vRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLboolean *data) +{ + return GL_GetBooleani_vRobustANGLEContextANGLE(ctx, target, index, bufSize, length, data); +} + +void GL_APIENTRY glGetMultisamplefvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLsizei bufSize, + GLsizei *length, + GLfloat *val) +{ + return GL_GetMultisamplefvRobustANGLEContextANGLE(ctx, pname, index, bufSize, length, val); +} + +void GL_APIENTRY glGetTexLevelParameterivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetTexLevelParameterivRobustANGLEContextANGLE(ctx, target, level, pname, bufSize, + length, params); +} + +void GL_APIENTRY glGetTexLevelParameterfvRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetTexLevelParameterfvRobustANGLEContextANGLE(ctx, target, level, pname, bufSize, + length, params); +} + +void GL_APIENTRY glGetPointervRobustANGLERobustANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + void **params) +{ + return GL_GetPointervRobustANGLERobustANGLEContextANGLE(ctx, pname, bufSize, length, params); +} + +void GL_APIENTRY glReadnPixelsRobustANGLEContextANGLE(GLeglContext ctx, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLsizei *length, + GLsizei *columns, + GLsizei *rows, + void *data) +{ + return GL_ReadnPixelsRobustANGLEContextANGLE(ctx, x, y, width, height, format, type, bufSize, + length, columns, rows, data); +} + +void GL_APIENTRY glGetnUniformfvRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLfloat *params) +{ + return GL_GetnUniformfvRobustANGLEContextANGLE(ctx, program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetnUniformivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetnUniformivRobustANGLEContextANGLE(ctx, program, location, bufSize, length, params); +} + +void GL_APIENTRY glGetnUniformuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint program, + GLint location, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetnUniformuivRobustANGLEContextANGLE(ctx, program, location, bufSize, length, + params); +} + +void GL_APIENTRY glTexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLint *params) +{ + return GL_TexParameterIivRobustANGLEContextANGLE(ctx, target, pname, bufSize, params); +} + +void GL_APIENTRY glTexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + const GLuint *params) +{ + return GL_TexParameterIuivRobustANGLEContextANGLE(ctx, target, pname, bufSize, params); +} + +void GL_APIENTRY glGetTexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetTexParameterIivRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetTexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetTexParameterIuivRobustANGLEContextANGLE(ctx, target, pname, bufSize, length, + params); +} + +void GL_APIENTRY glSamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLint *param) +{ + return GL_SamplerParameterIivRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, param); +} + +void GL_APIENTRY glSamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + const GLuint *param) +{ + return GL_SamplerParameterIuivRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, param); +} + +void GL_APIENTRY glGetSamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetSamplerParameterIivRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetSamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint sampler, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint *params) +{ + return GL_GetSamplerParameterIuivRobustANGLEContextANGLE(ctx, sampler, pname, bufSize, length, + params); +} + +void GL_APIENTRY glGetQueryObjectivRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint *params) +{ + return GL_GetQueryObjectivRobustANGLEContextANGLE(ctx, id, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetQueryObjecti64vRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLint64 *params) +{ + return GL_GetQueryObjecti64vRobustANGLEContextANGLE(ctx, id, pname, bufSize, length, params); +} + +void GL_APIENTRY glGetQueryObjectui64vRobustANGLEContextANGLE(GLeglContext ctx, + GLuint id, + GLenum pname, + GLsizei bufSize, + GLsizei *length, + GLuint64 *params) +{ + return GL_GetQueryObjectui64vRobustANGLEContextANGLE(ctx, id, pname, bufSize, length, params); +} + +void GL_APIENTRY glCopyTexture3DANGLEContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint internalFormat, + GLenum destType, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopyTexture3DANGLEContextANGLE(ctx, sourceId, sourceLevel, destTarget, destId, + destLevel, internalFormat, destType, unpackFlipY, + unpackPremultiplyAlpha, unpackUnmultiplyAlpha); +} + +void GL_APIENTRY glCopySubTexture3DANGLEContextANGLE(GLeglContext ctx, + GLuint sourceId, + GLint sourceLevel, + GLenum destTarget, + GLuint destId, + GLint destLevel, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLint z, + GLint width, + GLint height, + GLint depth, + GLboolean unpackFlipY, + GLboolean unpackPremultiplyAlpha, + GLboolean unpackUnmultiplyAlpha) +{ + return GL_CopySubTexture3DANGLEContextANGLE( + ctx, sourceId, sourceLevel, destTarget, destId, destLevel, xoffset, yoffset, zoffset, x, y, + z, width, height, depth, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); +} + +void GL_APIENTRY glTexStorage2DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations) +{ + return GL_TexStorage2DMultisampleANGLEContextANGLE(ctx, target, samples, internalformat, width, + height, fixedsamplelocations); +} + +void GL_APIENTRY glGetTexLevelParameterivANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLint *params) +{ + return GL_GetTexLevelParameterivANGLEContextANGLE(ctx, target, level, pname, params); +} + +void GL_APIENTRY glGetTexLevelParameterfvANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum pname, + GLfloat *params) +{ + return GL_GetTexLevelParameterfvANGLEContextANGLE(ctx, target, level, pname, params); +} + +void GL_APIENTRY glMultiDrawArraysANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + GLsizei drawcount) +{ + return GL_MultiDrawArraysANGLEContextANGLE(ctx, mode, firsts, counts, drawcount); +} + +void GL_APIENTRY glMultiDrawArraysInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + return GL_MultiDrawArraysInstancedANGLEContextANGLE(ctx, mode, firsts, counts, instanceCounts, + drawcount); +} + +void GL_APIENTRY glMultiDrawElementsANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + GLsizei drawcount) +{ + return GL_MultiDrawElementsANGLEContextANGLE(ctx, mode, counts, type, indices, drawcount); +} + +void GL_APIENTRY glMultiDrawElementsInstancedANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + GLsizei drawcount) +{ + return GL_MultiDrawElementsInstancedANGLEContextANGLE(ctx, mode, counts, type, indices, + instanceCounts, drawcount); +} + +void GL_APIENTRY glDrawArraysInstancedBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance) +{ + return GL_DrawArraysInstancedBaseInstanceANGLEContextANGLE(ctx, mode, first, count, + instanceCount, baseInstance); +} + +void GL_APIENTRY +glDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei instanceCounts, + GLint baseVertex, + GLuint baseInstance) +{ + return GL_DrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE( + ctx, mode, count, type, indices, instanceCounts, baseVertex, baseInstance); +} + +void GL_APIENTRY +glMultiDrawArraysInstancedBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLint *firsts, + const GLsizei *counts, + const GLsizei *instanceCounts, + const GLuint *baseInstances, + GLsizei drawcount) +{ + return GL_MultiDrawArraysInstancedBaseInstanceANGLEContextANGLE( + ctx, mode, firsts, counts, instanceCounts, baseInstances, drawcount); +} + +void GL_APIENTRY +glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE(GLeglContext ctx, + GLenum mode, + const GLsizei *counts, + GLenum type, + const GLvoid *const *indices, + const GLsizei *instanceCounts, + const GLint *baseVertices, + const GLuint *baseInstances, + GLsizei drawcount) +{ + return GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE( + ctx, mode, counts, type, indices, instanceCounts, baseVertices, baseInstances, drawcount); +} + +void GL_APIENTRY glGetMultisamplefvANGLEContextANGLE(GLeglContext ctx, + GLenum pname, + GLuint index, + GLfloat *val) +{ + return GL_GetMultisamplefvANGLEContextANGLE(ctx, pname, index, val); +} + +void GL_APIENTRY glSampleMaskiANGLEContextANGLE(GLeglContext ctx, + GLuint maskNumber, + GLbitfield mask) +{ + return GL_SampleMaskiANGLEContextANGLE(ctx, maskNumber, mask); +} + +void GL_APIENTRY glProvokingVertexANGLEContextANGLE(GLeglContext ctx, GLenum mode) +{ + return GL_ProvokingVertexANGLEContextANGLE(ctx, mode); +} + +void GL_APIENTRY glLoseContextCHROMIUMContextANGLE(GLeglContext ctx, GLenum current, GLenum other) +{ + return GL_LoseContextCHROMIUMContextANGLE(ctx, current, other); +} + +void GL_APIENTRY glTexImage2DExternalANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type) +{ + return GL_TexImage2DExternalANGLEContextANGLE(ctx, target, level, internalformat, width, height, + border, format, type); +} + +void GL_APIENTRY glInvalidateTextureANGLEContextANGLE(GLeglContext ctx, GLenum target) +{ + return GL_InvalidateTextureANGLEContextANGLE(ctx, target); +} + +void GL_APIENTRY glGetTexImageANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLint level, + GLenum format, + GLenum type, + void *pixels) +{ + return GL_GetTexImageANGLEContextANGLE(ctx, target, level, format, type, pixels); +} + +void GL_APIENTRY glGetRenderbufferImageANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLenum format, + GLenum type, + void *pixels) +{ + return GL_GetRenderbufferImageANGLEContextANGLE(ctx, target, format, type, pixels); +} + +void GL_APIENTRY glTexStorageMemFlags2DANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags2DANGLEContextANGLE(ctx, target, levels, internalFormat, width, + height, memory, offset, createFlags, + usageFlags); +} + +void GL_APIENTRY glTexStorageMemFlags2DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags2DMultisampleANGLEContextANGLE( + ctx, target, samples, internalFormat, width, height, fixedSampleLocations, memory, offset, + createFlags, usageFlags); +} + +void GL_APIENTRY glTexStorageMemFlags3DANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags3DANGLEContextANGLE(ctx, target, levels, internalFormat, width, + height, depth, memory, offset, createFlags, + usageFlags); +} + +void GL_APIENTRY glTexStorageMemFlags3DMultisampleANGLEContextANGLE(GLeglContext ctx, + GLenum target, + GLsizei samples, + GLenum internalFormat, + GLsizei width, + GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations, + GLuint memory, + GLuint64 offset, + GLbitfield createFlags, + GLbitfield usageFlags) +{ + return GL_TexStorageMemFlags3DMultisampleANGLEContextANGLE( + ctx, target, samples, internalFormat, width, height, depth, fixedSampleLocations, memory, + offset, createFlags, usageFlags); +} + +void GL_APIENTRY glImportMemoryZirconHandleANGLEContextANGLE(GLeglContext ctx, + GLuint memory, + GLuint64 size, + GLenum handleType, + GLuint handle) +{ + return GL_ImportMemoryZirconHandleANGLEContextANGLE(ctx, memory, size, handleType, handle); +} + +void GL_APIENTRY glImportSemaphoreZirconHandleANGLEContextANGLE(GLeglContext ctx, + GLuint semaphore, + GLenum handleType, + GLuint handle) +{ + return GL_ImportSemaphoreZirconHandleANGLEContextANGLE(ctx, semaphore, handleType, handle); +} + +} // extern "C" diff --git a/gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.def b/gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.def new file mode 100644 index 0000000000..86ecbc0a72 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.def @@ -0,0 +1,1941 @@ +; GENERATED FILE - DO NOT EDIT. +; Generated by generate_entry_points.py using data from Khronos and ANGLE XML files. +; +; 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. +LIBRARY libGLESv2 +EXPORTS + + ; OpenGL ES 2.0 + glActiveTexture + glAttachShader + glBindAttribLocation + glBindBuffer + glBindFramebuffer + glBindRenderbuffer + glBindTexture + glBlendColor + glBlendEquation + glBlendEquationSeparate + glBlendFunc + glBlendFuncSeparate + glBufferData + glBufferSubData + glCheckFramebufferStatus + glClear + glClearColor + glClearDepthf + glClearStencil + glColorMask + glCompileShader + glCompressedTexImage2D + glCompressedTexSubImage2D + glCopyTexImage2D + glCopyTexSubImage2D + glCreateProgram + glCreateShader + glCullFace + glDeleteBuffers + glDeleteFramebuffers + glDeleteProgram + glDeleteRenderbuffers + glDeleteShader + glDeleteTextures + glDepthFunc + glDepthMask + glDepthRangef + glDetachShader + glDisable + glDisableVertexAttribArray + glDrawArrays + glDrawElements + glEnable + glEnableVertexAttribArray + glFinish + glFlush + glFramebufferRenderbuffer + glFramebufferTexture2D + glFrontFace + glGenBuffers + glGenFramebuffers + glGenRenderbuffers + glGenTextures + glGenerateMipmap + glGetActiveAttrib + glGetActiveUniform + glGetAttachedShaders + glGetAttribLocation + glGetBooleanv + glGetBufferParameteriv + glGetError + glGetFloatv + glGetFramebufferAttachmentParameteriv + glGetIntegerv + glGetProgramInfoLog + glGetProgramiv + glGetRenderbufferParameteriv + glGetShaderInfoLog + glGetShaderPrecisionFormat + glGetShaderSource + glGetShaderiv + glGetString + glGetTexParameterfv + glGetTexParameteriv + glGetUniformLocation + glGetUniformfv + glGetUniformiv + glGetVertexAttribPointerv + glGetVertexAttribfv + glGetVertexAttribiv + glHint + glIsBuffer + glIsEnabled + glIsFramebuffer + glIsProgram + glIsRenderbuffer + glIsShader + glIsTexture + glLineWidth + glLinkProgram + glPixelStorei + glPolygonOffset + glReadPixels + glReleaseShaderCompiler + glRenderbufferStorage + glSampleCoverage + glScissor + glShaderBinary + glShaderSource + glStencilFunc + glStencilFuncSeparate + glStencilMask + glStencilMaskSeparate + glStencilOp + glStencilOpSeparate + glTexImage2D + glTexParameterf + glTexParameterfv + glTexParameteri + glTexParameteriv + glTexSubImage2D + glUniform1f + glUniform1fv + glUniform1i + glUniform1iv + glUniform2f + glUniform2fv + glUniform2i + glUniform2iv + glUniform3f + glUniform3fv + glUniform3i + glUniform3iv + glUniform4f + glUniform4fv + glUniform4i + glUniform4iv + glUniformMatrix2fv + glUniformMatrix3fv + glUniformMatrix4fv + glUseProgram + glValidateProgram + glVertexAttrib1f + glVertexAttrib1fv + glVertexAttrib2f + glVertexAttrib2fv + glVertexAttrib3f + glVertexAttrib3fv + glVertexAttrib4f + glVertexAttrib4fv + glVertexAttribPointer + glViewport + + ; OpenGL ES 3.0 + glBeginQuery + glBeginTransformFeedback + glBindBufferBase + glBindBufferRange + glBindSampler + glBindTransformFeedback + glBindVertexArray + glBlitFramebuffer + glClearBufferfi + glClearBufferfv + glClearBufferiv + glClearBufferuiv + glClientWaitSync + glCompressedTexImage3D + glCompressedTexSubImage3D + glCopyBufferSubData + glCopyTexSubImage3D + glDeleteQueries + glDeleteSamplers + glDeleteSync + glDeleteTransformFeedbacks + glDeleteVertexArrays + glDrawArraysInstanced + glDrawBuffers + glDrawElementsInstanced + glDrawRangeElements + glEndQuery + glEndTransformFeedback + glFenceSync + glFlushMappedBufferRange + glFramebufferTextureLayer + glGenQueries + glGenSamplers + glGenTransformFeedbacks + glGenVertexArrays + glGetActiveUniformBlockName + glGetActiveUniformBlockiv + glGetActiveUniformsiv + glGetBufferParameteri64v + glGetBufferPointerv + glGetFragDataLocation + glGetInteger64i_v + glGetInteger64v + glGetIntegeri_v + glGetInternalformativ + glGetProgramBinary + glGetQueryObjectuiv + glGetQueryiv + glGetSamplerParameterfv + glGetSamplerParameteriv + glGetStringi + glGetSynciv + glGetTransformFeedbackVarying + glGetUniformBlockIndex + glGetUniformIndices + glGetUniformuiv + glGetVertexAttribIiv + glGetVertexAttribIuiv + glInvalidateFramebuffer + glInvalidateSubFramebuffer + glIsQuery + glIsSampler + glIsSync + glIsTransformFeedback + glIsVertexArray + glMapBufferRange + glPauseTransformFeedback + glProgramBinary + glProgramParameteri + glReadBuffer + glRenderbufferStorageMultisample + glResumeTransformFeedback + glSamplerParameterf + glSamplerParameterfv + glSamplerParameteri + glSamplerParameteriv + glTexImage3D + glTexStorage2D + glTexStorage3D + glTexSubImage3D + glTransformFeedbackVaryings + glUniform1ui + glUniform1uiv + glUniform2ui + glUniform2uiv + glUniform3ui + glUniform3uiv + glUniform4ui + glUniform4uiv + glUniformBlockBinding + glUniformMatrix2x3fv + glUniformMatrix2x4fv + glUniformMatrix3x2fv + glUniformMatrix3x4fv + glUniformMatrix4x2fv + glUniformMatrix4x3fv + glUnmapBuffer + glVertexAttribDivisor + glVertexAttribI4i + glVertexAttribI4iv + glVertexAttribI4ui + glVertexAttribI4uiv + glVertexAttribIPointer + glWaitSync + + ; OpenGL ES 3.1 + glActiveShaderProgram + glBindImageTexture + glBindProgramPipeline + glBindVertexBuffer + glCreateShaderProgramv + glDeleteProgramPipelines + glDispatchCompute + glDispatchComputeIndirect + glDrawArraysIndirect + glDrawElementsIndirect + glFramebufferParameteri + glGenProgramPipelines + glGetBooleani_v + glGetFramebufferParameteriv + glGetMultisamplefv + glGetProgramInterfaceiv + glGetProgramPipelineInfoLog + glGetProgramPipelineiv + glGetProgramResourceIndex + glGetProgramResourceLocation + glGetProgramResourceName + glGetProgramResourceiv + glGetTexLevelParameterfv + glGetTexLevelParameteriv + glIsProgramPipeline + glMemoryBarrier + glMemoryBarrierByRegion + glProgramUniform1f + glProgramUniform1fv + glProgramUniform1i + glProgramUniform1iv + glProgramUniform1ui + glProgramUniform1uiv + glProgramUniform2f + glProgramUniform2fv + glProgramUniform2i + glProgramUniform2iv + glProgramUniform2ui + glProgramUniform2uiv + glProgramUniform3f + glProgramUniform3fv + glProgramUniform3i + glProgramUniform3iv + glProgramUniform3ui + glProgramUniform3uiv + glProgramUniform4f + glProgramUniform4fv + glProgramUniform4i + glProgramUniform4iv + glProgramUniform4ui + glProgramUniform4uiv + glProgramUniformMatrix2fv + glProgramUniformMatrix2x3fv + glProgramUniformMatrix2x4fv + glProgramUniformMatrix3fv + glProgramUniformMatrix3x2fv + glProgramUniformMatrix3x4fv + glProgramUniformMatrix4fv + glProgramUniformMatrix4x2fv + glProgramUniformMatrix4x3fv + glSampleMaski + glTexStorage2DMultisample + glUseProgramStages + glValidateProgramPipeline + glVertexAttribBinding + glVertexAttribFormat + glVertexAttribIFormat + glVertexBindingDivisor + + ; OpenGL ES 3.2 + glBlendBarrier + glBlendEquationSeparatei + glBlendEquationi + glBlendFuncSeparatei + glBlendFunci + glColorMaski + glCopyImageSubData + glDebugMessageCallback + glDebugMessageControl + glDebugMessageInsert + glDisablei + glDrawElementsBaseVertex + glDrawElementsInstancedBaseVertex + glDrawRangeElementsBaseVertex + glEnablei + glFramebufferTexture + glGetDebugMessageLog + glGetGraphicsResetStatus + glGetObjectLabel + glGetObjectPtrLabel + glGetPointerv + glGetSamplerParameterIiv + glGetSamplerParameterIuiv + glGetTexParameterIiv + glGetTexParameterIuiv + glGetnUniformfv + glGetnUniformiv + glGetnUniformuiv + glIsEnabledi + glMinSampleShading + glObjectLabel + glObjectPtrLabel + glPatchParameteri + glPopDebugGroup + glPrimitiveBoundingBox + glPushDebugGroup + glReadnPixels + glSamplerParameterIiv + glSamplerParameterIuiv + glTexBuffer + glTexBufferRange + glTexParameterIiv + glTexParameterIuiv + glTexStorage3DMultisample + + ; OpenGL ES 1.0 + glAlphaFunc + glAlphaFuncx + glClearColorx + glClearDepthx + glClientActiveTexture + glClipPlanef + glClipPlanex + glColor4f + glColor4ub + glColor4x + glColorPointer + glDepthRangex + glDisableClientState + glEnableClientState + glFogf + glFogfv + glFogx + glFogxv + glFrustumf + glFrustumx + glGetClipPlanef + glGetClipPlanex + glGetFixedv + glGetLightfv + glGetLightxv + glGetMaterialfv + glGetMaterialxv + glGetTexEnvfv + glGetTexEnviv + glGetTexEnvxv + glGetTexParameterxv + glLightModelf + glLightModelfv + glLightModelx + glLightModelxv + glLightf + glLightfv + glLightx + glLightxv + glLineWidthx + glLoadIdentity + glLoadMatrixf + glLoadMatrixx + glLogicOp + glMaterialf + glMaterialfv + glMaterialx + glMaterialxv + glMatrixMode + glMultMatrixf + glMultMatrixx + glMultiTexCoord4f + glMultiTexCoord4x + glNormal3f + glNormal3x + glNormalPointer + glOrthof + glOrthox + glPointParameterf + glPointParameterfv + glPointParameterx + glPointParameterxv + glPointSize + glPointSizex + glPolygonOffsetx + glPopMatrix + glPushMatrix + glRotatef + glRotatex + glSampleCoveragex + glScalef + glScalex + glShadeModel + glTexCoordPointer + glTexEnvf + glTexEnvfv + glTexEnvi + glTexEnviv + glTexEnvx + glTexEnvxv + glTexParameterx + glTexParameterxv + glTranslatef + glTranslatex + glVertexPointer + + ; GL_ANGLE_base_vertex_base_instance + glDrawArraysInstancedBaseInstanceANGLE + glDrawElementsInstancedBaseVertexBaseInstanceANGLE + glMultiDrawArraysInstancedBaseInstanceANGLE + glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE + + ; GL_ANGLE_copy_texture_3d + glCopySubTexture3DANGLE + glCopyTexture3DANGLE + + ; GL_ANGLE_framebuffer_blit + glBlitFramebufferANGLE + + ; GL_ANGLE_framebuffer_multisample + glRenderbufferStorageMultisampleANGLE + + ; GL_ANGLE_get_image + glGetRenderbufferImageANGLE + glGetTexImageANGLE + + ; GL_ANGLE_get_tex_level_parameter + glGetTexLevelParameterfvANGLE + glGetTexLevelParameterivANGLE + + ; GL_ANGLE_instanced_arrays + glDrawArraysInstancedANGLE + glDrawElementsInstancedANGLE + glVertexAttribDivisorANGLE + + ; GL_ANGLE_memory_object_flags + glTexStorageMemFlags2DANGLE + glTexStorageMemFlags2DMultisampleANGLE + glTexStorageMemFlags3DANGLE + glTexStorageMemFlags3DMultisampleANGLE + + ; GL_ANGLE_memory_object_fuchsia + glImportMemoryZirconHandleANGLE + + ; GL_ANGLE_multi_draw + glMultiDrawArraysANGLE + glMultiDrawArraysInstancedANGLE + glMultiDrawElementsANGLE + glMultiDrawElementsInstancedANGLE + + ; GL_ANGLE_program_binary + + ; GL_ANGLE_provoking_vertex + glProvokingVertexANGLE + + ; GL_ANGLE_request_extension + glDisableExtensionANGLE + glRequestExtensionANGLE + + ; GL_ANGLE_robust_client_memory + glCompressedTexImage2DRobustANGLE + glCompressedTexImage3DRobustANGLE + glCompressedTexSubImage2DRobustANGLE + glCompressedTexSubImage3DRobustANGLE + glGetActiveUniformBlockivRobustANGLE + glGetBooleani_vRobustANGLE + glGetBooleanvRobustANGLE + glGetBufferParameteri64vRobustANGLE + glGetBufferParameterivRobustANGLE + glGetBufferPointervRobustANGLE + glGetFloatvRobustANGLE + glGetFramebufferAttachmentParameterivRobustANGLE + glGetFramebufferParameterivRobustANGLE + glGetInteger64i_vRobustANGLE + glGetInteger64vRobustANGLE + glGetIntegeri_vRobustANGLE + glGetIntegervRobustANGLE + glGetInternalformativRobustANGLE + glGetMultisamplefvRobustANGLE + glGetPointervRobustANGLERobustANGLE + glGetProgramInterfaceivRobustANGLE + glGetProgramivRobustANGLE + glGetQueryObjecti64vRobustANGLE + glGetQueryObjectivRobustANGLE + glGetQueryObjectui64vRobustANGLE + glGetQueryObjectuivRobustANGLE + glGetQueryivRobustANGLE + glGetRenderbufferParameterivRobustANGLE + glGetSamplerParameterIivRobustANGLE + glGetSamplerParameterIuivRobustANGLE + glGetSamplerParameterfvRobustANGLE + glGetSamplerParameterivRobustANGLE + glGetShaderivRobustANGLE + glGetTexLevelParameterfvRobustANGLE + glGetTexLevelParameterivRobustANGLE + glGetTexParameterIivRobustANGLE + glGetTexParameterIuivRobustANGLE + glGetTexParameterfvRobustANGLE + glGetTexParameterivRobustANGLE + glGetUniformfvRobustANGLE + glGetUniformivRobustANGLE + glGetUniformuivRobustANGLE + glGetVertexAttribIivRobustANGLE + glGetVertexAttribIuivRobustANGLE + glGetVertexAttribPointervRobustANGLE + glGetVertexAttribfvRobustANGLE + glGetVertexAttribivRobustANGLE + glGetnUniformfvRobustANGLE + glGetnUniformivRobustANGLE + glGetnUniformuivRobustANGLE + glReadPixelsRobustANGLE + glReadnPixelsRobustANGLE + glSamplerParameterIivRobustANGLE + glSamplerParameterIuivRobustANGLE + glSamplerParameterfvRobustANGLE + glSamplerParameterivRobustANGLE + glTexImage2DRobustANGLE + glTexImage3DRobustANGLE + glTexParameterIivRobustANGLE + glTexParameterIuivRobustANGLE + glTexParameterfvRobustANGLE + glTexParameterivRobustANGLE + glTexSubImage2DRobustANGLE + glTexSubImage3DRobustANGLE + + ; GL_ANGLE_semaphore_fuchsia + glImportSemaphoreZirconHandleANGLE + + ; GL_ANGLE_texture_external_update + glInvalidateTextureANGLE + glTexImage2DExternalANGLE + + ; GL_ANGLE_texture_multisample + glGetMultisamplefvANGLE + glSampleMaskiANGLE + glTexStorage2DMultisampleANGLE + + ; GL_ANGLE_translated_shader_source + glGetTranslatedShaderSourceANGLE + + ; GL_CHROMIUM_bind_uniform_location + glBindUniformLocationCHROMIUM + + ; GL_CHROMIUM_copy_compressed_texture + glCompressedCopyTextureCHROMIUM + + ; GL_CHROMIUM_copy_texture + glCopySubTextureCHROMIUM + glCopyTextureCHROMIUM + + ; GL_CHROMIUM_framebuffer_mixed_samples + glCoverageModulationCHROMIUM + + ; GL_CHROMIUM_lose_context + glLoseContextCHROMIUM + + ; GL_EXT_EGL_image_array + + ; GL_EXT_YUV_target + + ; GL_EXT_blend_func_extended + glBindFragDataLocationEXT + glBindFragDataLocationIndexedEXT + glGetFragDataIndexEXT + glGetProgramResourceLocationIndexEXT + + ; GL_EXT_buffer_storage + glBufferStorageEXT + + ; GL_EXT_clip_control + glClipControlEXT + + ; GL_EXT_copy_image + glCopyImageSubDataEXT + + ; GL_EXT_debug_label + glGetObjectLabelEXT + glLabelObjectEXT + + ; GL_EXT_debug_marker + glInsertEventMarkerEXT + glPopGroupMarkerEXT + glPushGroupMarkerEXT + + ; GL_EXT_discard_framebuffer + glDiscardFramebufferEXT + + ; GL_EXT_disjoint_timer_query + glBeginQueryEXT + glDeleteQueriesEXT + glEndQueryEXT + glGenQueriesEXT + glGetInteger64vEXT + glGetQueryObjecti64vEXT + glGetQueryObjectivEXT + glGetQueryObjectui64vEXT + glGetQueryObjectuivEXT + glGetQueryivEXT + glIsQueryEXT + glQueryCounterEXT + + ; GL_EXT_draw_buffers + glDrawBuffersEXT + + ; GL_EXT_draw_buffers_indexed + glBlendEquationSeparateiEXT + glBlendEquationiEXT + glBlendFuncSeparateiEXT + glBlendFunciEXT + glColorMaskiEXT + glDisableiEXT + glEnableiEXT + glIsEnablediEXT + + ; GL_EXT_draw_elements_base_vertex + glDrawElementsBaseVertexEXT + glDrawElementsInstancedBaseVertexEXT + glDrawRangeElementsBaseVertexEXT + glMultiDrawElementsBaseVertexEXT + + ; GL_EXT_external_buffer + glBufferStorageExternalEXT + glNamedBufferStorageExternalEXT + + ; GL_EXT_geometry_shader + glFramebufferTextureEXT + + ; GL_EXT_instanced_arrays + glDrawArraysInstancedEXT + glDrawElementsInstancedEXT + glVertexAttribDivisorEXT + + ; GL_EXT_map_buffer_range + glFlushMappedBufferRangeEXT + glMapBufferRangeEXT + + ; GL_EXT_memory_object + glBufferStorageMemEXT + glCreateMemoryObjectsEXT + glDeleteMemoryObjectsEXT + glGetMemoryObjectParameterivEXT + glGetUnsignedBytei_vEXT + glGetUnsignedBytevEXT + glIsMemoryObjectEXT + glMemoryObjectParameterivEXT + glTexStorageMem2DEXT + glTexStorageMem2DMultisampleEXT + glTexStorageMem3DEXT + glTexStorageMem3DMultisampleEXT + + ; GL_EXT_memory_object_fd + glImportMemoryFdEXT + + ; GL_EXT_multisampled_render_to_texture + glFramebufferTexture2DMultisampleEXT + glRenderbufferStorageMultisampleEXT + + ; GL_EXT_occlusion_query_boolean + + ; GL_EXT_primitive_bounding_box + glPrimitiveBoundingBoxEXT + + ; GL_EXT_read_format_bgra + + ; GL_EXT_robustness + glGetGraphicsResetStatusEXT + glGetnUniformfvEXT + glGetnUniformivEXT + glReadnPixelsEXT + + ; GL_EXT_sRGB + + ; GL_EXT_semaphore + glDeleteSemaphoresEXT + glGenSemaphoresEXT + glGetSemaphoreParameterui64vEXT + glIsSemaphoreEXT + glSemaphoreParameterui64vEXT + glSignalSemaphoreEXT + glWaitSemaphoreEXT + + ; GL_EXT_semaphore_fd + glImportSemaphoreFdEXT + + ; GL_EXT_separate_shader_objects + glActiveShaderProgramEXT + glBindProgramPipelineEXT + glCreateShaderProgramvEXT + glDeleteProgramPipelinesEXT + glGenProgramPipelinesEXT + glGetProgramPipelineInfoLogEXT + glGetProgramPipelineivEXT + glIsProgramPipelineEXT + glProgramParameteriEXT + glProgramUniform1fEXT + glProgramUniform1fvEXT + glProgramUniform1iEXT + glProgramUniform1ivEXT + glProgramUniform1uiEXT + glProgramUniform1uivEXT + glProgramUniform2fEXT + glProgramUniform2fvEXT + glProgramUniform2iEXT + glProgramUniform2ivEXT + glProgramUniform2uiEXT + glProgramUniform2uivEXT + glProgramUniform3fEXT + glProgramUniform3fvEXT + glProgramUniform3iEXT + glProgramUniform3ivEXT + glProgramUniform3uiEXT + glProgramUniform3uivEXT + glProgramUniform4fEXT + glProgramUniform4fvEXT + glProgramUniform4iEXT + glProgramUniform4ivEXT + glProgramUniform4uiEXT + glProgramUniform4uivEXT + glProgramUniformMatrix2fvEXT + glProgramUniformMatrix2x3fvEXT + glProgramUniformMatrix2x4fvEXT + glProgramUniformMatrix3fvEXT + glProgramUniformMatrix3x2fvEXT + glProgramUniformMatrix3x4fvEXT + glProgramUniformMatrix4fvEXT + glProgramUniformMatrix4x2fvEXT + glProgramUniformMatrix4x3fvEXT + glUseProgramStagesEXT + glValidateProgramPipelineEXT + + ; GL_EXT_shader_framebuffer_fetch_non_coherent + glFramebufferFetchBarrierEXT + + ; GL_EXT_shader_io_blocks + + ; GL_EXT_tessellation_shader + glPatchParameteriEXT + + ; GL_EXT_texture_border_clamp + glGetSamplerParameterIivEXT + glGetSamplerParameterIuivEXT + glGetTexParameterIivEXT + glGetTexParameterIuivEXT + glSamplerParameterIivEXT + glSamplerParameterIuivEXT + glTexParameterIivEXT + glTexParameterIuivEXT + + ; GL_EXT_texture_buffer + glTexBufferEXT + glTexBufferRangeEXT + + ; GL_EXT_texture_compression_bptc + + ; GL_EXT_texture_compression_dxt1 + + ; GL_EXT_texture_compression_rgtc + + ; GL_EXT_texture_compression_s3tc + + ; GL_EXT_texture_compression_s3tc_srgb + + ; GL_EXT_texture_cube_map_array + + ; GL_EXT_texture_filter_anisotropic + + ; GL_EXT_texture_format_BGRA8888 + + ; GL_EXT_texture_sRGB_R8 + + ; GL_EXT_texture_sRGB_RG8 + + ; GL_EXT_texture_storage + glTexStorage1DEXT + glTexStorage2DEXT + glTexStorage3DEXT + + ; GL_KHR_blend_equation_advanced + glBlendBarrierKHR + + ; GL_KHR_debug + glDebugMessageCallbackKHR + glDebugMessageControlKHR + glDebugMessageInsertKHR + glGetDebugMessageLogKHR + glGetObjectLabelKHR + glGetObjectPtrLabelKHR + glGetPointervKHR + glObjectLabelKHR + glObjectPtrLabelKHR + glPopDebugGroupKHR + glPushDebugGroupKHR + + ; GL_KHR_parallel_shader_compile + glMaxShaderCompilerThreadsKHR + + ; GL_NV_fence + glDeleteFencesNV + glFinishFenceNV + glGenFencesNV + glGetFenceivNV + glIsFenceNV + glSetFenceNV + glTestFenceNV + + ; GL_NV_framebuffer_blit + glBlitFramebufferNV + + ; GL_OES_EGL_image + glEGLImageTargetRenderbufferStorageOES + glEGLImageTargetTexture2DOES + + ; GL_OES_compressed_ETC1_RGB8_texture + + ; GL_OES_copy_image + glCopyImageSubDataOES + + ; GL_OES_depth32 + + ; GL_OES_draw_buffers_indexed + glBlendEquationSeparateiOES + glBlendEquationiOES + glBlendFuncSeparateiOES + glBlendFunciOES + glColorMaskiOES + glDisableiOES + glEnableiOES + glIsEnablediOES + + ; GL_OES_draw_elements_base_vertex + glDrawElementsBaseVertexOES + glDrawElementsInstancedBaseVertexOES + glDrawRangeElementsBaseVertexOES + + ; GL_OES_draw_texture + glDrawTexfOES + glDrawTexfvOES + glDrawTexiOES + glDrawTexivOES + glDrawTexsOES + glDrawTexsvOES + glDrawTexxOES + glDrawTexxvOES + + ; GL_OES_framebuffer_object + glBindFramebufferOES + glBindRenderbufferOES + glCheckFramebufferStatusOES + glDeleteFramebuffersOES + glDeleteRenderbuffersOES + glFramebufferRenderbufferOES + glFramebufferTexture2DOES + glGenFramebuffersOES + glGenRenderbuffersOES + glGenerateMipmapOES + glGetFramebufferAttachmentParameterivOES + glGetRenderbufferParameterivOES + glIsFramebufferOES + glIsRenderbufferOES + glRenderbufferStorageOES + + ; GL_OES_get_program_binary + glGetProgramBinaryOES + glProgramBinaryOES + + ; GL_OES_mapbuffer + glGetBufferPointervOES + glMapBufferOES + glUnmapBufferOES + + ; GL_OES_matrix_palette + glCurrentPaletteMatrixOES + glLoadPaletteFromModelViewMatrixOES + glMatrixIndexPointerOES + glWeightPointerOES + + ; GL_OES_point_size_array + glPointSizePointerOES + + ; GL_OES_query_matrix + glQueryMatrixxOES + + ; GL_OES_sample_shading + glMinSampleShadingOES + + ; GL_OES_shader_io_blocks + + ; GL_OES_texture_3D + glCompressedTexImage3DOES + glCompressedTexSubImage3DOES + glCopyTexSubImage3DOES + glFramebufferTexture3DOES + glTexImage3DOES + glTexSubImage3DOES + + ; GL_OES_texture_border_clamp + glGetSamplerParameterIivOES + glGetSamplerParameterIuivOES + glGetTexParameterIivOES + glGetTexParameterIuivOES + glSamplerParameterIivOES + glSamplerParameterIuivOES + glTexParameterIivOES + glTexParameterIuivOES + + ; GL_OES_texture_buffer + glTexBufferOES + glTexBufferRangeOES + + ; GL_OES_texture_cube_map + glGetTexGenfvOES + glGetTexGenivOES + glGetTexGenxvOES + glTexGenfOES + glTexGenfvOES + glTexGeniOES + glTexGenivOES + glTexGenxOES + glTexGenxvOES + + ; GL_OES_texture_cube_map_array + + ; GL_OES_texture_half_float + + ; GL_OES_texture_stencil8 + + ; GL_OES_texture_storage_multisample_2d_array + glTexStorage3DMultisampleOES + + ; GL_OES_vertex_array_object + glBindVertexArrayOES + glDeleteVertexArraysOES + glGenVertexArraysOES + glIsVertexArrayOES + + ; GL_OVR_multiview + glFramebufferTextureMultiviewOVR + + ; GL_OVR_multiview2 + + ; EGL_ANGLE_explicit_context + glActiveShaderProgramContextANGLE + glActiveShaderProgramEXTContextANGLE + glActiveTextureContextANGLE + glAlphaFuncContextANGLE + glAlphaFuncxContextANGLE + glAttachShaderContextANGLE + glBeginQueryContextANGLE + glBeginQueryEXTContextANGLE + glBeginTransformFeedbackContextANGLE + glBindAttribLocationContextANGLE + glBindBufferContextANGLE + glBindBufferBaseContextANGLE + glBindBufferRangeContextANGLE + glBindFragDataLocationEXTContextANGLE + glBindFragDataLocationIndexedEXTContextANGLE + glBindFramebufferContextANGLE + glBindFramebufferOESContextANGLE + glBindImageTextureContextANGLE + glBindProgramPipelineContextANGLE + glBindProgramPipelineEXTContextANGLE + glBindRenderbufferContextANGLE + glBindRenderbufferOESContextANGLE + glBindSamplerContextANGLE + glBindTextureContextANGLE + glBindTransformFeedbackContextANGLE + glBindUniformLocationCHROMIUMContextANGLE + glBindVertexArrayContextANGLE + glBindVertexArrayOESContextANGLE + glBindVertexBufferContextANGLE + glBlendBarrierContextANGLE + glBlendBarrierKHRContextANGLE + glBlendColorContextANGLE + glBlendEquationContextANGLE + glBlendEquationSeparateContextANGLE + glBlendEquationSeparateiContextANGLE + glBlendEquationSeparateiEXTContextANGLE + glBlendEquationSeparateiOESContextANGLE + glBlendEquationiContextANGLE + glBlendEquationiEXTContextANGLE + glBlendEquationiOESContextANGLE + glBlendFuncContextANGLE + glBlendFuncSeparateContextANGLE + glBlendFuncSeparateiContextANGLE + glBlendFuncSeparateiEXTContextANGLE + glBlendFuncSeparateiOESContextANGLE + glBlendFunciContextANGLE + glBlendFunciEXTContextANGLE + glBlendFunciOESContextANGLE + glBlitFramebufferContextANGLE + glBlitFramebufferANGLEContextANGLE + glBlitFramebufferNVContextANGLE + glBufferDataContextANGLE + glBufferStorageEXTContextANGLE + glBufferStorageExternalEXTContextANGLE + glBufferStorageMemEXTContextANGLE + glBufferSubDataContextANGLE + glCheckFramebufferStatusContextANGLE + glCheckFramebufferStatusOESContextANGLE + glClearContextANGLE + glClearBufferfiContextANGLE + glClearBufferfvContextANGLE + glClearBufferivContextANGLE + glClearBufferuivContextANGLE + glClearColorContextANGLE + glClearColorxContextANGLE + glClearDepthfContextANGLE + glClearDepthxContextANGLE + glClearStencilContextANGLE + glClientActiveTextureContextANGLE + glClientWaitSyncContextANGLE + glClipControlEXTContextANGLE + glClipPlanefContextANGLE + glClipPlanexContextANGLE + glColor4fContextANGLE + glColor4ubContextANGLE + glColor4xContextANGLE + glColorMaskContextANGLE + glColorMaskiContextANGLE + glColorMaskiEXTContextANGLE + glColorMaskiOESContextANGLE + glColorPointerContextANGLE + glCompileShaderContextANGLE + glCompressedCopyTextureCHROMIUMContextANGLE + glCompressedTexImage2DContextANGLE + glCompressedTexImage2DRobustANGLEContextANGLE + glCompressedTexImage3DContextANGLE + glCompressedTexImage3DOESContextANGLE + glCompressedTexImage3DRobustANGLEContextANGLE + glCompressedTexSubImage2DContextANGLE + glCompressedTexSubImage2DRobustANGLEContextANGLE + glCompressedTexSubImage3DContextANGLE + glCompressedTexSubImage3DOESContextANGLE + glCompressedTexSubImage3DRobustANGLEContextANGLE + glCopyBufferSubDataContextANGLE + glCopyImageSubDataContextANGLE + glCopyImageSubDataEXTContextANGLE + glCopyImageSubDataOESContextANGLE + glCopySubTexture3DANGLEContextANGLE + glCopySubTextureCHROMIUMContextANGLE + glCopyTexImage2DContextANGLE + glCopyTexSubImage2DContextANGLE + glCopyTexSubImage3DContextANGLE + glCopyTexSubImage3DOESContextANGLE + glCopyTexture3DANGLEContextANGLE + glCopyTextureCHROMIUMContextANGLE + glCoverageModulationCHROMIUMContextANGLE + glCreateMemoryObjectsEXTContextANGLE + glCreateProgramContextANGLE + glCreateShaderContextANGLE + glCreateShaderProgramvContextANGLE + glCreateShaderProgramvEXTContextANGLE + glCullFaceContextANGLE + glCurrentPaletteMatrixOESContextANGLE + glDebugMessageCallbackContextANGLE + glDebugMessageCallbackKHRContextANGLE + glDebugMessageControlContextANGLE + glDebugMessageControlKHRContextANGLE + glDebugMessageInsertContextANGLE + glDebugMessageInsertKHRContextANGLE + glDeleteBuffersContextANGLE + glDeleteFencesNVContextANGLE + glDeleteFramebuffersContextANGLE + glDeleteFramebuffersOESContextANGLE + glDeleteMemoryObjectsEXTContextANGLE + glDeleteProgramContextANGLE + glDeleteProgramPipelinesContextANGLE + glDeleteProgramPipelinesEXTContextANGLE + glDeleteQueriesContextANGLE + glDeleteQueriesEXTContextANGLE + glDeleteRenderbuffersContextANGLE + glDeleteRenderbuffersOESContextANGLE + glDeleteSamplersContextANGLE + glDeleteSemaphoresEXTContextANGLE + glDeleteShaderContextANGLE + glDeleteSyncContextANGLE + glDeleteTexturesContextANGLE + glDeleteTransformFeedbacksContextANGLE + glDeleteVertexArraysContextANGLE + glDeleteVertexArraysOESContextANGLE + glDepthFuncContextANGLE + glDepthMaskContextANGLE + glDepthRangefContextANGLE + glDepthRangexContextANGLE + glDetachShaderContextANGLE + glDisableContextANGLE + glDisableClientStateContextANGLE + glDisableExtensionANGLEContextANGLE + glDisableVertexAttribArrayContextANGLE + glDisableiContextANGLE + glDisableiEXTContextANGLE + glDisableiOESContextANGLE + glDiscardFramebufferEXTContextANGLE + glDispatchComputeContextANGLE + glDispatchComputeIndirectContextANGLE + glDrawArraysContextANGLE + glDrawArraysIndirectContextANGLE + glDrawArraysInstancedContextANGLE + glDrawArraysInstancedANGLEContextANGLE + glDrawArraysInstancedBaseInstanceANGLEContextANGLE + glDrawArraysInstancedEXTContextANGLE + glDrawBuffersContextANGLE + glDrawBuffersEXTContextANGLE + glDrawElementsContextANGLE + glDrawElementsBaseVertexContextANGLE + glDrawElementsBaseVertexEXTContextANGLE + glDrawElementsBaseVertexOESContextANGLE + glDrawElementsIndirectContextANGLE + glDrawElementsInstancedContextANGLE + glDrawElementsInstancedANGLEContextANGLE + glDrawElementsInstancedBaseVertexContextANGLE + glDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE + glDrawElementsInstancedBaseVertexEXTContextANGLE + glDrawElementsInstancedBaseVertexOESContextANGLE + glDrawElementsInstancedEXTContextANGLE + glDrawRangeElementsContextANGLE + glDrawRangeElementsBaseVertexContextANGLE + glDrawRangeElementsBaseVertexEXTContextANGLE + glDrawRangeElementsBaseVertexOESContextANGLE + glDrawTexfOESContextANGLE + glDrawTexfvOESContextANGLE + glDrawTexiOESContextANGLE + glDrawTexivOESContextANGLE + glDrawTexsOESContextANGLE + glDrawTexsvOESContextANGLE + glDrawTexxOESContextANGLE + glDrawTexxvOESContextANGLE + glEGLImageTargetRenderbufferStorageOESContextANGLE + glEGLImageTargetTexture2DOESContextANGLE + glEnableContextANGLE + glEnableClientStateContextANGLE + glEnableVertexAttribArrayContextANGLE + glEnableiContextANGLE + glEnableiEXTContextANGLE + glEnableiOESContextANGLE + glEndQueryContextANGLE + glEndQueryEXTContextANGLE + glEndTransformFeedbackContextANGLE + glFenceSyncContextANGLE + glFinishContextANGLE + glFinishFenceNVContextANGLE + glFlushContextANGLE + glFlushMappedBufferRangeContextANGLE + glFlushMappedBufferRangeEXTContextANGLE + glFogfContextANGLE + glFogfvContextANGLE + glFogxContextANGLE + glFogxvContextANGLE + glFramebufferFetchBarrierEXTContextANGLE + glFramebufferParameteriContextANGLE + glFramebufferRenderbufferContextANGLE + glFramebufferRenderbufferOESContextANGLE + glFramebufferTextureContextANGLE + glFramebufferTexture2DContextANGLE + glFramebufferTexture2DMultisampleEXTContextANGLE + glFramebufferTexture2DOESContextANGLE + glFramebufferTexture3DOESContextANGLE + glFramebufferTextureEXTContextANGLE + glFramebufferTextureLayerContextANGLE + glFramebufferTextureMultiviewOVRContextANGLE + glFrontFaceContextANGLE + glFrustumfContextANGLE + glFrustumxContextANGLE + glGenBuffersContextANGLE + glGenFencesNVContextANGLE + glGenFramebuffersContextANGLE + glGenFramebuffersOESContextANGLE + glGenProgramPipelinesContextANGLE + glGenProgramPipelinesEXTContextANGLE + glGenQueriesContextANGLE + glGenQueriesEXTContextANGLE + glGenRenderbuffersContextANGLE + glGenRenderbuffersOESContextANGLE + glGenSamplersContextANGLE + glGenSemaphoresEXTContextANGLE + glGenTexturesContextANGLE + glGenTransformFeedbacksContextANGLE + glGenVertexArraysContextANGLE + glGenVertexArraysOESContextANGLE + glGenerateMipmapContextANGLE + glGenerateMipmapOESContextANGLE + glGetActiveAttribContextANGLE + glGetActiveUniformContextANGLE + glGetActiveUniformBlockNameContextANGLE + glGetActiveUniformBlockivContextANGLE + glGetActiveUniformBlockivRobustANGLEContextANGLE + glGetActiveUniformsivContextANGLE + glGetAttachedShadersContextANGLE + glGetAttribLocationContextANGLE + glGetBooleani_vContextANGLE + glGetBooleani_vRobustANGLEContextANGLE + glGetBooleanvContextANGLE + glGetBooleanvRobustANGLEContextANGLE + glGetBufferParameteri64vContextANGLE + glGetBufferParameteri64vRobustANGLEContextANGLE + glGetBufferParameterivContextANGLE + glGetBufferParameterivRobustANGLEContextANGLE + glGetBufferPointervContextANGLE + glGetBufferPointervOESContextANGLE + glGetBufferPointervRobustANGLEContextANGLE + glGetClipPlanefContextANGLE + glGetClipPlanexContextANGLE + glGetDebugMessageLogContextANGLE + glGetDebugMessageLogKHRContextANGLE + glGetErrorContextANGLE + glGetFenceivNVContextANGLE + glGetFixedvContextANGLE + glGetFloatvContextANGLE + glGetFloatvRobustANGLEContextANGLE + glGetFragDataIndexEXTContextANGLE + glGetFragDataLocationContextANGLE + glGetFramebufferAttachmentParameterivContextANGLE + glGetFramebufferAttachmentParameterivOESContextANGLE + glGetFramebufferAttachmentParameterivRobustANGLEContextANGLE + glGetFramebufferParameterivContextANGLE + glGetFramebufferParameterivRobustANGLEContextANGLE + glGetGraphicsResetStatusContextANGLE + glGetGraphicsResetStatusEXTContextANGLE + glGetInteger64i_vContextANGLE + glGetInteger64i_vRobustANGLEContextANGLE + glGetInteger64vContextANGLE + glGetInteger64vEXTContextANGLE + glGetInteger64vRobustANGLEContextANGLE + glGetIntegeri_vContextANGLE + glGetIntegeri_vRobustANGLEContextANGLE + glGetIntegervContextANGLE + glGetIntegervRobustANGLEContextANGLE + glGetInternalformativContextANGLE + glGetInternalformativRobustANGLEContextANGLE + glGetLightfvContextANGLE + glGetLightxvContextANGLE + glGetMaterialfvContextANGLE + glGetMaterialxvContextANGLE + glGetMemoryObjectParameterivEXTContextANGLE + glGetMultisamplefvContextANGLE + glGetMultisamplefvANGLEContextANGLE + glGetMultisamplefvRobustANGLEContextANGLE + glGetObjectLabelContextANGLE + glGetObjectLabelEXTContextANGLE + glGetObjectLabelKHRContextANGLE + glGetObjectPtrLabelContextANGLE + glGetObjectPtrLabelKHRContextANGLE + glGetPointervContextANGLE + glGetPointervKHRContextANGLE + glGetPointervRobustANGLERobustANGLEContextANGLE + glGetProgramBinaryContextANGLE + glGetProgramBinaryOESContextANGLE + glGetProgramInfoLogContextANGLE + glGetProgramInterfaceivContextANGLE + glGetProgramInterfaceivRobustANGLEContextANGLE + glGetProgramPipelineInfoLogContextANGLE + glGetProgramPipelineInfoLogEXTContextANGLE + glGetProgramPipelineivContextANGLE + glGetProgramPipelineivEXTContextANGLE + glGetProgramResourceIndexContextANGLE + glGetProgramResourceLocationContextANGLE + glGetProgramResourceLocationIndexEXTContextANGLE + glGetProgramResourceNameContextANGLE + glGetProgramResourceivContextANGLE + glGetProgramivContextANGLE + glGetProgramivRobustANGLEContextANGLE + glGetQueryObjecti64vEXTContextANGLE + glGetQueryObjecti64vRobustANGLEContextANGLE + glGetQueryObjectivEXTContextANGLE + glGetQueryObjectivRobustANGLEContextANGLE + glGetQueryObjectui64vEXTContextANGLE + glGetQueryObjectui64vRobustANGLEContextANGLE + glGetQueryObjectuivContextANGLE + glGetQueryObjectuivEXTContextANGLE + glGetQueryObjectuivRobustANGLEContextANGLE + glGetQueryivContextANGLE + glGetQueryivEXTContextANGLE + glGetQueryivRobustANGLEContextANGLE + glGetRenderbufferImageANGLEContextANGLE + glGetRenderbufferParameterivContextANGLE + glGetRenderbufferParameterivOESContextANGLE + glGetRenderbufferParameterivRobustANGLEContextANGLE + glGetSamplerParameterIivContextANGLE + glGetSamplerParameterIivEXTContextANGLE + glGetSamplerParameterIivOESContextANGLE + glGetSamplerParameterIivRobustANGLEContextANGLE + glGetSamplerParameterIuivContextANGLE + glGetSamplerParameterIuivEXTContextANGLE + glGetSamplerParameterIuivOESContextANGLE + glGetSamplerParameterIuivRobustANGLEContextANGLE + glGetSamplerParameterfvContextANGLE + glGetSamplerParameterfvRobustANGLEContextANGLE + glGetSamplerParameterivContextANGLE + glGetSamplerParameterivRobustANGLEContextANGLE + glGetSemaphoreParameterui64vEXTContextANGLE + glGetShaderInfoLogContextANGLE + glGetShaderPrecisionFormatContextANGLE + glGetShaderSourceContextANGLE + glGetShaderivContextANGLE + glGetShaderivRobustANGLEContextANGLE + glGetStringContextANGLE + glGetStringiContextANGLE + glGetSyncivContextANGLE + glGetTexEnvfvContextANGLE + glGetTexEnvivContextANGLE + glGetTexEnvxvContextANGLE + glGetTexGenfvOESContextANGLE + glGetTexGenivOESContextANGLE + glGetTexGenxvOESContextANGLE + glGetTexImageANGLEContextANGLE + glGetTexLevelParameterfvContextANGLE + glGetTexLevelParameterfvANGLEContextANGLE + glGetTexLevelParameterfvRobustANGLEContextANGLE + glGetTexLevelParameterivContextANGLE + glGetTexLevelParameterivANGLEContextANGLE + glGetTexLevelParameterivRobustANGLEContextANGLE + glGetTexParameterIivContextANGLE + glGetTexParameterIivEXTContextANGLE + glGetTexParameterIivOESContextANGLE + glGetTexParameterIivRobustANGLEContextANGLE + glGetTexParameterIuivContextANGLE + glGetTexParameterIuivEXTContextANGLE + glGetTexParameterIuivOESContextANGLE + glGetTexParameterIuivRobustANGLEContextANGLE + glGetTexParameterfvContextANGLE + glGetTexParameterfvRobustANGLEContextANGLE + glGetTexParameterivContextANGLE + glGetTexParameterivRobustANGLEContextANGLE + glGetTexParameterxvContextANGLE + glGetTransformFeedbackVaryingContextANGLE + glGetTranslatedShaderSourceANGLEContextANGLE + glGetUniformBlockIndexContextANGLE + glGetUniformIndicesContextANGLE + glGetUniformLocationContextANGLE + glGetUniformfvContextANGLE + glGetUniformfvRobustANGLEContextANGLE + glGetUniformivContextANGLE + glGetUniformivRobustANGLEContextANGLE + glGetUniformuivContextANGLE + glGetUniformuivRobustANGLEContextANGLE + glGetUnsignedBytei_vEXTContextANGLE + glGetUnsignedBytevEXTContextANGLE + glGetVertexAttribIivContextANGLE + glGetVertexAttribIivRobustANGLEContextANGLE + glGetVertexAttribIuivContextANGLE + glGetVertexAttribIuivRobustANGLEContextANGLE + glGetVertexAttribPointervContextANGLE + glGetVertexAttribPointervRobustANGLEContextANGLE + glGetVertexAttribfvContextANGLE + glGetVertexAttribfvRobustANGLEContextANGLE + glGetVertexAttribivContextANGLE + glGetVertexAttribivRobustANGLEContextANGLE + glGetnUniformfvContextANGLE + glGetnUniformfvEXTContextANGLE + glGetnUniformfvRobustANGLEContextANGLE + glGetnUniformivContextANGLE + glGetnUniformivEXTContextANGLE + glGetnUniformivRobustANGLEContextANGLE + glGetnUniformuivContextANGLE + glGetnUniformuivRobustANGLEContextANGLE + glHintContextANGLE + glImportMemoryFdEXTContextANGLE + glImportMemoryZirconHandleANGLEContextANGLE + glImportSemaphoreFdEXTContextANGLE + glImportSemaphoreZirconHandleANGLEContextANGLE + glInsertEventMarkerEXTContextANGLE + glInvalidateFramebufferContextANGLE + glInvalidateSubFramebufferContextANGLE + glInvalidateTextureANGLEContextANGLE + glIsBufferContextANGLE + glIsEnabledContextANGLE + glIsEnablediContextANGLE + glIsEnablediEXTContextANGLE + glIsEnablediOESContextANGLE + glIsFenceNVContextANGLE + glIsFramebufferContextANGLE + glIsFramebufferOESContextANGLE + glIsMemoryObjectEXTContextANGLE + glIsProgramContextANGLE + glIsProgramPipelineContextANGLE + glIsProgramPipelineEXTContextANGLE + glIsQueryContextANGLE + glIsQueryEXTContextANGLE + glIsRenderbufferContextANGLE + glIsRenderbufferOESContextANGLE + glIsSamplerContextANGLE + glIsSemaphoreEXTContextANGLE + glIsShaderContextANGLE + glIsSyncContextANGLE + glIsTextureContextANGLE + glIsTransformFeedbackContextANGLE + glIsVertexArrayContextANGLE + glIsVertexArrayOESContextANGLE + glLabelObjectEXTContextANGLE + glLightModelfContextANGLE + glLightModelfvContextANGLE + glLightModelxContextANGLE + glLightModelxvContextANGLE + glLightfContextANGLE + glLightfvContextANGLE + glLightxContextANGLE + glLightxvContextANGLE + glLineWidthContextANGLE + glLineWidthxContextANGLE + glLinkProgramContextANGLE + glLoadIdentityContextANGLE + glLoadMatrixfContextANGLE + glLoadMatrixxContextANGLE + glLoadPaletteFromModelViewMatrixOESContextANGLE + glLogicOpContextANGLE + glLoseContextCHROMIUMContextANGLE + glMapBufferOESContextANGLE + glMapBufferRangeContextANGLE + glMapBufferRangeEXTContextANGLE + glMaterialfContextANGLE + glMaterialfvContextANGLE + glMaterialxContextANGLE + glMaterialxvContextANGLE + glMatrixIndexPointerOESContextANGLE + glMatrixModeContextANGLE + glMaxShaderCompilerThreadsKHRContextANGLE + glMemoryBarrierContextANGLE + glMemoryBarrierByRegionContextANGLE + glMemoryObjectParameterivEXTContextANGLE + glMinSampleShadingContextANGLE + glMinSampleShadingOESContextANGLE + glMultMatrixfContextANGLE + glMultMatrixxContextANGLE + glMultiDrawArraysANGLEContextANGLE + glMultiDrawArraysInstancedANGLEContextANGLE + glMultiDrawArraysInstancedBaseInstanceANGLEContextANGLE + glMultiDrawElementsANGLEContextANGLE + glMultiDrawElementsBaseVertexEXTContextANGLE + glMultiDrawElementsInstancedANGLEContextANGLE + glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE + glMultiTexCoord4fContextANGLE + glMultiTexCoord4xContextANGLE + glNamedBufferStorageExternalEXTContextANGLE + glNormal3fContextANGLE + glNormal3xContextANGLE + glNormalPointerContextANGLE + glObjectLabelContextANGLE + glObjectLabelKHRContextANGLE + glObjectPtrLabelContextANGLE + glObjectPtrLabelKHRContextANGLE + glOrthofContextANGLE + glOrthoxContextANGLE + glPatchParameteriContextANGLE + glPatchParameteriEXTContextANGLE + glPauseTransformFeedbackContextANGLE + glPixelStoreiContextANGLE + glPointParameterfContextANGLE + glPointParameterfvContextANGLE + glPointParameterxContextANGLE + glPointParameterxvContextANGLE + glPointSizeContextANGLE + glPointSizePointerOESContextANGLE + glPointSizexContextANGLE + glPolygonOffsetContextANGLE + glPolygonOffsetxContextANGLE + glPopDebugGroupContextANGLE + glPopDebugGroupKHRContextANGLE + glPopGroupMarkerEXTContextANGLE + glPopMatrixContextANGLE + glPrimitiveBoundingBoxContextANGLE + glPrimitiveBoundingBoxEXTContextANGLE + glProgramBinaryContextANGLE + glProgramBinaryOESContextANGLE + glProgramParameteriContextANGLE + glProgramParameteriEXTContextANGLE + glProgramUniform1fContextANGLE + glProgramUniform1fEXTContextANGLE + glProgramUniform1fvContextANGLE + glProgramUniform1fvEXTContextANGLE + glProgramUniform1iContextANGLE + glProgramUniform1iEXTContextANGLE + glProgramUniform1ivContextANGLE + glProgramUniform1ivEXTContextANGLE + glProgramUniform1uiContextANGLE + glProgramUniform1uiEXTContextANGLE + glProgramUniform1uivContextANGLE + glProgramUniform1uivEXTContextANGLE + glProgramUniform2fContextANGLE + glProgramUniform2fEXTContextANGLE + glProgramUniform2fvContextANGLE + glProgramUniform2fvEXTContextANGLE + glProgramUniform2iContextANGLE + glProgramUniform2iEXTContextANGLE + glProgramUniform2ivContextANGLE + glProgramUniform2ivEXTContextANGLE + glProgramUniform2uiContextANGLE + glProgramUniform2uiEXTContextANGLE + glProgramUniform2uivContextANGLE + glProgramUniform2uivEXTContextANGLE + glProgramUniform3fContextANGLE + glProgramUniform3fEXTContextANGLE + glProgramUniform3fvContextANGLE + glProgramUniform3fvEXTContextANGLE + glProgramUniform3iContextANGLE + glProgramUniform3iEXTContextANGLE + glProgramUniform3ivContextANGLE + glProgramUniform3ivEXTContextANGLE + glProgramUniform3uiContextANGLE + glProgramUniform3uiEXTContextANGLE + glProgramUniform3uivContextANGLE + glProgramUniform3uivEXTContextANGLE + glProgramUniform4fContextANGLE + glProgramUniform4fEXTContextANGLE + glProgramUniform4fvContextANGLE + glProgramUniform4fvEXTContextANGLE + glProgramUniform4iContextANGLE + glProgramUniform4iEXTContextANGLE + glProgramUniform4ivContextANGLE + glProgramUniform4ivEXTContextANGLE + glProgramUniform4uiContextANGLE + glProgramUniform4uiEXTContextANGLE + glProgramUniform4uivContextANGLE + glProgramUniform4uivEXTContextANGLE + glProgramUniformMatrix2fvContextANGLE + glProgramUniformMatrix2fvEXTContextANGLE + glProgramUniformMatrix2x3fvContextANGLE + glProgramUniformMatrix2x3fvEXTContextANGLE + glProgramUniformMatrix2x4fvContextANGLE + glProgramUniformMatrix2x4fvEXTContextANGLE + glProgramUniformMatrix3fvContextANGLE + glProgramUniformMatrix3fvEXTContextANGLE + glProgramUniformMatrix3x2fvContextANGLE + glProgramUniformMatrix3x2fvEXTContextANGLE + glProgramUniformMatrix3x4fvContextANGLE + glProgramUniformMatrix3x4fvEXTContextANGLE + glProgramUniformMatrix4fvContextANGLE + glProgramUniformMatrix4fvEXTContextANGLE + glProgramUniformMatrix4x2fvContextANGLE + glProgramUniformMatrix4x2fvEXTContextANGLE + glProgramUniformMatrix4x3fvContextANGLE + glProgramUniformMatrix4x3fvEXTContextANGLE + glProvokingVertexANGLEContextANGLE + glPushDebugGroupContextANGLE + glPushDebugGroupKHRContextANGLE + glPushGroupMarkerEXTContextANGLE + glPushMatrixContextANGLE + glQueryCounterEXTContextANGLE + glQueryMatrixxOESContextANGLE + glReadBufferContextANGLE + glReadPixelsContextANGLE + glReadPixelsRobustANGLEContextANGLE + glReadnPixelsContextANGLE + glReadnPixelsEXTContextANGLE + glReadnPixelsRobustANGLEContextANGLE + glReleaseShaderCompilerContextANGLE + glRenderbufferStorageContextANGLE + glRenderbufferStorageMultisampleContextANGLE + glRenderbufferStorageMultisampleANGLEContextANGLE + glRenderbufferStorageMultisampleEXTContextANGLE + glRenderbufferStorageOESContextANGLE + glRequestExtensionANGLEContextANGLE + glResumeTransformFeedbackContextANGLE + glRotatefContextANGLE + glRotatexContextANGLE + glSampleCoverageContextANGLE + glSampleCoveragexContextANGLE + glSampleMaskiContextANGLE + glSampleMaskiANGLEContextANGLE + glSamplerParameterIivContextANGLE + glSamplerParameterIivEXTContextANGLE + glSamplerParameterIivOESContextANGLE + glSamplerParameterIivRobustANGLEContextANGLE + glSamplerParameterIuivContextANGLE + glSamplerParameterIuivEXTContextANGLE + glSamplerParameterIuivOESContextANGLE + glSamplerParameterIuivRobustANGLEContextANGLE + glSamplerParameterfContextANGLE + glSamplerParameterfvContextANGLE + glSamplerParameterfvRobustANGLEContextANGLE + glSamplerParameteriContextANGLE + glSamplerParameterivContextANGLE + glSamplerParameterivRobustANGLEContextANGLE + glScalefContextANGLE + glScalexContextANGLE + glScissorContextANGLE + glSemaphoreParameterui64vEXTContextANGLE + glSetFenceNVContextANGLE + glShadeModelContextANGLE + glShaderBinaryContextANGLE + glShaderSourceContextANGLE + glSignalSemaphoreEXTContextANGLE + glStencilFuncContextANGLE + glStencilFuncSeparateContextANGLE + glStencilMaskContextANGLE + glStencilMaskSeparateContextANGLE + glStencilOpContextANGLE + glStencilOpSeparateContextANGLE + glTestFenceNVContextANGLE + glTexBufferContextANGLE + glTexBufferEXTContextANGLE + glTexBufferOESContextANGLE + glTexBufferRangeContextANGLE + glTexBufferRangeEXTContextANGLE + glTexBufferRangeOESContextANGLE + glTexCoordPointerContextANGLE + glTexEnvfContextANGLE + glTexEnvfvContextANGLE + glTexEnviContextANGLE + glTexEnvivContextANGLE + glTexEnvxContextANGLE + glTexEnvxvContextANGLE + glTexGenfOESContextANGLE + glTexGenfvOESContextANGLE + glTexGeniOESContextANGLE + glTexGenivOESContextANGLE + glTexGenxOESContextANGLE + glTexGenxvOESContextANGLE + glTexImage2DContextANGLE + glTexImage2DExternalANGLEContextANGLE + glTexImage2DRobustANGLEContextANGLE + glTexImage3DContextANGLE + glTexImage3DOESContextANGLE + glTexImage3DRobustANGLEContextANGLE + glTexParameterIivContextANGLE + glTexParameterIivEXTContextANGLE + glTexParameterIivOESContextANGLE + glTexParameterIivRobustANGLEContextANGLE + glTexParameterIuivContextANGLE + glTexParameterIuivEXTContextANGLE + glTexParameterIuivOESContextANGLE + glTexParameterIuivRobustANGLEContextANGLE + glTexParameterfContextANGLE + glTexParameterfvContextANGLE + glTexParameterfvRobustANGLEContextANGLE + glTexParameteriContextANGLE + glTexParameterivContextANGLE + glTexParameterivRobustANGLEContextANGLE + glTexParameterxContextANGLE + glTexParameterxvContextANGLE + glTexStorage1DEXTContextANGLE + glTexStorage2DContextANGLE + glTexStorage2DEXTContextANGLE + glTexStorage2DMultisampleContextANGLE + glTexStorage2DMultisampleANGLEContextANGLE + glTexStorage3DContextANGLE + glTexStorage3DEXTContextANGLE + glTexStorage3DMultisampleContextANGLE + glTexStorage3DMultisampleOESContextANGLE + glTexStorageMem2DEXTContextANGLE + glTexStorageMem2DMultisampleEXTContextANGLE + glTexStorageMem3DEXTContextANGLE + glTexStorageMem3DMultisampleEXTContextANGLE + glTexStorageMemFlags2DANGLEContextANGLE + glTexStorageMemFlags2DMultisampleANGLEContextANGLE + glTexStorageMemFlags3DANGLEContextANGLE + glTexStorageMemFlags3DMultisampleANGLEContextANGLE + glTexSubImage2DContextANGLE + glTexSubImage2DRobustANGLEContextANGLE + glTexSubImage3DContextANGLE + glTexSubImage3DOESContextANGLE + glTexSubImage3DRobustANGLEContextANGLE + glTransformFeedbackVaryingsContextANGLE + glTranslatefContextANGLE + glTranslatexContextANGLE + glUniform1fContextANGLE + glUniform1fvContextANGLE + glUniform1iContextANGLE + glUniform1ivContextANGLE + glUniform1uiContextANGLE + glUniform1uivContextANGLE + glUniform2fContextANGLE + glUniform2fvContextANGLE + glUniform2iContextANGLE + glUniform2ivContextANGLE + glUniform2uiContextANGLE + glUniform2uivContextANGLE + glUniform3fContextANGLE + glUniform3fvContextANGLE + glUniform3iContextANGLE + glUniform3ivContextANGLE + glUniform3uiContextANGLE + glUniform3uivContextANGLE + glUniform4fContextANGLE + glUniform4fvContextANGLE + glUniform4iContextANGLE + glUniform4ivContextANGLE + glUniform4uiContextANGLE + glUniform4uivContextANGLE + glUniformBlockBindingContextANGLE + glUniformMatrix2fvContextANGLE + glUniformMatrix2x3fvContextANGLE + glUniformMatrix2x4fvContextANGLE + glUniformMatrix3fvContextANGLE + glUniformMatrix3x2fvContextANGLE + glUniformMatrix3x4fvContextANGLE + glUniformMatrix4fvContextANGLE + glUniformMatrix4x2fvContextANGLE + glUniformMatrix4x3fvContextANGLE + glUnmapBufferContextANGLE + glUnmapBufferOESContextANGLE + glUseProgramContextANGLE + glUseProgramStagesContextANGLE + glUseProgramStagesEXTContextANGLE + glValidateProgramContextANGLE + glValidateProgramPipelineContextANGLE + glValidateProgramPipelineEXTContextANGLE + glVertexAttrib1fContextANGLE + glVertexAttrib1fvContextANGLE + glVertexAttrib2fContextANGLE + glVertexAttrib2fvContextANGLE + glVertexAttrib3fContextANGLE + glVertexAttrib3fvContextANGLE + glVertexAttrib4fContextANGLE + glVertexAttrib4fvContextANGLE + glVertexAttribBindingContextANGLE + glVertexAttribDivisorContextANGLE + glVertexAttribDivisorANGLEContextANGLE + glVertexAttribDivisorEXTContextANGLE + glVertexAttribFormatContextANGLE + glVertexAttribI4iContextANGLE + glVertexAttribI4ivContextANGLE + glVertexAttribI4uiContextANGLE + glVertexAttribI4uivContextANGLE + glVertexAttribIFormatContextANGLE + glVertexAttribIPointerContextANGLE + glVertexAttribPointerContextANGLE + glVertexBindingDivisorContextANGLE + glVertexPointerContextANGLE + glViewportContextANGLE + glWaitSemaphoreEXTContextANGLE + glWaitSyncContextANGLE + glWeightPointerOESContextANGLE + + ; EGL 1.0 + EGL_ChooseConfig + EGL_CopyBuffers + EGL_CreateContext + EGL_CreatePbufferSurface + EGL_CreatePixmapSurface + EGL_CreateWindowSurface + EGL_DestroyContext + EGL_DestroySurface + EGL_GetConfigAttrib + EGL_GetConfigs + EGL_GetCurrentDisplay + EGL_GetCurrentSurface + EGL_GetDisplay + EGL_GetError + EGL_GetProcAddress + EGL_Initialize + EGL_MakeCurrent + EGL_QueryContext + EGL_QueryString + EGL_QuerySurface + EGL_SwapBuffers + EGL_Terminate + EGL_WaitGL + EGL_WaitNative + + ; EGL 1.1 + EGL_BindTexImage + EGL_ReleaseTexImage + EGL_SurfaceAttrib + EGL_SwapInterval + + ; EGL 1.2 + EGL_BindAPI + EGL_CreatePbufferFromClientBuffer + EGL_QueryAPI + EGL_ReleaseThread + EGL_WaitClient + + ; EGL 1.4 + EGL_GetCurrentContext + + ; EGL 1.5 + EGL_ClientWaitSync + EGL_CreateImage + EGL_CreatePlatformPixmapSurface + EGL_CreatePlatformWindowSurface + EGL_CreateSync + EGL_DestroyImage + EGL_DestroySync + EGL_GetPlatformDisplay + EGL_GetSyncAttrib + EGL_WaitSync + + ; EGL_ANDROID_blob_cache + EGL_SetBlobCacheFuncsANDROID + + ; EGL_ANDROID_create_native_client_buffer + EGL_CreateNativeClientBufferANDROID + + ; EGL_ANDROID_get_frame_timestamps + EGL_GetCompositorTimingANDROID + EGL_GetCompositorTimingSupportedANDROID + EGL_GetFrameTimestampSupportedANDROID + EGL_GetFrameTimestampsANDROID + EGL_GetNextFrameIdANDROID + + ; EGL_ANDROID_get_native_client_buffer + EGL_GetNativeClientBufferANDROID + + ; EGL_ANDROID_native_fence_sync + EGL_DupNativeFenceFDANDROID + + ; EGL_ANDROID_presentation_time + EGL_PresentationTimeANDROID + + ; EGL_ANGLE_device_creation + EGL_CreateDeviceANGLE + EGL_ReleaseDeviceANGLE + + ; EGL_ANGLE_feature_control + EGL_QueryDisplayAttribANGLE + EGL_QueryStringiANGLE + + ; EGL_ANGLE_power_preference + EGL_HandleGPUSwitchANGLE + EGL_ReacquireHighPowerGPUANGLE + EGL_ReleaseHighPowerGPUANGLE + + ; EGL_ANGLE_program_cache_control + EGL_ProgramCacheGetAttribANGLE + EGL_ProgramCachePopulateANGLE + EGL_ProgramCacheQueryANGLE + EGL_ProgramCacheResizeANGLE + + ; EGL_ANGLE_query_surface_pointer + EGL_QuerySurfacePointerANGLE + + ; EGL_ANGLE_stream_producer_d3d_texture + EGL_CreateStreamProducerD3DTextureANGLE + EGL_StreamPostD3DTextureANGLE + + ; EGL_ANGLE_swap_with_frame_token + EGL_SwapBuffersWithFrameTokenANGLE + + ; EGL_ANGLE_sync_control_rate + EGL_GetMscRateANGLE + + ; EGL_CHROMIUM_sync_control + EGL_GetSyncValuesCHROMIUM + + ; EGL_EXT_device_query + EGL_QueryDeviceAttribEXT + EGL_QueryDeviceStringEXT + EGL_QueryDisplayAttribEXT + + ; EGL_EXT_platform_base + EGL_CreatePlatformPixmapSurfaceEXT + EGL_CreatePlatformWindowSurfaceEXT + EGL_GetPlatformDisplayEXT + + ; EGL_KHR_debug + EGL_DebugMessageControlKHR + EGL_LabelObjectKHR + EGL_QueryDebugKHR + + ; EGL_KHR_fence_sync + EGL_ClientWaitSyncKHR + EGL_CreateSyncKHR + EGL_DestroySyncKHR + EGL_GetSyncAttribKHR + + ; EGL_KHR_image + EGL_CreateImageKHR + EGL_DestroyImageKHR + + ; EGL_KHR_reusable_sync + EGL_SignalSyncKHR + + ; EGL_KHR_stream + EGL_CreateStreamKHR + EGL_DestroyStreamKHR + EGL_QueryStreamKHR + EGL_QueryStreamu64KHR + EGL_StreamAttribKHR + + ; EGL_KHR_stream_consumer_gltexture + EGL_StreamConsumerAcquireKHR + EGL_StreamConsumerGLTextureExternalKHR + EGL_StreamConsumerReleaseKHR + + ; EGL_KHR_swap_buffers_with_damage + EGL_SwapBuffersWithDamageKHR + + ; EGL_KHR_wait_sync + EGL_WaitSyncKHR + + ; EGL_NV_post_sub_buffer + EGL_PostSubBufferNV + + ; EGL_NV_stream_consumer_gltexture_yuv + EGL_StreamConsumerGLTextureExternalAttribsNV diff --git a/gfx/angle/checkout/src/libGLESv2/proc_table_egl.h b/gfx/angle/checkout/src/libGLESv2/proc_table_egl.h new file mode 100644 index 0000000000..d4960b7728 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/proc_table_egl.h @@ -0,0 +1,25 @@ +// +// Copyright 2017 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. +// +// getProcAddress loader table: +// Mapping from a string entry point name to function address. +// + +#ifndef LIBGLESV2_PROC_TABLE_H_ +#define LIBGLESV2_PROC_TABLE_H_ + +#include <EGL/egl.h> +#include <stddef.h> +#include <utility> + +namespace egl +{ +using ProcEntry = std::pair<const char *, __eglMustCastToProperFunctionPointerType>; + +extern const ProcEntry g_procTable[]; +extern const size_t g_numProcs; +} // namespace egl + +#endif // LIBGLESV2_PROC_TABLE_H_ diff --git a/gfx/angle/checkout/src/libGLESv2/proc_table_egl_autogen.cpp b/gfx/angle/checkout/src/libGLESv2/proc_table_egl_autogen.cpp new file mode 100644 index 0000000000..9dd6161591 --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/proc_table_egl_autogen.cpp @@ -0,0 +1,1765 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by gen_proc_table.py using data from gl.xml, gl_angle_ext.xml, egl.xml, +// egl_angle_ext.xml. +// +// Copyright 2019 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. +// +// getProcAddress loader table: +// Mapping from a string entry point name to function address. +// + +#include "libGLESv2/proc_table_egl.h" + +#include "libGLESv2/entry_points_egl_autogen.h" +#include "libGLESv2/entry_points_egl_ext_autogen.h" +#include "libGLESv2/entry_points_gles_1_0_autogen.h" +#include "libGLESv2/entry_points_gles_2_0_autogen.h" +#include "libGLESv2/entry_points_gles_3_0_autogen.h" +#include "libGLESv2/entry_points_gles_3_1_autogen.h" +#include "libGLESv2/entry_points_gles_3_2_autogen.h" +#include "libGLESv2/entry_points_gles_ext_autogen.h" +#include "platform/PlatformMethods.h" + +#define P(FUNC) reinterpret_cast<__eglMustCastToProperFunctionPointerType>(FUNC) + +namespace egl +{ +const ProcEntry g_procTable[] = { + {"ANGLEGetDisplayPlatform", P(ANGLEGetDisplayPlatform)}, + {"ANGLEResetDisplayPlatform", P(ANGLEResetDisplayPlatform)}, + {"eglBindAPI", P(EGL_BindAPI)}, + {"eglBindTexImage", P(EGL_BindTexImage)}, + {"eglChooseConfig", P(EGL_ChooseConfig)}, + {"eglClientWaitSync", P(EGL_ClientWaitSync)}, + {"eglClientWaitSyncKHR", P(EGL_ClientWaitSyncKHR)}, + {"eglCopyBuffers", P(EGL_CopyBuffers)}, + {"eglCreateContext", P(EGL_CreateContext)}, + {"eglCreateDeviceANGLE", P(EGL_CreateDeviceANGLE)}, + {"eglCreateImage", P(EGL_CreateImage)}, + {"eglCreateImageKHR", P(EGL_CreateImageKHR)}, + {"eglCreateNativeClientBufferANDROID", P(EGL_CreateNativeClientBufferANDROID)}, + {"eglCreatePbufferFromClientBuffer", P(EGL_CreatePbufferFromClientBuffer)}, + {"eglCreatePbufferSurface", P(EGL_CreatePbufferSurface)}, + {"eglCreatePixmapSurface", P(EGL_CreatePixmapSurface)}, + {"eglCreatePlatformPixmapSurface", P(EGL_CreatePlatformPixmapSurface)}, + {"eglCreatePlatformPixmapSurfaceEXT", P(EGL_CreatePlatformPixmapSurfaceEXT)}, + {"eglCreatePlatformWindowSurface", P(EGL_CreatePlatformWindowSurface)}, + {"eglCreatePlatformWindowSurfaceEXT", P(EGL_CreatePlatformWindowSurfaceEXT)}, + {"eglCreateStreamKHR", P(EGL_CreateStreamKHR)}, + {"eglCreateStreamProducerD3DTextureANGLE", P(EGL_CreateStreamProducerD3DTextureANGLE)}, + {"eglCreateSync", P(EGL_CreateSync)}, + {"eglCreateSyncKHR", P(EGL_CreateSyncKHR)}, + {"eglCreateWindowSurface", P(EGL_CreateWindowSurface)}, + {"eglDebugMessageControlKHR", P(EGL_DebugMessageControlKHR)}, + {"eglDestroyContext", P(EGL_DestroyContext)}, + {"eglDestroyImage", P(EGL_DestroyImage)}, + {"eglDestroyImageKHR", P(EGL_DestroyImageKHR)}, + {"eglDestroyStreamKHR", P(EGL_DestroyStreamKHR)}, + {"eglDestroySurface", P(EGL_DestroySurface)}, + {"eglDestroySync", P(EGL_DestroySync)}, + {"eglDestroySyncKHR", P(EGL_DestroySyncKHR)}, + {"eglDupNativeFenceFDANDROID", P(EGL_DupNativeFenceFDANDROID)}, + {"eglGetCompositorTimingANDROID", P(EGL_GetCompositorTimingANDROID)}, + {"eglGetCompositorTimingSupportedANDROID", P(EGL_GetCompositorTimingSupportedANDROID)}, + {"eglGetConfigAttrib", P(EGL_GetConfigAttrib)}, + {"eglGetConfigs", P(EGL_GetConfigs)}, + {"eglGetCurrentContext", P(EGL_GetCurrentContext)}, + {"eglGetCurrentDisplay", P(EGL_GetCurrentDisplay)}, + {"eglGetCurrentSurface", P(EGL_GetCurrentSurface)}, + {"eglGetDisplay", P(EGL_GetDisplay)}, + {"eglGetError", P(EGL_GetError)}, + {"eglGetFrameTimestampSupportedANDROID", P(EGL_GetFrameTimestampSupportedANDROID)}, + {"eglGetFrameTimestampsANDROID", P(EGL_GetFrameTimestampsANDROID)}, + {"eglGetMscRateANGLE", P(EGL_GetMscRateANGLE)}, + {"eglGetNativeClientBufferANDROID", P(EGL_GetNativeClientBufferANDROID)}, + {"eglGetNextFrameIdANDROID", P(EGL_GetNextFrameIdANDROID)}, + {"eglGetPlatformDisplay", P(EGL_GetPlatformDisplay)}, + {"eglGetPlatformDisplayEXT", P(EGL_GetPlatformDisplayEXT)}, + {"eglGetProcAddress", P(EGL_GetProcAddress)}, + {"eglGetSyncAttrib", P(EGL_GetSyncAttrib)}, + {"eglGetSyncAttribKHR", P(EGL_GetSyncAttribKHR)}, + {"eglGetSyncValuesCHROMIUM", P(EGL_GetSyncValuesCHROMIUM)}, + {"eglHandleGPUSwitchANGLE", P(EGL_HandleGPUSwitchANGLE)}, + {"eglInitialize", P(EGL_Initialize)}, + {"eglLabelObjectKHR", P(EGL_LabelObjectKHR)}, + {"eglMakeCurrent", P(EGL_MakeCurrent)}, + {"eglPostSubBufferNV", P(EGL_PostSubBufferNV)}, + {"eglPresentationTimeANDROID", P(EGL_PresentationTimeANDROID)}, + {"eglProgramCacheGetAttribANGLE", P(EGL_ProgramCacheGetAttribANGLE)}, + {"eglProgramCachePopulateANGLE", P(EGL_ProgramCachePopulateANGLE)}, + {"eglProgramCacheQueryANGLE", P(EGL_ProgramCacheQueryANGLE)}, + {"eglProgramCacheResizeANGLE", P(EGL_ProgramCacheResizeANGLE)}, + {"eglQueryAPI", P(EGL_QueryAPI)}, + {"eglQueryContext", P(EGL_QueryContext)}, + {"eglQueryDebugKHR", P(EGL_QueryDebugKHR)}, + {"eglQueryDeviceAttribEXT", P(EGL_QueryDeviceAttribEXT)}, + {"eglQueryDeviceStringEXT", P(EGL_QueryDeviceStringEXT)}, + {"eglQueryDisplayAttribANGLE", P(EGL_QueryDisplayAttribANGLE)}, + {"eglQueryDisplayAttribEXT", P(EGL_QueryDisplayAttribEXT)}, + {"eglQueryStreamKHR", P(EGL_QueryStreamKHR)}, + {"eglQueryStreamu64KHR", P(EGL_QueryStreamu64KHR)}, + {"eglQueryString", P(EGL_QueryString)}, + {"eglQueryStringiANGLE", P(EGL_QueryStringiANGLE)}, + {"eglQuerySurface", P(EGL_QuerySurface)}, + {"eglQuerySurfacePointerANGLE", P(EGL_QuerySurfacePointerANGLE)}, + {"eglReacquireHighPowerGPUANGLE", P(EGL_ReacquireHighPowerGPUANGLE)}, + {"eglReleaseDeviceANGLE", P(EGL_ReleaseDeviceANGLE)}, + {"eglReleaseHighPowerGPUANGLE", P(EGL_ReleaseHighPowerGPUANGLE)}, + {"eglReleaseTexImage", P(EGL_ReleaseTexImage)}, + {"eglReleaseThread", P(EGL_ReleaseThread)}, + {"eglSetBlobCacheFuncsANDROID", P(EGL_SetBlobCacheFuncsANDROID)}, + {"eglSignalSyncKHR", P(EGL_SignalSyncKHR)}, + {"eglStreamAttribKHR", P(EGL_StreamAttribKHR)}, + {"eglStreamConsumerAcquireKHR", P(EGL_StreamConsumerAcquireKHR)}, + {"eglStreamConsumerGLTextureExternalAttribsNV", + P(EGL_StreamConsumerGLTextureExternalAttribsNV)}, + {"eglStreamConsumerGLTextureExternalKHR", P(EGL_StreamConsumerGLTextureExternalKHR)}, + {"eglStreamConsumerReleaseKHR", P(EGL_StreamConsumerReleaseKHR)}, + {"eglStreamPostD3DTextureANGLE", P(EGL_StreamPostD3DTextureANGLE)}, + {"eglSurfaceAttrib", P(EGL_SurfaceAttrib)}, + {"eglSwapBuffers", P(EGL_SwapBuffers)}, + {"eglSwapBuffersWithDamageKHR", P(EGL_SwapBuffersWithDamageKHR)}, + {"eglSwapBuffersWithFrameTokenANGLE", P(EGL_SwapBuffersWithFrameTokenANGLE)}, + {"eglSwapInterval", P(EGL_SwapInterval)}, + {"eglTerminate", P(EGL_Terminate)}, + {"eglWaitClient", P(EGL_WaitClient)}, + {"eglWaitGL", P(EGL_WaitGL)}, + {"eglWaitNative", P(EGL_WaitNative)}, + {"eglWaitSync", P(EGL_WaitSync)}, + {"eglWaitSyncKHR", P(EGL_WaitSyncKHR)}, + {"glActiveShaderProgram", P(GL_ActiveShaderProgram)}, + {"glActiveShaderProgramContextANGLE", P(GL_ActiveShaderProgramContextANGLE)}, + {"glActiveShaderProgramEXT", P(GL_ActiveShaderProgramEXT)}, + {"glActiveShaderProgramEXTContextANGLE", P(GL_ActiveShaderProgramEXTContextANGLE)}, + {"glActiveTexture", P(GL_ActiveTexture)}, + {"glActiveTextureContextANGLE", P(GL_ActiveTextureContextANGLE)}, + {"glAlphaFunc", P(GL_AlphaFunc)}, + {"glAlphaFuncContextANGLE", P(GL_AlphaFuncContextANGLE)}, + {"glAlphaFuncx", P(GL_AlphaFuncx)}, + {"glAlphaFuncxContextANGLE", P(GL_AlphaFuncxContextANGLE)}, + {"glAttachShader", P(GL_AttachShader)}, + {"glAttachShaderContextANGLE", P(GL_AttachShaderContextANGLE)}, + {"glBeginQuery", P(GL_BeginQuery)}, + {"glBeginQueryContextANGLE", P(GL_BeginQueryContextANGLE)}, + {"glBeginQueryEXT", P(GL_BeginQueryEXT)}, + {"glBeginQueryEXTContextANGLE", P(GL_BeginQueryEXTContextANGLE)}, + {"glBeginTransformFeedback", P(GL_BeginTransformFeedback)}, + {"glBeginTransformFeedbackContextANGLE", P(GL_BeginTransformFeedbackContextANGLE)}, + {"glBindAttribLocation", P(GL_BindAttribLocation)}, + {"glBindAttribLocationContextANGLE", P(GL_BindAttribLocationContextANGLE)}, + {"glBindBuffer", P(GL_BindBuffer)}, + {"glBindBufferBase", P(GL_BindBufferBase)}, + {"glBindBufferBaseContextANGLE", P(GL_BindBufferBaseContextANGLE)}, + {"glBindBufferContextANGLE", P(GL_BindBufferContextANGLE)}, + {"glBindBufferRange", P(GL_BindBufferRange)}, + {"glBindBufferRangeContextANGLE", P(GL_BindBufferRangeContextANGLE)}, + {"glBindFragDataLocationEXT", P(GL_BindFragDataLocationEXT)}, + {"glBindFragDataLocationEXTContextANGLE", P(GL_BindFragDataLocationEXTContextANGLE)}, + {"glBindFragDataLocationIndexedEXT", P(GL_BindFragDataLocationIndexedEXT)}, + {"glBindFragDataLocationIndexedEXTContextANGLE", + P(GL_BindFragDataLocationIndexedEXTContextANGLE)}, + {"glBindFramebuffer", P(GL_BindFramebuffer)}, + {"glBindFramebufferContextANGLE", P(GL_BindFramebufferContextANGLE)}, + {"glBindFramebufferOES", P(GL_BindFramebufferOES)}, + {"glBindFramebufferOESContextANGLE", P(GL_BindFramebufferOESContextANGLE)}, + {"glBindImageTexture", P(GL_BindImageTexture)}, + {"glBindImageTextureContextANGLE", P(GL_BindImageTextureContextANGLE)}, + {"glBindProgramPipeline", P(GL_BindProgramPipeline)}, + {"glBindProgramPipelineContextANGLE", P(GL_BindProgramPipelineContextANGLE)}, + {"glBindProgramPipelineEXT", P(GL_BindProgramPipelineEXT)}, + {"glBindProgramPipelineEXTContextANGLE", P(GL_BindProgramPipelineEXTContextANGLE)}, + {"glBindRenderbuffer", P(GL_BindRenderbuffer)}, + {"glBindRenderbufferContextANGLE", P(GL_BindRenderbufferContextANGLE)}, + {"glBindRenderbufferOES", P(GL_BindRenderbufferOES)}, + {"glBindRenderbufferOESContextANGLE", P(GL_BindRenderbufferOESContextANGLE)}, + {"glBindSampler", P(GL_BindSampler)}, + {"glBindSamplerContextANGLE", P(GL_BindSamplerContextANGLE)}, + {"glBindTexture", P(GL_BindTexture)}, + {"glBindTextureContextANGLE", P(GL_BindTextureContextANGLE)}, + {"glBindTransformFeedback", P(GL_BindTransformFeedback)}, + {"glBindTransformFeedbackContextANGLE", P(GL_BindTransformFeedbackContextANGLE)}, + {"glBindUniformLocationCHROMIUM", P(GL_BindUniformLocationCHROMIUM)}, + {"glBindUniformLocationCHROMIUMContextANGLE", P(GL_BindUniformLocationCHROMIUMContextANGLE)}, + {"glBindVertexArray", P(GL_BindVertexArray)}, + {"glBindVertexArrayContextANGLE", P(GL_BindVertexArrayContextANGLE)}, + {"glBindVertexArrayOES", P(GL_BindVertexArrayOES)}, + {"glBindVertexArrayOESContextANGLE", P(GL_BindVertexArrayOESContextANGLE)}, + {"glBindVertexBuffer", P(GL_BindVertexBuffer)}, + {"glBindVertexBufferContextANGLE", P(GL_BindVertexBufferContextANGLE)}, + {"glBlendBarrier", P(GL_BlendBarrier)}, + {"glBlendBarrierContextANGLE", P(GL_BlendBarrierContextANGLE)}, + {"glBlendBarrierKHR", P(GL_BlendBarrierKHR)}, + {"glBlendBarrierKHRContextANGLE", P(GL_BlendBarrierKHRContextANGLE)}, + {"glBlendColor", P(GL_BlendColor)}, + {"glBlendColorContextANGLE", P(GL_BlendColorContextANGLE)}, + {"glBlendEquation", P(GL_BlendEquation)}, + {"glBlendEquationContextANGLE", P(GL_BlendEquationContextANGLE)}, + {"glBlendEquationSeparate", P(GL_BlendEquationSeparate)}, + {"glBlendEquationSeparateContextANGLE", P(GL_BlendEquationSeparateContextANGLE)}, + {"glBlendEquationSeparatei", P(GL_BlendEquationSeparatei)}, + {"glBlendEquationSeparateiContextANGLE", P(GL_BlendEquationSeparateiContextANGLE)}, + {"glBlendEquationSeparateiEXT", P(GL_BlendEquationSeparateiEXT)}, + {"glBlendEquationSeparateiEXTContextANGLE", P(GL_BlendEquationSeparateiEXTContextANGLE)}, + {"glBlendEquationSeparateiOES", P(GL_BlendEquationSeparateiOES)}, + {"glBlendEquationSeparateiOESContextANGLE", P(GL_BlendEquationSeparateiOESContextANGLE)}, + {"glBlendEquationi", P(GL_BlendEquationi)}, + {"glBlendEquationiContextANGLE", P(GL_BlendEquationiContextANGLE)}, + {"glBlendEquationiEXT", P(GL_BlendEquationiEXT)}, + {"glBlendEquationiEXTContextANGLE", P(GL_BlendEquationiEXTContextANGLE)}, + {"glBlendEquationiOES", P(GL_BlendEquationiOES)}, + {"glBlendEquationiOESContextANGLE", P(GL_BlendEquationiOESContextANGLE)}, + {"glBlendFunc", P(GL_BlendFunc)}, + {"glBlendFuncContextANGLE", P(GL_BlendFuncContextANGLE)}, + {"glBlendFuncSeparate", P(GL_BlendFuncSeparate)}, + {"glBlendFuncSeparateContextANGLE", P(GL_BlendFuncSeparateContextANGLE)}, + {"glBlendFuncSeparatei", P(GL_BlendFuncSeparatei)}, + {"glBlendFuncSeparateiContextANGLE", P(GL_BlendFuncSeparateiContextANGLE)}, + {"glBlendFuncSeparateiEXT", P(GL_BlendFuncSeparateiEXT)}, + {"glBlendFuncSeparateiEXTContextANGLE", P(GL_BlendFuncSeparateiEXTContextANGLE)}, + {"glBlendFuncSeparateiOES", P(GL_BlendFuncSeparateiOES)}, + {"glBlendFuncSeparateiOESContextANGLE", P(GL_BlendFuncSeparateiOESContextANGLE)}, + {"glBlendFunci", P(GL_BlendFunci)}, + {"glBlendFunciContextANGLE", P(GL_BlendFunciContextANGLE)}, + {"glBlendFunciEXT", P(GL_BlendFunciEXT)}, + {"glBlendFunciEXTContextANGLE", P(GL_BlendFunciEXTContextANGLE)}, + {"glBlendFunciOES", P(GL_BlendFunciOES)}, + {"glBlendFunciOESContextANGLE", P(GL_BlendFunciOESContextANGLE)}, + {"glBlitFramebuffer", P(GL_BlitFramebuffer)}, + {"glBlitFramebufferANGLE", P(GL_BlitFramebufferANGLE)}, + {"glBlitFramebufferANGLEContextANGLE", P(GL_BlitFramebufferANGLEContextANGLE)}, + {"glBlitFramebufferContextANGLE", P(GL_BlitFramebufferContextANGLE)}, + {"glBlitFramebufferNV", P(GL_BlitFramebufferNV)}, + {"glBlitFramebufferNVContextANGLE", P(GL_BlitFramebufferNVContextANGLE)}, + {"glBufferData", P(GL_BufferData)}, + {"glBufferDataContextANGLE", P(GL_BufferDataContextANGLE)}, + {"glBufferStorageEXT", P(GL_BufferStorageEXT)}, + {"glBufferStorageEXTContextANGLE", P(GL_BufferStorageEXTContextANGLE)}, + {"glBufferStorageExternalEXT", P(GL_BufferStorageExternalEXT)}, + {"glBufferStorageExternalEXTContextANGLE", P(GL_BufferStorageExternalEXTContextANGLE)}, + {"glBufferStorageMemEXT", P(GL_BufferStorageMemEXT)}, + {"glBufferStorageMemEXTContextANGLE", P(GL_BufferStorageMemEXTContextANGLE)}, + {"glBufferSubData", P(GL_BufferSubData)}, + {"glBufferSubDataContextANGLE", P(GL_BufferSubDataContextANGLE)}, + {"glCheckFramebufferStatus", P(GL_CheckFramebufferStatus)}, + {"glCheckFramebufferStatusContextANGLE", P(GL_CheckFramebufferStatusContextANGLE)}, + {"glCheckFramebufferStatusOES", P(GL_CheckFramebufferStatusOES)}, + {"glCheckFramebufferStatusOESContextANGLE", P(GL_CheckFramebufferStatusOESContextANGLE)}, + {"glClear", P(GL_Clear)}, + {"glClearBufferfi", P(GL_ClearBufferfi)}, + {"glClearBufferfiContextANGLE", P(GL_ClearBufferfiContextANGLE)}, + {"glClearBufferfv", P(GL_ClearBufferfv)}, + {"glClearBufferfvContextANGLE", P(GL_ClearBufferfvContextANGLE)}, + {"glClearBufferiv", P(GL_ClearBufferiv)}, + {"glClearBufferivContextANGLE", P(GL_ClearBufferivContextANGLE)}, + {"glClearBufferuiv", P(GL_ClearBufferuiv)}, + {"glClearBufferuivContextANGLE", P(GL_ClearBufferuivContextANGLE)}, + {"glClearColor", P(GL_ClearColor)}, + {"glClearColorContextANGLE", P(GL_ClearColorContextANGLE)}, + {"glClearColorx", P(GL_ClearColorx)}, + {"glClearColorxContextANGLE", P(GL_ClearColorxContextANGLE)}, + {"glClearContextANGLE", P(GL_ClearContextANGLE)}, + {"glClearDepthf", P(GL_ClearDepthf)}, + {"glClearDepthfContextANGLE", P(GL_ClearDepthfContextANGLE)}, + {"glClearDepthx", P(GL_ClearDepthx)}, + {"glClearDepthxContextANGLE", P(GL_ClearDepthxContextANGLE)}, + {"glClearStencil", P(GL_ClearStencil)}, + {"glClearStencilContextANGLE", P(GL_ClearStencilContextANGLE)}, + {"glClientActiveTexture", P(GL_ClientActiveTexture)}, + {"glClientActiveTextureContextANGLE", P(GL_ClientActiveTextureContextANGLE)}, + {"glClientWaitSync", P(GL_ClientWaitSync)}, + {"glClientWaitSyncContextANGLE", P(GL_ClientWaitSyncContextANGLE)}, + {"glClipControlEXT", P(GL_ClipControlEXT)}, + {"glClipControlEXTContextANGLE", P(GL_ClipControlEXTContextANGLE)}, + {"glClipPlanef", P(GL_ClipPlanef)}, + {"glClipPlanefContextANGLE", P(GL_ClipPlanefContextANGLE)}, + {"glClipPlanex", P(GL_ClipPlanex)}, + {"glClipPlanexContextANGLE", P(GL_ClipPlanexContextANGLE)}, + {"glColor4f", P(GL_Color4f)}, + {"glColor4fContextANGLE", P(GL_Color4fContextANGLE)}, + {"glColor4ub", P(GL_Color4ub)}, + {"glColor4ubContextANGLE", P(GL_Color4ubContextANGLE)}, + {"glColor4x", P(GL_Color4x)}, + {"glColor4xContextANGLE", P(GL_Color4xContextANGLE)}, + {"glColorMask", P(GL_ColorMask)}, + {"glColorMaskContextANGLE", P(GL_ColorMaskContextANGLE)}, + {"glColorMaski", P(GL_ColorMaski)}, + {"glColorMaskiContextANGLE", P(GL_ColorMaskiContextANGLE)}, + {"glColorMaskiEXT", P(GL_ColorMaskiEXT)}, + {"glColorMaskiEXTContextANGLE", P(GL_ColorMaskiEXTContextANGLE)}, + {"glColorMaskiOES", P(GL_ColorMaskiOES)}, + {"glColorMaskiOESContextANGLE", P(GL_ColorMaskiOESContextANGLE)}, + {"glColorPointer", P(GL_ColorPointer)}, + {"glColorPointerContextANGLE", P(GL_ColorPointerContextANGLE)}, + {"glCompileShader", P(GL_CompileShader)}, + {"glCompileShaderContextANGLE", P(GL_CompileShaderContextANGLE)}, + {"glCompressedCopyTextureCHROMIUM", P(GL_CompressedCopyTextureCHROMIUM)}, + {"glCompressedCopyTextureCHROMIUMContextANGLE", + P(GL_CompressedCopyTextureCHROMIUMContextANGLE)}, + {"glCompressedTexImage2D", P(GL_CompressedTexImage2D)}, + {"glCompressedTexImage2DContextANGLE", P(GL_CompressedTexImage2DContextANGLE)}, + {"glCompressedTexImage2DRobustANGLE", P(GL_CompressedTexImage2DRobustANGLE)}, + {"glCompressedTexImage2DRobustANGLEContextANGLE", + P(GL_CompressedTexImage2DRobustANGLEContextANGLE)}, + {"glCompressedTexImage3D", P(GL_CompressedTexImage3D)}, + {"glCompressedTexImage3DContextANGLE", P(GL_CompressedTexImage3DContextANGLE)}, + {"glCompressedTexImage3DOES", P(GL_CompressedTexImage3DOES)}, + {"glCompressedTexImage3DOESContextANGLE", P(GL_CompressedTexImage3DOESContextANGLE)}, + {"glCompressedTexImage3DRobustANGLE", P(GL_CompressedTexImage3DRobustANGLE)}, + {"glCompressedTexImage3DRobustANGLEContextANGLE", + P(GL_CompressedTexImage3DRobustANGLEContextANGLE)}, + {"glCompressedTexSubImage2D", P(GL_CompressedTexSubImage2D)}, + {"glCompressedTexSubImage2DContextANGLE", P(GL_CompressedTexSubImage2DContextANGLE)}, + {"glCompressedTexSubImage2DRobustANGLE", P(GL_CompressedTexSubImage2DRobustANGLE)}, + {"glCompressedTexSubImage2DRobustANGLEContextANGLE", + P(GL_CompressedTexSubImage2DRobustANGLEContextANGLE)}, + {"glCompressedTexSubImage3D", P(GL_CompressedTexSubImage3D)}, + {"glCompressedTexSubImage3DContextANGLE", P(GL_CompressedTexSubImage3DContextANGLE)}, + {"glCompressedTexSubImage3DOES", P(GL_CompressedTexSubImage3DOES)}, + {"glCompressedTexSubImage3DOESContextANGLE", P(GL_CompressedTexSubImage3DOESContextANGLE)}, + {"glCompressedTexSubImage3DRobustANGLE", P(GL_CompressedTexSubImage3DRobustANGLE)}, + {"glCompressedTexSubImage3DRobustANGLEContextANGLE", + P(GL_CompressedTexSubImage3DRobustANGLEContextANGLE)}, + {"glCopyBufferSubData", P(GL_CopyBufferSubData)}, + {"glCopyBufferSubDataContextANGLE", P(GL_CopyBufferSubDataContextANGLE)}, + {"glCopyImageSubData", P(GL_CopyImageSubData)}, + {"glCopyImageSubDataContextANGLE", P(GL_CopyImageSubDataContextANGLE)}, + {"glCopyImageSubDataEXT", P(GL_CopyImageSubDataEXT)}, + {"glCopyImageSubDataEXTContextANGLE", P(GL_CopyImageSubDataEXTContextANGLE)}, + {"glCopyImageSubDataOES", P(GL_CopyImageSubDataOES)}, + {"glCopyImageSubDataOESContextANGLE", P(GL_CopyImageSubDataOESContextANGLE)}, + {"glCopySubTexture3DANGLE", P(GL_CopySubTexture3DANGLE)}, + {"glCopySubTexture3DANGLEContextANGLE", P(GL_CopySubTexture3DANGLEContextANGLE)}, + {"glCopySubTextureCHROMIUM", P(GL_CopySubTextureCHROMIUM)}, + {"glCopySubTextureCHROMIUMContextANGLE", P(GL_CopySubTextureCHROMIUMContextANGLE)}, + {"glCopyTexImage2D", P(GL_CopyTexImage2D)}, + {"glCopyTexImage2DContextANGLE", P(GL_CopyTexImage2DContextANGLE)}, + {"glCopyTexSubImage2D", P(GL_CopyTexSubImage2D)}, + {"glCopyTexSubImage2DContextANGLE", P(GL_CopyTexSubImage2DContextANGLE)}, + {"glCopyTexSubImage3D", P(GL_CopyTexSubImage3D)}, + {"glCopyTexSubImage3DContextANGLE", P(GL_CopyTexSubImage3DContextANGLE)}, + {"glCopyTexSubImage3DOES", P(GL_CopyTexSubImage3DOES)}, + {"glCopyTexSubImage3DOESContextANGLE", P(GL_CopyTexSubImage3DOESContextANGLE)}, + {"glCopyTexture3DANGLE", P(GL_CopyTexture3DANGLE)}, + {"glCopyTexture3DANGLEContextANGLE", P(GL_CopyTexture3DANGLEContextANGLE)}, + {"glCopyTextureCHROMIUM", P(GL_CopyTextureCHROMIUM)}, + {"glCopyTextureCHROMIUMContextANGLE", P(GL_CopyTextureCHROMIUMContextANGLE)}, + {"glCoverageModulationCHROMIUM", P(GL_CoverageModulationCHROMIUM)}, + {"glCoverageModulationCHROMIUMContextANGLE", P(GL_CoverageModulationCHROMIUMContextANGLE)}, + {"glCreateMemoryObjectsEXT", P(GL_CreateMemoryObjectsEXT)}, + {"glCreateMemoryObjectsEXTContextANGLE", P(GL_CreateMemoryObjectsEXTContextANGLE)}, + {"glCreateProgram", P(GL_CreateProgram)}, + {"glCreateProgramContextANGLE", P(GL_CreateProgramContextANGLE)}, + {"glCreateShader", P(GL_CreateShader)}, + {"glCreateShaderContextANGLE", P(GL_CreateShaderContextANGLE)}, + {"glCreateShaderProgramv", P(GL_CreateShaderProgramv)}, + {"glCreateShaderProgramvContextANGLE", P(GL_CreateShaderProgramvContextANGLE)}, + {"glCreateShaderProgramvEXT", P(GL_CreateShaderProgramvEXT)}, + {"glCreateShaderProgramvEXTContextANGLE", P(GL_CreateShaderProgramvEXTContextANGLE)}, + {"glCullFace", P(GL_CullFace)}, + {"glCullFaceContextANGLE", P(GL_CullFaceContextANGLE)}, + {"glCurrentPaletteMatrixOES", P(GL_CurrentPaletteMatrixOES)}, + {"glCurrentPaletteMatrixOESContextANGLE", P(GL_CurrentPaletteMatrixOESContextANGLE)}, + {"glDebugMessageCallback", P(GL_DebugMessageCallback)}, + {"glDebugMessageCallbackContextANGLE", P(GL_DebugMessageCallbackContextANGLE)}, + {"glDebugMessageCallbackKHR", P(GL_DebugMessageCallbackKHR)}, + {"glDebugMessageCallbackKHRContextANGLE", P(GL_DebugMessageCallbackKHRContextANGLE)}, + {"glDebugMessageControl", P(GL_DebugMessageControl)}, + {"glDebugMessageControlContextANGLE", P(GL_DebugMessageControlContextANGLE)}, + {"glDebugMessageControlKHR", P(GL_DebugMessageControlKHR)}, + {"glDebugMessageControlKHRContextANGLE", P(GL_DebugMessageControlKHRContextANGLE)}, + {"glDebugMessageInsert", P(GL_DebugMessageInsert)}, + {"glDebugMessageInsertContextANGLE", P(GL_DebugMessageInsertContextANGLE)}, + {"glDebugMessageInsertKHR", P(GL_DebugMessageInsertKHR)}, + {"glDebugMessageInsertKHRContextANGLE", P(GL_DebugMessageInsertKHRContextANGLE)}, + {"glDeleteBuffers", P(GL_DeleteBuffers)}, + {"glDeleteBuffersContextANGLE", P(GL_DeleteBuffersContextANGLE)}, + {"glDeleteFencesNV", P(GL_DeleteFencesNV)}, + {"glDeleteFencesNVContextANGLE", P(GL_DeleteFencesNVContextANGLE)}, + {"glDeleteFramebuffers", P(GL_DeleteFramebuffers)}, + {"glDeleteFramebuffersContextANGLE", P(GL_DeleteFramebuffersContextANGLE)}, + {"glDeleteFramebuffersOES", P(GL_DeleteFramebuffersOES)}, + {"glDeleteFramebuffersOESContextANGLE", P(GL_DeleteFramebuffersOESContextANGLE)}, + {"glDeleteMemoryObjectsEXT", P(GL_DeleteMemoryObjectsEXT)}, + {"glDeleteMemoryObjectsEXTContextANGLE", P(GL_DeleteMemoryObjectsEXTContextANGLE)}, + {"glDeleteProgram", P(GL_DeleteProgram)}, + {"glDeleteProgramContextANGLE", P(GL_DeleteProgramContextANGLE)}, + {"glDeleteProgramPipelines", P(GL_DeleteProgramPipelines)}, + {"glDeleteProgramPipelinesContextANGLE", P(GL_DeleteProgramPipelinesContextANGLE)}, + {"glDeleteProgramPipelinesEXT", P(GL_DeleteProgramPipelinesEXT)}, + {"glDeleteProgramPipelinesEXTContextANGLE", P(GL_DeleteProgramPipelinesEXTContextANGLE)}, + {"glDeleteQueries", P(GL_DeleteQueries)}, + {"glDeleteQueriesContextANGLE", P(GL_DeleteQueriesContextANGLE)}, + {"glDeleteQueriesEXT", P(GL_DeleteQueriesEXT)}, + {"glDeleteQueriesEXTContextANGLE", P(GL_DeleteQueriesEXTContextANGLE)}, + {"glDeleteRenderbuffers", P(GL_DeleteRenderbuffers)}, + {"glDeleteRenderbuffersContextANGLE", P(GL_DeleteRenderbuffersContextANGLE)}, + {"glDeleteRenderbuffersOES", P(GL_DeleteRenderbuffersOES)}, + {"glDeleteRenderbuffersOESContextANGLE", P(GL_DeleteRenderbuffersOESContextANGLE)}, + {"glDeleteSamplers", P(GL_DeleteSamplers)}, + {"glDeleteSamplersContextANGLE", P(GL_DeleteSamplersContextANGLE)}, + {"glDeleteSemaphoresEXT", P(GL_DeleteSemaphoresEXT)}, + {"glDeleteSemaphoresEXTContextANGLE", P(GL_DeleteSemaphoresEXTContextANGLE)}, + {"glDeleteShader", P(GL_DeleteShader)}, + {"glDeleteShaderContextANGLE", P(GL_DeleteShaderContextANGLE)}, + {"glDeleteSync", P(GL_DeleteSync)}, + {"glDeleteSyncContextANGLE", P(GL_DeleteSyncContextANGLE)}, + {"glDeleteTextures", P(GL_DeleteTextures)}, + {"glDeleteTexturesContextANGLE", P(GL_DeleteTexturesContextANGLE)}, + {"glDeleteTransformFeedbacks", P(GL_DeleteTransformFeedbacks)}, + {"glDeleteTransformFeedbacksContextANGLE", P(GL_DeleteTransformFeedbacksContextANGLE)}, + {"glDeleteVertexArrays", P(GL_DeleteVertexArrays)}, + {"glDeleteVertexArraysContextANGLE", P(GL_DeleteVertexArraysContextANGLE)}, + {"glDeleteVertexArraysOES", P(GL_DeleteVertexArraysOES)}, + {"glDeleteVertexArraysOESContextANGLE", P(GL_DeleteVertexArraysOESContextANGLE)}, + {"glDepthFunc", P(GL_DepthFunc)}, + {"glDepthFuncContextANGLE", P(GL_DepthFuncContextANGLE)}, + {"glDepthMask", P(GL_DepthMask)}, + {"glDepthMaskContextANGLE", P(GL_DepthMaskContextANGLE)}, + {"glDepthRangef", P(GL_DepthRangef)}, + {"glDepthRangefContextANGLE", P(GL_DepthRangefContextANGLE)}, + {"glDepthRangex", P(GL_DepthRangex)}, + {"glDepthRangexContextANGLE", P(GL_DepthRangexContextANGLE)}, + {"glDetachShader", P(GL_DetachShader)}, + {"glDetachShaderContextANGLE", P(GL_DetachShaderContextANGLE)}, + {"glDisable", P(GL_Disable)}, + {"glDisableClientState", P(GL_DisableClientState)}, + {"glDisableClientStateContextANGLE", P(GL_DisableClientStateContextANGLE)}, + {"glDisableContextANGLE", P(GL_DisableContextANGLE)}, + {"glDisableExtensionANGLE", P(GL_DisableExtensionANGLE)}, + {"glDisableExtensionANGLEContextANGLE", P(GL_DisableExtensionANGLEContextANGLE)}, + {"glDisableVertexAttribArray", P(GL_DisableVertexAttribArray)}, + {"glDisableVertexAttribArrayContextANGLE", P(GL_DisableVertexAttribArrayContextANGLE)}, + {"glDisablei", P(GL_Disablei)}, + {"glDisableiContextANGLE", P(GL_DisableiContextANGLE)}, + {"glDisableiEXT", P(GL_DisableiEXT)}, + {"glDisableiEXTContextANGLE", P(GL_DisableiEXTContextANGLE)}, + {"glDisableiOES", P(GL_DisableiOES)}, + {"glDisableiOESContextANGLE", P(GL_DisableiOESContextANGLE)}, + {"glDiscardFramebufferEXT", P(GL_DiscardFramebufferEXT)}, + {"glDiscardFramebufferEXTContextANGLE", P(GL_DiscardFramebufferEXTContextANGLE)}, + {"glDispatchCompute", P(GL_DispatchCompute)}, + {"glDispatchComputeContextANGLE", P(GL_DispatchComputeContextANGLE)}, + {"glDispatchComputeIndirect", P(GL_DispatchComputeIndirect)}, + {"glDispatchComputeIndirectContextANGLE", P(GL_DispatchComputeIndirectContextANGLE)}, + {"glDrawArrays", P(GL_DrawArrays)}, + {"glDrawArraysContextANGLE", P(GL_DrawArraysContextANGLE)}, + {"glDrawArraysIndirect", P(GL_DrawArraysIndirect)}, + {"glDrawArraysIndirectContextANGLE", P(GL_DrawArraysIndirectContextANGLE)}, + {"glDrawArraysInstanced", P(GL_DrawArraysInstanced)}, + {"glDrawArraysInstancedANGLE", P(GL_DrawArraysInstancedANGLE)}, + {"glDrawArraysInstancedANGLEContextANGLE", P(GL_DrawArraysInstancedANGLEContextANGLE)}, + {"glDrawArraysInstancedBaseInstanceANGLE", P(GL_DrawArraysInstancedBaseInstanceANGLE)}, + {"glDrawArraysInstancedBaseInstanceANGLEContextANGLE", + P(GL_DrawArraysInstancedBaseInstanceANGLEContextANGLE)}, + {"glDrawArraysInstancedContextANGLE", P(GL_DrawArraysInstancedContextANGLE)}, + {"glDrawArraysInstancedEXT", P(GL_DrawArraysInstancedEXT)}, + {"glDrawArraysInstancedEXTContextANGLE", P(GL_DrawArraysInstancedEXTContextANGLE)}, + {"glDrawBuffers", P(GL_DrawBuffers)}, + {"glDrawBuffersContextANGLE", P(GL_DrawBuffersContextANGLE)}, + {"glDrawBuffersEXT", P(GL_DrawBuffersEXT)}, + {"glDrawBuffersEXTContextANGLE", P(GL_DrawBuffersEXTContextANGLE)}, + {"glDrawElements", P(GL_DrawElements)}, + {"glDrawElementsBaseVertex", P(GL_DrawElementsBaseVertex)}, + {"glDrawElementsBaseVertexContextANGLE", P(GL_DrawElementsBaseVertexContextANGLE)}, + {"glDrawElementsBaseVertexEXT", P(GL_DrawElementsBaseVertexEXT)}, + {"glDrawElementsBaseVertexEXTContextANGLE", P(GL_DrawElementsBaseVertexEXTContextANGLE)}, + {"glDrawElementsBaseVertexOES", P(GL_DrawElementsBaseVertexOES)}, + {"glDrawElementsBaseVertexOESContextANGLE", P(GL_DrawElementsBaseVertexOESContextANGLE)}, + {"glDrawElementsContextANGLE", P(GL_DrawElementsContextANGLE)}, + {"glDrawElementsIndirect", P(GL_DrawElementsIndirect)}, + {"glDrawElementsIndirectContextANGLE", P(GL_DrawElementsIndirectContextANGLE)}, + {"glDrawElementsInstanced", P(GL_DrawElementsInstanced)}, + {"glDrawElementsInstancedANGLE", P(GL_DrawElementsInstancedANGLE)}, + {"glDrawElementsInstancedANGLEContextANGLE", P(GL_DrawElementsInstancedANGLEContextANGLE)}, + {"glDrawElementsInstancedBaseVertex", P(GL_DrawElementsInstancedBaseVertex)}, + {"glDrawElementsInstancedBaseVertexBaseInstanceANGLE", + P(GL_DrawElementsInstancedBaseVertexBaseInstanceANGLE)}, + {"glDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE", + P(GL_DrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE)}, + {"glDrawElementsInstancedBaseVertexContextANGLE", + P(GL_DrawElementsInstancedBaseVertexContextANGLE)}, + {"glDrawElementsInstancedBaseVertexEXT", P(GL_DrawElementsInstancedBaseVertexEXT)}, + {"glDrawElementsInstancedBaseVertexEXTContextANGLE", + P(GL_DrawElementsInstancedBaseVertexEXTContextANGLE)}, + {"glDrawElementsInstancedBaseVertexOES", P(GL_DrawElementsInstancedBaseVertexOES)}, + {"glDrawElementsInstancedBaseVertexOESContextANGLE", + P(GL_DrawElementsInstancedBaseVertexOESContextANGLE)}, + {"glDrawElementsInstancedContextANGLE", P(GL_DrawElementsInstancedContextANGLE)}, + {"glDrawElementsInstancedEXT", P(GL_DrawElementsInstancedEXT)}, + {"glDrawElementsInstancedEXTContextANGLE", P(GL_DrawElementsInstancedEXTContextANGLE)}, + {"glDrawRangeElements", P(GL_DrawRangeElements)}, + {"glDrawRangeElementsBaseVertex", P(GL_DrawRangeElementsBaseVertex)}, + {"glDrawRangeElementsBaseVertexContextANGLE", P(GL_DrawRangeElementsBaseVertexContextANGLE)}, + {"glDrawRangeElementsBaseVertexEXT", P(GL_DrawRangeElementsBaseVertexEXT)}, + {"glDrawRangeElementsBaseVertexEXTContextANGLE", + P(GL_DrawRangeElementsBaseVertexEXTContextANGLE)}, + {"glDrawRangeElementsBaseVertexOES", P(GL_DrawRangeElementsBaseVertexOES)}, + {"glDrawRangeElementsBaseVertexOESContextANGLE", + P(GL_DrawRangeElementsBaseVertexOESContextANGLE)}, + {"glDrawRangeElementsContextANGLE", P(GL_DrawRangeElementsContextANGLE)}, + {"glDrawTexfOES", P(GL_DrawTexfOES)}, + {"glDrawTexfOESContextANGLE", P(GL_DrawTexfOESContextANGLE)}, + {"glDrawTexfvOES", P(GL_DrawTexfvOES)}, + {"glDrawTexfvOESContextANGLE", P(GL_DrawTexfvOESContextANGLE)}, + {"glDrawTexiOES", P(GL_DrawTexiOES)}, + {"glDrawTexiOESContextANGLE", P(GL_DrawTexiOESContextANGLE)}, + {"glDrawTexivOES", P(GL_DrawTexivOES)}, + {"glDrawTexivOESContextANGLE", P(GL_DrawTexivOESContextANGLE)}, + {"glDrawTexsOES", P(GL_DrawTexsOES)}, + {"glDrawTexsOESContextANGLE", P(GL_DrawTexsOESContextANGLE)}, + {"glDrawTexsvOES", P(GL_DrawTexsvOES)}, + {"glDrawTexsvOESContextANGLE", P(GL_DrawTexsvOESContextANGLE)}, + {"glDrawTexxOES", P(GL_DrawTexxOES)}, + {"glDrawTexxOESContextANGLE", P(GL_DrawTexxOESContextANGLE)}, + {"glDrawTexxvOES", P(GL_DrawTexxvOES)}, + {"glDrawTexxvOESContextANGLE", P(GL_DrawTexxvOESContextANGLE)}, + {"glEGLImageTargetRenderbufferStorageOES", P(GL_EGLImageTargetRenderbufferStorageOES)}, + {"glEGLImageTargetRenderbufferStorageOESContextANGLE", + P(GL_EGLImageTargetRenderbufferStorageOESContextANGLE)}, + {"glEGLImageTargetTexture2DOES", P(GL_EGLImageTargetTexture2DOES)}, + {"glEGLImageTargetTexture2DOESContextANGLE", P(GL_EGLImageTargetTexture2DOESContextANGLE)}, + {"glEnable", P(GL_Enable)}, + {"glEnableClientState", P(GL_EnableClientState)}, + {"glEnableClientStateContextANGLE", P(GL_EnableClientStateContextANGLE)}, + {"glEnableContextANGLE", P(GL_EnableContextANGLE)}, + {"glEnableVertexAttribArray", P(GL_EnableVertexAttribArray)}, + {"glEnableVertexAttribArrayContextANGLE", P(GL_EnableVertexAttribArrayContextANGLE)}, + {"glEnablei", P(GL_Enablei)}, + {"glEnableiContextANGLE", P(GL_EnableiContextANGLE)}, + {"glEnableiEXT", P(GL_EnableiEXT)}, + {"glEnableiEXTContextANGLE", P(GL_EnableiEXTContextANGLE)}, + {"glEnableiOES", P(GL_EnableiOES)}, + {"glEnableiOESContextANGLE", P(GL_EnableiOESContextANGLE)}, + {"glEndQuery", P(GL_EndQuery)}, + {"glEndQueryContextANGLE", P(GL_EndQueryContextANGLE)}, + {"glEndQueryEXT", P(GL_EndQueryEXT)}, + {"glEndQueryEXTContextANGLE", P(GL_EndQueryEXTContextANGLE)}, + {"glEndTransformFeedback", P(GL_EndTransformFeedback)}, + {"glEndTransformFeedbackContextANGLE", P(GL_EndTransformFeedbackContextANGLE)}, + {"glFenceSync", P(GL_FenceSync)}, + {"glFenceSyncContextANGLE", P(GL_FenceSyncContextANGLE)}, + {"glFinish", P(GL_Finish)}, + {"glFinishContextANGLE", P(GL_FinishContextANGLE)}, + {"glFinishFenceNV", P(GL_FinishFenceNV)}, + {"glFinishFenceNVContextANGLE", P(GL_FinishFenceNVContextANGLE)}, + {"glFlush", P(GL_Flush)}, + {"glFlushContextANGLE", P(GL_FlushContextANGLE)}, + {"glFlushMappedBufferRange", P(GL_FlushMappedBufferRange)}, + {"glFlushMappedBufferRangeContextANGLE", P(GL_FlushMappedBufferRangeContextANGLE)}, + {"glFlushMappedBufferRangeEXT", P(GL_FlushMappedBufferRangeEXT)}, + {"glFlushMappedBufferRangeEXTContextANGLE", P(GL_FlushMappedBufferRangeEXTContextANGLE)}, + {"glFogf", P(GL_Fogf)}, + {"glFogfContextANGLE", P(GL_FogfContextANGLE)}, + {"glFogfv", P(GL_Fogfv)}, + {"glFogfvContextANGLE", P(GL_FogfvContextANGLE)}, + {"glFogx", P(GL_Fogx)}, + {"glFogxContextANGLE", P(GL_FogxContextANGLE)}, + {"glFogxv", P(GL_Fogxv)}, + {"glFogxvContextANGLE", P(GL_FogxvContextANGLE)}, + {"glFramebufferFetchBarrierEXT", P(GL_FramebufferFetchBarrierEXT)}, + {"glFramebufferFetchBarrierEXTContextANGLE", P(GL_FramebufferFetchBarrierEXTContextANGLE)}, + {"glFramebufferParameteri", P(GL_FramebufferParameteri)}, + {"glFramebufferParameteriContextANGLE", P(GL_FramebufferParameteriContextANGLE)}, + {"glFramebufferRenderbuffer", P(GL_FramebufferRenderbuffer)}, + {"glFramebufferRenderbufferContextANGLE", P(GL_FramebufferRenderbufferContextANGLE)}, + {"glFramebufferRenderbufferOES", P(GL_FramebufferRenderbufferOES)}, + {"glFramebufferRenderbufferOESContextANGLE", P(GL_FramebufferRenderbufferOESContextANGLE)}, + {"glFramebufferTexture", P(GL_FramebufferTexture)}, + {"glFramebufferTexture2D", P(GL_FramebufferTexture2D)}, + {"glFramebufferTexture2DContextANGLE", P(GL_FramebufferTexture2DContextANGLE)}, + {"glFramebufferTexture2DMultisampleEXT", P(GL_FramebufferTexture2DMultisampleEXT)}, + {"glFramebufferTexture2DMultisampleEXTContextANGLE", + P(GL_FramebufferTexture2DMultisampleEXTContextANGLE)}, + {"glFramebufferTexture2DOES", P(GL_FramebufferTexture2DOES)}, + {"glFramebufferTexture2DOESContextANGLE", P(GL_FramebufferTexture2DOESContextANGLE)}, + {"glFramebufferTexture3DOES", P(GL_FramebufferTexture3DOES)}, + {"glFramebufferTexture3DOESContextANGLE", P(GL_FramebufferTexture3DOESContextANGLE)}, + {"glFramebufferTextureContextANGLE", P(GL_FramebufferTextureContextANGLE)}, + {"glFramebufferTextureEXT", P(GL_FramebufferTextureEXT)}, + {"glFramebufferTextureEXTContextANGLE", P(GL_FramebufferTextureEXTContextANGLE)}, + {"glFramebufferTextureLayer", P(GL_FramebufferTextureLayer)}, + {"glFramebufferTextureLayerContextANGLE", P(GL_FramebufferTextureLayerContextANGLE)}, + {"glFramebufferTextureMultiviewOVR", P(GL_FramebufferTextureMultiviewOVR)}, + {"glFramebufferTextureMultiviewOVRContextANGLE", + P(GL_FramebufferTextureMultiviewOVRContextANGLE)}, + {"glFrontFace", P(GL_FrontFace)}, + {"glFrontFaceContextANGLE", P(GL_FrontFaceContextANGLE)}, + {"glFrustumf", P(GL_Frustumf)}, + {"glFrustumfContextANGLE", P(GL_FrustumfContextANGLE)}, + {"glFrustumx", P(GL_Frustumx)}, + {"glFrustumxContextANGLE", P(GL_FrustumxContextANGLE)}, + {"glGenBuffers", P(GL_GenBuffers)}, + {"glGenBuffersContextANGLE", P(GL_GenBuffersContextANGLE)}, + {"glGenFencesNV", P(GL_GenFencesNV)}, + {"glGenFencesNVContextANGLE", P(GL_GenFencesNVContextANGLE)}, + {"glGenFramebuffers", P(GL_GenFramebuffers)}, + {"glGenFramebuffersContextANGLE", P(GL_GenFramebuffersContextANGLE)}, + {"glGenFramebuffersOES", P(GL_GenFramebuffersOES)}, + {"glGenFramebuffersOESContextANGLE", P(GL_GenFramebuffersOESContextANGLE)}, + {"glGenProgramPipelines", P(GL_GenProgramPipelines)}, + {"glGenProgramPipelinesContextANGLE", P(GL_GenProgramPipelinesContextANGLE)}, + {"glGenProgramPipelinesEXT", P(GL_GenProgramPipelinesEXT)}, + {"glGenProgramPipelinesEXTContextANGLE", P(GL_GenProgramPipelinesEXTContextANGLE)}, + {"glGenQueries", P(GL_GenQueries)}, + {"glGenQueriesContextANGLE", P(GL_GenQueriesContextANGLE)}, + {"glGenQueriesEXT", P(GL_GenQueriesEXT)}, + {"glGenQueriesEXTContextANGLE", P(GL_GenQueriesEXTContextANGLE)}, + {"glGenRenderbuffers", P(GL_GenRenderbuffers)}, + {"glGenRenderbuffersContextANGLE", P(GL_GenRenderbuffersContextANGLE)}, + {"glGenRenderbuffersOES", P(GL_GenRenderbuffersOES)}, + {"glGenRenderbuffersOESContextANGLE", P(GL_GenRenderbuffersOESContextANGLE)}, + {"glGenSamplers", P(GL_GenSamplers)}, + {"glGenSamplersContextANGLE", P(GL_GenSamplersContextANGLE)}, + {"glGenSemaphoresEXT", P(GL_GenSemaphoresEXT)}, + {"glGenSemaphoresEXTContextANGLE", P(GL_GenSemaphoresEXTContextANGLE)}, + {"glGenTextures", P(GL_GenTextures)}, + {"glGenTexturesContextANGLE", P(GL_GenTexturesContextANGLE)}, + {"glGenTransformFeedbacks", P(GL_GenTransformFeedbacks)}, + {"glGenTransformFeedbacksContextANGLE", P(GL_GenTransformFeedbacksContextANGLE)}, + {"glGenVertexArrays", P(GL_GenVertexArrays)}, + {"glGenVertexArraysContextANGLE", P(GL_GenVertexArraysContextANGLE)}, + {"glGenVertexArraysOES", P(GL_GenVertexArraysOES)}, + {"glGenVertexArraysOESContextANGLE", P(GL_GenVertexArraysOESContextANGLE)}, + {"glGenerateMipmap", P(GL_GenerateMipmap)}, + {"glGenerateMipmapContextANGLE", P(GL_GenerateMipmapContextANGLE)}, + {"glGenerateMipmapOES", P(GL_GenerateMipmapOES)}, + {"glGenerateMipmapOESContextANGLE", P(GL_GenerateMipmapOESContextANGLE)}, + {"glGetActiveAttrib", P(GL_GetActiveAttrib)}, + {"glGetActiveAttribContextANGLE", P(GL_GetActiveAttribContextANGLE)}, + {"glGetActiveUniform", P(GL_GetActiveUniform)}, + {"glGetActiveUniformBlockName", P(GL_GetActiveUniformBlockName)}, + {"glGetActiveUniformBlockNameContextANGLE", P(GL_GetActiveUniformBlockNameContextANGLE)}, + {"glGetActiveUniformBlockiv", P(GL_GetActiveUniformBlockiv)}, + {"glGetActiveUniformBlockivContextANGLE", P(GL_GetActiveUniformBlockivContextANGLE)}, + {"glGetActiveUniformBlockivRobustANGLE", P(GL_GetActiveUniformBlockivRobustANGLE)}, + {"glGetActiveUniformBlockivRobustANGLEContextANGLE", + P(GL_GetActiveUniformBlockivRobustANGLEContextANGLE)}, + {"glGetActiveUniformContextANGLE", P(GL_GetActiveUniformContextANGLE)}, + {"glGetActiveUniformsiv", P(GL_GetActiveUniformsiv)}, + {"glGetActiveUniformsivContextANGLE", P(GL_GetActiveUniformsivContextANGLE)}, + {"glGetAttachedShaders", P(GL_GetAttachedShaders)}, + {"glGetAttachedShadersContextANGLE", P(GL_GetAttachedShadersContextANGLE)}, + {"glGetAttribLocation", P(GL_GetAttribLocation)}, + {"glGetAttribLocationContextANGLE", P(GL_GetAttribLocationContextANGLE)}, + {"glGetBooleani_v", P(GL_GetBooleani_v)}, + {"glGetBooleani_vContextANGLE", P(GL_GetBooleani_vContextANGLE)}, + {"glGetBooleani_vRobustANGLE", P(GL_GetBooleani_vRobustANGLE)}, + {"glGetBooleani_vRobustANGLEContextANGLE", P(GL_GetBooleani_vRobustANGLEContextANGLE)}, + {"glGetBooleanv", P(GL_GetBooleanv)}, + {"glGetBooleanvContextANGLE", P(GL_GetBooleanvContextANGLE)}, + {"glGetBooleanvRobustANGLE", P(GL_GetBooleanvRobustANGLE)}, + {"glGetBooleanvRobustANGLEContextANGLE", P(GL_GetBooleanvRobustANGLEContextANGLE)}, + {"glGetBufferParameteri64v", P(GL_GetBufferParameteri64v)}, + {"glGetBufferParameteri64vContextANGLE", P(GL_GetBufferParameteri64vContextANGLE)}, + {"glGetBufferParameteri64vRobustANGLE", P(GL_GetBufferParameteri64vRobustANGLE)}, + {"glGetBufferParameteri64vRobustANGLEContextANGLE", + P(GL_GetBufferParameteri64vRobustANGLEContextANGLE)}, + {"glGetBufferParameteriv", P(GL_GetBufferParameteriv)}, + {"glGetBufferParameterivContextANGLE", P(GL_GetBufferParameterivContextANGLE)}, + {"glGetBufferParameterivRobustANGLE", P(GL_GetBufferParameterivRobustANGLE)}, + {"glGetBufferParameterivRobustANGLEContextANGLE", + P(GL_GetBufferParameterivRobustANGLEContextANGLE)}, + {"glGetBufferPointerv", P(GL_GetBufferPointerv)}, + {"glGetBufferPointervContextANGLE", P(GL_GetBufferPointervContextANGLE)}, + {"glGetBufferPointervOES", P(GL_GetBufferPointervOES)}, + {"glGetBufferPointervOESContextANGLE", P(GL_GetBufferPointervOESContextANGLE)}, + {"glGetBufferPointervRobustANGLE", P(GL_GetBufferPointervRobustANGLE)}, + {"glGetBufferPointervRobustANGLEContextANGLE", P(GL_GetBufferPointervRobustANGLEContextANGLE)}, + {"glGetClipPlanef", P(GL_GetClipPlanef)}, + {"glGetClipPlanefContextANGLE", P(GL_GetClipPlanefContextANGLE)}, + {"glGetClipPlanex", P(GL_GetClipPlanex)}, + {"glGetClipPlanexContextANGLE", P(GL_GetClipPlanexContextANGLE)}, + {"glGetDebugMessageLog", P(GL_GetDebugMessageLog)}, + {"glGetDebugMessageLogContextANGLE", P(GL_GetDebugMessageLogContextANGLE)}, + {"glGetDebugMessageLogKHR", P(GL_GetDebugMessageLogKHR)}, + {"glGetDebugMessageLogKHRContextANGLE", P(GL_GetDebugMessageLogKHRContextANGLE)}, + {"glGetError", P(GL_GetError)}, + {"glGetErrorContextANGLE", P(GL_GetErrorContextANGLE)}, + {"glGetFenceivNV", P(GL_GetFenceivNV)}, + {"glGetFenceivNVContextANGLE", P(GL_GetFenceivNVContextANGLE)}, + {"glGetFixedv", P(GL_GetFixedv)}, + {"glGetFixedvContextANGLE", P(GL_GetFixedvContextANGLE)}, + {"glGetFloatv", P(GL_GetFloatv)}, + {"glGetFloatvContextANGLE", P(GL_GetFloatvContextANGLE)}, + {"glGetFloatvRobustANGLE", P(GL_GetFloatvRobustANGLE)}, + {"glGetFloatvRobustANGLEContextANGLE", P(GL_GetFloatvRobustANGLEContextANGLE)}, + {"glGetFragDataIndexEXT", P(GL_GetFragDataIndexEXT)}, + {"glGetFragDataIndexEXTContextANGLE", P(GL_GetFragDataIndexEXTContextANGLE)}, + {"glGetFragDataLocation", P(GL_GetFragDataLocation)}, + {"glGetFragDataLocationContextANGLE", P(GL_GetFragDataLocationContextANGLE)}, + {"glGetFramebufferAttachmentParameteriv", P(GL_GetFramebufferAttachmentParameteriv)}, + {"glGetFramebufferAttachmentParameterivContextANGLE", + P(GL_GetFramebufferAttachmentParameterivContextANGLE)}, + {"glGetFramebufferAttachmentParameterivOES", P(GL_GetFramebufferAttachmentParameterivOES)}, + {"glGetFramebufferAttachmentParameterivOESContextANGLE", + P(GL_GetFramebufferAttachmentParameterivOESContextANGLE)}, + {"glGetFramebufferAttachmentParameterivRobustANGLE", + P(GL_GetFramebufferAttachmentParameterivRobustANGLE)}, + {"glGetFramebufferAttachmentParameterivRobustANGLEContextANGLE", + P(GL_GetFramebufferAttachmentParameterivRobustANGLEContextANGLE)}, + {"glGetFramebufferParameteriv", P(GL_GetFramebufferParameteriv)}, + {"glGetFramebufferParameterivContextANGLE", P(GL_GetFramebufferParameterivContextANGLE)}, + {"glGetFramebufferParameterivRobustANGLE", P(GL_GetFramebufferParameterivRobustANGLE)}, + {"glGetFramebufferParameterivRobustANGLEContextANGLE", + P(GL_GetFramebufferParameterivRobustANGLEContextANGLE)}, + {"glGetGraphicsResetStatus", P(GL_GetGraphicsResetStatus)}, + {"glGetGraphicsResetStatusContextANGLE", P(GL_GetGraphicsResetStatusContextANGLE)}, + {"glGetGraphicsResetStatusEXT", P(GL_GetGraphicsResetStatusEXT)}, + {"glGetGraphicsResetStatusEXTContextANGLE", P(GL_GetGraphicsResetStatusEXTContextANGLE)}, + {"glGetInteger64i_v", P(GL_GetInteger64i_v)}, + {"glGetInteger64i_vContextANGLE", P(GL_GetInteger64i_vContextANGLE)}, + {"glGetInteger64i_vRobustANGLE", P(GL_GetInteger64i_vRobustANGLE)}, + {"glGetInteger64i_vRobustANGLEContextANGLE", P(GL_GetInteger64i_vRobustANGLEContextANGLE)}, + {"glGetInteger64v", P(GL_GetInteger64v)}, + {"glGetInteger64vContextANGLE", P(GL_GetInteger64vContextANGLE)}, + {"glGetInteger64vEXT", P(GL_GetInteger64vEXT)}, + {"glGetInteger64vEXTContextANGLE", P(GL_GetInteger64vEXTContextANGLE)}, + {"glGetInteger64vRobustANGLE", P(GL_GetInteger64vRobustANGLE)}, + {"glGetInteger64vRobustANGLEContextANGLE", P(GL_GetInteger64vRobustANGLEContextANGLE)}, + {"glGetIntegeri_v", P(GL_GetIntegeri_v)}, + {"glGetIntegeri_vContextANGLE", P(GL_GetIntegeri_vContextANGLE)}, + {"glGetIntegeri_vRobustANGLE", P(GL_GetIntegeri_vRobustANGLE)}, + {"glGetIntegeri_vRobustANGLEContextANGLE", P(GL_GetIntegeri_vRobustANGLEContextANGLE)}, + {"glGetIntegerv", P(GL_GetIntegerv)}, + {"glGetIntegervContextANGLE", P(GL_GetIntegervContextANGLE)}, + {"glGetIntegervRobustANGLE", P(GL_GetIntegervRobustANGLE)}, + {"glGetIntegervRobustANGLEContextANGLE", P(GL_GetIntegervRobustANGLEContextANGLE)}, + {"glGetInternalformativ", P(GL_GetInternalformativ)}, + {"glGetInternalformativContextANGLE", P(GL_GetInternalformativContextANGLE)}, + {"glGetInternalformativRobustANGLE", P(GL_GetInternalformativRobustANGLE)}, + {"glGetInternalformativRobustANGLEContextANGLE", + P(GL_GetInternalformativRobustANGLEContextANGLE)}, + {"glGetLightfv", P(GL_GetLightfv)}, + {"glGetLightfvContextANGLE", P(GL_GetLightfvContextANGLE)}, + {"glGetLightxv", P(GL_GetLightxv)}, + {"glGetLightxvContextANGLE", P(GL_GetLightxvContextANGLE)}, + {"glGetMaterialfv", P(GL_GetMaterialfv)}, + {"glGetMaterialfvContextANGLE", P(GL_GetMaterialfvContextANGLE)}, + {"glGetMaterialxv", P(GL_GetMaterialxv)}, + {"glGetMaterialxvContextANGLE", P(GL_GetMaterialxvContextANGLE)}, + {"glGetMemoryObjectParameterivEXT", P(GL_GetMemoryObjectParameterivEXT)}, + {"glGetMemoryObjectParameterivEXTContextANGLE", + P(GL_GetMemoryObjectParameterivEXTContextANGLE)}, + {"glGetMultisamplefv", P(GL_GetMultisamplefv)}, + {"glGetMultisamplefvANGLE", P(GL_GetMultisamplefvANGLE)}, + {"glGetMultisamplefvANGLEContextANGLE", P(GL_GetMultisamplefvANGLEContextANGLE)}, + {"glGetMultisamplefvContextANGLE", P(GL_GetMultisamplefvContextANGLE)}, + {"glGetMultisamplefvRobustANGLE", P(GL_GetMultisamplefvRobustANGLE)}, + {"glGetMultisamplefvRobustANGLEContextANGLE", P(GL_GetMultisamplefvRobustANGLEContextANGLE)}, + {"glGetObjectLabel", P(GL_GetObjectLabel)}, + {"glGetObjectLabelContextANGLE", P(GL_GetObjectLabelContextANGLE)}, + {"glGetObjectLabelEXT", P(GL_GetObjectLabelEXT)}, + {"glGetObjectLabelEXTContextANGLE", P(GL_GetObjectLabelEXTContextANGLE)}, + {"glGetObjectLabelKHR", P(GL_GetObjectLabelKHR)}, + {"glGetObjectLabelKHRContextANGLE", P(GL_GetObjectLabelKHRContextANGLE)}, + {"glGetObjectPtrLabel", P(GL_GetObjectPtrLabel)}, + {"glGetObjectPtrLabelContextANGLE", P(GL_GetObjectPtrLabelContextANGLE)}, + {"glGetObjectPtrLabelKHR", P(GL_GetObjectPtrLabelKHR)}, + {"glGetObjectPtrLabelKHRContextANGLE", P(GL_GetObjectPtrLabelKHRContextANGLE)}, + {"glGetPointerv", P(GL_GetPointerv)}, + {"glGetPointervContextANGLE", P(GL_GetPointervContextANGLE)}, + {"glGetPointervKHR", P(GL_GetPointervKHR)}, + {"glGetPointervKHRContextANGLE", P(GL_GetPointervKHRContextANGLE)}, + {"glGetPointervRobustANGLERobustANGLE", P(GL_GetPointervRobustANGLERobustANGLE)}, + {"glGetPointervRobustANGLERobustANGLEContextANGLE", + P(GL_GetPointervRobustANGLERobustANGLEContextANGLE)}, + {"glGetProgramBinary", P(GL_GetProgramBinary)}, + {"glGetProgramBinaryContextANGLE", P(GL_GetProgramBinaryContextANGLE)}, + {"glGetProgramBinaryOES", P(GL_GetProgramBinaryOES)}, + {"glGetProgramBinaryOESContextANGLE", P(GL_GetProgramBinaryOESContextANGLE)}, + {"glGetProgramInfoLog", P(GL_GetProgramInfoLog)}, + {"glGetProgramInfoLogContextANGLE", P(GL_GetProgramInfoLogContextANGLE)}, + {"glGetProgramInterfaceiv", P(GL_GetProgramInterfaceiv)}, + {"glGetProgramInterfaceivContextANGLE", P(GL_GetProgramInterfaceivContextANGLE)}, + {"glGetProgramInterfaceivRobustANGLE", P(GL_GetProgramInterfaceivRobustANGLE)}, + {"glGetProgramInterfaceivRobustANGLEContextANGLE", + P(GL_GetProgramInterfaceivRobustANGLEContextANGLE)}, + {"glGetProgramPipelineInfoLog", P(GL_GetProgramPipelineInfoLog)}, + {"glGetProgramPipelineInfoLogContextANGLE", P(GL_GetProgramPipelineInfoLogContextANGLE)}, + {"glGetProgramPipelineInfoLogEXT", P(GL_GetProgramPipelineInfoLogEXT)}, + {"glGetProgramPipelineInfoLogEXTContextANGLE", P(GL_GetProgramPipelineInfoLogEXTContextANGLE)}, + {"glGetProgramPipelineiv", P(GL_GetProgramPipelineiv)}, + {"glGetProgramPipelineivContextANGLE", P(GL_GetProgramPipelineivContextANGLE)}, + {"glGetProgramPipelineivEXT", P(GL_GetProgramPipelineivEXT)}, + {"glGetProgramPipelineivEXTContextANGLE", P(GL_GetProgramPipelineivEXTContextANGLE)}, + {"glGetProgramResourceIndex", P(GL_GetProgramResourceIndex)}, + {"glGetProgramResourceIndexContextANGLE", P(GL_GetProgramResourceIndexContextANGLE)}, + {"glGetProgramResourceLocation", P(GL_GetProgramResourceLocation)}, + {"glGetProgramResourceLocationContextANGLE", P(GL_GetProgramResourceLocationContextANGLE)}, + {"glGetProgramResourceLocationIndexEXT", P(GL_GetProgramResourceLocationIndexEXT)}, + {"glGetProgramResourceLocationIndexEXTContextANGLE", + P(GL_GetProgramResourceLocationIndexEXTContextANGLE)}, + {"glGetProgramResourceName", P(GL_GetProgramResourceName)}, + {"glGetProgramResourceNameContextANGLE", P(GL_GetProgramResourceNameContextANGLE)}, + {"glGetProgramResourceiv", P(GL_GetProgramResourceiv)}, + {"glGetProgramResourceivContextANGLE", P(GL_GetProgramResourceivContextANGLE)}, + {"glGetProgramiv", P(GL_GetProgramiv)}, + {"glGetProgramivContextANGLE", P(GL_GetProgramivContextANGLE)}, + {"glGetProgramivRobustANGLE", P(GL_GetProgramivRobustANGLE)}, + {"glGetProgramivRobustANGLEContextANGLE", P(GL_GetProgramivRobustANGLEContextANGLE)}, + {"glGetQueryObjecti64vEXT", P(GL_GetQueryObjecti64vEXT)}, + {"glGetQueryObjecti64vEXTContextANGLE", P(GL_GetQueryObjecti64vEXTContextANGLE)}, + {"glGetQueryObjecti64vRobustANGLE", P(GL_GetQueryObjecti64vRobustANGLE)}, + {"glGetQueryObjecti64vRobustANGLEContextANGLE", + P(GL_GetQueryObjecti64vRobustANGLEContextANGLE)}, + {"glGetQueryObjectivEXT", P(GL_GetQueryObjectivEXT)}, + {"glGetQueryObjectivEXTContextANGLE", P(GL_GetQueryObjectivEXTContextANGLE)}, + {"glGetQueryObjectivRobustANGLE", P(GL_GetQueryObjectivRobustANGLE)}, + {"glGetQueryObjectivRobustANGLEContextANGLE", P(GL_GetQueryObjectivRobustANGLEContextANGLE)}, + {"glGetQueryObjectui64vEXT", P(GL_GetQueryObjectui64vEXT)}, + {"glGetQueryObjectui64vEXTContextANGLE", P(GL_GetQueryObjectui64vEXTContextANGLE)}, + {"glGetQueryObjectui64vRobustANGLE", P(GL_GetQueryObjectui64vRobustANGLE)}, + {"glGetQueryObjectui64vRobustANGLEContextANGLE", + P(GL_GetQueryObjectui64vRobustANGLEContextANGLE)}, + {"glGetQueryObjectuiv", P(GL_GetQueryObjectuiv)}, + {"glGetQueryObjectuivContextANGLE", P(GL_GetQueryObjectuivContextANGLE)}, + {"glGetQueryObjectuivEXT", P(GL_GetQueryObjectuivEXT)}, + {"glGetQueryObjectuivEXTContextANGLE", P(GL_GetQueryObjectuivEXTContextANGLE)}, + {"glGetQueryObjectuivRobustANGLE", P(GL_GetQueryObjectuivRobustANGLE)}, + {"glGetQueryObjectuivRobustANGLEContextANGLE", P(GL_GetQueryObjectuivRobustANGLEContextANGLE)}, + {"glGetQueryiv", P(GL_GetQueryiv)}, + {"glGetQueryivContextANGLE", P(GL_GetQueryivContextANGLE)}, + {"glGetQueryivEXT", P(GL_GetQueryivEXT)}, + {"glGetQueryivEXTContextANGLE", P(GL_GetQueryivEXTContextANGLE)}, + {"glGetQueryivRobustANGLE", P(GL_GetQueryivRobustANGLE)}, + {"glGetQueryivRobustANGLEContextANGLE", P(GL_GetQueryivRobustANGLEContextANGLE)}, + {"glGetRenderbufferImageANGLE", P(GL_GetRenderbufferImageANGLE)}, + {"glGetRenderbufferImageANGLEContextANGLE", P(GL_GetRenderbufferImageANGLEContextANGLE)}, + {"glGetRenderbufferParameteriv", P(GL_GetRenderbufferParameteriv)}, + {"glGetRenderbufferParameterivContextANGLE", P(GL_GetRenderbufferParameterivContextANGLE)}, + {"glGetRenderbufferParameterivOES", P(GL_GetRenderbufferParameterivOES)}, + {"glGetRenderbufferParameterivOESContextANGLE", + P(GL_GetRenderbufferParameterivOESContextANGLE)}, + {"glGetRenderbufferParameterivRobustANGLE", P(GL_GetRenderbufferParameterivRobustANGLE)}, + {"glGetRenderbufferParameterivRobustANGLEContextANGLE", + P(GL_GetRenderbufferParameterivRobustANGLEContextANGLE)}, + {"glGetSamplerParameterIiv", P(GL_GetSamplerParameterIiv)}, + {"glGetSamplerParameterIivContextANGLE", P(GL_GetSamplerParameterIivContextANGLE)}, + {"glGetSamplerParameterIivEXT", P(GL_GetSamplerParameterIivEXT)}, + {"glGetSamplerParameterIivEXTContextANGLE", P(GL_GetSamplerParameterIivEXTContextANGLE)}, + {"glGetSamplerParameterIivOES", P(GL_GetSamplerParameterIivOES)}, + {"glGetSamplerParameterIivOESContextANGLE", P(GL_GetSamplerParameterIivOESContextANGLE)}, + {"glGetSamplerParameterIivRobustANGLE", P(GL_GetSamplerParameterIivRobustANGLE)}, + {"glGetSamplerParameterIivRobustANGLEContextANGLE", + P(GL_GetSamplerParameterIivRobustANGLEContextANGLE)}, + {"glGetSamplerParameterIuiv", P(GL_GetSamplerParameterIuiv)}, + {"glGetSamplerParameterIuivContextANGLE", P(GL_GetSamplerParameterIuivContextANGLE)}, + {"glGetSamplerParameterIuivEXT", P(GL_GetSamplerParameterIuivEXT)}, + {"glGetSamplerParameterIuivEXTContextANGLE", P(GL_GetSamplerParameterIuivEXTContextANGLE)}, + {"glGetSamplerParameterIuivOES", P(GL_GetSamplerParameterIuivOES)}, + {"glGetSamplerParameterIuivOESContextANGLE", P(GL_GetSamplerParameterIuivOESContextANGLE)}, + {"glGetSamplerParameterIuivRobustANGLE", P(GL_GetSamplerParameterIuivRobustANGLE)}, + {"glGetSamplerParameterIuivRobustANGLEContextANGLE", + P(GL_GetSamplerParameterIuivRobustANGLEContextANGLE)}, + {"glGetSamplerParameterfv", P(GL_GetSamplerParameterfv)}, + {"glGetSamplerParameterfvContextANGLE", P(GL_GetSamplerParameterfvContextANGLE)}, + {"glGetSamplerParameterfvRobustANGLE", P(GL_GetSamplerParameterfvRobustANGLE)}, + {"glGetSamplerParameterfvRobustANGLEContextANGLE", + P(GL_GetSamplerParameterfvRobustANGLEContextANGLE)}, + {"glGetSamplerParameteriv", P(GL_GetSamplerParameteriv)}, + {"glGetSamplerParameterivContextANGLE", P(GL_GetSamplerParameterivContextANGLE)}, + {"glGetSamplerParameterivRobustANGLE", P(GL_GetSamplerParameterivRobustANGLE)}, + {"glGetSamplerParameterivRobustANGLEContextANGLE", + P(GL_GetSamplerParameterivRobustANGLEContextANGLE)}, + {"glGetSemaphoreParameterui64vEXT", P(GL_GetSemaphoreParameterui64vEXT)}, + {"glGetSemaphoreParameterui64vEXTContextANGLE", + P(GL_GetSemaphoreParameterui64vEXTContextANGLE)}, + {"glGetShaderInfoLog", P(GL_GetShaderInfoLog)}, + {"glGetShaderInfoLogContextANGLE", P(GL_GetShaderInfoLogContextANGLE)}, + {"glGetShaderPrecisionFormat", P(GL_GetShaderPrecisionFormat)}, + {"glGetShaderPrecisionFormatContextANGLE", P(GL_GetShaderPrecisionFormatContextANGLE)}, + {"glGetShaderSource", P(GL_GetShaderSource)}, + {"glGetShaderSourceContextANGLE", P(GL_GetShaderSourceContextANGLE)}, + {"glGetShaderiv", P(GL_GetShaderiv)}, + {"glGetShaderivContextANGLE", P(GL_GetShaderivContextANGLE)}, + {"glGetShaderivRobustANGLE", P(GL_GetShaderivRobustANGLE)}, + {"glGetShaderivRobustANGLEContextANGLE", P(GL_GetShaderivRobustANGLEContextANGLE)}, + {"glGetString", P(GL_GetString)}, + {"glGetStringContextANGLE", P(GL_GetStringContextANGLE)}, + {"glGetStringi", P(GL_GetStringi)}, + {"glGetStringiContextANGLE", P(GL_GetStringiContextANGLE)}, + {"glGetSynciv", P(GL_GetSynciv)}, + {"glGetSyncivContextANGLE", P(GL_GetSyncivContextANGLE)}, + {"glGetTexEnvfv", P(GL_GetTexEnvfv)}, + {"glGetTexEnvfvContextANGLE", P(GL_GetTexEnvfvContextANGLE)}, + {"glGetTexEnviv", P(GL_GetTexEnviv)}, + {"glGetTexEnvivContextANGLE", P(GL_GetTexEnvivContextANGLE)}, + {"glGetTexEnvxv", P(GL_GetTexEnvxv)}, + {"glGetTexEnvxvContextANGLE", P(GL_GetTexEnvxvContextANGLE)}, + {"glGetTexGenfvOES", P(GL_GetTexGenfvOES)}, + {"glGetTexGenfvOESContextANGLE", P(GL_GetTexGenfvOESContextANGLE)}, + {"glGetTexGenivOES", P(GL_GetTexGenivOES)}, + {"glGetTexGenivOESContextANGLE", P(GL_GetTexGenivOESContextANGLE)}, + {"glGetTexGenxvOES", P(GL_GetTexGenxvOES)}, + {"glGetTexGenxvOESContextANGLE", P(GL_GetTexGenxvOESContextANGLE)}, + {"glGetTexImageANGLE", P(GL_GetTexImageANGLE)}, + {"glGetTexImageANGLEContextANGLE", P(GL_GetTexImageANGLEContextANGLE)}, + {"glGetTexLevelParameterfv", P(GL_GetTexLevelParameterfv)}, + {"glGetTexLevelParameterfvANGLE", P(GL_GetTexLevelParameterfvANGLE)}, + {"glGetTexLevelParameterfvANGLEContextANGLE", P(GL_GetTexLevelParameterfvANGLEContextANGLE)}, + {"glGetTexLevelParameterfvContextANGLE", P(GL_GetTexLevelParameterfvContextANGLE)}, + {"glGetTexLevelParameterfvRobustANGLE", P(GL_GetTexLevelParameterfvRobustANGLE)}, + {"glGetTexLevelParameterfvRobustANGLEContextANGLE", + P(GL_GetTexLevelParameterfvRobustANGLEContextANGLE)}, + {"glGetTexLevelParameteriv", P(GL_GetTexLevelParameteriv)}, + {"glGetTexLevelParameterivANGLE", P(GL_GetTexLevelParameterivANGLE)}, + {"glGetTexLevelParameterivANGLEContextANGLE", P(GL_GetTexLevelParameterivANGLEContextANGLE)}, + {"glGetTexLevelParameterivContextANGLE", P(GL_GetTexLevelParameterivContextANGLE)}, + {"glGetTexLevelParameterivRobustANGLE", P(GL_GetTexLevelParameterivRobustANGLE)}, + {"glGetTexLevelParameterivRobustANGLEContextANGLE", + P(GL_GetTexLevelParameterivRobustANGLEContextANGLE)}, + {"glGetTexParameterIiv", P(GL_GetTexParameterIiv)}, + {"glGetTexParameterIivContextANGLE", P(GL_GetTexParameterIivContextANGLE)}, + {"glGetTexParameterIivEXT", P(GL_GetTexParameterIivEXT)}, + {"glGetTexParameterIivEXTContextANGLE", P(GL_GetTexParameterIivEXTContextANGLE)}, + {"glGetTexParameterIivOES", P(GL_GetTexParameterIivOES)}, + {"glGetTexParameterIivOESContextANGLE", P(GL_GetTexParameterIivOESContextANGLE)}, + {"glGetTexParameterIivRobustANGLE", P(GL_GetTexParameterIivRobustANGLE)}, + {"glGetTexParameterIivRobustANGLEContextANGLE", + P(GL_GetTexParameterIivRobustANGLEContextANGLE)}, + {"glGetTexParameterIuiv", P(GL_GetTexParameterIuiv)}, + {"glGetTexParameterIuivContextANGLE", P(GL_GetTexParameterIuivContextANGLE)}, + {"glGetTexParameterIuivEXT", P(GL_GetTexParameterIuivEXT)}, + {"glGetTexParameterIuivEXTContextANGLE", P(GL_GetTexParameterIuivEXTContextANGLE)}, + {"glGetTexParameterIuivOES", P(GL_GetTexParameterIuivOES)}, + {"glGetTexParameterIuivOESContextANGLE", P(GL_GetTexParameterIuivOESContextANGLE)}, + {"glGetTexParameterIuivRobustANGLE", P(GL_GetTexParameterIuivRobustANGLE)}, + {"glGetTexParameterIuivRobustANGLEContextANGLE", + P(GL_GetTexParameterIuivRobustANGLEContextANGLE)}, + {"glGetTexParameterfv", P(GL_GetTexParameterfv)}, + {"glGetTexParameterfvContextANGLE", P(GL_GetTexParameterfvContextANGLE)}, + {"glGetTexParameterfvRobustANGLE", P(GL_GetTexParameterfvRobustANGLE)}, + {"glGetTexParameterfvRobustANGLEContextANGLE", P(GL_GetTexParameterfvRobustANGLEContextANGLE)}, + {"glGetTexParameteriv", P(GL_GetTexParameteriv)}, + {"glGetTexParameterivContextANGLE", P(GL_GetTexParameterivContextANGLE)}, + {"glGetTexParameterivRobustANGLE", P(GL_GetTexParameterivRobustANGLE)}, + {"glGetTexParameterivRobustANGLEContextANGLE", P(GL_GetTexParameterivRobustANGLEContextANGLE)}, + {"glGetTexParameterxv", P(GL_GetTexParameterxv)}, + {"glGetTexParameterxvContextANGLE", P(GL_GetTexParameterxvContextANGLE)}, + {"glGetTransformFeedbackVarying", P(GL_GetTransformFeedbackVarying)}, + {"glGetTransformFeedbackVaryingContextANGLE", P(GL_GetTransformFeedbackVaryingContextANGLE)}, + {"glGetTranslatedShaderSourceANGLE", P(GL_GetTranslatedShaderSourceANGLE)}, + {"glGetTranslatedShaderSourceANGLEContextANGLE", + P(GL_GetTranslatedShaderSourceANGLEContextANGLE)}, + {"glGetUniformBlockIndex", P(GL_GetUniformBlockIndex)}, + {"glGetUniformBlockIndexContextANGLE", P(GL_GetUniformBlockIndexContextANGLE)}, + {"glGetUniformIndices", P(GL_GetUniformIndices)}, + {"glGetUniformIndicesContextANGLE", P(GL_GetUniformIndicesContextANGLE)}, + {"glGetUniformLocation", P(GL_GetUniformLocation)}, + {"glGetUniformLocationContextANGLE", P(GL_GetUniformLocationContextANGLE)}, + {"glGetUniformfv", P(GL_GetUniformfv)}, + {"glGetUniformfvContextANGLE", P(GL_GetUniformfvContextANGLE)}, + {"glGetUniformfvRobustANGLE", P(GL_GetUniformfvRobustANGLE)}, + {"glGetUniformfvRobustANGLEContextANGLE", P(GL_GetUniformfvRobustANGLEContextANGLE)}, + {"glGetUniformiv", P(GL_GetUniformiv)}, + {"glGetUniformivContextANGLE", P(GL_GetUniformivContextANGLE)}, + {"glGetUniformivRobustANGLE", P(GL_GetUniformivRobustANGLE)}, + {"glGetUniformivRobustANGLEContextANGLE", P(GL_GetUniformivRobustANGLEContextANGLE)}, + {"glGetUniformuiv", P(GL_GetUniformuiv)}, + {"glGetUniformuivContextANGLE", P(GL_GetUniformuivContextANGLE)}, + {"glGetUniformuivRobustANGLE", P(GL_GetUniformuivRobustANGLE)}, + {"glGetUniformuivRobustANGLEContextANGLE", P(GL_GetUniformuivRobustANGLEContextANGLE)}, + {"glGetUnsignedBytei_vEXT", P(GL_GetUnsignedBytei_vEXT)}, + {"glGetUnsignedBytei_vEXTContextANGLE", P(GL_GetUnsignedBytei_vEXTContextANGLE)}, + {"glGetUnsignedBytevEXT", P(GL_GetUnsignedBytevEXT)}, + {"glGetUnsignedBytevEXTContextANGLE", P(GL_GetUnsignedBytevEXTContextANGLE)}, + {"glGetVertexAttribIiv", P(GL_GetVertexAttribIiv)}, + {"glGetVertexAttribIivContextANGLE", P(GL_GetVertexAttribIivContextANGLE)}, + {"glGetVertexAttribIivRobustANGLE", P(GL_GetVertexAttribIivRobustANGLE)}, + {"glGetVertexAttribIivRobustANGLEContextANGLE", + P(GL_GetVertexAttribIivRobustANGLEContextANGLE)}, + {"glGetVertexAttribIuiv", P(GL_GetVertexAttribIuiv)}, + {"glGetVertexAttribIuivContextANGLE", P(GL_GetVertexAttribIuivContextANGLE)}, + {"glGetVertexAttribIuivRobustANGLE", P(GL_GetVertexAttribIuivRobustANGLE)}, + {"glGetVertexAttribIuivRobustANGLEContextANGLE", + P(GL_GetVertexAttribIuivRobustANGLEContextANGLE)}, + {"glGetVertexAttribPointerv", P(GL_GetVertexAttribPointerv)}, + {"glGetVertexAttribPointervContextANGLE", P(GL_GetVertexAttribPointervContextANGLE)}, + {"glGetVertexAttribPointervRobustANGLE", P(GL_GetVertexAttribPointervRobustANGLE)}, + {"glGetVertexAttribPointervRobustANGLEContextANGLE", + P(GL_GetVertexAttribPointervRobustANGLEContextANGLE)}, + {"glGetVertexAttribfv", P(GL_GetVertexAttribfv)}, + {"glGetVertexAttribfvContextANGLE", P(GL_GetVertexAttribfvContextANGLE)}, + {"glGetVertexAttribfvRobustANGLE", P(GL_GetVertexAttribfvRobustANGLE)}, + {"glGetVertexAttribfvRobustANGLEContextANGLE", P(GL_GetVertexAttribfvRobustANGLEContextANGLE)}, + {"glGetVertexAttribiv", P(GL_GetVertexAttribiv)}, + {"glGetVertexAttribivContextANGLE", P(GL_GetVertexAttribivContextANGLE)}, + {"glGetVertexAttribivRobustANGLE", P(GL_GetVertexAttribivRobustANGLE)}, + {"glGetVertexAttribivRobustANGLEContextANGLE", P(GL_GetVertexAttribivRobustANGLEContextANGLE)}, + {"glGetnUniformfv", P(GL_GetnUniformfv)}, + {"glGetnUniformfvContextANGLE", P(GL_GetnUniformfvContextANGLE)}, + {"glGetnUniformfvEXT", P(GL_GetnUniformfvEXT)}, + {"glGetnUniformfvEXTContextANGLE", P(GL_GetnUniformfvEXTContextANGLE)}, + {"glGetnUniformfvRobustANGLE", P(GL_GetnUniformfvRobustANGLE)}, + {"glGetnUniformfvRobustANGLEContextANGLE", P(GL_GetnUniformfvRobustANGLEContextANGLE)}, + {"glGetnUniformiv", P(GL_GetnUniformiv)}, + {"glGetnUniformivContextANGLE", P(GL_GetnUniformivContextANGLE)}, + {"glGetnUniformivEXT", P(GL_GetnUniformivEXT)}, + {"glGetnUniformivEXTContextANGLE", P(GL_GetnUniformivEXTContextANGLE)}, + {"glGetnUniformivRobustANGLE", P(GL_GetnUniformivRobustANGLE)}, + {"glGetnUniformivRobustANGLEContextANGLE", P(GL_GetnUniformivRobustANGLEContextANGLE)}, + {"glGetnUniformuiv", P(GL_GetnUniformuiv)}, + {"glGetnUniformuivContextANGLE", P(GL_GetnUniformuivContextANGLE)}, + {"glGetnUniformuivRobustANGLE", P(GL_GetnUniformuivRobustANGLE)}, + {"glGetnUniformuivRobustANGLEContextANGLE", P(GL_GetnUniformuivRobustANGLEContextANGLE)}, + {"glHint", P(GL_Hint)}, + {"glHintContextANGLE", P(GL_HintContextANGLE)}, + {"glImportMemoryFdEXT", P(GL_ImportMemoryFdEXT)}, + {"glImportMemoryFdEXTContextANGLE", P(GL_ImportMemoryFdEXTContextANGLE)}, + {"glImportMemoryZirconHandleANGLE", P(GL_ImportMemoryZirconHandleANGLE)}, + {"glImportMemoryZirconHandleANGLEContextANGLE", + P(GL_ImportMemoryZirconHandleANGLEContextANGLE)}, + {"glImportSemaphoreFdEXT", P(GL_ImportSemaphoreFdEXT)}, + {"glImportSemaphoreFdEXTContextANGLE", P(GL_ImportSemaphoreFdEXTContextANGLE)}, + {"glImportSemaphoreZirconHandleANGLE", P(GL_ImportSemaphoreZirconHandleANGLE)}, + {"glImportSemaphoreZirconHandleANGLEContextANGLE", + P(GL_ImportSemaphoreZirconHandleANGLEContextANGLE)}, + {"glInsertEventMarkerEXT", P(GL_InsertEventMarkerEXT)}, + {"glInsertEventMarkerEXTContextANGLE", P(GL_InsertEventMarkerEXTContextANGLE)}, + {"glInvalidateFramebuffer", P(GL_InvalidateFramebuffer)}, + {"glInvalidateFramebufferContextANGLE", P(GL_InvalidateFramebufferContextANGLE)}, + {"glInvalidateSubFramebuffer", P(GL_InvalidateSubFramebuffer)}, + {"glInvalidateSubFramebufferContextANGLE", P(GL_InvalidateSubFramebufferContextANGLE)}, + {"glInvalidateTextureANGLE", P(GL_InvalidateTextureANGLE)}, + {"glInvalidateTextureANGLEContextANGLE", P(GL_InvalidateTextureANGLEContextANGLE)}, + {"glIsBuffer", P(GL_IsBuffer)}, + {"glIsBufferContextANGLE", P(GL_IsBufferContextANGLE)}, + {"glIsEnabled", P(GL_IsEnabled)}, + {"glIsEnabledContextANGLE", P(GL_IsEnabledContextANGLE)}, + {"glIsEnabledi", P(GL_IsEnabledi)}, + {"glIsEnablediContextANGLE", P(GL_IsEnablediContextANGLE)}, + {"glIsEnablediEXT", P(GL_IsEnablediEXT)}, + {"glIsEnablediEXTContextANGLE", P(GL_IsEnablediEXTContextANGLE)}, + {"glIsEnablediOES", P(GL_IsEnablediOES)}, + {"glIsEnablediOESContextANGLE", P(GL_IsEnablediOESContextANGLE)}, + {"glIsFenceNV", P(GL_IsFenceNV)}, + {"glIsFenceNVContextANGLE", P(GL_IsFenceNVContextANGLE)}, + {"glIsFramebuffer", P(GL_IsFramebuffer)}, + {"glIsFramebufferContextANGLE", P(GL_IsFramebufferContextANGLE)}, + {"glIsFramebufferOES", P(GL_IsFramebufferOES)}, + {"glIsFramebufferOESContextANGLE", P(GL_IsFramebufferOESContextANGLE)}, + {"glIsMemoryObjectEXT", P(GL_IsMemoryObjectEXT)}, + {"glIsMemoryObjectEXTContextANGLE", P(GL_IsMemoryObjectEXTContextANGLE)}, + {"glIsProgram", P(GL_IsProgram)}, + {"glIsProgramContextANGLE", P(GL_IsProgramContextANGLE)}, + {"glIsProgramPipeline", P(GL_IsProgramPipeline)}, + {"glIsProgramPipelineContextANGLE", P(GL_IsProgramPipelineContextANGLE)}, + {"glIsProgramPipelineEXT", P(GL_IsProgramPipelineEXT)}, + {"glIsProgramPipelineEXTContextANGLE", P(GL_IsProgramPipelineEXTContextANGLE)}, + {"glIsQuery", P(GL_IsQuery)}, + {"glIsQueryContextANGLE", P(GL_IsQueryContextANGLE)}, + {"glIsQueryEXT", P(GL_IsQueryEXT)}, + {"glIsQueryEXTContextANGLE", P(GL_IsQueryEXTContextANGLE)}, + {"glIsRenderbuffer", P(GL_IsRenderbuffer)}, + {"glIsRenderbufferContextANGLE", P(GL_IsRenderbufferContextANGLE)}, + {"glIsRenderbufferOES", P(GL_IsRenderbufferOES)}, + {"glIsRenderbufferOESContextANGLE", P(GL_IsRenderbufferOESContextANGLE)}, + {"glIsSampler", P(GL_IsSampler)}, + {"glIsSamplerContextANGLE", P(GL_IsSamplerContextANGLE)}, + {"glIsSemaphoreEXT", P(GL_IsSemaphoreEXT)}, + {"glIsSemaphoreEXTContextANGLE", P(GL_IsSemaphoreEXTContextANGLE)}, + {"glIsShader", P(GL_IsShader)}, + {"glIsShaderContextANGLE", P(GL_IsShaderContextANGLE)}, + {"glIsSync", P(GL_IsSync)}, + {"glIsSyncContextANGLE", P(GL_IsSyncContextANGLE)}, + {"glIsTexture", P(GL_IsTexture)}, + {"glIsTextureContextANGLE", P(GL_IsTextureContextANGLE)}, + {"glIsTransformFeedback", P(GL_IsTransformFeedback)}, + {"glIsTransformFeedbackContextANGLE", P(GL_IsTransformFeedbackContextANGLE)}, + {"glIsVertexArray", P(GL_IsVertexArray)}, + {"glIsVertexArrayContextANGLE", P(GL_IsVertexArrayContextANGLE)}, + {"glIsVertexArrayOES", P(GL_IsVertexArrayOES)}, + {"glIsVertexArrayOESContextANGLE", P(GL_IsVertexArrayOESContextANGLE)}, + {"glLabelObjectEXT", P(GL_LabelObjectEXT)}, + {"glLabelObjectEXTContextANGLE", P(GL_LabelObjectEXTContextANGLE)}, + {"glLightModelf", P(GL_LightModelf)}, + {"glLightModelfContextANGLE", P(GL_LightModelfContextANGLE)}, + {"glLightModelfv", P(GL_LightModelfv)}, + {"glLightModelfvContextANGLE", P(GL_LightModelfvContextANGLE)}, + {"glLightModelx", P(GL_LightModelx)}, + {"glLightModelxContextANGLE", P(GL_LightModelxContextANGLE)}, + {"glLightModelxv", P(GL_LightModelxv)}, + {"glLightModelxvContextANGLE", P(GL_LightModelxvContextANGLE)}, + {"glLightf", P(GL_Lightf)}, + {"glLightfContextANGLE", P(GL_LightfContextANGLE)}, + {"glLightfv", P(GL_Lightfv)}, + {"glLightfvContextANGLE", P(GL_LightfvContextANGLE)}, + {"glLightx", P(GL_Lightx)}, + {"glLightxContextANGLE", P(GL_LightxContextANGLE)}, + {"glLightxv", P(GL_Lightxv)}, + {"glLightxvContextANGLE", P(GL_LightxvContextANGLE)}, + {"glLineWidth", P(GL_LineWidth)}, + {"glLineWidthContextANGLE", P(GL_LineWidthContextANGLE)}, + {"glLineWidthx", P(GL_LineWidthx)}, + {"glLineWidthxContextANGLE", P(GL_LineWidthxContextANGLE)}, + {"glLinkProgram", P(GL_LinkProgram)}, + {"glLinkProgramContextANGLE", P(GL_LinkProgramContextANGLE)}, + {"glLoadIdentity", P(GL_LoadIdentity)}, + {"glLoadIdentityContextANGLE", P(GL_LoadIdentityContextANGLE)}, + {"glLoadMatrixf", P(GL_LoadMatrixf)}, + {"glLoadMatrixfContextANGLE", P(GL_LoadMatrixfContextANGLE)}, + {"glLoadMatrixx", P(GL_LoadMatrixx)}, + {"glLoadMatrixxContextANGLE", P(GL_LoadMatrixxContextANGLE)}, + {"glLoadPaletteFromModelViewMatrixOES", P(GL_LoadPaletteFromModelViewMatrixOES)}, + {"glLoadPaletteFromModelViewMatrixOESContextANGLE", + P(GL_LoadPaletteFromModelViewMatrixOESContextANGLE)}, + {"glLogicOp", P(GL_LogicOp)}, + {"glLogicOpContextANGLE", P(GL_LogicOpContextANGLE)}, + {"glLoseContextCHROMIUM", P(GL_LoseContextCHROMIUM)}, + {"glLoseContextCHROMIUMContextANGLE", P(GL_LoseContextCHROMIUMContextANGLE)}, + {"glMapBufferOES", P(GL_MapBufferOES)}, + {"glMapBufferOESContextANGLE", P(GL_MapBufferOESContextANGLE)}, + {"glMapBufferRange", P(GL_MapBufferRange)}, + {"glMapBufferRangeContextANGLE", P(GL_MapBufferRangeContextANGLE)}, + {"glMapBufferRangeEXT", P(GL_MapBufferRangeEXT)}, + {"glMapBufferRangeEXTContextANGLE", P(GL_MapBufferRangeEXTContextANGLE)}, + {"glMaterialf", P(GL_Materialf)}, + {"glMaterialfContextANGLE", P(GL_MaterialfContextANGLE)}, + {"glMaterialfv", P(GL_Materialfv)}, + {"glMaterialfvContextANGLE", P(GL_MaterialfvContextANGLE)}, + {"glMaterialx", P(GL_Materialx)}, + {"glMaterialxContextANGLE", P(GL_MaterialxContextANGLE)}, + {"glMaterialxv", P(GL_Materialxv)}, + {"glMaterialxvContextANGLE", P(GL_MaterialxvContextANGLE)}, + {"glMatrixIndexPointerOES", P(GL_MatrixIndexPointerOES)}, + {"glMatrixIndexPointerOESContextANGLE", P(GL_MatrixIndexPointerOESContextANGLE)}, + {"glMatrixMode", P(GL_MatrixMode)}, + {"glMatrixModeContextANGLE", P(GL_MatrixModeContextANGLE)}, + {"glMaxShaderCompilerThreadsKHR", P(GL_MaxShaderCompilerThreadsKHR)}, + {"glMaxShaderCompilerThreadsKHRContextANGLE", P(GL_MaxShaderCompilerThreadsKHRContextANGLE)}, + {"glMemoryBarrier", P(GL_MemoryBarrier)}, + {"glMemoryBarrierByRegion", P(GL_MemoryBarrierByRegion)}, + {"glMemoryBarrierByRegionContextANGLE", P(GL_MemoryBarrierByRegionContextANGLE)}, + {"glMemoryBarrierContextANGLE", P(GL_MemoryBarrierContextANGLE)}, + {"glMemoryObjectParameterivEXT", P(GL_MemoryObjectParameterivEXT)}, + {"glMemoryObjectParameterivEXTContextANGLE", P(GL_MemoryObjectParameterivEXTContextANGLE)}, + {"glMinSampleShading", P(GL_MinSampleShading)}, + {"glMinSampleShadingContextANGLE", P(GL_MinSampleShadingContextANGLE)}, + {"glMinSampleShadingOES", P(GL_MinSampleShadingOES)}, + {"glMinSampleShadingOESContextANGLE", P(GL_MinSampleShadingOESContextANGLE)}, + {"glMultMatrixf", P(GL_MultMatrixf)}, + {"glMultMatrixfContextANGLE", P(GL_MultMatrixfContextANGLE)}, + {"glMultMatrixx", P(GL_MultMatrixx)}, + {"glMultMatrixxContextANGLE", P(GL_MultMatrixxContextANGLE)}, + {"glMultiDrawArraysANGLE", P(GL_MultiDrawArraysANGLE)}, + {"glMultiDrawArraysANGLEContextANGLE", P(GL_MultiDrawArraysANGLEContextANGLE)}, + {"glMultiDrawArraysInstancedANGLE", P(GL_MultiDrawArraysInstancedANGLE)}, + {"glMultiDrawArraysInstancedANGLEContextANGLE", + P(GL_MultiDrawArraysInstancedANGLEContextANGLE)}, + {"glMultiDrawArraysInstancedBaseInstanceANGLE", + P(GL_MultiDrawArraysInstancedBaseInstanceANGLE)}, + {"glMultiDrawArraysInstancedBaseInstanceANGLEContextANGLE", + P(GL_MultiDrawArraysInstancedBaseInstanceANGLEContextANGLE)}, + {"glMultiDrawElementsANGLE", P(GL_MultiDrawElementsANGLE)}, + {"glMultiDrawElementsANGLEContextANGLE", P(GL_MultiDrawElementsANGLEContextANGLE)}, + {"glMultiDrawElementsBaseVertexEXT", P(GL_MultiDrawElementsBaseVertexEXT)}, + {"glMultiDrawElementsBaseVertexEXTContextANGLE", + P(GL_MultiDrawElementsBaseVertexEXTContextANGLE)}, + {"glMultiDrawElementsInstancedANGLE", P(GL_MultiDrawElementsInstancedANGLE)}, + {"glMultiDrawElementsInstancedANGLEContextANGLE", + P(GL_MultiDrawElementsInstancedANGLEContextANGLE)}, + {"glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE", + P(GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE)}, + {"glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE", + P(GL_MultiDrawElementsInstancedBaseVertexBaseInstanceANGLEContextANGLE)}, + {"glMultiTexCoord4f", P(GL_MultiTexCoord4f)}, + {"glMultiTexCoord4fContextANGLE", P(GL_MultiTexCoord4fContextANGLE)}, + {"glMultiTexCoord4x", P(GL_MultiTexCoord4x)}, + {"glMultiTexCoord4xContextANGLE", P(GL_MultiTexCoord4xContextANGLE)}, + {"glNamedBufferStorageExternalEXT", P(GL_NamedBufferStorageExternalEXT)}, + {"glNamedBufferStorageExternalEXTContextANGLE", + P(GL_NamedBufferStorageExternalEXTContextANGLE)}, + {"glNormal3f", P(GL_Normal3f)}, + {"glNormal3fContextANGLE", P(GL_Normal3fContextANGLE)}, + {"glNormal3x", P(GL_Normal3x)}, + {"glNormal3xContextANGLE", P(GL_Normal3xContextANGLE)}, + {"glNormalPointer", P(GL_NormalPointer)}, + {"glNormalPointerContextANGLE", P(GL_NormalPointerContextANGLE)}, + {"glObjectLabel", P(GL_ObjectLabel)}, + {"glObjectLabelContextANGLE", P(GL_ObjectLabelContextANGLE)}, + {"glObjectLabelKHR", P(GL_ObjectLabelKHR)}, + {"glObjectLabelKHRContextANGLE", P(GL_ObjectLabelKHRContextANGLE)}, + {"glObjectPtrLabel", P(GL_ObjectPtrLabel)}, + {"glObjectPtrLabelContextANGLE", P(GL_ObjectPtrLabelContextANGLE)}, + {"glObjectPtrLabelKHR", P(GL_ObjectPtrLabelKHR)}, + {"glObjectPtrLabelKHRContextANGLE", P(GL_ObjectPtrLabelKHRContextANGLE)}, + {"glOrthof", P(GL_Orthof)}, + {"glOrthofContextANGLE", P(GL_OrthofContextANGLE)}, + {"glOrthox", P(GL_Orthox)}, + {"glOrthoxContextANGLE", P(GL_OrthoxContextANGLE)}, + {"glPatchParameteri", P(GL_PatchParameteri)}, + {"glPatchParameteriContextANGLE", P(GL_PatchParameteriContextANGLE)}, + {"glPatchParameteriEXT", P(GL_PatchParameteriEXT)}, + {"glPatchParameteriEXTContextANGLE", P(GL_PatchParameteriEXTContextANGLE)}, + {"glPauseTransformFeedback", P(GL_PauseTransformFeedback)}, + {"glPauseTransformFeedbackContextANGLE", P(GL_PauseTransformFeedbackContextANGLE)}, + {"glPixelStorei", P(GL_PixelStorei)}, + {"glPixelStoreiContextANGLE", P(GL_PixelStoreiContextANGLE)}, + {"glPointParameterf", P(GL_PointParameterf)}, + {"glPointParameterfContextANGLE", P(GL_PointParameterfContextANGLE)}, + {"glPointParameterfv", P(GL_PointParameterfv)}, + {"glPointParameterfvContextANGLE", P(GL_PointParameterfvContextANGLE)}, + {"glPointParameterx", P(GL_PointParameterx)}, + {"glPointParameterxContextANGLE", P(GL_PointParameterxContextANGLE)}, + {"glPointParameterxv", P(GL_PointParameterxv)}, + {"glPointParameterxvContextANGLE", P(GL_PointParameterxvContextANGLE)}, + {"glPointSize", P(GL_PointSize)}, + {"glPointSizeContextANGLE", P(GL_PointSizeContextANGLE)}, + {"glPointSizePointerOES", P(GL_PointSizePointerOES)}, + {"glPointSizePointerOESContextANGLE", P(GL_PointSizePointerOESContextANGLE)}, + {"glPointSizex", P(GL_PointSizex)}, + {"glPointSizexContextANGLE", P(GL_PointSizexContextANGLE)}, + {"glPolygonOffset", P(GL_PolygonOffset)}, + {"glPolygonOffsetContextANGLE", P(GL_PolygonOffsetContextANGLE)}, + {"glPolygonOffsetx", P(GL_PolygonOffsetx)}, + {"glPolygonOffsetxContextANGLE", P(GL_PolygonOffsetxContextANGLE)}, + {"glPopDebugGroup", P(GL_PopDebugGroup)}, + {"glPopDebugGroupContextANGLE", P(GL_PopDebugGroupContextANGLE)}, + {"glPopDebugGroupKHR", P(GL_PopDebugGroupKHR)}, + {"glPopDebugGroupKHRContextANGLE", P(GL_PopDebugGroupKHRContextANGLE)}, + {"glPopGroupMarkerEXT", P(GL_PopGroupMarkerEXT)}, + {"glPopGroupMarkerEXTContextANGLE", P(GL_PopGroupMarkerEXTContextANGLE)}, + {"glPopMatrix", P(GL_PopMatrix)}, + {"glPopMatrixContextANGLE", P(GL_PopMatrixContextANGLE)}, + {"glPrimitiveBoundingBox", P(GL_PrimitiveBoundingBox)}, + {"glPrimitiveBoundingBoxContextANGLE", P(GL_PrimitiveBoundingBoxContextANGLE)}, + {"glPrimitiveBoundingBoxEXT", P(GL_PrimitiveBoundingBoxEXT)}, + {"glPrimitiveBoundingBoxEXTContextANGLE", P(GL_PrimitiveBoundingBoxEXTContextANGLE)}, + {"glProgramBinary", P(GL_ProgramBinary)}, + {"glProgramBinaryContextANGLE", P(GL_ProgramBinaryContextANGLE)}, + {"glProgramBinaryOES", P(GL_ProgramBinaryOES)}, + {"glProgramBinaryOESContextANGLE", P(GL_ProgramBinaryOESContextANGLE)}, + {"glProgramParameteri", P(GL_ProgramParameteri)}, + {"glProgramParameteriContextANGLE", P(GL_ProgramParameteriContextANGLE)}, + {"glProgramParameteriEXT", P(GL_ProgramParameteriEXT)}, + {"glProgramParameteriEXTContextANGLE", P(GL_ProgramParameteriEXTContextANGLE)}, + {"glProgramUniform1f", P(GL_ProgramUniform1f)}, + {"glProgramUniform1fContextANGLE", P(GL_ProgramUniform1fContextANGLE)}, + {"glProgramUniform1fEXT", P(GL_ProgramUniform1fEXT)}, + {"glProgramUniform1fEXTContextANGLE", P(GL_ProgramUniform1fEXTContextANGLE)}, + {"glProgramUniform1fv", P(GL_ProgramUniform1fv)}, + {"glProgramUniform1fvContextANGLE", P(GL_ProgramUniform1fvContextANGLE)}, + {"glProgramUniform1fvEXT", P(GL_ProgramUniform1fvEXT)}, + {"glProgramUniform1fvEXTContextANGLE", P(GL_ProgramUniform1fvEXTContextANGLE)}, + {"glProgramUniform1i", P(GL_ProgramUniform1i)}, + {"glProgramUniform1iContextANGLE", P(GL_ProgramUniform1iContextANGLE)}, + {"glProgramUniform1iEXT", P(GL_ProgramUniform1iEXT)}, + {"glProgramUniform1iEXTContextANGLE", P(GL_ProgramUniform1iEXTContextANGLE)}, + {"glProgramUniform1iv", P(GL_ProgramUniform1iv)}, + {"glProgramUniform1ivContextANGLE", P(GL_ProgramUniform1ivContextANGLE)}, + {"glProgramUniform1ivEXT", P(GL_ProgramUniform1ivEXT)}, + {"glProgramUniform1ivEXTContextANGLE", P(GL_ProgramUniform1ivEXTContextANGLE)}, + {"glProgramUniform1ui", P(GL_ProgramUniform1ui)}, + {"glProgramUniform1uiContextANGLE", P(GL_ProgramUniform1uiContextANGLE)}, + {"glProgramUniform1uiEXT", P(GL_ProgramUniform1uiEXT)}, + {"glProgramUniform1uiEXTContextANGLE", P(GL_ProgramUniform1uiEXTContextANGLE)}, + {"glProgramUniform1uiv", P(GL_ProgramUniform1uiv)}, + {"glProgramUniform1uivContextANGLE", P(GL_ProgramUniform1uivContextANGLE)}, + {"glProgramUniform1uivEXT", P(GL_ProgramUniform1uivEXT)}, + {"glProgramUniform1uivEXTContextANGLE", P(GL_ProgramUniform1uivEXTContextANGLE)}, + {"glProgramUniform2f", P(GL_ProgramUniform2f)}, + {"glProgramUniform2fContextANGLE", P(GL_ProgramUniform2fContextANGLE)}, + {"glProgramUniform2fEXT", P(GL_ProgramUniform2fEXT)}, + {"glProgramUniform2fEXTContextANGLE", P(GL_ProgramUniform2fEXTContextANGLE)}, + {"glProgramUniform2fv", P(GL_ProgramUniform2fv)}, + {"glProgramUniform2fvContextANGLE", P(GL_ProgramUniform2fvContextANGLE)}, + {"glProgramUniform2fvEXT", P(GL_ProgramUniform2fvEXT)}, + {"glProgramUniform2fvEXTContextANGLE", P(GL_ProgramUniform2fvEXTContextANGLE)}, + {"glProgramUniform2i", P(GL_ProgramUniform2i)}, + {"glProgramUniform2iContextANGLE", P(GL_ProgramUniform2iContextANGLE)}, + {"glProgramUniform2iEXT", P(GL_ProgramUniform2iEXT)}, + {"glProgramUniform2iEXTContextANGLE", P(GL_ProgramUniform2iEXTContextANGLE)}, + {"glProgramUniform2iv", P(GL_ProgramUniform2iv)}, + {"glProgramUniform2ivContextANGLE", P(GL_ProgramUniform2ivContextANGLE)}, + {"glProgramUniform2ivEXT", P(GL_ProgramUniform2ivEXT)}, + {"glProgramUniform2ivEXTContextANGLE", P(GL_ProgramUniform2ivEXTContextANGLE)}, + {"glProgramUniform2ui", P(GL_ProgramUniform2ui)}, + {"glProgramUniform2uiContextANGLE", P(GL_ProgramUniform2uiContextANGLE)}, + {"glProgramUniform2uiEXT", P(GL_ProgramUniform2uiEXT)}, + {"glProgramUniform2uiEXTContextANGLE", P(GL_ProgramUniform2uiEXTContextANGLE)}, + {"glProgramUniform2uiv", P(GL_ProgramUniform2uiv)}, + {"glProgramUniform2uivContextANGLE", P(GL_ProgramUniform2uivContextANGLE)}, + {"glProgramUniform2uivEXT", P(GL_ProgramUniform2uivEXT)}, + {"glProgramUniform2uivEXTContextANGLE", P(GL_ProgramUniform2uivEXTContextANGLE)}, + {"glProgramUniform3f", P(GL_ProgramUniform3f)}, + {"glProgramUniform3fContextANGLE", P(GL_ProgramUniform3fContextANGLE)}, + {"glProgramUniform3fEXT", P(GL_ProgramUniform3fEXT)}, + {"glProgramUniform3fEXTContextANGLE", P(GL_ProgramUniform3fEXTContextANGLE)}, + {"glProgramUniform3fv", P(GL_ProgramUniform3fv)}, + {"glProgramUniform3fvContextANGLE", P(GL_ProgramUniform3fvContextANGLE)}, + {"glProgramUniform3fvEXT", P(GL_ProgramUniform3fvEXT)}, + {"glProgramUniform3fvEXTContextANGLE", P(GL_ProgramUniform3fvEXTContextANGLE)}, + {"glProgramUniform3i", P(GL_ProgramUniform3i)}, + {"glProgramUniform3iContextANGLE", P(GL_ProgramUniform3iContextANGLE)}, + {"glProgramUniform3iEXT", P(GL_ProgramUniform3iEXT)}, + {"glProgramUniform3iEXTContextANGLE", P(GL_ProgramUniform3iEXTContextANGLE)}, + {"glProgramUniform3iv", P(GL_ProgramUniform3iv)}, + {"glProgramUniform3ivContextANGLE", P(GL_ProgramUniform3ivContextANGLE)}, + {"glProgramUniform3ivEXT", P(GL_ProgramUniform3ivEXT)}, + {"glProgramUniform3ivEXTContextANGLE", P(GL_ProgramUniform3ivEXTContextANGLE)}, + {"glProgramUniform3ui", P(GL_ProgramUniform3ui)}, + {"glProgramUniform3uiContextANGLE", P(GL_ProgramUniform3uiContextANGLE)}, + {"glProgramUniform3uiEXT", P(GL_ProgramUniform3uiEXT)}, + {"glProgramUniform3uiEXTContextANGLE", P(GL_ProgramUniform3uiEXTContextANGLE)}, + {"glProgramUniform3uiv", P(GL_ProgramUniform3uiv)}, + {"glProgramUniform3uivContextANGLE", P(GL_ProgramUniform3uivContextANGLE)}, + {"glProgramUniform3uivEXT", P(GL_ProgramUniform3uivEXT)}, + {"glProgramUniform3uivEXTContextANGLE", P(GL_ProgramUniform3uivEXTContextANGLE)}, + {"glProgramUniform4f", P(GL_ProgramUniform4f)}, + {"glProgramUniform4fContextANGLE", P(GL_ProgramUniform4fContextANGLE)}, + {"glProgramUniform4fEXT", P(GL_ProgramUniform4fEXT)}, + {"glProgramUniform4fEXTContextANGLE", P(GL_ProgramUniform4fEXTContextANGLE)}, + {"glProgramUniform4fv", P(GL_ProgramUniform4fv)}, + {"glProgramUniform4fvContextANGLE", P(GL_ProgramUniform4fvContextANGLE)}, + {"glProgramUniform4fvEXT", P(GL_ProgramUniform4fvEXT)}, + {"glProgramUniform4fvEXTContextANGLE", P(GL_ProgramUniform4fvEXTContextANGLE)}, + {"glProgramUniform4i", P(GL_ProgramUniform4i)}, + {"glProgramUniform4iContextANGLE", P(GL_ProgramUniform4iContextANGLE)}, + {"glProgramUniform4iEXT", P(GL_ProgramUniform4iEXT)}, + {"glProgramUniform4iEXTContextANGLE", P(GL_ProgramUniform4iEXTContextANGLE)}, + {"glProgramUniform4iv", P(GL_ProgramUniform4iv)}, + {"glProgramUniform4ivContextANGLE", P(GL_ProgramUniform4ivContextANGLE)}, + {"glProgramUniform4ivEXT", P(GL_ProgramUniform4ivEXT)}, + {"glProgramUniform4ivEXTContextANGLE", P(GL_ProgramUniform4ivEXTContextANGLE)}, + {"glProgramUniform4ui", P(GL_ProgramUniform4ui)}, + {"glProgramUniform4uiContextANGLE", P(GL_ProgramUniform4uiContextANGLE)}, + {"glProgramUniform4uiEXT", P(GL_ProgramUniform4uiEXT)}, + {"glProgramUniform4uiEXTContextANGLE", P(GL_ProgramUniform4uiEXTContextANGLE)}, + {"glProgramUniform4uiv", P(GL_ProgramUniform4uiv)}, + {"glProgramUniform4uivContextANGLE", P(GL_ProgramUniform4uivContextANGLE)}, + {"glProgramUniform4uivEXT", P(GL_ProgramUniform4uivEXT)}, + {"glProgramUniform4uivEXTContextANGLE", P(GL_ProgramUniform4uivEXTContextANGLE)}, + {"glProgramUniformMatrix2fv", P(GL_ProgramUniformMatrix2fv)}, + {"glProgramUniformMatrix2fvContextANGLE", P(GL_ProgramUniformMatrix2fvContextANGLE)}, + {"glProgramUniformMatrix2fvEXT", P(GL_ProgramUniformMatrix2fvEXT)}, + {"glProgramUniformMatrix2fvEXTContextANGLE", P(GL_ProgramUniformMatrix2fvEXTContextANGLE)}, + {"glProgramUniformMatrix2x3fv", P(GL_ProgramUniformMatrix2x3fv)}, + {"glProgramUniformMatrix2x3fvContextANGLE", P(GL_ProgramUniformMatrix2x3fvContextANGLE)}, + {"glProgramUniformMatrix2x3fvEXT", P(GL_ProgramUniformMatrix2x3fvEXT)}, + {"glProgramUniformMatrix2x3fvEXTContextANGLE", P(GL_ProgramUniformMatrix2x3fvEXTContextANGLE)}, + {"glProgramUniformMatrix2x4fv", P(GL_ProgramUniformMatrix2x4fv)}, + {"glProgramUniformMatrix2x4fvContextANGLE", P(GL_ProgramUniformMatrix2x4fvContextANGLE)}, + {"glProgramUniformMatrix2x4fvEXT", P(GL_ProgramUniformMatrix2x4fvEXT)}, + {"glProgramUniformMatrix2x4fvEXTContextANGLE", P(GL_ProgramUniformMatrix2x4fvEXTContextANGLE)}, + {"glProgramUniformMatrix3fv", P(GL_ProgramUniformMatrix3fv)}, + {"glProgramUniformMatrix3fvContextANGLE", P(GL_ProgramUniformMatrix3fvContextANGLE)}, + {"glProgramUniformMatrix3fvEXT", P(GL_ProgramUniformMatrix3fvEXT)}, + {"glProgramUniformMatrix3fvEXTContextANGLE", P(GL_ProgramUniformMatrix3fvEXTContextANGLE)}, + {"glProgramUniformMatrix3x2fv", P(GL_ProgramUniformMatrix3x2fv)}, + {"glProgramUniformMatrix3x2fvContextANGLE", P(GL_ProgramUniformMatrix3x2fvContextANGLE)}, + {"glProgramUniformMatrix3x2fvEXT", P(GL_ProgramUniformMatrix3x2fvEXT)}, + {"glProgramUniformMatrix3x2fvEXTContextANGLE", P(GL_ProgramUniformMatrix3x2fvEXTContextANGLE)}, + {"glProgramUniformMatrix3x4fv", P(GL_ProgramUniformMatrix3x4fv)}, + {"glProgramUniformMatrix3x4fvContextANGLE", P(GL_ProgramUniformMatrix3x4fvContextANGLE)}, + {"glProgramUniformMatrix3x4fvEXT", P(GL_ProgramUniformMatrix3x4fvEXT)}, + {"glProgramUniformMatrix3x4fvEXTContextANGLE", P(GL_ProgramUniformMatrix3x4fvEXTContextANGLE)}, + {"glProgramUniformMatrix4fv", P(GL_ProgramUniformMatrix4fv)}, + {"glProgramUniformMatrix4fvContextANGLE", P(GL_ProgramUniformMatrix4fvContextANGLE)}, + {"glProgramUniformMatrix4fvEXT", P(GL_ProgramUniformMatrix4fvEXT)}, + {"glProgramUniformMatrix4fvEXTContextANGLE", P(GL_ProgramUniformMatrix4fvEXTContextANGLE)}, + {"glProgramUniformMatrix4x2fv", P(GL_ProgramUniformMatrix4x2fv)}, + {"glProgramUniformMatrix4x2fvContextANGLE", P(GL_ProgramUniformMatrix4x2fvContextANGLE)}, + {"glProgramUniformMatrix4x2fvEXT", P(GL_ProgramUniformMatrix4x2fvEXT)}, + {"glProgramUniformMatrix4x2fvEXTContextANGLE", P(GL_ProgramUniformMatrix4x2fvEXTContextANGLE)}, + {"glProgramUniformMatrix4x3fv", P(GL_ProgramUniformMatrix4x3fv)}, + {"glProgramUniformMatrix4x3fvContextANGLE", P(GL_ProgramUniformMatrix4x3fvContextANGLE)}, + {"glProgramUniformMatrix4x3fvEXT", P(GL_ProgramUniformMatrix4x3fvEXT)}, + {"glProgramUniformMatrix4x3fvEXTContextANGLE", P(GL_ProgramUniformMatrix4x3fvEXTContextANGLE)}, + {"glProvokingVertexANGLE", P(GL_ProvokingVertexANGLE)}, + {"glProvokingVertexANGLEContextANGLE", P(GL_ProvokingVertexANGLEContextANGLE)}, + {"glPushDebugGroup", P(GL_PushDebugGroup)}, + {"glPushDebugGroupContextANGLE", P(GL_PushDebugGroupContextANGLE)}, + {"glPushDebugGroupKHR", P(GL_PushDebugGroupKHR)}, + {"glPushDebugGroupKHRContextANGLE", P(GL_PushDebugGroupKHRContextANGLE)}, + {"glPushGroupMarkerEXT", P(GL_PushGroupMarkerEXT)}, + {"glPushGroupMarkerEXTContextANGLE", P(GL_PushGroupMarkerEXTContextANGLE)}, + {"glPushMatrix", P(GL_PushMatrix)}, + {"glPushMatrixContextANGLE", P(GL_PushMatrixContextANGLE)}, + {"glQueryCounterEXT", P(GL_QueryCounterEXT)}, + {"glQueryCounterEXTContextANGLE", P(GL_QueryCounterEXTContextANGLE)}, + {"glQueryMatrixxOES", P(GL_QueryMatrixxOES)}, + {"glQueryMatrixxOESContextANGLE", P(GL_QueryMatrixxOESContextANGLE)}, + {"glReadBuffer", P(GL_ReadBuffer)}, + {"glReadBufferContextANGLE", P(GL_ReadBufferContextANGLE)}, + {"glReadPixels", P(GL_ReadPixels)}, + {"glReadPixelsContextANGLE", P(GL_ReadPixelsContextANGLE)}, + {"glReadPixelsRobustANGLE", P(GL_ReadPixelsRobustANGLE)}, + {"glReadPixelsRobustANGLEContextANGLE", P(GL_ReadPixelsRobustANGLEContextANGLE)}, + {"glReadnPixels", P(GL_ReadnPixels)}, + {"glReadnPixelsContextANGLE", P(GL_ReadnPixelsContextANGLE)}, + {"glReadnPixelsEXT", P(GL_ReadnPixelsEXT)}, + {"glReadnPixelsEXTContextANGLE", P(GL_ReadnPixelsEXTContextANGLE)}, + {"glReadnPixelsRobustANGLE", P(GL_ReadnPixelsRobustANGLE)}, + {"glReadnPixelsRobustANGLEContextANGLE", P(GL_ReadnPixelsRobustANGLEContextANGLE)}, + {"glReleaseShaderCompiler", P(GL_ReleaseShaderCompiler)}, + {"glReleaseShaderCompilerContextANGLE", P(GL_ReleaseShaderCompilerContextANGLE)}, + {"glRenderbufferStorage", P(GL_RenderbufferStorage)}, + {"glRenderbufferStorageContextANGLE", P(GL_RenderbufferStorageContextANGLE)}, + {"glRenderbufferStorageMultisample", P(GL_RenderbufferStorageMultisample)}, + {"glRenderbufferStorageMultisampleANGLE", P(GL_RenderbufferStorageMultisampleANGLE)}, + {"glRenderbufferStorageMultisampleANGLEContextANGLE", + P(GL_RenderbufferStorageMultisampleANGLEContextANGLE)}, + {"glRenderbufferStorageMultisampleContextANGLE", + P(GL_RenderbufferStorageMultisampleContextANGLE)}, + {"glRenderbufferStorageMultisampleEXT", P(GL_RenderbufferStorageMultisampleEXT)}, + {"glRenderbufferStorageMultisampleEXTContextANGLE", + P(GL_RenderbufferStorageMultisampleEXTContextANGLE)}, + {"glRenderbufferStorageOES", P(GL_RenderbufferStorageOES)}, + {"glRenderbufferStorageOESContextANGLE", P(GL_RenderbufferStorageOESContextANGLE)}, + {"glRequestExtensionANGLE", P(GL_RequestExtensionANGLE)}, + {"glRequestExtensionANGLEContextANGLE", P(GL_RequestExtensionANGLEContextANGLE)}, + {"glResumeTransformFeedback", P(GL_ResumeTransformFeedback)}, + {"glResumeTransformFeedbackContextANGLE", P(GL_ResumeTransformFeedbackContextANGLE)}, + {"glRotatef", P(GL_Rotatef)}, + {"glRotatefContextANGLE", P(GL_RotatefContextANGLE)}, + {"glRotatex", P(GL_Rotatex)}, + {"glRotatexContextANGLE", P(GL_RotatexContextANGLE)}, + {"glSampleCoverage", P(GL_SampleCoverage)}, + {"glSampleCoverageContextANGLE", P(GL_SampleCoverageContextANGLE)}, + {"glSampleCoveragex", P(GL_SampleCoveragex)}, + {"glSampleCoveragexContextANGLE", P(GL_SampleCoveragexContextANGLE)}, + {"glSampleMaski", P(GL_SampleMaski)}, + {"glSampleMaskiANGLE", P(GL_SampleMaskiANGLE)}, + {"glSampleMaskiANGLEContextANGLE", P(GL_SampleMaskiANGLEContextANGLE)}, + {"glSampleMaskiContextANGLE", P(GL_SampleMaskiContextANGLE)}, + {"glSamplerParameterIiv", P(GL_SamplerParameterIiv)}, + {"glSamplerParameterIivContextANGLE", P(GL_SamplerParameterIivContextANGLE)}, + {"glSamplerParameterIivEXT", P(GL_SamplerParameterIivEXT)}, + {"glSamplerParameterIivEXTContextANGLE", P(GL_SamplerParameterIivEXTContextANGLE)}, + {"glSamplerParameterIivOES", P(GL_SamplerParameterIivOES)}, + {"glSamplerParameterIivOESContextANGLE", P(GL_SamplerParameterIivOESContextANGLE)}, + {"glSamplerParameterIivRobustANGLE", P(GL_SamplerParameterIivRobustANGLE)}, + {"glSamplerParameterIivRobustANGLEContextANGLE", + P(GL_SamplerParameterIivRobustANGLEContextANGLE)}, + {"glSamplerParameterIuiv", P(GL_SamplerParameterIuiv)}, + {"glSamplerParameterIuivContextANGLE", P(GL_SamplerParameterIuivContextANGLE)}, + {"glSamplerParameterIuivEXT", P(GL_SamplerParameterIuivEXT)}, + {"glSamplerParameterIuivEXTContextANGLE", P(GL_SamplerParameterIuivEXTContextANGLE)}, + {"glSamplerParameterIuivOES", P(GL_SamplerParameterIuivOES)}, + {"glSamplerParameterIuivOESContextANGLE", P(GL_SamplerParameterIuivOESContextANGLE)}, + {"glSamplerParameterIuivRobustANGLE", P(GL_SamplerParameterIuivRobustANGLE)}, + {"glSamplerParameterIuivRobustANGLEContextANGLE", + P(GL_SamplerParameterIuivRobustANGLEContextANGLE)}, + {"glSamplerParameterf", P(GL_SamplerParameterf)}, + {"glSamplerParameterfContextANGLE", P(GL_SamplerParameterfContextANGLE)}, + {"glSamplerParameterfv", P(GL_SamplerParameterfv)}, + {"glSamplerParameterfvContextANGLE", P(GL_SamplerParameterfvContextANGLE)}, + {"glSamplerParameterfvRobustANGLE", P(GL_SamplerParameterfvRobustANGLE)}, + {"glSamplerParameterfvRobustANGLEContextANGLE", + P(GL_SamplerParameterfvRobustANGLEContextANGLE)}, + {"glSamplerParameteri", P(GL_SamplerParameteri)}, + {"glSamplerParameteriContextANGLE", P(GL_SamplerParameteriContextANGLE)}, + {"glSamplerParameteriv", P(GL_SamplerParameteriv)}, + {"glSamplerParameterivContextANGLE", P(GL_SamplerParameterivContextANGLE)}, + {"glSamplerParameterivRobustANGLE", P(GL_SamplerParameterivRobustANGLE)}, + {"glSamplerParameterivRobustANGLEContextANGLE", + P(GL_SamplerParameterivRobustANGLEContextANGLE)}, + {"glScalef", P(GL_Scalef)}, + {"glScalefContextANGLE", P(GL_ScalefContextANGLE)}, + {"glScalex", P(GL_Scalex)}, + {"glScalexContextANGLE", P(GL_ScalexContextANGLE)}, + {"glScissor", P(GL_Scissor)}, + {"glScissorContextANGLE", P(GL_ScissorContextANGLE)}, + {"glSemaphoreParameterui64vEXT", P(GL_SemaphoreParameterui64vEXT)}, + {"glSemaphoreParameterui64vEXTContextANGLE", P(GL_SemaphoreParameterui64vEXTContextANGLE)}, + {"glSetFenceNV", P(GL_SetFenceNV)}, + {"glSetFenceNVContextANGLE", P(GL_SetFenceNVContextANGLE)}, + {"glShadeModel", P(GL_ShadeModel)}, + {"glShadeModelContextANGLE", P(GL_ShadeModelContextANGLE)}, + {"glShaderBinary", P(GL_ShaderBinary)}, + {"glShaderBinaryContextANGLE", P(GL_ShaderBinaryContextANGLE)}, + {"glShaderSource", P(GL_ShaderSource)}, + {"glShaderSourceContextANGLE", P(GL_ShaderSourceContextANGLE)}, + {"glSignalSemaphoreEXT", P(GL_SignalSemaphoreEXT)}, + {"glSignalSemaphoreEXTContextANGLE", P(GL_SignalSemaphoreEXTContextANGLE)}, + {"glStencilFunc", P(GL_StencilFunc)}, + {"glStencilFuncContextANGLE", P(GL_StencilFuncContextANGLE)}, + {"glStencilFuncSeparate", P(GL_StencilFuncSeparate)}, + {"glStencilFuncSeparateContextANGLE", P(GL_StencilFuncSeparateContextANGLE)}, + {"glStencilMask", P(GL_StencilMask)}, + {"glStencilMaskContextANGLE", P(GL_StencilMaskContextANGLE)}, + {"glStencilMaskSeparate", P(GL_StencilMaskSeparate)}, + {"glStencilMaskSeparateContextANGLE", P(GL_StencilMaskSeparateContextANGLE)}, + {"glStencilOp", P(GL_StencilOp)}, + {"glStencilOpContextANGLE", P(GL_StencilOpContextANGLE)}, + {"glStencilOpSeparate", P(GL_StencilOpSeparate)}, + {"glStencilOpSeparateContextANGLE", P(GL_StencilOpSeparateContextANGLE)}, + {"glTestFenceNV", P(GL_TestFenceNV)}, + {"glTestFenceNVContextANGLE", P(GL_TestFenceNVContextANGLE)}, + {"glTexBuffer", P(GL_TexBuffer)}, + {"glTexBufferContextANGLE", P(GL_TexBufferContextANGLE)}, + {"glTexBufferEXT", P(GL_TexBufferEXT)}, + {"glTexBufferEXTContextANGLE", P(GL_TexBufferEXTContextANGLE)}, + {"glTexBufferOES", P(GL_TexBufferOES)}, + {"glTexBufferOESContextANGLE", P(GL_TexBufferOESContextANGLE)}, + {"glTexBufferRange", P(GL_TexBufferRange)}, + {"glTexBufferRangeContextANGLE", P(GL_TexBufferRangeContextANGLE)}, + {"glTexBufferRangeEXT", P(GL_TexBufferRangeEXT)}, + {"glTexBufferRangeEXTContextANGLE", P(GL_TexBufferRangeEXTContextANGLE)}, + {"glTexBufferRangeOES", P(GL_TexBufferRangeOES)}, + {"glTexBufferRangeOESContextANGLE", P(GL_TexBufferRangeOESContextANGLE)}, + {"glTexCoordPointer", P(GL_TexCoordPointer)}, + {"glTexCoordPointerContextANGLE", P(GL_TexCoordPointerContextANGLE)}, + {"glTexEnvf", P(GL_TexEnvf)}, + {"glTexEnvfContextANGLE", P(GL_TexEnvfContextANGLE)}, + {"glTexEnvfv", P(GL_TexEnvfv)}, + {"glTexEnvfvContextANGLE", P(GL_TexEnvfvContextANGLE)}, + {"glTexEnvi", P(GL_TexEnvi)}, + {"glTexEnviContextANGLE", P(GL_TexEnviContextANGLE)}, + {"glTexEnviv", P(GL_TexEnviv)}, + {"glTexEnvivContextANGLE", P(GL_TexEnvivContextANGLE)}, + {"glTexEnvx", P(GL_TexEnvx)}, + {"glTexEnvxContextANGLE", P(GL_TexEnvxContextANGLE)}, + {"glTexEnvxv", P(GL_TexEnvxv)}, + {"glTexEnvxvContextANGLE", P(GL_TexEnvxvContextANGLE)}, + {"glTexGenfOES", P(GL_TexGenfOES)}, + {"glTexGenfOESContextANGLE", P(GL_TexGenfOESContextANGLE)}, + {"glTexGenfvOES", P(GL_TexGenfvOES)}, + {"glTexGenfvOESContextANGLE", P(GL_TexGenfvOESContextANGLE)}, + {"glTexGeniOES", P(GL_TexGeniOES)}, + {"glTexGeniOESContextANGLE", P(GL_TexGeniOESContextANGLE)}, + {"glTexGenivOES", P(GL_TexGenivOES)}, + {"glTexGenivOESContextANGLE", P(GL_TexGenivOESContextANGLE)}, + {"glTexGenxOES", P(GL_TexGenxOES)}, + {"glTexGenxOESContextANGLE", P(GL_TexGenxOESContextANGLE)}, + {"glTexGenxvOES", P(GL_TexGenxvOES)}, + {"glTexGenxvOESContextANGLE", P(GL_TexGenxvOESContextANGLE)}, + {"glTexImage2D", P(GL_TexImage2D)}, + {"glTexImage2DContextANGLE", P(GL_TexImage2DContextANGLE)}, + {"glTexImage2DExternalANGLE", P(GL_TexImage2DExternalANGLE)}, + {"glTexImage2DExternalANGLEContextANGLE", P(GL_TexImage2DExternalANGLEContextANGLE)}, + {"glTexImage2DRobustANGLE", P(GL_TexImage2DRobustANGLE)}, + {"glTexImage2DRobustANGLEContextANGLE", P(GL_TexImage2DRobustANGLEContextANGLE)}, + {"glTexImage3D", P(GL_TexImage3D)}, + {"glTexImage3DContextANGLE", P(GL_TexImage3DContextANGLE)}, + {"glTexImage3DOES", P(GL_TexImage3DOES)}, + {"glTexImage3DOESContextANGLE", P(GL_TexImage3DOESContextANGLE)}, + {"glTexImage3DRobustANGLE", P(GL_TexImage3DRobustANGLE)}, + {"glTexImage3DRobustANGLEContextANGLE", P(GL_TexImage3DRobustANGLEContextANGLE)}, + {"glTexParameterIiv", P(GL_TexParameterIiv)}, + {"glTexParameterIivContextANGLE", P(GL_TexParameterIivContextANGLE)}, + {"glTexParameterIivEXT", P(GL_TexParameterIivEXT)}, + {"glTexParameterIivEXTContextANGLE", P(GL_TexParameterIivEXTContextANGLE)}, + {"glTexParameterIivOES", P(GL_TexParameterIivOES)}, + {"glTexParameterIivOESContextANGLE", P(GL_TexParameterIivOESContextANGLE)}, + {"glTexParameterIivRobustANGLE", P(GL_TexParameterIivRobustANGLE)}, + {"glTexParameterIivRobustANGLEContextANGLE", P(GL_TexParameterIivRobustANGLEContextANGLE)}, + {"glTexParameterIuiv", P(GL_TexParameterIuiv)}, + {"glTexParameterIuivContextANGLE", P(GL_TexParameterIuivContextANGLE)}, + {"glTexParameterIuivEXT", P(GL_TexParameterIuivEXT)}, + {"glTexParameterIuivEXTContextANGLE", P(GL_TexParameterIuivEXTContextANGLE)}, + {"glTexParameterIuivOES", P(GL_TexParameterIuivOES)}, + {"glTexParameterIuivOESContextANGLE", P(GL_TexParameterIuivOESContextANGLE)}, + {"glTexParameterIuivRobustANGLE", P(GL_TexParameterIuivRobustANGLE)}, + {"glTexParameterIuivRobustANGLEContextANGLE", P(GL_TexParameterIuivRobustANGLEContextANGLE)}, + {"glTexParameterf", P(GL_TexParameterf)}, + {"glTexParameterfContextANGLE", P(GL_TexParameterfContextANGLE)}, + {"glTexParameterfv", P(GL_TexParameterfv)}, + {"glTexParameterfvContextANGLE", P(GL_TexParameterfvContextANGLE)}, + {"glTexParameterfvRobustANGLE", P(GL_TexParameterfvRobustANGLE)}, + {"glTexParameterfvRobustANGLEContextANGLE", P(GL_TexParameterfvRobustANGLEContextANGLE)}, + {"glTexParameteri", P(GL_TexParameteri)}, + {"glTexParameteriContextANGLE", P(GL_TexParameteriContextANGLE)}, + {"glTexParameteriv", P(GL_TexParameteriv)}, + {"glTexParameterivContextANGLE", P(GL_TexParameterivContextANGLE)}, + {"glTexParameterivRobustANGLE", P(GL_TexParameterivRobustANGLE)}, + {"glTexParameterivRobustANGLEContextANGLE", P(GL_TexParameterivRobustANGLEContextANGLE)}, + {"glTexParameterx", P(GL_TexParameterx)}, + {"glTexParameterxContextANGLE", P(GL_TexParameterxContextANGLE)}, + {"glTexParameterxv", P(GL_TexParameterxv)}, + {"glTexParameterxvContextANGLE", P(GL_TexParameterxvContextANGLE)}, + {"glTexStorage1DEXT", P(GL_TexStorage1DEXT)}, + {"glTexStorage1DEXTContextANGLE", P(GL_TexStorage1DEXTContextANGLE)}, + {"glTexStorage2D", P(GL_TexStorage2D)}, + {"glTexStorage2DContextANGLE", P(GL_TexStorage2DContextANGLE)}, + {"glTexStorage2DEXT", P(GL_TexStorage2DEXT)}, + {"glTexStorage2DEXTContextANGLE", P(GL_TexStorage2DEXTContextANGLE)}, + {"glTexStorage2DMultisample", P(GL_TexStorage2DMultisample)}, + {"glTexStorage2DMultisampleANGLE", P(GL_TexStorage2DMultisampleANGLE)}, + {"glTexStorage2DMultisampleANGLEContextANGLE", P(GL_TexStorage2DMultisampleANGLEContextANGLE)}, + {"glTexStorage2DMultisampleContextANGLE", P(GL_TexStorage2DMultisampleContextANGLE)}, + {"glTexStorage3D", P(GL_TexStorage3D)}, + {"glTexStorage3DContextANGLE", P(GL_TexStorage3DContextANGLE)}, + {"glTexStorage3DEXT", P(GL_TexStorage3DEXT)}, + {"glTexStorage3DEXTContextANGLE", P(GL_TexStorage3DEXTContextANGLE)}, + {"glTexStorage3DMultisample", P(GL_TexStorage3DMultisample)}, + {"glTexStorage3DMultisampleContextANGLE", P(GL_TexStorage3DMultisampleContextANGLE)}, + {"glTexStorage3DMultisampleOES", P(GL_TexStorage3DMultisampleOES)}, + {"glTexStorage3DMultisampleOESContextANGLE", P(GL_TexStorage3DMultisampleOESContextANGLE)}, + {"glTexStorageMem2DEXT", P(GL_TexStorageMem2DEXT)}, + {"glTexStorageMem2DEXTContextANGLE", P(GL_TexStorageMem2DEXTContextANGLE)}, + {"glTexStorageMem2DMultisampleEXT", P(GL_TexStorageMem2DMultisampleEXT)}, + {"glTexStorageMem2DMultisampleEXTContextANGLE", + P(GL_TexStorageMem2DMultisampleEXTContextANGLE)}, + {"glTexStorageMem3DEXT", P(GL_TexStorageMem3DEXT)}, + {"glTexStorageMem3DEXTContextANGLE", P(GL_TexStorageMem3DEXTContextANGLE)}, + {"glTexStorageMem3DMultisampleEXT", P(GL_TexStorageMem3DMultisampleEXT)}, + {"glTexStorageMem3DMultisampleEXTContextANGLE", + P(GL_TexStorageMem3DMultisampleEXTContextANGLE)}, + {"glTexStorageMemFlags2DANGLE", P(GL_TexStorageMemFlags2DANGLE)}, + {"glTexStorageMemFlags2DANGLEContextANGLE", P(GL_TexStorageMemFlags2DANGLEContextANGLE)}, + {"glTexStorageMemFlags2DMultisampleANGLE", P(GL_TexStorageMemFlags2DMultisampleANGLE)}, + {"glTexStorageMemFlags2DMultisampleANGLEContextANGLE", + P(GL_TexStorageMemFlags2DMultisampleANGLEContextANGLE)}, + {"glTexStorageMemFlags3DANGLE", P(GL_TexStorageMemFlags3DANGLE)}, + {"glTexStorageMemFlags3DANGLEContextANGLE", P(GL_TexStorageMemFlags3DANGLEContextANGLE)}, + {"glTexStorageMemFlags3DMultisampleANGLE", P(GL_TexStorageMemFlags3DMultisampleANGLE)}, + {"glTexStorageMemFlags3DMultisampleANGLEContextANGLE", + P(GL_TexStorageMemFlags3DMultisampleANGLEContextANGLE)}, + {"glTexSubImage2D", P(GL_TexSubImage2D)}, + {"glTexSubImage2DContextANGLE", P(GL_TexSubImage2DContextANGLE)}, + {"glTexSubImage2DRobustANGLE", P(GL_TexSubImage2DRobustANGLE)}, + {"glTexSubImage2DRobustANGLEContextANGLE", P(GL_TexSubImage2DRobustANGLEContextANGLE)}, + {"glTexSubImage3D", P(GL_TexSubImage3D)}, + {"glTexSubImage3DContextANGLE", P(GL_TexSubImage3DContextANGLE)}, + {"glTexSubImage3DOES", P(GL_TexSubImage3DOES)}, + {"glTexSubImage3DOESContextANGLE", P(GL_TexSubImage3DOESContextANGLE)}, + {"glTexSubImage3DRobustANGLE", P(GL_TexSubImage3DRobustANGLE)}, + {"glTexSubImage3DRobustANGLEContextANGLE", P(GL_TexSubImage3DRobustANGLEContextANGLE)}, + {"glTransformFeedbackVaryings", P(GL_TransformFeedbackVaryings)}, + {"glTransformFeedbackVaryingsContextANGLE", P(GL_TransformFeedbackVaryingsContextANGLE)}, + {"glTranslatef", P(GL_Translatef)}, + {"glTranslatefContextANGLE", P(GL_TranslatefContextANGLE)}, + {"glTranslatex", P(GL_Translatex)}, + {"glTranslatexContextANGLE", P(GL_TranslatexContextANGLE)}, + {"glUniform1f", P(GL_Uniform1f)}, + {"glUniform1fContextANGLE", P(GL_Uniform1fContextANGLE)}, + {"glUniform1fv", P(GL_Uniform1fv)}, + {"glUniform1fvContextANGLE", P(GL_Uniform1fvContextANGLE)}, + {"glUniform1i", P(GL_Uniform1i)}, + {"glUniform1iContextANGLE", P(GL_Uniform1iContextANGLE)}, + {"glUniform1iv", P(GL_Uniform1iv)}, + {"glUniform1ivContextANGLE", P(GL_Uniform1ivContextANGLE)}, + {"glUniform1ui", P(GL_Uniform1ui)}, + {"glUniform1uiContextANGLE", P(GL_Uniform1uiContextANGLE)}, + {"glUniform1uiv", P(GL_Uniform1uiv)}, + {"glUniform1uivContextANGLE", P(GL_Uniform1uivContextANGLE)}, + {"glUniform2f", P(GL_Uniform2f)}, + {"glUniform2fContextANGLE", P(GL_Uniform2fContextANGLE)}, + {"glUniform2fv", P(GL_Uniform2fv)}, + {"glUniform2fvContextANGLE", P(GL_Uniform2fvContextANGLE)}, + {"glUniform2i", P(GL_Uniform2i)}, + {"glUniform2iContextANGLE", P(GL_Uniform2iContextANGLE)}, + {"glUniform2iv", P(GL_Uniform2iv)}, + {"glUniform2ivContextANGLE", P(GL_Uniform2ivContextANGLE)}, + {"glUniform2ui", P(GL_Uniform2ui)}, + {"glUniform2uiContextANGLE", P(GL_Uniform2uiContextANGLE)}, + {"glUniform2uiv", P(GL_Uniform2uiv)}, + {"glUniform2uivContextANGLE", P(GL_Uniform2uivContextANGLE)}, + {"glUniform3f", P(GL_Uniform3f)}, + {"glUniform3fContextANGLE", P(GL_Uniform3fContextANGLE)}, + {"glUniform3fv", P(GL_Uniform3fv)}, + {"glUniform3fvContextANGLE", P(GL_Uniform3fvContextANGLE)}, + {"glUniform3i", P(GL_Uniform3i)}, + {"glUniform3iContextANGLE", P(GL_Uniform3iContextANGLE)}, + {"glUniform3iv", P(GL_Uniform3iv)}, + {"glUniform3ivContextANGLE", P(GL_Uniform3ivContextANGLE)}, + {"glUniform3ui", P(GL_Uniform3ui)}, + {"glUniform3uiContextANGLE", P(GL_Uniform3uiContextANGLE)}, + {"glUniform3uiv", P(GL_Uniform3uiv)}, + {"glUniform3uivContextANGLE", P(GL_Uniform3uivContextANGLE)}, + {"glUniform4f", P(GL_Uniform4f)}, + {"glUniform4fContextANGLE", P(GL_Uniform4fContextANGLE)}, + {"glUniform4fv", P(GL_Uniform4fv)}, + {"glUniform4fvContextANGLE", P(GL_Uniform4fvContextANGLE)}, + {"glUniform4i", P(GL_Uniform4i)}, + {"glUniform4iContextANGLE", P(GL_Uniform4iContextANGLE)}, + {"glUniform4iv", P(GL_Uniform4iv)}, + {"glUniform4ivContextANGLE", P(GL_Uniform4ivContextANGLE)}, + {"glUniform4ui", P(GL_Uniform4ui)}, + {"glUniform4uiContextANGLE", P(GL_Uniform4uiContextANGLE)}, + {"glUniform4uiv", P(GL_Uniform4uiv)}, + {"glUniform4uivContextANGLE", P(GL_Uniform4uivContextANGLE)}, + {"glUniformBlockBinding", P(GL_UniformBlockBinding)}, + {"glUniformBlockBindingContextANGLE", P(GL_UniformBlockBindingContextANGLE)}, + {"glUniformMatrix2fv", P(GL_UniformMatrix2fv)}, + {"glUniformMatrix2fvContextANGLE", P(GL_UniformMatrix2fvContextANGLE)}, + {"glUniformMatrix2x3fv", P(GL_UniformMatrix2x3fv)}, + {"glUniformMatrix2x3fvContextANGLE", P(GL_UniformMatrix2x3fvContextANGLE)}, + {"glUniformMatrix2x4fv", P(GL_UniformMatrix2x4fv)}, + {"glUniformMatrix2x4fvContextANGLE", P(GL_UniformMatrix2x4fvContextANGLE)}, + {"glUniformMatrix3fv", P(GL_UniformMatrix3fv)}, + {"glUniformMatrix3fvContextANGLE", P(GL_UniformMatrix3fvContextANGLE)}, + {"glUniformMatrix3x2fv", P(GL_UniformMatrix3x2fv)}, + {"glUniformMatrix3x2fvContextANGLE", P(GL_UniformMatrix3x2fvContextANGLE)}, + {"glUniformMatrix3x4fv", P(GL_UniformMatrix3x4fv)}, + {"glUniformMatrix3x4fvContextANGLE", P(GL_UniformMatrix3x4fvContextANGLE)}, + {"glUniformMatrix4fv", P(GL_UniformMatrix4fv)}, + {"glUniformMatrix4fvContextANGLE", P(GL_UniformMatrix4fvContextANGLE)}, + {"glUniformMatrix4x2fv", P(GL_UniformMatrix4x2fv)}, + {"glUniformMatrix4x2fvContextANGLE", P(GL_UniformMatrix4x2fvContextANGLE)}, + {"glUniformMatrix4x3fv", P(GL_UniformMatrix4x3fv)}, + {"glUniformMatrix4x3fvContextANGLE", P(GL_UniformMatrix4x3fvContextANGLE)}, + {"glUnmapBuffer", P(GL_UnmapBuffer)}, + {"glUnmapBufferContextANGLE", P(GL_UnmapBufferContextANGLE)}, + {"glUnmapBufferOES", P(GL_UnmapBufferOES)}, + {"glUnmapBufferOESContextANGLE", P(GL_UnmapBufferOESContextANGLE)}, + {"glUseProgram", P(GL_UseProgram)}, + {"glUseProgramContextANGLE", P(GL_UseProgramContextANGLE)}, + {"glUseProgramStages", P(GL_UseProgramStages)}, + {"glUseProgramStagesContextANGLE", P(GL_UseProgramStagesContextANGLE)}, + {"glUseProgramStagesEXT", P(GL_UseProgramStagesEXT)}, + {"glUseProgramStagesEXTContextANGLE", P(GL_UseProgramStagesEXTContextANGLE)}, + {"glValidateProgram", P(GL_ValidateProgram)}, + {"glValidateProgramContextANGLE", P(GL_ValidateProgramContextANGLE)}, + {"glValidateProgramPipeline", P(GL_ValidateProgramPipeline)}, + {"glValidateProgramPipelineContextANGLE", P(GL_ValidateProgramPipelineContextANGLE)}, + {"glValidateProgramPipelineEXT", P(GL_ValidateProgramPipelineEXT)}, + {"glValidateProgramPipelineEXTContextANGLE", P(GL_ValidateProgramPipelineEXTContextANGLE)}, + {"glVertexAttrib1f", P(GL_VertexAttrib1f)}, + {"glVertexAttrib1fContextANGLE", P(GL_VertexAttrib1fContextANGLE)}, + {"glVertexAttrib1fv", P(GL_VertexAttrib1fv)}, + {"glVertexAttrib1fvContextANGLE", P(GL_VertexAttrib1fvContextANGLE)}, + {"glVertexAttrib2f", P(GL_VertexAttrib2f)}, + {"glVertexAttrib2fContextANGLE", P(GL_VertexAttrib2fContextANGLE)}, + {"glVertexAttrib2fv", P(GL_VertexAttrib2fv)}, + {"glVertexAttrib2fvContextANGLE", P(GL_VertexAttrib2fvContextANGLE)}, + {"glVertexAttrib3f", P(GL_VertexAttrib3f)}, + {"glVertexAttrib3fContextANGLE", P(GL_VertexAttrib3fContextANGLE)}, + {"glVertexAttrib3fv", P(GL_VertexAttrib3fv)}, + {"glVertexAttrib3fvContextANGLE", P(GL_VertexAttrib3fvContextANGLE)}, + {"glVertexAttrib4f", P(GL_VertexAttrib4f)}, + {"glVertexAttrib4fContextANGLE", P(GL_VertexAttrib4fContextANGLE)}, + {"glVertexAttrib4fv", P(GL_VertexAttrib4fv)}, + {"glVertexAttrib4fvContextANGLE", P(GL_VertexAttrib4fvContextANGLE)}, + {"glVertexAttribBinding", P(GL_VertexAttribBinding)}, + {"glVertexAttribBindingContextANGLE", P(GL_VertexAttribBindingContextANGLE)}, + {"glVertexAttribDivisor", P(GL_VertexAttribDivisor)}, + {"glVertexAttribDivisorANGLE", P(GL_VertexAttribDivisorANGLE)}, + {"glVertexAttribDivisorANGLEContextANGLE", P(GL_VertexAttribDivisorANGLEContextANGLE)}, + {"glVertexAttribDivisorContextANGLE", P(GL_VertexAttribDivisorContextANGLE)}, + {"glVertexAttribDivisorEXT", P(GL_VertexAttribDivisorEXT)}, + {"glVertexAttribDivisorEXTContextANGLE", P(GL_VertexAttribDivisorEXTContextANGLE)}, + {"glVertexAttribFormat", P(GL_VertexAttribFormat)}, + {"glVertexAttribFormatContextANGLE", P(GL_VertexAttribFormatContextANGLE)}, + {"glVertexAttribI4i", P(GL_VertexAttribI4i)}, + {"glVertexAttribI4iContextANGLE", P(GL_VertexAttribI4iContextANGLE)}, + {"glVertexAttribI4iv", P(GL_VertexAttribI4iv)}, + {"glVertexAttribI4ivContextANGLE", P(GL_VertexAttribI4ivContextANGLE)}, + {"glVertexAttribI4ui", P(GL_VertexAttribI4ui)}, + {"glVertexAttribI4uiContextANGLE", P(GL_VertexAttribI4uiContextANGLE)}, + {"glVertexAttribI4uiv", P(GL_VertexAttribI4uiv)}, + {"glVertexAttribI4uivContextANGLE", P(GL_VertexAttribI4uivContextANGLE)}, + {"glVertexAttribIFormat", P(GL_VertexAttribIFormat)}, + {"glVertexAttribIFormatContextANGLE", P(GL_VertexAttribIFormatContextANGLE)}, + {"glVertexAttribIPointer", P(GL_VertexAttribIPointer)}, + {"glVertexAttribIPointerContextANGLE", P(GL_VertexAttribIPointerContextANGLE)}, + {"glVertexAttribPointer", P(GL_VertexAttribPointer)}, + {"glVertexAttribPointerContextANGLE", P(GL_VertexAttribPointerContextANGLE)}, + {"glVertexBindingDivisor", P(GL_VertexBindingDivisor)}, + {"glVertexBindingDivisorContextANGLE", P(GL_VertexBindingDivisorContextANGLE)}, + {"glVertexPointer", P(GL_VertexPointer)}, + {"glVertexPointerContextANGLE", P(GL_VertexPointerContextANGLE)}, + {"glViewport", P(GL_Viewport)}, + {"glViewportContextANGLE", P(GL_ViewportContextANGLE)}, + {"glWaitSemaphoreEXT", P(GL_WaitSemaphoreEXT)}, + {"glWaitSemaphoreEXTContextANGLE", P(GL_WaitSemaphoreEXTContextANGLE)}, + {"glWaitSync", P(GL_WaitSync)}, + {"glWaitSyncContextANGLE", P(GL_WaitSyncContextANGLE)}, + {"glWeightPointerOES", P(GL_WeightPointerOES)}, + {"glWeightPointerOESContextANGLE", P(GL_WeightPointerOESContextANGLE)}}; + +const size_t g_numProcs = 1663; +} // namespace egl diff --git a/gfx/angle/checkout/src/libGLESv2/resource.h b/gfx/angle/checkout/src/libGLESv2/resource.h new file mode 100644 index 0000000000..025777671d --- /dev/null +++ b/gfx/angle/checkout/src/libGLESv2/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by libGLESv2.rc + +#define IDD_DIALOG1 101 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +# ifndef APSTUDIO_READONLY_SYMBOLS +# define _APS_NEXT_RESOURCE_VALUE 101 +# define _APS_NEXT_COMMAND_VALUE 40001 +# define _APS_NEXT_CONTROL_VALUE 1001 +# define _APS_NEXT_SYMED_VALUE 101 +# endif +#endif |