// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// frame_capture_utils_autogen.cpp:
//   ANGLE Frame capture types and helper functions.

#include "libANGLE/frame_capture_utils_autogen.h"

#include "libANGLE/FrameCapture.h"

namespace angle
{
void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const ParamCapture &param)
{
    switch (param.type)
    {
        case ParamType::TAlphaTestFunc:
            WriteParamValueReplay<ParamType::TAlphaTestFunc>(os, call,
                                                             param.value.AlphaTestFuncVal);
            break;
        case ParamType::TBufferBinding:
            WriteParamValueReplay<ParamType::TBufferBinding>(os, call,
                                                             param.value.BufferBindingVal);
            break;
        case ParamType::TBufferID:
            WriteParamValueReplay<ParamType::TBufferID>(os, call, param.value.BufferIDVal);
            break;
        case ParamType::TBufferIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TBufferIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TBufferUsage:
            WriteParamValueReplay<ParamType::TBufferUsage>(os, call, param.value.BufferUsageVal);
            break;
        case ParamType::TClientVertexArrayType:
            WriteParamValueReplay<ParamType::TClientVertexArrayType>(
                os, call, param.value.ClientVertexArrayTypeVal);
            break;
        case ParamType::TCullFaceMode:
            WriteParamValueReplay<ParamType::TCullFaceMode>(os, call, param.value.CullFaceModeVal);
            break;
        case ParamType::TDrawElementsType:
            WriteParamValueReplay<ParamType::TDrawElementsType>(os, call,
                                                                param.value.DrawElementsTypeVal);
            break;
        case ParamType::TFenceNVID:
            WriteParamValueReplay<ParamType::TFenceNVID>(os, call, param.value.FenceNVIDVal);
            break;
        case ParamType::TFenceNVIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TFenceNVIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TFramebufferID:
            WriteParamValueReplay<ParamType::TFramebufferID>(os, call,
                                                             param.value.FramebufferIDVal);
            break;
        case ParamType::TFramebufferIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TFramebufferIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLDEBUGPROC:
            WriteParamValueReplay<ParamType::TGLDEBUGPROC>(os, call, param.value.GLDEBUGPROCVal);
            break;
        case ParamType::TGLDEBUGPROCKHR:
            WriteParamValueReplay<ParamType::TGLDEBUGPROCKHR>(os, call,
                                                              param.value.GLDEBUGPROCKHRVal);
            break;
        case ParamType::TGLbitfield:
            WriteParamValueReplay<ParamType::TGLbitfield>(os, call, param.value.GLbitfieldVal);
            break;
        case ParamType::TGLboolean:
            WriteParamValueReplay<ParamType::TGLboolean>(os, call, param.value.GLbooleanVal);
            break;
        case ParamType::TGLbooleanConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLbooleanPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLbyte:
            WriteParamValueReplay<ParamType::TGLbyte>(os, call, param.value.GLbyteVal);
            break;
        case ParamType::TGLbyteConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLcharConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLcharConstPointerPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLcharPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLclampx:
            WriteParamValueReplay<ParamType::TGLclampx>(os, call, param.value.GLclampxVal);
            break;
        case ParamType::TGLdouble:
            WriteParamValueReplay<ParamType::TGLdouble>(os, call, param.value.GLdoubleVal);
            break;
        case ParamType::TGLdoubleConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLdoublePointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLeglImageOES:
            WriteParamValueReplay<ParamType::TGLeglImageOES>(os, call,
                                                             param.value.GLeglImageOESVal);
            break;
        case ParamType::TGLenum:
            WriteParamValueReplay<ParamType::TGLenum>(os, call, param.value.GLenumVal);
            break;
        case ParamType::TGLenumConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLenumPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLfixed:
            WriteParamValueReplay<ParamType::TGLfixed>(os, call, param.value.GLfixedVal);
            break;
        case ParamType::TGLfixedConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLfixedPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLfloat:
            WriteParamValueReplay<ParamType::TGLfloat>(os, call, param.value.GLfloatVal);
            break;
        case ParamType::TGLfloatConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLfloatPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLint:
            WriteParamValueReplay<ParamType::TGLint>(os, call, param.value.GLintVal);
            break;
        case ParamType::TGLint64Pointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLintConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLintPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLintptr:
            WriteParamValueReplay<ParamType::TGLintptr>(os, call, param.value.GLintptrVal);
            break;
        case ParamType::TGLintptrConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLshort:
            WriteParamValueReplay<ParamType::TGLshort>(os, call, param.value.GLshortVal);
            break;
        case ParamType::TGLshortConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLsizei:
            WriteParamValueReplay<ParamType::TGLsizei>(os, call, param.value.GLsizeiVal);
            break;
        case ParamType::TGLsizeiConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLsizeiPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLsizeiptr:
            WriteParamValueReplay<ParamType::TGLsizeiptr>(os, call, param.value.GLsizeiptrVal);
            break;
        case ParamType::TGLsizeiptrConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLsync:
            WriteParamValueReplay<ParamType::TGLsync>(os, call, param.value.GLsyncVal);
            break;
        case ParamType::TGLubyte:
            WriteParamValueReplay<ParamType::TGLubyte>(os, call, param.value.GLubyteVal);
            break;
        case ParamType::TGLubyteConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLubytePointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLuint:
            WriteParamValueReplay<ParamType::TGLuint>(os, call, param.value.GLuintVal);
            break;
        case ParamType::TGLuint64:
            WriteParamValueReplay<ParamType::TGLuint64>(os, call, param.value.GLuint64Val);
            break;
        case ParamType::TGLuint64ConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLuint64Pointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLuintConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLuintPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLushort:
            WriteParamValueReplay<ParamType::TGLushort>(os, call, param.value.GLushortVal);
            break;
        case ParamType::TGLushortConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLushortPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLvoidConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGLvoidConstPointerPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TGraphicsResetStatus:
            WriteParamValueReplay<ParamType::TGraphicsResetStatus>(
                os, call, param.value.GraphicsResetStatusVal);
            break;
        case ParamType::THandleType:
            WriteParamValueReplay<ParamType::THandleType>(os, call, param.value.HandleTypeVal);
            break;
        case ParamType::TLightParameter:
            WriteParamValueReplay<ParamType::TLightParameter>(os, call,
                                                              param.value.LightParameterVal);
            break;
        case ParamType::TLogicalOperation:
            WriteParamValueReplay<ParamType::TLogicalOperation>(os, call,
                                                                param.value.LogicalOperationVal);
            break;
        case ParamType::TMaterialParameter:
            WriteParamValueReplay<ParamType::TMaterialParameter>(os, call,
                                                                 param.value.MaterialParameterVal);
            break;
        case ParamType::TMatrixType:
            WriteParamValueReplay<ParamType::TMatrixType>(os, call, param.value.MatrixTypeVal);
            break;
        case ParamType::TMemoryObjectID:
            WriteParamValueReplay<ParamType::TMemoryObjectID>(os, call,
                                                              param.value.MemoryObjectIDVal);
            break;
        case ParamType::TMemoryObjectIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TMemoryObjectIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TPointParameter:
            WriteParamValueReplay<ParamType::TPointParameter>(os, call,
                                                              param.value.PointParameterVal);
            break;
        case ParamType::TPrimitiveMode:
            WriteParamValueReplay<ParamType::TPrimitiveMode>(os, call,
                                                             param.value.PrimitiveModeVal);
            break;
        case ParamType::TProgramPipelineID:
            WriteParamValueReplay<ParamType::TProgramPipelineID>(os, call,
                                                                 param.value.ProgramPipelineIDVal);
            break;
        case ParamType::TProgramPipelineIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TProgramPipelineIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TProvokingVertexConvention:
            WriteParamValueReplay<ParamType::TProvokingVertexConvention>(
                os, call, param.value.ProvokingVertexConventionVal);
            break;
        case ParamType::TQueryID:
            WriteParamValueReplay<ParamType::TQueryID>(os, call, param.value.QueryIDVal);
            break;
        case ParamType::TQueryIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TQueryIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TQueryType:
            WriteParamValueReplay<ParamType::TQueryType>(os, call, param.value.QueryTypeVal);
            break;
        case ParamType::TRenderbufferID:
            WriteParamValueReplay<ParamType::TRenderbufferID>(os, call,
                                                              param.value.RenderbufferIDVal);
            break;
        case ParamType::TRenderbufferIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TRenderbufferIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TSamplerID:
            WriteParamValueReplay<ParamType::TSamplerID>(os, call, param.value.SamplerIDVal);
            break;
        case ParamType::TSamplerIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TSamplerIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TSemaphoreID:
            WriteParamValueReplay<ParamType::TSemaphoreID>(os, call, param.value.SemaphoreIDVal);
            break;
        case ParamType::TSemaphoreIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TSemaphoreIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TShaderProgramID:
            WriteParamValueReplay<ParamType::TShaderProgramID>(os, call,
                                                               param.value.ShaderProgramIDVal);
            break;
        case ParamType::TShaderProgramIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TShaderProgramIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TShaderType:
            WriteParamValueReplay<ParamType::TShaderType>(os, call, param.value.ShaderTypeVal);
            break;
        case ParamType::TShadingModel:
            WriteParamValueReplay<ParamType::TShadingModel>(os, call, param.value.ShadingModelVal);
            break;
        case ParamType::TTextureEnvParameter:
            WriteParamValueReplay<ParamType::TTextureEnvParameter>(
                os, call, param.value.TextureEnvParameterVal);
            break;
        case ParamType::TTextureEnvTarget:
            WriteParamValueReplay<ParamType::TTextureEnvTarget>(os, call,
                                                                param.value.TextureEnvTargetVal);
            break;
        case ParamType::TTextureID:
            WriteParamValueReplay<ParamType::TTextureID>(os, call, param.value.TextureIDVal);
            break;
        case ParamType::TTextureIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TTextureIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TTextureTarget:
            WriteParamValueReplay<ParamType::TTextureTarget>(os, call,
                                                             param.value.TextureTargetVal);
            break;
        case ParamType::TTextureType:
            WriteParamValueReplay<ParamType::TTextureType>(os, call, param.value.TextureTypeVal);
            break;
        case ParamType::TTransformFeedbackID:
            WriteParamValueReplay<ParamType::TTransformFeedbackID>(
                os, call, param.value.TransformFeedbackIDVal);
            break;
        case ParamType::TTransformFeedbackIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TTransformFeedbackIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TUniformLocation:
            WriteParamValueReplay<ParamType::TUniformLocation>(os, call,
                                                               param.value.UniformLocationVal);
            break;
        case ParamType::TVertexArrayID:
            WriteParamValueReplay<ParamType::TVertexArrayID>(os, call,
                                                             param.value.VertexArrayIDVal);
            break;
        case ParamType::TVertexArrayIDConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TVertexArrayIDPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TVertexAttribType:
            WriteParamValueReplay<ParamType::TVertexAttribType>(os, call,
                                                                param.value.VertexAttribTypeVal);
            break;
        case ParamType::TvoidConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TvoidConstPointerPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TvoidPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TvoidPointerPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        default:
            os << "unknown";
            break;
    }
}

