Edit

kc3-lang/angle/src/libGLESv2/entry_points_gles_1_0_autogen.cpp

Branch :

  • Show log

    Commit

  • Author : Tobin Ehlis
    Date : 2019-08-13 14:13:35
    Hash : a2ec1344
    Message : Add shared mutex to frontend Add shared mutex to frontend API entrypoints that is only enabled when ANGLE is being used with a shared context. Bug: angleproject:2464 Change-Id: I0d918e37d9579dccd013dc88f563bed7de7ee55f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1685712 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>

  • src/libGLESv2/entry_points_gles_1_0_autogen.cpp
  • // GENERATED FILE - DO NOT EDIT.
    // Generated by generate_entry_points.py using data from gl.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.
    //
    // entry_points_gles_1_0_autogen.cpp:
    //   Defines the GLES 1.0 entry points.
    
    #include "libGLESv2/entry_points_gles_1_0_autogen.h"
    
    #include "libANGLE/Context.h"
    #include "libANGLE/Context.inl.h"
    #include "libANGLE/capture_gles_1_0_autogen.h"
    #include "libANGLE/entry_points_utils.h"
    #include "libANGLE/gl_enum_utils_autogen.h"
    #include "libANGLE/validationES1.h"
    #include "libGLESv2/global_state.h"
    
    namespace gl
    {
    void GL_APIENTRY AlphaFunc(GLenum func, GLfloat ref)
    {
        EVENT("(GLenum func = %s, GLfloat ref = %f)", GLenumToString(GLenumGroup::AlphaFunction, func),
              ref);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            AlphaTestFunc funcPacked                      = FromGL<AlphaTestFunc>(func);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateAlphaFunc(context, funcPacked, ref));
            if (isCallValid)
            {
                context->alphaFunc(funcPacked, ref);
            }
            ANGLE_CAPTURE(AlphaFunc, isCallValid, context, funcPacked, ref);
        }
    }
    
    void GL_APIENTRY AlphaFuncx(GLenum func, GLfixed ref)
    {
        EVENT("(GLenum func = %s, GLfixed ref = 0x%X)",
              GLenumToString(GLenumGroup::AlphaFunction, func), ref);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            AlphaTestFunc funcPacked                      = FromGL<AlphaTestFunc>(func);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateAlphaFuncx(context, funcPacked, ref));
            if (isCallValid)
            {
                context->alphaFuncx(funcPacked, ref);
            }
            ANGLE_CAPTURE(AlphaFuncx, isCallValid, context, funcPacked, ref);
        }
    }
    
    void GL_APIENTRY ClearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
    {
        EVENT("(GLfixed red = 0x%X, GLfixed green = 0x%X, GLfixed blue = 0x%X, GLfixed alpha = 0x%X)",
              red, green, blue, alpha);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY ClearDepthx(GLfixed depth)
    {
        EVENT("(GLfixed depth = 0x%X)", depth);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateClearDepthx(context, depth));
            if (isCallValid)
            {
                context->clearDepthx(depth);
            }
            ANGLE_CAPTURE(ClearDepthx, isCallValid, context, depth);
        }
    }
    
    void GL_APIENTRY ClientActiveTexture(GLenum texture)
    {
        EVENT("(GLenum texture = %s)", GLenumToString(GLenumGroup::TextureUnit, texture));
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateClientActiveTexture(context, texture));
            if (isCallValid)
            {
                context->clientActiveTexture(texture);
            }
            ANGLE_CAPTURE(ClientActiveTexture, isCallValid, context, texture);
        }
    }
    
    void GL_APIENTRY ClipPlanef(GLenum p, const GLfloat *eqn)
    {
        EVENT("(GLenum p = %s, const GLfloat *eqn = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::ClipPlaneName, p), (uintptr_t)eqn);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateClipPlanef(context, p, eqn));
            if (isCallValid)
            {
                context->clipPlanef(p, eqn);
            }
            ANGLE_CAPTURE(ClipPlanef, isCallValid, context, p, eqn);
        }
    }
    
    void GL_APIENTRY ClipPlanex(GLenum plane, const GLfixed *equation)
    {
        EVENT("(GLenum plane = %s, const GLfixed *equation = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateClipPlanex(context, plane, equation));
            if (isCallValid)
            {
                context->clipPlanex(plane, equation);
            }
            ANGLE_CAPTURE(ClipPlanex, isCallValid, context, plane, equation);
        }
    }
    
    void GL_APIENTRY Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
    {
        EVENT("(GLfloat red = %f, GLfloat green = %f, GLfloat blue = %f, GLfloat alpha = %f)", red,
              green, blue, alpha);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
    {
        EVENT("(GLubyte red = %d, GLubyte green = %d, GLubyte blue = %d, GLubyte alpha = %d)", red,
              green, blue, alpha);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
    {
        EVENT("(GLfixed red = 0x%X, GLfixed green = 0x%X, GLfixed blue = 0x%X, GLfixed alpha = 0x%X)",
              red, green, blue, alpha);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY ColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
    {
        EVENT(
            "(GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = "
            "0x%016" PRIxPTR ")",
            size, GLenumToString(GLenumGroup::ColorPointerType, type), stride, (uintptr_t)pointer);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            VertexAttribType typePacked                   = FromGL<VertexAttribType>(type);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY DepthRangex(GLfixed n, GLfixed f)
    {
        EVENT("(GLfixed n = 0x%X, GLfixed f = 0x%X)", n, f);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateDepthRangex(context, n, f));
            if (isCallValid)
            {
                context->depthRangex(n, f);
            }
            ANGLE_CAPTURE(DepthRangex, isCallValid, context, n, f);
        }
    }
    
    void GL_APIENTRY DisableClientState(GLenum array)
    {
        EVENT("(GLenum array = %s)", GLenumToString(GLenumGroup::EnableCap, array));
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            ClientVertexArrayType arrayPacked             = FromGL<ClientVertexArrayType>(array);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateDisableClientState(context, arrayPacked));
            if (isCallValid)
            {
                context->disableClientState(arrayPacked);
            }
            ANGLE_CAPTURE(DisableClientState, isCallValid, context, arrayPacked);
        }
    }
    
    void GL_APIENTRY EnableClientState(GLenum array)
    {
        EVENT("(GLenum array = %s)", GLenumToString(GLenumGroup::EnableCap, array));
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            ClientVertexArrayType arrayPacked             = FromGL<ClientVertexArrayType>(array);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateEnableClientState(context, arrayPacked));
            if (isCallValid)
            {
                context->enableClientState(arrayPacked);
            }
            ANGLE_CAPTURE(EnableClientState, isCallValid, context, arrayPacked);
        }
    }
    
    void GL_APIENTRY Fogf(GLenum pname, GLfloat param)
    {
        EVENT("(GLenum pname = %s, GLfloat param = %f)",
              GLenumToString(GLenumGroup::FogParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateFogf(context, pname, param));
            if (isCallValid)
            {
                context->fogf(pname, param);
            }
            ANGLE_CAPTURE(Fogf, isCallValid, context, pname, param);
        }
    }
    
    void GL_APIENTRY Fogfv(GLenum pname, const GLfloat *params)
    {
        EVENT("(GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::FogParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateFogfv(context, pname, params));
            if (isCallValid)
            {
                context->fogfv(pname, params);
            }
            ANGLE_CAPTURE(Fogfv, isCallValid, context, pname, params);
        }
    }
    
    void GL_APIENTRY Fogx(GLenum pname, GLfixed param)
    {
        EVENT("(GLenum pname = %s, GLfixed param = 0x%X)", GLenumToString(GLenumGroup::FogPName, pname),
              param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateFogx(context, pname, param));
            if (isCallValid)
            {
                context->fogx(pname, param);
            }
            ANGLE_CAPTURE(Fogx, isCallValid, context, pname, param);
        }
    }
    
    void GL_APIENTRY Fogxv(GLenum pname, const GLfixed *param)
    {
        EVENT("(GLenum pname = %s, const GLfixed *param = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::FogPName, pname), (uintptr_t)param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateFogxv(context, pname, param));
            if (isCallValid)
            {
                context->fogxv(pname, param);
            }
            ANGLE_CAPTURE(Fogxv, isCallValid, context, pname, param);
        }
    }
    
    void GL_APIENTRY Frustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
    {
        EVENT(
            "(GLfloat l = %f, GLfloat r = %f, GLfloat b = %f, GLfloat t = %f, GLfloat n = %f, GLfloat "
            "f = %f)",
            l, r, b, t, n, f);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Frustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
    {
        EVENT(
            "(GLfixed l = 0x%X, GLfixed r = 0x%X, GLfixed b = 0x%X, GLfixed t = 0x%X, GLfixed n = "
            "0x%X, GLfixed f = 0x%X)",
            l, r, b, t, n, f);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetClipPlanef(GLenum plane, GLfloat *equation)
    {
        EVENT("(GLenum plane = %s, GLfloat *equation = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateGetClipPlanef(context, plane, equation));
            if (isCallValid)
            {
                context->getClipPlanef(plane, equation);
            }
            ANGLE_CAPTURE(GetClipPlanef, isCallValid, context, plane, equation);
        }
    }
    
    void GL_APIENTRY GetClipPlanex(GLenum plane, GLfixed *equation)
    {
        EVENT("(GLenum plane = %s, GLfixed *equation = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateGetClipPlanex(context, plane, equation));
            if (isCallValid)
            {
                context->getClipPlanex(plane, equation);
            }
            ANGLE_CAPTURE(GetClipPlanex, isCallValid, context, plane, equation);
        }
    }
    
    void GL_APIENTRY GetFixedv(GLenum pname, GLfixed *params)
    {
        EVENT("(GLenum pname = %s, GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateGetFixedv(context, pname, params));
            if (isCallValid)
            {
                context->getFixedv(pname, params);
            }
            ANGLE_CAPTURE(GetFixedv, isCallValid, context, pname, params);
        }
    }
    
    void GL_APIENTRY GetLightfv(GLenum light, GLenum pname, GLfloat *params)
    {
        EVENT("(GLenum light = %s, GLenum pname = %s, GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::LightName, light),
              GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            LightParameter pnamePacked                    = FromGL<LightParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetLightxv(GLenum light, GLenum pname, GLfixed *params)
    {
        EVENT("(GLenum light = %s, GLenum pname = %s, GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::LightName, light),
              GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            LightParameter pnamePacked                    = FromGL<LightParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
    {
        EVENT("(GLenum face = %s, GLenum pname = %s, GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::MaterialFace, face),
              GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            MaterialParameter pnamePacked                 = FromGL<MaterialParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetMaterialxv(GLenum face, GLenum pname, GLfixed *params)
    {
        EVENT("(GLenum face = %s, GLenum pname = %s, GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::MaterialFace, face),
              GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            MaterialParameter pnamePacked                 = FromGL<MaterialParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetPointerv(GLenum pname, void **params)
    {
        EVENT("(GLenum pname = %s, void **params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::GetPointervPName, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateGetPointerv(context, pname, params));
            if (isCallValid)
            {
                context->getPointerv(pname, params);
            }
            ANGLE_CAPTURE(GetPointerv, isCallValid, context, pname, params);
        }
    }
    
    void GL_APIENTRY GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetTexEnviv(GLenum target, GLenum pname, GLint *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetTexEnvxv(GLenum target, GLenum pname, GLfixed *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY GetTexParameterxv(GLenum target, GLenum pname, GLfixed *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureTarget, target),
              GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureType targetPacked                      = FromGL<TextureType>(target);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY LightModelf(GLenum pname, GLfloat param)
    {
        EVENT("(GLenum pname = %s, GLfloat param = %f)",
              GLenumToString(GLenumGroup::LightModelParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateLightModelf(context, pname, param));
            if (isCallValid)
            {
                context->lightModelf(pname, param);
            }
            ANGLE_CAPTURE(LightModelf, isCallValid, context, pname, param);
        }
    }
    
    void GL_APIENTRY LightModelfv(GLenum pname, const GLfloat *params)
    {
        EVENT("(GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateLightModelfv(context, pname, params));
            if (isCallValid)
            {
                context->lightModelfv(pname, params);
            }
            ANGLE_CAPTURE(LightModelfv, isCallValid, context, pname, params);
        }
    }
    
    void GL_APIENTRY LightModelx(GLenum pname, GLfixed param)
    {
        EVENT("(GLenum pname = %s, GLfixed param = 0x%X)",
              GLenumToString(GLenumGroup::LightModelParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateLightModelx(context, pname, param));
            if (isCallValid)
            {
                context->lightModelx(pname, param);
            }
            ANGLE_CAPTURE(LightModelx, isCallValid, context, pname, param);
        }
    }
    
    void GL_APIENTRY LightModelxv(GLenum pname, const GLfixed *param)
    {
        EVENT("(GLenum pname = %s, const GLfixed *param = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateLightModelxv(context, pname, param));
            if (isCallValid)
            {
                context->lightModelxv(pname, param);
            }
            ANGLE_CAPTURE(LightModelxv, isCallValid, context, pname, param);
        }
    }
    
    void GL_APIENTRY Lightf(GLenum light, GLenum pname, GLfloat param)
    {
        EVENT("(GLenum light = %s, GLenum pname = %s, GLfloat param = %f)",
              GLenumToString(GLenumGroup::LightName, light),
              GLenumToString(GLenumGroup::LightParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            LightParameter pnamePacked                    = FromGL<LightParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Lightfv(GLenum light, GLenum pname, const GLfloat *params)
    {
        EVENT("(GLenum light = %s, GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::LightName, light),
              GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            LightParameter pnamePacked                    = FromGL<LightParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Lightx(GLenum light, GLenum pname, GLfixed param)
    {
        EVENT("(GLenum light = %s, GLenum pname = %s, GLfixed param = 0x%X)",
              GLenumToString(GLenumGroup::LightName, light),
              GLenumToString(GLenumGroup::LightParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            LightParameter pnamePacked                    = FromGL<LightParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Lightxv(GLenum light, GLenum pname, const GLfixed *params)
    {
        EVENT("(GLenum light = %s, GLenum pname = %s, const GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::LightName, light),
              GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            LightParameter pnamePacked                    = FromGL<LightParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY LineWidthx(GLfixed width)
    {
        EVENT("(GLfixed width = 0x%X)", width);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateLineWidthx(context, width));
            if (isCallValid)
            {
                context->lineWidthx(width);
            }
            ANGLE_CAPTURE(LineWidthx, isCallValid, context, width);
        }
    }
    
    void GL_APIENTRY LoadIdentity()
    {
        EVENT("()");
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateLoadIdentity(context));
            if (isCallValid)
            {
                context->loadIdentity();
            }
            ANGLE_CAPTURE(LoadIdentity, isCallValid, context);
        }
    }
    
    void GL_APIENTRY LoadMatrixf(const GLfloat *m)
    {
        EVENT("(const GLfloat *m = 0x%016" PRIxPTR ")", (uintptr_t)m);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateLoadMatrixf(context, m));
            if (isCallValid)
            {
                context->loadMatrixf(m);
            }
            ANGLE_CAPTURE(LoadMatrixf, isCallValid, context, m);
        }
    }
    
    void GL_APIENTRY LoadMatrixx(const GLfixed *m)
    {
        EVENT("(const GLfixed *m = 0x%016" PRIxPTR ")", (uintptr_t)m);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateLoadMatrixx(context, m));
            if (isCallValid)
            {
                context->loadMatrixx(m);
            }
            ANGLE_CAPTURE(LoadMatrixx, isCallValid, context, m);
        }
    }
    
    void GL_APIENTRY LogicOp(GLenum opcode)
    {
        EVENT("(GLenum opcode = %s)", GLenumToString(GLenumGroup::LogicOp, opcode));
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            LogicalOperation opcodePacked                 = FromGL<LogicalOperation>(opcode);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateLogicOp(context, opcodePacked));
            if (isCallValid)
            {
                context->logicOp(opcodePacked);
            }
            ANGLE_CAPTURE(LogicOp, isCallValid, context, opcodePacked);
        }
    }
    
    void GL_APIENTRY Materialf(GLenum face, GLenum pname, GLfloat param)
    {
        EVENT("(GLenum face = %s, GLenum pname = %s, GLfloat param = %f)",
              GLenumToString(GLenumGroup::MaterialFace, face),
              GLenumToString(GLenumGroup::MaterialParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            MaterialParameter pnamePacked                 = FromGL<MaterialParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Materialfv(GLenum face, GLenum pname, const GLfloat *params)
    {
        EVENT("(GLenum face = %s, GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::MaterialFace, face),
              GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            MaterialParameter pnamePacked                 = FromGL<MaterialParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Materialx(GLenum face, GLenum pname, GLfixed param)
    {
        EVENT("(GLenum face = %s, GLenum pname = %s, GLfixed param = 0x%X)",
              GLenumToString(GLenumGroup::MaterialFace, face),
              GLenumToString(GLenumGroup::MaterialParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            MaterialParameter pnamePacked                 = FromGL<MaterialParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Materialxv(GLenum face, GLenum pname, const GLfixed *param)
    {
        EVENT("(GLenum face = %s, GLenum pname = %s, const GLfixed *param = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::MaterialFace, face),
              GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            MaterialParameter pnamePacked                 = FromGL<MaterialParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY MatrixMode(GLenum mode)
    {
        EVENT("(GLenum mode = %s)", GLenumToString(GLenumGroup::MatrixMode, mode));
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            MatrixType modePacked                         = FromGL<MatrixType>(mode);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateMatrixMode(context, modePacked));
            if (isCallValid)
            {
                context->matrixMode(modePacked);
            }
            ANGLE_CAPTURE(MatrixMode, isCallValid, context, modePacked);
        }
    }
    
    void GL_APIENTRY MultMatrixf(const GLfloat *m)
    {
        EVENT("(const GLfloat *m = 0x%016" PRIxPTR ")", (uintptr_t)m);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateMultMatrixf(context, m));
            if (isCallValid)
            {
                context->multMatrixf(m);
            }
            ANGLE_CAPTURE(MultMatrixf, isCallValid, context, m);
        }
    }
    
    void GL_APIENTRY MultMatrixx(const GLfixed *m)
    {
        EVENT("(const GLfixed *m = 0x%016" PRIxPTR ")", (uintptr_t)m);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateMultMatrixx(context, m));
            if (isCallValid)
            {
                context->multMatrixx(m);
            }
            ANGLE_CAPTURE(MultMatrixx, isCallValid, context, m);
        }
    }
    
    void GL_APIENTRY MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
    {
        EVENT("(GLenum target = %s, GLfloat s = %f, GLfloat t = %f, GLfloat r = %f, GLfloat q = %f)",
              GLenumToString(GLenumGroup::TextureUnit, target), s, t, r, q);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY MultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
    {
        EVENT(
            "(GLenum texture = %s, GLfixed s = 0x%X, GLfixed t = 0x%X, GLfixed r = 0x%X, GLfixed q = "
            "0x%X)",
            GLenumToString(GLenumGroup::TextureUnit, texture), s, t, r, q);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Normal3f(GLfloat nx, GLfloat ny, GLfloat nz)
    {
        EVENT("(GLfloat nx = %f, GLfloat ny = %f, GLfloat nz = %f)", nx, ny, nz);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Normal3x(GLfixed nx, GLfixed ny, GLfixed nz)
    {
        EVENT("(GLfixed nx = 0x%X, GLfixed ny = 0x%X, GLfixed nz = 0x%X)", nx, ny, nz);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY NormalPointer(GLenum type, GLsizei stride, const void *pointer)
    {
        EVENT("(GLenum type = %s, GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::NormalPointerType, type), stride, (uintptr_t)pointer);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            VertexAttribType typePacked                   = FromGL<VertexAttribType>(type);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Orthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
    {
        EVENT(
            "(GLfloat l = %f, GLfloat r = %f, GLfloat b = %f, GLfloat t = %f, GLfloat n = %f, GLfloat "
            "f = %f)",
            l, r, b, t, n, f);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Orthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
    {
        EVENT(
            "(GLfixed l = 0x%X, GLfixed r = 0x%X, GLfixed b = 0x%X, GLfixed t = 0x%X, GLfixed n = "
            "0x%X, GLfixed f = 0x%X)",
            l, r, b, t, n, f);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY PointParameterf(GLenum pname, GLfloat param)
    {
        EVENT("(GLenum pname = %s, GLfloat param = %f)",
              GLenumToString(GLenumGroup::DefaultGroup, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            PointParameter pnamePacked                    = FromGL<PointParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidatePointParameterf(context, pnamePacked, param));
            if (isCallValid)
            {
                context->pointParameterf(pnamePacked, param);
            }
            ANGLE_CAPTURE(PointParameterf, isCallValid, context, pnamePacked, param);
        }
    }
    
    void GL_APIENTRY PointParameterfv(GLenum pname, const GLfloat *params)
    {
        EVENT("(GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            PointParameter pnamePacked                    = FromGL<PointParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidatePointParameterfv(context, pnamePacked, params));
            if (isCallValid)
            {
                context->pointParameterfv(pnamePacked, params);
            }
            ANGLE_CAPTURE(PointParameterfv, isCallValid, context, pnamePacked, params);
        }
    }
    
    void GL_APIENTRY PointParameterx(GLenum pname, GLfixed param)
    {
        EVENT("(GLenum pname = %s, GLfixed param = 0x%X)",
              GLenumToString(GLenumGroup::DefaultGroup, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            PointParameter pnamePacked                    = FromGL<PointParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidatePointParameterx(context, pnamePacked, param));
            if (isCallValid)
            {
                context->pointParameterx(pnamePacked, param);
            }
            ANGLE_CAPTURE(PointParameterx, isCallValid, context, pnamePacked, param);
        }
    }
    
    void GL_APIENTRY PointParameterxv(GLenum pname, const GLfixed *params)
    {
        EVENT("(GLenum pname = %s, const GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            PointParameter pnamePacked                    = FromGL<PointParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidatePointParameterxv(context, pnamePacked, params));
            if (isCallValid)
            {
                context->pointParameterxv(pnamePacked, params);
            }
            ANGLE_CAPTURE(PointParameterxv, isCallValid, context, pnamePacked, params);
        }
    }
    
    void GL_APIENTRY PointSize(GLfloat size)
    {
        EVENT("(GLfloat size = %f)", size);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidatePointSize(context, size));
            if (isCallValid)
            {
                context->pointSize(size);
            }
            ANGLE_CAPTURE(PointSize, isCallValid, context, size);
        }
    }
    
    void GL_APIENTRY PointSizex(GLfixed size)
    {
        EVENT("(GLfixed size = 0x%X)", size);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidatePointSizex(context, size));
            if (isCallValid)
            {
                context->pointSizex(size);
            }
            ANGLE_CAPTURE(PointSizex, isCallValid, context, size);
        }
    }
    
    void GL_APIENTRY PolygonOffsetx(GLfixed factor, GLfixed units)
    {
        EVENT("(GLfixed factor = 0x%X, GLfixed units = 0x%X)", factor, units);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidatePolygonOffsetx(context, factor, units));
            if (isCallValid)
            {
                context->polygonOffsetx(factor, units);
            }
            ANGLE_CAPTURE(PolygonOffsetx, isCallValid, context, factor, units);
        }
    }
    
    void GL_APIENTRY PopMatrix()
    {
        EVENT("()");
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidatePopMatrix(context));
            if (isCallValid)
            {
                context->popMatrix();
            }
            ANGLE_CAPTURE(PopMatrix, isCallValid, context);
        }
    }
    
    void GL_APIENTRY PushMatrix()
    {
        EVENT("()");
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidatePushMatrix(context));
            if (isCallValid)
            {
                context->pushMatrix();
            }
            ANGLE_CAPTURE(PushMatrix, isCallValid, context);
        }
    }
    
    void GL_APIENTRY Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
    {
        EVENT("(GLfloat angle = %f, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", angle, x, y, z);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
    {
        EVENT("(GLfixed angle = 0x%X, GLfixed x = 0x%X, GLfixed y = 0x%X, GLfixed z = 0x%X)", angle, x,
              y, z);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY SampleCoveragex(GLclampx value, GLboolean invert)
    {
        EVENT("(GLclampx value = 0x%X, GLboolean invert = %s)", value, GLbooleanToString(invert));
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid =
                (context->skipValidation() || ValidateSampleCoveragex(context, value, invert));
            if (isCallValid)
            {
                context->sampleCoveragex(value, invert);
            }
            ANGLE_CAPTURE(SampleCoveragex, isCallValid, context, value, invert);
        }
    }
    
    void GL_APIENTRY Scalef(GLfloat x, GLfloat y, GLfloat z)
    {
        EVENT("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Scalex(GLfixed x, GLfixed y, GLfixed z)
    {
        EVENT("(GLfixed x = 0x%X, GLfixed y = 0x%X, GLfixed z = 0x%X)", x, y, z);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY ShadeModel(GLenum mode)
    {
        EVENT("(GLenum mode = %s)", GLenumToString(GLenumGroup::ShadingModel, mode));
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            ShadingModel modePacked                       = FromGL<ShadingModel>(mode);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
            bool isCallValid = (context->skipValidation() || ValidateShadeModel(context, modePacked));
            if (isCallValid)
            {
                context->shadeModel(modePacked);
            }
            ANGLE_CAPTURE(ShadeModel, isCallValid, context, modePacked);
        }
    }
    
    void GL_APIENTRY TexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
    {
        EVENT(
            "(GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = "
            "0x%016" PRIxPTR ")",
            size, GLenumToString(GLenumGroup::TexCoordPointerType, type), stride, (uintptr_t)pointer);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            VertexAttribType typePacked                   = FromGL<VertexAttribType>(type);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexEnvf(GLenum target, GLenum pname, GLfloat param)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLfloat param = %f)",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexEnvi(GLenum target, GLenum pname, GLint param)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLint param = %d)",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexEnviv(GLenum target, GLenum pname, const GLint *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, const GLint *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexEnvx(GLenum target, GLenum pname, GLfixed param)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLfixed param = 0x%X)",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexEnvxv(GLenum target, GLenum pname, const GLfixed *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, const GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureEnvTarget, target),
              GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureEnvTarget targetPacked                 = FromGL<TextureEnvTarget>(target);
            TextureEnvParameter pnamePacked               = FromGL<TextureEnvParameter>(pname);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexParameterx(GLenum target, GLenum pname, GLfixed param)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, GLfixed param = 0x%X)",
              GLenumToString(GLenumGroup::TextureTarget, target),
              GLenumToString(GLenumGroup::GetTextureParameter, pname), param);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureType targetPacked                      = FromGL<TextureType>(target);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY TexParameterxv(GLenum target, GLenum pname, const GLfixed *params)
    {
        EVENT("(GLenum target = %s, GLenum pname = %s, const GLfixed *params = 0x%016" PRIxPTR ")",
              GLenumToString(GLenumGroup::TextureTarget, target),
              GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            TextureType targetPacked                      = FromGL<TextureType>(target);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Translatef(GLfloat x, GLfloat y, GLfloat z)
    {
        EVENT("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY Translatex(GLfixed x, GLfixed y, GLfixed z)
    {
        EVENT("(GLfixed x = 0x%X, GLfixed y = 0x%X, GLfixed z = 0x%X)", x, y, z);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    
    void GL_APIENTRY VertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
    {
        EVENT(
            "(GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = "
            "0x%016" PRIxPTR ")",
            size, GLenumToString(GLenumGroup::VertexPointerType, type), stride, (uintptr_t)pointer);
    
        Context *context = GetValidGlobalContext();
        if (context)
        {
            VertexAttribType typePacked                   = FromGL<VertexAttribType>(type);
            std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(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);
        }
    }
    }  // namespace gl