• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // frame_capture_utils_autogen.cpp:
9 //   ANGLE Frame capture types and helper functions.
10 
11 #include "libANGLE/capture/frame_capture_utils_autogen.h"
12 
13 #include "libANGLE/capture/FrameCapture.h"
14 
15 namespace angle
16 {
WriteParamCaptureReplay(std::ostream & os,const CallCapture & call,const ParamCapture & param)17 void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const ParamCapture &param)
18 {
19     switch (param.type)
20     {
21         case ParamType::TAlphaTestFunc:
22             WriteParamValueReplay<ParamType::TAlphaTestFunc>(os, call,
23                                                              param.value.AlphaTestFuncVal);
24             break;
25         case ParamType::TBufferBinding:
26             WriteParamValueReplay<ParamType::TBufferBinding>(os, call,
27                                                              param.value.BufferBindingVal);
28             break;
29         case ParamType::TBufferID:
30             WriteParamValueReplay<ParamType::TBufferID>(os, call, param.value.BufferIDVal);
31             break;
32         case ParamType::TBufferIDConstPointer:
33             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
34                                                                 param.value.voidConstPointerVal);
35             break;
36         case ParamType::TBufferIDPointer:
37             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
38                                                                 param.value.voidConstPointerVal);
39             break;
40         case ParamType::TBufferUsage:
41             WriteParamValueReplay<ParamType::TBufferUsage>(os, call, param.value.BufferUsageVal);
42             break;
43         case ParamType::TClientVertexArrayType:
44             WriteParamValueReplay<ParamType::TClientVertexArrayType>(
45                 os, call, param.value.ClientVertexArrayTypeVal);
46             break;
47         case ParamType::TCullFaceMode:
48             WriteParamValueReplay<ParamType::TCullFaceMode>(os, call, param.value.CullFaceModeVal);
49             break;
50         case ParamType::TDrawElementsType:
51             WriteParamValueReplay<ParamType::TDrawElementsType>(os, call,
52                                                                 param.value.DrawElementsTypeVal);
53             break;
54         case ParamType::TFenceNVID:
55             WriteParamValueReplay<ParamType::TFenceNVID>(os, call, param.value.FenceNVIDVal);
56             break;
57         case ParamType::TFenceNVIDConstPointer:
58             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
59                                                                 param.value.voidConstPointerVal);
60             break;
61         case ParamType::TFenceNVIDPointer:
62             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
63                                                                 param.value.voidConstPointerVal);
64             break;
65         case ParamType::TFramebufferID:
66             WriteParamValueReplay<ParamType::TFramebufferID>(os, call,
67                                                              param.value.FramebufferIDVal);
68             break;
69         case ParamType::TFramebufferIDConstPointer:
70             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
71                                                                 param.value.voidConstPointerVal);
72             break;
73         case ParamType::TFramebufferIDPointer:
74             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
75                                                                 param.value.voidConstPointerVal);
76             break;
77         case ParamType::TGLDEBUGPROC:
78             WriteParamValueReplay<ParamType::TGLDEBUGPROC>(os, call, param.value.GLDEBUGPROCVal);
79             break;
80         case ParamType::TGLDEBUGPROCKHR:
81             WriteParamValueReplay<ParamType::TGLDEBUGPROCKHR>(os, call,
82                                                               param.value.GLDEBUGPROCKHRVal);
83             break;
84         case ParamType::TGLbitfield:
85             WriteParamValueReplay<ParamType::TGLbitfield>(os, call, param.value.GLbitfieldVal);
86             break;
87         case ParamType::TGLboolean:
88             WriteParamValueReplay<ParamType::TGLboolean>(os, call, param.value.GLbooleanVal);
89             break;
90         case ParamType::TGLbooleanConstPointer:
91             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
92                                                                 param.value.voidConstPointerVal);
93             break;
94         case ParamType::TGLbooleanPointer:
95             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
96                                                                 param.value.voidConstPointerVal);
97             break;
98         case ParamType::TGLbyte:
99             WriteParamValueReplay<ParamType::TGLbyte>(os, call, param.value.GLbyteVal);
100             break;
101         case ParamType::TGLbyteConstPointer:
102             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
103                                                                 param.value.voidConstPointerVal);
104             break;
105         case ParamType::TGLcharConstPointer:
106             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
107                                                                 param.value.voidConstPointerVal);
108             break;
109         case ParamType::TGLcharConstPointerPointer:
110             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
111                                                                 param.value.voidConstPointerVal);
112             break;
113         case ParamType::TGLcharPointer:
114             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
115                                                                 param.value.voidConstPointerVal);
116             break;
117         case ParamType::TGLclampx:
118             WriteParamValueReplay<ParamType::TGLclampx>(os, call, param.value.GLclampxVal);
119             break;
120         case ParamType::TGLdouble:
121             WriteParamValueReplay<ParamType::TGLdouble>(os, call, param.value.GLdoubleVal);
122             break;
123         case ParamType::TGLdoubleConstPointer:
124             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
125                                                                 param.value.voidConstPointerVal);
126             break;
127         case ParamType::TGLdoublePointer:
128             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
129                                                                 param.value.voidConstPointerVal);
130             break;
131         case ParamType::TGLeglClientBufferEXT:
132             WriteParamValueReplay<ParamType::TGLeglClientBufferEXT>(
133                 os, call, param.value.GLeglClientBufferEXTVal);
134             break;
135         case ParamType::TGLeglImageOES:
136             WriteParamValueReplay<ParamType::TGLeglImageOES>(os, call,
137                                                              param.value.GLeglImageOESVal);
138             break;
139         case ParamType::TGLenum:
140             WriteParamValueReplay<ParamType::TGLenum>(os, call, param.value.GLenumVal);
141             break;
142         case ParamType::TGLenumConstPointer:
143             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
144                                                                 param.value.voidConstPointerVal);
145             break;
146         case ParamType::TGLenumPointer:
147             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
148                                                                 param.value.voidConstPointerVal);
149             break;
150         case ParamType::TGLfixed:
151             WriteParamValueReplay<ParamType::TGLfixed>(os, call, param.value.GLfixedVal);
152             break;
153         case ParamType::TGLfixedConstPointer:
154             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
155                                                                 param.value.voidConstPointerVal);
156             break;
157         case ParamType::TGLfixedPointer:
158             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
159                                                                 param.value.voidConstPointerVal);
160             break;
161         case ParamType::TGLfloat:
162             WriteParamValueReplay<ParamType::TGLfloat>(os, call, param.value.GLfloatVal);
163             break;
164         case ParamType::TGLfloatConstPointer:
165             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
166                                                                 param.value.voidConstPointerVal);
167             break;
168         case ParamType::TGLfloatPointer:
169             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
170                                                                 param.value.voidConstPointerVal);
171             break;
172         case ParamType::TGLint:
173             WriteParamValueReplay<ParamType::TGLint>(os, call, param.value.GLintVal);
174             break;
175         case ParamType::TGLint64Pointer:
176             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
177                                                                 param.value.voidConstPointerVal);
178             break;
179         case ParamType::TGLintConstPointer:
180             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
181                                                                 param.value.voidConstPointerVal);
182             break;
183         case ParamType::TGLintPointer:
184             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
185                                                                 param.value.voidConstPointerVal);
186             break;
187         case ParamType::TGLintptr:
188             WriteParamValueReplay<ParamType::TGLintptr>(os, call, param.value.GLintptrVal);
189             break;
190         case ParamType::TGLintptrConstPointer:
191             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
192                                                                 param.value.voidConstPointerVal);
193             break;
194         case ParamType::TGLshort:
195             WriteParamValueReplay<ParamType::TGLshort>(os, call, param.value.GLshortVal);
196             break;
197         case ParamType::TGLshortConstPointer:
198             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
199                                                                 param.value.voidConstPointerVal);
200             break;
201         case ParamType::TGLsizei:
202             WriteParamValueReplay<ParamType::TGLsizei>(os, call, param.value.GLsizeiVal);
203             break;
204         case ParamType::TGLsizeiConstPointer:
205             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
206                                                                 param.value.voidConstPointerVal);
207             break;
208         case ParamType::TGLsizeiPointer:
209             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
210                                                                 param.value.voidConstPointerVal);
211             break;
212         case ParamType::TGLsizeiptr:
213             WriteParamValueReplay<ParamType::TGLsizeiptr>(os, call, param.value.GLsizeiptrVal);
214             break;
215         case ParamType::TGLsizeiptrConstPointer:
216             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
217                                                                 param.value.voidConstPointerVal);
218             break;
219         case ParamType::TGLsync:
220             WriteParamValueReplay<ParamType::TGLsync>(os, call, param.value.GLsyncVal);
221             break;
222         case ParamType::TGLubyte:
223             WriteParamValueReplay<ParamType::TGLubyte>(os, call, param.value.GLubyteVal);
224             break;
225         case ParamType::TGLubyteConstPointer:
226             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
227                                                                 param.value.voidConstPointerVal);
228             break;
229         case ParamType::TGLubytePointer:
230             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
231                                                                 param.value.voidConstPointerVal);
232             break;
233         case ParamType::TGLuint:
234             WriteParamValueReplay<ParamType::TGLuint>(os, call, param.value.GLuintVal);
235             break;
236         case ParamType::TGLuint64:
237             WriteParamValueReplay<ParamType::TGLuint64>(os, call, param.value.GLuint64Val);
238             break;
239         case ParamType::TGLuint64ConstPointer:
240             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
241                                                                 param.value.voidConstPointerVal);
242             break;
243         case ParamType::TGLuint64Pointer:
244             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
245                                                                 param.value.voidConstPointerVal);
246             break;
247         case ParamType::TGLuintConstPointer:
248             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
249                                                                 param.value.voidConstPointerVal);
250             break;
251         case ParamType::TGLuintPointer:
252             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
253                                                                 param.value.voidConstPointerVal);
254             break;
255         case ParamType::TGLushort:
256             WriteParamValueReplay<ParamType::TGLushort>(os, call, param.value.GLushortVal);
257             break;
258         case ParamType::TGLushortConstPointer:
259             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
260                                                                 param.value.voidConstPointerVal);
261             break;
262         case ParamType::TGLushortPointer:
263             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
264                                                                 param.value.voidConstPointerVal);
265             break;
266         case ParamType::TGLvoidConstPointer:
267             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
268                                                                 param.value.voidConstPointerVal);
269             break;
270         case ParamType::TGLvoidConstPointerPointer:
271             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
272                                                                 param.value.voidConstPointerVal);
273             break;
274         case ParamType::TGraphicsResetStatus:
275             WriteParamValueReplay<ParamType::TGraphicsResetStatus>(
276                 os, call, param.value.GraphicsResetStatusVal);
277             break;
278         case ParamType::THandleType:
279             WriteParamValueReplay<ParamType::THandleType>(os, call, param.value.HandleTypeVal);
280             break;
281         case ParamType::TLightParameter:
282             WriteParamValueReplay<ParamType::TLightParameter>(os, call,
283                                                               param.value.LightParameterVal);
284             break;
285         case ParamType::TLogicalOperation:
286             WriteParamValueReplay<ParamType::TLogicalOperation>(os, call,
287                                                                 param.value.LogicalOperationVal);
288             break;
289         case ParamType::TMaterialParameter:
290             WriteParamValueReplay<ParamType::TMaterialParameter>(os, call,
291                                                                  param.value.MaterialParameterVal);
292             break;
293         case ParamType::TMatrixType:
294             WriteParamValueReplay<ParamType::TMatrixType>(os, call, param.value.MatrixTypeVal);
295             break;
296         case ParamType::TMemoryObjectID:
297             WriteParamValueReplay<ParamType::TMemoryObjectID>(os, call,
298                                                               param.value.MemoryObjectIDVal);
299             break;
300         case ParamType::TMemoryObjectIDConstPointer:
301             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
302                                                                 param.value.voidConstPointerVal);
303             break;
304         case ParamType::TMemoryObjectIDPointer:
305             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
306                                                                 param.value.voidConstPointerVal);
307             break;
308         case ParamType::TPointParameter:
309             WriteParamValueReplay<ParamType::TPointParameter>(os, call,
310                                                               param.value.PointParameterVal);
311             break;
312         case ParamType::TPrimitiveMode:
313             WriteParamValueReplay<ParamType::TPrimitiveMode>(os, call,
314                                                              param.value.PrimitiveModeVal);
315             break;
316         case ParamType::TProgramPipelineID:
317             WriteParamValueReplay<ParamType::TProgramPipelineID>(os, call,
318                                                                  param.value.ProgramPipelineIDVal);
319             break;
320         case ParamType::TProgramPipelineIDConstPointer:
321             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
322                                                                 param.value.voidConstPointerVal);
323             break;
324         case ParamType::TProgramPipelineIDPointer:
325             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
326                                                                 param.value.voidConstPointerVal);
327             break;
328         case ParamType::TProvokingVertexConvention:
329             WriteParamValueReplay<ParamType::TProvokingVertexConvention>(
330                 os, call, param.value.ProvokingVertexConventionVal);
331             break;
332         case ParamType::TQueryID:
333             WriteParamValueReplay<ParamType::TQueryID>(os, call, param.value.QueryIDVal);
334             break;
335         case ParamType::TQueryIDConstPointer:
336             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
337                                                                 param.value.voidConstPointerVal);
338             break;
339         case ParamType::TQueryIDPointer:
340             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
341                                                                 param.value.voidConstPointerVal);
342             break;
343         case ParamType::TQueryType:
344             WriteParamValueReplay<ParamType::TQueryType>(os, call, param.value.QueryTypeVal);
345             break;
346         case ParamType::TRenderbufferID:
347             WriteParamValueReplay<ParamType::TRenderbufferID>(os, call,
348                                                               param.value.RenderbufferIDVal);
349             break;
350         case ParamType::TRenderbufferIDConstPointer:
351             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
352                                                                 param.value.voidConstPointerVal);
353             break;
354         case ParamType::TRenderbufferIDPointer:
355             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
356                                                                 param.value.voidConstPointerVal);
357             break;
358         case ParamType::TSamplerID:
359             WriteParamValueReplay<ParamType::TSamplerID>(os, call, param.value.SamplerIDVal);
360             break;
361         case ParamType::TSamplerIDConstPointer:
362             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
363                                                                 param.value.voidConstPointerVal);
364             break;
365         case ParamType::TSamplerIDPointer:
366             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
367                                                                 param.value.voidConstPointerVal);
368             break;
369         case ParamType::TSemaphoreID:
370             WriteParamValueReplay<ParamType::TSemaphoreID>(os, call, param.value.SemaphoreIDVal);
371             break;
372         case ParamType::TSemaphoreIDConstPointer:
373             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
374                                                                 param.value.voidConstPointerVal);
375             break;
376         case ParamType::TSemaphoreIDPointer:
377             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
378                                                                 param.value.voidConstPointerVal);
379             break;
380         case ParamType::TShaderProgramID:
381             WriteParamValueReplay<ParamType::TShaderProgramID>(os, call,
382                                                                param.value.ShaderProgramIDVal);
383             break;
384         case ParamType::TShaderProgramIDConstPointer:
385             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
386                                                                 param.value.voidConstPointerVal);
387             break;
388         case ParamType::TShaderProgramIDPointer:
389             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
390                                                                 param.value.voidConstPointerVal);
391             break;
392         case ParamType::TShaderType:
393             WriteParamValueReplay<ParamType::TShaderType>(os, call, param.value.ShaderTypeVal);
394             break;
395         case ParamType::TShadingModel:
396             WriteParamValueReplay<ParamType::TShadingModel>(os, call, param.value.ShadingModelVal);
397             break;
398         case ParamType::TTextureEnvParameter:
399             WriteParamValueReplay<ParamType::TTextureEnvParameter>(
400                 os, call, param.value.TextureEnvParameterVal);
401             break;
402         case ParamType::TTextureEnvTarget:
403             WriteParamValueReplay<ParamType::TTextureEnvTarget>(os, call,
404                                                                 param.value.TextureEnvTargetVal);
405             break;
406         case ParamType::TTextureID:
407             WriteParamValueReplay<ParamType::TTextureID>(os, call, param.value.TextureIDVal);
408             break;
409         case ParamType::TTextureIDConstPointer:
410             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
411                                                                 param.value.voidConstPointerVal);
412             break;
413         case ParamType::TTextureIDPointer:
414             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
415                                                                 param.value.voidConstPointerVal);
416             break;
417         case ParamType::TTextureTarget:
418             WriteParamValueReplay<ParamType::TTextureTarget>(os, call,
419                                                              param.value.TextureTargetVal);
420             break;
421         case ParamType::TTextureType:
422             WriteParamValueReplay<ParamType::TTextureType>(os, call, param.value.TextureTypeVal);
423             break;
424         case ParamType::TTransformFeedbackID:
425             WriteParamValueReplay<ParamType::TTransformFeedbackID>(
426                 os, call, param.value.TransformFeedbackIDVal);
427             break;
428         case ParamType::TTransformFeedbackIDConstPointer:
429             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
430                                                                 param.value.voidConstPointerVal);
431             break;
432         case ParamType::TTransformFeedbackIDPointer:
433             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
434                                                                 param.value.voidConstPointerVal);
435             break;
436         case ParamType::TUniformBlockIndex:
437             WriteParamValueReplay<ParamType::TUniformBlockIndex>(os, call,
438                                                                  param.value.UniformBlockIndexVal);
439             break;
440         case ParamType::TUniformLocation:
441             WriteParamValueReplay<ParamType::TUniformLocation>(os, call,
442                                                                param.value.UniformLocationVal);
443             break;
444         case ParamType::TVertexArrayID:
445             WriteParamValueReplay<ParamType::TVertexArrayID>(os, call,
446                                                              param.value.VertexArrayIDVal);
447             break;
448         case ParamType::TVertexArrayIDConstPointer:
449             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
450                                                                 param.value.voidConstPointerVal);
451             break;
452         case ParamType::TVertexArrayIDPointer:
453             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
454                                                                 param.value.voidConstPointerVal);
455             break;
456         case ParamType::TVertexAttribType:
457             WriteParamValueReplay<ParamType::TVertexAttribType>(os, call,
458                                                                 param.value.VertexAttribTypeVal);
459             break;
460         case ParamType::TvoidConstPointer:
461             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
462                                                                 param.value.voidConstPointerVal);
463             break;
464         case ParamType::TvoidConstPointerPointer:
465             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
466                                                                 param.value.voidConstPointerVal);
467             break;
468         case ParamType::TvoidPointer:
469             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
470                                                                 param.value.voidConstPointerVal);
471             break;
472         case ParamType::TvoidPointerPointer:
473             WriteParamValueReplay<ParamType::TvoidConstPointer>(os, call,
474                                                                 param.value.voidConstPointerVal);
475             break;
476         default:
477             os << "unknown";
478             break;
479     }
480 }
481 
ParamTypeToString(ParamType paramType)482 const char *ParamTypeToString(ParamType paramType)
483 {
484     switch (paramType)
485     {
486         case ParamType::TAlphaTestFunc:
487             return "GLenum";
488         case ParamType::TBufferBinding:
489             return "GLenum";
490         case ParamType::TBufferID:
491             return "GLuint";
492         case ParamType::TBufferIDConstPointer:
493             return "const GLuint *";
494         case ParamType::TBufferIDPointer:
495             return "GLuint *";
496         case ParamType::TBufferUsage:
497             return "GLenum";
498         case ParamType::TClientVertexArrayType:
499             return "GLenum";
500         case ParamType::TCullFaceMode:
501             return "GLenum";
502         case ParamType::TDrawElementsType:
503             return "GLenum";
504         case ParamType::TFenceNVID:
505             return "GLuint";
506         case ParamType::TFenceNVIDConstPointer:
507             return "const GLuint *";
508         case ParamType::TFenceNVIDPointer:
509             return "GLuint *";
510         case ParamType::TFramebufferID:
511             return "GLuint";
512         case ParamType::TFramebufferIDConstPointer:
513             return "const GLuint *";
514         case ParamType::TFramebufferIDPointer:
515             return "GLuint *";
516         case ParamType::TGLDEBUGPROC:
517             return "GLDEBUGPROC";
518         case ParamType::TGLDEBUGPROCKHR:
519             return "GLDEBUGPROCKHR";
520         case ParamType::TGLbitfield:
521             return "GLbitfield";
522         case ParamType::TGLboolean:
523             return "GLboolean";
524         case ParamType::TGLbooleanConstPointer:
525             return "const GLboolean *";
526         case ParamType::TGLbooleanPointer:
527             return "GLboolean *";
528         case ParamType::TGLbyte:
529             return "GLbyte";
530         case ParamType::TGLbyteConstPointer:
531             return "const GLbyte *";
532         case ParamType::TGLcharConstPointer:
533             return "const GLchar *";
534         case ParamType::TGLcharConstPointerPointer:
535             return "const GLchar * const *";
536         case ParamType::TGLcharPointer:
537             return "GLchar *";
538         case ParamType::TGLclampx:
539             return "GLclampx";
540         case ParamType::TGLdouble:
541             return "GLdouble";
542         case ParamType::TGLdoubleConstPointer:
543             return "const GLdouble *";
544         case ParamType::TGLdoublePointer:
545             return "GLdouble *";
546         case ParamType::TGLeglClientBufferEXT:
547             return "GLeglClientBufferEXT";
548         case ParamType::TGLeglImageOES:
549             return "GLeglImageOES";
550         case ParamType::TGLenum:
551             return "GLenum";
552         case ParamType::TGLenumConstPointer:
553             return "const GLenum *";
554         case ParamType::TGLenumPointer:
555             return "GLenum *";
556         case ParamType::TGLfixed:
557             return "GLfixed";
558         case ParamType::TGLfixedConstPointer:
559             return "const GLfixed *";
560         case ParamType::TGLfixedPointer:
561             return "GLfixed *";
562         case ParamType::TGLfloat:
563             return "GLfloat";
564         case ParamType::TGLfloatConstPointer:
565             return "const GLfloat *";
566         case ParamType::TGLfloatPointer:
567             return "GLfloat *";
568         case ParamType::TGLint:
569             return "GLint";
570         case ParamType::TGLint64Pointer:
571             return "GLint64 *";
572         case ParamType::TGLintConstPointer:
573             return "const GLint *";
574         case ParamType::TGLintPointer:
575             return "GLint *";
576         case ParamType::TGLintptr:
577             return "GLintptr";
578         case ParamType::TGLintptrConstPointer:
579             return "const GLintptr *";
580         case ParamType::TGLshort:
581             return "GLshort";
582         case ParamType::TGLshortConstPointer:
583             return "const GLshort *";
584         case ParamType::TGLsizei:
585             return "GLsizei";
586         case ParamType::TGLsizeiConstPointer:
587             return "const GLsizei *";
588         case ParamType::TGLsizeiPointer:
589             return "GLsizei *";
590         case ParamType::TGLsizeiptr:
591             return "GLsizeiptr";
592         case ParamType::TGLsizeiptrConstPointer:
593             return "const GLsizeiptr *";
594         case ParamType::TGLsync:
595             return "GLsync";
596         case ParamType::TGLubyte:
597             return "GLubyte";
598         case ParamType::TGLubyteConstPointer:
599             return "const GLubyte *";
600         case ParamType::TGLubytePointer:
601             return "GLubyte *";
602         case ParamType::TGLuint:
603             return "GLuint";
604         case ParamType::TGLuint64:
605             return "GLuint64";
606         case ParamType::TGLuint64ConstPointer:
607             return "const GLuint64 *";
608         case ParamType::TGLuint64Pointer:
609             return "GLuint64 *";
610         case ParamType::TGLuintConstPointer:
611             return "const GLuint *";
612         case ParamType::TGLuintPointer:
613             return "GLuint *";
614         case ParamType::TGLushort:
615             return "GLushort";
616         case ParamType::TGLushortConstPointer:
617             return "const GLushort *";
618         case ParamType::TGLushortPointer:
619             return "GLushort *";
620         case ParamType::TGLvoidConstPointer:
621             return "const GLvoid *";
622         case ParamType::TGLvoidConstPointerPointer:
623             return "const GLvoid * const *";
624         case ParamType::TGraphicsResetStatus:
625             return "GLenum";
626         case ParamType::THandleType:
627             return "GLenum";
628         case ParamType::TLightParameter:
629             return "GLenum";
630         case ParamType::TLogicalOperation:
631             return "GLenum";
632         case ParamType::TMaterialParameter:
633             return "GLenum";
634         case ParamType::TMatrixType:
635             return "GLenum";
636         case ParamType::TMemoryObjectID:
637             return "GLuint";
638         case ParamType::TMemoryObjectIDConstPointer:
639             return "const GLuint *";
640         case ParamType::TMemoryObjectIDPointer:
641             return "GLuint *";
642         case ParamType::TPointParameter:
643             return "GLenum";
644         case ParamType::TPrimitiveMode:
645             return "GLenum";
646         case ParamType::TProgramPipelineID:
647             return "GLuint";
648         case ParamType::TProgramPipelineIDConstPointer:
649             return "const GLuint *";
650         case ParamType::TProgramPipelineIDPointer:
651             return "GLuint *";
652         case ParamType::TProvokingVertexConvention:
653             return "GLenum";
654         case ParamType::TQueryID:
655             return "GLuint";
656         case ParamType::TQueryIDConstPointer:
657             return "const GLuint *";
658         case ParamType::TQueryIDPointer:
659             return "GLuint *";
660         case ParamType::TQueryType:
661             return "GLenum";
662         case ParamType::TRenderbufferID:
663             return "GLuint";
664         case ParamType::TRenderbufferIDConstPointer:
665             return "const GLuint *";
666         case ParamType::TRenderbufferIDPointer:
667             return "GLuint *";
668         case ParamType::TSamplerID:
669             return "GLuint";
670         case ParamType::TSamplerIDConstPointer:
671             return "const GLuint *";
672         case ParamType::TSamplerIDPointer:
673             return "GLuint *";
674         case ParamType::TSemaphoreID:
675             return "GLuint";
676         case ParamType::TSemaphoreIDConstPointer:
677             return "const GLuint *";
678         case ParamType::TSemaphoreIDPointer:
679             return "GLuint *";
680         case ParamType::TShaderProgramID:
681             return "GLuint";
682         case ParamType::TShaderProgramIDConstPointer:
683             return "const GLuint *";
684         case ParamType::TShaderProgramIDPointer:
685             return "GLuint *";
686         case ParamType::TShaderType:
687             return "GLenum";
688         case ParamType::TShadingModel:
689             return "GLenum";
690         case ParamType::TTextureEnvParameter:
691             return "GLenum";
692         case ParamType::TTextureEnvTarget:
693             return "GLenum";
694         case ParamType::TTextureID:
695             return "GLuint";
696         case ParamType::TTextureIDConstPointer:
697             return "const GLuint *";
698         case ParamType::TTextureIDPointer:
699             return "GLuint *";
700         case ParamType::TTextureTarget:
701             return "GLenum";
702         case ParamType::TTextureType:
703             return "GLenum";
704         case ParamType::TTransformFeedbackID:
705             return "GLuint";
706         case ParamType::TTransformFeedbackIDConstPointer:
707             return "const GLuint *";
708         case ParamType::TTransformFeedbackIDPointer:
709             return "GLuint *";
710         case ParamType::TUniformBlockIndex:
711             return "GLenum";
712         case ParamType::TUniformLocation:
713             return "GLenum";
714         case ParamType::TVertexArrayID:
715             return "GLuint";
716         case ParamType::TVertexArrayIDConstPointer:
717             return "const GLuint *";
718         case ParamType::TVertexArrayIDPointer:
719             return "GLuint *";
720         case ParamType::TVertexAttribType:
721             return "GLenum";
722         case ParamType::TvoidConstPointer:
723             return "const void *";
724         case ParamType::TvoidConstPointerPointer:
725             return "const void * const *";
726         case ParamType::TvoidPointer:
727             return "void *";
728         case ParamType::TvoidPointerPointer:
729             return "void **";
730         default:
731             UNREACHABLE();
732             return "unknown";
733     }
734 }
735 
GetResourceIDTypeFromParamType(ParamType paramType)736 ResourceIDType GetResourceIDTypeFromParamType(ParamType paramType)
737 {
738     switch (paramType)
739     {
740         case ParamType::TBufferID:
741             return ResourceIDType::Buffer;
742         case ParamType::TBufferIDConstPointer:
743             return ResourceIDType::Buffer;
744         case ParamType::TBufferIDPointer:
745             return ResourceIDType::Buffer;
746         case ParamType::TFenceNVID:
747             return ResourceIDType::FenceNV;
748         case ParamType::TFenceNVIDConstPointer:
749             return ResourceIDType::FenceNV;
750         case ParamType::TFenceNVIDPointer:
751             return ResourceIDType::FenceNV;
752         case ParamType::TFramebufferID:
753             return ResourceIDType::Framebuffer;
754         case ParamType::TFramebufferIDConstPointer:
755             return ResourceIDType::Framebuffer;
756         case ParamType::TFramebufferIDPointer:
757             return ResourceIDType::Framebuffer;
758         case ParamType::TMemoryObjectID:
759             return ResourceIDType::MemoryObject;
760         case ParamType::TMemoryObjectIDConstPointer:
761             return ResourceIDType::MemoryObject;
762         case ParamType::TMemoryObjectIDPointer:
763             return ResourceIDType::MemoryObject;
764         case ParamType::TProgramPipelineID:
765             return ResourceIDType::ProgramPipeline;
766         case ParamType::TProgramPipelineIDConstPointer:
767             return ResourceIDType::ProgramPipeline;
768         case ParamType::TProgramPipelineIDPointer:
769             return ResourceIDType::ProgramPipeline;
770         case ParamType::TQueryID:
771             return ResourceIDType::Query;
772         case ParamType::TQueryIDConstPointer:
773             return ResourceIDType::Query;
774         case ParamType::TQueryIDPointer:
775             return ResourceIDType::Query;
776         case ParamType::TRenderbufferID:
777             return ResourceIDType::Renderbuffer;
778         case ParamType::TRenderbufferIDConstPointer:
779             return ResourceIDType::Renderbuffer;
780         case ParamType::TRenderbufferIDPointer:
781             return ResourceIDType::Renderbuffer;
782         case ParamType::TSamplerID:
783             return ResourceIDType::Sampler;
784         case ParamType::TSamplerIDConstPointer:
785             return ResourceIDType::Sampler;
786         case ParamType::TSamplerIDPointer:
787             return ResourceIDType::Sampler;
788         case ParamType::TSemaphoreID:
789             return ResourceIDType::Semaphore;
790         case ParamType::TSemaphoreIDConstPointer:
791             return ResourceIDType::Semaphore;
792         case ParamType::TSemaphoreIDPointer:
793             return ResourceIDType::Semaphore;
794         case ParamType::TShaderProgramID:
795             return ResourceIDType::ShaderProgram;
796         case ParamType::TShaderProgramIDConstPointer:
797             return ResourceIDType::ShaderProgram;
798         case ParamType::TShaderProgramIDPointer:
799             return ResourceIDType::ShaderProgram;
800         case ParamType::TTextureID:
801             return ResourceIDType::Texture;
802         case ParamType::TTextureIDConstPointer:
803             return ResourceIDType::Texture;
804         case ParamType::TTextureIDPointer:
805             return ResourceIDType::Texture;
806         case ParamType::TTransformFeedbackID:
807             return ResourceIDType::TransformFeedback;
808         case ParamType::TTransformFeedbackIDConstPointer:
809             return ResourceIDType::TransformFeedback;
810         case ParamType::TTransformFeedbackIDPointer:
811             return ResourceIDType::TransformFeedback;
812         case ParamType::TVertexArrayID:
813             return ResourceIDType::VertexArray;
814         case ParamType::TVertexArrayIDConstPointer:
815             return ResourceIDType::VertexArray;
816         case ParamType::TVertexArrayIDPointer:
817             return ResourceIDType::VertexArray;
818         default:
819             return ResourceIDType::InvalidEnum;
820     }
821 }
822 
GetResourceIDTypeName(ResourceIDType resourceIDType)823 const char *GetResourceIDTypeName(ResourceIDType resourceIDType)
824 {
825     switch (resourceIDType)
826     {
827         case ResourceIDType::Buffer:
828             return "Buffer";
829         case ResourceIDType::FenceNV:
830             return "FenceNV";
831         case ResourceIDType::Framebuffer:
832             return "Framebuffer";
833         case ResourceIDType::MemoryObject:
834             return "MemoryObject";
835         case ResourceIDType::ProgramPipeline:
836             return "ProgramPipeline";
837         case ResourceIDType::Query:
838             return "Query";
839         case ResourceIDType::Renderbuffer:
840             return "Renderbuffer";
841         case ResourceIDType::Sampler:
842             return "Sampler";
843         case ResourceIDType::Semaphore:
844             return "Semaphore";
845         case ResourceIDType::ShaderProgram:
846             return "ShaderProgram";
847         case ResourceIDType::Texture:
848             return "Texture";
849         case ResourceIDType::TransformFeedback:
850             return "TransformFeedback";
851         case ResourceIDType::VertexArray:
852             return "VertexArray";
853         default:
854             UNREACHABLE();
855             return "GetResourceIDTypeName error";
856     }
857 }
858 }  // namespace angle
859