// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// capture_gles_ext_autogen.cpp:
//   Capture functions for the OpenGL ES extension entry points.

#include "libANGLE/capture_gles_ext_autogen.h"

#include "libANGLE/Context.h"
#include "libANGLE/FrameCapture.h"
#include "libANGLE/validationESEXT.h"

using namespace angle;

namespace gl
{

void CaptureCopyTexture3DANGLE(Context *context,
                               GLuint sourceId,
                               GLint sourceLevel,
                               TextureTarget destTargetPacked,
                               GLuint destId,
                               GLint destLevel,
                               GLint internalFormat,
                               GLenum destType,
                               GLboolean unpackFlipY,
                               GLboolean unpackPremultiplyAlpha,
                               GLboolean unpackUnmultiplyAlpha)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCopyTexture3DANGLE(
        context, sourceId, sourceLevel, destTargetPacked, destId, destLevel, internalFormat,
        destType, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sourceId", ParamType::TGLuint, sourceId);
    paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
    paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
    paramBuffer.addValueParam("destId", ParamType::TGLuint, destId);
    paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
    paramBuffer.addValueParam("internalFormat", ParamType::TGLint, internalFormat);
    paramBuffer.addValueParam("destType", ParamType::TGLenum, destType);
    paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
    paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
                              unpackPremultiplyAlpha);
    paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
                              unpackUnmultiplyAlpha);

    frameCapture->captureCall(context, "glCopyTexture3DANGLE", std::move(paramBuffer), isCallValid);
}

