// 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 "common/frame_capture_utils_autogen.h"

#include "common/frame_capture_utils.h"

namespace angle
{
void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const ParamCapture &param)
{
    switch (param.type)
    {
        case ParamType::TAHardwareBufferConstPointer:
            WriteParamValueReplay<ParamType::TAHardwareBufferConstPointer>(
                os, call, param.value.AHardwareBufferConstPointerVal);
            break;
        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::TBufferIDConstPointer>(
                os, call, param.value.BufferIDConstPointerVal);
            break;
        case ParamType::TBufferIDPointer:
            WriteParamValueReplay<ParamType::TBufferIDPointer>(os, call,
                                                               param.value.BufferIDPointerVal);
            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::TClipDepthMode:
            WriteParamValueReplay<ParamType::TClipDepthMode>(os, call,
                                                             param.value.ClipDepthModeVal);
            break;
        case ParamType::TClipOrigin:
            WriteParamValueReplay<ParamType::TClipOrigin>(os, call, param.value.ClipOriginVal);
            break;
        case ParamType::TCompositorTiming:
            WriteParamValueReplay<ParamType::TCompositorTiming>(os, call,
                                                                param.value.CompositorTimingVal);
            break;
        case ParamType::TContextID:
            WriteParamValueReplay<ParamType::TContextID>(os, call, param.value.ContextIDVal);
            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::TEGLAttribConstPointer:
            WriteParamValueReplay<ParamType::TEGLAttribConstPointer>(
                os, call, param.value.EGLAttribConstPointerVal);
            break;
        case ParamType::TEGLAttribKHRPointer:
            WriteParamValueReplay<ParamType::TEGLAttribKHRPointer>(
                os, call, param.value.EGLAttribKHRPointerVal);
            break;
        case ParamType::TEGLAttribPointer:
            WriteParamValueReplay<ParamType::TEGLAttribPointer>(os, call,
                                                                param.value.EGLAttribPointerVal);
            break;
        case ParamType::TEGLBoolean:
            WriteParamValueReplay<ParamType::TEGLBoolean>(os, call, param.value.EGLBooleanVal);
            break;
        case ParamType::TEGLBooleanPointer:
            WriteParamValueReplay<ParamType::TEGLBooleanPointer>(os, call,
                                                                 param.value.EGLBooleanPointerVal);
            break;
        case ParamType::TEGLClientBuffer:
            WriteParamValueReplay<ParamType::TEGLClientBuffer>(os, call,
                                                               param.value.EGLClientBufferVal);
            break;
        case ParamType::TEGLConfigPointer:
            WriteParamValueReplay<ParamType::TEGLConfigPointer>(os, call,
                                                                param.value.EGLConfigPointerVal);
            break;
        case ParamType::TEGLContext:
            WriteParamValueReplay<ParamType::TEGLContext>(os, call, param.value.EGLContextVal);
            break;
        case ParamType::TEGLDEBUGPROCKHR:
            WriteParamValueReplay<ParamType::TEGLDEBUGPROCKHR>(os, call,
                                                               param.value.EGLDEBUGPROCKHRVal);
            break;
        case ParamType::TEGLDeviceEXT:
            WriteParamValueReplay<ParamType::TEGLDeviceEXT>(os, call, param.value.EGLDeviceEXTVal);
            break;
        case ParamType::TEGLDisplay:
            WriteParamValueReplay<ParamType::TEGLDisplay>(os, call, param.value.EGLDisplayVal);
            break;
        case ParamType::TEGLFrameTokenANGLE:
            WriteParamValueReplay<ParamType::TEGLFrameTokenANGLE>(
                os, call, param.value.EGLFrameTokenANGLEVal);
            break;
        case ParamType::TEGLGetBlobFuncANDROID:
            WriteParamValueReplay<ParamType::TEGLGetBlobFuncANDROID>(
                os, call, param.value.EGLGetBlobFuncANDROIDVal);
            break;
        case ParamType::TEGLImage:
            WriteParamValueReplay<ParamType::TEGLImage>(os, call, param.value.EGLImageVal);
            break;
        case ParamType::TEGLImageKHR:
            WriteParamValueReplay<ParamType::TEGLImageKHR>(os, call, param.value.EGLImageKHRVal);
            break;
        case ParamType::TEGLLabelKHR:
            WriteParamValueReplay<ParamType::TEGLLabelKHR>(os, call, param.value.EGLLabelKHRVal);
            break;
        case ParamType::TEGLNativeDisplayType:
            WriteParamValueReplay<ParamType::TEGLNativeDisplayType>(
                os, call, param.value.EGLNativeDisplayTypeVal);
            break;
        case ParamType::TEGLNativePixmapType:
            WriteParamValueReplay<ParamType::TEGLNativePixmapType>(
                os, call, param.value.EGLNativePixmapTypeVal);
            break;
        case ParamType::TEGLNativeWindowType:
            WriteParamValueReplay<ParamType::TEGLNativeWindowType>(
                os, call, param.value.EGLNativeWindowTypeVal);
            break;
        case ParamType::TEGLObjectKHR:
            WriteParamValueReplay<ParamType::TEGLObjectKHR>(os, call, param.value.EGLObjectKHRVal);
            break;
        case ParamType::TEGLSetBlobFuncANDROID:
            WriteParamValueReplay<ParamType::TEGLSetBlobFuncANDROID>(
                os, call, param.value.EGLSetBlobFuncANDROIDVal);
            break;
        case ParamType::TEGLStreamKHR:
            WriteParamValueReplay<ParamType::TEGLStreamKHR>(os, call, param.value.EGLStreamKHRVal);
            break;
        case ParamType::TEGLSurface:
            WriteParamValueReplay<ParamType::TEGLSurface>(os, call, param.value.EGLSurfaceVal);
            break;
        case ParamType::TEGLSync:
            WriteParamValueReplay<ParamType::TEGLSync>(os, call, param.value.EGLSyncVal);
            break;
        case ParamType::TEGLSyncKHR:
            WriteParamValueReplay<ParamType::TEGLSyncKHR>(os, call, param.value.EGLSyncKHRVal);
            break;
        case ParamType::TEGLTime:
            WriteParamValueReplay<ParamType::TEGLTime>(os, call, param.value.EGLTimeVal);
            break;
        case ParamType::TEGLTimeKHR:
            WriteParamValueReplay<ParamType::TEGLTimeKHR>(os, call, param.value.EGLTimeKHRVal);
            break;
        case ParamType::TEGLenum:
            WriteParamValueReplay<ParamType::TEGLenum>(os, call, param.value.EGLenumVal);
            break;
        case ParamType::TEGLint:
            WriteParamValueReplay<ParamType::TEGLint>(os, call, param.value.EGLintVal);
            break;
        case ParamType::TEGLintConstPointer:
            WriteParamValueReplay<ParamType::TEGLintConstPointer>(
                os, call, param.value.EGLintConstPointerVal);
            break;
        case ParamType::TEGLintPointer:
            WriteParamValueReplay<ParamType::TEGLintPointer>(os, call,
                                                             param.value.EGLintPointerVal);
            break;
        case ParamType::TEGLnsecsANDROID:
            WriteParamValueReplay<ParamType::TEGLnsecsANDROID>(os, call,
                                                               param.value.EGLnsecsANDROIDVal);
            break;
        case ParamType::TEGLnsecsANDROIDPointer:
            WriteParamValueReplay<ParamType::TEGLnsecsANDROIDPointer>(
                os, call, param.value.EGLnsecsANDROIDPointerVal);
            break;
        case ParamType::TEGLuint64KHR:
            WriteParamValueReplay<ParamType::TEGLuint64KHR>(os, call, param.value.EGLuint64KHRVal);
            break;
        case ParamType::TEGLuint64KHRPointer:
            WriteParamValueReplay<ParamType::TEGLuint64KHRPointer>(
                os, call, param.value.EGLuint64KHRPointerVal);
            break;
        case ParamType::TFenceNVID:
            WriteParamValueReplay<ParamType::TFenceNVID>(os, call, param.value.FenceNVIDVal);
            break;
        case ParamType::TFenceNVIDConstPointer:
            WriteParamValueReplay<ParamType::TFenceNVIDConstPointer>(
                os, call, param.value.FenceNVIDConstPointerVal);
            break;
        case ParamType::TFenceNVIDPointer:
            WriteParamValueReplay<ParamType::TFenceNVIDPointer>(os, call,
                                                                param.value.FenceNVIDPointerVal);
            break;
        case ParamType::TFramebufferID:
            WriteParamValueReplay<ParamType::TFramebufferID>(os, call,
                                                             param.value.FramebufferIDVal);
            break;
        case ParamType::TFramebufferIDConstPointer:
            WriteParamValueReplay<ParamType::TFramebufferIDConstPointer>(
                os, call, param.value.FramebufferIDConstPointerVal);
            break;
        case ParamType::TFramebufferIDPointer:
            WriteParamValueReplay<ParamType::TFramebufferIDPointer>(
                os, call, param.value.FramebufferIDPointerVal);
            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::TGLbooleanConstPointer>(
                os, call, param.value.GLbooleanConstPointerVal);
            break;
        case ParamType::TGLbooleanPointer:
            WriteParamValueReplay<ParamType::TGLbooleanPointer>(os, call,
                                                                param.value.GLbooleanPointerVal);
            break;
        case ParamType::TGLbyte:
            WriteParamValueReplay<ParamType::TGLbyte>(os, call, param.value.GLbyteVal);
            break;
        case ParamType::TGLbyteConstPointer:
            WriteParamValueReplay<ParamType::TGLbyteConstPointer>(
                os, call, param.value.GLbyteConstPointerVal);
            break;
        case ParamType::TGLcharConstPointer:
            WriteParamValueReplay<ParamType::TGLcharConstPointer>(
                os, call, param.value.GLcharConstPointerVal);
            break;
        case ParamType::TGLcharConstPointerPointer:
            WriteParamValueReplay<ParamType::TGLcharConstPointerPointer>(
                os, call, param.value.GLcharConstPointerPointerVal);
            break;
        case ParamType::TGLcharPointer:
            WriteParamValueReplay<ParamType::TGLcharPointer>(os, call,
                                                             param.value.GLcharPointerVal);
            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::TGLdoubleConstPointer>(
                os, call, param.value.GLdoubleConstPointerVal);
            break;
        case ParamType::TGLdoublePointer:
            WriteParamValueReplay<ParamType::TGLdoublePointer>(os, call,
                                                               param.value.GLdoublePointerVal);
            break;
        case ParamType::TGLeglClientBufferEXT:
            WriteParamValueReplay<ParamType::TGLeglClientBufferEXT>(
                os, call, param.value.GLeglClientBufferEXTVal);
            break;
        case ParamType::TGLenum:
            WriteParamValueReplay<ParamType::TGLenum>(os, call, param.value.GLenumVal);
            break;
        case ParamType::TGLenumConstPointer:
            WriteParamValueReplay<ParamType::TGLenumConstPointer>(
                os, call, param.value.GLenumConstPointerVal);
            break;
        case ParamType::TGLenumPointer:
            WriteParamValueReplay<ParamType::TGLenumPointer>(os, call,
                                                             param.value.GLenumPointerVal);
            break;
        case ParamType::TGLfixed:
            WriteParamValueReplay<ParamType::TGLfixed>(os, call, param.value.GLfixedVal);
            break;
        case ParamType::TGLfixedConstPointer:
            WriteParamValueReplay<ParamType::TGLfixedConstPointer>(
                os, call, param.value.GLfixedConstPointerVal);
            break;
        case ParamType::TGLfixedPointer:
            WriteParamValueReplay<ParamType::TGLfixedPointer>(os, call,
                                                              param.value.GLfixedPointerVal);
            break;
        case ParamType::TGLfloat:
            WriteParamValueReplay<ParamType::TGLfloat>(os, call, param.value.GLfloatVal);
            break;
        case ParamType::TGLfloatConstPointer:
            WriteParamValueReplay<ParamType::TGLfloatConstPointer>(
                os, call, param.value.GLfloatConstPointerVal);
            break;
        case ParamType::TGLfloatPointer:
            WriteParamValueReplay<ParamType::TGLfloatPointer>(os, call,
                                                              param.value.GLfloatPointerVal);
            break;
        case ParamType::TGLint:
            WriteParamValueReplay<ParamType::TGLint>(os, call, param.value.GLintVal);
            break;
        case ParamType::TGLint64:
            WriteParamValueReplay<ParamType::TGLint64>(os, call, param.value.GLint64Val);
            break;
        case ParamType::TGLint64Pointer:
            WriteParamValueReplay<ParamType::TGLint64Pointer>(os, call,
                                                              param.value.GLint64PointerVal);
            break;
        case ParamType::TGLintConstPointer:
            WriteParamValueReplay<ParamType::TGLintConstPointer>(os, call,
                                                                 param.value.GLintConstPointerVal);
            break;
        case ParamType::TGLintPointer:
            WriteParamValueReplay<ParamType::TGLintPointer>(os, call, param.value.GLintPointerVal);
            break;
        case ParamType::TGLintptr:
            WriteParamValueReplay<ParamType::TGLintptr>(os, call, param.value.GLintptrVal);
            break;
        case ParamType::TGLintptrConstPointer:
            WriteParamValueReplay<ParamType::TGLintptrConstPointer>(
                os, call, param.value.GLintptrConstPointerVal);
            break;
        case ParamType::TGLshort:
            WriteParamValueReplay<ParamType::TGLshort>(os, call, param.value.GLshortVal);
            break;
        case ParamType::TGLshortConstPointer:
            WriteParamValueReplay<ParamType::TGLshortConstPointer>(
                os, call, param.value.GLshortConstPointerVal);
            break;
        case ParamType::TGLsizei:
            WriteParamValueReplay<ParamType::TGLsizei>(os, call, param.value.GLsizeiVal);
            break;
        case ParamType::TGLsizeiConstPointer:
            WriteParamValueReplay<ParamType::TGLsizeiConstPointer>(
                os, call, param.value.GLsizeiConstPointerVal);
            break;
        case ParamType::TGLsizeiPointer:
            WriteParamValueReplay<ParamType::TGLsizeiPointer>(os, call,
                                                              param.value.GLsizeiPointerVal);
            break;
        case ParamType::TGLsizeiptr:
            WriteParamValueReplay<ParamType::TGLsizeiptr>(os, call, param.value.GLsizeiptrVal);
            break;
        case ParamType::TGLsizeiptrConstPointer:
            WriteParamValueReplay<ParamType::TGLsizeiptrConstPointer>(
                os, call, param.value.GLsizeiptrConstPointerVal);
            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::TGLubyteConstPointer>(
                os, call, param.value.GLubyteConstPointerVal);
            break;
        case ParamType::TGLubytePointer:
            WriteParamValueReplay<ParamType::TGLubytePointer>(os, call,
                                                              param.value.GLubytePointerVal);
            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::TGLuint64ConstPointer>(
                os, call, param.value.GLuint64ConstPointerVal);
            break;
        case ParamType::TGLuint64Pointer:
            WriteParamValueReplay<ParamType::TGLuint64Pointer>(os, call,
                                                               param.value.GLuint64PointerVal);
            break;
        case ParamType::TGLuintConstPointer:
            WriteParamValueReplay<ParamType::TGLuintConstPointer>(
                os, call, param.value.GLuintConstPointerVal);
            break;
        case ParamType::TGLuintPointer:
            WriteParamValueReplay<ParamType::TGLuintPointer>(os, call,
                                                             param.value.GLuintPointerVal);
            break;
        case ParamType::TGLushort:
            WriteParamValueReplay<ParamType::TGLushort>(os, call, param.value.GLushortVal);
            break;
        case ParamType::TGLushortConstPointer:
            WriteParamValueReplay<ParamType::TGLushortConstPointer>(
                os, call, param.value.GLushortConstPointerVal);
            break;
        case ParamType::TGLushortPointer:
            WriteParamValueReplay<ParamType::TGLushortPointer>(os, call,
                                                               param.value.GLushortPointerVal);
            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::TImageID:
            WriteParamValueReplay<ParamType::TImageID>(os, call, param.value.ImageIDVal);
            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::TMemoryObjectIDConstPointer>(
                os, call, param.value.MemoryObjectIDConstPointerVal);
            break;
        case ParamType::TMemoryObjectIDPointer:
            WriteParamValueReplay<ParamType::TMemoryObjectIDPointer>(
                os, call, param.value.MemoryObjectIDPointerVal);
            break;
        case ParamType::TObjectType:
            WriteParamValueReplay<ParamType::TObjectType>(os, call, param.value.ObjectTypeVal);
            break;
        case ParamType::TPointParameter:
            WriteParamValueReplay<ParamType::TPointParameter>(os, call,
                                                              param.value.PointParameterVal);
            break;
        case ParamType::TPolygonMode:
            WriteParamValueReplay<ParamType::TPolygonMode>(os, call, param.value.PolygonModeVal);
            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::TProgramPipelineIDConstPointer>(
                os, call, param.value.ProgramPipelineIDConstPointerVal);
            break;
        case ParamType::TProgramPipelineIDPointer:
            WriteParamValueReplay<ParamType::TProgramPipelineIDPointer>(
                os, call, param.value.ProgramPipelineIDPointerVal);
            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::TQueryIDConstPointer>(
                os, call, param.value.QueryIDConstPointerVal);
            break;
        case ParamType::TQueryIDPointer:
            WriteParamValueReplay<ParamType::TQueryIDPointer>(os, call,
                                                              param.value.QueryIDPointerVal);
            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::TRenderbufferIDConstPointer>(
                os, call, param.value.RenderbufferIDConstPointerVal);
            break;
        case ParamType::TRenderbufferIDPointer:
            WriteParamValueReplay<ParamType::TRenderbufferIDPointer>(
                os, call, param.value.RenderbufferIDPointerVal);
            break;
        case ParamType::TSamplerID:
            WriteParamValueReplay<ParamType::TSamplerID>(os, call, param.value.SamplerIDVal);
            break;
        case ParamType::TSamplerIDConstPointer:
            WriteParamValueReplay<ParamType::TSamplerIDConstPointer>(
                os, call, param.value.SamplerIDConstPointerVal);
            break;
        case ParamType::TSamplerIDPointer:
            WriteParamValueReplay<ParamType::TSamplerIDPointer>(os, call,
                                                                param.value.SamplerIDPointerVal);
            break;
        case ParamType::TSemaphoreID:
            WriteParamValueReplay<ParamType::TSemaphoreID>(os, call, param.value.SemaphoreIDVal);
            break;
        case ParamType::TSemaphoreIDConstPointer:
            WriteParamValueReplay<ParamType::TSemaphoreIDConstPointer>(
                os, call, param.value.SemaphoreIDConstPointerVal);
            break;
        case ParamType::TSemaphoreIDPointer:
            WriteParamValueReplay<ParamType::TSemaphoreIDPointer>(
                os, call, param.value.SemaphoreIDPointerVal);
            break;
        case ParamType::TShaderProgramID:
            WriteParamValueReplay<ParamType::TShaderProgramID>(os, call,
                                                               param.value.ShaderProgramIDVal);
            break;
        case ParamType::TShaderProgramIDConstPointer:
            WriteParamValueReplay<ParamType::TShaderProgramIDConstPointer>(
                os, call, param.value.ShaderProgramIDConstPointerVal);
            break;
        case ParamType::TShaderProgramIDPointer:
            WriteParamValueReplay<ParamType::TShaderProgramIDPointer>(
                os, call, param.value.ShaderProgramIDPointerVal);
            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::TSurfaceID:
            WriteParamValueReplay<ParamType::TSurfaceID>(os, call, param.value.SurfaceIDVal);
            break;
        case ParamType::TSyncID:
            WriteParamValueReplay<ParamType::TSyncID>(os, call, param.value.SyncIDVal);
            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::TTextureIDConstPointer>(
                os, call, param.value.TextureIDConstPointerVal);
            break;
        case ParamType::TTextureIDPointer:
            WriteParamValueReplay<ParamType::TTextureIDPointer>(os, call,
                                                                param.value.TextureIDPointerVal);
            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::TTimestamp:
            WriteParamValueReplay<ParamType::TTimestamp>(os, call, param.value.TimestampVal);
            break;
        case ParamType::TTransformFeedbackID:
            WriteParamValueReplay<ParamType::TTransformFeedbackID>(
                os, call, param.value.TransformFeedbackIDVal);
            break;
        case ParamType::TTransformFeedbackIDConstPointer:
            WriteParamValueReplay<ParamType::TTransformFeedbackIDConstPointer>(
                os, call, param.value.TransformFeedbackIDConstPointerVal);
            break;
        case ParamType::TTransformFeedbackIDPointer:
            WriteParamValueReplay<ParamType::TTransformFeedbackIDPointer>(
                os, call, param.value.TransformFeedbackIDPointerVal);
            break;
        case ParamType::TUniformBlockIndex:
            WriteParamValueReplay<ParamType::TUniformBlockIndex>(os, call,
                                                                 param.value.UniformBlockIndexVal);
            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::TVertexArrayIDConstPointer>(
                os, call, param.value.VertexArrayIDConstPointerVal);
            break;
        case ParamType::TVertexArrayIDPointer:
            WriteParamValueReplay<ParamType::TVertexArrayIDPointer>(
                os, call, param.value.VertexArrayIDPointerVal);
            break;
        case ParamType::TVertexAttribType:
            WriteParamValueReplay<ParamType::TVertexAttribType>(os, call,
                                                                param.value.VertexAttribTypeVal);
            break;
        case ParamType::TcharConstPointer:
            WriteParamValueReplay<ParamType::TcharConstPointer>(os, call,
                                                                param.value.charConstPointerVal);
            break;
        case ParamType::Tegl_ConfigPointer:
            WriteParamValueReplay<ParamType::Tegl_ConfigPointer>(os, call,
                                                                 param.value.egl_ConfigPointerVal);
            break;
        case ParamType::Tegl_DevicePointer:
            WriteParamValueReplay<ParamType::Tegl_DevicePointer>(os, call,
                                                                 param.value.egl_DevicePointerVal);
            break;
        case ParamType::Tegl_DisplayPointer:
            WriteParamValueReplay<ParamType::Tegl_DisplayPointer>(
                os, call, param.value.egl_DisplayPointerVal);
            break;
        case ParamType::Tegl_StreamPointer:
            WriteParamValueReplay<ParamType::Tegl_StreamPointer>(os, call,
                                                                 param.value.egl_StreamPointerVal);
            break;
        case ParamType::Tegl_SyncID:
            WriteParamValueReplay<ParamType::Tegl_SyncID>(os, call, param.value.egl_SyncIDVal);
            break;
        case ParamType::TvoidConstPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
                                                                param.value.voidConstPointerVal);
            break;
        case ParamType::TvoidConstPointerPointer:
            WriteParamValueReplay<ParamType::TvoidConstPointerPointer>(
                os, call, param.value.voidConstPointerPointerVal);
            break;
        case ParamType::TvoidPointer:
            WriteParamValueReplay<ParamType::TvoidPointer>(os, call, param.value.voidPointerVal);
            break;
        case ParamType::TvoidPointerPointer:
            WriteParamValueReplay<ParamType::TvoidPointerPointer>(
                os, call, param.value.voidPointerPointerVal);
            break;
        default:
            os << "unknown";
            break;
    }
}