const char *ParamTypeToString(ParamType paramType)
{
    switch (paramType)
    {
        case ParamType::TAlphaTestFunc:
            return "GLenum";
        case ParamType::TBufferBinding:
            return "GLenum";
        case ParamType::TBufferID:
            return "GLuint";
        case ParamType::TBufferIDConstPointer:
            return "const GLuint *";
        case ParamType::TBufferIDPointer:
            return "GLuint *";
        case ParamType::TBufferUsage:
            return "GLenum";
        case ParamType::TClientVertexArrayType:
            return "GLenum";
        case ParamType::TCullFaceMode:
            return "GLenum";
        case ParamType::TDrawElementsType:
            return "GLenum";
        case ParamType::TFenceNVID:
            return "GLuint";
        case ParamType::TFenceNVIDConstPointer:
            return "const GLuint *";
        case ParamType::TFenceNVIDPointer:
            return "GLuint *";
        case ParamType::TFramebufferID:
            return "GLuint";
        case ParamType::TFramebufferIDConstPointer:
            return "const GLuint *";
        case ParamType::TFramebufferIDPointer:
            return "GLuint *";
        case ParamType::TGLDEBUGPROC:
            return "GLDEBUGPROC";
        case ParamType::TGLDEBUGPROCKHR:
            return "GLDEBUGPROCKHR";
        case ParamType::TGLbitfield:
            return "GLbitfield";
        case ParamType::TGLboolean:
            return "GLboolean";
        case ParamType::TGLbooleanConstPointer:
            return "const GLboolean *";
        case ParamType::TGLbooleanPointer:
            return "GLboolean *";
        case ParamType::TGLbyte:
            return "GLbyte";
        case ParamType::TGLbyteConstPointer:
            return "const GLbyte *";
        case ParamType::TGLcharConstPointer:
            return "const GLchar *";
        case ParamType::TGLcharConstPointerPointer:
            return "const GLchar * const *";
        case ParamType::TGLcharPointer:
            return "GLchar *";
        case ParamType::TGLclampx:
            return "GLclampx";
        case ParamType::TGLdouble:
            return "GLdouble";
        case ParamType::TGLdoubleConstPointer:
            return "const GLdouble *";
        case ParamType::TGLdoublePointer:
            return "GLdouble *";
        case ParamType::TGLeglImageOES:
            return "GLeglImageOES";
        case ParamType::TGLenum:
            return "GLenum";
        case ParamType::TGLenumConstPointer:
            return "const GLenum *";
        case ParamType::TGLenumPointer:
            return "GLenum *";
        case ParamType::TGLfixed:
            return "GLfixed";
        case ParamType::TGLfixedConstPointer:
            return "const GLfixed *";
        case ParamType::TGLfixedPointer:
            return "GLfixed *";
        case ParamType::TGLfloat:
            return "GLfloat";
        case ParamType::TGLfloatConstPointer:
            return "const GLfloat *";
        case ParamType::TGLfloatPointer:
            return "GLfloat *";
        case ParamType::TGLint:
            return "GLint";
        case ParamType::TGLint64Pointer:
            return "GLint64 *";
        case ParamType::TGLintConstPointer:
            return "const GLint *";
        case ParamType::TGLintPointer:
            return "GLint *";
        case ParamType::TGLintptr:
            return "GLintptr";
        case ParamType::TGLintptrConstPointer:
            return "const GLintptr *";
        case ParamType::TGLshort:
            return "GLshort";
        case ParamType::TGLshortConstPointer:
            return "const GLshort *";
        case ParamType::TGLsizei:
            return "GLsizei";
        case ParamType::TGLsizeiConstPointer:
            return "const GLsizei *";
        case ParamType::TGLsizeiPointer:
            return "GLsizei *";
        case ParamType::TGLsizeiptr:
            return "GLsizeiptr";
        case ParamType::TGLsizeiptrConstPointer:
            return "const GLsizeiptr *";
        case ParamType::TGLsync:
            return "GLsync";
        case ParamType::TGLubyte:
            return "GLubyte";
        case ParamType::TGLubyteConstPointer:
            return "const GLubyte *";
        case ParamType::TGLubytePointer:
            return "GLubyte *";
        case ParamType::TGLuint:
            return "GLuint";
        case ParamType::TGLuint64:
            return "GLuint64";
        case ParamType::TGLuint64ConstPointer:
            return "const GLuint64 *";
        case ParamType::TGLuint64Pointer:
            return "GLuint64 *";
        case ParamType::TGLuintConstPointer:
            return "const GLuint *";
        case ParamType::TGLuintPointer:
            return "GLuint *";
        case ParamType::TGLushort:
            return "GLushort";
        case ParamType::TGLushortConstPointer:
            return "const GLushort *";
        case ParamType::TGLushortPointer:
            return "GLushort *";
        case ParamType::TGLvoidConstPointer:
            return "const GLvoid *";
        case ParamType::TGLvoidConstPointerPointer:
            return "const GLvoid * const *";
        case ParamType::TGraphicsResetStatus:
            return "GLenum";
        case ParamType::THandleType:
            return "GLenum";
        case ParamType::TLightParameter:
            return "GLenum";
        case ParamType::TLogicalOperation:
            return "GLenum";
        case ParamType::TMaterialParameter:
            return "GLenum";
        case ParamType::TMatrixType:
            return "GLenum";
        case ParamType::TMemoryObjectID:
            return "GLuint";
        case ParamType::TMemoryObjectIDConstPointer:
            return "const GLuint *";
        case ParamType::TMemoryObjectIDPointer:
            return "GLuint *";
        case ParamType::TPointParameter:
            return "GLenum";
        case ParamType::TPrimitiveMode:
            return "GLenum";
        case ParamType::TProgramPipelineID:
            return "GLuint";
        case ParamType::TProgramPipelineIDConstPointer:
            return "const GLuint *";
        case ParamType::TProgramPipelineIDPointer:
            return "GLuint *";
        case ParamType::TProvokingVertexConvention:
            return "GLenum";
        case ParamType::TQueryID:
            return "GLuint";
        case ParamType::TQueryIDConstPointer:
            return "const GLuint *";
        case ParamType::TQueryIDPointer:
            return "GLuint *";
        case ParamType::TQueryType:
            return "GLenum";
        case ParamType::TRenderbufferID:
            return "GLuint";
        case ParamType::TRenderbufferIDConstPointer:
            return "const GLuint *";
        case ParamType::TRenderbufferIDPointer:
            return "GLuint *";
        case ParamType::TSamplerID:
            return "GLuint";
        case ParamType::TSamplerIDConstPointer:
            return "const GLuint *";
        case ParamType::TSamplerIDPointer:
            return "GLuint *";
        case ParamType::TSemaphoreID:
            return "GLuint";
        case ParamType::TSemaphoreIDConstPointer:
            return "const GLuint *";
        case ParamType::TSemaphoreIDPointer:
            return "GLuint *";
        case ParamType::TShaderProgramID:
            return "GLuint";
        case ParamType::TShaderProgramIDConstPointer:
            return "const GLuint *";
        case ParamType::TShaderProgramIDPointer:
            return "GLuint *";
        case ParamType::TShaderType:
            return "GLenum";
        case ParamType::TShadingModel:
            return "GLenum";
        case ParamType::TTextureEnvParameter:
            return "GLenum";
        case ParamType::TTextureEnvTarget:
            return "GLenum";
        case ParamType::TTextureID:
            return "GLuint";
        case ParamType::TTextureIDConstPointer:
            return "const GLuint *";
        case ParamType::TTextureIDPointer:
            return "GLuint *";
        case ParamType::TTextureTarget:
            return "GLenum";
        case ParamType::TTextureType:
            return "GLenum";
        case ParamType::TTransformFeedbackID:
            return "GLuint";
        case ParamType::TTransformFeedbackIDConstPointer:
            return "const GLuint *";
        case ParamType::TTransformFeedbackIDPointer:
            return "GLuint *";
        case ParamType::TUniformLocation:
            return "GLenum";
        case ParamType::TVertexArrayID:
            return "GLuint";
        case ParamType::TVertexArrayIDConstPointer:
            return "const GLuint *";
        case ParamType::TVertexArrayIDPointer:
            return "GLuint *";
        case ParamType::TVertexAttribType:
            return "GLenum";
        case ParamType::TvoidConstPointer:
            return "const void *";
        case ParamType::TvoidConstPointerPointer:
            return "const void * const *";
        case ParamType::TvoidPointer:
            return "void *";
        case ParamType::TvoidPointerPointer:
            return "void **";
        default:
            UNREACHABLE();
            return "unknown";
    }
}