void CaptureCopySubTexture3DANGLE(Context *context,
                                  GLuint sourceId,
                                  GLint sourceLevel,
                                  TextureTarget destTargetPacked,
                                  GLuint destId,
                                  GLint destLevel,
                                  GLint xoffset,
                                  GLint yoffset,
                                  GLint zoffset,
                                  GLint x,
                                  GLint y,
                                  GLint z,
                                  GLint width,
                                  GLint height,
                                  GLint depth,
                                  GLboolean unpackFlipY,
                                  GLboolean unpackPremultiplyAlpha,
                                  GLboolean unpackUnmultiplyAlpha)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCopySubTexture3DANGLE(
        context, sourceId, sourceLevel, destTargetPacked, destId, destLevel, xoffset, yoffset,
        zoffset, x, y, z, width, height, depth, unpackFlipY, unpackPremultiplyAlpha,
        unpackUnmultiplyAlpha);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sourceId", ParamType::TGLuint, sourceId);
    paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
    paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
    paramBuffer.addValueParam("destId", ParamType::TGLuint, destId);
    paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("z", ParamType::TGLint, z);
    paramBuffer.addValueParam("width", ParamType::TGLint, width);
    paramBuffer.addValueParam("height", ParamType::TGLint, height);
    paramBuffer.addValueParam("depth", ParamType::TGLint, depth);
    paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
    paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
                              unpackPremultiplyAlpha);
    paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
                              unpackUnmultiplyAlpha);

    frameCapture->captureCall(context, "glCopySubTexture3DANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureBlitFramebufferANGLE(Context *context,
                                 GLint srcX0,
                                 GLint srcY0,
                                 GLint srcX1,
                                 GLint srcY1,
                                 GLint dstX0,
                                 GLint dstY0,
                                 GLint dstX1,
                                 GLint dstY1,
                                 GLbitfield mask,
                                 GLenum filter)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBlitFramebufferANGLE(context, srcX0, srcY0, srcX1, srcY1, dstX0,
                                                    dstY0, dstX1, dstY1, mask, filter);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("srcX0", ParamType::TGLint, srcX0);
    paramBuffer.addValueParam("srcY0", ParamType::TGLint, srcY0);
    paramBuffer.addValueParam("srcX1", ParamType::TGLint, srcX1);
    paramBuffer.addValueParam("srcY1", ParamType::TGLint, srcY1);
    paramBuffer.addValueParam("dstX0", ParamType::TGLint, dstX0);
    paramBuffer.addValueParam("dstY0", ParamType::TGLint, dstY0);
    paramBuffer.addValueParam("dstX1", ParamType::TGLint, dstX1);
    paramBuffer.addValueParam("dstY1", ParamType::TGLint, dstY1);
    paramBuffer.addValueParam("mask", ParamType::TGLbitfield, mask);
    paramBuffer.addValueParam("filter", ParamType::TGLenum, filter);

    frameCapture->captureCall(context, "glBlitFramebufferANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureRenderbufferStorageMultisampleANGLE(Context *context,
                                                GLenum target,
                                                GLsizei samples,
                                                GLenum internalformat,
                                                GLsizei width,
                                                GLsizei height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateRenderbufferStorageMultisampleANGLE(context, target, samples,
                                                                   internalformat, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    frameCapture->captureCall(context, "glRenderbufferStorageMultisampleANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureDrawArraysInstancedANGLE(Context *context,
                                     PrimitiveMode modePacked,
                                     GLint first,
                                     GLsizei count,
                                     GLsizei primcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateDrawArraysInstancedANGLE(context, modePacked, first, count, primcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
    paramBuffer.addValueParam("first", ParamType::TGLint, first);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);

    frameCapture->captureCall(context, "glDrawArraysInstancedANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDrawElementsInstancedANGLE(Context *context,
                                       PrimitiveMode modePacked,
                                       GLsizei count,
                                       DrawElementsType typePacked,
                                       const void *indices,
                                       GLsizei primcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawElementsInstancedANGLE(context, modePacked, count, typePacked,
                                                          indices, primcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);

    ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
    CaptureDrawElementsInstancedANGLE_indices(context, modePacked, count, typePacked, indices,
                                              primcount, isCallValid, &indicesParam);
    paramBuffer.addParam(std::move(indicesParam));

    paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);

    frameCapture->captureCall(context, "glDrawElementsInstancedANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureVertexAttribDivisorANGLE(Context *context, GLuint index, GLuint divisor)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateVertexAttribDivisorANGLE(context, index, divisor);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);

    frameCapture->captureCall(context, "glVertexAttribDivisorANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMultiDrawArraysANGLE(Context *context,
                                 PrimitiveMode modePacked,
                                 const GLint *firsts,
                                 const GLsizei *counts,
                                 GLsizei drawcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMultiDrawArraysANGLE(context, modePacked, firsts, counts, drawcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);

    ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, firsts, &firstsParam.value);
    CaptureMultiDrawArraysANGLE_firsts(context, modePacked, firsts, counts, drawcount, isCallValid,
                                       &firstsParam);
    paramBuffer.addParam(std::move(firstsParam));

    ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
    InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
    CaptureMultiDrawArraysANGLE_counts(context, modePacked, firsts, counts, drawcount, isCallValid,
                                       &countsParam);
    paramBuffer.addParam(std::move(countsParam));

    paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);

    frameCapture->captureCall(context, "glMultiDrawArraysANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMultiDrawArraysInstancedANGLE(Context *context,
                                          PrimitiveMode modePacked,
                                          const GLint *firsts,
                                          const GLsizei *counts,
                                          const GLsizei *instanceCounts,
                                          GLsizei drawcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMultiDrawArraysInstancedANGLE(context, modePacked, firsts, counts,
                                                             instanceCounts, drawcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);

    ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, firsts, &firstsParam.value);
    CaptureMultiDrawArraysInstancedANGLE_firsts(context, modePacked, firsts, counts, instanceCounts,
                                                drawcount, isCallValid, &firstsParam);
    paramBuffer.addParam(std::move(firstsParam));

    ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
    InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
    CaptureMultiDrawArraysInstancedANGLE_counts(context, modePacked, firsts, counts, instanceCounts,
                                                drawcount, isCallValid, &countsParam);
    paramBuffer.addParam(std::move(countsParam));

    ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
    InitParamValue(ParamType::TGLsizeiConstPointer, instanceCounts, &instanceCountsParam.value);
    CaptureMultiDrawArraysInstancedANGLE_instanceCounts(context, modePacked, firsts, counts,
                                                        instanceCounts, drawcount, isCallValid,
                                                        &instanceCountsParam);
    paramBuffer.addParam(std::move(instanceCountsParam));

    paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);

    frameCapture->captureCall(context, "glMultiDrawArraysInstancedANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMultiDrawElementsANGLE(Context *context,
                                   PrimitiveMode modePacked,
                                   const GLsizei *counts,
                                   DrawElementsType typePacked,
                                   const GLvoid *const *indices,
                                   GLsizei drawcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateMultiDrawElementsANGLE(context, modePacked, counts, typePacked, indices, drawcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);

    ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
    InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
    CaptureMultiDrawElementsANGLE_counts(context, modePacked, counts, typePacked, indices,
                                         drawcount, isCallValid, &countsParam);
    paramBuffer.addParam(std::move(countsParam));

    paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);

    ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
    InitParamValue(ParamType::TGLvoidConstPointerPointer, indices, &indicesParam.value);
    CaptureMultiDrawElementsANGLE_indices(context, modePacked, counts, typePacked, indices,
                                          drawcount, isCallValid, &indicesParam);
    paramBuffer.addParam(std::move(indicesParam));

    paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);

    frameCapture->captureCall(context, "glMultiDrawElementsANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMultiDrawElementsInstancedANGLE(Context *context,
                                            PrimitiveMode modePacked,
                                            const GLsizei *counts,
                                            DrawElementsType typePacked,
                                            const GLvoid *const *indices,
                                            const GLsizei *instanceCounts,
                                            GLsizei drawcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMultiDrawElementsInstancedANGLE(
        context, modePacked, counts, typePacked, indices, instanceCounts, drawcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);

    ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
    InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
    CaptureMultiDrawElementsInstancedANGLE_counts(context, modePacked, counts, typePacked, indices,
                                                  instanceCounts, drawcount, isCallValid,
                                                  &countsParam);
    paramBuffer.addParam(std::move(countsParam));

    paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);

    ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
    InitParamValue(ParamType::TGLvoidConstPointerPointer, indices, &indicesParam.value);
    CaptureMultiDrawElementsInstancedANGLE_indices(context, modePacked, counts, typePacked, indices,
                                                   instanceCounts, drawcount, isCallValid,
                                                   &indicesParam);
    paramBuffer.addParam(std::move(indicesParam));

    ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
    InitParamValue(ParamType::TGLsizeiConstPointer, instanceCounts, &instanceCountsParam.value);
    CaptureMultiDrawElementsInstancedANGLE_instanceCounts(context, modePacked, counts, typePacked,
                                                          indices, instanceCounts, drawcount,
                                                          isCallValid, &instanceCountsParam);
    paramBuffer.addParam(std::move(instanceCountsParam));

    paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);

    frameCapture->captureCall(context, "glMultiDrawElementsInstancedANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureProvokingVertexANGLE(Context *context, ProvokingVertex modePacked)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateProvokingVertexANGLE(context, modePacked);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TProvokingVertex, modePacked);

    frameCapture->captureCall(context, "glProvokingVertexANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureRequestExtensionANGLE(Context *context, const GLchar *name)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateRequestExtensionANGLE(context, name);
    ParamBuffer paramBuffer;

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureRequestExtensionANGLE_name(context, name, isCallValid, &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    frameCapture->captureCall(context, "glRequestExtensionANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetBooleanvRobustANGLE(Context *context,
                                   GLenum pname,
                                   GLsizei bufSize,
                                   GLsizei *length,
                                   GLboolean *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetBooleanvRobustANGLE(context, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetBooleanvRobustANGLE_length(context, pname, bufSize, length, params, isCallValid,
                                         &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLbooleanPointer);
    InitParamValue(ParamType::TGLbooleanPointer, params, &paramsParam.value);
    CaptureGetBooleanvRobustANGLE_params(context, pname, bufSize, length, params, isCallValid,
                                         &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetBooleanvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetBufferParameterivRobustANGLE(Context *context,
                                            BufferBinding targetPacked,
                                            GLenum pname,
                                            GLsizei bufSize,
                                            GLsizei *length,
                                            GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetBufferParameterivRobustANGLE(context, targetPacked, pname,
                                                               bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetBufferParameterivRobustANGLE_length(context, targetPacked, pname, bufSize, length,
                                                  params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetBufferParameterivRobustANGLE_params(context, targetPacked, pname, bufSize, length,
                                                  params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetBufferParameterivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetFloatvRobustANGLE(Context *context,
                                 GLenum pname,
                                 GLsizei bufSize,
                                 GLsizei *length,
                                 GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetFloatvRobustANGLE(context, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetFloatvRobustANGLE_length(context, pname, bufSize, length, params, isCallValid,
                                       &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetFloatvRobustANGLE_params(context, pname, bufSize, length, params, isCallValid,
                                       &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetFloatvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetFramebufferAttachmentParameterivRobustANGLE(Context *context,
                                                           GLenum target,
                                                           GLenum attachment,
                                                           GLenum pname,
                                                           GLsizei bufSize,
                                                           GLsizei *length,
                                                           GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetFramebufferAttachmentParameterivRobustANGLE(
        context, target, attachment, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("attachment", ParamType::TGLenum, attachment);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetFramebufferAttachmentParameterivRobustANGLE_length(
        context, target, attachment, pname, bufSize, length, params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetFramebufferAttachmentParameterivRobustANGLE_params(
        context, target, attachment, pname, bufSize, length, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetFramebufferAttachmentParameterivRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetIntegervRobustANGLE(Context *context,
                                   GLenum pname,
                                   GLsizei bufSize,
                                   GLsizei *length,
                                   GLint *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetIntegervRobustANGLE(context, pname, bufSize, length, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetIntegervRobustANGLE_length(context, pname, bufSize, length, data, isCallValid,
                                         &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture dataParam("data", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, data, &dataParam.value);
    CaptureGetIntegervRobustANGLE_data(context, pname, bufSize, length, data, isCallValid,
                                       &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glGetIntegervRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetProgramivRobustANGLE(Context *context,
                                    GLuint program,
                                    GLenum pname,
                                    GLsizei bufSize,
                                    GLsizei *length,
                                    GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetProgramivRobustANGLE(context, program, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetProgramivRobustANGLE_length(context, program, pname, bufSize, length, params,
                                          isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetProgramivRobustANGLE_params(context, program, pname, bufSize, length, params,
                                          isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetProgramivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetRenderbufferParameterivRobustANGLE(Context *context,
                                                  GLenum target,
                                                  GLenum pname,
                                                  GLsizei bufSize,
                                                  GLsizei *length,
                                                  GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetRenderbufferParameterivRobustANGLE(context, target, pname,
                                                                     bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetRenderbufferParameterivRobustANGLE_length(context, target, pname, bufSize, length,
                                                        params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetRenderbufferParameterivRobustANGLE_params(context, target, pname, bufSize, length,
                                                        params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetRenderbufferParameterivRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetShaderivRobustANGLE(Context *context,
                                   GLuint shader,
                                   GLenum pname,
                                   GLsizei bufSize,
                                   GLsizei *length,
                                   GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetShaderivRobustANGLE(context, shader, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("shader", ParamType::TGLuint, shader);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetShaderivRobustANGLE_length(context, shader, pname, bufSize, length, params,
                                         isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetShaderivRobustANGLE_params(context, shader, pname, bufSize, length, params,
                                         isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetShaderivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexParameterfvRobustANGLE(Context *context,
                                         TextureType targetPacked,
                                         GLenum pname,
                                         GLsizei bufSize,
                                         GLsizei *length,
                                         GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetTexParameterfvRobustANGLE(context, targetPacked, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTexParameterfvRobustANGLE_length(context, targetPacked, pname, bufSize, length,
                                               params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetTexParameterfvRobustANGLE_params(context, targetPacked, pname, bufSize, length,
                                               params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexParameterfvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexParameterivRobustANGLE(Context *context,
                                         TextureType targetPacked,
                                         GLenum pname,
                                         GLsizei bufSize,
                                         GLsizei *length,
                                         GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetTexParameterivRobustANGLE(context, targetPacked, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTexParameterivRobustANGLE_length(context, targetPacked, pname, bufSize, length,
                                               params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetTexParameterivRobustANGLE_params(context, targetPacked, pname, bufSize, length,
                                               params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexParameterivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetUniformfvRobustANGLE(Context *context,
                                    GLuint program,
                                    GLint location,
                                    GLsizei bufSize,
                                    GLsizei *length,
                                    GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetUniformfvRobustANGLE(context, program, location, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetUniformfvRobustANGLE_length(context, program, location, bufSize, length, params,
                                          isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetUniformfvRobustANGLE_params(context, program, location, bufSize, length, params,
                                          isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetUniformfvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetUniformivRobustANGLE(Context *context,
                                    GLuint program,
                                    GLint location,
                                    GLsizei bufSize,
                                    GLsizei *length,
                                    GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetUniformivRobustANGLE(context, program, location, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetUniformivRobustANGLE_length(context, program, location, bufSize, length, params,
                                          isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetUniformivRobustANGLE_params(context, program, location, bufSize, length, params,
                                          isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetUniformivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetVertexAttribfvRobustANGLE(Context *context,
                                         GLuint index,
                                         GLenum pname,
                                         GLsizei bufSize,
                                         GLsizei *length,
                                         GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetVertexAttribfvRobustANGLE(context, index, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetVertexAttribfvRobustANGLE_length(context, index, pname, bufSize, length, params,
                                               isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetVertexAttribfvRobustANGLE_params(context, index, pname, bufSize, length, params,
                                               isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetVertexAttribfvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetVertexAttribivRobustANGLE(Context *context,
                                         GLuint index,
                                         GLenum pname,
                                         GLsizei bufSize,
                                         GLsizei *length,
                                         GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetVertexAttribivRobustANGLE(context, index, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetVertexAttribivRobustANGLE_length(context, index, pname, bufSize, length, params,
                                               isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetVertexAttribivRobustANGLE_params(context, index, pname, bufSize, length, params,
                                               isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetVertexAttribivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetVertexAttribPointervRobustANGLE(Context *context,
                                               GLuint index,
                                               GLenum pname,
                                               GLsizei bufSize,
                                               GLsizei *length,
                                               void **pointer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetVertexAttribPointervRobustANGLE(context, index, pname, bufSize, length, pointer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetVertexAttribPointervRobustANGLE_length(context, index, pname, bufSize, length,
                                                     pointer, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture pointerParam("pointer", ParamType::TvoidPointerPointer);
    InitParamValue(ParamType::TvoidPointerPointer, pointer, &pointerParam.value);
    CaptureGetVertexAttribPointervRobustANGLE_pointer(context, index, pname, bufSize, length,
                                                      pointer, isCallValid, &pointerParam);
    paramBuffer.addParam(std::move(pointerParam));

    frameCapture->captureCall(context, "glGetVertexAttribPointervRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureReadPixelsRobustANGLE(Context *context,
                                  GLint x,
                                  GLint y,
                                  GLsizei width,
                                  GLsizei height,
                                  GLenum format,
                                  GLenum type,
                                  GLsizei bufSize,
                                  GLsizei *length,
                                  GLsizei *columns,
                                  GLsizei *rows,
                                  void *pixels)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateReadPixelsRobustANGLE(context, x, y, width, height, format, type,
                                                     bufSize, length, columns, rows, pixels);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureReadPixelsRobustANGLE_length(context, x, y, width, height, format, type, bufSize, length,
                                        columns, rows, pixels, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture columnsParam("columns", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, columns, &columnsParam.value);
    CaptureReadPixelsRobustANGLE_columns(context, x, y, width, height, format, type, bufSize,
                                         length, columns, rows, pixels, isCallValid, &columnsParam);
    paramBuffer.addParam(std::move(columnsParam));

    ParamCapture rowsParam("rows", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, rows, &rowsParam.value);
    CaptureReadPixelsRobustANGLE_rows(context, x, y, width, height, format, type, bufSize, length,
                                      columns, rows, pixels, isCallValid, &rowsParam);
    paramBuffer.addParam(std::move(rowsParam));

    ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
    InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
    CaptureReadPixelsRobustANGLE_pixels(context, x, y, width, height, format, type, bufSize, length,
                                        columns, rows, pixels, isCallValid, &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    frameCapture->captureCall(context, "glReadPixelsRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexImage2DRobustANGLE(Context *context,
                                  TextureTarget targetPacked,
                                  GLint level,
                                  GLint internalformat,
                                  GLsizei width,
                                  GLsizei height,
                                  GLint border,
                                  GLenum format,
                                  GLenum type,
                                  GLsizei bufSize,
                                  const void *pixels)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexImage2DRobustANGLE(context, targetPacked, level, internalformat, width, height,
                                      border, format, type, bufSize, pixels);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexImage2DRobustANGLE_pixels(context, targetPacked, level, internalformat, width, height,
                                        border, format, type, bufSize, pixels, isCallValid,
                                        &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    frameCapture->captureCall(context, "glTexImage2DRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexParameterfvRobustANGLE(Context *context,
                                      TextureType targetPacked,
                                      GLenum pname,
                                      GLsizei bufSize,
                                      const GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexParameterfvRobustANGLE(context, targetPacked, pname, bufSize, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramsParam("params", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, params, &paramsParam.value);
    CaptureTexParameterfvRobustANGLE_params(context, targetPacked, pname, bufSize, params,
                                            isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexParameterfvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexParameterivRobustANGLE(Context *context,
                                      TextureType targetPacked,
                                      GLenum pname,
                                      GLsizei bufSize,
                                      const GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexParameterivRobustANGLE(context, targetPacked, pname, bufSize, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
    CaptureTexParameterivRobustANGLE_params(context, targetPacked, pname, bufSize, params,
                                            isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexParameterivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexSubImage2DRobustANGLE(Context *context,
                                     TextureTarget targetPacked,
                                     GLint level,
                                     GLint xoffset,
                                     GLint yoffset,
                                     GLsizei width,
                                     GLsizei height,
                                     GLenum format,
                                     GLenum type,
                                     GLsizei bufSize,
                                     const void *pixels)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexSubImage2DRobustANGLE(context, targetPacked, level, xoffset, yoffset, width,
                                         height, format, type, bufSize, pixels);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexSubImage2DRobustANGLE_pixels(context, targetPacked, level, xoffset, yoffset, width,
                                           height, format, type, bufSize, pixels, isCallValid,
                                           &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    frameCapture->captureCall(context, "glTexSubImage2DRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexImage3DRobustANGLE(Context *context,
                                  TextureTarget targetPacked,
                                  GLint level,
                                  GLint internalformat,
                                  GLsizei width,
                                  GLsizei height,
                                  GLsizei depth,
                                  GLint border,
                                  GLenum format,
                                  GLenum type,
                                  GLsizei bufSize,
                                  const void *pixels)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexImage3DRobustANGLE(context, targetPacked, level, internalformat, width, height,
                                      depth, border, format, type, bufSize, pixels);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexImage3DRobustANGLE_pixels(context, targetPacked, level, internalformat, width, height,
                                        depth, border, format, type, bufSize, pixels, isCallValid,
                                        &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    frameCapture->captureCall(context, "glTexImage3DRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexSubImage3DRobustANGLE(Context *context,
                                     TextureTarget targetPacked,
                                     GLint level,
                                     GLint xoffset,
                                     GLint yoffset,
                                     GLint zoffset,
                                     GLsizei width,
                                     GLsizei height,
                                     GLsizei depth,
                                     GLenum format,
                                     GLenum type,
                                     GLsizei bufSize,
                                     const void *pixels)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexSubImage3DRobustANGLE(context, targetPacked, level, xoffset, yoffset, zoffset,
                                         width, height, depth, format, type, bufSize, pixels);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexSubImage3DRobustANGLE_pixels(context, targetPacked, level, xoffset, yoffset, zoffset,
                                           width, height, depth, format, type, bufSize, pixels,
                                           isCallValid, &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    frameCapture->captureCall(context, "glTexSubImage3DRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCompressedTexImage2DRobustANGLE(Context *context,
                                            TextureTarget targetPacked,
                                            GLint level,
                                            GLenum internalformat,
                                            GLsizei width,
                                            GLsizei height,
                                            GLint border,
                                            GLsizei imageSize,
                                            GLsizei dataSize,
                                            const GLvoid *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateCompressedTexImage2DRobustANGLE(context, targetPacked, level, internalformat, width,
                                                height, border, imageSize, dataSize, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
    paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);

    ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
    InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexImage2DRobustANGLE_data(context, targetPacked, level, internalformat, width,
                                                height, border, imageSize, dataSize, data,
                                                isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glCompressedTexImage2DRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCompressedTexSubImage2DRobustANGLE(Context *context,
                                               TextureTarget targetPacked,
                                               GLint level,
                                               GLsizei xoffset,
                                               GLsizei yoffset,
                                               GLsizei width,
                                               GLsizei height,
                                               GLenum format,
                                               GLsizei imageSize,
                                               GLsizei dataSize,
                                               const GLvoid *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCompressedTexSubImage2DRobustANGLE(
        context, targetPacked, level, xoffset, yoffset, width, height, format, imageSize, dataSize,
        data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLsizei, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLsizei, yoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
    paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);

    ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
    InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexSubImage2DRobustANGLE_data(context, targetPacked, level, xoffset, yoffset,
                                                   width, height, format, imageSize, dataSize, data,
                                                   isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glCompressedTexSubImage2DRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureCompressedTexImage3DRobustANGLE(Context *context,
                                            TextureTarget targetPacked,
                                            GLint level,
                                            GLenum internalformat,
                                            GLsizei width,
                                            GLsizei height,
                                            GLsizei depth,
                                            GLint border,
                                            GLsizei imageSize,
                                            GLsizei dataSize,
                                            const GLvoid *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateCompressedTexImage3DRobustANGLE(context, targetPacked, level, internalformat, width,
                                                height, depth, border, imageSize, dataSize, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
    paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);

    ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
    InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexImage3DRobustANGLE_data(context, targetPacked, level, internalformat, width,
                                                height, depth, border, imageSize, dataSize, data,
                                                isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glCompressedTexImage3DRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCompressedTexSubImage3DRobustANGLE(Context *context,
                                               TextureTarget targetPacked,
                                               GLint level,
                                               GLint xoffset,
                                               GLint yoffset,
                                               GLint zoffset,
                                               GLsizei width,
                                               GLsizei height,
                                               GLsizei depth,
                                               GLenum format,
                                               GLsizei imageSize,
                                               GLsizei dataSize,
                                               const GLvoid *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCompressedTexSubImage3DRobustANGLE(
        context, targetPacked, level, xoffset, yoffset, zoffset, width, height, depth, format,
        imageSize, dataSize, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
    paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);

    ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
    InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexSubImage3DRobustANGLE_data(context, targetPacked, level, xoffset, yoffset,
                                                   zoffset, width, height, depth, format, imageSize,
                                                   dataSize, data, isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glCompressedTexSubImage3DRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetQueryivRobustANGLE(Context *context,
                                  QueryType targetPacked,
                                  GLenum pname,
                                  GLsizei bufSize,
                                  GLsizei *length,
                                  GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetQueryivRobustANGLE(context, targetPacked, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetQueryivRobustANGLE_length(context, targetPacked, pname, bufSize, length, params,
                                        isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetQueryivRobustANGLE_params(context, targetPacked, pname, bufSize, length, params,
                                        isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetQueryObjectuivRobustANGLE(Context *context,
                                         GLuint id,
                                         GLenum pname,
                                         GLsizei bufSize,
                                         GLsizei *length,
                                         GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetQueryObjectuivRobustANGLE(context, id, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetQueryObjectuivRobustANGLE_length(context, id, pname, bufSize, length, params,
                                               isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetQueryObjectuivRobustANGLE_params(context, id, pname, bufSize, length, params,
                                               isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjectuivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetBufferPointervRobustANGLE(Context *context,
                                         BufferBinding targetPacked,
                                         GLenum pname,
                                         GLsizei bufSize,
                                         GLsizei *length,
                                         void **params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetBufferPointervRobustANGLE(context, targetPacked, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetBufferPointervRobustANGLE_length(context, targetPacked, pname, bufSize, length,
                                               params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
    InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
    CaptureGetBufferPointervRobustANGLE_params(context, targetPacked, pname, bufSize, length,
                                               params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetBufferPointervRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetIntegeri_vRobustANGLE(Context *context,
                                     GLenum target,
                                     GLuint index,
                                     GLsizei bufSize,
                                     GLsizei *length,
                                     GLint *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetIntegeri_vRobustANGLE(context, target, index, bufSize, length, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetIntegeri_vRobustANGLE_length(context, target, index, bufSize, length, data,
                                           isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture dataParam("data", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, data, &dataParam.value);
    CaptureGetIntegeri_vRobustANGLE_data(context, target, index, bufSize, length, data, isCallValid,
                                         &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glGetIntegeri_vRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetInternalformativRobustANGLE(Context *context,
                                           GLenum target,
                                           GLenum internalformat,
                                           GLenum pname,
                                           GLsizei bufSize,
                                           GLsizei *length,
                                           GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetInternalformativRobustANGLE(context, target, internalformat,
                                                              pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetInternalformativRobustANGLE_length(context, target, internalformat, pname, bufSize,
                                                 length, params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetInternalformativRobustANGLE_params(context, target, internalformat, pname, bufSize,
                                                 length, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetInternalformativRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetVertexAttribIivRobustANGLE(Context *context,
                                          GLuint index,
                                          GLenum pname,
                                          GLsizei bufSize,
                                          GLsizei *length,
                                          GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetVertexAttribIivRobustANGLE(context, index, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetVertexAttribIivRobustANGLE_length(context, index, pname, bufSize, length, params,
                                                isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetVertexAttribIivRobustANGLE_params(context, index, pname, bufSize, length, params,
                                                isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetVertexAttribIivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetVertexAttribIuivRobustANGLE(Context *context,
                                           GLuint index,
                                           GLenum pname,
                                           GLsizei bufSize,
                                           GLsizei *length,
                                           GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetVertexAttribIuivRobustANGLE(context, index, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetVertexAttribIuivRobustANGLE_length(context, index, pname, bufSize, length, params,
                                                 isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetVertexAttribIuivRobustANGLE_params(context, index, pname, bufSize, length, params,
                                                 isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetVertexAttribIuivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetUniformuivRobustANGLE(Context *context,
                                     GLuint program,
                                     GLint location,
                                     GLsizei bufSize,
                                     GLsizei *length,
                                     GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetUniformuivRobustANGLE(context, program, location, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetUniformuivRobustANGLE_length(context, program, location, bufSize, length, params,
                                           isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetUniformuivRobustANGLE_params(context, program, location, bufSize, length, params,
                                           isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetUniformuivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetActiveUniformBlockivRobustANGLE(Context *context,
                                               GLuint program,
                                               GLuint uniformBlockIndex,
                                               GLenum pname,
                                               GLsizei bufSize,
                                               GLsizei *length,
                                               GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetActiveUniformBlockivRobustANGLE(
        context, program, uniformBlockIndex, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("uniformBlockIndex", ParamType::TGLuint, uniformBlockIndex);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetActiveUniformBlockivRobustANGLE_length(context, program, uniformBlockIndex, pname,
                                                     bufSize, length, params, isCallValid,
                                                     &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetActiveUniformBlockivRobustANGLE_params(context, program, uniformBlockIndex, pname,
                                                     bufSize, length, params, isCallValid,
                                                     &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetActiveUniformBlockivRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetInteger64vRobustANGLE(Context *context,
                                     GLenum pname,
                                     GLsizei bufSize,
                                     GLsizei *length,
                                     GLint64 *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetInteger64vRobustANGLE(context, pname, bufSize, length, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetInteger64vRobustANGLE_length(context, pname, bufSize, length, data, isCallValid,
                                           &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture dataParam("data", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
    CaptureGetInteger64vRobustANGLE_data(context, pname, bufSize, length, data, isCallValid,
                                         &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glGetInteger64vRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetInteger64i_vRobustANGLE(Context *context,
                                       GLenum target,
                                       GLuint index,
                                       GLsizei bufSize,
                                       GLsizei *length,
                                       GLint64 *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetInteger64i_vRobustANGLE(context, target, index, bufSize, length, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetInteger64i_vRobustANGLE_length(context, target, index, bufSize, length, data,
                                             isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture dataParam("data", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
    CaptureGetInteger64i_vRobustANGLE_data(context, target, index, bufSize, length, data,
                                           isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glGetInteger64i_vRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetBufferParameteri64vRobustANGLE(Context *context,
                                              BufferBinding targetPacked,
                                              GLenum pname,
                                              GLsizei bufSize,
                                              GLsizei *length,
                                              GLint64 *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetBufferParameteri64vRobustANGLE(context, targetPacked, pname,
                                                                 bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetBufferParameteri64vRobustANGLE_length(context, targetPacked, pname, bufSize, length,
                                                    params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
    CaptureGetBufferParameteri64vRobustANGLE_params(context, targetPacked, pname, bufSize, length,
                                                    params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetBufferParameteri64vRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureSamplerParameterivRobustANGLE(Context *context,
                                          GLuint sampler,
                                          GLuint pname,
                                          GLsizei bufSize,
                                          const GLint *param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateSamplerParameterivRobustANGLE(context, sampler, pname, bufSize, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLuint, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramParam("param", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
    CaptureSamplerParameterivRobustANGLE_param(context, sampler, pname, bufSize, param, isCallValid,
                                               &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    frameCapture->captureCall(context, "glSamplerParameterivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureSamplerParameterfvRobustANGLE(Context *context,
                                          GLuint sampler,
                                          GLenum pname,
                                          GLsizei bufSize,
                                          const GLfloat *param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateSamplerParameterfvRobustANGLE(context, sampler, pname, bufSize, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramParam("param", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, param, &paramParam.value);
    CaptureSamplerParameterfvRobustANGLE_param(context, sampler, pname, bufSize, param, isCallValid,
                                               &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    frameCapture->captureCall(context, "glSamplerParameterfvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetSamplerParameterivRobustANGLE(Context *context,
                                             GLuint sampler,
                                             GLenum pname,
                                             GLsizei bufSize,
                                             GLsizei *length,
                                             GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetSamplerParameterivRobustANGLE(context, sampler, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetSamplerParameterivRobustANGLE_length(context, sampler, pname, bufSize, length, params,
                                                   isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetSamplerParameterivRobustANGLE_params(context, sampler, pname, bufSize, length, params,
                                                   isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetSamplerParameterivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetSamplerParameterfvRobustANGLE(Context *context,
                                             GLuint sampler,
                                             GLenum pname,
                                             GLsizei bufSize,
                                             GLsizei *length,
                                             GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetSamplerParameterfvRobustANGLE(context, sampler, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetSamplerParameterfvRobustANGLE_length(context, sampler, pname, bufSize, length, params,
                                                   isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetSamplerParameterfvRobustANGLE_params(context, sampler, pname, bufSize, length, params,
                                                   isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetSamplerParameterfvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetFramebufferParameterivRobustANGLE(Context *context,
                                                 GLuint sampler,
                                                 GLenum pname,
                                                 GLsizei bufSize,
                                                 GLsizei *length,
                                                 GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetFramebufferParameterivRobustANGLE(context, sampler, pname,
                                                                    bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetFramebufferParameterivRobustANGLE_length(context, sampler, pname, bufSize, length,
                                                       params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetFramebufferParameterivRobustANGLE_params(context, sampler, pname, bufSize, length,
                                                       params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetFramebufferParameterivRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetProgramInterfaceivRobustANGLE(Context *context,
                                             GLuint program,
                                             GLenum programInterface,
                                             GLenum pname,
                                             GLsizei bufSize,
                                             GLsizei *length,
                                             GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetProgramInterfaceivRobustANGLE(context, program, programInterface,
                                                                pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("programInterface", ParamType::TGLenum, programInterface);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetProgramInterfaceivRobustANGLE_length(context, program, programInterface, pname,
                                                   bufSize, length, params, isCallValid,
                                                   &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetProgramInterfaceivRobustANGLE_params(context, program, programInterface, pname,
                                                   bufSize, length, params, isCallValid,
                                                   &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetProgramInterfaceivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetBooleani_vRobustANGLE(Context *context,
                                     GLenum target,
                                     GLuint index,
                                     GLsizei bufSize,
                                     GLsizei *length,
                                     GLboolean *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetBooleani_vRobustANGLE(context, target, index, bufSize, length, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetBooleani_vRobustANGLE_length(context, target, index, bufSize, length, data,
                                           isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture dataParam("data", ParamType::TGLbooleanPointer);
    InitParamValue(ParamType::TGLbooleanPointer, data, &dataParam.value);
    CaptureGetBooleani_vRobustANGLE_data(context, target, index, bufSize, length, data, isCallValid,
                                         &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glGetBooleani_vRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetMultisamplefvRobustANGLE(Context *context,
                                        GLenum pname,
                                        GLuint index,
                                        GLsizei bufSize,
                                        GLsizei *length,
                                        GLfloat *val)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetMultisamplefvRobustANGLE(context, pname, index, bufSize, length, val);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetMultisamplefvRobustANGLE_length(context, pname, index, bufSize, length, val,
                                              isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture valParam("val", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, val, &valParam.value);
    CaptureGetMultisamplefvRobustANGLE_val(context, pname, index, bufSize, length, val, isCallValid,
                                           &valParam);
    paramBuffer.addParam(std::move(valParam));

    frameCapture->captureCall(context, "glGetMultisamplefvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexLevelParameterivRobustANGLE(Context *context,
                                              TextureTarget targetPacked,
                                              GLint level,
                                              GLenum pname,
                                              GLsizei bufSize,
                                              GLsizei *length,
                                              GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexLevelParameterivRobustANGLE(context, targetPacked, level,
                                                                 pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTexLevelParameterivRobustANGLE_length(context, targetPacked, level, pname, bufSize,
                                                    length, params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetTexLevelParameterivRobustANGLE_params(context, targetPacked, level, pname, bufSize,
                                                    length, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexLevelParameterivRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetTexLevelParameterfvRobustANGLE(Context *context,
                                              TextureTarget targetPacked,
                                              GLint level,
                                              GLenum pname,
                                              GLsizei bufSize,
                                              GLsizei *length,
                                              GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexLevelParameterfvRobustANGLE(context, targetPacked, level,
                                                                 pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTexLevelParameterfvRobustANGLE_length(context, targetPacked, level, pname, bufSize,
                                                    length, params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetTexLevelParameterfvRobustANGLE_params(context, targetPacked, level, pname, bufSize,
                                                    length, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexLevelParameterfvRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetPointervRobustANGLERobustANGLE(Context *context,
                                              GLenum pname,
                                              GLsizei bufSize,
                                              GLsizei *length,
                                              void **params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetPointervRobustANGLERobustANGLE(context, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetPointervRobustANGLERobustANGLE_length(context, pname, bufSize, length, params,
                                                    isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
    InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
    CaptureGetPointervRobustANGLERobustANGLE_params(context, pname, bufSize, length, params,
                                                    isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetPointervRobustANGLERobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureReadnPixelsRobustANGLE(Context *context,
                                   GLint x,
                                   GLint y,
                                   GLsizei width,
                                   GLsizei height,
                                   GLenum format,
                                   GLenum type,
                                   GLsizei bufSize,
                                   GLsizei *length,
                                   GLsizei *columns,
                                   GLsizei *rows,
                                   void *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateReadnPixelsRobustANGLE(context, x, y, width, height, format, type,
                                                      bufSize, length, columns, rows, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureReadnPixelsRobustANGLE_length(context, x, y, width, height, format, type, bufSize,
                                         length, columns, rows, data, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture columnsParam("columns", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, columns, &columnsParam.value);
    CaptureReadnPixelsRobustANGLE_columns(context, x, y, width, height, format, type, bufSize,
                                          length, columns, rows, data, isCallValid, &columnsParam);
    paramBuffer.addParam(std::move(columnsParam));

    ParamCapture rowsParam("rows", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, rows, &rowsParam.value);
    CaptureReadnPixelsRobustANGLE_rows(context, x, y, width, height, format, type, bufSize, length,
                                       columns, rows, data, isCallValid, &rowsParam);
    paramBuffer.addParam(std::move(rowsParam));

    ParamCapture dataParam("data", ParamType::TvoidPointer);
    InitParamValue(ParamType::TvoidPointer, data, &dataParam.value);
    CaptureReadnPixelsRobustANGLE_data(context, x, y, width, height, format, type, bufSize, length,
                                       columns, rows, data, isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glReadnPixelsRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetnUniformfvRobustANGLE(Context *context,
                                     GLuint program,
                                     GLint location,
                                     GLsizei bufSize,
                                     GLsizei *length,
                                     GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetnUniformfvRobustANGLE(context, program, location, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetnUniformfvRobustANGLE_length(context, program, location, bufSize, length, params,
                                           isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetnUniformfvRobustANGLE_params(context, program, location, bufSize, length, params,
                                           isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetnUniformfvRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetnUniformivRobustANGLE(Context *context,
                                     GLuint program,
                                     GLint location,
                                     GLsizei bufSize,
                                     GLsizei *length,
                                     GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetnUniformivRobustANGLE(context, program, location, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetnUniformivRobustANGLE_length(context, program, location, bufSize, length, params,
                                           isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetnUniformivRobustANGLE_params(context, program, location, bufSize, length, params,
                                           isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetnUniformivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetnUniformuivRobustANGLE(Context *context,
                                      GLuint program,
                                      GLint location,
                                      GLsizei bufSize,
                                      GLsizei *length,
                                      GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetnUniformuivRobustANGLE(context, program, location, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetnUniformuivRobustANGLE_length(context, program, location, bufSize, length, params,
                                            isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetnUniformuivRobustANGLE_params(context, program, location, bufSize, length, params,
                                            isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetnUniformuivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexParameterIivRobustANGLE(Context *context,
                                       TextureType targetPacked,
                                       GLenum pname,
                                       GLsizei bufSize,
                                       const GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexParameterIivRobustANGLE(context, targetPacked, pname, bufSize, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
    CaptureTexParameterIivRobustANGLE_params(context, targetPacked, pname, bufSize, params,
                                             isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexParameterIivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexParameterIuivRobustANGLE(Context *context,
                                        TextureType targetPacked,
                                        GLenum pname,
                                        GLsizei bufSize,
                                        const GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexParameterIuivRobustANGLE(context, targetPacked, pname, bufSize, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, params, &paramsParam.value);
    CaptureTexParameterIuivRobustANGLE_params(context, targetPacked, pname, bufSize, params,
                                              isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexParameterIuivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexParameterIivRobustANGLE(Context *context,
                                          TextureType targetPacked,
                                          GLenum pname,
                                          GLsizei bufSize,
                                          GLsizei *length,
                                          GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexParameterIivRobustANGLE(context, targetPacked, pname, bufSize,
                                                             length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTexParameterIivRobustANGLE_length(context, targetPacked, pname, bufSize, length,
                                                params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetTexParameterIivRobustANGLE_params(context, targetPacked, pname, bufSize, length,
                                                params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexParameterIivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexParameterIuivRobustANGLE(Context *context,
                                           TextureType targetPacked,
                                           GLenum pname,
                                           GLsizei bufSize,
                                           GLsizei *length,
                                           GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexParameterIuivRobustANGLE(context, targetPacked, pname, bufSize,
                                                              length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTexParameterIuivRobustANGLE_length(context, targetPacked, pname, bufSize, length,
                                                 params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetTexParameterIuivRobustANGLE_params(context, targetPacked, pname, bufSize, length,
                                                 params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexParameterIuivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureSamplerParameterIivRobustANGLE(Context *context,
                                           GLuint sampler,
                                           GLenum pname,
                                           GLsizei bufSize,
                                           const GLint *param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateSamplerParameterIivRobustANGLE(context, sampler, pname, bufSize, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramParam("param", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
    CaptureSamplerParameterIivRobustANGLE_param(context, sampler, pname, bufSize, param,
                                                isCallValid, &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    frameCapture->captureCall(context, "glSamplerParameterIivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureSamplerParameterIuivRobustANGLE(Context *context,
                                            GLuint sampler,
                                            GLenum pname,
                                            GLsizei bufSize,
                                            const GLuint *param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateSamplerParameterIuivRobustANGLE(context, sampler, pname, bufSize, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, param, &paramParam.value);
    CaptureSamplerParameterIuivRobustANGLE_param(context, sampler, pname, bufSize, param,
                                                 isCallValid, &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    frameCapture->captureCall(context, "glSamplerParameterIuivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetSamplerParameterIivRobustANGLE(Context *context,
                                              GLuint sampler,
                                              GLenum pname,
                                              GLsizei bufSize,
                                              GLsizei *length,
                                              GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetSamplerParameterIivRobustANGLE(context, sampler, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetSamplerParameterIivRobustANGLE_length(context, sampler, pname, bufSize, length,
                                                    params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetSamplerParameterIivRobustANGLE_params(context, sampler, pname, bufSize, length,
                                                    params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetSamplerParameterIivRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetSamplerParameterIuivRobustANGLE(Context *context,
                                               GLuint sampler,
                                               GLenum pname,
                                               GLsizei bufSize,
                                               GLsizei *length,
                                               GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetSamplerParameterIuivRobustANGLE(context, sampler, pname, bufSize,
                                                                  length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetSamplerParameterIuivRobustANGLE_length(context, sampler, pname, bufSize, length,
                                                     params, isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetSamplerParameterIuivRobustANGLE_params(context, sampler, pname, bufSize, length,
                                                     params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetSamplerParameterIuivRobustANGLE",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetQueryObjectivRobustANGLE(Context *context,
                                        GLuint id,
                                        GLenum pname,
                                        GLsizei bufSize,
                                        GLsizei *length,
                                        GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetQueryObjectivRobustANGLE(context, id, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetQueryObjectivRobustANGLE_length(context, id, pname, bufSize, length, params,
                                              isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetQueryObjectivRobustANGLE_params(context, id, pname, bufSize, length, params,
                                              isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjectivRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetQueryObjecti64vRobustANGLE(Context *context,
                                          GLuint id,
                                          GLenum pname,
                                          GLsizei bufSize,
                                          GLsizei *length,
                                          GLint64 *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetQueryObjecti64vRobustANGLE(context, id, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetQueryObjecti64vRobustANGLE_length(context, id, pname, bufSize, length, params,
                                                isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
    CaptureGetQueryObjecti64vRobustANGLE_params(context, id, pname, bufSize, length, params,
                                                isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjecti64vRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetQueryObjectui64vRobustANGLE(Context *context,
                                           GLuint id,
                                           GLenum pname,
                                           GLsizei bufSize,
                                           GLsizei *length,
                                           GLuint64 *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetQueryObjectui64vRobustANGLE(context, id, pname, bufSize, length, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetQueryObjectui64vRobustANGLE_length(context, id, pname, bufSize, length, params,
                                                 isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
    InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
    CaptureGetQueryObjectui64vRobustANGLE_params(context, id, pname, bufSize, length, params,
                                                 isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjectui64vRobustANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexImage2DExternalANGLE(Context *context,
                                    TextureTarget targetPacked,
                                    GLint level,
                                    GLint internalformat,
                                    GLsizei width,
                                    GLsizei height,
                                    GLint border,
                                    GLenum format,
                                    GLenum type)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexImage2DExternalANGLE(context, targetPacked, level, internalformat,
                                                       width, height, border, format, type);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);

    frameCapture->captureCall(context, "glTexImage2DExternalANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureInvalidateTextureANGLE(Context *context, TextureType targetPacked)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateInvalidateTextureANGLE(context, targetPacked);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);

    frameCapture->captureCall(context, "glInvalidateTextureANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexStorage2DMultisampleANGLE(Context *context,
                                         TextureType targetPacked,
                                         GLsizei samples,
                                         GLenum internalformat,
                                         GLsizei width,
                                         GLsizei height,
                                         GLboolean fixedsamplelocations)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexStorage2DMultisampleANGLE(
        context, targetPacked, samples, internalformat, width, height, fixedsamplelocations);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);

    frameCapture->captureCall(context, "glTexStorage2DMultisampleANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexLevelParameterivANGLE(Context *context,
                                        TextureTarget targetPacked,
                                        GLint level,
                                        GLenum pname,
                                        GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetTexLevelParameterivANGLE(context, targetPacked, level, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetTexLevelParameterivANGLE_params(context, targetPacked, level, pname, params,
                                              isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexLevelParameterivANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexLevelParameterfvANGLE(Context *context,
                                        TextureTarget targetPacked,
                                        GLint level,
                                        GLenum pname,
                                        GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetTexLevelParameterfvANGLE(context, targetPacked, level, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetTexLevelParameterfvANGLE_params(context, targetPacked, level, pname, params,
                                              isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexLevelParameterfvANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetMultisamplefvANGLE(Context *context, GLenum pname, GLuint index, GLfloat *val)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetMultisamplefvANGLE(context, pname, index, val);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture valParam("val", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, val, &valParam.value);
    CaptureGetMultisamplefvANGLE_val(context, pname, index, val, isCallValid, &valParam);
    paramBuffer.addParam(std::move(valParam));

    frameCapture->captureCall(context, "glGetMultisamplefvANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureSampleMaskiANGLE(Context *context, GLuint maskNumber, GLbitfield mask)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateSampleMaskiANGLE(context, maskNumber, mask);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("maskNumber", ParamType::TGLuint, maskNumber);
    paramBuffer.addValueParam("mask", ParamType::TGLbitfield, mask);

    frameCapture->captureCall(context, "glSampleMaskiANGLE", std::move(paramBuffer), isCallValid);
}

void CaptureGetTranslatedShaderSourceANGLE(Context *context,
                                           GLuint shader,
                                           GLsizei bufsize,
                                           GLsizei *length,
                                           GLchar *source)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetTranslatedShaderSourceANGLE(context, shader, bufsize, length, source);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("shader", ParamType::TGLuint, shader);
    paramBuffer.addValueParam("bufsize", ParamType::TGLsizei, bufsize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTranslatedShaderSourceANGLE_length(context, shader, bufsize, length, source,
                                                 isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture sourceParam("source", ParamType::TGLcharPointer);
    InitParamValue(ParamType::TGLcharPointer, source, &sourceParam.value);
    CaptureGetTranslatedShaderSourceANGLE_source(context, shader, bufsize, length, source,
                                                 isCallValid, &sourceParam);
    paramBuffer.addParam(std::move(sourceParam));

    frameCapture->captureCall(context, "glGetTranslatedShaderSourceANGLE", std::move(paramBuffer),
                              isCallValid);
}

void CaptureBindUniformLocationCHROMIUM(Context *context,
                                        GLuint program,
                                        GLint location,
                                        const GLchar *name)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBindUniformLocationCHROMIUM(context, program, location, name);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureBindUniformLocationCHROMIUM_name(context, program, location, name, isCallValid,
                                            &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    frameCapture->captureCall(context, "glBindUniformLocationCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCompressedCopyTextureCHROMIUM(Context *context, GLuint sourceId, GLuint destId)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCompressedCopyTextureCHROMIUM(context, sourceId, destId);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sourceId", ParamType::TGLuint, sourceId);
    paramBuffer.addValueParam("destId", ParamType::TGLuint, destId);

    frameCapture->captureCall(context, "glCompressedCopyTextureCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCopyTextureCHROMIUM(Context *context,
                                GLuint sourceId,
                                GLint sourceLevel,
                                TextureTarget destTargetPacked,
                                GLuint destId,
                                GLint destLevel,
                                GLint internalFormat,
                                GLenum destType,
                                GLboolean unpackFlipY,
                                GLboolean unpackPremultiplyAlpha,
                                GLboolean unpackUnmultiplyAlpha)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCopyTextureCHROMIUM(
        context, sourceId, sourceLevel, destTargetPacked, destId, destLevel, internalFormat,
        destType, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sourceId", ParamType::TGLuint, sourceId);
    paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
    paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
    paramBuffer.addValueParam("destId", ParamType::TGLuint, destId);
    paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
    paramBuffer.addValueParam("internalFormat", ParamType::TGLint, internalFormat);
    paramBuffer.addValueParam("destType", ParamType::TGLenum, destType);
    paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
    paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
                              unpackPremultiplyAlpha);
    paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
                              unpackUnmultiplyAlpha);

    frameCapture->captureCall(context, "glCopyTextureCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCopySubTextureCHROMIUM(Context *context,
                                   GLuint sourceId,
                                   GLint sourceLevel,
                                   TextureTarget destTargetPacked,
                                   GLuint destId,
                                   GLint destLevel,
                                   GLint xoffset,
                                   GLint yoffset,
                                   GLint x,
                                   GLint y,
                                   GLint width,
                                   GLint height,
                                   GLboolean unpackFlipY,
                                   GLboolean unpackPremultiplyAlpha,
                                   GLboolean unpackUnmultiplyAlpha)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCopySubTextureCHROMIUM(
        context, sourceId, sourceLevel, destTargetPacked, destId, destLevel, xoffset, yoffset, x, y,
        width, height, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sourceId", ParamType::TGLuint, sourceId);
    paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
    paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
    paramBuffer.addValueParam("destId", ParamType::TGLuint, destId);
    paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("width", ParamType::TGLint, width);
    paramBuffer.addValueParam("height", ParamType::TGLint, height);
    paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
    paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
                              unpackPremultiplyAlpha);
    paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
                              unpackUnmultiplyAlpha);

    frameCapture->captureCall(context, "glCopySubTextureCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCoverageModulationCHROMIUM(Context *context, GLenum components)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCoverageModulationCHROMIUM(context, components);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("components", ParamType::TGLenum, components);

    frameCapture->captureCall(context, "glCoverageModulationCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMatrixLoadfCHROMIUM(Context *context, GLenum matrixMode, const GLfloat *matrix)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMatrixLoadfCHROMIUM(context, matrixMode, matrix);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("matrixMode", ParamType::TGLenum, matrixMode);

    ParamCapture matrixParam("matrix", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, matrix, &matrixParam.value);
    CaptureMatrixLoadfCHROMIUM_matrix(context, matrixMode, matrix, isCallValid, &matrixParam);
    paramBuffer.addParam(std::move(matrixParam));

    frameCapture->captureCall(context, "glMatrixLoadfCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMatrixLoadIdentityCHROMIUM(Context *context, GLenum matrixMode)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMatrixLoadIdentityCHROMIUM(context, matrixMode);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("matrixMode", ParamType::TGLenum, matrixMode);

    frameCapture->captureCall(context, "glMatrixLoadIdentityCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureLoseContextCHROMIUM(Context *context,
                                GraphicsResetStatus currentPacked,
                                GraphicsResetStatus otherPacked)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateLoseContextCHROMIUM(context, currentPacked, otherPacked);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("currentPacked", ParamType::TGraphicsResetStatus, currentPacked);
    paramBuffer.addValueParam("otherPacked", ParamType::TGraphicsResetStatus, otherPacked);

    frameCapture->captureCall(context, "glLoseContextCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGenPathsCHROMIUM(Context *context, GLsizei range)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenPathsCHROMIUM(context, range);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("range", ParamType::TGLsizei, range);

    frameCapture->captureCall(context, "glGenPathsCHROMIUM", std::move(paramBuffer), isCallValid);
}

void CaptureDeletePathsCHROMIUM(Context *context, GLuint first, GLsizei range)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeletePathsCHROMIUM(context, first, range);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("first", ParamType::TGLuint, first);
    paramBuffer.addValueParam("range", ParamType::TGLsizei, range);

    frameCapture->captureCall(context, "glDeletePathsCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureIsPathCHROMIUM(Context *context, GLuint path)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsPathCHROMIUM(context, path);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);

    frameCapture->captureCall(context, "glIsPathCHROMIUM", std::move(paramBuffer), isCallValid);
}

void CapturePathCommandsCHROMIUM(Context *context,
                                 GLuint path,
                                 GLsizei numCommands,
                                 const GLubyte *commands,
                                 GLsizei numCoords,
                                 GLenum coordType,
                                 const void *coords)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePathCommandsCHROMIUM(context, path, numCommands, commands, numCoords,
                                                    coordType, coords);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("numCommands", ParamType::TGLsizei, numCommands);

    ParamCapture commandsParam("commands", ParamType::TGLubyteConstPointer);
    InitParamValue(ParamType::TGLubyteConstPointer, commands, &commandsParam.value);
    CapturePathCommandsCHROMIUM_commands(context, path, numCommands, commands, numCoords, coordType,
                                         coords, isCallValid, &commandsParam);
    paramBuffer.addParam(std::move(commandsParam));

    paramBuffer.addValueParam("numCoords", ParamType::TGLsizei, numCoords);
    paramBuffer.addValueParam("coordType", ParamType::TGLenum, coordType);

    ParamCapture coordsParam("coords", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, coords, &coordsParam.value);
    CapturePathCommandsCHROMIUM_coords(context, path, numCommands, commands, numCoords, coordType,
                                       coords, isCallValid, &coordsParam);
    paramBuffer.addParam(std::move(coordsParam));

    frameCapture->captureCall(context, "glPathCommandsCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CapturePathParameterfCHROMIUM(Context *context, GLuint path, GLenum pname, GLfloat value)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePathParameterfCHROMIUM(context, path, pname, value);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("value", ParamType::TGLfloat, value);

    frameCapture->captureCall(context, "glPathParameterfCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CapturePathParameteriCHROMIUM(Context *context, GLuint path, GLenum pname, GLint value)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePathParameteriCHROMIUM(context, path, pname, value);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("value", ParamType::TGLint, value);

    frameCapture->captureCall(context, "glPathParameteriCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetPathParameterfvCHROMIUM(Context *context, GLuint path, GLenum pname, GLfloat *value)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetPathParameterfvCHROMIUM(context, path, pname, value);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture valueParam("value", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, value, &valueParam.value);
    CaptureGetPathParameterfvCHROMIUM_value(context, path, pname, value, isCallValid, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    frameCapture->captureCall(context, "glGetPathParameterfvCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetPathParameterivCHROMIUM(Context *context, GLuint path, GLenum pname, GLint *value)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetPathParameterivCHROMIUM(context, path, pname, value);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture valueParam("value", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, value, &valueParam.value);
    CaptureGetPathParameterivCHROMIUM_value(context, path, pname, value, isCallValid, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    frameCapture->captureCall(context, "glGetPathParameterivCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CapturePathStencilFuncCHROMIUM(Context *context, GLenum func, GLint ref, GLuint mask)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePathStencilFuncCHROMIUM(context, func, ref, mask);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("func", ParamType::TGLenum, func);
    paramBuffer.addValueParam("ref", ParamType::TGLint, ref);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);

    frameCapture->captureCall(context, "glPathStencilFuncCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureStencilFillPathCHROMIUM(Context *context, GLuint path, GLenum fillMode, GLuint mask)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateStencilFillPathCHROMIUM(context, path, fillMode, mask);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("fillMode", ParamType::TGLenum, fillMode);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);

    frameCapture->captureCall(context, "glStencilFillPathCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureStencilStrokePathCHROMIUM(Context *context, GLuint path, GLint reference, GLuint mask)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateStencilStrokePathCHROMIUM(context, path, reference, mask);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("reference", ParamType::TGLint, reference);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);

    frameCapture->captureCall(context, "glStencilStrokePathCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCoverFillPathCHROMIUM(Context *context, GLuint path, GLenum coverMode)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCoverFillPathCHROMIUM(context, path, coverMode);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);

    frameCapture->captureCall(context, "glCoverFillPathCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCoverStrokePathCHROMIUM(Context *context, GLuint path, GLenum coverMode)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCoverStrokePathCHROMIUM(context, path, coverMode);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);

    frameCapture->captureCall(context, "glCoverStrokePathCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureStencilThenCoverFillPathCHROMIUM(Context *context,
                                             GLuint path,
                                             GLenum fillMode,
                                             GLuint mask,
                                             GLenum coverMode)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateStencilThenCoverFillPathCHROMIUM(context, path, fillMode, mask, coverMode);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("fillMode", ParamType::TGLenum, fillMode);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);

    frameCapture->captureCall(context, "glStencilThenCoverFillPathCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureStencilThenCoverStrokePathCHROMIUM(Context *context,
                                               GLuint path,
                                               GLint reference,
                                               GLuint mask,
                                               GLenum coverMode)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateStencilThenCoverStrokePathCHROMIUM(context, path, reference, mask, coverMode);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("path", ParamType::TGLuint, path);
    paramBuffer.addValueParam("reference", ParamType::TGLint, reference);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);

    frameCapture->captureCall(context, "glStencilThenCoverStrokePathCHROMIUM",
                              std::move(paramBuffer), isCallValid);
}

void CaptureCoverFillPathInstancedCHROMIUM(Context *context,
                                           GLsizei numPath,
                                           GLenum pathNameType,
                                           const void *paths,
                                           GLuint pathBase,
                                           GLenum coverMode,
                                           GLenum transformType,
                                           const GLfloat *transformValues)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCoverFillPathInstancedCHROMIUM(
        context, numPath, pathNameType, paths, pathBase, coverMode, transformType, transformValues);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("numPath", ParamType::TGLsizei, numPath);
    paramBuffer.addValueParam("pathNameType", ParamType::TGLenum, pathNameType);

    ParamCapture pathsParam("paths", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, paths, &pathsParam.value);
    CaptureCoverFillPathInstancedCHROMIUM_paths(context, numPath, pathNameType, paths, pathBase,
                                                coverMode, transformType, transformValues,
                                                isCallValid, &pathsParam);
    paramBuffer.addParam(std::move(pathsParam));

    paramBuffer.addValueParam("pathBase", ParamType::TGLuint, pathBase);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);
    paramBuffer.addValueParam("transformType", ParamType::TGLenum, transformType);

    ParamCapture transformValuesParam("transformValues", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, transformValues, &transformValuesParam.value);
    CaptureCoverFillPathInstancedCHROMIUM_transformValues(
        context, numPath, pathNameType, paths, pathBase, coverMode, transformType, transformValues,
        isCallValid, &transformValuesParam);
    paramBuffer.addParam(std::move(transformValuesParam));

    frameCapture->captureCall(context, "glCoverFillPathInstancedCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCoverStrokePathInstancedCHROMIUM(Context *context,
                                             GLsizei numPath,
                                             GLenum pathNameType,
                                             const void *paths,
                                             GLuint pathBase,
                                             GLenum coverMode,
                                             GLenum transformType,
                                             const GLfloat *transformValues)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCoverStrokePathInstancedCHROMIUM(
        context, numPath, pathNameType, paths, pathBase, coverMode, transformType, transformValues);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("numPath", ParamType::TGLsizei, numPath);
    paramBuffer.addValueParam("pathNameType", ParamType::TGLenum, pathNameType);

    ParamCapture pathsParam("paths", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, paths, &pathsParam.value);
    CaptureCoverStrokePathInstancedCHROMIUM_paths(context, numPath, pathNameType, paths, pathBase,
                                                  coverMode, transformType, transformValues,
                                                  isCallValid, &pathsParam);
    paramBuffer.addParam(std::move(pathsParam));

    paramBuffer.addValueParam("pathBase", ParamType::TGLuint, pathBase);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);
    paramBuffer.addValueParam("transformType", ParamType::TGLenum, transformType);

    ParamCapture transformValuesParam("transformValues", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, transformValues, &transformValuesParam.value);
    CaptureCoverStrokePathInstancedCHROMIUM_transformValues(
        context, numPath, pathNameType, paths, pathBase, coverMode, transformType, transformValues,
        isCallValid, &transformValuesParam);
    paramBuffer.addParam(std::move(transformValuesParam));

    frameCapture->captureCall(context, "glCoverStrokePathInstancedCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureStencilStrokePathInstancedCHROMIUM(Context *context,
                                               GLsizei numPath,
                                               GLenum pathNameType,
                                               const void *paths,
                                               GLuint pathBase,
                                               GLint reference,
                                               GLuint mask,
                                               GLenum transformType,
                                               const GLfloat *transformValues)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateStencilStrokePathInstancedCHROMIUM(context, numPath, pathNameType, paths, pathBase,
                                                   reference, mask, transformType, transformValues);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("numPath", ParamType::TGLsizei, numPath);
    paramBuffer.addValueParam("pathNameType", ParamType::TGLenum, pathNameType);

    ParamCapture pathsParam("paths", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, paths, &pathsParam.value);
    CaptureStencilStrokePathInstancedCHROMIUM_paths(context, numPath, pathNameType, paths, pathBase,
                                                    reference, mask, transformType, transformValues,
                                                    isCallValid, &pathsParam);
    paramBuffer.addParam(std::move(pathsParam));

    paramBuffer.addValueParam("pathBase", ParamType::TGLuint, pathBase);
    paramBuffer.addValueParam("reference", ParamType::TGLint, reference);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);
    paramBuffer.addValueParam("transformType", ParamType::TGLenum, transformType);

    ParamCapture transformValuesParam("transformValues", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, transformValues, &transformValuesParam.value);
    CaptureStencilStrokePathInstancedCHROMIUM_transformValues(
        context, numPath, pathNameType, paths, pathBase, reference, mask, transformType,
        transformValues, isCallValid, &transformValuesParam);
    paramBuffer.addParam(std::move(transformValuesParam));

    frameCapture->captureCall(context, "glStencilStrokePathInstancedCHROMIUM",
                              std::move(paramBuffer), isCallValid);
}

void CaptureStencilFillPathInstancedCHROMIUM(Context *context,
                                             GLsizei numPaths,
                                             GLenum pathNameType,
                                             const void *paths,
                                             GLuint pathBase,
                                             GLenum fillMode,
                                             GLuint mask,
                                             GLenum transformType,
                                             const GLfloat *transformValues)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateStencilFillPathInstancedCHROMIUM(context, numPaths, pathNameType, paths, pathBase,
                                                 fillMode, mask, transformType, transformValues);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("numPaths", ParamType::TGLsizei, numPaths);
    paramBuffer.addValueParam("pathNameType", ParamType::TGLenum, pathNameType);

    ParamCapture pathsParam("paths", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, paths, &pathsParam.value);
    CaptureStencilFillPathInstancedCHROMIUM_paths(context, numPaths, pathNameType, paths, pathBase,
                                                  fillMode, mask, transformType, transformValues,
                                                  isCallValid, &pathsParam);
    paramBuffer.addParam(std::move(pathsParam));

    paramBuffer.addValueParam("pathBase", ParamType::TGLuint, pathBase);
    paramBuffer.addValueParam("fillMode", ParamType::TGLenum, fillMode);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);
    paramBuffer.addValueParam("transformType", ParamType::TGLenum, transformType);

    ParamCapture transformValuesParam("transformValues", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, transformValues, &transformValuesParam.value);
    CaptureStencilFillPathInstancedCHROMIUM_transformValues(
        context, numPaths, pathNameType, paths, pathBase, fillMode, mask, transformType,
        transformValues, isCallValid, &transformValuesParam);
    paramBuffer.addParam(std::move(transformValuesParam));

    frameCapture->captureCall(context, "glStencilFillPathInstancedCHROMIUM", std::move(paramBuffer),
                              isCallValid);
}

void CaptureStencilThenCoverFillPathInstancedCHROMIUM(Context *context,
                                                      GLsizei numPaths,
                                                      GLenum pathNameType,
                                                      const void *paths,
                                                      GLuint pathBase,
                                                      GLenum fillMode,
                                                      GLuint mask,
                                                      GLenum coverMode,
                                                      GLenum transformType,
                                                      const GLfloat *transformValues)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateStencilThenCoverFillPathInstancedCHROMIUM(
        context, numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode, transformType,
        transformValues);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("numPaths", ParamType::TGLsizei, numPaths);
    paramBuffer.addValueParam("pathNameType", ParamType::TGLenum, pathNameType);

    ParamCapture pathsParam("paths", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, paths, &pathsParam.value);
    CaptureStencilThenCoverFillPathInstancedCHROMIUM_paths(
        context, numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode, transformType,
        transformValues, isCallValid, &pathsParam);
    paramBuffer.addParam(std::move(pathsParam));

    paramBuffer.addValueParam("pathBase", ParamType::TGLuint, pathBase);
    paramBuffer.addValueParam("fillMode", ParamType::TGLenum, fillMode);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);
    paramBuffer.addValueParam("transformType", ParamType::TGLenum, transformType);

    ParamCapture transformValuesParam("transformValues", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, transformValues, &transformValuesParam.value);
    CaptureStencilThenCoverFillPathInstancedCHROMIUM_transformValues(
        context, numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode, transformType,
        transformValues, isCallValid, &transformValuesParam);
    paramBuffer.addParam(std::move(transformValuesParam));

    frameCapture->captureCall(context, "glStencilThenCoverFillPathInstancedCHROMIUM",
                              std::move(paramBuffer), isCallValid);
}

void CaptureStencilThenCoverStrokePathInstancedCHROMIUM(Context *context,
                                                        GLsizei numPaths,
                                                        GLenum pathNameType,
                                                        const void *paths,
                                                        GLuint pathBase,
                                                        GLint reference,
                                                        GLuint mask,
                                                        GLenum coverMode,
                                                        GLenum transformType,
                                                        const GLfloat *transformValues)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateStencilThenCoverStrokePathInstancedCHROMIUM(
        context, numPaths, pathNameType, paths, pathBase, reference, mask, coverMode, transformType,
        transformValues);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("numPaths", ParamType::TGLsizei, numPaths);
    paramBuffer.addValueParam("pathNameType", ParamType::TGLenum, pathNameType);

    ParamCapture pathsParam("paths", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, paths, &pathsParam.value);
    CaptureStencilThenCoverStrokePathInstancedCHROMIUM_paths(
        context, numPaths, pathNameType, paths, pathBase, reference, mask, coverMode, transformType,
        transformValues, isCallValid, &pathsParam);
    paramBuffer.addParam(std::move(pathsParam));

    paramBuffer.addValueParam("pathBase", ParamType::TGLuint, pathBase);
    paramBuffer.addValueParam("reference", ParamType::TGLint, reference);
    paramBuffer.addValueParam("mask", ParamType::TGLuint, mask);
    paramBuffer.addValueParam("coverMode", ParamType::TGLenum, coverMode);
    paramBuffer.addValueParam("transformType", ParamType::TGLenum, transformType);

    ParamCapture transformValuesParam("transformValues", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, transformValues, &transformValuesParam.value);
    CaptureStencilThenCoverStrokePathInstancedCHROMIUM_transformValues(
        context, numPaths, pathNameType, paths, pathBase, reference, mask, coverMode, transformType,
        transformValues, isCallValid, &transformValuesParam);
    paramBuffer.addParam(std::move(transformValuesParam));

    frameCapture->captureCall(context, "glStencilThenCoverStrokePathInstancedCHROMIUM",
                              std::move(paramBuffer), isCallValid);
}

void CaptureBindFragmentInputLocationCHROMIUM(Context *context,
                                              GLuint programs,
                                              GLint location,
                                              const GLchar *name)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBindFragmentInputLocationCHROMIUM(context, programs, location, name);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("programs", ParamType::TGLuint, programs);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureBindFragmentInputLocationCHROMIUM_name(context, programs, location, name, isCallValid,
                                                  &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    frameCapture->captureCall(context, "glBindFragmentInputLocationCHROMIUM",
                              std::move(paramBuffer), isCallValid);
}

void CaptureProgramPathFragmentInputGenCHROMIUM(Context *context,
                                                GLuint program,
                                                GLint location,
                                                GLenum genMode,
                                                GLint components,
                                                const GLfloat *coeffs)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateProgramPathFragmentInputGenCHROMIUM(context, program, location,
                                                                   genMode, components, coeffs);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("genMode", ParamType::TGLenum, genMode);
    paramBuffer.addValueParam("components", ParamType::TGLint, components);

    ParamCapture coeffsParam("coeffs", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, coeffs, &coeffsParam.value);
    CaptureProgramPathFragmentInputGenCHROMIUM_coeffs(
        context, program, location, genMode, components, coeffs, isCallValid, &coeffsParam);
    paramBuffer.addParam(std::move(coeffsParam));

    frameCapture->captureCall(context, "glProgramPathFragmentInputGenCHROMIUM",
                              std::move(paramBuffer), isCallValid);
}

void CaptureBindFragDataLocationEXT(Context *context,
                                    GLuint program,
                                    GLuint color,
                                    const GLchar *name)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBindFragDataLocationEXT(context, program, color, name);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("color", ParamType::TGLuint, color);

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureBindFragDataLocationEXT_name(context, program, color, name, isCallValid, &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    frameCapture->captureCall(context, "glBindFragDataLocationEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureBindFragDataLocationIndexedEXT(Context *context,
                                           GLuint program,
                                           GLuint colorNumber,
                                           GLuint index,
                                           const GLchar *name)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateBindFragDataLocationIndexedEXT(context, program, colorNumber, index, name);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("colorNumber", ParamType::TGLuint, colorNumber);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureBindFragDataLocationIndexedEXT_name(context, program, colorNumber, index, name,
                                               isCallValid, &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    frameCapture->captureCall(context, "glBindFragDataLocationIndexedEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetFragDataIndexEXT(Context *context, GLuint program, const GLchar *name)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetFragDataIndexEXT(context, program, name);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureGetFragDataIndexEXT_name(context, program, name, isCallValid, &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    frameCapture->captureCall(context, "glGetFragDataIndexEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetProgramResourceLocationIndexEXT(Context *context,
                                               GLuint program,
                                               GLenum programInterface,
                                               const GLchar *name)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetProgramResourceLocationIndexEXT(context, program, programInterface, name);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("programInterface", ParamType::TGLenum, programInterface);

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureGetProgramResourceLocationIndexEXT_name(context, program, programInterface, name,
                                                   isCallValid, &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    frameCapture->captureCall(context, "glGetProgramResourceLocationIndexEXT",
                              std::move(paramBuffer), isCallValid);
}

void CaptureInsertEventMarkerEXT(Context *context, GLsizei length, const GLchar *marker)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateInsertEventMarkerEXT(context, length, marker);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("length", ParamType::TGLsizei, length);

    ParamCapture markerParam("marker", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, marker, &markerParam.value);
    CaptureInsertEventMarkerEXT_marker(context, length, marker, isCallValid, &markerParam);
    paramBuffer.addParam(std::move(markerParam));

    frameCapture->captureCall(context, "glInsertEventMarkerEXT", std::move(paramBuffer),
                              isCallValid);
}

void CapturePopGroupMarkerEXT(Context *context)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePopGroupMarkerEXT(context);
    ParamBuffer paramBuffer;

    frameCapture->captureCall(context, "glPopGroupMarkerEXT", std::move(paramBuffer), isCallValid);
}

void CapturePushGroupMarkerEXT(Context *context, GLsizei length, const GLchar *marker)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePushGroupMarkerEXT(context, length, marker);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("length", ParamType::TGLsizei, length);

    ParamCapture markerParam("marker", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, marker, &markerParam.value);
    CapturePushGroupMarkerEXT_marker(context, length, marker, isCallValid, &markerParam);
    paramBuffer.addParam(std::move(markerParam));

    frameCapture->captureCall(context, "glPushGroupMarkerEXT", std::move(paramBuffer), isCallValid);
}

void CaptureDiscardFramebufferEXT(Context *context,
                                  GLenum target,
                                  GLsizei numAttachments,
                                  const GLenum *attachments)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDiscardFramebufferEXT(context, target, numAttachments, attachments);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);

    ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
    InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
    CaptureDiscardFramebufferEXT_attachments(context, target, numAttachments, attachments,
                                             isCallValid, &attachmentsParam);
    paramBuffer.addParam(std::move(attachmentsParam));

    frameCapture->captureCall(context, "glDiscardFramebufferEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureBeginQueryEXT(Context *context, QueryType targetPacked, GLuint id)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBeginQueryEXT(context, targetPacked, id);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);

    frameCapture->captureCall(context, "glBeginQueryEXT", std::move(paramBuffer), isCallValid);
}

void CaptureDeleteQueriesEXT(Context *context, GLsizei n, const GLuint *ids)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeleteQueriesEXT(context, n, ids);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
    CaptureDeleteQueriesEXT_ids(context, n, ids, isCallValid, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    frameCapture->captureCall(context, "glDeleteQueriesEXT", std::move(paramBuffer), isCallValid);
}

void CaptureEndQueryEXT(Context *context, QueryType targetPacked)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateEndQueryEXT(context, targetPacked);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);

    frameCapture->captureCall(context, "glEndQueryEXT", std::move(paramBuffer), isCallValid);
}

void CaptureGenQueriesEXT(Context *context, GLsizei n, GLuint *ids)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenQueriesEXT(context, n, ids);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture idsParam("ids", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
    CaptureGenQueriesEXT_ids(context, n, ids, isCallValid, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    frameCapture->captureCall(context, "glGenQueriesEXT", std::move(paramBuffer), isCallValid);
}

void CaptureGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GLint64 *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetQueryObjecti64vEXT(context, id, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
    CaptureGetQueryObjecti64vEXT_params(context, id, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjecti64vEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetQueryObjectivEXT(context, id, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetQueryObjectivEXT_params(context, id, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjectivEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, GLuint64 *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetQueryObjectui64vEXT(context, id, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
    InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
    CaptureGetQueryObjectui64vEXT_params(context, id, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjectui64vEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetQueryObjectuivEXT(context, id, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetQueryObjectuivEXT_params(context, id, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryObjectuivEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetQueryivEXT(Context *context, QueryType targetPacked, GLenum pname, GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetQueryivEXT(context, targetPacked, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetQueryivEXT_params(context, targetPacked, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetQueryivEXT", std::move(paramBuffer), isCallValid);
}

void CaptureIsQueryEXT(Context *context, GLuint id)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsQueryEXT(context, id);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);

    frameCapture->captureCall(context, "glIsQueryEXT", std::move(paramBuffer), isCallValid);
}

void CaptureQueryCounterEXT(Context *context, GLuint id, QueryType targetPacked)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateQueryCounterEXT(context, id, targetPacked);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);

    frameCapture->captureCall(context, "glQueryCounterEXT", std::move(paramBuffer), isCallValid);
}

void CaptureDrawBuffersEXT(Context *context, GLsizei n, const GLenum *bufs)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawBuffersEXT(context, n, bufs);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture bufsParam("bufs", ParamType::TGLenumConstPointer);
    InitParamValue(ParamType::TGLenumConstPointer, bufs, &bufsParam.value);
    CaptureDrawBuffersEXT_bufs(context, n, bufs, isCallValid, &bufsParam);
    paramBuffer.addParam(std::move(bufsParam));

    frameCapture->captureCall(context, "glDrawBuffersEXT", std::move(paramBuffer), isCallValid);
}

void CaptureFramebufferTextureEXT(Context *context,
                                  GLenum target,
                                  GLenum attachment,
                                  GLuint texture,
                                  GLint level)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateFramebufferTextureEXT(context, target, attachment, texture, level);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("attachment", ParamType::TGLenum, attachment);
    paramBuffer.addValueParam("texture", ParamType::TGLuint, texture);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);

    frameCapture->captureCall(context, "glFramebufferTextureEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDrawArraysInstancedEXT(Context *context,
                                   PrimitiveMode modePacked,
                                   GLint start,
                                   GLsizei count,
                                   GLsizei primcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawArraysInstancedEXT(context, modePacked, start, count, primcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
    paramBuffer.addValueParam("start", ParamType::TGLint, start);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);

    frameCapture->captureCall(context, "glDrawArraysInstancedEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDrawElementsInstancedEXT(Context *context,
                                     PrimitiveMode modePacked,
                                     GLsizei count,
                                     DrawElementsType typePacked,
                                     const void *indices,
                                     GLsizei primcount)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawElementsInstancedEXT(context, modePacked, count, typePacked,
                                                        indices, primcount);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);

    ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
    CaptureDrawElementsInstancedEXT_indices(context, modePacked, count, typePacked, indices,
                                            primcount, isCallValid, &indicesParam);
    paramBuffer.addParam(std::move(indicesParam));

    paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);

    frameCapture->captureCall(context, "glDrawElementsInstancedEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureVertexAttribDivisorEXT(Context *context, GLuint index, GLuint divisor)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateVertexAttribDivisorEXT(context, index, divisor);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);

    frameCapture->captureCall(context, "glVertexAttribDivisorEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureFlushMappedBufferRangeEXT(Context *context,
                                      BufferBinding targetPacked,
                                      GLintptr offset,
                                      GLsizeiptr length)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateFlushMappedBufferRangeEXT(context, targetPacked, offset, length);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
    paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);

    frameCapture->captureCall(context, "glFlushMappedBufferRangeEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMapBufferRangeEXT(Context *context,
                              BufferBinding targetPacked,
                              GLintptr offset,
                              GLsizeiptr length,
                              GLbitfield access)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMapBufferRangeEXT(context, targetPacked, offset, length, access);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
    paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
    paramBuffer.addValueParam("access", ParamType::TGLbitfield, access);

    frameCapture->captureCall(context, "glMapBufferRangeEXT", std::move(paramBuffer), isCallValid);
}

void CaptureBufferStorageMemEXT(Context *context,
                                TextureType targetPacked,
                                GLsizeiptr size,
                                GLuint memory,
                                GLuint64 offset)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBufferStorageMemEXT(context, targetPacked, size, memory, offset);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
    paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
    paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);

    frameCapture->captureCall(context, "glBufferStorageMemEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryObjects)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCreateMemoryObjectsEXT(context, n, memoryObjects);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture memoryObjectsParam("memoryObjects", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, memoryObjects, &memoryObjectsParam.value);
    CaptureCreateMemoryObjectsEXT_memoryObjects(context, n, memoryObjects, isCallValid,
                                                &memoryObjectsParam);
    paramBuffer.addParam(std::move(memoryObjectsParam));

    frameCapture->captureCall(context, "glCreateMemoryObjectsEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDeleteMemoryObjectsEXT(Context *context, GLsizei n, const GLuint *memoryObjects)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeleteMemoryObjectsEXT(context, n, memoryObjects);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture memoryObjectsParam("memoryObjects", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, memoryObjects, &memoryObjectsParam.value);
    CaptureDeleteMemoryObjectsEXT_memoryObjects(context, n, memoryObjects, isCallValid,
                                                &memoryObjectsParam);
    paramBuffer.addParam(std::move(memoryObjectsParam));

    frameCapture->captureCall(context, "glDeleteMemoryObjectsEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetMemoryObjectParameterivEXT(Context *context,
                                          GLuint memoryObject,
                                          GLenum pname,
                                          GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetMemoryObjectParameterivEXT(context, memoryObject, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("memoryObject", ParamType::TGLuint, memoryObject);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetMemoryObjectParameterivEXT_params(context, memoryObject, pname, params, isCallValid,
                                                &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetMemoryObjectParameterivEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetUnsignedBytevEXT(Context *context, GLenum pname, GLubyte *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetUnsignedBytevEXT(context, pname, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture dataParam("data", ParamType::TGLubytePointer);
    InitParamValue(ParamType::TGLubytePointer, data, &dataParam.value);
    CaptureGetUnsignedBytevEXT_data(context, pname, data, isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glGetUnsignedBytevEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetUnsignedBytei_vEXT(Context *context, GLenum target, GLuint index, GLubyte *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetUnsignedBytei_vEXT(context, target, index, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture dataParam("data", ParamType::TGLubytePointer);
    InitParamValue(ParamType::TGLubytePointer, data, &dataParam.value);
    CaptureGetUnsignedBytei_vEXT_data(context, target, index, data, isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glGetUnsignedBytei_vEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureIsMemoryObjectEXT(Context *context, GLuint memoryObject)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsMemoryObjectEXT(context, memoryObject);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("memoryObject", ParamType::TGLuint, memoryObject);

    frameCapture->captureCall(context, "glIsMemoryObjectEXT", std::move(paramBuffer), isCallValid);
}

void CaptureMemoryObjectParameterivEXT(Context *context,
                                       GLuint memoryObject,
                                       GLenum pname,
                                       const GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMemoryObjectParameterivEXT(context, memoryObject, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("memoryObject", ParamType::TGLuint, memoryObject);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
    CaptureMemoryObjectParameterivEXT_params(context, memoryObject, pname, params, isCallValid,
                                             &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glMemoryObjectParameterivEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexStorageMem2DEXT(Context *context,
                               TextureType targetPacked,
                               GLsizei levels,
                               GLenum internalFormat,
                               GLsizei width,
                               GLsizei height,
                               GLuint memory,
                               GLuint64 offset)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexStorageMem2DEXT(context, targetPacked, levels, internalFormat,
                                                  width, height, memory, offset);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
    paramBuffer.addValueParam("internalFormat", ParamType::TGLenum, internalFormat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
    paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);

    frameCapture->captureCall(context, "glTexStorageMem2DEXT", std::move(paramBuffer), isCallValid);
}

void CaptureTexStorageMem2DMultisampleEXT(Context *context,
                                          TextureType targetPacked,
                                          GLsizei samples,
                                          GLenum internalFormat,
                                          GLsizei width,
                                          GLsizei height,
                                          GLboolean fixedSampleLocations,
                                          GLuint memory,
                                          GLuint64 offset)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexStorageMem2DMultisampleEXT(context, targetPacked, samples, internalFormat, width,
                                              height, fixedSampleLocations, memory, offset);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
    paramBuffer.addValueParam("internalFormat", ParamType::TGLenum, internalFormat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
    paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
    paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);

    frameCapture->captureCall(context, "glTexStorageMem2DMultisampleEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexStorageMem3DEXT(Context *context,
                               TextureType targetPacked,
                               GLsizei levels,
                               GLenum internalFormat,
                               GLsizei width,
                               GLsizei height,
                               GLsizei depth,
                               GLuint memory,
                               GLuint64 offset)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexStorageMem3DEXT(context, targetPacked, levels, internalFormat,
                                                  width, height, depth, memory, offset);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
    paramBuffer.addValueParam("internalFormat", ParamType::TGLenum, internalFormat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
    paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);

    frameCapture->captureCall(context, "glTexStorageMem3DEXT", std::move(paramBuffer), isCallValid);
}

void CaptureTexStorageMem3DMultisampleEXT(Context *context,
                                          TextureType targetPacked,
                                          GLsizei samples,
                                          GLenum internalFormat,
                                          GLsizei width,
                                          GLsizei height,
                                          GLsizei depth,
                                          GLboolean fixedSampleLocations,
                                          GLuint memory,
                                          GLuint64 offset)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexStorageMem3DMultisampleEXT(context, targetPacked, samples, internalFormat, width,
                                              height, depth, fixedSampleLocations, memory, offset);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
    paramBuffer.addValueParam("internalFormat", ParamType::TGLenum, internalFormat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
    paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
    paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);

    frameCapture->captureCall(context, "glTexStorageMem3DMultisampleEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureImportMemoryFdEXT(Context *context,
                              GLuint memory,
                              GLuint64 size,
                              HandleType handleTypePacked,
                              GLint fd)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateImportMemoryFdEXT(context, memory, size, handleTypePacked, fd);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
    paramBuffer.addValueParam("size", ParamType::TGLuint64, size);
    paramBuffer.addValueParam("handleTypePacked", ParamType::THandleType, handleTypePacked);
    paramBuffer.addValueParam("fd", ParamType::TGLint, fd);

    frameCapture->captureCall(context, "glImportMemoryFdEXT", std::move(paramBuffer), isCallValid);
}

void CaptureGetGraphicsResetStatusEXT(Context *context)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetGraphicsResetStatusEXT(context);
    ParamBuffer paramBuffer;

    frameCapture->captureCall(context, "glGetGraphicsResetStatusEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetnUniformfvEXT(Context *context,
                             GLuint program,
                             GLint location,
                             GLsizei bufSize,
                             GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetnUniformfvEXT(context, program, location, bufSize, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetnUniformfvEXT_params(context, program, location, bufSize, params, isCallValid,
                                   &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetnUniformfvEXT", std::move(paramBuffer), isCallValid);
}

void CaptureGetnUniformivEXT(Context *context,
                             GLuint program,
                             GLint location,
                             GLsizei bufSize,
                             GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetnUniformivEXT(context, program, location, bufSize, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetnUniformivEXT_params(context, program, location, bufSize, params, isCallValid,
                                   &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetnUniformivEXT", std::move(paramBuffer), isCallValid);
}

void CaptureReadnPixelsEXT(Context *context,
                           GLint x,
                           GLint y,
                           GLsizei width,
                           GLsizei height,
                           GLenum format,
                           GLenum type,
                           GLsizei bufSize,
                           void *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateReadnPixelsEXT(context, x, y, width, height, format, type, bufSize, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture dataParam("data", ParamType::TvoidPointer);
    InitParamValue(ParamType::TvoidPointer, data, &dataParam.value);
    CaptureReadnPixelsEXT_data(context, x, y, width, height, format, type, bufSize, data,
                               isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glReadnPixelsEXT", std::move(paramBuffer), isCallValid);
}

void CaptureDeleteSemaphoresEXT(Context *context, GLsizei n, const GLuint *semaphores)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeleteSemaphoresEXT(context, n, semaphores);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture semaphoresParam("semaphores", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, semaphores, &semaphoresParam.value);
    CaptureDeleteSemaphoresEXT_semaphores(context, n, semaphores, isCallValid, &semaphoresParam);
    paramBuffer.addParam(std::move(semaphoresParam));

    frameCapture->captureCall(context, "glDeleteSemaphoresEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGenSemaphoresEXT(Context *context, GLsizei n, GLuint *semaphores)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenSemaphoresEXT(context, n, semaphores);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture semaphoresParam("semaphores", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, semaphores, &semaphoresParam.value);
    CaptureGenSemaphoresEXT_semaphores(context, n, semaphores, isCallValid, &semaphoresParam);
    paramBuffer.addParam(std::move(semaphoresParam));

    frameCapture->captureCall(context, "glGenSemaphoresEXT", std::move(paramBuffer), isCallValid);
}

void CaptureGetSemaphoreParameterui64vEXT(Context *context,
                                          GLuint semaphore,
                                          GLenum pname,
                                          GLuint64 *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetSemaphoreParameterui64vEXT(context, semaphore, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("semaphore", ParamType::TGLuint, semaphore);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
    InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
    CaptureGetSemaphoreParameterui64vEXT_params(context, semaphore, pname, params, isCallValid,
                                                &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetSemaphoreParameterui64vEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureIsSemaphoreEXT(Context *context, GLuint semaphore)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsSemaphoreEXT(context, semaphore);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("semaphore", ParamType::TGLuint, semaphore);

    frameCapture->captureCall(context, "glIsSemaphoreEXT", std::move(paramBuffer), isCallValid);
}

void CaptureSemaphoreParameterui64vEXT(Context *context,
                                       GLuint semaphore,
                                       GLenum pname,
                                       const GLuint64 *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateSemaphoreParameterui64vEXT(context, semaphore, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("semaphore", ParamType::TGLuint, semaphore);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuint64ConstPointer);
    InitParamValue(ParamType::TGLuint64ConstPointer, params, &paramsParam.value);
    CaptureSemaphoreParameterui64vEXT_params(context, semaphore, pname, params, isCallValid,
                                             &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glSemaphoreParameterui64vEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureSignalSemaphoreEXT(Context *context,
                               GLuint semaphore,
                               GLuint numBufferBarriers,
                               const GLuint *buffers,
                               GLuint numTextureBarriers,
                               const GLuint *textures,
                               const GLenum *dstLayouts)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateSignalSemaphoreEXT(context, semaphore, numBufferBarriers, buffers,
                                                  numTextureBarriers, textures, dstLayouts);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("semaphore", ParamType::TGLuint, semaphore);
    paramBuffer.addValueParam("numBufferBarriers", ParamType::TGLuint, numBufferBarriers);

    ParamCapture buffersParam("buffers", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, buffers, &buffersParam.value);
    CaptureSignalSemaphoreEXT_buffers(context, semaphore, numBufferBarriers, buffers,
                                      numTextureBarriers, textures, dstLayouts, isCallValid,
                                      &buffersParam);
    paramBuffer.addParam(std::move(buffersParam));

    paramBuffer.addValueParam("numTextureBarriers", ParamType::TGLuint, numTextureBarriers);

    ParamCapture texturesParam("textures", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, textures, &texturesParam.value);
    CaptureSignalSemaphoreEXT_textures(context, semaphore, numBufferBarriers, buffers,
                                       numTextureBarriers, textures, dstLayouts, isCallValid,
                                       &texturesParam);
    paramBuffer.addParam(std::move(texturesParam));

    ParamCapture dstLayoutsParam("dstLayouts", ParamType::TGLenumConstPointer);
    InitParamValue(ParamType::TGLenumConstPointer, dstLayouts, &dstLayoutsParam.value);
    CaptureSignalSemaphoreEXT_dstLayouts(context, semaphore, numBufferBarriers, buffers,
                                         numTextureBarriers, textures, dstLayouts, isCallValid,
                                         &dstLayoutsParam);
    paramBuffer.addParam(std::move(dstLayoutsParam));

    frameCapture->captureCall(context, "glSignalSemaphoreEXT", std::move(paramBuffer), isCallValid);
}

void CaptureWaitSemaphoreEXT(Context *context,
                             GLuint semaphore,
                             GLuint numBufferBarriers,
                             const GLuint *buffers,
                             GLuint numTextureBarriers,
                             const GLuint *textures,
                             const GLenum *srcLayouts)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateWaitSemaphoreEXT(context, semaphore, numBufferBarriers, buffers,
                                                numTextureBarriers, textures, srcLayouts);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("semaphore", ParamType::TGLuint, semaphore);
    paramBuffer.addValueParam("numBufferBarriers", ParamType::TGLuint, numBufferBarriers);

    ParamCapture buffersParam("buffers", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, buffers, &buffersParam.value);
    CaptureWaitSemaphoreEXT_buffers(context, semaphore, numBufferBarriers, buffers,
                                    numTextureBarriers, textures, srcLayouts, isCallValid,
                                    &buffersParam);
    paramBuffer.addParam(std::move(buffersParam));

    paramBuffer.addValueParam("numTextureBarriers", ParamType::TGLuint, numTextureBarriers);

    ParamCapture texturesParam("textures", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, textures, &texturesParam.value);
    CaptureWaitSemaphoreEXT_textures(context, semaphore, numBufferBarriers, buffers,
                                     numTextureBarriers, textures, srcLayouts, isCallValid,
                                     &texturesParam);
    paramBuffer.addParam(std::move(texturesParam));

    ParamCapture srcLayoutsParam("srcLayouts", ParamType::TGLenumConstPointer);
    InitParamValue(ParamType::TGLenumConstPointer, srcLayouts, &srcLayoutsParam.value);
    CaptureWaitSemaphoreEXT_srcLayouts(context, semaphore, numBufferBarriers, buffers,
                                       numTextureBarriers, textures, srcLayouts, isCallValid,
                                       &srcLayoutsParam);
    paramBuffer.addParam(std::move(srcLayoutsParam));

    frameCapture->captureCall(context, "glWaitSemaphoreEXT", std::move(paramBuffer), isCallValid);
}

void CaptureImportSemaphoreFdEXT(Context *context,
                                 GLuint semaphore,
                                 HandleType handleTypePacked,
                                 GLint fd)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateImportSemaphoreFdEXT(context, semaphore, handleTypePacked, fd);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("semaphore", ParamType::TGLuint, semaphore);
    paramBuffer.addValueParam("handleTypePacked", ParamType::THandleType, handleTypePacked);
    paramBuffer.addValueParam("fd", ParamType::TGLint, fd);

    frameCapture->captureCall(context, "glImportSemaphoreFdEXT", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexStorage1DEXT(Context *context,
                            GLenum target,
                            GLsizei levels,
                            GLenum internalformat,
                            GLsizei width)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexStorage1DEXT(context, target, levels, internalformat, width);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);

    frameCapture->captureCall(context, "glTexStorage1DEXT", std::move(paramBuffer), isCallValid);
}

void CaptureTexStorage2DEXT(Context *context,
                            TextureType targetPacked,
                            GLsizei levels,
                            GLenum internalformat,
                            GLsizei width,
                            GLsizei height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexStorage2DEXT(context, targetPacked, levels, internalformat, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    frameCapture->captureCall(context, "glTexStorage2DEXT", std::move(paramBuffer), isCallValid);
}

void CaptureTexStorage3DEXT(Context *context,
                            TextureType targetPacked,
                            GLsizei levels,
                            GLenum internalformat,
                            GLsizei width,
                            GLsizei height,
                            GLsizei depth)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexStorage3DEXT(context, targetPacked, levels, internalformat, width,
                                               height, depth);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);

    frameCapture->captureCall(context, "glTexStorage3DEXT", std::move(paramBuffer), isCallValid);
}

void CaptureDebugMessageCallbackKHR(Context *context,
                                    GLDEBUGPROCKHR callback,
                                    const void *userParam)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDebugMessageCallbackKHR(context, callback, userParam);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("callback", ParamType::TGLDEBUGPROCKHR, callback);

    ParamCapture userParamParam("userParam", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, userParam, &userParamParam.value);
    CaptureDebugMessageCallbackKHR_userParam(context, callback, userParam, isCallValid,
                                             &userParamParam);
    paramBuffer.addParam(std::move(userParamParam));

    frameCapture->captureCall(context, "glDebugMessageCallbackKHR", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDebugMessageControlKHR(Context *context,
                                   GLenum source,
                                   GLenum type,
                                   GLenum severity,
                                   GLsizei count,
                                   const GLuint *ids,
                                   GLboolean enabled)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateDebugMessageControlKHR(context, source, type, severity, count, ids, enabled);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("source", ParamType::TGLenum, source);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("severity", ParamType::TGLenum, severity);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
    CaptureDebugMessageControlKHR_ids(context, source, type, severity, count, ids, enabled,
                                      isCallValid, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    paramBuffer.addValueParam("enabled", ParamType::TGLboolean, enabled);

    frameCapture->captureCall(context, "glDebugMessageControlKHR", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDebugMessageInsertKHR(Context *context,
                                  GLenum source,
                                  GLenum type,
                                  GLuint id,
                                  GLenum severity,
                                  GLsizei length,
                                  const GLchar *buf)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateDebugMessageInsertKHR(context, source, type, id, severity, length, buf);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("source", ParamType::TGLenum, source);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("severity", ParamType::TGLenum, severity);
    paramBuffer.addValueParam("length", ParamType::TGLsizei, length);

    ParamCapture bufParam("buf", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, buf, &bufParam.value);
    CaptureDebugMessageInsertKHR_buf(context, source, type, id, severity, length, buf, isCallValid,
                                     &bufParam);
    paramBuffer.addParam(std::move(bufParam));

    frameCapture->captureCall(context, "glDebugMessageInsertKHR", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetDebugMessageLogKHR(Context *context,
                                  GLuint count,
                                  GLsizei bufSize,
                                  GLenum *sources,
                                  GLenum *types,
                                  GLuint *ids,
                                  GLenum *severities,
                                  GLsizei *lengths,
                                  GLchar *messageLog)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetDebugMessageLogKHR(context, count, bufSize, sources, types, ids,
                                                     severities, lengths, messageLog);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("count", ParamType::TGLuint, count);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture sourcesParam("sources", ParamType::TGLenumPointer);
    InitParamValue(ParamType::TGLenumPointer, sources, &sourcesParam.value);
    CaptureGetDebugMessageLogKHR_sources(context, count, bufSize, sources, types, ids, severities,
                                         lengths, messageLog, isCallValid, &sourcesParam);
    paramBuffer.addParam(std::move(sourcesParam));

    ParamCapture typesParam("types", ParamType::TGLenumPointer);
    InitParamValue(ParamType::TGLenumPointer, types, &typesParam.value);
    CaptureGetDebugMessageLogKHR_types(context, count, bufSize, sources, types, ids, severities,
                                       lengths, messageLog, isCallValid, &typesParam);
    paramBuffer.addParam(std::move(typesParam));

    ParamCapture idsParam("ids", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
    CaptureGetDebugMessageLogKHR_ids(context, count, bufSize, sources, types, ids, severities,
                                     lengths, messageLog, isCallValid, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    ParamCapture severitiesParam("severities", ParamType::TGLenumPointer);
    InitParamValue(ParamType::TGLenumPointer, severities, &severitiesParam.value);
    CaptureGetDebugMessageLogKHR_severities(context, count, bufSize, sources, types, ids,
                                            severities, lengths, messageLog, isCallValid,
                                            &severitiesParam);
    paramBuffer.addParam(std::move(severitiesParam));

    ParamCapture lengthsParam("lengths", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, lengths, &lengthsParam.value);
    CaptureGetDebugMessageLogKHR_lengths(context, count, bufSize, sources, types, ids, severities,
                                         lengths, messageLog, isCallValid, &lengthsParam);
    paramBuffer.addParam(std::move(lengthsParam));

    ParamCapture messageLogParam("messageLog", ParamType::TGLcharPointer);
    InitParamValue(ParamType::TGLcharPointer, messageLog, &messageLogParam.value);
    CaptureGetDebugMessageLogKHR_messageLog(context, count, bufSize, sources, types, ids,
                                            severities, lengths, messageLog, isCallValid,
                                            &messageLogParam);
    paramBuffer.addParam(std::move(messageLogParam));

    frameCapture->captureCall(context, "glGetDebugMessageLogKHR", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetObjectLabelKHR(Context *context,
                              GLenum identifier,
                              GLuint name,
                              GLsizei bufSize,
                              GLsizei *length,
                              GLchar *label)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetObjectLabelKHR(context, identifier, name, bufSize, length, label);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("identifier", ParamType::TGLenum, identifier);
    paramBuffer.addValueParam("name", ParamType::TGLuint, name);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetObjectLabelKHR_length(context, identifier, name, bufSize, length, label, isCallValid,
                                    &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture labelParam("label", ParamType::TGLcharPointer);
    InitParamValue(ParamType::TGLcharPointer, label, &labelParam.value);
    CaptureGetObjectLabelKHR_label(context, identifier, name, bufSize, length, label, isCallValid,
                                   &labelParam);
    paramBuffer.addParam(std::move(labelParam));

    frameCapture->captureCall(context, "glGetObjectLabelKHR", std::move(paramBuffer), isCallValid);
}

void CaptureGetObjectPtrLabelKHR(Context *context,
                                 const void *ptr,
                                 GLsizei bufSize,
                                 GLsizei *length,
                                 GLchar *label)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetObjectPtrLabelKHR(context, ptr, bufSize, length, label);
    ParamBuffer paramBuffer;

    ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, ptr, &ptrParam.value);
    CaptureGetObjectPtrLabelKHR_ptr(context, ptr, bufSize, length, label, isCallValid, &ptrParam);
    paramBuffer.addParam(std::move(ptrParam));

    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetObjectPtrLabelKHR_length(context, ptr, bufSize, length, label, isCallValid,
                                       &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture labelParam("label", ParamType::TGLcharPointer);
    InitParamValue(ParamType::TGLcharPointer, label, &labelParam.value);
    CaptureGetObjectPtrLabelKHR_label(context, ptr, bufSize, length, label, isCallValid,
                                      &labelParam);
    paramBuffer.addParam(std::move(labelParam));

    frameCapture->captureCall(context, "glGetObjectPtrLabelKHR", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetPointervKHR(Context *context, GLenum pname, void **params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetPointervKHR(context, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
    InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
    CaptureGetPointervKHR_params(context, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetPointervKHR", std::move(paramBuffer), isCallValid);
}

void CaptureObjectLabelKHR(Context *context,
                           GLenum identifier,
                           GLuint name,
                           GLsizei length,
                           const GLchar *label)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateObjectLabelKHR(context, identifier, name, length, label);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("identifier", ParamType::TGLenum, identifier);
    paramBuffer.addValueParam("name", ParamType::TGLuint, name);
    paramBuffer.addValueParam("length", ParamType::TGLsizei, length);

    ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, label, &labelParam.value);
    CaptureObjectLabelKHR_label(context, identifier, name, length, label, isCallValid, &labelParam);
    paramBuffer.addParam(std::move(labelParam));

    frameCapture->captureCall(context, "glObjectLabelKHR", std::move(paramBuffer), isCallValid);
}

void CaptureObjectPtrLabelKHR(Context *context,
                              const void *ptr,
                              GLsizei length,
                              const GLchar *label)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateObjectPtrLabelKHR(context, ptr, length, label);
    ParamBuffer paramBuffer;

    ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, ptr, &ptrParam.value);
    CaptureObjectPtrLabelKHR_ptr(context, ptr, length, label, isCallValid, &ptrParam);
    paramBuffer.addParam(std::move(ptrParam));

    paramBuffer.addValueParam("length", ParamType::TGLsizei, length);

    ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, label, &labelParam.value);
    CaptureObjectPtrLabelKHR_label(context, ptr, length, label, isCallValid, &labelParam);
    paramBuffer.addParam(std::move(labelParam));

    frameCapture->captureCall(context, "glObjectPtrLabelKHR", std::move(paramBuffer), isCallValid);
}

void CapturePopDebugGroupKHR(Context *context)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePopDebugGroupKHR(context);
    ParamBuffer paramBuffer;

    frameCapture->captureCall(context, "glPopDebugGroupKHR", std::move(paramBuffer), isCallValid);
}

void CapturePushDebugGroupKHR(Context *context,
                              GLenum source,
                              GLuint id,
                              GLsizei length,
                              const GLchar *message)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePushDebugGroupKHR(context, source, id, length, message);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("source", ParamType::TGLenum, source);
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addValueParam("length", ParamType::TGLsizei, length);

    ParamCapture messageParam("message", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, message, &messageParam.value);
    CapturePushDebugGroupKHR_message(context, source, id, length, message, isCallValid,
                                     &messageParam);
    paramBuffer.addParam(std::move(messageParam));

    frameCapture->captureCall(context, "glPushDebugGroupKHR", std::move(paramBuffer), isCallValid);
}

void CaptureMaxShaderCompilerThreadsKHR(Context *context, GLuint count)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMaxShaderCompilerThreadsKHR(context, count);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("count", ParamType::TGLuint, count);

    frameCapture->captureCall(context, "glMaxShaderCompilerThreadsKHR", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDeleteFencesNV(Context *context, GLsizei n, const GLuint *fences)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeleteFencesNV(context, n, fences);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture fencesParam("fences", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, fences, &fencesParam.value);
    CaptureDeleteFencesNV_fences(context, n, fences, isCallValid, &fencesParam);
    paramBuffer.addParam(std::move(fencesParam));

    frameCapture->captureCall(context, "glDeleteFencesNV", std::move(paramBuffer), isCallValid);
}

void CaptureFinishFenceNV(Context *context, GLuint fence)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateFinishFenceNV(context, fence);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("fence", ParamType::TGLuint, fence);

    frameCapture->captureCall(context, "glFinishFenceNV", std::move(paramBuffer), isCallValid);
}

void CaptureGenFencesNV(Context *context, GLsizei n, GLuint *fences)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenFencesNV(context, n, fences);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture fencesParam("fences", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, fences, &fencesParam.value);
    CaptureGenFencesNV_fences(context, n, fences, isCallValid, &fencesParam);
    paramBuffer.addParam(std::move(fencesParam));

    frameCapture->captureCall(context, "glGenFencesNV", std::move(paramBuffer), isCallValid);
}

void CaptureGetFenceivNV(Context *context, GLuint fence, GLenum pname, GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetFenceivNV(context, fence, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("fence", ParamType::TGLuint, fence);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetFenceivNV_params(context, fence, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetFenceivNV", std::move(paramBuffer), isCallValid);
}

void CaptureIsFenceNV(Context *context, GLuint fence)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsFenceNV(context, fence);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("fence", ParamType::TGLuint, fence);

    frameCapture->captureCall(context, "glIsFenceNV", std::move(paramBuffer), isCallValid);
}

void CaptureSetFenceNV(Context *context, GLuint fence, GLenum condition)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateSetFenceNV(context, fence, condition);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("fence", ParamType::TGLuint, fence);
    paramBuffer.addValueParam("condition", ParamType::TGLenum, condition);

    frameCapture->captureCall(context, "glSetFenceNV", std::move(paramBuffer), isCallValid);
}

void CaptureTestFenceNV(Context *context, GLuint fence)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTestFenceNV(context, fence);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("fence", ParamType::TGLuint, fence);

    frameCapture->captureCall(context, "glTestFenceNV", std::move(paramBuffer), isCallValid);
}

void CaptureEGLImageTargetRenderbufferStorageOES(Context *context,
                                                 GLenum target,
                                                 GLeglImageOES image)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateEGLImageTargetRenderbufferStorageOES(context, target, image);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("image", ParamType::TGLeglImageOES, image);

    frameCapture->captureCall(context, "glEGLImageTargetRenderbufferStorageOES",
                              std::move(paramBuffer), isCallValid);
}

void CaptureEGLImageTargetTexture2DOES(Context *context,
                                       TextureType targetPacked,
                                       GLeglImageOES image)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateEGLImageTargetTexture2DOES(context, targetPacked, image);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("image", ParamType::TGLeglImageOES, image);

    frameCapture->captureCall(context, "glEGLImageTargetTexture2DOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDrawTexfOES(Context *context,
                        GLfloat x,
                        GLfloat y,
                        GLfloat z,
                        GLfloat width,
                        GLfloat height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexfOES(context, x, y, z, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("x", ParamType::TGLfloat, x);
    paramBuffer.addValueParam("y", ParamType::TGLfloat, y);
    paramBuffer.addValueParam("z", ParamType::TGLfloat, z);
    paramBuffer.addValueParam("width", ParamType::TGLfloat, width);
    paramBuffer.addValueParam("height", ParamType::TGLfloat, height);

    frameCapture->captureCall(context, "glDrawTexfOES", std::move(paramBuffer), isCallValid);
}

void CaptureDrawTexfvOES(Context *context, const GLfloat *coords)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexfvOES(context, coords);
    ParamBuffer paramBuffer;

    ParamCapture coordsParam("coords", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, coords, &coordsParam.value);
    CaptureDrawTexfvOES_coords(context, coords, isCallValid, &coordsParam);
    paramBuffer.addParam(std::move(coordsParam));

    frameCapture->captureCall(context, "glDrawTexfvOES", std::move(paramBuffer), isCallValid);
}

void CaptureDrawTexiOES(Context *context, GLint x, GLint y, GLint z, GLint width, GLint height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexiOES(context, x, y, z, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("z", ParamType::TGLint, z);
    paramBuffer.addValueParam("width", ParamType::TGLint, width);
    paramBuffer.addValueParam("height", ParamType::TGLint, height);

    frameCapture->captureCall(context, "glDrawTexiOES", std::move(paramBuffer), isCallValid);
}

void CaptureDrawTexivOES(Context *context, const GLint *coords)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexivOES(context, coords);
    ParamBuffer paramBuffer;

    ParamCapture coordsParam("coords", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, coords, &coordsParam.value);
    CaptureDrawTexivOES_coords(context, coords, isCallValid, &coordsParam);
    paramBuffer.addParam(std::move(coordsParam));

    frameCapture->captureCall(context, "glDrawTexivOES", std::move(paramBuffer), isCallValid);
}

void CaptureDrawTexsOES(Context *context,
                        GLshort x,
                        GLshort y,
                        GLshort z,
                        GLshort width,
                        GLshort height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexsOES(context, x, y, z, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("x", ParamType::TGLshort, x);
    paramBuffer.addValueParam("y", ParamType::TGLshort, y);
    paramBuffer.addValueParam("z", ParamType::TGLshort, z);
    paramBuffer.addValueParam("width", ParamType::TGLshort, width);
    paramBuffer.addValueParam("height", ParamType::TGLshort, height);

    frameCapture->captureCall(context, "glDrawTexsOES", std::move(paramBuffer), isCallValid);
}

void CaptureDrawTexsvOES(Context *context, const GLshort *coords)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexsvOES(context, coords);
    ParamBuffer paramBuffer;

    ParamCapture coordsParam("coords", ParamType::TGLshortConstPointer);
    InitParamValue(ParamType::TGLshortConstPointer, coords, &coordsParam.value);
    CaptureDrawTexsvOES_coords(context, coords, isCallValid, &coordsParam);
    paramBuffer.addParam(std::move(coordsParam));

    frameCapture->captureCall(context, "glDrawTexsvOES", std::move(paramBuffer), isCallValid);
}

void CaptureDrawTexxOES(Context *context,
                        GLfixed x,
                        GLfixed y,
                        GLfixed z,
                        GLfixed width,
                        GLfixed height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexxOES(context, x, y, z, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("x", ParamType::TGLfixed, x);
    paramBuffer.addValueParam("y", ParamType::TGLfixed, y);
    paramBuffer.addValueParam("z", ParamType::TGLfixed, z);
    paramBuffer.addValueParam("width", ParamType::TGLfixed, width);
    paramBuffer.addValueParam("height", ParamType::TGLfixed, height);

    frameCapture->captureCall(context, "glDrawTexxOES", std::move(paramBuffer), isCallValid);
}

void CaptureDrawTexxvOES(Context *context, const GLfixed *coords)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDrawTexxvOES(context, coords);
    ParamBuffer paramBuffer;

    ParamCapture coordsParam("coords", ParamType::TGLfixedConstPointer);
    InitParamValue(ParamType::TGLfixedConstPointer, coords, &coordsParam.value);
    CaptureDrawTexxvOES_coords(context, coords, isCallValid, &coordsParam);
    paramBuffer.addParam(std::move(coordsParam));

    frameCapture->captureCall(context, "glDrawTexxvOES", std::move(paramBuffer), isCallValid);
}

void CaptureBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBindFramebufferOES(context, target, framebuffer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("framebuffer", ParamType::TGLuint, framebuffer);

    frameCapture->captureCall(context, "glBindFramebufferOES", std::move(paramBuffer), isCallValid);
}

void CaptureBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBindRenderbufferOES(context, target, renderbuffer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("renderbuffer", ParamType::TGLuint, renderbuffer);

    frameCapture->captureCall(context, "glBindRenderbufferOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCheckFramebufferStatusOES(Context *context, GLenum target)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCheckFramebufferStatusOES(context, target);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);

    frameCapture->captureCall(context, "glCheckFramebufferStatusOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeleteFramebuffersOES(context, n, framebuffers);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, framebuffers, &framebuffersParam.value);
    CaptureDeleteFramebuffersOES_framebuffers(context, n, framebuffers, isCallValid,
                                              &framebuffersParam);
    paramBuffer.addParam(std::move(framebuffersParam));

    frameCapture->captureCall(context, "glDeleteFramebuffersOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeleteRenderbuffersOES(context, n, renderbuffers);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture renderbuffersParam("renderbuffers", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, renderbuffers, &renderbuffersParam.value);
    CaptureDeleteRenderbuffersOES_renderbuffers(context, n, renderbuffers, isCallValid,
                                                &renderbuffersParam);
    paramBuffer.addParam(std::move(renderbuffersParam));

    frameCapture->captureCall(context, "glDeleteRenderbuffersOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureFramebufferRenderbufferOES(Context *context,
                                       GLenum target,
                                       GLenum attachment,
                                       GLenum renderbuffertarget,
                                       GLuint renderbuffer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateFramebufferRenderbufferOES(context, target, attachment,
                                                          renderbuffertarget, renderbuffer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("attachment", ParamType::TGLenum, attachment);
    paramBuffer.addValueParam("renderbuffertarget", ParamType::TGLenum, renderbuffertarget);
    paramBuffer.addValueParam("renderbuffer", ParamType::TGLuint, renderbuffer);

    frameCapture->captureCall(context, "glFramebufferRenderbufferOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureFramebufferTexture2DOES(Context *context,
                                    GLenum target,
                                    GLenum attachment,
                                    TextureTarget textargetPacked,
                                    GLuint texture,
                                    GLint level)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateFramebufferTexture2DOES(context, target, attachment, textargetPacked,
                                                       texture, level);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("attachment", ParamType::TGLenum, attachment);
    paramBuffer.addValueParam("textargetPacked", ParamType::TTextureTarget, textargetPacked);
    paramBuffer.addValueParam("texture", ParamType::TGLuint, texture);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);

    frameCapture->captureCall(context, "glFramebufferTexture2DOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenFramebuffersOES(context, n, framebuffers);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, framebuffers, &framebuffersParam.value);
    CaptureGenFramebuffersOES_framebuffers(context, n, framebuffers, isCallValid,
                                           &framebuffersParam);
    paramBuffer.addParam(std::move(framebuffersParam));

    frameCapture->captureCall(context, "glGenFramebuffersOES", std::move(paramBuffer), isCallValid);
}

void CaptureGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenRenderbuffersOES(context, n, renderbuffers);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture renderbuffersParam("renderbuffers", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, renderbuffers, &renderbuffersParam.value);
    CaptureGenRenderbuffersOES_renderbuffers(context, n, renderbuffers, isCallValid,
                                             &renderbuffersParam);
    paramBuffer.addParam(std::move(renderbuffersParam));

    frameCapture->captureCall(context, "glGenRenderbuffersOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGenerateMipmapOES(Context *context, TextureType targetPacked)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenerateMipmapOES(context, targetPacked);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);

    frameCapture->captureCall(context, "glGenerateMipmapOES", std::move(paramBuffer), isCallValid);
}

void CaptureGetFramebufferAttachmentParameterivOES(Context *context,
                                                   GLenum target,
                                                   GLenum attachment,
                                                   GLenum pname,
                                                   GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetFramebufferAttachmentParameterivOES(context, target, attachment, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("attachment", ParamType::TGLenum, attachment);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetFramebufferAttachmentParameterivOES_params(context, target, attachment, pname, params,
                                                         isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetFramebufferAttachmentParameterivOES",
                              std::move(paramBuffer), isCallValid);
}

void CaptureGetRenderbufferParameterivOES(Context *context,
                                          GLenum target,
                                          GLenum pname,
                                          GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetRenderbufferParameterivOES(context, target, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetRenderbufferParameterivOES_params(context, target, pname, params, isCallValid,
                                                &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetRenderbufferParameterivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureIsFramebufferOES(Context *context, GLuint framebuffer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsFramebufferOES(context, framebuffer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("framebuffer", ParamType::TGLuint, framebuffer);

    frameCapture->captureCall(context, "glIsFramebufferOES", std::move(paramBuffer), isCallValid);
}

void CaptureIsRenderbufferOES(Context *context, GLuint renderbuffer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsRenderbufferOES(context, renderbuffer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("renderbuffer", ParamType::TGLuint, renderbuffer);

    frameCapture->captureCall(context, "glIsRenderbufferOES", std::move(paramBuffer), isCallValid);
}

void CaptureRenderbufferStorageOES(Context *context,
                                   GLenum target,
                                   GLenum internalformat,
                                   GLsizei width,
                                   GLsizei height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateRenderbufferStorageOES(context, target, internalformat, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    frameCapture->captureCall(context, "glRenderbufferStorageOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetProgramBinaryOES(Context *context,
                                GLuint program,
                                GLsizei bufSize,
                                GLsizei *length,
                                GLenum *binaryFormat,
                                void *binary)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateGetProgramBinaryOES(context, program, bufSize, length, binaryFormat, binary);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetProgramBinaryOES_length(context, program, bufSize, length, binaryFormat, binary,
                                      isCallValid, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture binaryFormatParam("binaryFormat", ParamType::TGLenumPointer);
    InitParamValue(ParamType::TGLenumPointer, binaryFormat, &binaryFormatParam.value);
    CaptureGetProgramBinaryOES_binaryFormat(context, program, bufSize, length, binaryFormat, binary,
                                            isCallValid, &binaryFormatParam);
    paramBuffer.addParam(std::move(binaryFormatParam));

    ParamCapture binaryParam("binary", ParamType::TvoidPointer);
    InitParamValue(ParamType::TvoidPointer, binary, &binaryParam.value);
    CaptureGetProgramBinaryOES_binary(context, program, bufSize, length, binaryFormat, binary,
                                      isCallValid, &binaryParam);
    paramBuffer.addParam(std::move(binaryParam));

    frameCapture->captureCall(context, "glGetProgramBinaryOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureProgramBinaryOES(Context *context,
                             GLuint program,
                             GLenum binaryFormat,
                             const void *binary,
                             GLint length)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateProgramBinaryOES(context, program, binaryFormat, binary, length);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("binaryFormat", ParamType::TGLenum, binaryFormat);

    ParamCapture binaryParam("binary", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, binary, &binaryParam.value);
    CaptureProgramBinaryOES_binary(context, program, binaryFormat, binary, length, isCallValid,
                                   &binaryParam);
    paramBuffer.addParam(std::move(binaryParam));

    paramBuffer.addValueParam("length", ParamType::TGLint, length);

    frameCapture->captureCall(context, "glProgramBinaryOES", std::move(paramBuffer), isCallValid);
}

void CaptureGetBufferPointervOES(Context *context,
                                 BufferBinding targetPacked,
                                 GLenum pname,
                                 void **params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetBufferPointervOES(context, targetPacked, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
    InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
    CaptureGetBufferPointervOES_params(context, targetPacked, pname, params, isCallValid,
                                       &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetBufferPointervOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureMapBufferOES(Context *context, BufferBinding targetPacked, GLenum access)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMapBufferOES(context, targetPacked, access);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("access", ParamType::TGLenum, access);

    frameCapture->captureCall(context, "glMapBufferOES", std::move(paramBuffer), isCallValid);
}

void CaptureUnmapBufferOES(Context *context, BufferBinding targetPacked)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateUnmapBufferOES(context, targetPacked);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);

    frameCapture->captureCall(context, "glUnmapBufferOES", std::move(paramBuffer), isCallValid);
}

void CaptureCurrentPaletteMatrixOES(Context *context, GLuint matrixpaletteindex)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCurrentPaletteMatrixOES(context, matrixpaletteindex);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("matrixpaletteindex", ParamType::TGLuint, matrixpaletteindex);

    frameCapture->captureCall(context, "glCurrentPaletteMatrixOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureLoadPaletteFromModelViewMatrixOES(Context *context)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateLoadPaletteFromModelViewMatrixOES(context);
    ParamBuffer paramBuffer;

    frameCapture->captureCall(context, "glLoadPaletteFromModelViewMatrixOES",
                              std::move(paramBuffer), isCallValid);
}

void CaptureMatrixIndexPointerOES(Context *context,
                                  GLint size,
                                  GLenum type,
                                  GLsizei stride,
                                  const void *pointer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateMatrixIndexPointerOES(context, size, type, stride, pointer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("size", ParamType::TGLint, size);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);

    ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
    CaptureMatrixIndexPointerOES_pointer(context, size, type, stride, pointer, isCallValid,
                                         &pointerParam);
    paramBuffer.addParam(std::move(pointerParam));

    frameCapture->captureCall(context, "glMatrixIndexPointerOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureWeightPointerOES(Context *context,
                             GLint size,
                             GLenum type,
                             GLsizei stride,
                             const void *pointer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateWeightPointerOES(context, size, type, stride, pointer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("size", ParamType::TGLint, size);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);
    paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);

    ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
    CaptureWeightPointerOES_pointer(context, size, type, stride, pointer, isCallValid,
                                    &pointerParam);
    paramBuffer.addParam(std::move(pointerParam));

    frameCapture->captureCall(context, "glWeightPointerOES", std::move(paramBuffer), isCallValid);
}

void CapturePointSizePointerOES(Context *context,
                                VertexAttribType typePacked,
                                GLsizei stride,
                                const void *pointer)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidatePointSizePointerOES(context, typePacked, stride, pointer);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
    paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);

    ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
    CapturePointSizePointerOES_pointer(context, typePacked, stride, pointer, isCallValid,
                                       &pointerParam);
    paramBuffer.addParam(std::move(pointerParam));

    frameCapture->captureCall(context, "glPointSizePointerOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateQueryMatrixxOES(context, mantissa, exponent);
    ParamBuffer paramBuffer;

    ParamCapture mantissaParam("mantissa", ParamType::TGLfixedPointer);
    InitParamValue(ParamType::TGLfixedPointer, mantissa, &mantissaParam.value);
    CaptureQueryMatrixxOES_mantissa(context, mantissa, exponent, isCallValid, &mantissaParam);
    paramBuffer.addParam(std::move(mantissaParam));

    ParamCapture exponentParam("exponent", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, exponent, &exponentParam.value);
    CaptureQueryMatrixxOES_exponent(context, mantissa, exponent, isCallValid, &exponentParam);
    paramBuffer.addParam(std::move(exponentParam));

    frameCapture->captureCall(context, "glQueryMatrixxOES", std::move(paramBuffer), isCallValid);
}

void CaptureCompressedTexImage3DOES(Context *context,
                                    TextureTarget targetPacked,
                                    GLint level,
                                    GLenum internalformat,
                                    GLsizei width,
                                    GLsizei height,
                                    GLsizei depth,
                                    GLint border,
                                    GLsizei imageSize,
                                    const void *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateCompressedTexImage3DOES(context, targetPacked, level, internalformat, width, height,
                                        depth, border, imageSize, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);

    ParamCapture dataParam("data", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexImage3DOES_data(context, targetPacked, level, internalformat, width, height,
                                        depth, border, imageSize, data, isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glCompressedTexImage3DOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCompressedTexSubImage3DOES(Context *context,
                                       TextureTarget targetPacked,
                                       GLint level,
                                       GLint xoffset,
                                       GLint yoffset,
                                       GLint zoffset,
                                       GLsizei width,
                                       GLsizei height,
                                       GLsizei depth,
                                       GLenum format,
                                       GLsizei imageSize,
                                       const void *data)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateCompressedTexSubImage3DOES(context, targetPacked, level, xoffset, yoffset, zoffset,
                                           width, height, depth, format, imageSize, data);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);

    ParamCapture dataParam("data", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexSubImage3DOES_data(context, targetPacked, level, xoffset, yoffset, zoffset,
                                           width, height, depth, format, imageSize, data,
                                           isCallValid, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    frameCapture->captureCall(context, "glCompressedTexSubImage3DOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureCopyTexSubImage3DOES(Context *context,
                                 TextureTarget targetPacked,
                                 GLint level,
                                 GLint xoffset,
                                 GLint yoffset,
                                 GLint zoffset,
                                 GLint x,
                                 GLint y,
                                 GLsizei width,
                                 GLsizei height)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateCopyTexSubImage3DOES(context, targetPacked, level, xoffset, yoffset,
                                                    zoffset, x, y, width, height);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    frameCapture->captureCall(context, "glCopyTexSubImage3DOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureFramebufferTexture3DOES(Context *context,
                                    GLenum target,
                                    GLenum attachment,
                                    TextureTarget textargetPacked,
                                    GLuint texture,
                                    GLint level,
                                    GLint zoffset)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateFramebufferTexture3DOES(context, target, attachment, textargetPacked,
                                                       texture, level, zoffset);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("attachment", ParamType::TGLenum, attachment);
    paramBuffer.addValueParam("textargetPacked", ParamType::TTextureTarget, textargetPacked);
    paramBuffer.addValueParam("texture", ParamType::TGLuint, texture);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);

    frameCapture->captureCall(context, "glFramebufferTexture3DOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexImage3DOES(Context *context,
                          TextureTarget targetPacked,
                          GLint level,
                          GLenum internalformat,
                          GLsizei width,
                          GLsizei height,
                          GLsizei depth,
                          GLint border,
                          GLenum format,
                          GLenum type,
                          const void *pixels)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexImage3DOES(context, targetPacked, level, internalformat, width,
                                             height, depth, border, format, type, pixels);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexImage3DOES_pixels(context, targetPacked, level, internalformat, width, height, depth,
                                border, format, type, pixels, isCallValid, &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    frameCapture->captureCall(context, "glTexImage3DOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexSubImage3DOES(Context *context,
                             TextureTarget targetPacked,
                             GLint level,
                             GLint xoffset,
                             GLint yoffset,
                             GLint zoffset,
                             GLsizei width,
                             GLsizei height,
                             GLsizei depth,
                             GLenum format,
                             GLenum type,
                             const void *pixels)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid =
        ValidateTexSubImage3DOES(context, targetPacked, level, xoffset, yoffset, zoffset, width,
                                 height, depth, format, type, pixels);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("format", ParamType::TGLenum, format);
    paramBuffer.addValueParam("type", ParamType::TGLenum, type);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexSubImage3DOES_pixels(context, targetPacked, level, xoffset, yoffset, zoffset, width,
                                   height, depth, format, type, pixels, isCallValid, &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    frameCapture->captureCall(context, "glTexSubImage3DOES", std::move(paramBuffer), isCallValid);
}

void CaptureGetSamplerParameterIivOES(Context *context, GLuint sampler, GLenum pname, GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetSamplerParameterIivOES(context, sampler, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetSamplerParameterIivOES_params(context, sampler, pname, params, isCallValid,
                                            &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetSamplerParameterIivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetSamplerParameterIuivOES(Context *context,
                                       GLuint sampler,
                                       GLenum pname,
                                       GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetSamplerParameterIuivOES(context, sampler, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetSamplerParameterIuivOES_params(context, sampler, pname, params, isCallValid,
                                             &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetSamplerParameterIuivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexParameterIivOES(Context *context,
                                  TextureType targetPacked,
                                  GLenum pname,
                                  GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexParameterIivOES(context, targetPacked, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetTexParameterIivOES_params(context, targetPacked, pname, params, isCallValid,
                                        &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexParameterIivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexParameterIuivOES(Context *context,
                                   TextureType targetPacked,
                                   GLenum pname,
                                   GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexParameterIuivOES(context, targetPacked, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetTexParameterIuivOES_params(context, targetPacked, pname, params, isCallValid,
                                         &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexParameterIuivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureSamplerParameterIivOES(Context *context,
                                   GLuint sampler,
                                   GLenum pname,
                                   const GLint *param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateSamplerParameterIivOES(context, sampler, pname, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramParam("param", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
    CaptureSamplerParameterIivOES_param(context, sampler, pname, param, isCallValid, &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    frameCapture->captureCall(context, "glSamplerParameterIivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureSamplerParameterIuivOES(Context *context,
                                    GLuint sampler,
                                    GLenum pname,
                                    const GLuint *param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateSamplerParameterIuivOES(context, sampler, pname, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, param, &paramParam.value);
    CaptureSamplerParameterIuivOES_param(context, sampler, pname, param, isCallValid, &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    frameCapture->captureCall(context, "glSamplerParameterIuivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureTexParameterIivOES(Context *context,
                               TextureType targetPacked,
                               GLenum pname,
                               const GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexParameterIivOES(context, targetPacked, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
    CaptureTexParameterIivOES_params(context, targetPacked, pname, params, isCallValid,
                                     &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexParameterIivOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexParameterIuivOES(Context *context,
                                TextureType targetPacked,
                                GLenum pname,
                                const GLuint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexParameterIuivOES(context, targetPacked, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, params, &paramsParam.value);
    CaptureTexParameterIuivOES_params(context, targetPacked, pname, params, isCallValid,
                                      &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexParameterIuivOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexGenfvOES(context, coord, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetTexGenfvOES_params(context, coord, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexGenfvOES", std::move(paramBuffer), isCallValid);
}

void CaptureGetTexGenivOES(Context *context, GLenum coord, GLenum pname, GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexGenivOES(context, coord, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetTexGenivOES_params(context, coord, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexGenivOES", std::move(paramBuffer), isCallValid);
}

void CaptureGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGetTexGenxvOES(context, coord, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLfixedPointer);
    InitParamValue(ParamType::TGLfixedPointer, params, &paramsParam.value);
    CaptureGetTexGenxvOES_params(context, coord, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glGetTexGenxvOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexGenfOES(context, coord, pname, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("param", ParamType::TGLfloat, param);

    frameCapture->captureCall(context, "glTexGenfOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexGenfvOES(context, coord, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, params, &paramsParam.value);
    CaptureTexGenfvOES_params(context, coord, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexGenfvOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexGeniOES(context, coord, pname, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("param", ParamType::TGLint, param);

    frameCapture->captureCall(context, "glTexGeniOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexGenivOES(context, coord, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
    CaptureTexGenivOES_params(context, coord, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexGenivOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexGenxOES(context, coord, pname, param);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);
    paramBuffer.addValueParam("param", ParamType::TGLfixed, param);

    frameCapture->captureCall(context, "glTexGenxOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLfixed *params)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexGenxvOES(context, coord, pname, params);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("coord", ParamType::TGLenum, coord);
    paramBuffer.addValueParam("pname", ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLfixedConstPointer);
    InitParamValue(ParamType::TGLfixedConstPointer, params, &paramsParam.value);
    CaptureTexGenxvOES_params(context, coord, pname, params, isCallValid, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    frameCapture->captureCall(context, "glTexGenxvOES", std::move(paramBuffer), isCallValid);
}

void CaptureTexStorage3DMultisampleOES(Context *context,
                                       TextureType targetPacked,
                                       GLsizei samples,
                                       GLenum internalformat,
                                       GLsizei width,
                                       GLsizei height,
                                       GLsizei depth,
                                       GLboolean fixedsamplelocations)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateTexStorage3DMultisampleOES(
        context, targetPacked, samples, internalformat, width, height, depth, fixedsamplelocations);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
    paramBuffer.addValueParam("internalformat", ParamType::TGLenum, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);

    frameCapture->captureCall(context, "glTexStorage3DMultisampleOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureBindVertexArrayOES(Context *context, GLuint array)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateBindVertexArrayOES(context, array);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("array", ParamType::TGLuint, array);

    frameCapture->captureCall(context, "glBindVertexArrayOES", std::move(paramBuffer), isCallValid);
}

void CaptureDeleteVertexArraysOES(Context *context, GLsizei n, const GLuint *arrays)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateDeleteVertexArraysOES(context, n, arrays);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture arraysParam("arrays", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, arrays, &arraysParam.value);
    CaptureDeleteVertexArraysOES_arrays(context, n, arrays, isCallValid, &arraysParam);
    paramBuffer.addParam(std::move(arraysParam));

    frameCapture->captureCall(context, "glDeleteVertexArraysOES", std::move(paramBuffer),
                              isCallValid);
}

void CaptureGenVertexArraysOES(Context *context, GLsizei n, GLuint *arrays)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateGenVertexArraysOES(context, n, arrays);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture arraysParam("arrays", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, arrays, &arraysParam.value);
    CaptureGenVertexArraysOES_arrays(context, n, arrays, isCallValid, &arraysParam);
    paramBuffer.addParam(std::move(arraysParam));

    frameCapture->captureCall(context, "glGenVertexArraysOES", std::move(paramBuffer), isCallValid);
}

void CaptureIsVertexArrayOES(Context *context, GLuint array)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateIsVertexArrayOES(context, array);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("array", ParamType::TGLuint, array);

    frameCapture->captureCall(context, "glIsVertexArrayOES", std::move(paramBuffer), isCallValid);
}

void CaptureFramebufferTextureMultiviewOVR(Context *context,
                                           GLenum target,
                                           GLenum attachment,
                                           GLuint texture,
                                           GLint level,
                                           GLint baseViewIndex,
                                           GLsizei numViews)
{
    FrameCapture *frameCapture = context->getFrameCapture();
    if (!frameCapture->enabled())
        return;

    bool isCallValid = ValidateFramebufferTextureMultiviewOVR(context, target, attachment, texture,
                                                              level, baseViewIndex, numViews);
    ParamBuffer paramBuffer;
    paramBuffer.addValueParam("target", ParamType::TGLenum, target);
    paramBuffer.addValueParam("attachment", ParamType::TGLenum, attachment);
    paramBuffer.addValueParam("texture", ParamType::TGLuint, texture);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("baseViewIndex", ParamType::TGLint, baseViewIndex);
    paramBuffer.addValueParam("numViews", ParamType::TGLsizei, numViews);

    frameCapture->captureCall(context, "glFramebufferTextureMultiviewOVR", std::move(paramBuffer),
                              isCallValid);
}

}  // namespace gl
