Path: blob/main_old/src/libGL/entry_points_gl_3_autogen.cpp
1693 views
// GENERATED FILE - DO NOT EDIT.1// Generated by generate_entry_points.py using data from gl.xml.2//3// Copyright 2020 The ANGLE Project Authors. All rights reserved.4// Use of this source code is governed by a BSD-style license that can be5// found in the LICENSE file.6//7// entry_points_gl_3_autogen.cpp:8// Defines the Desktop GL 3.x entry points.910#include "libGL/entry_points_gl_3_autogen.h"1112#include "libANGLE/Context.h"13#include "libANGLE/Context.inl.h"14#include "libANGLE/capture/gl_enum_utils.h"15#include "libANGLE/entry_points_utils.h"16#include "libANGLE/validationEGL.h"17#include "libANGLE/validationES.h"18#include "libANGLE/validationES1.h"19#include "libANGLE/validationES2.h"20#include "libANGLE/validationES3.h"21#include "libANGLE/validationES31.h"22#include "libANGLE/validationES32.h"23#include "libANGLE/validationESEXT.h"24#include "libANGLE/validationGL3_autogen.h"25#include "libGLESv2/global_state.h"2627using namespace gl;2829extern "C" {3031// GL 3.032void GL_APIENTRY GL_BeginConditionalRender(GLuint id, GLenum mode)33{34Context *context = GetValidGlobalContext();35EVENT(context, GLBeginConditionalRender, "context = %d, id = %u, mode = %s", CID(context), id,36GLenumToString(GLenumGroup::TypeEnum, mode));3738if (context)39{40std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);41bool isCallValid =42(context->skipValidation() || ValidateBeginConditionalRender(context, id, mode));43if (isCallValid)44{45context->beginConditionalRender(id, mode);46}47ANGLE_CAPTURE(BeginConditionalRender, isCallValid, context, id, mode);48}49else50{51GenerateContextLostErrorOnCurrentGlobalContext();52}53}5455void GL_APIENTRY GL_BeginTransformFeedback(GLenum primitiveMode)56{57Context *context = GetValidGlobalContext();58EVENT(context, GLBeginTransformFeedback, "context = %d, primitiveMode = %s", CID(context),59GLenumToString(GLenumGroup::PrimitiveType, primitiveMode));6061if (context)62{63PrimitiveMode primitiveModePacked = PackParam<PrimitiveMode>(primitiveMode);64std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);65bool isCallValid = (context->skipValidation() ||66ValidateBeginTransformFeedback(context, primitiveModePacked));67if (isCallValid)68{69context->beginTransformFeedback(primitiveModePacked);70}71ANGLE_CAPTURE(BeginTransformFeedback, isCallValid, context, primitiveModePacked);72}73else74{75GenerateContextLostErrorOnCurrentGlobalContext();76}77}7879void GL_APIENTRY GL_BindBufferBase(GLenum target, GLuint index, GLuint buffer)80{81Context *context = GetValidGlobalContext();82EVENT(context, GLBindBufferBase, "context = %d, target = %s, index = %u, buffer = %u",83CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), index, buffer);8485if (context)86{87BufferBinding targetPacked = PackParam<BufferBinding>(target);88BufferID bufferPacked = PackParam<BufferID>(buffer);89std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);90bool isCallValid = (context->skipValidation() ||91ValidateBindBufferBase(context, targetPacked, index, bufferPacked));92if (isCallValid)93{94context->bindBufferBase(targetPacked, index, bufferPacked);95}96ANGLE_CAPTURE(BindBufferBase, isCallValid, context, targetPacked, index, bufferPacked);97}98else99{100GenerateContextLostErrorOnCurrentGlobalContext();101}102}103104void GL_APIENTRY105GL_BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)106{107Context *context = GetValidGlobalContext();108EVENT(context, GLBindBufferRange,109"context = %d, target = %s, index = %u, buffer = %u, offset = %llu, size = %llu",110CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target), index, buffer,111static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size));112113if (context)114{115BufferBinding targetPacked = PackParam<BufferBinding>(target);116BufferID bufferPacked = PackParam<BufferID>(buffer);117std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);118bool isCallValid =119(context->skipValidation() ||120ValidateBindBufferRange(context, targetPacked, index, bufferPacked, offset, size));121if (isCallValid)122{123context->bindBufferRange(targetPacked, index, bufferPacked, offset, size);124}125ANGLE_CAPTURE(BindBufferRange, isCallValid, context, targetPacked, index, bufferPacked,126offset, size);127}128else129{130GenerateContextLostErrorOnCurrentGlobalContext();131}132}133134void GL_APIENTRY GL_BindFragDataLocation(GLuint program, GLuint color, const GLchar *name)135{136Context *context = GetValidGlobalContext();137EVENT(context, GLBindFragDataLocation,138"context = %d, program = %u, color = %u, name = 0x%016" PRIxPTR "", CID(context), program,139color, (uintptr_t)name);140141if (context)142{143ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);144std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);145bool isCallValid = (context->skipValidation() ||146ValidateBindFragDataLocation(context, programPacked, color, name));147if (isCallValid)148{149context->bindFragDataLocation(programPacked, color, name);150}151ANGLE_CAPTURE(BindFragDataLocation, isCallValid, context, programPacked, color, name);152}153else154{155GenerateContextLostErrorOnCurrentGlobalContext();156}157}158159void GL_APIENTRY GL_BindFramebuffer(GLenum target, GLuint framebuffer)160{161Context *context = GetValidGlobalContext();162EVENT(context, GLBindFramebuffer, "context = %d, target = %s, framebuffer = %u", CID(context),163GLenumToString(GLenumGroup::FramebufferTarget, target), framebuffer);164165if (context)166{167FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer);168std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);169bool isCallValid = (context->skipValidation() ||170ValidateBindFramebuffer(context, target, framebufferPacked));171if (isCallValid)172{173context->bindFramebuffer(target, framebufferPacked);174}175ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebufferPacked);176}177else178{179GenerateContextLostErrorOnCurrentGlobalContext();180}181}182183void GL_APIENTRY GL_BindRenderbuffer(GLenum target, GLuint renderbuffer)184{185Context *context = GetValidGlobalContext();186EVENT(context, GLBindRenderbuffer, "context = %d, target = %s, renderbuffer = %u", CID(context),187GLenumToString(GLenumGroup::RenderbufferTarget, target), renderbuffer);188189if (context)190{191RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer);192std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);193bool isCallValid = (context->skipValidation() ||194ValidateBindRenderbuffer(context, target, renderbufferPacked));195if (isCallValid)196{197context->bindRenderbuffer(target, renderbufferPacked);198}199ANGLE_CAPTURE(BindRenderbuffer, isCallValid, context, target, renderbufferPacked);200}201else202{203GenerateContextLostErrorOnCurrentGlobalContext();204}205}206207void GL_APIENTRY GL_BindVertexArray(GLuint array)208{209Context *context = GetValidGlobalContext();210EVENT(context, GLBindVertexArray, "context = %d, array = %u", CID(context), array);211212if (context)213{214VertexArrayID arrayPacked = PackParam<VertexArrayID>(array);215std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);216bool isCallValid =217(context->skipValidation() || ValidateBindVertexArray(context, arrayPacked));218if (isCallValid)219{220context->bindVertexArray(arrayPacked);221}222ANGLE_CAPTURE(BindVertexArray, isCallValid, context, arrayPacked);223}224else225{226GenerateContextLostErrorOnCurrentGlobalContext();227}228}229230void GL_APIENTRY GL_BlitFramebuffer(GLint srcX0,231GLint srcY0,232GLint srcX1,233GLint srcY1,234GLint dstX0,235GLint dstY0,236GLint dstX1,237GLint dstY1,238GLbitfield mask,239GLenum filter)240{241Context *context = GetValidGlobalContext();242EVENT(context, GLBlitFramebuffer,243"context = %d, srcX0 = %d, srcY0 = %d, srcX1 = %d, srcY1 = %d, dstX0 = %d, dstY0 = %d, "244"dstX1 = %d, dstY1 = %d, mask = %s, filter = %s",245CID(context), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1,246GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(),247GLenumToString(GLenumGroup::BlitFramebufferFilter, filter));248249if (context)250{251std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);252bool isCallValid = (context->skipValidation() ||253ValidateBlitFramebuffer(context, srcX0, srcY0, srcX1, srcY1, dstX0,254dstY0, dstX1, dstY1, mask, filter));255if (isCallValid)256{257context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,258filter);259}260ANGLE_CAPTURE(BlitFramebuffer, isCallValid, context, srcX0, srcY0, srcX1, srcY1, dstX0,261dstY0, dstX1, dstY1, mask, filter);262}263else264{265GenerateContextLostErrorOnCurrentGlobalContext();266}267}268269GLenum GL_APIENTRY GL_CheckFramebufferStatus(GLenum target)270{271Context *context = GetValidGlobalContext();272EVENT(context, GLCheckFramebufferStatus, "context = %d, target = %s", CID(context),273GLenumToString(GLenumGroup::FramebufferTarget, target));274275GLenum returnValue;276if (context)277{278std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);279bool isCallValid =280(context->skipValidation() || ValidateCheckFramebufferStatus(context, target));281if (isCallValid)282{283returnValue = context->checkFramebufferStatus(target);284}285else286{287returnValue =288GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatus, GLenum>();289}290ANGLE_CAPTURE(CheckFramebufferStatus, isCallValid, context, target, returnValue);291}292else293{294GenerateContextLostErrorOnCurrentGlobalContext();295returnValue = GetDefaultReturnValue<angle::EntryPoint::GLCheckFramebufferStatus, GLenum>();296}297return returnValue;298}299300void GL_APIENTRY GL_ClampColor(GLenum target, GLenum clamp)301{302Context *context = GetValidGlobalContext();303EVENT(context, GLClampColor, "context = %d, target = %s, clamp = %s", CID(context),304GLenumToString(GLenumGroup::DefaultGroup, target),305GLenumToString(GLenumGroup::DefaultGroup, clamp));306307if (context)308{309std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);310bool isCallValid =311(context->skipValidation() || ValidateClampColor(context, target, clamp));312if (isCallValid)313{314context->clampColor(target, clamp);315}316ANGLE_CAPTURE(ClampColor, isCallValid, context, target, clamp);317}318else319{320GenerateContextLostErrorOnCurrentGlobalContext();321}322}323324void GL_APIENTRY GL_ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)325{326Context *context = GetValidGlobalContext();327EVENT(context, GLClearBufferfi,328"context = %d, buffer = %s, drawbuffer = %d, depth = %f, stencil = %d", CID(context),329GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, depth, stencil);330331if (context)332{333std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);334bool isCallValid = (context->skipValidation() ||335ValidateClearBufferfi(context, buffer, drawbuffer, depth, stencil));336if (isCallValid)337{338context->clearBufferfi(buffer, drawbuffer, depth, stencil);339}340ANGLE_CAPTURE(ClearBufferfi, isCallValid, context, buffer, drawbuffer, depth, stencil);341}342else343{344GenerateContextLostErrorOnCurrentGlobalContext();345}346}347348void GL_APIENTRY GL_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)349{350Context *context = GetValidGlobalContext();351EVENT(context, GLClearBufferfv,352"context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context),353GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value);354355if (context)356{357std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);358bool isCallValid = (context->skipValidation() ||359ValidateClearBufferfv(context, buffer, drawbuffer, value));360if (isCallValid)361{362context->clearBufferfv(buffer, drawbuffer, value);363}364ANGLE_CAPTURE(ClearBufferfv, isCallValid, context, buffer, drawbuffer, value);365}366else367{368GenerateContextLostErrorOnCurrentGlobalContext();369}370}371372void GL_APIENTRY GL_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)373{374Context *context = GetValidGlobalContext();375EVENT(context, GLClearBufferiv,376"context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context),377GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value);378379if (context)380{381std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);382bool isCallValid = (context->skipValidation() ||383ValidateClearBufferiv(context, buffer, drawbuffer, value));384if (isCallValid)385{386context->clearBufferiv(buffer, drawbuffer, value);387}388ANGLE_CAPTURE(ClearBufferiv, isCallValid, context, buffer, drawbuffer, value);389}390else391{392GenerateContextLostErrorOnCurrentGlobalContext();393}394}395396void GL_APIENTRY GL_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)397{398Context *context = GetValidGlobalContext();399EVENT(context, GLClearBufferuiv,400"context = %d, buffer = %s, drawbuffer = %d, value = 0x%016" PRIxPTR "", CID(context),401GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value);402403if (context)404{405std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);406bool isCallValid = (context->skipValidation() ||407ValidateClearBufferuiv(context, buffer, drawbuffer, value));408if (isCallValid)409{410context->clearBufferuiv(buffer, drawbuffer, value);411}412ANGLE_CAPTURE(ClearBufferuiv, isCallValid, context, buffer, drawbuffer, value);413}414else415{416GenerateContextLostErrorOnCurrentGlobalContext();417}418}419420void GL_APIENTRY GL_ColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)421{422Context *context = GetValidGlobalContext();423EVENT(context, GLColorMaski, "context = %d, index = %u, r = %s, g = %s, b = %s, a = %s",424CID(context), index, GLbooleanToString(r), GLbooleanToString(g), GLbooleanToString(b),425GLbooleanToString(a));426427if (context)428{429std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);430bool isCallValid =431(context->skipValidation() || ValidateColorMaski(context, index, r, g, b, a));432if (isCallValid)433{434context->colorMaski(index, r, g, b, a);435}436ANGLE_CAPTURE(ColorMaski, isCallValid, context, index, r, g, b, a);437}438else439{440GenerateContextLostErrorOnCurrentGlobalContext();441}442}443444void GL_APIENTRY GL_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)445{446Context *context = GetValidGlobalContext();447EVENT(context, GLDeleteFramebuffers, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "",448CID(context), n, (uintptr_t)framebuffers);449450if (context)451{452const FramebufferID *framebuffersPacked = PackParam<const FramebufferID *>(framebuffers);453std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);454bool isCallValid = (context->skipValidation() ||455ValidateDeleteFramebuffers(context, n, framebuffersPacked));456if (isCallValid)457{458context->deleteFramebuffers(n, framebuffersPacked);459}460ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffersPacked);461}462else463{464GenerateContextLostErrorOnCurrentGlobalContext();465}466}467468void GL_APIENTRY GL_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)469{470Context *context = GetValidGlobalContext();471EVENT(context, GLDeleteRenderbuffers, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "",472CID(context), n, (uintptr_t)renderbuffers);473474if (context)475{476const RenderbufferID *renderbuffersPacked =477PackParam<const RenderbufferID *>(renderbuffers);478std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);479bool isCallValid = (context->skipValidation() ||480ValidateDeleteRenderbuffers(context, n, renderbuffersPacked));481if (isCallValid)482{483context->deleteRenderbuffers(n, renderbuffersPacked);484}485ANGLE_CAPTURE(DeleteRenderbuffers, isCallValid, context, n, renderbuffersPacked);486}487else488{489GenerateContextLostErrorOnCurrentGlobalContext();490}491}492493void GL_APIENTRY GL_DeleteVertexArrays(GLsizei n, const GLuint *arrays)494{495Context *context = GetValidGlobalContext();496EVENT(context, GLDeleteVertexArrays, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "",497CID(context), n, (uintptr_t)arrays);498499if (context)500{501const VertexArrayID *arraysPacked = PackParam<const VertexArrayID *>(arrays);502std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);503bool isCallValid =504(context->skipValidation() || ValidateDeleteVertexArrays(context, n, arraysPacked));505if (isCallValid)506{507context->deleteVertexArrays(n, arraysPacked);508}509ANGLE_CAPTURE(DeleteVertexArrays, isCallValid, context, n, arraysPacked);510}511else512{513GenerateContextLostErrorOnCurrentGlobalContext();514}515}516517void GL_APIENTRY GL_Disablei(GLenum target, GLuint index)518{519Context *context = GetValidGlobalContext();520EVENT(context, GLDisablei, "context = %d, target = %s, index = %u", CID(context),521GLenumToString(GLenumGroup::EnableCap, target), index);522523if (context)524{525std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);526bool isCallValid = (context->skipValidation() || ValidateDisablei(context, target, index));527if (isCallValid)528{529context->disablei(target, index);530}531ANGLE_CAPTURE(Disablei, isCallValid, context, target, index);532}533else534{535GenerateContextLostErrorOnCurrentGlobalContext();536}537}538539void GL_APIENTRY GL_Enablei(GLenum target, GLuint index)540{541Context *context = GetValidGlobalContext();542EVENT(context, GLEnablei, "context = %d, target = %s, index = %u", CID(context),543GLenumToString(GLenumGroup::EnableCap, target), index);544545if (context)546{547std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);548bool isCallValid = (context->skipValidation() || ValidateEnablei(context, target, index));549if (isCallValid)550{551context->enablei(target, index);552}553ANGLE_CAPTURE(Enablei, isCallValid, context, target, index);554}555else556{557GenerateContextLostErrorOnCurrentGlobalContext();558}559}560561void GL_APIENTRY GL_EndConditionalRender()562{563Context *context = GetValidGlobalContext();564EVENT(context, GLEndConditionalRender, "context = %d", CID(context));565566if (context)567{568std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);569bool isCallValid = (context->skipValidation() || ValidateEndConditionalRender(context));570if (isCallValid)571{572context->endConditionalRender();573}574ANGLE_CAPTURE(EndConditionalRender, isCallValid, context);575}576else577{578GenerateContextLostErrorOnCurrentGlobalContext();579}580}581582void GL_APIENTRY GL_EndTransformFeedback()583{584Context *context = GetValidGlobalContext();585EVENT(context, GLEndTransformFeedback, "context = %d", CID(context));586587if (context)588{589std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);590bool isCallValid = (context->skipValidation() || ValidateEndTransformFeedback(context));591if (isCallValid)592{593context->endTransformFeedback();594}595ANGLE_CAPTURE(EndTransformFeedback, isCallValid, context);596}597else598{599GenerateContextLostErrorOnCurrentGlobalContext();600}601}602603void GL_APIENTRY GL_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)604{605Context *context = GetValidGlobalContext();606EVENT(context, GLFlushMappedBufferRange,607"context = %d, target = %s, offset = %llu, length = %llu", CID(context),608GLenumToString(GLenumGroup::BufferTargetARB, target),609static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length));610611if (context)612{613BufferBinding targetPacked = PackParam<BufferBinding>(target);614std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);615bool isCallValid = (context->skipValidation() ||616ValidateFlushMappedBufferRange(context, targetPacked, offset, length));617if (isCallValid)618{619context->flushMappedBufferRange(targetPacked, offset, length);620}621ANGLE_CAPTURE(FlushMappedBufferRange, isCallValid, context, targetPacked, offset, length);622}623else624{625GenerateContextLostErrorOnCurrentGlobalContext();626}627}628629void GL_APIENTRY GL_FramebufferRenderbuffer(GLenum target,630GLenum attachment,631GLenum renderbuffertarget,632GLuint renderbuffer)633{634Context *context = GetValidGlobalContext();635EVENT(context, GLFramebufferRenderbuffer,636"context = %d, target = %s, attachment = %s, renderbuffertarget = %s, renderbuffer = %u",637CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),638GLenumToString(GLenumGroup::FramebufferAttachment, attachment),639GLenumToString(GLenumGroup::RenderbufferTarget, renderbuffertarget), renderbuffer);640641if (context)642{643RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer);644std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);645bool isCallValid =646(context->skipValidation() ||647ValidateFramebufferRenderbuffer(context, target, attachment, renderbuffertarget,648renderbufferPacked));649if (isCallValid)650{651context->framebufferRenderbuffer(target, attachment, renderbuffertarget,652renderbufferPacked);653}654ANGLE_CAPTURE(FramebufferRenderbuffer, isCallValid, context, target, attachment,655renderbuffertarget, renderbufferPacked);656}657else658{659GenerateContextLostErrorOnCurrentGlobalContext();660}661}662663void GL_APIENTRY GL_FramebufferTexture1D(GLenum target,664GLenum attachment,665GLenum textarget,666GLuint texture,667GLint level)668{669Context *context = GetValidGlobalContext();670EVENT(context, GLFramebufferTexture1D,671"context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d",672CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),673GLenumToString(GLenumGroup::FramebufferAttachment, attachment),674GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level);675676if (context)677{678TextureTarget textargetPacked = PackParam<TextureTarget>(textarget);679TextureID texturePacked = PackParam<TextureID>(texture);680std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);681bool isCallValid = (context->skipValidation() ||682ValidateFramebufferTexture1D(context, target, attachment,683textargetPacked, texturePacked, level));684if (isCallValid)685{686context->framebufferTexture1D(target, attachment, textargetPacked, texturePacked,687level);688}689ANGLE_CAPTURE(FramebufferTexture1D, isCallValid, context, target, attachment,690textargetPacked, texturePacked, level);691}692else693{694GenerateContextLostErrorOnCurrentGlobalContext();695}696}697698void GL_APIENTRY GL_FramebufferTexture2D(GLenum target,699GLenum attachment,700GLenum textarget,701GLuint texture,702GLint level)703{704Context *context = GetValidGlobalContext();705EVENT(context, GLFramebufferTexture2D,706"context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d",707CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),708GLenumToString(GLenumGroup::FramebufferAttachment, attachment),709GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level);710711if (context)712{713TextureTarget textargetPacked = PackParam<TextureTarget>(textarget);714TextureID texturePacked = PackParam<TextureID>(texture);715std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);716bool isCallValid = (context->skipValidation() ||717ValidateFramebufferTexture2D(context, target, attachment,718textargetPacked, texturePacked, level));719if (isCallValid)720{721context->framebufferTexture2D(target, attachment, textargetPacked, texturePacked,722level);723}724ANGLE_CAPTURE(FramebufferTexture2D, isCallValid, context, target, attachment,725textargetPacked, texturePacked, level);726}727else728{729GenerateContextLostErrorOnCurrentGlobalContext();730}731}732733void GL_APIENTRY GL_FramebufferTexture3D(GLenum target,734GLenum attachment,735GLenum textarget,736GLuint texture,737GLint level,738GLint zoffset)739{740Context *context = GetValidGlobalContext();741EVENT(context, GLFramebufferTexture3D,742"context = %d, target = %s, attachment = %s, textarget = %s, texture = %u, level = %d, "743"zoffset = %d",744CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),745GLenumToString(GLenumGroup::FramebufferAttachment, attachment),746GLenumToString(GLenumGroup::TextureTarget, textarget), texture, level, zoffset);747748if (context)749{750TextureTarget textargetPacked = PackParam<TextureTarget>(textarget);751TextureID texturePacked = PackParam<TextureID>(texture);752std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);753bool isCallValid =754(context->skipValidation() ||755ValidateFramebufferTexture3D(context, target, attachment, textargetPacked,756texturePacked, level, zoffset));757if (isCallValid)758{759context->framebufferTexture3D(target, attachment, textargetPacked, texturePacked, level,760zoffset);761}762ANGLE_CAPTURE(FramebufferTexture3D, isCallValid, context, target, attachment,763textargetPacked, texturePacked, level, zoffset);764}765else766{767GenerateContextLostErrorOnCurrentGlobalContext();768}769}770771void GL_APIENTRY GL_FramebufferTextureLayer(GLenum target,772GLenum attachment,773GLuint texture,774GLint level,775GLint layer)776{777Context *context = GetValidGlobalContext();778EVENT(context, GLFramebufferTextureLayer,779"context = %d, target = %s, attachment = %s, texture = %u, level = %d, layer = %d",780CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),781GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level, layer);782783if (context)784{785TextureID texturePacked = PackParam<TextureID>(texture);786std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);787bool isCallValid = (context->skipValidation() ||788ValidateFramebufferTextureLayer(context, target, attachment,789texturePacked, level, layer));790if (isCallValid)791{792context->framebufferTextureLayer(target, attachment, texturePacked, level, layer);793}794ANGLE_CAPTURE(FramebufferTextureLayer, isCallValid, context, target, attachment,795texturePacked, level, layer);796}797else798{799GenerateContextLostErrorOnCurrentGlobalContext();800}801}802803void GL_APIENTRY GL_GenFramebuffers(GLsizei n, GLuint *framebuffers)804{805Context *context = GetValidGlobalContext();806EVENT(context, GLGenFramebuffers, "context = %d, n = %d, framebuffers = 0x%016" PRIxPTR "",807CID(context), n, (uintptr_t)framebuffers);808809if (context)810{811FramebufferID *framebuffersPacked = PackParam<FramebufferID *>(framebuffers);812std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);813bool isCallValid =814(context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffersPacked));815if (isCallValid)816{817context->genFramebuffers(n, framebuffersPacked);818}819ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffersPacked);820}821else822{823GenerateContextLostErrorOnCurrentGlobalContext();824}825}826827void GL_APIENTRY GL_GenRenderbuffers(GLsizei n, GLuint *renderbuffers)828{829Context *context = GetValidGlobalContext();830EVENT(context, GLGenRenderbuffers, "context = %d, n = %d, renderbuffers = 0x%016" PRIxPTR "",831CID(context), n, (uintptr_t)renderbuffers);832833if (context)834{835RenderbufferID *renderbuffersPacked = PackParam<RenderbufferID *>(renderbuffers);836std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);837bool isCallValid = (context->skipValidation() ||838ValidateGenRenderbuffers(context, n, renderbuffersPacked));839if (isCallValid)840{841context->genRenderbuffers(n, renderbuffersPacked);842}843ANGLE_CAPTURE(GenRenderbuffers, isCallValid, context, n, renderbuffersPacked);844}845else846{847GenerateContextLostErrorOnCurrentGlobalContext();848}849}850851void GL_APIENTRY GL_GenVertexArrays(GLsizei n, GLuint *arrays)852{853Context *context = GetValidGlobalContext();854EVENT(context, GLGenVertexArrays, "context = %d, n = %d, arrays = 0x%016" PRIxPTR "",855CID(context), n, (uintptr_t)arrays);856857if (context)858{859VertexArrayID *arraysPacked = PackParam<VertexArrayID *>(arrays);860std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);861bool isCallValid =862(context->skipValidation() || ValidateGenVertexArrays(context, n, arraysPacked));863if (isCallValid)864{865context->genVertexArrays(n, arraysPacked);866}867ANGLE_CAPTURE(GenVertexArrays, isCallValid, context, n, arraysPacked);868}869else870{871GenerateContextLostErrorOnCurrentGlobalContext();872}873}874875void GL_APIENTRY GL_GenerateMipmap(GLenum target)876{877Context *context = GetValidGlobalContext();878EVENT(context, GLGenerateMipmap, "context = %d, target = %s", CID(context),879GLenumToString(GLenumGroup::TextureTarget, target));880881if (context)882{883TextureType targetPacked = PackParam<TextureType>(target);884std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);885bool isCallValid =886(context->skipValidation() || ValidateGenerateMipmap(context, targetPacked));887if (isCallValid)888{889context->generateMipmap(targetPacked);890}891ANGLE_CAPTURE(GenerateMipmap, isCallValid, context, targetPacked);892}893else894{895GenerateContextLostErrorOnCurrentGlobalContext();896}897}898899void GL_APIENTRY GL_GetBooleani_v(GLenum target, GLuint index, GLboolean *data)900{901Context *context = GetValidGlobalContext();902EVENT(context, GLGetBooleani_v,903"context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context),904GLenumToString(GLenumGroup::BufferTargetARB, target), index, (uintptr_t)data);905906if (context)907{908std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);909bool isCallValid =910(context->skipValidation() || ValidateGetBooleani_v(context, target, index, data));911if (isCallValid)912{913context->getBooleani_v(target, index, data);914}915ANGLE_CAPTURE(GetBooleani_v, isCallValid, context, target, index, data);916}917else918{919GenerateContextLostErrorOnCurrentGlobalContext();920}921}922923GLint GL_APIENTRY GL_GetFragDataLocation(GLuint program, const GLchar *name)924{925Context *context = GetValidGlobalContext();926EVENT(context, GLGetFragDataLocation, "context = %d, program = %u, name = 0x%016" PRIxPTR "",927CID(context), program, (uintptr_t)name);928929GLint returnValue;930if (context)931{932ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);933std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);934bool isCallValid = (context->skipValidation() ||935ValidateGetFragDataLocation(context, programPacked, name));936if (isCallValid)937{938returnValue = context->getFragDataLocation(programPacked, name);939}940else941{942returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataLocation, GLint>();943}944ANGLE_CAPTURE(GetFragDataLocation, isCallValid, context, programPacked, name, returnValue);945}946else947{948GenerateContextLostErrorOnCurrentGlobalContext();949returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataLocation, GLint>();950}951return returnValue;952}953954void GL_APIENTRY GL_GetFramebufferAttachmentParameteriv(GLenum target,955GLenum attachment,956GLenum pname,957GLint *params)958{959Context *context = GetValidGlobalContext();960EVENT(context, GLGetFramebufferAttachmentParameteriv,961"context = %d, target = %s, attachment = %s, pname = %s, params = 0x%016" PRIxPTR "",962CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),963GLenumToString(GLenumGroup::FramebufferAttachment, attachment),964GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname),965(uintptr_t)params);966967if (context)968{969std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);970bool isCallValid =971(context->skipValidation() || ValidateGetFramebufferAttachmentParameteriv(972context, target, attachment, pname, params));973if (isCallValid)974{975context->getFramebufferAttachmentParameteriv(target, attachment, pname, params);976}977ANGLE_CAPTURE(GetFramebufferAttachmentParameteriv, isCallValid, context, target, attachment,978pname, params);979}980else981{982GenerateContextLostErrorOnCurrentGlobalContext();983}984}985986void GL_APIENTRY GL_GetIntegeri_v(GLenum target, GLuint index, GLint *data)987{988Context *context = GetValidGlobalContext();989EVENT(context, GLGetIntegeri_v,990"context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context),991GLenumToString(GLenumGroup::TypeEnum, target), index, (uintptr_t)data);992993if (context)994{995std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);996bool isCallValid =997(context->skipValidation() || ValidateGetIntegeri_v(context, target, index, data));998if (isCallValid)999{1000context->getIntegeri_v(target, index, data);1001}1002ANGLE_CAPTURE(GetIntegeri_v, isCallValid, context, target, index, data);1003}1004else1005{1006GenerateContextLostErrorOnCurrentGlobalContext();1007}1008}10091010void GL_APIENTRY GL_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)1011{1012Context *context = GetValidGlobalContext();1013EVENT(context, GLGetRenderbufferParameteriv,1014"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),1015GLenumToString(GLenumGroup::RenderbufferTarget, target),1016GLenumToString(GLenumGroup::RenderbufferParameterName, pname), (uintptr_t)params);10171018if (context)1019{1020std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1021bool isCallValid = (context->skipValidation() ||1022ValidateGetRenderbufferParameteriv(context, target, pname, params));1023if (isCallValid)1024{1025context->getRenderbufferParameteriv(target, pname, params);1026}1027ANGLE_CAPTURE(GetRenderbufferParameteriv, isCallValid, context, target, pname, params);1028}1029else1030{1031GenerateContextLostErrorOnCurrentGlobalContext();1032}1033}10341035const GLubyte *GL_APIENTRY GL_GetStringi(GLenum name, GLuint index)1036{1037Context *context = GetValidGlobalContext();1038EVENT(context, GLGetStringi, "context = %d, name = %s, index = %u", CID(context),1039GLenumToString(GLenumGroup::StringName, name), index);10401041const GLubyte *returnValue;1042if (context)1043{1044std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1045bool isCallValid = (context->skipValidation() || ValidateGetStringi(context, name, index));1046if (isCallValid)1047{1048returnValue = context->getStringi(name, index);1049}1050else1051{1052returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetStringi, const GLubyte *>();1053}1054ANGLE_CAPTURE(GetStringi, isCallValid, context, name, index, returnValue);1055}1056else1057{1058GenerateContextLostErrorOnCurrentGlobalContext();1059returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetStringi, const GLubyte *>();1060}1061return returnValue;1062}10631064void GL_APIENTRY GL_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params)1065{1066Context *context = GetValidGlobalContext();1067EVENT(context, GLGetTexParameterIiv,1068"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),1069GLenumToString(GLenumGroup::TextureTarget, target),1070GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);10711072if (context)1073{1074TextureType targetPacked = PackParam<TextureType>(target);1075std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1076bool isCallValid = (context->skipValidation() ||1077ValidateGetTexParameterIiv(context, targetPacked, pname, params));1078if (isCallValid)1079{1080context->getTexParameterIiv(targetPacked, pname, params);1081}1082ANGLE_CAPTURE(GetTexParameterIiv, isCallValid, context, targetPacked, pname, params);1083}1084else1085{1086GenerateContextLostErrorOnCurrentGlobalContext();1087}1088}10891090void GL_APIENTRY GL_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)1091{1092Context *context = GetValidGlobalContext();1093EVENT(context, GLGetTexParameterIuiv,1094"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),1095GLenumToString(GLenumGroup::TextureTarget, target),1096GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);10971098if (context)1099{1100TextureType targetPacked = PackParam<TextureType>(target);1101std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1102bool isCallValid = (context->skipValidation() ||1103ValidateGetTexParameterIuiv(context, targetPacked, pname, params));1104if (isCallValid)1105{1106context->getTexParameterIuiv(targetPacked, pname, params);1107}1108ANGLE_CAPTURE(GetTexParameterIuiv, isCallValid, context, targetPacked, pname, params);1109}1110else1111{1112GenerateContextLostErrorOnCurrentGlobalContext();1113}1114}11151116void GL_APIENTRY GL_GetTransformFeedbackVarying(GLuint program,1117GLuint index,1118GLsizei bufSize,1119GLsizei *length,1120GLsizei *size,1121GLenum *type,1122GLchar *name)1123{1124Context *context = GetValidGlobalContext();1125EVENT(context, GLGetTransformFeedbackVarying,1126"context = %d, program = %u, index = %u, bufSize = %d, length = 0x%016" PRIxPTR1127", size = 0x%016" PRIxPTR ", type = 0x%016" PRIxPTR ", name = 0x%016" PRIxPTR "",1128CID(context), program, index, bufSize, (uintptr_t)length, (uintptr_t)size,1129(uintptr_t)type, (uintptr_t)name);11301131if (context)1132{1133ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);1134std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1135bool isCallValid = (context->skipValidation() ||1136ValidateGetTransformFeedbackVarying(context, programPacked, index,1137bufSize, length, size, type, name));1138if (isCallValid)1139{1140context->getTransformFeedbackVarying(programPacked, index, bufSize, length, size, type,1141name);1142}1143ANGLE_CAPTURE(GetTransformFeedbackVarying, isCallValid, context, programPacked, index,1144bufSize, length, size, type, name);1145}1146else1147{1148GenerateContextLostErrorOnCurrentGlobalContext();1149}1150}11511152void GL_APIENTRY GL_GetUniformuiv(GLuint program, GLint location, GLuint *params)1153{1154Context *context = GetValidGlobalContext();1155EVENT(context, GLGetUniformuiv,1156"context = %d, program = %u, location = %d, params = 0x%016" PRIxPTR "", CID(context),1157program, location, (uintptr_t)params);11581159if (context)1160{1161ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);1162UniformLocation locationPacked = PackParam<UniformLocation>(location);1163std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1164bool isCallValid = (context->skipValidation() ||1165ValidateGetUniformuiv(context, programPacked, locationPacked, params));1166if (isCallValid)1167{1168context->getUniformuiv(programPacked, locationPacked, params);1169}1170ANGLE_CAPTURE(GetUniformuiv, isCallValid, context, programPacked, locationPacked, params);1171}1172else1173{1174GenerateContextLostErrorOnCurrentGlobalContext();1175}1176}11771178void GL_APIENTRY GL_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)1179{1180Context *context = GetValidGlobalContext();1181EVENT(context, GLGetVertexAttribIiv,1182"context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index,1183GLenumToString(GLenumGroup::VertexAttribEnum, pname), (uintptr_t)params);11841185if (context)1186{1187std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1188bool isCallValid = (context->skipValidation() ||1189ValidateGetVertexAttribIiv(context, index, pname, params));1190if (isCallValid)1191{1192context->getVertexAttribIiv(index, pname, params);1193}1194ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, index, pname, params);1195}1196else1197{1198GenerateContextLostErrorOnCurrentGlobalContext();1199}1200}12011202void GL_APIENTRY GL_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)1203{1204Context *context = GetValidGlobalContext();1205EVENT(context, GLGetVertexAttribIuiv,1206"context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index,1207GLenumToString(GLenumGroup::VertexAttribEnum, pname), (uintptr_t)params);12081209if (context)1210{1211std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1212bool isCallValid = (context->skipValidation() ||1213ValidateGetVertexAttribIuiv(context, index, pname, params));1214if (isCallValid)1215{1216context->getVertexAttribIuiv(index, pname, params);1217}1218ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, index, pname, params);1219}1220else1221{1222GenerateContextLostErrorOnCurrentGlobalContext();1223}1224}12251226GLboolean GL_APIENTRY GL_IsEnabledi(GLenum target, GLuint index)1227{1228Context *context = GetValidGlobalContext();1229EVENT(context, GLIsEnabledi, "context = %d, target = %s, index = %u", CID(context),1230GLenumToString(GLenumGroup::EnableCap, target), index);12311232GLboolean returnValue;1233if (context)1234{1235std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1236bool isCallValid =1237(context->skipValidation() || ValidateIsEnabledi(context, target, index));1238if (isCallValid)1239{1240returnValue = context->isEnabledi(target, index);1241}1242else1243{1244returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabledi, GLboolean>();1245}1246ANGLE_CAPTURE(IsEnabledi, isCallValid, context, target, index, returnValue);1247}1248else1249{1250GenerateContextLostErrorOnCurrentGlobalContext();1251returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsEnabledi, GLboolean>();1252}1253return returnValue;1254}12551256GLboolean GL_APIENTRY GL_IsFramebuffer(GLuint framebuffer)1257{1258Context *context = GetValidGlobalContext();1259EVENT(context, GLIsFramebuffer, "context = %d, framebuffer = %u", CID(context), framebuffer);12601261GLboolean returnValue;1262if (context)1263{1264FramebufferID framebufferPacked = PackParam<FramebufferID>(framebuffer);1265std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1266bool isCallValid =1267(context->skipValidation() || ValidateIsFramebuffer(context, framebufferPacked));1268if (isCallValid)1269{1270returnValue = context->isFramebuffer(framebufferPacked);1271}1272else1273{1274returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebuffer, GLboolean>();1275}1276ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebufferPacked, returnValue);1277}1278else1279{1280GenerateContextLostErrorOnCurrentGlobalContext();1281returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsFramebuffer, GLboolean>();1282}1283return returnValue;1284}12851286GLboolean GL_APIENTRY GL_IsRenderbuffer(GLuint renderbuffer)1287{1288Context *context = GetValidGlobalContext();1289EVENT(context, GLIsRenderbuffer, "context = %d, renderbuffer = %u", CID(context), renderbuffer);12901291GLboolean returnValue;1292if (context)1293{1294RenderbufferID renderbufferPacked = PackParam<RenderbufferID>(renderbuffer);1295std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1296bool isCallValid =1297(context->skipValidation() || ValidateIsRenderbuffer(context, renderbufferPacked));1298if (isCallValid)1299{1300returnValue = context->isRenderbuffer(renderbufferPacked);1301}1302else1303{1304returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbuffer, GLboolean>();1305}1306ANGLE_CAPTURE(IsRenderbuffer, isCallValid, context, renderbufferPacked, returnValue);1307}1308else1309{1310GenerateContextLostErrorOnCurrentGlobalContext();1311returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsRenderbuffer, GLboolean>();1312}1313return returnValue;1314}13151316GLboolean GL_APIENTRY GL_IsVertexArray(GLuint array)1317{1318Context *context = GetValidGlobalContext();1319EVENT(context, GLIsVertexArray, "context = %d, array = %u", CID(context), array);13201321GLboolean returnValue;1322if (context)1323{1324VertexArrayID arrayPacked = PackParam<VertexArrayID>(array);1325std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1326bool isCallValid =1327(context->skipValidation() || ValidateIsVertexArray(context, arrayPacked));1328if (isCallValid)1329{1330returnValue = context->isVertexArray(arrayPacked);1331}1332else1333{1334returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArray, GLboolean>();1335}1336ANGLE_CAPTURE(IsVertexArray, isCallValid, context, arrayPacked, returnValue);1337}1338else1339{1340GenerateContextLostErrorOnCurrentGlobalContext();1341returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsVertexArray, GLboolean>();1342}1343return returnValue;1344}13451346void *GL_APIENTRY GL_MapBufferRange(GLenum target,1347GLintptr offset,1348GLsizeiptr length,1349GLbitfield access)1350{1351Context *context = GetValidGlobalContext();1352EVENT(context, GLMapBufferRange,1353"context = %d, target = %s, offset = %llu, length = %llu, access = %s", CID(context),1354GLenumToString(GLenumGroup::BufferTargetARB, target),1355static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length),1356GLbitfieldToString(GLenumGroup::BufferAccessMask, access).c_str());13571358void *returnValue;1359if (context)1360{1361BufferBinding targetPacked = PackParam<BufferBinding>(target);1362std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1363bool isCallValid = (context->skipValidation() ||1364ValidateMapBufferRange(context, targetPacked, offset, length, access));1365if (isCallValid)1366{1367returnValue = context->mapBufferRange(targetPacked, offset, length, access);1368}1369else1370{1371returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRange, void *>();1372}1373ANGLE_CAPTURE(MapBufferRange, isCallValid, context, targetPacked, offset, length, access,1374returnValue);1375}1376else1377{1378GenerateContextLostErrorOnCurrentGlobalContext();1379returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBufferRange, void *>();1380}1381return returnValue;1382}13831384void GL_APIENTRY GL_RenderbufferStorage(GLenum target,1385GLenum internalformat,1386GLsizei width,1387GLsizei height)1388{1389Context *context = GetValidGlobalContext();1390EVENT(context, GLRenderbufferStorage,1391"context = %d, target = %s, internalformat = %s, width = %d, height = %d", CID(context),1392GLenumToString(GLenumGroup::RenderbufferTarget, target),1393GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height);13941395if (context)1396{1397std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1398bool isCallValid =1399(context->skipValidation() ||1400ValidateRenderbufferStorage(context, target, internalformat, width, height));1401if (isCallValid)1402{1403context->renderbufferStorage(target, internalformat, width, height);1404}1405ANGLE_CAPTURE(RenderbufferStorage, isCallValid, context, target, internalformat, width,1406height);1407}1408else1409{1410GenerateContextLostErrorOnCurrentGlobalContext();1411}1412}14131414void GL_APIENTRY GL_RenderbufferStorageMultisample(GLenum target,1415GLsizei samples,1416GLenum internalformat,1417GLsizei width,1418GLsizei height)1419{1420Context *context = GetValidGlobalContext();1421EVENT(context, GLRenderbufferStorageMultisample,1422"context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d",1423CID(context), GLenumToString(GLenumGroup::RenderbufferTarget, target), samples,1424GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height);14251426if (context)1427{1428std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1429bool isCallValid = (context->skipValidation() ||1430ValidateRenderbufferStorageMultisample(context, target, samples,1431internalformat, width, height));1432if (isCallValid)1433{1434context->renderbufferStorageMultisample(target, samples, internalformat, width, height);1435}1436ANGLE_CAPTURE(RenderbufferStorageMultisample, isCallValid, context, target, samples,1437internalformat, width, height);1438}1439else1440{1441GenerateContextLostErrorOnCurrentGlobalContext();1442}1443}14441445void GL_APIENTRY GL_TexParameterIiv(GLenum target, GLenum pname, const GLint *params)1446{1447Context *context = GetValidGlobalContext();1448EVENT(context, GLTexParameterIiv,1449"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),1450GLenumToString(GLenumGroup::TextureTarget, target),1451GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params);14521453if (context)1454{1455TextureType targetPacked = PackParam<TextureType>(target);1456std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1457bool isCallValid = (context->skipValidation() ||1458ValidateTexParameterIiv(context, targetPacked, pname, params));1459if (isCallValid)1460{1461context->texParameterIiv(targetPacked, pname, params);1462}1463ANGLE_CAPTURE(TexParameterIiv, isCallValid, context, targetPacked, pname, params);1464}1465else1466{1467GenerateContextLostErrorOnCurrentGlobalContext();1468}1469}14701471void GL_APIENTRY GL_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)1472{1473Context *context = GetValidGlobalContext();1474EVENT(context, GLTexParameterIuiv,1475"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),1476GLenumToString(GLenumGroup::TextureTarget, target),1477GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params);14781479if (context)1480{1481TextureType targetPacked = PackParam<TextureType>(target);1482std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1483bool isCallValid = (context->skipValidation() ||1484ValidateTexParameterIuiv(context, targetPacked, pname, params));1485if (isCallValid)1486{1487context->texParameterIuiv(targetPacked, pname, params);1488}1489ANGLE_CAPTURE(TexParameterIuiv, isCallValid, context, targetPacked, pname, params);1490}1491else1492{1493GenerateContextLostErrorOnCurrentGlobalContext();1494}1495}14961497void GL_APIENTRY GL_TransformFeedbackVaryings(GLuint program,1498GLsizei count,1499const GLchar *const *varyings,1500GLenum bufferMode)1501{1502Context *context = GetValidGlobalContext();1503EVENT(context, GLTransformFeedbackVaryings,1504"context = %d, program = %u, count = %d, varyings = 0x%016" PRIxPTR ", bufferMode = %s",1505CID(context), program, count, (uintptr_t)varyings,1506GLenumToString(GLenumGroup::DefaultGroup, bufferMode));15071508if (context)1509{1510ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);1511std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1512bool isCallValid =1513(context->skipValidation() || ValidateTransformFeedbackVaryings(1514context, programPacked, count, varyings, bufferMode));1515if (isCallValid)1516{1517context->transformFeedbackVaryings(programPacked, count, varyings, bufferMode);1518}1519ANGLE_CAPTURE(TransformFeedbackVaryings, isCallValid, context, programPacked, count,1520varyings, bufferMode);1521}1522else1523{1524GenerateContextLostErrorOnCurrentGlobalContext();1525}1526}15271528void GL_APIENTRY GL_Uniform1ui(GLint location, GLuint v0)1529{1530Context *context = GetValidGlobalContext();1531EVENT(context, GLUniform1ui, "context = %d, location = %d, v0 = %u", CID(context), location,1532v0);15331534if (context)1535{1536UniformLocation locationPacked = PackParam<UniformLocation>(location);1537std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1538bool isCallValid =1539(context->skipValidation() || ValidateUniform1ui(context, locationPacked, v0));1540if (isCallValid)1541{1542context->uniform1ui(locationPacked, v0);1543}1544ANGLE_CAPTURE(Uniform1ui, isCallValid, context, locationPacked, v0);1545}1546else1547{1548GenerateContextLostErrorOnCurrentGlobalContext();1549}1550}15511552void GL_APIENTRY GL_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)1553{1554Context *context = GetValidGlobalContext();1555EVENT(context, GLUniform1uiv,1556"context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context),1557location, count, (uintptr_t)value);15581559if (context)1560{1561UniformLocation locationPacked = PackParam<UniformLocation>(location);1562std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1563bool isCallValid = (context->skipValidation() ||1564ValidateUniform1uiv(context, locationPacked, count, value));1565if (isCallValid)1566{1567context->uniform1uiv(locationPacked, count, value);1568}1569ANGLE_CAPTURE(Uniform1uiv, isCallValid, context, locationPacked, count, value);1570}1571else1572{1573GenerateContextLostErrorOnCurrentGlobalContext();1574}1575}15761577void GL_APIENTRY GL_Uniform2ui(GLint location, GLuint v0, GLuint v1)1578{1579Context *context = GetValidGlobalContext();1580EVENT(context, GLUniform2ui, "context = %d, location = %d, v0 = %u, v1 = %u", CID(context),1581location, v0, v1);15821583if (context)1584{1585UniformLocation locationPacked = PackParam<UniformLocation>(location);1586std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1587bool isCallValid =1588(context->skipValidation() || ValidateUniform2ui(context, locationPacked, v0, v1));1589if (isCallValid)1590{1591context->uniform2ui(locationPacked, v0, v1);1592}1593ANGLE_CAPTURE(Uniform2ui, isCallValid, context, locationPacked, v0, v1);1594}1595else1596{1597GenerateContextLostErrorOnCurrentGlobalContext();1598}1599}16001601void GL_APIENTRY GL_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)1602{1603Context *context = GetValidGlobalContext();1604EVENT(context, GLUniform2uiv,1605"context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context),1606location, count, (uintptr_t)value);16071608if (context)1609{1610UniformLocation locationPacked = PackParam<UniformLocation>(location);1611std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1612bool isCallValid = (context->skipValidation() ||1613ValidateUniform2uiv(context, locationPacked, count, value));1614if (isCallValid)1615{1616context->uniform2uiv(locationPacked, count, value);1617}1618ANGLE_CAPTURE(Uniform2uiv, isCallValid, context, locationPacked, count, value);1619}1620else1621{1622GenerateContextLostErrorOnCurrentGlobalContext();1623}1624}16251626void GL_APIENTRY GL_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)1627{1628Context *context = GetValidGlobalContext();1629EVENT(context, GLUniform3ui, "context = %d, location = %d, v0 = %u, v1 = %u, v2 = %u",1630CID(context), location, v0, v1, v2);16311632if (context)1633{1634UniformLocation locationPacked = PackParam<UniformLocation>(location);1635std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1636bool isCallValid =1637(context->skipValidation() || ValidateUniform3ui(context, locationPacked, v0, v1, v2));1638if (isCallValid)1639{1640context->uniform3ui(locationPacked, v0, v1, v2);1641}1642ANGLE_CAPTURE(Uniform3ui, isCallValid, context, locationPacked, v0, v1, v2);1643}1644else1645{1646GenerateContextLostErrorOnCurrentGlobalContext();1647}1648}16491650void GL_APIENTRY GL_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)1651{1652Context *context = GetValidGlobalContext();1653EVENT(context, GLUniform3uiv,1654"context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context),1655location, count, (uintptr_t)value);16561657if (context)1658{1659UniformLocation locationPacked = PackParam<UniformLocation>(location);1660std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1661bool isCallValid = (context->skipValidation() ||1662ValidateUniform3uiv(context, locationPacked, count, value));1663if (isCallValid)1664{1665context->uniform3uiv(locationPacked, count, value);1666}1667ANGLE_CAPTURE(Uniform3uiv, isCallValid, context, locationPacked, count, value);1668}1669else1670{1671GenerateContextLostErrorOnCurrentGlobalContext();1672}1673}16741675void GL_APIENTRY GL_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)1676{1677Context *context = GetValidGlobalContext();1678EVENT(context, GLUniform4ui, "context = %d, location = %d, v0 = %u, v1 = %u, v2 = %u, v3 = %u",1679CID(context), location, v0, v1, v2, v3);16801681if (context)1682{1683UniformLocation locationPacked = PackParam<UniformLocation>(location);1684std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1685bool isCallValid = (context->skipValidation() ||1686ValidateUniform4ui(context, locationPacked, v0, v1, v2, v3));1687if (isCallValid)1688{1689context->uniform4ui(locationPacked, v0, v1, v2, v3);1690}1691ANGLE_CAPTURE(Uniform4ui, isCallValid, context, locationPacked, v0, v1, v2, v3);1692}1693else1694{1695GenerateContextLostErrorOnCurrentGlobalContext();1696}1697}16981699void GL_APIENTRY GL_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)1700{1701Context *context = GetValidGlobalContext();1702EVENT(context, GLUniform4uiv,1703"context = %d, location = %d, count = %d, value = 0x%016" PRIxPTR "", CID(context),1704location, count, (uintptr_t)value);17051706if (context)1707{1708UniformLocation locationPacked = PackParam<UniformLocation>(location);1709std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1710bool isCallValid = (context->skipValidation() ||1711ValidateUniform4uiv(context, locationPacked, count, value));1712if (isCallValid)1713{1714context->uniform4uiv(locationPacked, count, value);1715}1716ANGLE_CAPTURE(Uniform4uiv, isCallValid, context, locationPacked, count, value);1717}1718else1719{1720GenerateContextLostErrorOnCurrentGlobalContext();1721}1722}17231724void GL_APIENTRY GL_VertexAttribI1i(GLuint index, GLint x)1725{1726Context *context = GetValidGlobalContext();1727EVENT(context, GLVertexAttribI1i, "context = %d, index = %u, x = %d", CID(context), index, x);17281729if (context)1730{1731std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1732bool isCallValid =1733(context->skipValidation() || ValidateVertexAttribI1i(context, index, x));1734if (isCallValid)1735{1736context->vertexAttribI1i(index, x);1737}1738ANGLE_CAPTURE(VertexAttribI1i, isCallValid, context, index, x);1739}1740else1741{1742GenerateContextLostErrorOnCurrentGlobalContext();1743}1744}17451746void GL_APIENTRY GL_VertexAttribI1iv(GLuint index, const GLint *v)1747{1748Context *context = GetValidGlobalContext();1749EVENT(context, GLVertexAttribI1iv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",1750CID(context), index, (uintptr_t)v);17511752if (context)1753{1754std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1755bool isCallValid =1756(context->skipValidation() || ValidateVertexAttribI1iv(context, index, v));1757if (isCallValid)1758{1759context->vertexAttribI1iv(index, v);1760}1761ANGLE_CAPTURE(VertexAttribI1iv, isCallValid, context, index, v);1762}1763else1764{1765GenerateContextLostErrorOnCurrentGlobalContext();1766}1767}17681769void GL_APIENTRY GL_VertexAttribI1ui(GLuint index, GLuint x)1770{1771Context *context = GetValidGlobalContext();1772EVENT(context, GLVertexAttribI1ui, "context = %d, index = %u, x = %u", CID(context), index, x);17731774if (context)1775{1776std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1777bool isCallValid =1778(context->skipValidation() || ValidateVertexAttribI1ui(context, index, x));1779if (isCallValid)1780{1781context->vertexAttribI1ui(index, x);1782}1783ANGLE_CAPTURE(VertexAttribI1ui, isCallValid, context, index, x);1784}1785else1786{1787GenerateContextLostErrorOnCurrentGlobalContext();1788}1789}17901791void GL_APIENTRY GL_VertexAttribI1uiv(GLuint index, const GLuint *v)1792{1793Context *context = GetValidGlobalContext();1794EVENT(context, GLVertexAttribI1uiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",1795CID(context), index, (uintptr_t)v);17961797if (context)1798{1799std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1800bool isCallValid =1801(context->skipValidation() || ValidateVertexAttribI1uiv(context, index, v));1802if (isCallValid)1803{1804context->vertexAttribI1uiv(index, v);1805}1806ANGLE_CAPTURE(VertexAttribI1uiv, isCallValid, context, index, v);1807}1808else1809{1810GenerateContextLostErrorOnCurrentGlobalContext();1811}1812}18131814void GL_APIENTRY GL_VertexAttribI2i(GLuint index, GLint x, GLint y)1815{1816Context *context = GetValidGlobalContext();1817EVENT(context, GLVertexAttribI2i, "context = %d, index = %u, x = %d, y = %d", CID(context),1818index, x, y);18191820if (context)1821{1822std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1823bool isCallValid =1824(context->skipValidation() || ValidateVertexAttribI2i(context, index, x, y));1825if (isCallValid)1826{1827context->vertexAttribI2i(index, x, y);1828}1829ANGLE_CAPTURE(VertexAttribI2i, isCallValid, context, index, x, y);1830}1831else1832{1833GenerateContextLostErrorOnCurrentGlobalContext();1834}1835}18361837void GL_APIENTRY GL_VertexAttribI2iv(GLuint index, const GLint *v)1838{1839Context *context = GetValidGlobalContext();1840EVENT(context, GLVertexAttribI2iv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",1841CID(context), index, (uintptr_t)v);18421843if (context)1844{1845std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1846bool isCallValid =1847(context->skipValidation() || ValidateVertexAttribI2iv(context, index, v));1848if (isCallValid)1849{1850context->vertexAttribI2iv(index, v);1851}1852ANGLE_CAPTURE(VertexAttribI2iv, isCallValid, context, index, v);1853}1854else1855{1856GenerateContextLostErrorOnCurrentGlobalContext();1857}1858}18591860void GL_APIENTRY GL_VertexAttribI2ui(GLuint index, GLuint x, GLuint y)1861{1862Context *context = GetValidGlobalContext();1863EVENT(context, GLVertexAttribI2ui, "context = %d, index = %u, x = %u, y = %u", CID(context),1864index, x, y);18651866if (context)1867{1868std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1869bool isCallValid =1870(context->skipValidation() || ValidateVertexAttribI2ui(context, index, x, y));1871if (isCallValid)1872{1873context->vertexAttribI2ui(index, x, y);1874}1875ANGLE_CAPTURE(VertexAttribI2ui, isCallValid, context, index, x, y);1876}1877else1878{1879GenerateContextLostErrorOnCurrentGlobalContext();1880}1881}18821883void GL_APIENTRY GL_VertexAttribI2uiv(GLuint index, const GLuint *v)1884{1885Context *context = GetValidGlobalContext();1886EVENT(context, GLVertexAttribI2uiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",1887CID(context), index, (uintptr_t)v);18881889if (context)1890{1891std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1892bool isCallValid =1893(context->skipValidation() || ValidateVertexAttribI2uiv(context, index, v));1894if (isCallValid)1895{1896context->vertexAttribI2uiv(index, v);1897}1898ANGLE_CAPTURE(VertexAttribI2uiv, isCallValid, context, index, v);1899}1900else1901{1902GenerateContextLostErrorOnCurrentGlobalContext();1903}1904}19051906void GL_APIENTRY GL_VertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)1907{1908Context *context = GetValidGlobalContext();1909EVENT(context, GLVertexAttribI3i, "context = %d, index = %u, x = %d, y = %d, z = %d",1910CID(context), index, x, y, z);19111912if (context)1913{1914std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1915bool isCallValid =1916(context->skipValidation() || ValidateVertexAttribI3i(context, index, x, y, z));1917if (isCallValid)1918{1919context->vertexAttribI3i(index, x, y, z);1920}1921ANGLE_CAPTURE(VertexAttribI3i, isCallValid, context, index, x, y, z);1922}1923else1924{1925GenerateContextLostErrorOnCurrentGlobalContext();1926}1927}19281929void GL_APIENTRY GL_VertexAttribI3iv(GLuint index, const GLint *v)1930{1931Context *context = GetValidGlobalContext();1932EVENT(context, GLVertexAttribI3iv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",1933CID(context), index, (uintptr_t)v);19341935if (context)1936{1937std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1938bool isCallValid =1939(context->skipValidation() || ValidateVertexAttribI3iv(context, index, v));1940if (isCallValid)1941{1942context->vertexAttribI3iv(index, v);1943}1944ANGLE_CAPTURE(VertexAttribI3iv, isCallValid, context, index, v);1945}1946else1947{1948GenerateContextLostErrorOnCurrentGlobalContext();1949}1950}19511952void GL_APIENTRY GL_VertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)1953{1954Context *context = GetValidGlobalContext();1955EVENT(context, GLVertexAttribI3ui, "context = %d, index = %u, x = %u, y = %u, z = %u",1956CID(context), index, x, y, z);19571958if (context)1959{1960std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1961bool isCallValid =1962(context->skipValidation() || ValidateVertexAttribI3ui(context, index, x, y, z));1963if (isCallValid)1964{1965context->vertexAttribI3ui(index, x, y, z);1966}1967ANGLE_CAPTURE(VertexAttribI3ui, isCallValid, context, index, x, y, z);1968}1969else1970{1971GenerateContextLostErrorOnCurrentGlobalContext();1972}1973}19741975void GL_APIENTRY GL_VertexAttribI3uiv(GLuint index, const GLuint *v)1976{1977Context *context = GetValidGlobalContext();1978EVENT(context, GLVertexAttribI3uiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",1979CID(context), index, (uintptr_t)v);19801981if (context)1982{1983std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);1984bool isCallValid =1985(context->skipValidation() || ValidateVertexAttribI3uiv(context, index, v));1986if (isCallValid)1987{1988context->vertexAttribI3uiv(index, v);1989}1990ANGLE_CAPTURE(VertexAttribI3uiv, isCallValid, context, index, v);1991}1992else1993{1994GenerateContextLostErrorOnCurrentGlobalContext();1995}1996}19971998void GL_APIENTRY GL_VertexAttribI4bv(GLuint index, const GLbyte *v)1999{2000Context *context = GetValidGlobalContext();2001EVENT(context, GLVertexAttribI4bv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",2002CID(context), index, (uintptr_t)v);20032004if (context)2005{2006std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2007bool isCallValid =2008(context->skipValidation() || ValidateVertexAttribI4bv(context, index, v));2009if (isCallValid)2010{2011context->vertexAttribI4bv(index, v);2012}2013ANGLE_CAPTURE(VertexAttribI4bv, isCallValid, context, index, v);2014}2015else2016{2017GenerateContextLostErrorOnCurrentGlobalContext();2018}2019}20202021void GL_APIENTRY GL_VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)2022{2023Context *context = GetValidGlobalContext();2024EVENT(context, GLVertexAttribI4i, "context = %d, index = %u, x = %d, y = %d, z = %d, w = %d",2025CID(context), index, x, y, z, w);20262027if (context)2028{2029std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2030bool isCallValid =2031(context->skipValidation() || ValidateVertexAttribI4i(context, index, x, y, z, w));2032if (isCallValid)2033{2034context->vertexAttribI4i(index, x, y, z, w);2035}2036ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, index, x, y, z, w);2037}2038else2039{2040GenerateContextLostErrorOnCurrentGlobalContext();2041}2042}20432044void GL_APIENTRY GL_VertexAttribI4iv(GLuint index, const GLint *v)2045{2046Context *context = GetValidGlobalContext();2047EVENT(context, GLVertexAttribI4iv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",2048CID(context), index, (uintptr_t)v);20492050if (context)2051{2052std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2053bool isCallValid =2054(context->skipValidation() || ValidateVertexAttribI4iv(context, index, v));2055if (isCallValid)2056{2057context->vertexAttribI4iv(index, v);2058}2059ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, index, v);2060}2061else2062{2063GenerateContextLostErrorOnCurrentGlobalContext();2064}2065}20662067void GL_APIENTRY GL_VertexAttribI4sv(GLuint index, const GLshort *v)2068{2069Context *context = GetValidGlobalContext();2070EVENT(context, GLVertexAttribI4sv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",2071CID(context), index, (uintptr_t)v);20722073if (context)2074{2075std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2076bool isCallValid =2077(context->skipValidation() || ValidateVertexAttribI4sv(context, index, v));2078if (isCallValid)2079{2080context->vertexAttribI4sv(index, v);2081}2082ANGLE_CAPTURE(VertexAttribI4sv, isCallValid, context, index, v);2083}2084else2085{2086GenerateContextLostErrorOnCurrentGlobalContext();2087}2088}20892090void GL_APIENTRY GL_VertexAttribI4ubv(GLuint index, const GLubyte *v)2091{2092Context *context = GetValidGlobalContext();2093EVENT(context, GLVertexAttribI4ubv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",2094CID(context), index, (uintptr_t)v);20952096if (context)2097{2098std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2099bool isCallValid =2100(context->skipValidation() || ValidateVertexAttribI4ubv(context, index, v));2101if (isCallValid)2102{2103context->vertexAttribI4ubv(index, v);2104}2105ANGLE_CAPTURE(VertexAttribI4ubv, isCallValid, context, index, v);2106}2107else2108{2109GenerateContextLostErrorOnCurrentGlobalContext();2110}2111}21122113void GL_APIENTRY GL_VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)2114{2115Context *context = GetValidGlobalContext();2116EVENT(context, GLVertexAttribI4ui, "context = %d, index = %u, x = %u, y = %u, z = %u, w = %u",2117CID(context), index, x, y, z, w);21182119if (context)2120{2121std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2122bool isCallValid =2123(context->skipValidation() || ValidateVertexAttribI4ui(context, index, x, y, z, w));2124if (isCallValid)2125{2126context->vertexAttribI4ui(index, x, y, z, w);2127}2128ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, index, x, y, z, w);2129}2130else2131{2132GenerateContextLostErrorOnCurrentGlobalContext();2133}2134}21352136void GL_APIENTRY GL_VertexAttribI4uiv(GLuint index, const GLuint *v)2137{2138Context *context = GetValidGlobalContext();2139EVENT(context, GLVertexAttribI4uiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",2140CID(context), index, (uintptr_t)v);21412142if (context)2143{2144std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2145bool isCallValid =2146(context->skipValidation() || ValidateVertexAttribI4uiv(context, index, v));2147if (isCallValid)2148{2149context->vertexAttribI4uiv(index, v);2150}2151ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, index, v);2152}2153else2154{2155GenerateContextLostErrorOnCurrentGlobalContext();2156}2157}21582159void GL_APIENTRY GL_VertexAttribI4usv(GLuint index, const GLushort *v)2160{2161Context *context = GetValidGlobalContext();2162EVENT(context, GLVertexAttribI4usv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",2163CID(context), index, (uintptr_t)v);21642165if (context)2166{2167std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2168bool isCallValid =2169(context->skipValidation() || ValidateVertexAttribI4usv(context, index, v));2170if (isCallValid)2171{2172context->vertexAttribI4usv(index, v);2173}2174ANGLE_CAPTURE(VertexAttribI4usv, isCallValid, context, index, v);2175}2176else2177{2178GenerateContextLostErrorOnCurrentGlobalContext();2179}2180}21812182void GL_APIENTRY2183GL_VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)2184{2185Context *context = GetValidGlobalContext();2186EVENT(context, GLVertexAttribIPointer,2187"context = %d, index = %u, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR2188"",2189CID(context), index, size, GLenumToString(GLenumGroup::VertexAttribPointerType, type),2190stride, (uintptr_t)pointer);21912192if (context)2193{2194VertexAttribType typePacked = PackParam<VertexAttribType>(type);2195std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2196bool isCallValid =2197(context->skipValidation() ||2198ValidateVertexAttribIPointer(context, index, size, typePacked, stride, pointer));2199if (isCallValid)2200{2201context->vertexAttribIPointer(index, size, typePacked, stride, pointer);2202}2203ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, index, size, typePacked, stride,2204pointer);2205}2206else2207{2208GenerateContextLostErrorOnCurrentGlobalContext();2209}2210}22112212// GL 3.12213void GL_APIENTRY GL_CopyBufferSubData(GLenum readTarget,2214GLenum writeTarget,2215GLintptr readOffset,2216GLintptr writeOffset,2217GLsizeiptr size)2218{2219Context *context = GetValidGlobalContext();2220EVENT(context, GLCopyBufferSubData,2221"context = %d, readTarget = %s, writeTarget = %s, readOffset = %llu, writeOffset = %llu, "2222"size = %llu",2223CID(context), GLenumToString(GLenumGroup::CopyBufferSubDataTarget, readTarget),2224GLenumToString(GLenumGroup::CopyBufferSubDataTarget, writeTarget),2225static_cast<unsigned long long>(readOffset), static_cast<unsigned long long>(writeOffset),2226static_cast<unsigned long long>(size));22272228if (context)2229{2230BufferBinding readTargetPacked = PackParam<BufferBinding>(readTarget);2231BufferBinding writeTargetPacked = PackParam<BufferBinding>(writeTarget);2232std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2233bool isCallValid = (context->skipValidation() ||2234ValidateCopyBufferSubData(context, readTargetPacked, writeTargetPacked,2235readOffset, writeOffset, size));2236if (isCallValid)2237{2238context->copyBufferSubData(readTargetPacked, writeTargetPacked, readOffset, writeOffset,2239size);2240}2241ANGLE_CAPTURE(CopyBufferSubData, isCallValid, context, readTargetPacked, writeTargetPacked,2242readOffset, writeOffset, size);2243}2244else2245{2246GenerateContextLostErrorOnCurrentGlobalContext();2247}2248}22492250void GL_APIENTRY GL_DrawArraysInstanced(GLenum mode,2251GLint first,2252GLsizei count,2253GLsizei instancecount)2254{2255Context *context = GetValidGlobalContext();2256EVENT(context, GLDrawArraysInstanced,2257"context = %d, mode = %s, first = %d, count = %d, instancecount = %d", CID(context),2258GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, instancecount);22592260if (context)2261{2262PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);2263std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2264bool isCallValid =2265(context->skipValidation() ||2266ValidateDrawArraysInstanced(context, modePacked, first, count, instancecount));2267if (isCallValid)2268{2269context->drawArraysInstanced(modePacked, first, count, instancecount);2270}2271ANGLE_CAPTURE(DrawArraysInstanced, isCallValid, context, modePacked, first, count,2272instancecount);2273}2274else2275{2276GenerateContextLostErrorOnCurrentGlobalContext();2277}2278}22792280void GL_APIENTRY GL_DrawElementsInstanced(GLenum mode,2281GLsizei count,2282GLenum type,2283const void *indices,2284GLsizei instancecount)2285{2286Context *context = GetValidGlobalContext();2287EVENT(context, GLDrawElementsInstanced,2288"context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR2289", instancecount = %d",2290CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count,2291GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount);22922293if (context)2294{2295PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);2296DrawElementsType typePacked = PackParam<DrawElementsType>(type);2297std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2298bool isCallValid = (context->skipValidation() ||2299ValidateDrawElementsInstanced(context, modePacked, count, typePacked,2300indices, instancecount));2301if (isCallValid)2302{2303context->drawElementsInstanced(modePacked, count, typePacked, indices, instancecount);2304}2305ANGLE_CAPTURE(DrawElementsInstanced, isCallValid, context, modePacked, count, typePacked,2306indices, instancecount);2307}2308else2309{2310GenerateContextLostErrorOnCurrentGlobalContext();2311}2312}23132314void GL_APIENTRY GL_GetActiveUniformBlockName(GLuint program,2315GLuint uniformBlockIndex,2316GLsizei bufSize,2317GLsizei *length,2318GLchar *uniformBlockName)2319{2320Context *context = GetValidGlobalContext();2321EVENT(2322context, GLGetActiveUniformBlockName,2323"context = %d, program = %u, uniformBlockIndex = %u, bufSize = %d, length = 0x%016" PRIxPTR2324", uniformBlockName = 0x%016" PRIxPTR "",2325CID(context), program, uniformBlockIndex, bufSize, (uintptr_t)length,2326(uintptr_t)uniformBlockName);23272328if (context)2329{2330ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);2331UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex);2332std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2333bool isCallValid =2334(context->skipValidation() ||2335ValidateGetActiveUniformBlockName(context, programPacked, uniformBlockIndexPacked,2336bufSize, length, uniformBlockName));2337if (isCallValid)2338{2339context->getActiveUniformBlockName(programPacked, uniformBlockIndexPacked, bufSize,2340length, uniformBlockName);2341}2342ANGLE_CAPTURE(GetActiveUniformBlockName, isCallValid, context, programPacked,2343uniformBlockIndexPacked, bufSize, length, uniformBlockName);2344}2345else2346{2347GenerateContextLostErrorOnCurrentGlobalContext();2348}2349}23502351void GL_APIENTRY GL_GetActiveUniformBlockiv(GLuint program,2352GLuint uniformBlockIndex,2353GLenum pname,2354GLint *params)2355{2356Context *context = GetValidGlobalContext();2357EVENT(context, GLGetActiveUniformBlockiv,2358"context = %d, program = %u, uniformBlockIndex = %u, pname = %s, params = 0x%016" PRIxPTR2359"",2360CID(context), program, uniformBlockIndex,2361GLenumToString(GLenumGroup::UniformBlockPName, pname), (uintptr_t)params);23622363if (context)2364{2365ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);2366UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex);2367std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2368bool isCallValid = (context->skipValidation() ||2369ValidateGetActiveUniformBlockiv(2370context, programPacked, uniformBlockIndexPacked, pname, params));2371if (isCallValid)2372{2373context->getActiveUniformBlockiv(programPacked, uniformBlockIndexPacked, pname, params);2374}2375ANGLE_CAPTURE(GetActiveUniformBlockiv, isCallValid, context, programPacked,2376uniformBlockIndexPacked, pname, params);2377}2378else2379{2380GenerateContextLostErrorOnCurrentGlobalContext();2381}2382}23832384void GL_APIENTRY GL_GetActiveUniformName(GLuint program,2385GLuint uniformIndex,2386GLsizei bufSize,2387GLsizei *length,2388GLchar *uniformName)2389{2390Context *context = GetValidGlobalContext();2391EVENT(context, GLGetActiveUniformName,2392"context = %d, program = %u, uniformIndex = %u, bufSize = %d, length = 0x%016" PRIxPTR2393", uniformName = 0x%016" PRIxPTR "",2394CID(context), program, uniformIndex, bufSize, (uintptr_t)length, (uintptr_t)uniformName);23952396if (context)2397{2398ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);2399std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2400bool isCallValid = (context->skipValidation() ||2401ValidateGetActiveUniformName(context, programPacked, uniformIndex,2402bufSize, length, uniformName));2403if (isCallValid)2404{2405context->getActiveUniformName(programPacked, uniformIndex, bufSize, length,2406uniformName);2407}2408ANGLE_CAPTURE(GetActiveUniformName, isCallValid, context, programPacked, uniformIndex,2409bufSize, length, uniformName);2410}2411else2412{2413GenerateContextLostErrorOnCurrentGlobalContext();2414}2415}24162417void GL_APIENTRY GL_GetActiveUniformsiv(GLuint program,2418GLsizei uniformCount,2419const GLuint *uniformIndices,2420GLenum pname,2421GLint *params)2422{2423Context *context = GetValidGlobalContext();2424EVENT(context, GLGetActiveUniformsiv,2425"context = %d, program = %u, uniformCount = %d, uniformIndices = 0x%016" PRIxPTR2426", pname = %s, params = 0x%016" PRIxPTR "",2427CID(context), program, uniformCount, (uintptr_t)uniformIndices,2428GLenumToString(GLenumGroup::UniformPName, pname), (uintptr_t)params);24292430if (context)2431{2432ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);2433std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2434bool isCallValid = (context->skipValidation() ||2435ValidateGetActiveUniformsiv(context, programPacked, uniformCount,2436uniformIndices, pname, params));2437if (isCallValid)2438{2439context->getActiveUniformsiv(programPacked, uniformCount, uniformIndices, pname,2440params);2441}2442ANGLE_CAPTURE(GetActiveUniformsiv, isCallValid, context, programPacked, uniformCount,2443uniformIndices, pname, params);2444}2445else2446{2447GenerateContextLostErrorOnCurrentGlobalContext();2448}2449}24502451GLuint GL_APIENTRY GL_GetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)2452{2453Context *context = GetValidGlobalContext();2454EVENT(context, GLGetUniformBlockIndex,2455"context = %d, program = %u, uniformBlockName = 0x%016" PRIxPTR "", CID(context), program,2456(uintptr_t)uniformBlockName);24572458GLuint returnValue;2459if (context)2460{2461ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);2462std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2463bool isCallValid = (context->skipValidation() ||2464ValidateGetUniformBlockIndex(context, programPacked, uniformBlockName));2465if (isCallValid)2466{2467returnValue = context->getUniformBlockIndex(programPacked, uniformBlockName);2468}2469else2470{2471returnValue =2472GetDefaultReturnValue<angle::EntryPoint::GLGetUniformBlockIndex, GLuint>();2473}2474ANGLE_CAPTURE(GetUniformBlockIndex, isCallValid, context, programPacked, uniformBlockName,2475returnValue);2476}2477else2478{2479GenerateContextLostErrorOnCurrentGlobalContext();2480returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetUniformBlockIndex, GLuint>();2481}2482return returnValue;2483}24842485void GL_APIENTRY GL_GetUniformIndices(GLuint program,2486GLsizei uniformCount,2487const GLchar *const *uniformNames,2488GLuint *uniformIndices)2489{2490Context *context = GetValidGlobalContext();2491EVENT(context, GLGetUniformIndices,2492"context = %d, program = %u, uniformCount = %d, uniformNames = 0x%016" PRIxPTR2493", uniformIndices = 0x%016" PRIxPTR "",2494CID(context), program, uniformCount, (uintptr_t)uniformNames, (uintptr_t)uniformIndices);24952496if (context)2497{2498ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);2499std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2500bool isCallValid = (context->skipValidation() ||2501ValidateGetUniformIndices(context, programPacked, uniformCount,2502uniformNames, uniformIndices));2503if (isCallValid)2504{2505context->getUniformIndices(programPacked, uniformCount, uniformNames, uniformIndices);2506}2507ANGLE_CAPTURE(GetUniformIndices, isCallValid, context, programPacked, uniformCount,2508uniformNames, uniformIndices);2509}2510else2511{2512GenerateContextLostErrorOnCurrentGlobalContext();2513}2514}25152516void GL_APIENTRY GL_PrimitiveRestartIndex(GLuint index)2517{2518Context *context = GetValidGlobalContext();2519EVENT(context, GLPrimitiveRestartIndex, "context = %d, index = %u", CID(context), index);25202521if (context)2522{2523std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2524bool isCallValid =2525(context->skipValidation() || ValidatePrimitiveRestartIndex(context, index));2526if (isCallValid)2527{2528context->primitiveRestartIndex(index);2529}2530ANGLE_CAPTURE(PrimitiveRestartIndex, isCallValid, context, index);2531}2532else2533{2534GenerateContextLostErrorOnCurrentGlobalContext();2535}2536}25372538void GL_APIENTRY GL_TexBuffer(GLenum target, GLenum internalformat, GLuint buffer)2539{2540Context *context = GetValidGlobalContext();2541EVENT(context, GLTexBuffer, "context = %d, target = %s, internalformat = %s, buffer = %u",2542CID(context), GLenumToString(GLenumGroup::TextureTarget, target),2543GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer);25442545if (context)2546{2547TextureType targetPacked = PackParam<TextureType>(target);2548BufferID bufferPacked = PackParam<BufferID>(buffer);2549std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2550bool isCallValid = (context->skipValidation() ||2551ValidateTexBuffer(context, targetPacked, internalformat, bufferPacked));2552if (isCallValid)2553{2554context->texBuffer(targetPacked, internalformat, bufferPacked);2555}2556ANGLE_CAPTURE(TexBuffer, isCallValid, context, targetPacked, internalformat, bufferPacked);2557}2558else2559{2560GenerateContextLostErrorOnCurrentGlobalContext();2561}2562}25632564void GL_APIENTRY GL_UniformBlockBinding(GLuint program,2565GLuint uniformBlockIndex,2566GLuint uniformBlockBinding)2567{2568Context *context = GetValidGlobalContext();2569EVENT(context, GLUniformBlockBinding,2570"context = %d, program = %u, uniformBlockIndex = %u, uniformBlockBinding = %u",2571CID(context), program, uniformBlockIndex, uniformBlockBinding);25722573if (context)2574{2575ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);2576UniformBlockIndex uniformBlockIndexPacked = PackParam<UniformBlockIndex>(uniformBlockIndex);2577std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2578bool isCallValid =2579(context->skipValidation() ||2580ValidateUniformBlockBinding(context, programPacked, uniformBlockIndexPacked,2581uniformBlockBinding));2582if (isCallValid)2583{2584context->uniformBlockBinding(programPacked, uniformBlockIndexPacked,2585uniformBlockBinding);2586}2587ANGLE_CAPTURE(UniformBlockBinding, isCallValid, context, programPacked,2588uniformBlockIndexPacked, uniformBlockBinding);2589}2590else2591{2592GenerateContextLostErrorOnCurrentGlobalContext();2593}2594}25952596// GL 3.22597GLenum GL_APIENTRY GL_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)2598{2599Context *context = GetValidGlobalContext();2600EVENT(context, GLClientWaitSync,2601"context = %d, sync = 0x%016" PRIxPTR ", flags = %s, timeout = %llu", CID(context),2602(uintptr_t)sync, GLbitfieldToString(GLenumGroup::SyncObjectMask, flags).c_str(),2603static_cast<unsigned long long>(timeout));26042605GLenum returnValue;2606if (context)2607{2608std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2609bool isCallValid =2610(context->skipValidation() || ValidateClientWaitSync(context, sync, flags, timeout));2611if (isCallValid)2612{2613returnValue = context->clientWaitSync(sync, flags, timeout);2614}2615else2616{2617returnValue = GetDefaultReturnValue<angle::EntryPoint::GLClientWaitSync, GLenum>();2618}2619ANGLE_CAPTURE(ClientWaitSync, isCallValid, context, sync, flags, timeout, returnValue);2620}2621else2622{2623GenerateContextLostErrorOnCurrentGlobalContext();2624returnValue = GetDefaultReturnValue<angle::EntryPoint::GLClientWaitSync, GLenum>();2625}2626return returnValue;2627}26282629void GL_APIENTRY GL_DeleteSync(GLsync sync)2630{2631Context *context = GetValidGlobalContext();2632EVENT(context, GLDeleteSync, "context = %d, sync = 0x%016" PRIxPTR "", CID(context),2633(uintptr_t)sync);26342635if (context)2636{2637std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2638bool isCallValid = (context->skipValidation() || ValidateDeleteSync(context, sync));2639if (isCallValid)2640{2641context->deleteSync(sync);2642}2643ANGLE_CAPTURE(DeleteSync, isCallValid, context, sync);2644}2645else2646{2647GenerateContextLostErrorOnCurrentGlobalContext();2648}2649}26502651void GL_APIENTRY GL_DrawElementsBaseVertex(GLenum mode,2652GLsizei count,2653GLenum type,2654const void *indices,2655GLint basevertex)2656{2657Context *context = GetValidGlobalContext();2658EVENT(context, GLDrawElementsBaseVertex,2659"context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR2660", basevertex = %d",2661CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count,2662GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex);26632664if (context)2665{2666PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);2667DrawElementsType typePacked = PackParam<DrawElementsType>(type);2668std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2669bool isCallValid = (context->skipValidation() ||2670ValidateDrawElementsBaseVertex(context, modePacked, count, typePacked,2671indices, basevertex));2672if (isCallValid)2673{2674context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex);2675}2676ANGLE_CAPTURE(DrawElementsBaseVertex, isCallValid, context, modePacked, count, typePacked,2677indices, basevertex);2678}2679else2680{2681GenerateContextLostErrorOnCurrentGlobalContext();2682}2683}26842685void GL_APIENTRY GL_DrawElementsInstancedBaseVertex(GLenum mode,2686GLsizei count,2687GLenum type,2688const void *indices,2689GLsizei instancecount,2690GLint basevertex)2691{2692Context *context = GetValidGlobalContext();2693EVENT(context, GLDrawElementsInstancedBaseVertex,2694"context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR2695", instancecount = %d, basevertex = %d",2696CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count,2697GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount,2698basevertex);26992700if (context)2701{2702PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);2703DrawElementsType typePacked = PackParam<DrawElementsType>(type);2704std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2705bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertex(2706context, modePacked, count, typePacked,2707indices, instancecount, basevertex));2708if (isCallValid)2709{2710context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices,2711instancecount, basevertex);2712}2713ANGLE_CAPTURE(DrawElementsInstancedBaseVertex, isCallValid, context, modePacked, count,2714typePacked, indices, instancecount, basevertex);2715}2716else2717{2718GenerateContextLostErrorOnCurrentGlobalContext();2719}2720}27212722void GL_APIENTRY GL_DrawRangeElementsBaseVertex(GLenum mode,2723GLuint start,2724GLuint end,2725GLsizei count,2726GLenum type,2727const void *indices,2728GLint basevertex)2729{2730Context *context = GetValidGlobalContext();2731EVENT(context, GLDrawRangeElementsBaseVertex,2732"context = %d, mode = %s, start = %u, end = %u, count = %d, type = %s, indices = "2733"0x%016" PRIxPTR ", basevertex = %d",2734CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count,2735GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex);27362737if (context)2738{2739PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);2740DrawElementsType typePacked = PackParam<DrawElementsType>(type);2741std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2742bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertex(2743context, modePacked, start, end, count,2744typePacked, indices, basevertex));2745if (isCallValid)2746{2747context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices,2748basevertex);2749}2750ANGLE_CAPTURE(DrawRangeElementsBaseVertex, isCallValid, context, modePacked, start, end,2751count, typePacked, indices, basevertex);2752}2753else2754{2755GenerateContextLostErrorOnCurrentGlobalContext();2756}2757}27582759GLsync GL_APIENTRY GL_FenceSync(GLenum condition, GLbitfield flags)2760{2761Context *context = GetValidGlobalContext();2762EVENT(context, GLFenceSync, "context = %d, condition = %s, flags = %s", CID(context),2763GLenumToString(GLenumGroup::SyncCondition, condition),2764GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str());27652766GLsync returnValue;2767if (context)2768{2769std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2770bool isCallValid =2771(context->skipValidation() || ValidateFenceSync(context, condition, flags));2772if (isCallValid)2773{2774returnValue = context->fenceSync(condition, flags);2775}2776else2777{2778returnValue = GetDefaultReturnValue<angle::EntryPoint::GLFenceSync, GLsync>();2779}2780ANGLE_CAPTURE(FenceSync, isCallValid, context, condition, flags, returnValue);2781}2782else2783{2784GenerateContextLostErrorOnCurrentGlobalContext();2785returnValue = GetDefaultReturnValue<angle::EntryPoint::GLFenceSync, GLsync>();2786}2787return returnValue;2788}27892790void GL_APIENTRY GL_FramebufferTexture(GLenum target,2791GLenum attachment,2792GLuint texture,2793GLint level)2794{2795Context *context = GetValidGlobalContext();2796EVENT(context, GLFramebufferTexture,2797"context = %d, target = %s, attachment = %s, texture = %u, level = %d", CID(context),2798GLenumToString(GLenumGroup::FramebufferTarget, target),2799GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level);28002801if (context)2802{2803TextureID texturePacked = PackParam<TextureID>(texture);2804std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2805bool isCallValid =2806(context->skipValidation() ||2807ValidateFramebufferTexture(context, target, attachment, texturePacked, level));2808if (isCallValid)2809{2810context->framebufferTexture(target, attachment, texturePacked, level);2811}2812ANGLE_CAPTURE(FramebufferTexture, isCallValid, context, target, attachment, texturePacked,2813level);2814}2815else2816{2817GenerateContextLostErrorOnCurrentGlobalContext();2818}2819}28202821void GL_APIENTRY GL_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)2822{2823Context *context = GetValidGlobalContext();2824EVENT(context, GLGetBufferParameteri64v,2825"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),2826GLenumToString(GLenumGroup::BufferTargetARB, target),2827GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);28282829if (context)2830{2831BufferBinding targetPacked = PackParam<BufferBinding>(target);2832std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2833bool isCallValid = (context->skipValidation() ||2834ValidateGetBufferParameteri64v(context, targetPacked, pname, params));2835if (isCallValid)2836{2837context->getBufferParameteri64v(targetPacked, pname, params);2838}2839ANGLE_CAPTURE(GetBufferParameteri64v, isCallValid, context, targetPacked, pname, params);2840}2841else2842{2843GenerateContextLostErrorOnCurrentGlobalContext();2844}2845}28462847void GL_APIENTRY GL_GetInteger64i_v(GLenum target, GLuint index, GLint64 *data)2848{2849Context *context = GetValidGlobalContext();2850EVENT(context, GLGetInteger64i_v,2851"context = %d, target = %s, index = %u, data = 0x%016" PRIxPTR "", CID(context),2852GLenumToString(GLenumGroup::TypeEnum, target), index, (uintptr_t)data);28532854if (context)2855{2856std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2857bool isCallValid =2858(context->skipValidation() || ValidateGetInteger64i_v(context, target, index, data));2859if (isCallValid)2860{2861context->getInteger64i_v(target, index, data);2862}2863ANGLE_CAPTURE(GetInteger64i_v, isCallValid, context, target, index, data);2864}2865else2866{2867GenerateContextLostErrorOnCurrentGlobalContext();2868}2869}28702871void GL_APIENTRY GL_GetInteger64v(GLenum pname, GLint64 *data)2872{2873Context *context = GetValidGlobalContext();2874EVENT(context, GLGetInteger64v, "context = %d, pname = %s, data = 0x%016" PRIxPTR "",2875CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data);28762877if (context)2878{2879std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2880bool isCallValid =2881(context->skipValidation() || ValidateGetInteger64v(context, pname, data));2882if (isCallValid)2883{2884context->getInteger64v(pname, data);2885}2886ANGLE_CAPTURE(GetInteger64v, isCallValid, context, pname, data);2887}2888else2889{2890GenerateContextLostErrorOnCurrentGlobalContext();2891}2892}28932894void GL_APIENTRY GL_GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)2895{2896Context *context = GetValidGlobalContext();2897EVENT(context, GLGetMultisamplefv,2898"context = %d, pname = %s, index = %u, val = 0x%016" PRIxPTR "", CID(context),2899GLenumToString(GLenumGroup::DefaultGroup, pname), index, (uintptr_t)val);29002901if (context)2902{2903std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2904bool isCallValid =2905(context->skipValidation() || ValidateGetMultisamplefv(context, pname, index, val));2906if (isCallValid)2907{2908context->getMultisamplefv(pname, index, val);2909}2910ANGLE_CAPTURE(GetMultisamplefv, isCallValid, context, pname, index, val);2911}2912else2913{2914GenerateContextLostErrorOnCurrentGlobalContext();2915}2916}29172918void GL_APIENTRY2919GL_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)2920{2921Context *context = GetGlobalContext();2922EVENT(context, GLGetSynciv,2923"context = %d, sync = 0x%016" PRIxPTR2924", pname = %s, bufSize = %d, length = 0x%016" PRIxPTR ", values = 0x%016" PRIxPTR "",2925CID(context), (uintptr_t)sync, GLenumToString(GLenumGroup::SyncParameterName, pname),2926bufSize, (uintptr_t)length, (uintptr_t)values);29272928if (context)2929{2930std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2931bool isCallValid = (context->skipValidation() ||2932ValidateGetSynciv(context, sync, pname, bufSize, length, values));2933if (isCallValid)2934{2935context->getSynciv(sync, pname, bufSize, length, values);2936}2937ANGLE_CAPTURE(GetSynciv, isCallValid, context, sync, pname, bufSize, length, values);2938}2939else2940{}2941}29422943GLboolean GL_APIENTRY GL_IsSync(GLsync sync)2944{2945Context *context = GetValidGlobalContext();2946EVENT(context, GLIsSync, "context = %d, sync = 0x%016" PRIxPTR "", CID(context),2947(uintptr_t)sync);29482949GLboolean returnValue;2950if (context)2951{2952std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2953bool isCallValid = (context->skipValidation() || ValidateIsSync(context, sync));2954if (isCallValid)2955{2956returnValue = context->isSync(sync);2957}2958else2959{2960returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSync, GLboolean>();2961}2962ANGLE_CAPTURE(IsSync, isCallValid, context, sync, returnValue);2963}2964else2965{2966GenerateContextLostErrorOnCurrentGlobalContext();2967returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSync, GLboolean>();2968}2969return returnValue;2970}29712972void GL_APIENTRY GL_MultiDrawElementsBaseVertex(GLenum mode,2973const GLsizei *count,2974GLenum type,2975const void *const *indices,2976GLsizei drawcount,2977const GLint *basevertex)2978{2979Context *context = GetValidGlobalContext();2980EVENT(context, GLMultiDrawElementsBaseVertex,2981"context = %d, mode = %s, count = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR2982", drawcount = %d, basevertex = 0x%016" PRIxPTR "",2983CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)count,2984GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, drawcount,2985(uintptr_t)basevertex);29862987if (context)2988{2989PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);2990DrawElementsType typePacked = PackParam<DrawElementsType>(type);2991std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);2992bool isCallValid = (context->skipValidation() || ValidateMultiDrawElementsBaseVertex(2993context, modePacked, count, typePacked,2994indices, drawcount, basevertex));2995if (isCallValid)2996{2997context->multiDrawElementsBaseVertex(modePacked, count, typePacked, indices, drawcount,2998basevertex);2999}3000ANGLE_CAPTURE(MultiDrawElementsBaseVertex, isCallValid, context, modePacked, count,3001typePacked, indices, drawcount, basevertex);3002}3003else3004{3005GenerateContextLostErrorOnCurrentGlobalContext();3006}3007}30083009void GL_APIENTRY GL_ProvokingVertex(GLenum mode)3010{3011Context *context = GetValidGlobalContext();3012EVENT(context, GLProvokingVertex, "context = %d, mode = %s", CID(context),3013GLenumToString(GLenumGroup::VertexProvokingMode, mode));30143015if (context)3016{3017ProvokingVertexConvention modePacked = PackParam<ProvokingVertexConvention>(mode);3018std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3019bool isCallValid =3020(context->skipValidation() || ValidateProvokingVertex(context, modePacked));3021if (isCallValid)3022{3023context->provokingVertex(modePacked);3024}3025ANGLE_CAPTURE(ProvokingVertex, isCallValid, context, modePacked);3026}3027else3028{3029GenerateContextLostErrorOnCurrentGlobalContext();3030}3031}30323033void GL_APIENTRY GL_SampleMaski(GLuint maskNumber, GLbitfield mask)3034{3035Context *context = GetValidGlobalContext();3036EVENT(context, GLSampleMaski, "context = %d, maskNumber = %u, mask = %s", CID(context),3037maskNumber, GLbitfieldToString(GLenumGroup::DefaultGroup, mask).c_str());30383039if (context)3040{3041std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3042bool isCallValid =3043(context->skipValidation() || ValidateSampleMaski(context, maskNumber, mask));3044if (isCallValid)3045{3046context->sampleMaski(maskNumber, mask);3047}3048ANGLE_CAPTURE(SampleMaski, isCallValid, context, maskNumber, mask);3049}3050else3051{3052GenerateContextLostErrorOnCurrentGlobalContext();3053}3054}30553056void GL_APIENTRY GL_TexImage2DMultisample(GLenum target,3057GLsizei samples,3058GLenum internalformat,3059GLsizei width,3060GLsizei height,3061GLboolean fixedsamplelocations)3062{3063Context *context = GetValidGlobalContext();3064EVENT(context, GLTexImage2DMultisample,3065"context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, "3066"fixedsamplelocations = %s",3067CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,3068GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height,3069GLbooleanToString(fixedsamplelocations));30703071if (context)3072{3073std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3074bool isCallValid = (context->skipValidation() ||3075ValidateTexImage2DMultisample(context, target, samples, internalformat,3076width, height, fixedsamplelocations));3077if (isCallValid)3078{3079context->texImage2DMultisample(target, samples, internalformat, width, height,3080fixedsamplelocations);3081}3082ANGLE_CAPTURE(TexImage2DMultisample, isCallValid, context, target, samples, internalformat,3083width, height, fixedsamplelocations);3084}3085else3086{3087GenerateContextLostErrorOnCurrentGlobalContext();3088}3089}30903091void GL_APIENTRY GL_TexImage3DMultisample(GLenum target,3092GLsizei samples,3093GLenum internalformat,3094GLsizei width,3095GLsizei height,3096GLsizei depth,3097GLboolean fixedsamplelocations)3098{3099Context *context = GetValidGlobalContext();3100EVENT(context, GLTexImage3DMultisample,3101"context = %d, target = %s, samples = %d, internalformat = %s, width = %d, height = %d, "3102"depth = %d, fixedsamplelocations = %s",3103CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,3104GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth,3105GLbooleanToString(fixedsamplelocations));31063107if (context)3108{3109std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3110bool isCallValid =3111(context->skipValidation() ||3112ValidateTexImage3DMultisample(context, target, samples, internalformat, width, height,3113depth, fixedsamplelocations));3114if (isCallValid)3115{3116context->texImage3DMultisample(target, samples, internalformat, width, height, depth,3117fixedsamplelocations);3118}3119ANGLE_CAPTURE(TexImage3DMultisample, isCallValid, context, target, samples, internalformat,3120width, height, depth, fixedsamplelocations);3121}3122else3123{3124GenerateContextLostErrorOnCurrentGlobalContext();3125}3126}31273128void GL_APIENTRY GL_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)3129{3130Context *context = GetValidGlobalContext();3131EVENT(context, GLWaitSync, "context = %d, sync = 0x%016" PRIxPTR ", flags = %s, timeout = %llu",3132CID(context), (uintptr_t)sync,3133GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str(),3134static_cast<unsigned long long>(timeout));31353136if (context)3137{3138std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3139bool isCallValid =3140(context->skipValidation() || ValidateWaitSync(context, sync, flags, timeout));3141if (isCallValid)3142{3143context->waitSync(sync, flags, timeout);3144}3145ANGLE_CAPTURE(WaitSync, isCallValid, context, sync, flags, timeout);3146}3147else3148{3149GenerateContextLostErrorOnCurrentGlobalContext();3150}3151}31523153// GL 3.33154void GL_APIENTRY GL_BindFragDataLocationIndexed(GLuint program,3155GLuint colorNumber,3156GLuint index,3157const GLchar *name)3158{3159Context *context = GetValidGlobalContext();3160EVENT(context, GLBindFragDataLocationIndexed,3161"context = %d, program = %u, colorNumber = %u, index = %u, name = 0x%016" PRIxPTR "",3162CID(context), program, colorNumber, index, (uintptr_t)name);31633164if (context)3165{3166ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);3167std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3168bool isCallValid =3169(context->skipValidation() ||3170ValidateBindFragDataLocationIndexed(context, programPacked, colorNumber, index, name));3171if (isCallValid)3172{3173context->bindFragDataLocationIndexed(programPacked, colorNumber, index, name);3174}3175ANGLE_CAPTURE(BindFragDataLocationIndexed, isCallValid, context, programPacked, colorNumber,3176index, name);3177}3178else3179{3180GenerateContextLostErrorOnCurrentGlobalContext();3181}3182}31833184void GL_APIENTRY GL_BindSampler(GLuint unit, GLuint sampler)3185{3186Context *context = GetValidGlobalContext();3187EVENT(context, GLBindSampler, "context = %d, unit = %u, sampler = %u", CID(context), unit,3188sampler);31893190if (context)3191{3192SamplerID samplerPacked = PackParam<SamplerID>(sampler);3193std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3194bool isCallValid =3195(context->skipValidation() || ValidateBindSampler(context, unit, samplerPacked));3196if (isCallValid)3197{3198context->bindSampler(unit, samplerPacked);3199}3200ANGLE_CAPTURE(BindSampler, isCallValid, context, unit, samplerPacked);3201}3202else3203{3204GenerateContextLostErrorOnCurrentGlobalContext();3205}3206}32073208void GL_APIENTRY GL_ColorP3ui(GLenum type, GLuint color)3209{3210Context *context = GetValidGlobalContext();3211EVENT(context, GLColorP3ui, "context = %d, type = %s, color = %u", CID(context),3212GLenumToString(GLenumGroup::ColorPointerType, type), color);32133214if (context)3215{3216std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3217bool isCallValid = (context->skipValidation() || ValidateColorP3ui(context, type, color));3218if (isCallValid)3219{3220context->colorP3ui(type, color);3221}3222ANGLE_CAPTURE(ColorP3ui, isCallValid, context, type, color);3223}3224else3225{3226GenerateContextLostErrorOnCurrentGlobalContext();3227}3228}32293230void GL_APIENTRY GL_ColorP3uiv(GLenum type, const GLuint *color)3231{3232Context *context = GetValidGlobalContext();3233EVENT(context, GLColorP3uiv, "context = %d, type = %s, color = 0x%016" PRIxPTR "", CID(context),3234GLenumToString(GLenumGroup::ColorPointerType, type), (uintptr_t)color);32353236if (context)3237{3238std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3239bool isCallValid = (context->skipValidation() || ValidateColorP3uiv(context, type, color));3240if (isCallValid)3241{3242context->colorP3uiv(type, color);3243}3244ANGLE_CAPTURE(ColorP3uiv, isCallValid, context, type, color);3245}3246else3247{3248GenerateContextLostErrorOnCurrentGlobalContext();3249}3250}32513252void GL_APIENTRY GL_ColorP4ui(GLenum type, GLuint color)3253{3254Context *context = GetValidGlobalContext();3255EVENT(context, GLColorP4ui, "context = %d, type = %s, color = %u", CID(context),3256GLenumToString(GLenumGroup::ColorPointerType, type), color);32573258if (context)3259{3260std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3261bool isCallValid = (context->skipValidation() || ValidateColorP4ui(context, type, color));3262if (isCallValid)3263{3264context->colorP4ui(type, color);3265}3266ANGLE_CAPTURE(ColorP4ui, isCallValid, context, type, color);3267}3268else3269{3270GenerateContextLostErrorOnCurrentGlobalContext();3271}3272}32733274void GL_APIENTRY GL_ColorP4uiv(GLenum type, const GLuint *color)3275{3276Context *context = GetValidGlobalContext();3277EVENT(context, GLColorP4uiv, "context = %d, type = %s, color = 0x%016" PRIxPTR "", CID(context),3278GLenumToString(GLenumGroup::ColorPointerType, type), (uintptr_t)color);32793280if (context)3281{3282std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3283bool isCallValid = (context->skipValidation() || ValidateColorP4uiv(context, type, color));3284if (isCallValid)3285{3286context->colorP4uiv(type, color);3287}3288ANGLE_CAPTURE(ColorP4uiv, isCallValid, context, type, color);3289}3290else3291{3292GenerateContextLostErrorOnCurrentGlobalContext();3293}3294}32953296void GL_APIENTRY GL_DeleteSamplers(GLsizei count, const GLuint *samplers)3297{3298Context *context = GetValidGlobalContext();3299EVENT(context, GLDeleteSamplers, "context = %d, count = %d, samplers = 0x%016" PRIxPTR "",3300CID(context), count, (uintptr_t)samplers);33013302if (context)3303{3304const SamplerID *samplersPacked = PackParam<const SamplerID *>(samplers);3305std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3306bool isCallValid =3307(context->skipValidation() || ValidateDeleteSamplers(context, count, samplersPacked));3308if (isCallValid)3309{3310context->deleteSamplers(count, samplersPacked);3311}3312ANGLE_CAPTURE(DeleteSamplers, isCallValid, context, count, samplersPacked);3313}3314else3315{3316GenerateContextLostErrorOnCurrentGlobalContext();3317}3318}33193320void GL_APIENTRY GL_GenSamplers(GLsizei count, GLuint *samplers)3321{3322Context *context = GetValidGlobalContext();3323EVENT(context, GLGenSamplers, "context = %d, count = %d, samplers = 0x%016" PRIxPTR "",3324CID(context), count, (uintptr_t)samplers);33253326if (context)3327{3328SamplerID *samplersPacked = PackParam<SamplerID *>(samplers);3329std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3330bool isCallValid =3331(context->skipValidation() || ValidateGenSamplers(context, count, samplersPacked));3332if (isCallValid)3333{3334context->genSamplers(count, samplersPacked);3335}3336ANGLE_CAPTURE(GenSamplers, isCallValid, context, count, samplersPacked);3337}3338else3339{3340GenerateContextLostErrorOnCurrentGlobalContext();3341}3342}33433344GLint GL_APIENTRY GL_GetFragDataIndex(GLuint program, const GLchar *name)3345{3346Context *context = GetValidGlobalContext();3347EVENT(context, GLGetFragDataIndex, "context = %d, program = %u, name = 0x%016" PRIxPTR "",3348CID(context), program, (uintptr_t)name);33493350GLint returnValue;3351if (context)3352{3353ShaderProgramID programPacked = PackParam<ShaderProgramID>(program);3354std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3355bool isCallValid =3356(context->skipValidation() || ValidateGetFragDataIndex(context, programPacked, name));3357if (isCallValid)3358{3359returnValue = context->getFragDataIndex(programPacked, name);3360}3361else3362{3363returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataIndex, GLint>();3364}3365ANGLE_CAPTURE(GetFragDataIndex, isCallValid, context, programPacked, name, returnValue);3366}3367else3368{3369GenerateContextLostErrorOnCurrentGlobalContext();3370returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGetFragDataIndex, GLint>();3371}3372return returnValue;3373}33743375void GL_APIENTRY GL_GetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)3376{3377Context *context = GetGlobalContext();3378EVENT(context, GLGetQueryObjecti64v,3379"context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id,3380GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params);33813382if (context)3383{3384QueryID idPacked = PackParam<QueryID>(id);3385std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3386bool isCallValid = (context->skipValidation() ||3387ValidateGetQueryObjecti64v(context, idPacked, pname, params));3388if (isCallValid)3389{3390context->getQueryObjecti64v(idPacked, pname, params);3391}3392ANGLE_CAPTURE(GetQueryObjecti64v, isCallValid, context, idPacked, pname, params);3393}3394else3395{}3396}33973398void GL_APIENTRY GL_GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)3399{3400Context *context = GetValidGlobalContext();3401EVENT(context, GLGetQueryObjectui64v,3402"context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id,3403GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params);34043405if (context)3406{3407QueryID idPacked = PackParam<QueryID>(id);3408std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3409bool isCallValid = (context->skipValidation() ||3410ValidateGetQueryObjectui64v(context, idPacked, pname, params));3411if (isCallValid)3412{3413context->getQueryObjectui64v(idPacked, pname, params);3414}3415ANGLE_CAPTURE(GetQueryObjectui64v, isCallValid, context, idPacked, pname, params);3416}3417else3418{3419GenerateContextLostErrorOnCurrentGlobalContext();3420}3421}34223423void GL_APIENTRY GL_GetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)3424{3425Context *context = GetValidGlobalContext();3426EVENT(context, GLGetSamplerParameterIiv,3427"context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context),3428sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params);34293430if (context)3431{3432SamplerID samplerPacked = PackParam<SamplerID>(sampler);3433std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3434bool isCallValid = (context->skipValidation() ||3435ValidateGetSamplerParameterIiv(context, samplerPacked, pname, params));3436if (isCallValid)3437{3438context->getSamplerParameterIiv(samplerPacked, pname, params);3439}3440ANGLE_CAPTURE(GetSamplerParameterIiv, isCallValid, context, samplerPacked, pname, params);3441}3442else3443{3444GenerateContextLostErrorOnCurrentGlobalContext();3445}3446}34473448void GL_APIENTRY GL_GetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)3449{3450Context *context = GetValidGlobalContext();3451EVENT(context, GLGetSamplerParameterIuiv,3452"context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context),3453sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params);34543455if (context)3456{3457SamplerID samplerPacked = PackParam<SamplerID>(sampler);3458std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3459bool isCallValid = (context->skipValidation() ||3460ValidateGetSamplerParameterIuiv(context, samplerPacked, pname, params));3461if (isCallValid)3462{3463context->getSamplerParameterIuiv(samplerPacked, pname, params);3464}3465ANGLE_CAPTURE(GetSamplerParameterIuiv, isCallValid, context, samplerPacked, pname, params);3466}3467else3468{3469GenerateContextLostErrorOnCurrentGlobalContext();3470}3471}34723473void GL_APIENTRY GL_GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)3474{3475Context *context = GetValidGlobalContext();3476EVENT(context, GLGetSamplerParameterfv,3477"context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context),3478sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params);34793480if (context)3481{3482SamplerID samplerPacked = PackParam<SamplerID>(sampler);3483std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3484bool isCallValid = (context->skipValidation() ||3485ValidateGetSamplerParameterfv(context, samplerPacked, pname, params));3486if (isCallValid)3487{3488context->getSamplerParameterfv(samplerPacked, pname, params);3489}3490ANGLE_CAPTURE(GetSamplerParameterfv, isCallValid, context, samplerPacked, pname, params);3491}3492else3493{3494GenerateContextLostErrorOnCurrentGlobalContext();3495}3496}34973498void GL_APIENTRY GL_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)3499{3500Context *context = GetValidGlobalContext();3501EVENT(context, GLGetSamplerParameteriv,3502"context = %d, sampler = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context),3503sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)params);35043505if (context)3506{3507SamplerID samplerPacked = PackParam<SamplerID>(sampler);3508std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3509bool isCallValid = (context->skipValidation() ||3510ValidateGetSamplerParameteriv(context, samplerPacked, pname, params));3511if (isCallValid)3512{3513context->getSamplerParameteriv(samplerPacked, pname, params);3514}3515ANGLE_CAPTURE(GetSamplerParameteriv, isCallValid, context, samplerPacked, pname, params);3516}3517else3518{3519GenerateContextLostErrorOnCurrentGlobalContext();3520}3521}35223523GLboolean GL_APIENTRY GL_IsSampler(GLuint sampler)3524{3525Context *context = GetValidGlobalContext();3526EVENT(context, GLIsSampler, "context = %d, sampler = %u", CID(context), sampler);35273528GLboolean returnValue;3529if (context)3530{3531SamplerID samplerPacked = PackParam<SamplerID>(sampler);3532std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3533bool isCallValid = (context->skipValidation() || ValidateIsSampler(context, samplerPacked));3534if (isCallValid)3535{3536returnValue = context->isSampler(samplerPacked);3537}3538else3539{3540returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSampler, GLboolean>();3541}3542ANGLE_CAPTURE(IsSampler, isCallValid, context, samplerPacked, returnValue);3543}3544else3545{3546GenerateContextLostErrorOnCurrentGlobalContext();3547returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsSampler, GLboolean>();3548}3549return returnValue;3550}35513552void GL_APIENTRY GL_MultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)3553{3554Context *context = GetValidGlobalContext();3555EVENT(context, GLMultiTexCoordP1ui, "context = %d, texture = %s, type = %s, coords = %u",3556CID(context), GLenumToString(GLenumGroup::TextureUnit, texture),3557GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);35583559if (context)3560{3561std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3562bool isCallValid = (context->skipValidation() ||3563ValidateMultiTexCoordP1ui(context, texture, type, coords));3564if (isCallValid)3565{3566context->multiTexCoordP1ui(texture, type, coords);3567}3568ANGLE_CAPTURE(MultiTexCoordP1ui, isCallValid, context, texture, type, coords);3569}3570else3571{3572GenerateContextLostErrorOnCurrentGlobalContext();3573}3574}35753576void GL_APIENTRY GL_MultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)3577{3578Context *context = GetValidGlobalContext();3579EVENT(context, GLMultiTexCoordP1uiv,3580"context = %d, texture = %s, type = %s, coords = 0x%016" PRIxPTR "", CID(context),3581GLenumToString(GLenumGroup::TextureUnit, texture),3582GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);35833584if (context)3585{3586std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3587bool isCallValid = (context->skipValidation() ||3588ValidateMultiTexCoordP1uiv(context, texture, type, coords));3589if (isCallValid)3590{3591context->multiTexCoordP1uiv(texture, type, coords);3592}3593ANGLE_CAPTURE(MultiTexCoordP1uiv, isCallValid, context, texture, type, coords);3594}3595else3596{3597GenerateContextLostErrorOnCurrentGlobalContext();3598}3599}36003601void GL_APIENTRY GL_MultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)3602{3603Context *context = GetValidGlobalContext();3604EVENT(context, GLMultiTexCoordP2ui, "context = %d, texture = %s, type = %s, coords = %u",3605CID(context), GLenumToString(GLenumGroup::TextureUnit, texture),3606GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);36073608if (context)3609{3610std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3611bool isCallValid = (context->skipValidation() ||3612ValidateMultiTexCoordP2ui(context, texture, type, coords));3613if (isCallValid)3614{3615context->multiTexCoordP2ui(texture, type, coords);3616}3617ANGLE_CAPTURE(MultiTexCoordP2ui, isCallValid, context, texture, type, coords);3618}3619else3620{3621GenerateContextLostErrorOnCurrentGlobalContext();3622}3623}36243625void GL_APIENTRY GL_MultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)3626{3627Context *context = GetValidGlobalContext();3628EVENT(context, GLMultiTexCoordP2uiv,3629"context = %d, texture = %s, type = %s, coords = 0x%016" PRIxPTR "", CID(context),3630GLenumToString(GLenumGroup::TextureUnit, texture),3631GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);36323633if (context)3634{3635std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3636bool isCallValid = (context->skipValidation() ||3637ValidateMultiTexCoordP2uiv(context, texture, type, coords));3638if (isCallValid)3639{3640context->multiTexCoordP2uiv(texture, type, coords);3641}3642ANGLE_CAPTURE(MultiTexCoordP2uiv, isCallValid, context, texture, type, coords);3643}3644else3645{3646GenerateContextLostErrorOnCurrentGlobalContext();3647}3648}36493650void GL_APIENTRY GL_MultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)3651{3652Context *context = GetValidGlobalContext();3653EVENT(context, GLMultiTexCoordP3ui, "context = %d, texture = %s, type = %s, coords = %u",3654CID(context), GLenumToString(GLenumGroup::TextureUnit, texture),3655GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);36563657if (context)3658{3659std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3660bool isCallValid = (context->skipValidation() ||3661ValidateMultiTexCoordP3ui(context, texture, type, coords));3662if (isCallValid)3663{3664context->multiTexCoordP3ui(texture, type, coords);3665}3666ANGLE_CAPTURE(MultiTexCoordP3ui, isCallValid, context, texture, type, coords);3667}3668else3669{3670GenerateContextLostErrorOnCurrentGlobalContext();3671}3672}36733674void GL_APIENTRY GL_MultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)3675{3676Context *context = GetValidGlobalContext();3677EVENT(context, GLMultiTexCoordP3uiv,3678"context = %d, texture = %s, type = %s, coords = 0x%016" PRIxPTR "", CID(context),3679GLenumToString(GLenumGroup::TextureUnit, texture),3680GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);36813682if (context)3683{3684std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3685bool isCallValid = (context->skipValidation() ||3686ValidateMultiTexCoordP3uiv(context, texture, type, coords));3687if (isCallValid)3688{3689context->multiTexCoordP3uiv(texture, type, coords);3690}3691ANGLE_CAPTURE(MultiTexCoordP3uiv, isCallValid, context, texture, type, coords);3692}3693else3694{3695GenerateContextLostErrorOnCurrentGlobalContext();3696}3697}36983699void GL_APIENTRY GL_MultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)3700{3701Context *context = GetValidGlobalContext();3702EVENT(context, GLMultiTexCoordP4ui, "context = %d, texture = %s, type = %s, coords = %u",3703CID(context), GLenumToString(GLenumGroup::TextureUnit, texture),3704GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);37053706if (context)3707{3708std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3709bool isCallValid = (context->skipValidation() ||3710ValidateMultiTexCoordP4ui(context, texture, type, coords));3711if (isCallValid)3712{3713context->multiTexCoordP4ui(texture, type, coords);3714}3715ANGLE_CAPTURE(MultiTexCoordP4ui, isCallValid, context, texture, type, coords);3716}3717else3718{3719GenerateContextLostErrorOnCurrentGlobalContext();3720}3721}37223723void GL_APIENTRY GL_MultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)3724{3725Context *context = GetValidGlobalContext();3726EVENT(context, GLMultiTexCoordP4uiv,3727"context = %d, texture = %s, type = %s, coords = 0x%016" PRIxPTR "", CID(context),3728GLenumToString(GLenumGroup::TextureUnit, texture),3729GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);37303731if (context)3732{3733std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3734bool isCallValid = (context->skipValidation() ||3735ValidateMultiTexCoordP4uiv(context, texture, type, coords));3736if (isCallValid)3737{3738context->multiTexCoordP4uiv(texture, type, coords);3739}3740ANGLE_CAPTURE(MultiTexCoordP4uiv, isCallValid, context, texture, type, coords);3741}3742else3743{3744GenerateContextLostErrorOnCurrentGlobalContext();3745}3746}37473748void GL_APIENTRY GL_NormalP3ui(GLenum type, GLuint coords)3749{3750Context *context = GetValidGlobalContext();3751EVENT(context, GLNormalP3ui, "context = %d, type = %s, coords = %u", CID(context),3752GLenumToString(GLenumGroup::NormalPointerType, type), coords);37533754if (context)3755{3756std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3757bool isCallValid = (context->skipValidation() || ValidateNormalP3ui(context, type, coords));3758if (isCallValid)3759{3760context->normalP3ui(type, coords);3761}3762ANGLE_CAPTURE(NormalP3ui, isCallValid, context, type, coords);3763}3764else3765{3766GenerateContextLostErrorOnCurrentGlobalContext();3767}3768}37693770void GL_APIENTRY GL_NormalP3uiv(GLenum type, const GLuint *coords)3771{3772Context *context = GetValidGlobalContext();3773EVENT(context, GLNormalP3uiv, "context = %d, type = %s, coords = 0x%016" PRIxPTR "",3774CID(context), GLenumToString(GLenumGroup::NormalPointerType, type), (uintptr_t)coords);37753776if (context)3777{3778std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3779bool isCallValid =3780(context->skipValidation() || ValidateNormalP3uiv(context, type, coords));3781if (isCallValid)3782{3783context->normalP3uiv(type, coords);3784}3785ANGLE_CAPTURE(NormalP3uiv, isCallValid, context, type, coords);3786}3787else3788{3789GenerateContextLostErrorOnCurrentGlobalContext();3790}3791}37923793void GL_APIENTRY GL_QueryCounter(GLuint id, GLenum target)3794{3795Context *context = GetValidGlobalContext();3796EVENT(context, GLQueryCounter, "context = %d, id = %u, target = %s", CID(context), id,3797GLenumToString(GLenumGroup::QueryTarget, target));37983799if (context)3800{3801QueryID idPacked = PackParam<QueryID>(id);3802QueryType targetPacked = PackParam<QueryType>(target);3803std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3804bool isCallValid =3805(context->skipValidation() || ValidateQueryCounter(context, idPacked, targetPacked));3806if (isCallValid)3807{3808context->queryCounter(idPacked, targetPacked);3809}3810ANGLE_CAPTURE(QueryCounter, isCallValid, context, idPacked, targetPacked);3811}3812else3813{3814GenerateContextLostErrorOnCurrentGlobalContext();3815}3816}38173818void GL_APIENTRY GL_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param)3819{3820Context *context = GetValidGlobalContext();3821EVENT(context, GLSamplerParameterIiv,3822"context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context),3823sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param);38243825if (context)3826{3827SamplerID samplerPacked = PackParam<SamplerID>(sampler);3828std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3829bool isCallValid = (context->skipValidation() ||3830ValidateSamplerParameterIiv(context, samplerPacked, pname, param));3831if (isCallValid)3832{3833context->samplerParameterIiv(samplerPacked, pname, param);3834}3835ANGLE_CAPTURE(SamplerParameterIiv, isCallValid, context, samplerPacked, pname, param);3836}3837else3838{3839GenerateContextLostErrorOnCurrentGlobalContext();3840}3841}38423843void GL_APIENTRY GL_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param)3844{3845Context *context = GetValidGlobalContext();3846EVENT(context, GLSamplerParameterIuiv,3847"context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context),3848sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param);38493850if (context)3851{3852SamplerID samplerPacked = PackParam<SamplerID>(sampler);3853std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3854bool isCallValid = (context->skipValidation() ||3855ValidateSamplerParameterIuiv(context, samplerPacked, pname, param));3856if (isCallValid)3857{3858context->samplerParameterIuiv(samplerPacked, pname, param);3859}3860ANGLE_CAPTURE(SamplerParameterIuiv, isCallValid, context, samplerPacked, pname, param);3861}3862else3863{3864GenerateContextLostErrorOnCurrentGlobalContext();3865}3866}38673868void GL_APIENTRY GL_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)3869{3870Context *context = GetValidGlobalContext();3871EVENT(context, GLSamplerParameterf, "context = %d, sampler = %u, pname = %s, param = %f",3872CID(context), sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), param);38733874if (context)3875{3876SamplerID samplerPacked = PackParam<SamplerID>(sampler);3877std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3878bool isCallValid = (context->skipValidation() ||3879ValidateSamplerParameterf(context, samplerPacked, pname, param));3880if (isCallValid)3881{3882context->samplerParameterf(samplerPacked, pname, param);3883}3884ANGLE_CAPTURE(SamplerParameterf, isCallValid, context, samplerPacked, pname, param);3885}3886else3887{3888GenerateContextLostErrorOnCurrentGlobalContext();3889}3890}38913892void GL_APIENTRY GL_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)3893{3894Context *context = GetValidGlobalContext();3895EVENT(context, GLSamplerParameterfv,3896"context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context),3897sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param);38983899if (context)3900{3901SamplerID samplerPacked = PackParam<SamplerID>(sampler);3902std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3903bool isCallValid = (context->skipValidation() ||3904ValidateSamplerParameterfv(context, samplerPacked, pname, param));3905if (isCallValid)3906{3907context->samplerParameterfv(samplerPacked, pname, param);3908}3909ANGLE_CAPTURE(SamplerParameterfv, isCallValid, context, samplerPacked, pname, param);3910}3911else3912{3913GenerateContextLostErrorOnCurrentGlobalContext();3914}3915}39163917void GL_APIENTRY GL_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)3918{3919Context *context = GetValidGlobalContext();3920EVENT(context, GLSamplerParameteri, "context = %d, sampler = %u, pname = %s, param = %d",3921CID(context), sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), param);39223923if (context)3924{3925SamplerID samplerPacked = PackParam<SamplerID>(sampler);3926std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3927bool isCallValid = (context->skipValidation() ||3928ValidateSamplerParameteri(context, samplerPacked, pname, param));3929if (isCallValid)3930{3931context->samplerParameteri(samplerPacked, pname, param);3932}3933ANGLE_CAPTURE(SamplerParameteri, isCallValid, context, samplerPacked, pname, param);3934}3935else3936{3937GenerateContextLostErrorOnCurrentGlobalContext();3938}3939}39403941void GL_APIENTRY GL_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)3942{3943Context *context = GetValidGlobalContext();3944EVENT(context, GLSamplerParameteriv,3945"context = %d, sampler = %u, pname = %s, param = 0x%016" PRIxPTR "", CID(context),3946sampler, GLenumToString(GLenumGroup::SamplerParameterName, pname), (uintptr_t)param);39473948if (context)3949{3950SamplerID samplerPacked = PackParam<SamplerID>(sampler);3951std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3952bool isCallValid = (context->skipValidation() ||3953ValidateSamplerParameteriv(context, samplerPacked, pname, param));3954if (isCallValid)3955{3956context->samplerParameteriv(samplerPacked, pname, param);3957}3958ANGLE_CAPTURE(SamplerParameteriv, isCallValid, context, samplerPacked, pname, param);3959}3960else3961{3962GenerateContextLostErrorOnCurrentGlobalContext();3963}3964}39653966void GL_APIENTRY GL_SecondaryColorP3ui(GLenum type, GLuint color)3967{3968Context *context = GetValidGlobalContext();3969EVENT(context, GLSecondaryColorP3ui, "context = %d, type = %s, color = %u", CID(context),3970GLenumToString(GLenumGroup::ColorPointerType, type), color);39713972if (context)3973{3974std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3975bool isCallValid =3976(context->skipValidation() || ValidateSecondaryColorP3ui(context, type, color));3977if (isCallValid)3978{3979context->secondaryColorP3ui(type, color);3980}3981ANGLE_CAPTURE(SecondaryColorP3ui, isCallValid, context, type, color);3982}3983else3984{3985GenerateContextLostErrorOnCurrentGlobalContext();3986}3987}39883989void GL_APIENTRY GL_SecondaryColorP3uiv(GLenum type, const GLuint *color)3990{3991Context *context = GetValidGlobalContext();3992EVENT(context, GLSecondaryColorP3uiv, "context = %d, type = %s, color = 0x%016" PRIxPTR "",3993CID(context), GLenumToString(GLenumGroup::ColorPointerType, type), (uintptr_t)color);39943995if (context)3996{3997std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);3998bool isCallValid =3999(context->skipValidation() || ValidateSecondaryColorP3uiv(context, type, color));4000if (isCallValid)4001{4002context->secondaryColorP3uiv(type, color);4003}4004ANGLE_CAPTURE(SecondaryColorP3uiv, isCallValid, context, type, color);4005}4006else4007{4008GenerateContextLostErrorOnCurrentGlobalContext();4009}4010}40114012void GL_APIENTRY GL_TexCoordP1ui(GLenum type, GLuint coords)4013{4014Context *context = GetValidGlobalContext();4015EVENT(context, GLTexCoordP1ui, "context = %d, type = %s, coords = %u", CID(context),4016GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);40174018if (context)4019{4020std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4021bool isCallValid =4022(context->skipValidation() || ValidateTexCoordP1ui(context, type, coords));4023if (isCallValid)4024{4025context->texCoordP1ui(type, coords);4026}4027ANGLE_CAPTURE(TexCoordP1ui, isCallValid, context, type, coords);4028}4029else4030{4031GenerateContextLostErrorOnCurrentGlobalContext();4032}4033}40344035void GL_APIENTRY GL_TexCoordP1uiv(GLenum type, const GLuint *coords)4036{4037Context *context = GetValidGlobalContext();4038EVENT(context, GLTexCoordP1uiv, "context = %d, type = %s, coords = 0x%016" PRIxPTR "",4039CID(context), GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);40404041if (context)4042{4043std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4044bool isCallValid =4045(context->skipValidation() || ValidateTexCoordP1uiv(context, type, coords));4046if (isCallValid)4047{4048context->texCoordP1uiv(type, coords);4049}4050ANGLE_CAPTURE(TexCoordP1uiv, isCallValid, context, type, coords);4051}4052else4053{4054GenerateContextLostErrorOnCurrentGlobalContext();4055}4056}40574058void GL_APIENTRY GL_TexCoordP2ui(GLenum type, GLuint coords)4059{4060Context *context = GetValidGlobalContext();4061EVENT(context, GLTexCoordP2ui, "context = %d, type = %s, coords = %u", CID(context),4062GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);40634064if (context)4065{4066std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4067bool isCallValid =4068(context->skipValidation() || ValidateTexCoordP2ui(context, type, coords));4069if (isCallValid)4070{4071context->texCoordP2ui(type, coords);4072}4073ANGLE_CAPTURE(TexCoordP2ui, isCallValid, context, type, coords);4074}4075else4076{4077GenerateContextLostErrorOnCurrentGlobalContext();4078}4079}40804081void GL_APIENTRY GL_TexCoordP2uiv(GLenum type, const GLuint *coords)4082{4083Context *context = GetValidGlobalContext();4084EVENT(context, GLTexCoordP2uiv, "context = %d, type = %s, coords = 0x%016" PRIxPTR "",4085CID(context), GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);40864087if (context)4088{4089std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4090bool isCallValid =4091(context->skipValidation() || ValidateTexCoordP2uiv(context, type, coords));4092if (isCallValid)4093{4094context->texCoordP2uiv(type, coords);4095}4096ANGLE_CAPTURE(TexCoordP2uiv, isCallValid, context, type, coords);4097}4098else4099{4100GenerateContextLostErrorOnCurrentGlobalContext();4101}4102}41034104void GL_APIENTRY GL_TexCoordP3ui(GLenum type, GLuint coords)4105{4106Context *context = GetValidGlobalContext();4107EVENT(context, GLTexCoordP3ui, "context = %d, type = %s, coords = %u", CID(context),4108GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);41094110if (context)4111{4112std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4113bool isCallValid =4114(context->skipValidation() || ValidateTexCoordP3ui(context, type, coords));4115if (isCallValid)4116{4117context->texCoordP3ui(type, coords);4118}4119ANGLE_CAPTURE(TexCoordP3ui, isCallValid, context, type, coords);4120}4121else4122{4123GenerateContextLostErrorOnCurrentGlobalContext();4124}4125}41264127void GL_APIENTRY GL_TexCoordP3uiv(GLenum type, const GLuint *coords)4128{4129Context *context = GetValidGlobalContext();4130EVENT(context, GLTexCoordP3uiv, "context = %d, type = %s, coords = 0x%016" PRIxPTR "",4131CID(context), GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);41324133if (context)4134{4135std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4136bool isCallValid =4137(context->skipValidation() || ValidateTexCoordP3uiv(context, type, coords));4138if (isCallValid)4139{4140context->texCoordP3uiv(type, coords);4141}4142ANGLE_CAPTURE(TexCoordP3uiv, isCallValid, context, type, coords);4143}4144else4145{4146GenerateContextLostErrorOnCurrentGlobalContext();4147}4148}41494150void GL_APIENTRY GL_TexCoordP4ui(GLenum type, GLuint coords)4151{4152Context *context = GetValidGlobalContext();4153EVENT(context, GLTexCoordP4ui, "context = %d, type = %s, coords = %u", CID(context),4154GLenumToString(GLenumGroup::TexCoordPointerType, type), coords);41554156if (context)4157{4158std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4159bool isCallValid =4160(context->skipValidation() || ValidateTexCoordP4ui(context, type, coords));4161if (isCallValid)4162{4163context->texCoordP4ui(type, coords);4164}4165ANGLE_CAPTURE(TexCoordP4ui, isCallValid, context, type, coords);4166}4167else4168{4169GenerateContextLostErrorOnCurrentGlobalContext();4170}4171}41724173void GL_APIENTRY GL_TexCoordP4uiv(GLenum type, const GLuint *coords)4174{4175Context *context = GetValidGlobalContext();4176EVENT(context, GLTexCoordP4uiv, "context = %d, type = %s, coords = 0x%016" PRIxPTR "",4177CID(context), GLenumToString(GLenumGroup::TexCoordPointerType, type), (uintptr_t)coords);41784179if (context)4180{4181std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4182bool isCallValid =4183(context->skipValidation() || ValidateTexCoordP4uiv(context, type, coords));4184if (isCallValid)4185{4186context->texCoordP4uiv(type, coords);4187}4188ANGLE_CAPTURE(TexCoordP4uiv, isCallValid, context, type, coords);4189}4190else4191{4192GenerateContextLostErrorOnCurrentGlobalContext();4193}4194}41954196void GL_APIENTRY GL_VertexAttribDivisor(GLuint index, GLuint divisor)4197{4198Context *context = GetValidGlobalContext();4199EVENT(context, GLVertexAttribDivisor, "context = %d, index = %u, divisor = %u", CID(context),4200index, divisor);42014202if (context)4203{4204std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4205bool isCallValid =4206(context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor));4207if (isCallValid)4208{4209context->vertexAttribDivisor(index, divisor);4210}4211ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, index, divisor);4212}4213else4214{4215GenerateContextLostErrorOnCurrentGlobalContext();4216}4217}42184219void GL_APIENTRY GL_VertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)4220{4221Context *context = GetValidGlobalContext();4222EVENT(context, GLVertexAttribP1ui,4223"context = %d, index = %u, type = %s, normalized = %s, value = %u", CID(context), index,4224GLenumToString(GLenumGroup::VertexAttribPointerType, type), GLbooleanToString(normalized),4225value);42264227if (context)4228{4229std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4230bool isCallValid = (context->skipValidation() ||4231ValidateVertexAttribP1ui(context, index, type, normalized, value));4232if (isCallValid)4233{4234context->vertexAttribP1ui(index, type, normalized, value);4235}4236ANGLE_CAPTURE(VertexAttribP1ui, isCallValid, context, index, type, normalized, value);4237}4238else4239{4240GenerateContextLostErrorOnCurrentGlobalContext();4241}4242}42434244void GL_APIENTRY GL_VertexAttribP1uiv(GLuint index,4245GLenum type,4246GLboolean normalized,4247const GLuint *value)4248{4249Context *context = GetValidGlobalContext();4250EVENT(context, GLVertexAttribP1uiv,4251"context = %d, index = %u, type = %s, normalized = %s, value = 0x%016" PRIxPTR "",4252CID(context), index, GLenumToString(GLenumGroup::VertexAttribPointerType, type),4253GLbooleanToString(normalized), (uintptr_t)value);42544255if (context)4256{4257std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4258bool isCallValid = (context->skipValidation() ||4259ValidateVertexAttribP1uiv(context, index, type, normalized, value));4260if (isCallValid)4261{4262context->vertexAttribP1uiv(index, type, normalized, value);4263}4264ANGLE_CAPTURE(VertexAttribP1uiv, isCallValid, context, index, type, normalized, value);4265}4266else4267{4268GenerateContextLostErrorOnCurrentGlobalContext();4269}4270}42714272void GL_APIENTRY GL_VertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)4273{4274Context *context = GetValidGlobalContext();4275EVENT(context, GLVertexAttribP2ui,4276"context = %d, index = %u, type = %s, normalized = %s, value = %u", CID(context), index,4277GLenumToString(GLenumGroup::VertexAttribPointerType, type), GLbooleanToString(normalized),4278value);42794280if (context)4281{4282std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4283bool isCallValid = (context->skipValidation() ||4284ValidateVertexAttribP2ui(context, index, type, normalized, value));4285if (isCallValid)4286{4287context->vertexAttribP2ui(index, type, normalized, value);4288}4289ANGLE_CAPTURE(VertexAttribP2ui, isCallValid, context, index, type, normalized, value);4290}4291else4292{4293GenerateContextLostErrorOnCurrentGlobalContext();4294}4295}42964297void GL_APIENTRY GL_VertexAttribP2uiv(GLuint index,4298GLenum type,4299GLboolean normalized,4300const GLuint *value)4301{4302Context *context = GetValidGlobalContext();4303EVENT(context, GLVertexAttribP2uiv,4304"context = %d, index = %u, type = %s, normalized = %s, value = 0x%016" PRIxPTR "",4305CID(context), index, GLenumToString(GLenumGroup::VertexAttribPointerType, type),4306GLbooleanToString(normalized), (uintptr_t)value);43074308if (context)4309{4310std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4311bool isCallValid = (context->skipValidation() ||4312ValidateVertexAttribP2uiv(context, index, type, normalized, value));4313if (isCallValid)4314{4315context->vertexAttribP2uiv(index, type, normalized, value);4316}4317ANGLE_CAPTURE(VertexAttribP2uiv, isCallValid, context, index, type, normalized, value);4318}4319else4320{4321GenerateContextLostErrorOnCurrentGlobalContext();4322}4323}43244325void GL_APIENTRY GL_VertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)4326{4327Context *context = GetValidGlobalContext();4328EVENT(context, GLVertexAttribP3ui,4329"context = %d, index = %u, type = %s, normalized = %s, value = %u", CID(context), index,4330GLenumToString(GLenumGroup::VertexAttribPointerType, type), GLbooleanToString(normalized),4331value);43324333if (context)4334{4335std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4336bool isCallValid = (context->skipValidation() ||4337ValidateVertexAttribP3ui(context, index, type, normalized, value));4338if (isCallValid)4339{4340context->vertexAttribP3ui(index, type, normalized, value);4341}4342ANGLE_CAPTURE(VertexAttribP3ui, isCallValid, context, index, type, normalized, value);4343}4344else4345{4346GenerateContextLostErrorOnCurrentGlobalContext();4347}4348}43494350void GL_APIENTRY GL_VertexAttribP3uiv(GLuint index,4351GLenum type,4352GLboolean normalized,4353const GLuint *value)4354{4355Context *context = GetValidGlobalContext();4356EVENT(context, GLVertexAttribP3uiv,4357"context = %d, index = %u, type = %s, normalized = %s, value = 0x%016" PRIxPTR "",4358CID(context), index, GLenumToString(GLenumGroup::VertexAttribPointerType, type),4359GLbooleanToString(normalized), (uintptr_t)value);43604361if (context)4362{4363std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4364bool isCallValid = (context->skipValidation() ||4365ValidateVertexAttribP3uiv(context, index, type, normalized, value));4366if (isCallValid)4367{4368context->vertexAttribP3uiv(index, type, normalized, value);4369}4370ANGLE_CAPTURE(VertexAttribP3uiv, isCallValid, context, index, type, normalized, value);4371}4372else4373{4374GenerateContextLostErrorOnCurrentGlobalContext();4375}4376}43774378void GL_APIENTRY GL_VertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)4379{4380Context *context = GetValidGlobalContext();4381EVENT(context, GLVertexAttribP4ui,4382"context = %d, index = %u, type = %s, normalized = %s, value = %u", CID(context), index,4383GLenumToString(GLenumGroup::VertexAttribPointerType, type), GLbooleanToString(normalized),4384value);43854386if (context)4387{4388std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4389bool isCallValid = (context->skipValidation() ||4390ValidateVertexAttribP4ui(context, index, type, normalized, value));4391if (isCallValid)4392{4393context->vertexAttribP4ui(index, type, normalized, value);4394}4395ANGLE_CAPTURE(VertexAttribP4ui, isCallValid, context, index, type, normalized, value);4396}4397else4398{4399GenerateContextLostErrorOnCurrentGlobalContext();4400}4401}44024403void GL_APIENTRY GL_VertexAttribP4uiv(GLuint index,4404GLenum type,4405GLboolean normalized,4406const GLuint *value)4407{4408Context *context = GetValidGlobalContext();4409EVENT(context, GLVertexAttribP4uiv,4410"context = %d, index = %u, type = %s, normalized = %s, value = 0x%016" PRIxPTR "",4411CID(context), index, GLenumToString(GLenumGroup::VertexAttribPointerType, type),4412GLbooleanToString(normalized), (uintptr_t)value);44134414if (context)4415{4416std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4417bool isCallValid = (context->skipValidation() ||4418ValidateVertexAttribP4uiv(context, index, type, normalized, value));4419if (isCallValid)4420{4421context->vertexAttribP4uiv(index, type, normalized, value);4422}4423ANGLE_CAPTURE(VertexAttribP4uiv, isCallValid, context, index, type, normalized, value);4424}4425else4426{4427GenerateContextLostErrorOnCurrentGlobalContext();4428}4429}44304431void GL_APIENTRY GL_VertexP2ui(GLenum type, GLuint value)4432{4433Context *context = GetValidGlobalContext();4434EVENT(context, GLVertexP2ui, "context = %d, type = %s, value = %u", CID(context),4435GLenumToString(GLenumGroup::VertexPointerType, type), value);44364437if (context)4438{4439std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4440bool isCallValid = (context->skipValidation() || ValidateVertexP2ui(context, type, value));4441if (isCallValid)4442{4443context->vertexP2ui(type, value);4444}4445ANGLE_CAPTURE(VertexP2ui, isCallValid, context, type, value);4446}4447else4448{4449GenerateContextLostErrorOnCurrentGlobalContext();4450}4451}44524453void GL_APIENTRY GL_VertexP2uiv(GLenum type, const GLuint *value)4454{4455Context *context = GetValidGlobalContext();4456EVENT(context, GLVertexP2uiv, "context = %d, type = %s, value = 0x%016" PRIxPTR "",4457CID(context), GLenumToString(GLenumGroup::VertexPointerType, type), (uintptr_t)value);44584459if (context)4460{4461std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4462bool isCallValid = (context->skipValidation() || ValidateVertexP2uiv(context, type, value));4463if (isCallValid)4464{4465context->vertexP2uiv(type, value);4466}4467ANGLE_CAPTURE(VertexP2uiv, isCallValid, context, type, value);4468}4469else4470{4471GenerateContextLostErrorOnCurrentGlobalContext();4472}4473}44744475void GL_APIENTRY GL_VertexP3ui(GLenum type, GLuint value)4476{4477Context *context = GetValidGlobalContext();4478EVENT(context, GLVertexP3ui, "context = %d, type = %s, value = %u", CID(context),4479GLenumToString(GLenumGroup::VertexPointerType, type), value);44804481if (context)4482{4483std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4484bool isCallValid = (context->skipValidation() || ValidateVertexP3ui(context, type, value));4485if (isCallValid)4486{4487context->vertexP3ui(type, value);4488}4489ANGLE_CAPTURE(VertexP3ui, isCallValid, context, type, value);4490}4491else4492{4493GenerateContextLostErrorOnCurrentGlobalContext();4494}4495}44964497void GL_APIENTRY GL_VertexP3uiv(GLenum type, const GLuint *value)4498{4499Context *context = GetValidGlobalContext();4500EVENT(context, GLVertexP3uiv, "context = %d, type = %s, value = 0x%016" PRIxPTR "",4501CID(context), GLenumToString(GLenumGroup::VertexPointerType, type), (uintptr_t)value);45024503if (context)4504{4505std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4506bool isCallValid = (context->skipValidation() || ValidateVertexP3uiv(context, type, value));4507if (isCallValid)4508{4509context->vertexP3uiv(type, value);4510}4511ANGLE_CAPTURE(VertexP3uiv, isCallValid, context, type, value);4512}4513else4514{4515GenerateContextLostErrorOnCurrentGlobalContext();4516}4517}45184519void GL_APIENTRY GL_VertexP4ui(GLenum type, GLuint value)4520{4521Context *context = GetValidGlobalContext();4522EVENT(context, GLVertexP4ui, "context = %d, type = %s, value = %u", CID(context),4523GLenumToString(GLenumGroup::VertexPointerType, type), value);45244525if (context)4526{4527std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4528bool isCallValid = (context->skipValidation() || ValidateVertexP4ui(context, type, value));4529if (isCallValid)4530{4531context->vertexP4ui(type, value);4532}4533ANGLE_CAPTURE(VertexP4ui, isCallValid, context, type, value);4534}4535else4536{4537GenerateContextLostErrorOnCurrentGlobalContext();4538}4539}45404541void GL_APIENTRY GL_VertexP4uiv(GLenum type, const GLuint *value)4542{4543Context *context = GetValidGlobalContext();4544EVENT(context, GLVertexP4uiv, "context = %d, type = %s, value = 0x%016" PRIxPTR "",4545CID(context), GLenumToString(GLenumGroup::VertexPointerType, type), (uintptr_t)value);45464547if (context)4548{4549std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);4550bool isCallValid = (context->skipValidation() || ValidateVertexP4uiv(context, type, value));4551if (isCallValid)4552{4553context->vertexP4uiv(type, value);4554}4555ANGLE_CAPTURE(VertexP4uiv, isCallValid, context, type, value);4556}4557else4558{4559GenerateContextLostErrorOnCurrentGlobalContext();4560}4561}45624563} // extern "C"456445654566