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