ResourceIDType GetResourceIDTypeFromParamType(ParamType paramType)
{
    switch (paramType)
    {
        case ParamType::TBufferID:
            return ResourceIDType::Buffer;
        case ParamType::TBufferIDConstPointer:
            return ResourceIDType::Buffer;
        case ParamType::TBufferIDPointer:
            return ResourceIDType::Buffer;
        case ParamType::TFenceNVID:
            return ResourceIDType::FenceNV;
        case ParamType::TFenceNVIDConstPointer:
            return ResourceIDType::FenceNV;
        case ParamType::TFenceNVIDPointer:
            return ResourceIDType::FenceNV;
        case ParamType::TFramebufferID:
            return ResourceIDType::Framebuffer;
        case ParamType::TFramebufferIDConstPointer:
            return ResourceIDType::Framebuffer;
        case ParamType::TFramebufferIDPointer:
            return ResourceIDType::Framebuffer;
        case ParamType::TMemoryObjectID:
            return ResourceIDType::MemoryObject;
        case ParamType::TMemoryObjectIDConstPointer:
            return ResourceIDType::MemoryObject;
        case ParamType::TMemoryObjectIDPointer:
            return ResourceIDType::MemoryObject;
        case ParamType::TProgramPipelineID:
            return ResourceIDType::ProgramPipeline;
        case ParamType::TProgramPipelineIDConstPointer:
            return ResourceIDType::ProgramPipeline;
        case ParamType::TProgramPipelineIDPointer:
            return ResourceIDType::ProgramPipeline;
        case ParamType::TQueryID:
            return ResourceIDType::Query;
        case ParamType::TQueryIDConstPointer:
            return ResourceIDType::Query;
        case ParamType::TQueryIDPointer:
            return ResourceIDType::Query;
        case ParamType::TRenderbufferID:
            return ResourceIDType::Renderbuffer;
        case ParamType::TRenderbufferIDConstPointer:
            return ResourceIDType::Renderbuffer;
        case ParamType::TRenderbufferIDPointer:
            return ResourceIDType::Renderbuffer;
        case ParamType::TSamplerID:
            return ResourceIDType::Sampler;
        case ParamType::TSamplerIDConstPointer:
            return ResourceIDType::Sampler;
        case ParamType::TSamplerIDPointer:
            return ResourceIDType::Sampler;
        case ParamType::TSemaphoreID:
            return ResourceIDType::Semaphore;
        case ParamType::TSemaphoreIDConstPointer:
            return ResourceIDType::Semaphore;
        case ParamType::TSemaphoreIDPointer:
            return ResourceIDType::Semaphore;
        case ParamType::TShaderProgramID:
            return ResourceIDType::ShaderProgram;
        case ParamType::TShaderProgramIDConstPointer:
            return ResourceIDType::ShaderProgram;
        case ParamType::TShaderProgramIDPointer:
            return ResourceIDType::ShaderProgram;
        case ParamType::TTextureID:
            return ResourceIDType::Texture;
        case ParamType::TTextureIDConstPointer:
            return ResourceIDType::Texture;
        case ParamType::TTextureIDPointer:
            return ResourceIDType::Texture;
        case ParamType::TTransformFeedbackID:
            return ResourceIDType::TransformFeedback;
        case ParamType::TTransformFeedbackIDConstPointer:
            return ResourceIDType::TransformFeedback;
        case ParamType::TTransformFeedbackIDPointer:
            return ResourceIDType::TransformFeedback;
        case ParamType::TVertexArrayID:
            return ResourceIDType::VertexArray;
        case ParamType::TVertexArrayIDConstPointer:
            return ResourceIDType::VertexArray;
        case ParamType::TVertexArrayIDPointer:
            return ResourceIDType::VertexArray;
        default:
            return ResourceIDType::InvalidEnum;
    }
}

const char *GetResourceIDTypeName(ResourceIDType resourceIDType)
{
    switch (resourceIDType)
    {
        case ResourceIDType::Buffer:
            return "Buffer";
        case ResourceIDType::FenceNV:
            return "FenceNV";
        case ResourceIDType::Framebuffer:
            return "Framebuffer";
        case ResourceIDType::MemoryObject:
            return "MemoryObject";
        case ResourceIDType::ProgramPipeline:
            return "ProgramPipeline";
        case ResourceIDType::Query:
            return "Query";
        case ResourceIDType::Renderbuffer:
            return "Renderbuffer";
        case ResourceIDType::Sampler:
            return "Sampler";
        case ResourceIDType::Semaphore:
            return "Semaphore";
        case ResourceIDType::ShaderProgram:
            return "ShaderProgram";
        case ResourceIDType::Texture:
            return "Texture";
        case ResourceIDType::TransformFeedback:
            return "TransformFeedback";
        case ResourceIDType::VertexArray:
            return "VertexArray";
        default:
            UNREACHABLE();
            return "GetResourceIDTypeName error";
    }
}
}  // namespace angle