const char *ParamTypeToString(ParamType paramType)
{
    switch (paramType)
    {
        case ParamType::TAHardwareBufferConstPointer:
            return "const GLenum *";
        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::TClipDepthMode:
            return "GLenum";
        case ParamType::TClipOrigin:
            return "GLenum";
        case ParamType::TCompositorTiming:
            return "GLenum";
        case ParamType::TContextID:
            return "GLuint";
        case ParamType::TCullFaceMode:
            return "GLenum";
        case ParamType::TDrawElementsType:
            return "GLenum";
        case ParamType::TEGLAttribConstPointer:
            return "const EGLAttrib *";
        case ParamType::TEGLAttribKHRPointer:
            return "EGLAttribKHR *";
        case ParamType::TEGLAttribPointer:
            return "EGLAttrib *";
        case ParamType::TEGLBoolean:
            return "EGLBoolean";
        case ParamType::TEGLBooleanPointer:
            return "EGLBoolean *";
        case ParamType::TEGLClientBuffer:
            return "EGLClientBuffer";
        case ParamType::TEGLConfigPointer:
            return "EGLConfig *";
        case ParamType::TEGLContext:
            return "EGLContext";
        case ParamType::TEGLDEBUGPROCKHR:
            return "EGLDEBUGPROCKHR";
        case ParamType::TEGLDeviceEXT:
            return "EGLDeviceEXT";
        case ParamType::TEGLDisplay:
            return "EGLDisplay";
        case ParamType::TEGLFrameTokenANGLE:
            return "EGLFrameTokenANGLE";
        case ParamType::TEGLGetBlobFuncANDROID:
            return "EGLGetBlobFuncANDROID";
        case ParamType::TEGLImage:
            return "EGLImage";
        case ParamType::TEGLImageKHR:
            return "EGLImageKHR";
        case ParamType::TEGLLabelKHR:
            return "EGLLabelKHR";
        case ParamType::TEGLNativeDisplayType:
            return "EGLNativeDisplayType";
        case ParamType::TEGLNativePixmapType:
            return "EGLNativePixmapType";
        case ParamType::TEGLNativeWindowType:
            return "EGLNativeWindowType";
        case ParamType::TEGLObjectKHR:
            return "EGLObjectKHR";
        case ParamType::TEGLSetBlobFuncANDROID:
            return "EGLSetBlobFuncANDROID";
        case ParamType::TEGLStreamKHR:
            return "EGLStreamKHR";
        case ParamType::TEGLSurface:
            return "EGLSurface";
        case ParamType::TEGLSync:
            return "EGLSync";
        case ParamType::TEGLSyncKHR:
            return "EGLSyncKHR";
        case ParamType::TEGLTime:
            return "EGLTime";
        case ParamType::TEGLTimeKHR:
            return "EGLTimeKHR";
        case ParamType::TEGLenum:
            return "EGLenum";
        case ParamType::TEGLint:
            return "EGLint";
        case ParamType::TEGLintConstPointer:
            return "const EGLint *";
        case ParamType::TEGLintPointer:
            return "EGLint *";
        case ParamType::TEGLnsecsANDROID:
            return "EGLnsecsANDROID";
        case ParamType::TEGLnsecsANDROIDPointer:
            return "EGLnsecsANDROID *";
        case ParamType::TEGLuint64KHR:
            return "EGLuint64KHR";
        case ParamType::TEGLuint64KHRPointer:
            return "EGLuint64KHR *";
        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::TGLeglClientBufferEXT:
            return "GLeglClientBufferEXT";
        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::TGLint64:
            return "GLint64";
        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::TGraphicsResetStatus:
            return "GLenum";
        case ParamType::THandleType:
            return "GLenum";
        case ParamType::TImageID:
            return "GLuint";
        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::TObjectType:
            return "GLenum";
        case ParamType::TPointParameter:
            return "GLenum";
        case ParamType::TPolygonMode:
            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::TSurfaceID:
            return "GLuint";
        case ParamType::TSyncID:
            return "GLuint";
        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::TTimestamp:
            return "GLenum";
        case ParamType::TTransformFeedbackID:
            return "GLuint";
        case ParamType::TTransformFeedbackIDConstPointer:
            return "const GLuint *";
        case ParamType::TTransformFeedbackIDPointer:
            return "GLuint *";
        case ParamType::TUniformBlockIndex:
            return "GLenum";
        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::TcharConstPointer:
            return "const GLenum *";
        case ParamType::Tegl_ConfigPointer:
            return "GLenum *";
        case ParamType::Tegl_DevicePointer:
            return "GLenum *";
        case ParamType::Tegl_DisplayPointer:
            return "GLenum *";
        case ParamType::Tegl_StreamPointer:
            return "GLenum *";
        case ParamType::Tegl_SyncID:
            return "GLuint";
        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::TContextID:
            return ResourceIDType::Context;
        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::TImageID:
            return ResourceIDType::Image;
        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::TSurfaceID:
            return ResourceIDType::Surface;
        case ParamType::TSyncID:
            return ResourceIDType::Sync;
        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;
        case ParamType::Tegl_SyncID:
            return ResourceIDType::egl_Sync;
        default:
            return ResourceIDType::InvalidEnum;
    }
}

const char *GetResourceIDTypeName(ResourceIDType resourceIDType)
{
    switch (resourceIDType)
    {
        case ResourceIDType::Buffer:
            return "Buffer";
        case ResourceIDType::Context:
            return "Context";
        case ResourceIDType::FenceNV:
            return "FenceNV";
        case ResourceIDType::Framebuffer:
            return "Framebuffer";
        case ResourceIDType::Image:
            return "Image";
        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::Surface:
            return "Surface";
        case ResourceIDType::Sync:
            return "Sync";
        case ResourceIDType::Texture:
            return "Texture";
        case ResourceIDType::TransformFeedback:
            return "TransformFeedback";
        case ResourceIDType::VertexArray:
            return "VertexArray";
        case ResourceIDType::egl_Sync:
            return "egl_Sync";
        default:
            UNREACHABLE();
            return "GetResourceIDTypeName error";
    }
}
}  // namespace angle
