• 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.h:
9 //   ANGLE Frame capture types and helper functions.
10 
11 #ifndef LIBANGLE_FRAME_CAPTURE_UTILS_AUTOGEN_H_
12 #define LIBANGLE_FRAME_CAPTURE_UTILS_AUTOGEN_H_
13 
14 #include "common/PackedEnums.h"
15 
16 namespace angle
17 {
18 enum class ParamType
19 {
20     TAlphaTestFunc,
21     TBufferBinding,
22     TBufferID,
23     TBufferIDConstPointer,
24     TBufferIDPointer,
25     TBufferUsage,
26     TClientVertexArrayType,
27     TCullFaceMode,
28     TDrawElementsType,
29     TFenceNVID,
30     TFenceNVIDConstPointer,
31     TFenceNVIDPointer,
32     TFramebufferID,
33     TFramebufferIDConstPointer,
34     TFramebufferIDPointer,
35     TGLDEBUGPROC,
36     TGLDEBUGPROCKHR,
37     TGLbitfield,
38     TGLboolean,
39     TGLbooleanConstPointer,
40     TGLbooleanPointer,
41     TGLbyte,
42     TGLbyteConstPointer,
43     TGLcharConstPointer,
44     TGLcharConstPointerPointer,
45     TGLcharPointer,
46     TGLclampx,
47     TGLdouble,
48     TGLdoubleConstPointer,
49     TGLdoublePointer,
50     TGLeglClientBufferEXT,
51     TGLeglImageOES,
52     TGLenum,
53     TGLenumConstPointer,
54     TGLenumPointer,
55     TGLfixed,
56     TGLfixedConstPointer,
57     TGLfixedPointer,
58     TGLfloat,
59     TGLfloatConstPointer,
60     TGLfloatPointer,
61     TGLint,
62     TGLint64Pointer,
63     TGLintConstPointer,
64     TGLintPointer,
65     TGLintptr,
66     TGLintptrConstPointer,
67     TGLshort,
68     TGLshortConstPointer,
69     TGLsizei,
70     TGLsizeiConstPointer,
71     TGLsizeiPointer,
72     TGLsizeiptr,
73     TGLsizeiptrConstPointer,
74     TGLsync,
75     TGLubyte,
76     TGLubyteConstPointer,
77     TGLubytePointer,
78     TGLuint,
79     TGLuint64,
80     TGLuint64ConstPointer,
81     TGLuint64Pointer,
82     TGLuintConstPointer,
83     TGLuintPointer,
84     TGLushort,
85     TGLushortConstPointer,
86     TGLushortPointer,
87     TGLvoidConstPointer,
88     TGLvoidConstPointerPointer,
89     TGraphicsResetStatus,
90     THandleType,
91     TLightParameter,
92     TLogicalOperation,
93     TMaterialParameter,
94     TMatrixType,
95     TMemoryObjectID,
96     TMemoryObjectIDConstPointer,
97     TMemoryObjectIDPointer,
98     TPointParameter,
99     TPrimitiveMode,
100     TProgramPipelineID,
101     TProgramPipelineIDConstPointer,
102     TProgramPipelineIDPointer,
103     TProvokingVertexConvention,
104     TQueryID,
105     TQueryIDConstPointer,
106     TQueryIDPointer,
107     TQueryType,
108     TRenderbufferID,
109     TRenderbufferIDConstPointer,
110     TRenderbufferIDPointer,
111     TSamplerID,
112     TSamplerIDConstPointer,
113     TSamplerIDPointer,
114     TSemaphoreID,
115     TSemaphoreIDConstPointer,
116     TSemaphoreIDPointer,
117     TShaderProgramID,
118     TShaderProgramIDConstPointer,
119     TShaderProgramIDPointer,
120     TShaderType,
121     TShadingModel,
122     TTextureEnvParameter,
123     TTextureEnvTarget,
124     TTextureID,
125     TTextureIDConstPointer,
126     TTextureIDPointer,
127     TTextureTarget,
128     TTextureType,
129     TTransformFeedbackID,
130     TTransformFeedbackIDConstPointer,
131     TTransformFeedbackIDPointer,
132     TUniformBlockIndex,
133     TUniformLocation,
134     TVertexArrayID,
135     TVertexArrayIDConstPointer,
136     TVertexArrayIDPointer,
137     TVertexAttribType,
138     TvoidConstPointer,
139     TvoidConstPointerPointer,
140     TvoidPointer,
141     TvoidPointerPointer,
142 };
143 
144 constexpr uint32_t kParamTypeCount = 122;
145 
146 union ParamValue
147 {
148     gl::AlphaTestFunc AlphaTestFuncVal;
149     gl::BufferBinding BufferBindingVal;
150     gl::BufferID BufferIDVal;
151     const gl::BufferID *BufferIDConstPointerVal;
152     gl::BufferID *BufferIDPointerVal;
153     gl::BufferUsage BufferUsageVal;
154     gl::ClientVertexArrayType ClientVertexArrayTypeVal;
155     gl::CullFaceMode CullFaceModeVal;
156     gl::DrawElementsType DrawElementsTypeVal;
157     gl::FenceNVID FenceNVIDVal;
158     const gl::FenceNVID *FenceNVIDConstPointerVal;
159     gl::FenceNVID *FenceNVIDPointerVal;
160     gl::FramebufferID FramebufferIDVal;
161     const gl::FramebufferID *FramebufferIDConstPointerVal;
162     gl::FramebufferID *FramebufferIDPointerVal;
163     GLDEBUGPROC GLDEBUGPROCVal;
164     GLDEBUGPROCKHR GLDEBUGPROCKHRVal;
165     GLbitfield GLbitfieldVal;
166     GLboolean GLbooleanVal;
167     const GLboolean *GLbooleanConstPointerVal;
168     GLboolean *GLbooleanPointerVal;
169     GLbyte GLbyteVal;
170     const GLbyte *GLbyteConstPointerVal;
171     const GLchar *GLcharConstPointerVal;
172     const GLchar *const *GLcharConstPointerPointerVal;
173     GLchar *GLcharPointerVal;
174     GLclampx GLclampxVal;
175     GLdouble GLdoubleVal;
176     const GLdouble *GLdoubleConstPointerVal;
177     GLdouble *GLdoublePointerVal;
178     GLeglClientBufferEXT GLeglClientBufferEXTVal;
179     GLeglImageOES GLeglImageOESVal;
180     GLenum GLenumVal;
181     const GLenum *GLenumConstPointerVal;
182     GLenum *GLenumPointerVal;
183     GLfixed GLfixedVal;
184     const GLfixed *GLfixedConstPointerVal;
185     GLfixed *GLfixedPointerVal;
186     GLfloat GLfloatVal;
187     const GLfloat *GLfloatConstPointerVal;
188     GLfloat *GLfloatPointerVal;
189     GLint GLintVal;
190     GLint64 *GLint64PointerVal;
191     const GLint *GLintConstPointerVal;
192     GLint *GLintPointerVal;
193     GLintptr GLintptrVal;
194     const GLintptr *GLintptrConstPointerVal;
195     GLshort GLshortVal;
196     const GLshort *GLshortConstPointerVal;
197     GLsizei GLsizeiVal;
198     const GLsizei *GLsizeiConstPointerVal;
199     GLsizei *GLsizeiPointerVal;
200     GLsizeiptr GLsizeiptrVal;
201     const GLsizeiptr *GLsizeiptrConstPointerVal;
202     GLsync GLsyncVal;
203     GLubyte GLubyteVal;
204     const GLubyte *GLubyteConstPointerVal;
205     GLubyte *GLubytePointerVal;
206     GLuint GLuintVal;
207     GLuint64 GLuint64Val;
208     const GLuint64 *GLuint64ConstPointerVal;
209     GLuint64 *GLuint64PointerVal;
210     const GLuint *GLuintConstPointerVal;
211     GLuint *GLuintPointerVal;
212     GLushort GLushortVal;
213     const GLushort *GLushortConstPointerVal;
214     GLushort *GLushortPointerVal;
215     const GLvoid *GLvoidConstPointerVal;
216     const GLvoid *const *GLvoidConstPointerPointerVal;
217     gl::GraphicsResetStatus GraphicsResetStatusVal;
218     gl::HandleType HandleTypeVal;
219     gl::LightParameter LightParameterVal;
220     gl::LogicalOperation LogicalOperationVal;
221     gl::MaterialParameter MaterialParameterVal;
222     gl::MatrixType MatrixTypeVal;
223     gl::MemoryObjectID MemoryObjectIDVal;
224     const gl::MemoryObjectID *MemoryObjectIDConstPointerVal;
225     gl::MemoryObjectID *MemoryObjectIDPointerVal;
226     gl::PointParameter PointParameterVal;
227     gl::PrimitiveMode PrimitiveModeVal;
228     gl::ProgramPipelineID ProgramPipelineIDVal;
229     const gl::ProgramPipelineID *ProgramPipelineIDConstPointerVal;
230     gl::ProgramPipelineID *ProgramPipelineIDPointerVal;
231     gl::ProvokingVertexConvention ProvokingVertexConventionVal;
232     gl::QueryID QueryIDVal;
233     const gl::QueryID *QueryIDConstPointerVal;
234     gl::QueryID *QueryIDPointerVal;
235     gl::QueryType QueryTypeVal;
236     gl::RenderbufferID RenderbufferIDVal;
237     const gl::RenderbufferID *RenderbufferIDConstPointerVal;
238     gl::RenderbufferID *RenderbufferIDPointerVal;
239     gl::SamplerID SamplerIDVal;
240     const gl::SamplerID *SamplerIDConstPointerVal;
241     gl::SamplerID *SamplerIDPointerVal;
242     gl::SemaphoreID SemaphoreIDVal;
243     const gl::SemaphoreID *SemaphoreIDConstPointerVal;
244     gl::SemaphoreID *SemaphoreIDPointerVal;
245     gl::ShaderProgramID ShaderProgramIDVal;
246     const gl::ShaderProgramID *ShaderProgramIDConstPointerVal;
247     gl::ShaderProgramID *ShaderProgramIDPointerVal;
248     gl::ShaderType ShaderTypeVal;
249     gl::ShadingModel ShadingModelVal;
250     gl::TextureEnvParameter TextureEnvParameterVal;
251     gl::TextureEnvTarget TextureEnvTargetVal;
252     gl::TextureID TextureIDVal;
253     const gl::TextureID *TextureIDConstPointerVal;
254     gl::TextureID *TextureIDPointerVal;
255     gl::TextureTarget TextureTargetVal;
256     gl::TextureType TextureTypeVal;
257     gl::TransformFeedbackID TransformFeedbackIDVal;
258     const gl::TransformFeedbackID *TransformFeedbackIDConstPointerVal;
259     gl::TransformFeedbackID *TransformFeedbackIDPointerVal;
260     gl::UniformBlockIndex UniformBlockIndexVal;
261     gl::UniformLocation UniformLocationVal;
262     gl::VertexArrayID VertexArrayIDVal;
263     const gl::VertexArrayID *VertexArrayIDConstPointerVal;
264     gl::VertexArrayID *VertexArrayIDPointerVal;
265     gl::VertexAttribType VertexAttribTypeVal;
266     const void *voidConstPointerVal;
267     const void *const *voidConstPointerPointerVal;
268     void *voidPointerVal;
269     void **voidPointerPointerVal;
270 };
271 
272 template <ParamType PType, typename T>
273 T GetParamVal(const ParamValue &value);
274 
275 template <>
276 inline gl::AlphaTestFunc GetParamVal<ParamType::TAlphaTestFunc, gl::AlphaTestFunc>(
277     const ParamValue &value)
278 {
279     return value.AlphaTestFuncVal;
280 }
281 
282 template <>
283 inline gl::BufferBinding GetParamVal<ParamType::TBufferBinding, gl::BufferBinding>(
284     const ParamValue &value)
285 {
286     return value.BufferBindingVal;
287 }
288 
289 template <>
290 inline gl::BufferID GetParamVal<ParamType::TBufferID, gl::BufferID>(const ParamValue &value)
291 {
292     return value.BufferIDVal;
293 }
294 
295 template <>
296 inline const gl::BufferID *GetParamVal<ParamType::TBufferIDConstPointer, const gl::BufferID *>(
297     const ParamValue &value)
298 {
299     return value.BufferIDConstPointerVal;
300 }
301 
302 template <>
303 inline gl::BufferID *GetParamVal<ParamType::TBufferIDPointer, gl::BufferID *>(
304     const ParamValue &value)
305 {
306     return value.BufferIDPointerVal;
307 }
308 
309 template <>
310 inline gl::BufferUsage GetParamVal<ParamType::TBufferUsage, gl::BufferUsage>(
311     const ParamValue &value)
312 {
313     return value.BufferUsageVal;
314 }
315 
316 template <>
317 inline gl::ClientVertexArrayType
318 GetParamVal<ParamType::TClientVertexArrayType, gl::ClientVertexArrayType>(const ParamValue &value)
319 {
320     return value.ClientVertexArrayTypeVal;
321 }
322 
323 template <>
324 inline gl::CullFaceMode GetParamVal<ParamType::TCullFaceMode, gl::CullFaceMode>(
325     const ParamValue &value)
326 {
327     return value.CullFaceModeVal;
328 }
329 
330 template <>
331 inline gl::DrawElementsType GetParamVal<ParamType::TDrawElementsType, gl::DrawElementsType>(
332     const ParamValue &value)
333 {
334     return value.DrawElementsTypeVal;
335 }
336 
337 template <>
338 inline gl::FenceNVID GetParamVal<ParamType::TFenceNVID, gl::FenceNVID>(const ParamValue &value)
339 {
340     return value.FenceNVIDVal;
341 }
342 
343 template <>
344 inline const gl::FenceNVID *GetParamVal<ParamType::TFenceNVIDConstPointer, const gl::FenceNVID *>(
345     const ParamValue &value)
346 {
347     return value.FenceNVIDConstPointerVal;
348 }
349 
350 template <>
351 inline gl::FenceNVID *GetParamVal<ParamType::TFenceNVIDPointer, gl::FenceNVID *>(
352     const ParamValue &value)
353 {
354     return value.FenceNVIDPointerVal;
355 }
356 
357 template <>
358 inline gl::FramebufferID GetParamVal<ParamType::TFramebufferID, gl::FramebufferID>(
359     const ParamValue &value)
360 {
361     return value.FramebufferIDVal;
362 }
363 
364 template <>
365 inline const gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDConstPointer,
366                                             const gl::FramebufferID *>(const ParamValue &value)
367 {
368     return value.FramebufferIDConstPointerVal;
369 }
370 
371 template <>
372 inline gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDPointer, gl::FramebufferID *>(
373     const ParamValue &value)
374 {
375     return value.FramebufferIDPointerVal;
376 }
377 
378 template <>
379 inline GLDEBUGPROC GetParamVal<ParamType::TGLDEBUGPROC, GLDEBUGPROC>(const ParamValue &value)
380 {
381     return value.GLDEBUGPROCVal;
382 }
383 
384 template <>
385 inline GLDEBUGPROCKHR GetParamVal<ParamType::TGLDEBUGPROCKHR, GLDEBUGPROCKHR>(
386     const ParamValue &value)
387 {
388     return value.GLDEBUGPROCKHRVal;
389 }
390 
391 template <>
392 inline GLbitfield GetParamVal<ParamType::TGLbitfield, GLbitfield>(const ParamValue &value)
393 {
394     return value.GLbitfieldVal;
395 }
396 
397 template <>
398 inline GLboolean GetParamVal<ParamType::TGLboolean, GLboolean>(const ParamValue &value)
399 {
400     return value.GLbooleanVal;
401 }
402 
403 template <>
404 inline const GLboolean *GetParamVal<ParamType::TGLbooleanConstPointer, const GLboolean *>(
405     const ParamValue &value)
406 {
407     return value.GLbooleanConstPointerVal;
408 }
409 
410 template <>
411 inline GLboolean *GetParamVal<ParamType::TGLbooleanPointer, GLboolean *>(const ParamValue &value)
412 {
413     return value.GLbooleanPointerVal;
414 }
415 
416 template <>
417 inline GLbyte GetParamVal<ParamType::TGLbyte, GLbyte>(const ParamValue &value)
418 {
419     return value.GLbyteVal;
420 }
421 
422 template <>
423 inline const GLbyte *GetParamVal<ParamType::TGLbyteConstPointer, const GLbyte *>(
424     const ParamValue &value)
425 {
426     return value.GLbyteConstPointerVal;
427 }
428 
429 template <>
430 inline const GLchar *GetParamVal<ParamType::TGLcharConstPointer, const GLchar *>(
431     const ParamValue &value)
432 {
433     return value.GLcharConstPointerVal;
434 }
435 
436 template <>
437 inline const GLchar *const *
438 GetParamVal<ParamType::TGLcharConstPointerPointer, const GLchar *const *>(const ParamValue &value)
439 {
440     return value.GLcharConstPointerPointerVal;
441 }
442 
443 template <>
444 inline GLchar *GetParamVal<ParamType::TGLcharPointer, GLchar *>(const ParamValue &value)
445 {
446     return value.GLcharPointerVal;
447 }
448 
449 template <>
450 inline GLclampx GetParamVal<ParamType::TGLclampx, GLclampx>(const ParamValue &value)
451 {
452     return value.GLclampxVal;
453 }
454 
455 template <>
456 inline GLdouble GetParamVal<ParamType::TGLdouble, GLdouble>(const ParamValue &value)
457 {
458     return value.GLdoubleVal;
459 }
460 
461 template <>
462 inline const GLdouble *GetParamVal<ParamType::TGLdoubleConstPointer, const GLdouble *>(
463     const ParamValue &value)
464 {
465     return value.GLdoubleConstPointerVal;
466 }
467 
468 template <>
469 inline GLdouble *GetParamVal<ParamType::TGLdoublePointer, GLdouble *>(const ParamValue &value)
470 {
471     return value.GLdoublePointerVal;
472 }
473 
474 template <>
475 inline GLeglClientBufferEXT GetParamVal<ParamType::TGLeglClientBufferEXT, GLeglClientBufferEXT>(
476     const ParamValue &value)
477 {
478     return value.GLeglClientBufferEXTVal;
479 }
480 
481 template <>
482 inline GLeglImageOES GetParamVal<ParamType::TGLeglImageOES, GLeglImageOES>(const ParamValue &value)
483 {
484     return value.GLeglImageOESVal;
485 }
486 
487 template <>
488 inline GLenum GetParamVal<ParamType::TGLenum, GLenum>(const ParamValue &value)
489 {
490     return value.GLenumVal;
491 }
492 
493 template <>
494 inline const GLenum *GetParamVal<ParamType::TGLenumConstPointer, const GLenum *>(
495     const ParamValue &value)
496 {
497     return value.GLenumConstPointerVal;
498 }
499 
500 template <>
501 inline GLenum *GetParamVal<ParamType::TGLenumPointer, GLenum *>(const ParamValue &value)
502 {
503     return value.GLenumPointerVal;
504 }
505 
506 template <>
507 inline GLfixed GetParamVal<ParamType::TGLfixed, GLfixed>(const ParamValue &value)
508 {
509     return value.GLfixedVal;
510 }
511 
512 template <>
513 inline const GLfixed *GetParamVal<ParamType::TGLfixedConstPointer, const GLfixed *>(
514     const ParamValue &value)
515 {
516     return value.GLfixedConstPointerVal;
517 }
518 
519 template <>
520 inline GLfixed *GetParamVal<ParamType::TGLfixedPointer, GLfixed *>(const ParamValue &value)
521 {
522     return value.GLfixedPointerVal;
523 }
524 
525 template <>
526 inline GLfloat GetParamVal<ParamType::TGLfloat, GLfloat>(const ParamValue &value)
527 {
528     return value.GLfloatVal;
529 }
530 
531 template <>
532 inline const GLfloat *GetParamVal<ParamType::TGLfloatConstPointer, const GLfloat *>(
533     const ParamValue &value)
534 {
535     return value.GLfloatConstPointerVal;
536 }
537 
538 template <>
539 inline GLfloat *GetParamVal<ParamType::TGLfloatPointer, GLfloat *>(const ParamValue &value)
540 {
541     return value.GLfloatPointerVal;
542 }
543 
544 template <>
545 inline GLint GetParamVal<ParamType::TGLint, GLint>(const ParamValue &value)
546 {
547     return value.GLintVal;
548 }
549 
550 template <>
551 inline GLint64 *GetParamVal<ParamType::TGLint64Pointer, GLint64 *>(const ParamValue &value)
552 {
553     return value.GLint64PointerVal;
554 }
555 
556 template <>
557 inline const GLint *GetParamVal<ParamType::TGLintConstPointer, const GLint *>(
558     const ParamValue &value)
559 {
560     return value.GLintConstPointerVal;
561 }
562 
563 template <>
564 inline GLint *GetParamVal<ParamType::TGLintPointer, GLint *>(const ParamValue &value)
565 {
566     return value.GLintPointerVal;
567 }
568 
569 template <>
570 inline GLintptr GetParamVal<ParamType::TGLintptr, GLintptr>(const ParamValue &value)
571 {
572     return value.GLintptrVal;
573 }
574 
575 template <>
576 inline const GLintptr *GetParamVal<ParamType::TGLintptrConstPointer, const GLintptr *>(
577     const ParamValue &value)
578 {
579     return value.GLintptrConstPointerVal;
580 }
581 
582 template <>
583 inline GLshort GetParamVal<ParamType::TGLshort, GLshort>(const ParamValue &value)
584 {
585     return value.GLshortVal;
586 }
587 
588 template <>
589 inline const GLshort *GetParamVal<ParamType::TGLshortConstPointer, const GLshort *>(
590     const ParamValue &value)
591 {
592     return value.GLshortConstPointerVal;
593 }
594 
595 template <>
596 inline GLsizei GetParamVal<ParamType::TGLsizei, GLsizei>(const ParamValue &value)
597 {
598     return value.GLsizeiVal;
599 }
600 
601 template <>
602 inline const GLsizei *GetParamVal<ParamType::TGLsizeiConstPointer, const GLsizei *>(
603     const ParamValue &value)
604 {
605     return value.GLsizeiConstPointerVal;
606 }
607 
608 template <>
609 inline GLsizei *GetParamVal<ParamType::TGLsizeiPointer, GLsizei *>(const ParamValue &value)
610 {
611     return value.GLsizeiPointerVal;
612 }
613 
614 template <>
615 inline GLsizeiptr GetParamVal<ParamType::TGLsizeiptr, GLsizeiptr>(const ParamValue &value)
616 {
617     return value.GLsizeiptrVal;
618 }
619 
620 template <>
621 inline const GLsizeiptr *GetParamVal<ParamType::TGLsizeiptrConstPointer, const GLsizeiptr *>(
622     const ParamValue &value)
623 {
624     return value.GLsizeiptrConstPointerVal;
625 }
626 
627 template <>
628 inline GLsync GetParamVal<ParamType::TGLsync, GLsync>(const ParamValue &value)
629 {
630     return value.GLsyncVal;
631 }
632 
633 template <>
634 inline GLubyte GetParamVal<ParamType::TGLubyte, GLubyte>(const ParamValue &value)
635 {
636     return value.GLubyteVal;
637 }
638 
639 template <>
640 inline const GLubyte *GetParamVal<ParamType::TGLubyteConstPointer, const GLubyte *>(
641     const ParamValue &value)
642 {
643     return value.GLubyteConstPointerVal;
644 }
645 
646 template <>
647 inline GLubyte *GetParamVal<ParamType::TGLubytePointer, GLubyte *>(const ParamValue &value)
648 {
649     return value.GLubytePointerVal;
650 }
651 
652 template <>
653 inline GLuint GetParamVal<ParamType::TGLuint, GLuint>(const ParamValue &value)
654 {
655     return value.GLuintVal;
656 }
657 
658 template <>
659 inline GLuint64 GetParamVal<ParamType::TGLuint64, GLuint64>(const ParamValue &value)
660 {
661     return value.GLuint64Val;
662 }
663 
664 template <>
665 inline const GLuint64 *GetParamVal<ParamType::TGLuint64ConstPointer, const GLuint64 *>(
666     const ParamValue &value)
667 {
668     return value.GLuint64ConstPointerVal;
669 }
670 
671 template <>
672 inline GLuint64 *GetParamVal<ParamType::TGLuint64Pointer, GLuint64 *>(const ParamValue &value)
673 {
674     return value.GLuint64PointerVal;
675 }
676 
677 template <>
678 inline const GLuint *GetParamVal<ParamType::TGLuintConstPointer, const GLuint *>(
679     const ParamValue &value)
680 {
681     return value.GLuintConstPointerVal;
682 }
683 
684 template <>
685 inline GLuint *GetParamVal<ParamType::TGLuintPointer, GLuint *>(const ParamValue &value)
686 {
687     return value.GLuintPointerVal;
688 }
689 
690 template <>
691 inline GLushort GetParamVal<ParamType::TGLushort, GLushort>(const ParamValue &value)
692 {
693     return value.GLushortVal;
694 }
695 
696 template <>
697 inline const GLushort *GetParamVal<ParamType::TGLushortConstPointer, const GLushort *>(
698     const ParamValue &value)
699 {
700     return value.GLushortConstPointerVal;
701 }
702 
703 template <>
704 inline GLushort *GetParamVal<ParamType::TGLushortPointer, GLushort *>(const ParamValue &value)
705 {
706     return value.GLushortPointerVal;
707 }
708 
709 template <>
710 inline const GLvoid *GetParamVal<ParamType::TGLvoidConstPointer, const GLvoid *>(
711     const ParamValue &value)
712 {
713     return value.GLvoidConstPointerVal;
714 }
715 
716 template <>
717 inline const GLvoid *const *
718 GetParamVal<ParamType::TGLvoidConstPointerPointer, const GLvoid *const *>(const ParamValue &value)
719 {
720     return value.GLvoidConstPointerPointerVal;
721 }
722 
723 template <>
724 inline gl::GraphicsResetStatus
725 GetParamVal<ParamType::TGraphicsResetStatus, gl::GraphicsResetStatus>(const ParamValue &value)
726 {
727     return value.GraphicsResetStatusVal;
728 }
729 
730 template <>
731 inline gl::HandleType GetParamVal<ParamType::THandleType, gl::HandleType>(const ParamValue &value)
732 {
733     return value.HandleTypeVal;
734 }
735 
736 template <>
737 inline gl::LightParameter GetParamVal<ParamType::TLightParameter, gl::LightParameter>(
738     const ParamValue &value)
739 {
740     return value.LightParameterVal;
741 }
742 
743 template <>
744 inline gl::LogicalOperation GetParamVal<ParamType::TLogicalOperation, gl::LogicalOperation>(
745     const ParamValue &value)
746 {
747     return value.LogicalOperationVal;
748 }
749 
750 template <>
751 inline gl::MaterialParameter GetParamVal<ParamType::TMaterialParameter, gl::MaterialParameter>(
752     const ParamValue &value)
753 {
754     return value.MaterialParameterVal;
755 }
756 
757 template <>
758 inline gl::MatrixType GetParamVal<ParamType::TMatrixType, gl::MatrixType>(const ParamValue &value)
759 {
760     return value.MatrixTypeVal;
761 }
762 
763 template <>
764 inline gl::MemoryObjectID GetParamVal<ParamType::TMemoryObjectID, gl::MemoryObjectID>(
765     const ParamValue &value)
766 {
767     return value.MemoryObjectIDVal;
768 }
769 
770 template <>
771 inline const gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDConstPointer,
772                                              const gl::MemoryObjectID *>(const ParamValue &value)
773 {
774     return value.MemoryObjectIDConstPointerVal;
775 }
776 
777 template <>
778 inline gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDPointer, gl::MemoryObjectID *>(
779     const ParamValue &value)
780 {
781     return value.MemoryObjectIDPointerVal;
782 }
783 
784 template <>
785 inline gl::PointParameter GetParamVal<ParamType::TPointParameter, gl::PointParameter>(
786     const ParamValue &value)
787 {
788     return value.PointParameterVal;
789 }
790 
791 template <>
792 inline gl::PrimitiveMode GetParamVal<ParamType::TPrimitiveMode, gl::PrimitiveMode>(
793     const ParamValue &value)
794 {
795     return value.PrimitiveModeVal;
796 }
797 
798 template <>
799 inline gl::ProgramPipelineID GetParamVal<ParamType::TProgramPipelineID, gl::ProgramPipelineID>(
800     const ParamValue &value)
801 {
802     return value.ProgramPipelineIDVal;
803 }
804 
805 template <>
806 inline const gl::ProgramPipelineID *
807 GetParamVal<ParamType::TProgramPipelineIDConstPointer, const gl::ProgramPipelineID *>(
808     const ParamValue &value)
809 {
810     return value.ProgramPipelineIDConstPointerVal;
811 }
812 
813 template <>
814 inline gl::ProgramPipelineID *
815 GetParamVal<ParamType::TProgramPipelineIDPointer, gl::ProgramPipelineID *>(const ParamValue &value)
816 {
817     return value.ProgramPipelineIDPointerVal;
818 }
819 
820 template <>
821 inline gl::ProvokingVertexConvention
822 GetParamVal<ParamType::TProvokingVertexConvention, gl::ProvokingVertexConvention>(
823     const ParamValue &value)
824 {
825     return value.ProvokingVertexConventionVal;
826 }
827 
828 template <>
829 inline gl::QueryID GetParamVal<ParamType::TQueryID, gl::QueryID>(const ParamValue &value)
830 {
831     return value.QueryIDVal;
832 }
833 
834 template <>
835 inline const gl::QueryID *GetParamVal<ParamType::TQueryIDConstPointer, const gl::QueryID *>(
836     const ParamValue &value)
837 {
838     return value.QueryIDConstPointerVal;
839 }
840 
841 template <>
842 inline gl::QueryID *GetParamVal<ParamType::TQueryIDPointer, gl::QueryID *>(const ParamValue &value)
843 {
844     return value.QueryIDPointerVal;
845 }
846 
847 template <>
848 inline gl::QueryType GetParamVal<ParamType::TQueryType, gl::QueryType>(const ParamValue &value)
849 {
850     return value.QueryTypeVal;
851 }
852 
853 template <>
854 inline gl::RenderbufferID GetParamVal<ParamType::TRenderbufferID, gl::RenderbufferID>(
855     const ParamValue &value)
856 {
857     return value.RenderbufferIDVal;
858 }
859 
860 template <>
861 inline const gl::RenderbufferID *GetParamVal<ParamType::TRenderbufferIDConstPointer,
862                                              const gl::RenderbufferID *>(const ParamValue &value)
863 {
864     return value.RenderbufferIDConstPointerVal;
865 }
866 
867 template <>
868 inline gl::RenderbufferID *GetParamVal<ParamType::TRenderbufferIDPointer, gl::RenderbufferID *>(
869     const ParamValue &value)
870 {
871     return value.RenderbufferIDPointerVal;
872 }
873 
874 template <>
875 inline gl::SamplerID GetParamVal<ParamType::TSamplerID, gl::SamplerID>(const ParamValue &value)
876 {
877     return value.SamplerIDVal;
878 }
879 
880 template <>
881 inline const gl::SamplerID *GetParamVal<ParamType::TSamplerIDConstPointer, const gl::SamplerID *>(
882     const ParamValue &value)
883 {
884     return value.SamplerIDConstPointerVal;
885 }
886 
887 template <>
888 inline gl::SamplerID *GetParamVal<ParamType::TSamplerIDPointer, gl::SamplerID *>(
889     const ParamValue &value)
890 {
891     return value.SamplerIDPointerVal;
892 }
893 
894 template <>
895 inline gl::SemaphoreID GetParamVal<ParamType::TSemaphoreID, gl::SemaphoreID>(
896     const ParamValue &value)
897 {
898     return value.SemaphoreIDVal;
899 }
900 
901 template <>
902 inline const gl::SemaphoreID *
903 GetParamVal<ParamType::TSemaphoreIDConstPointer, const gl::SemaphoreID *>(const ParamValue &value)
904 {
905     return value.SemaphoreIDConstPointerVal;
906 }
907 
908 template <>
909 inline gl::SemaphoreID *GetParamVal<ParamType::TSemaphoreIDPointer, gl::SemaphoreID *>(
910     const ParamValue &value)
911 {
912     return value.SemaphoreIDPointerVal;
913 }
914 
915 template <>
916 inline gl::ShaderProgramID GetParamVal<ParamType::TShaderProgramID, gl::ShaderProgramID>(
917     const ParamValue &value)
918 {
919     return value.ShaderProgramIDVal;
920 }
921 
922 template <>
923 inline const gl::ShaderProgramID *GetParamVal<ParamType::TShaderProgramIDConstPointer,
924                                               const gl::ShaderProgramID *>(const ParamValue &value)
925 {
926     return value.ShaderProgramIDConstPointerVal;
927 }
928 
929 template <>
930 inline gl::ShaderProgramID *GetParamVal<ParamType::TShaderProgramIDPointer, gl::ShaderProgramID *>(
931     const ParamValue &value)
932 {
933     return value.ShaderProgramIDPointerVal;
934 }
935 
936 template <>
937 inline gl::ShaderType GetParamVal<ParamType::TShaderType, gl::ShaderType>(const ParamValue &value)
938 {
939     return value.ShaderTypeVal;
940 }
941 
942 template <>
943 inline gl::ShadingModel GetParamVal<ParamType::TShadingModel, gl::ShadingModel>(
944     const ParamValue &value)
945 {
946     return value.ShadingModelVal;
947 }
948 
949 template <>
950 inline gl::TextureEnvParameter
951 GetParamVal<ParamType::TTextureEnvParameter, gl::TextureEnvParameter>(const ParamValue &value)
952 {
953     return value.TextureEnvParameterVal;
954 }
955 
956 template <>
957 inline gl::TextureEnvTarget GetParamVal<ParamType::TTextureEnvTarget, gl::TextureEnvTarget>(
958     const ParamValue &value)
959 {
960     return value.TextureEnvTargetVal;
961 }
962 
963 template <>
964 inline gl::TextureID GetParamVal<ParamType::TTextureID, gl::TextureID>(const ParamValue &value)
965 {
966     return value.TextureIDVal;
967 }
968 
969 template <>
970 inline const gl::TextureID *GetParamVal<ParamType::TTextureIDConstPointer, const gl::TextureID *>(
971     const ParamValue &value)
972 {
973     return value.TextureIDConstPointerVal;
974 }
975 
976 template <>
977 inline gl::TextureID *GetParamVal<ParamType::TTextureIDPointer, gl::TextureID *>(
978     const ParamValue &value)
979 {
980     return value.TextureIDPointerVal;
981 }
982 
983 template <>
984 inline gl::TextureTarget GetParamVal<ParamType::TTextureTarget, gl::TextureTarget>(
985     const ParamValue &value)
986 {
987     return value.TextureTargetVal;
988 }
989 
990 template <>
991 inline gl::TextureType GetParamVal<ParamType::TTextureType, gl::TextureType>(
992     const ParamValue &value)
993 {
994     return value.TextureTypeVal;
995 }
996 
997 template <>
998 inline gl::TransformFeedbackID
999 GetParamVal<ParamType::TTransformFeedbackID, gl::TransformFeedbackID>(const ParamValue &value)
1000 {
1001     return value.TransformFeedbackIDVal;
1002 }
1003 
1004 template <>
1005 inline const gl::TransformFeedbackID *
1006 GetParamVal<ParamType::TTransformFeedbackIDConstPointer, const gl::TransformFeedbackID *>(
1007     const ParamValue &value)
1008 {
1009     return value.TransformFeedbackIDConstPointerVal;
1010 }
1011 
1012 template <>
1013 inline gl::TransformFeedbackID *GetParamVal<ParamType::TTransformFeedbackIDPointer,
1014                                             gl::TransformFeedbackID *>(const ParamValue &value)
1015 {
1016     return value.TransformFeedbackIDPointerVal;
1017 }
1018 
1019 template <>
1020 inline gl::UniformBlockIndex GetParamVal<ParamType::TUniformBlockIndex, gl::UniformBlockIndex>(
1021     const ParamValue &value)
1022 {
1023     return value.UniformBlockIndexVal;
1024 }
1025 
1026 template <>
1027 inline gl::UniformLocation GetParamVal<ParamType::TUniformLocation, gl::UniformLocation>(
1028     const ParamValue &value)
1029 {
1030     return value.UniformLocationVal;
1031 }
1032 
1033 template <>
1034 inline gl::VertexArrayID GetParamVal<ParamType::TVertexArrayID, gl::VertexArrayID>(
1035     const ParamValue &value)
1036 {
1037     return value.VertexArrayIDVal;
1038 }
1039 
1040 template <>
1041 inline const gl::VertexArrayID *GetParamVal<ParamType::TVertexArrayIDConstPointer,
1042                                             const gl::VertexArrayID *>(const ParamValue &value)
1043 {
1044     return value.VertexArrayIDConstPointerVal;
1045 }
1046 
1047 template <>
1048 inline gl::VertexArrayID *GetParamVal<ParamType::TVertexArrayIDPointer, gl::VertexArrayID *>(
1049     const ParamValue &value)
1050 {
1051     return value.VertexArrayIDPointerVal;
1052 }
1053 
1054 template <>
1055 inline gl::VertexAttribType GetParamVal<ParamType::TVertexAttribType, gl::VertexAttribType>(
1056     const ParamValue &value)
1057 {
1058     return value.VertexAttribTypeVal;
1059 }
1060 
1061 template <>
1062 inline const void *GetParamVal<ParamType::TvoidConstPointer, const void *>(const ParamValue &value)
1063 {
1064     return value.voidConstPointerVal;
1065 }
1066 
1067 template <>
1068 inline const void *const *GetParamVal<ParamType::TvoidConstPointerPointer, const void *const *>(
1069     const ParamValue &value)
1070 {
1071     return value.voidConstPointerPointerVal;
1072 }
1073 
1074 template <>
1075 inline void *GetParamVal<ParamType::TvoidPointer, void *>(const ParamValue &value)
1076 {
1077     return value.voidPointerVal;
1078 }
1079 
1080 template <>
1081 inline void **GetParamVal<ParamType::TvoidPointerPointer, void **>(const ParamValue &value)
1082 {
1083     return value.voidPointerPointerVal;
1084 }
1085 
1086 template <ParamType PType, typename T>
GetParamVal(const ParamValue & value)1087 T GetParamVal(const ParamValue &value)
1088 {
1089     UNREACHABLE();
1090     return T();
1091 }
1092 
1093 template <typename T>
AccessParamValue(ParamType paramType,const ParamValue & value)1094 T AccessParamValue(ParamType paramType, const ParamValue &value)
1095 {
1096     switch (paramType)
1097     {
1098         case ParamType::TAlphaTestFunc:
1099             return GetParamVal<ParamType::TAlphaTestFunc, T>(value);
1100         case ParamType::TBufferBinding:
1101             return GetParamVal<ParamType::TBufferBinding, T>(value);
1102         case ParamType::TBufferID:
1103             return GetParamVal<ParamType::TBufferID, T>(value);
1104         case ParamType::TBufferIDConstPointer:
1105             return GetParamVal<ParamType::TBufferIDConstPointer, T>(value);
1106         case ParamType::TBufferIDPointer:
1107             return GetParamVal<ParamType::TBufferIDPointer, T>(value);
1108         case ParamType::TBufferUsage:
1109             return GetParamVal<ParamType::TBufferUsage, T>(value);
1110         case ParamType::TClientVertexArrayType:
1111             return GetParamVal<ParamType::TClientVertexArrayType, T>(value);
1112         case ParamType::TCullFaceMode:
1113             return GetParamVal<ParamType::TCullFaceMode, T>(value);
1114         case ParamType::TDrawElementsType:
1115             return GetParamVal<ParamType::TDrawElementsType, T>(value);
1116         case ParamType::TFenceNVID:
1117             return GetParamVal<ParamType::TFenceNVID, T>(value);
1118         case ParamType::TFenceNVIDConstPointer:
1119             return GetParamVal<ParamType::TFenceNVIDConstPointer, T>(value);
1120         case ParamType::TFenceNVIDPointer:
1121             return GetParamVal<ParamType::TFenceNVIDPointer, T>(value);
1122         case ParamType::TFramebufferID:
1123             return GetParamVal<ParamType::TFramebufferID, T>(value);
1124         case ParamType::TFramebufferIDConstPointer:
1125             return GetParamVal<ParamType::TFramebufferIDConstPointer, T>(value);
1126         case ParamType::TFramebufferIDPointer:
1127             return GetParamVal<ParamType::TFramebufferIDPointer, T>(value);
1128         case ParamType::TGLDEBUGPROC:
1129             return GetParamVal<ParamType::TGLDEBUGPROC, T>(value);
1130         case ParamType::TGLDEBUGPROCKHR:
1131             return GetParamVal<ParamType::TGLDEBUGPROCKHR, T>(value);
1132         case ParamType::TGLbitfield:
1133             return GetParamVal<ParamType::TGLbitfield, T>(value);
1134         case ParamType::TGLboolean:
1135             return GetParamVal<ParamType::TGLboolean, T>(value);
1136         case ParamType::TGLbooleanConstPointer:
1137             return GetParamVal<ParamType::TGLbooleanConstPointer, T>(value);
1138         case ParamType::TGLbooleanPointer:
1139             return GetParamVal<ParamType::TGLbooleanPointer, T>(value);
1140         case ParamType::TGLbyte:
1141             return GetParamVal<ParamType::TGLbyte, T>(value);
1142         case ParamType::TGLbyteConstPointer:
1143             return GetParamVal<ParamType::TGLbyteConstPointer, T>(value);
1144         case ParamType::TGLcharConstPointer:
1145             return GetParamVal<ParamType::TGLcharConstPointer, T>(value);
1146         case ParamType::TGLcharConstPointerPointer:
1147             return GetParamVal<ParamType::TGLcharConstPointerPointer, T>(value);
1148         case ParamType::TGLcharPointer:
1149             return GetParamVal<ParamType::TGLcharPointer, T>(value);
1150         case ParamType::TGLclampx:
1151             return GetParamVal<ParamType::TGLclampx, T>(value);
1152         case ParamType::TGLdouble:
1153             return GetParamVal<ParamType::TGLdouble, T>(value);
1154         case ParamType::TGLdoubleConstPointer:
1155             return GetParamVal<ParamType::TGLdoubleConstPointer, T>(value);
1156         case ParamType::TGLdoublePointer:
1157             return GetParamVal<ParamType::TGLdoublePointer, T>(value);
1158         case ParamType::TGLeglClientBufferEXT:
1159             return GetParamVal<ParamType::TGLeglClientBufferEXT, T>(value);
1160         case ParamType::TGLeglImageOES:
1161             return GetParamVal<ParamType::TGLeglImageOES, T>(value);
1162         case ParamType::TGLenum:
1163             return GetParamVal<ParamType::TGLenum, T>(value);
1164         case ParamType::TGLenumConstPointer:
1165             return GetParamVal<ParamType::TGLenumConstPointer, T>(value);
1166         case ParamType::TGLenumPointer:
1167             return GetParamVal<ParamType::TGLenumPointer, T>(value);
1168         case ParamType::TGLfixed:
1169             return GetParamVal<ParamType::TGLfixed, T>(value);
1170         case ParamType::TGLfixedConstPointer:
1171             return GetParamVal<ParamType::TGLfixedConstPointer, T>(value);
1172         case ParamType::TGLfixedPointer:
1173             return GetParamVal<ParamType::TGLfixedPointer, T>(value);
1174         case ParamType::TGLfloat:
1175             return GetParamVal<ParamType::TGLfloat, T>(value);
1176         case ParamType::TGLfloatConstPointer:
1177             return GetParamVal<ParamType::TGLfloatConstPointer, T>(value);
1178         case ParamType::TGLfloatPointer:
1179             return GetParamVal<ParamType::TGLfloatPointer, T>(value);
1180         case ParamType::TGLint:
1181             return GetParamVal<ParamType::TGLint, T>(value);
1182         case ParamType::TGLint64Pointer:
1183             return GetParamVal<ParamType::TGLint64Pointer, T>(value);
1184         case ParamType::TGLintConstPointer:
1185             return GetParamVal<ParamType::TGLintConstPointer, T>(value);
1186         case ParamType::TGLintPointer:
1187             return GetParamVal<ParamType::TGLintPointer, T>(value);
1188         case ParamType::TGLintptr:
1189             return GetParamVal<ParamType::TGLintptr, T>(value);
1190         case ParamType::TGLintptrConstPointer:
1191             return GetParamVal<ParamType::TGLintptrConstPointer, T>(value);
1192         case ParamType::TGLshort:
1193             return GetParamVal<ParamType::TGLshort, T>(value);
1194         case ParamType::TGLshortConstPointer:
1195             return GetParamVal<ParamType::TGLshortConstPointer, T>(value);
1196         case ParamType::TGLsizei:
1197             return GetParamVal<ParamType::TGLsizei, T>(value);
1198         case ParamType::TGLsizeiConstPointer:
1199             return GetParamVal<ParamType::TGLsizeiConstPointer, T>(value);
1200         case ParamType::TGLsizeiPointer:
1201             return GetParamVal<ParamType::TGLsizeiPointer, T>(value);
1202         case ParamType::TGLsizeiptr:
1203             return GetParamVal<ParamType::TGLsizeiptr, T>(value);
1204         case ParamType::TGLsizeiptrConstPointer:
1205             return GetParamVal<ParamType::TGLsizeiptrConstPointer, T>(value);
1206         case ParamType::TGLsync:
1207             return GetParamVal<ParamType::TGLsync, T>(value);
1208         case ParamType::TGLubyte:
1209             return GetParamVal<ParamType::TGLubyte, T>(value);
1210         case ParamType::TGLubyteConstPointer:
1211             return GetParamVal<ParamType::TGLubyteConstPointer, T>(value);
1212         case ParamType::TGLubytePointer:
1213             return GetParamVal<ParamType::TGLubytePointer, T>(value);
1214         case ParamType::TGLuint:
1215             return GetParamVal<ParamType::TGLuint, T>(value);
1216         case ParamType::TGLuint64:
1217             return GetParamVal<ParamType::TGLuint64, T>(value);
1218         case ParamType::TGLuint64ConstPointer:
1219             return GetParamVal<ParamType::TGLuint64ConstPointer, T>(value);
1220         case ParamType::TGLuint64Pointer:
1221             return GetParamVal<ParamType::TGLuint64Pointer, T>(value);
1222         case ParamType::TGLuintConstPointer:
1223             return GetParamVal<ParamType::TGLuintConstPointer, T>(value);
1224         case ParamType::TGLuintPointer:
1225             return GetParamVal<ParamType::TGLuintPointer, T>(value);
1226         case ParamType::TGLushort:
1227             return GetParamVal<ParamType::TGLushort, T>(value);
1228         case ParamType::TGLushortConstPointer:
1229             return GetParamVal<ParamType::TGLushortConstPointer, T>(value);
1230         case ParamType::TGLushortPointer:
1231             return GetParamVal<ParamType::TGLushortPointer, T>(value);
1232         case ParamType::TGLvoidConstPointer:
1233             return GetParamVal<ParamType::TGLvoidConstPointer, T>(value);
1234         case ParamType::TGLvoidConstPointerPointer:
1235             return GetParamVal<ParamType::TGLvoidConstPointerPointer, T>(value);
1236         case ParamType::TGraphicsResetStatus:
1237             return GetParamVal<ParamType::TGraphicsResetStatus, T>(value);
1238         case ParamType::THandleType:
1239             return GetParamVal<ParamType::THandleType, T>(value);
1240         case ParamType::TLightParameter:
1241             return GetParamVal<ParamType::TLightParameter, T>(value);
1242         case ParamType::TLogicalOperation:
1243             return GetParamVal<ParamType::TLogicalOperation, T>(value);
1244         case ParamType::TMaterialParameter:
1245             return GetParamVal<ParamType::TMaterialParameter, T>(value);
1246         case ParamType::TMatrixType:
1247             return GetParamVal<ParamType::TMatrixType, T>(value);
1248         case ParamType::TMemoryObjectID:
1249             return GetParamVal<ParamType::TMemoryObjectID, T>(value);
1250         case ParamType::TMemoryObjectIDConstPointer:
1251             return GetParamVal<ParamType::TMemoryObjectIDConstPointer, T>(value);
1252         case ParamType::TMemoryObjectIDPointer:
1253             return GetParamVal<ParamType::TMemoryObjectIDPointer, T>(value);
1254         case ParamType::TPointParameter:
1255             return GetParamVal<ParamType::TPointParameter, T>(value);
1256         case ParamType::TPrimitiveMode:
1257             return GetParamVal<ParamType::TPrimitiveMode, T>(value);
1258         case ParamType::TProgramPipelineID:
1259             return GetParamVal<ParamType::TProgramPipelineID, T>(value);
1260         case ParamType::TProgramPipelineIDConstPointer:
1261             return GetParamVal<ParamType::TProgramPipelineIDConstPointer, T>(value);
1262         case ParamType::TProgramPipelineIDPointer:
1263             return GetParamVal<ParamType::TProgramPipelineIDPointer, T>(value);
1264         case ParamType::TProvokingVertexConvention:
1265             return GetParamVal<ParamType::TProvokingVertexConvention, T>(value);
1266         case ParamType::TQueryID:
1267             return GetParamVal<ParamType::TQueryID, T>(value);
1268         case ParamType::TQueryIDConstPointer:
1269             return GetParamVal<ParamType::TQueryIDConstPointer, T>(value);
1270         case ParamType::TQueryIDPointer:
1271             return GetParamVal<ParamType::TQueryIDPointer, T>(value);
1272         case ParamType::TQueryType:
1273             return GetParamVal<ParamType::TQueryType, T>(value);
1274         case ParamType::TRenderbufferID:
1275             return GetParamVal<ParamType::TRenderbufferID, T>(value);
1276         case ParamType::TRenderbufferIDConstPointer:
1277             return GetParamVal<ParamType::TRenderbufferIDConstPointer, T>(value);
1278         case ParamType::TRenderbufferIDPointer:
1279             return GetParamVal<ParamType::TRenderbufferIDPointer, T>(value);
1280         case ParamType::TSamplerID:
1281             return GetParamVal<ParamType::TSamplerID, T>(value);
1282         case ParamType::TSamplerIDConstPointer:
1283             return GetParamVal<ParamType::TSamplerIDConstPointer, T>(value);
1284         case ParamType::TSamplerIDPointer:
1285             return GetParamVal<ParamType::TSamplerIDPointer, T>(value);
1286         case ParamType::TSemaphoreID:
1287             return GetParamVal<ParamType::TSemaphoreID, T>(value);
1288         case ParamType::TSemaphoreIDConstPointer:
1289             return GetParamVal<ParamType::TSemaphoreIDConstPointer, T>(value);
1290         case ParamType::TSemaphoreIDPointer:
1291             return GetParamVal<ParamType::TSemaphoreIDPointer, T>(value);
1292         case ParamType::TShaderProgramID:
1293             return GetParamVal<ParamType::TShaderProgramID, T>(value);
1294         case ParamType::TShaderProgramIDConstPointer:
1295             return GetParamVal<ParamType::TShaderProgramIDConstPointer, T>(value);
1296         case ParamType::TShaderProgramIDPointer:
1297             return GetParamVal<ParamType::TShaderProgramIDPointer, T>(value);
1298         case ParamType::TShaderType:
1299             return GetParamVal<ParamType::TShaderType, T>(value);
1300         case ParamType::TShadingModel:
1301             return GetParamVal<ParamType::TShadingModel, T>(value);
1302         case ParamType::TTextureEnvParameter:
1303             return GetParamVal<ParamType::TTextureEnvParameter, T>(value);
1304         case ParamType::TTextureEnvTarget:
1305             return GetParamVal<ParamType::TTextureEnvTarget, T>(value);
1306         case ParamType::TTextureID:
1307             return GetParamVal<ParamType::TTextureID, T>(value);
1308         case ParamType::TTextureIDConstPointer:
1309             return GetParamVal<ParamType::TTextureIDConstPointer, T>(value);
1310         case ParamType::TTextureIDPointer:
1311             return GetParamVal<ParamType::TTextureIDPointer, T>(value);
1312         case ParamType::TTextureTarget:
1313             return GetParamVal<ParamType::TTextureTarget, T>(value);
1314         case ParamType::TTextureType:
1315             return GetParamVal<ParamType::TTextureType, T>(value);
1316         case ParamType::TTransformFeedbackID:
1317             return GetParamVal<ParamType::TTransformFeedbackID, T>(value);
1318         case ParamType::TTransformFeedbackIDConstPointer:
1319             return GetParamVal<ParamType::TTransformFeedbackIDConstPointer, T>(value);
1320         case ParamType::TTransformFeedbackIDPointer:
1321             return GetParamVal<ParamType::TTransformFeedbackIDPointer, T>(value);
1322         case ParamType::TUniformBlockIndex:
1323             return GetParamVal<ParamType::TUniformBlockIndex, T>(value);
1324         case ParamType::TUniformLocation:
1325             return GetParamVal<ParamType::TUniformLocation, T>(value);
1326         case ParamType::TVertexArrayID:
1327             return GetParamVal<ParamType::TVertexArrayID, T>(value);
1328         case ParamType::TVertexArrayIDConstPointer:
1329             return GetParamVal<ParamType::TVertexArrayIDConstPointer, T>(value);
1330         case ParamType::TVertexArrayIDPointer:
1331             return GetParamVal<ParamType::TVertexArrayIDPointer, T>(value);
1332         case ParamType::TVertexAttribType:
1333             return GetParamVal<ParamType::TVertexAttribType, T>(value);
1334         case ParamType::TvoidConstPointer:
1335             return GetParamVal<ParamType::TvoidConstPointer, T>(value);
1336         case ParamType::TvoidConstPointerPointer:
1337             return GetParamVal<ParamType::TvoidConstPointerPointer, T>(value);
1338         case ParamType::TvoidPointer:
1339             return GetParamVal<ParamType::TvoidPointer, T>(value);
1340         case ParamType::TvoidPointerPointer:
1341             return GetParamVal<ParamType::TvoidPointerPointer, T>(value);
1342     }
1343 }
1344 
1345 template <ParamType PType, typename T>
1346 void SetParamVal(T valueIn, ParamValue *valueOut);
1347 
1348 template <>
1349 inline void SetParamVal<ParamType::TAlphaTestFunc>(gl::AlphaTestFunc valueIn, ParamValue *valueOut)
1350 {
1351     valueOut->AlphaTestFuncVal = valueIn;
1352 }
1353 
1354 template <>
1355 inline void SetParamVal<ParamType::TBufferBinding>(gl::BufferBinding valueIn, ParamValue *valueOut)
1356 {
1357     valueOut->BufferBindingVal = valueIn;
1358 }
1359 
1360 template <>
1361 inline void SetParamVal<ParamType::TBufferID>(gl::BufferID valueIn, ParamValue *valueOut)
1362 {
1363     valueOut->BufferIDVal = valueIn;
1364 }
1365 
1366 template <>
1367 inline void SetParamVal<ParamType::TBufferIDConstPointer>(const gl::BufferID *valueIn,
1368                                                           ParamValue *valueOut)
1369 {
1370     valueOut->BufferIDConstPointerVal = valueIn;
1371 }
1372 
1373 template <>
1374 inline void SetParamVal<ParamType::TBufferIDPointer>(gl::BufferID *valueIn, ParamValue *valueOut)
1375 {
1376     valueOut->BufferIDPointerVal = valueIn;
1377 }
1378 
1379 template <>
1380 inline void SetParamVal<ParamType::TBufferUsage>(gl::BufferUsage valueIn, ParamValue *valueOut)
1381 {
1382     valueOut->BufferUsageVal = valueIn;
1383 }
1384 
1385 template <>
1386 inline void SetParamVal<ParamType::TClientVertexArrayType>(gl::ClientVertexArrayType valueIn,
1387                                                            ParamValue *valueOut)
1388 {
1389     valueOut->ClientVertexArrayTypeVal = valueIn;
1390 }
1391 
1392 template <>
1393 inline void SetParamVal<ParamType::TCullFaceMode>(gl::CullFaceMode valueIn, ParamValue *valueOut)
1394 {
1395     valueOut->CullFaceModeVal = valueIn;
1396 }
1397 
1398 template <>
1399 inline void SetParamVal<ParamType::TDrawElementsType>(gl::DrawElementsType valueIn,
1400                                                       ParamValue *valueOut)
1401 {
1402     valueOut->DrawElementsTypeVal = valueIn;
1403 }
1404 
1405 template <>
1406 inline void SetParamVal<ParamType::TFenceNVID>(gl::FenceNVID valueIn, ParamValue *valueOut)
1407 {
1408     valueOut->FenceNVIDVal = valueIn;
1409 }
1410 
1411 template <>
1412 inline void SetParamVal<ParamType::TFenceNVIDConstPointer>(const gl::FenceNVID *valueIn,
1413                                                            ParamValue *valueOut)
1414 {
1415     valueOut->FenceNVIDConstPointerVal = valueIn;
1416 }
1417 
1418 template <>
1419 inline void SetParamVal<ParamType::TFenceNVIDPointer>(gl::FenceNVID *valueIn, ParamValue *valueOut)
1420 {
1421     valueOut->FenceNVIDPointerVal = valueIn;
1422 }
1423 
1424 template <>
1425 inline void SetParamVal<ParamType::TFramebufferID>(gl::FramebufferID valueIn, ParamValue *valueOut)
1426 {
1427     valueOut->FramebufferIDVal = valueIn;
1428 }
1429 
1430 template <>
1431 inline void SetParamVal<ParamType::TFramebufferIDConstPointer>(const gl::FramebufferID *valueIn,
1432                                                                ParamValue *valueOut)
1433 {
1434     valueOut->FramebufferIDConstPointerVal = valueIn;
1435 }
1436 
1437 template <>
1438 inline void SetParamVal<ParamType::TFramebufferIDPointer>(gl::FramebufferID *valueIn,
1439                                                           ParamValue *valueOut)
1440 {
1441     valueOut->FramebufferIDPointerVal = valueIn;
1442 }
1443 
1444 template <>
1445 inline void SetParamVal<ParamType::TGLDEBUGPROC>(GLDEBUGPROC valueIn, ParamValue *valueOut)
1446 {
1447     valueOut->GLDEBUGPROCVal = valueIn;
1448 }
1449 
1450 template <>
1451 inline void SetParamVal<ParamType::TGLDEBUGPROCKHR>(GLDEBUGPROCKHR valueIn, ParamValue *valueOut)
1452 {
1453     valueOut->GLDEBUGPROCKHRVal = valueIn;
1454 }
1455 
1456 template <>
1457 inline void SetParamVal<ParamType::TGLbitfield>(GLbitfield valueIn, ParamValue *valueOut)
1458 {
1459     valueOut->GLbitfieldVal = valueIn;
1460 }
1461 
1462 template <>
1463 inline void SetParamVal<ParamType::TGLboolean>(GLboolean valueIn, ParamValue *valueOut)
1464 {
1465     valueOut->GLbooleanVal = valueIn;
1466 }
1467 
1468 template <>
1469 inline void SetParamVal<ParamType::TGLbooleanConstPointer>(const GLboolean *valueIn,
1470                                                            ParamValue *valueOut)
1471 {
1472     valueOut->GLbooleanConstPointerVal = valueIn;
1473 }
1474 
1475 template <>
1476 inline void SetParamVal<ParamType::TGLbooleanPointer>(GLboolean *valueIn, ParamValue *valueOut)
1477 {
1478     valueOut->GLbooleanPointerVal = valueIn;
1479 }
1480 
1481 template <>
1482 inline void SetParamVal<ParamType::TGLbyte>(GLbyte valueIn, ParamValue *valueOut)
1483 {
1484     valueOut->GLbyteVal = valueIn;
1485 }
1486 
1487 template <>
1488 inline void SetParamVal<ParamType::TGLbyteConstPointer>(const GLbyte *valueIn, ParamValue *valueOut)
1489 {
1490     valueOut->GLbyteConstPointerVal = valueIn;
1491 }
1492 
1493 template <>
1494 inline void SetParamVal<ParamType::TGLcharConstPointer>(const GLchar *valueIn, ParamValue *valueOut)
1495 {
1496     valueOut->GLcharConstPointerVal = valueIn;
1497 }
1498 
1499 template <>
1500 inline void SetParamVal<ParamType::TGLcharConstPointerPointer>(const GLchar *const *valueIn,
1501                                                                ParamValue *valueOut)
1502 {
1503     valueOut->GLcharConstPointerPointerVal = valueIn;
1504 }
1505 
1506 template <>
1507 inline void SetParamVal<ParamType::TGLcharPointer>(GLchar *valueIn, ParamValue *valueOut)
1508 {
1509     valueOut->GLcharPointerVal = valueIn;
1510 }
1511 
1512 template <>
1513 inline void SetParamVal<ParamType::TGLclampx>(GLclampx valueIn, ParamValue *valueOut)
1514 {
1515     valueOut->GLclampxVal = valueIn;
1516 }
1517 
1518 template <>
1519 inline void SetParamVal<ParamType::TGLdouble>(GLdouble valueIn, ParamValue *valueOut)
1520 {
1521     valueOut->GLdoubleVal = valueIn;
1522 }
1523 
1524 template <>
1525 inline void SetParamVal<ParamType::TGLdoubleConstPointer>(const GLdouble *valueIn,
1526                                                           ParamValue *valueOut)
1527 {
1528     valueOut->GLdoubleConstPointerVal = valueIn;
1529 }
1530 
1531 template <>
1532 inline void SetParamVal<ParamType::TGLdoublePointer>(GLdouble *valueIn, ParamValue *valueOut)
1533 {
1534     valueOut->GLdoublePointerVal = valueIn;
1535 }
1536 
1537 template <>
1538 inline void SetParamVal<ParamType::TGLeglClientBufferEXT>(GLeglClientBufferEXT valueIn,
1539                                                           ParamValue *valueOut)
1540 {
1541     valueOut->GLeglClientBufferEXTVal = valueIn;
1542 }
1543 
1544 template <>
1545 inline void SetParamVal<ParamType::TGLeglImageOES>(GLeglImageOES valueIn, ParamValue *valueOut)
1546 {
1547     valueOut->GLeglImageOESVal = valueIn;
1548 }
1549 
1550 template <>
1551 inline void SetParamVal<ParamType::TGLenum>(GLenum valueIn, ParamValue *valueOut)
1552 {
1553     valueOut->GLenumVal = valueIn;
1554 }
1555 
1556 template <>
1557 inline void SetParamVal<ParamType::TGLenumConstPointer>(const GLenum *valueIn, ParamValue *valueOut)
1558 {
1559     valueOut->GLenumConstPointerVal = valueIn;
1560 }
1561 
1562 template <>
1563 inline void SetParamVal<ParamType::TGLenumPointer>(GLenum *valueIn, ParamValue *valueOut)
1564 {
1565     valueOut->GLenumPointerVal = valueIn;
1566 }
1567 
1568 template <>
1569 inline void SetParamVal<ParamType::TGLfixed>(GLfixed valueIn, ParamValue *valueOut)
1570 {
1571     valueOut->GLfixedVal = valueIn;
1572 }
1573 
1574 template <>
1575 inline void SetParamVal<ParamType::TGLfixedConstPointer>(const GLfixed *valueIn,
1576                                                          ParamValue *valueOut)
1577 {
1578     valueOut->GLfixedConstPointerVal = valueIn;
1579 }
1580 
1581 template <>
1582 inline void SetParamVal<ParamType::TGLfixedPointer>(GLfixed *valueIn, ParamValue *valueOut)
1583 {
1584     valueOut->GLfixedPointerVal = valueIn;
1585 }
1586 
1587 template <>
1588 inline void SetParamVal<ParamType::TGLfloat>(GLfloat valueIn, ParamValue *valueOut)
1589 {
1590     valueOut->GLfloatVal = valueIn;
1591 }
1592 
1593 template <>
1594 inline void SetParamVal<ParamType::TGLfloatConstPointer>(const GLfloat *valueIn,
1595                                                          ParamValue *valueOut)
1596 {
1597     valueOut->GLfloatConstPointerVal = valueIn;
1598 }
1599 
1600 template <>
1601 inline void SetParamVal<ParamType::TGLfloatPointer>(GLfloat *valueIn, ParamValue *valueOut)
1602 {
1603     valueOut->GLfloatPointerVal = valueIn;
1604 }
1605 
1606 template <>
1607 inline void SetParamVal<ParamType::TGLint>(GLint valueIn, ParamValue *valueOut)
1608 {
1609     valueOut->GLintVal = valueIn;
1610 }
1611 
1612 template <>
1613 inline void SetParamVal<ParamType::TGLint64Pointer>(GLint64 *valueIn, ParamValue *valueOut)
1614 {
1615     valueOut->GLint64PointerVal = valueIn;
1616 }
1617 
1618 template <>
1619 inline void SetParamVal<ParamType::TGLintConstPointer>(const GLint *valueIn, ParamValue *valueOut)
1620 {
1621     valueOut->GLintConstPointerVal = valueIn;
1622 }
1623 
1624 template <>
1625 inline void SetParamVal<ParamType::TGLintPointer>(GLint *valueIn, ParamValue *valueOut)
1626 {
1627     valueOut->GLintPointerVal = valueIn;
1628 }
1629 
1630 template <>
1631 inline void SetParamVal<ParamType::TGLintptr>(GLintptr valueIn, ParamValue *valueOut)
1632 {
1633     valueOut->GLintptrVal = valueIn;
1634 }
1635 
1636 template <>
1637 inline void SetParamVal<ParamType::TGLintptrConstPointer>(const GLintptr *valueIn,
1638                                                           ParamValue *valueOut)
1639 {
1640     valueOut->GLintptrConstPointerVal = valueIn;
1641 }
1642 
1643 template <>
1644 inline void SetParamVal<ParamType::TGLshort>(GLshort valueIn, ParamValue *valueOut)
1645 {
1646     valueOut->GLshortVal = valueIn;
1647 }
1648 
1649 template <>
1650 inline void SetParamVal<ParamType::TGLshortConstPointer>(const GLshort *valueIn,
1651                                                          ParamValue *valueOut)
1652 {
1653     valueOut->GLshortConstPointerVal = valueIn;
1654 }
1655 
1656 template <>
1657 inline void SetParamVal<ParamType::TGLsizei>(GLsizei valueIn, ParamValue *valueOut)
1658 {
1659     valueOut->GLsizeiVal = valueIn;
1660 }
1661 
1662 template <>
1663 inline void SetParamVal<ParamType::TGLsizeiConstPointer>(const GLsizei *valueIn,
1664                                                          ParamValue *valueOut)
1665 {
1666     valueOut->GLsizeiConstPointerVal = valueIn;
1667 }
1668 
1669 template <>
1670 inline void SetParamVal<ParamType::TGLsizeiPointer>(GLsizei *valueIn, ParamValue *valueOut)
1671 {
1672     valueOut->GLsizeiPointerVal = valueIn;
1673 }
1674 
1675 template <>
1676 inline void SetParamVal<ParamType::TGLsizeiptr>(GLsizeiptr valueIn, ParamValue *valueOut)
1677 {
1678     valueOut->GLsizeiptrVal = valueIn;
1679 }
1680 
1681 template <>
1682 inline void SetParamVal<ParamType::TGLsizeiptrConstPointer>(const GLsizeiptr *valueIn,
1683                                                             ParamValue *valueOut)
1684 {
1685     valueOut->GLsizeiptrConstPointerVal = valueIn;
1686 }
1687 
1688 template <>
1689 inline void SetParamVal<ParamType::TGLsync>(GLsync valueIn, ParamValue *valueOut)
1690 {
1691     valueOut->GLsyncVal = valueIn;
1692 }
1693 
1694 template <>
1695 inline void SetParamVal<ParamType::TGLubyte>(GLubyte valueIn, ParamValue *valueOut)
1696 {
1697     valueOut->GLubyteVal = valueIn;
1698 }
1699 
1700 template <>
1701 inline void SetParamVal<ParamType::TGLubyteConstPointer>(const GLubyte *valueIn,
1702                                                          ParamValue *valueOut)
1703 {
1704     valueOut->GLubyteConstPointerVal = valueIn;
1705 }
1706 
1707 template <>
1708 inline void SetParamVal<ParamType::TGLubytePointer>(GLubyte *valueIn, ParamValue *valueOut)
1709 {
1710     valueOut->GLubytePointerVal = valueIn;
1711 }
1712 
1713 template <>
1714 inline void SetParamVal<ParamType::TGLuint>(GLuint valueIn, ParamValue *valueOut)
1715 {
1716     valueOut->GLuintVal = valueIn;
1717 }
1718 
1719 template <>
1720 inline void SetParamVal<ParamType::TGLuint64>(GLuint64 valueIn, ParamValue *valueOut)
1721 {
1722     valueOut->GLuint64Val = valueIn;
1723 }
1724 
1725 template <>
1726 inline void SetParamVal<ParamType::TGLuint64ConstPointer>(const GLuint64 *valueIn,
1727                                                           ParamValue *valueOut)
1728 {
1729     valueOut->GLuint64ConstPointerVal = valueIn;
1730 }
1731 
1732 template <>
1733 inline void SetParamVal<ParamType::TGLuint64Pointer>(GLuint64 *valueIn, ParamValue *valueOut)
1734 {
1735     valueOut->GLuint64PointerVal = valueIn;
1736 }
1737 
1738 template <>
1739 inline void SetParamVal<ParamType::TGLuintConstPointer>(const GLuint *valueIn, ParamValue *valueOut)
1740 {
1741     valueOut->GLuintConstPointerVal = valueIn;
1742 }
1743 
1744 template <>
1745 inline void SetParamVal<ParamType::TGLuintPointer>(GLuint *valueIn, ParamValue *valueOut)
1746 {
1747     valueOut->GLuintPointerVal = valueIn;
1748 }
1749 
1750 template <>
1751 inline void SetParamVal<ParamType::TGLushort>(GLushort valueIn, ParamValue *valueOut)
1752 {
1753     valueOut->GLushortVal = valueIn;
1754 }
1755 
1756 template <>
1757 inline void SetParamVal<ParamType::TGLushortConstPointer>(const GLushort *valueIn,
1758                                                           ParamValue *valueOut)
1759 {
1760     valueOut->GLushortConstPointerVal = valueIn;
1761 }
1762 
1763 template <>
1764 inline void SetParamVal<ParamType::TGLushortPointer>(GLushort *valueIn, ParamValue *valueOut)
1765 {
1766     valueOut->GLushortPointerVal = valueIn;
1767 }
1768 
1769 template <>
1770 inline void SetParamVal<ParamType::TGLvoidConstPointer>(const GLvoid *valueIn, ParamValue *valueOut)
1771 {
1772     valueOut->GLvoidConstPointerVal = valueIn;
1773 }
1774 
1775 template <>
1776 inline void SetParamVal<ParamType::TGLvoidConstPointerPointer>(const GLvoid *const *valueIn,
1777                                                                ParamValue *valueOut)
1778 {
1779     valueOut->GLvoidConstPointerPointerVal = valueIn;
1780 }
1781 
1782 template <>
1783 inline void SetParamVal<ParamType::TGraphicsResetStatus>(gl::GraphicsResetStatus valueIn,
1784                                                          ParamValue *valueOut)
1785 {
1786     valueOut->GraphicsResetStatusVal = valueIn;
1787 }
1788 
1789 template <>
1790 inline void SetParamVal<ParamType::THandleType>(gl::HandleType valueIn, ParamValue *valueOut)
1791 {
1792     valueOut->HandleTypeVal = valueIn;
1793 }
1794 
1795 template <>
1796 inline void SetParamVal<ParamType::TLightParameter>(gl::LightParameter valueIn,
1797                                                     ParamValue *valueOut)
1798 {
1799     valueOut->LightParameterVal = valueIn;
1800 }
1801 
1802 template <>
1803 inline void SetParamVal<ParamType::TLogicalOperation>(gl::LogicalOperation valueIn,
1804                                                       ParamValue *valueOut)
1805 {
1806     valueOut->LogicalOperationVal = valueIn;
1807 }
1808 
1809 template <>
1810 inline void SetParamVal<ParamType::TMaterialParameter>(gl::MaterialParameter valueIn,
1811                                                        ParamValue *valueOut)
1812 {
1813     valueOut->MaterialParameterVal = valueIn;
1814 }
1815 
1816 template <>
1817 inline void SetParamVal<ParamType::TMatrixType>(gl::MatrixType valueIn, ParamValue *valueOut)
1818 {
1819     valueOut->MatrixTypeVal = valueIn;
1820 }
1821 
1822 template <>
1823 inline void SetParamVal<ParamType::TMemoryObjectID>(gl::MemoryObjectID valueIn,
1824                                                     ParamValue *valueOut)
1825 {
1826     valueOut->MemoryObjectIDVal = valueIn;
1827 }
1828 
1829 template <>
1830 inline void SetParamVal<ParamType::TMemoryObjectIDConstPointer>(const gl::MemoryObjectID *valueIn,
1831                                                                 ParamValue *valueOut)
1832 {
1833     valueOut->MemoryObjectIDConstPointerVal = valueIn;
1834 }
1835 
1836 template <>
1837 inline void SetParamVal<ParamType::TMemoryObjectIDPointer>(gl::MemoryObjectID *valueIn,
1838                                                            ParamValue *valueOut)
1839 {
1840     valueOut->MemoryObjectIDPointerVal = valueIn;
1841 }
1842 
1843 template <>
1844 inline void SetParamVal<ParamType::TPointParameter>(gl::PointParameter valueIn,
1845                                                     ParamValue *valueOut)
1846 {
1847     valueOut->PointParameterVal = valueIn;
1848 }
1849 
1850 template <>
1851 inline void SetParamVal<ParamType::TPrimitiveMode>(gl::PrimitiveMode valueIn, ParamValue *valueOut)
1852 {
1853     valueOut->PrimitiveModeVal = valueIn;
1854 }
1855 
1856 template <>
1857 inline void SetParamVal<ParamType::TProgramPipelineID>(gl::ProgramPipelineID valueIn,
1858                                                        ParamValue *valueOut)
1859 {
1860     valueOut->ProgramPipelineIDVal = valueIn;
1861 }
1862 
1863 template <>
1864 inline void SetParamVal<ParamType::TProgramPipelineIDConstPointer>(
1865     const gl::ProgramPipelineID *valueIn,
1866     ParamValue *valueOut)
1867 {
1868     valueOut->ProgramPipelineIDConstPointerVal = valueIn;
1869 }
1870 
1871 template <>
1872 inline void SetParamVal<ParamType::TProgramPipelineIDPointer>(gl::ProgramPipelineID *valueIn,
1873                                                               ParamValue *valueOut)
1874 {
1875     valueOut->ProgramPipelineIDPointerVal = valueIn;
1876 }
1877 
1878 template <>
1879 inline void SetParamVal<ParamType::TProvokingVertexConvention>(
1880     gl::ProvokingVertexConvention valueIn,
1881     ParamValue *valueOut)
1882 {
1883     valueOut->ProvokingVertexConventionVal = valueIn;
1884 }
1885 
1886 template <>
1887 inline void SetParamVal<ParamType::TQueryID>(gl::QueryID valueIn, ParamValue *valueOut)
1888 {
1889     valueOut->QueryIDVal = valueIn;
1890 }
1891 
1892 template <>
1893 inline void SetParamVal<ParamType::TQueryIDConstPointer>(const gl::QueryID *valueIn,
1894                                                          ParamValue *valueOut)
1895 {
1896     valueOut->QueryIDConstPointerVal = valueIn;
1897 }
1898 
1899 template <>
1900 inline void SetParamVal<ParamType::TQueryIDPointer>(gl::QueryID *valueIn, ParamValue *valueOut)
1901 {
1902     valueOut->QueryIDPointerVal = valueIn;
1903 }
1904 
1905 template <>
1906 inline void SetParamVal<ParamType::TQueryType>(gl::QueryType valueIn, ParamValue *valueOut)
1907 {
1908     valueOut->QueryTypeVal = valueIn;
1909 }
1910 
1911 template <>
1912 inline void SetParamVal<ParamType::TRenderbufferID>(gl::RenderbufferID valueIn,
1913                                                     ParamValue *valueOut)
1914 {
1915     valueOut->RenderbufferIDVal = valueIn;
1916 }
1917 
1918 template <>
1919 inline void SetParamVal<ParamType::TRenderbufferIDConstPointer>(const gl::RenderbufferID *valueIn,
1920                                                                 ParamValue *valueOut)
1921 {
1922     valueOut->RenderbufferIDConstPointerVal = valueIn;
1923 }
1924 
1925 template <>
1926 inline void SetParamVal<ParamType::TRenderbufferIDPointer>(gl::RenderbufferID *valueIn,
1927                                                            ParamValue *valueOut)
1928 {
1929     valueOut->RenderbufferIDPointerVal = valueIn;
1930 }
1931 
1932 template <>
1933 inline void SetParamVal<ParamType::TSamplerID>(gl::SamplerID valueIn, ParamValue *valueOut)
1934 {
1935     valueOut->SamplerIDVal = valueIn;
1936 }
1937 
1938 template <>
1939 inline void SetParamVal<ParamType::TSamplerIDConstPointer>(const gl::SamplerID *valueIn,
1940                                                            ParamValue *valueOut)
1941 {
1942     valueOut->SamplerIDConstPointerVal = valueIn;
1943 }
1944 
1945 template <>
1946 inline void SetParamVal<ParamType::TSamplerIDPointer>(gl::SamplerID *valueIn, ParamValue *valueOut)
1947 {
1948     valueOut->SamplerIDPointerVal = valueIn;
1949 }
1950 
1951 template <>
1952 inline void SetParamVal<ParamType::TSemaphoreID>(gl::SemaphoreID valueIn, ParamValue *valueOut)
1953 {
1954     valueOut->SemaphoreIDVal = valueIn;
1955 }
1956 
1957 template <>
1958 inline void SetParamVal<ParamType::TSemaphoreIDConstPointer>(const gl::SemaphoreID *valueIn,
1959                                                              ParamValue *valueOut)
1960 {
1961     valueOut->SemaphoreIDConstPointerVal = valueIn;
1962 }
1963 
1964 template <>
1965 inline void SetParamVal<ParamType::TSemaphoreIDPointer>(gl::SemaphoreID *valueIn,
1966                                                         ParamValue *valueOut)
1967 {
1968     valueOut->SemaphoreIDPointerVal = valueIn;
1969 }
1970 
1971 template <>
1972 inline void SetParamVal<ParamType::TShaderProgramID>(gl::ShaderProgramID valueIn,
1973                                                      ParamValue *valueOut)
1974 {
1975     valueOut->ShaderProgramIDVal = valueIn;
1976 }
1977 
1978 template <>
1979 inline void SetParamVal<ParamType::TShaderProgramIDConstPointer>(const gl::ShaderProgramID *valueIn,
1980                                                                  ParamValue *valueOut)
1981 {
1982     valueOut->ShaderProgramIDConstPointerVal = valueIn;
1983 }
1984 
1985 template <>
1986 inline void SetParamVal<ParamType::TShaderProgramIDPointer>(gl::ShaderProgramID *valueIn,
1987                                                             ParamValue *valueOut)
1988 {
1989     valueOut->ShaderProgramIDPointerVal = valueIn;
1990 }
1991 
1992 template <>
1993 inline void SetParamVal<ParamType::TShaderType>(gl::ShaderType valueIn, ParamValue *valueOut)
1994 {
1995     valueOut->ShaderTypeVal = valueIn;
1996 }
1997 
1998 template <>
1999 inline void SetParamVal<ParamType::TShadingModel>(gl::ShadingModel valueIn, ParamValue *valueOut)
2000 {
2001     valueOut->ShadingModelVal = valueIn;
2002 }
2003 
2004 template <>
2005 inline void SetParamVal<ParamType::TTextureEnvParameter>(gl::TextureEnvParameter valueIn,
2006                                                          ParamValue *valueOut)
2007 {
2008     valueOut->TextureEnvParameterVal = valueIn;
2009 }
2010 
2011 template <>
2012 inline void SetParamVal<ParamType::TTextureEnvTarget>(gl::TextureEnvTarget valueIn,
2013                                                       ParamValue *valueOut)
2014 {
2015     valueOut->TextureEnvTargetVal = valueIn;
2016 }
2017 
2018 template <>
2019 inline void SetParamVal<ParamType::TTextureID>(gl::TextureID valueIn, ParamValue *valueOut)
2020 {
2021     valueOut->TextureIDVal = valueIn;
2022 }
2023 
2024 template <>
2025 inline void SetParamVal<ParamType::TTextureIDConstPointer>(const gl::TextureID *valueIn,
2026                                                            ParamValue *valueOut)
2027 {
2028     valueOut->TextureIDConstPointerVal = valueIn;
2029 }
2030 
2031 template <>
2032 inline void SetParamVal<ParamType::TTextureIDPointer>(gl::TextureID *valueIn, ParamValue *valueOut)
2033 {
2034     valueOut->TextureIDPointerVal = valueIn;
2035 }
2036 
2037 template <>
2038 inline void SetParamVal<ParamType::TTextureTarget>(gl::TextureTarget valueIn, ParamValue *valueOut)
2039 {
2040     valueOut->TextureTargetVal = valueIn;
2041 }
2042 
2043 template <>
2044 inline void SetParamVal<ParamType::TTextureType>(gl::TextureType valueIn, ParamValue *valueOut)
2045 {
2046     valueOut->TextureTypeVal = valueIn;
2047 }
2048 
2049 template <>
2050 inline void SetParamVal<ParamType::TTransformFeedbackID>(gl::TransformFeedbackID valueIn,
2051                                                          ParamValue *valueOut)
2052 {
2053     valueOut->TransformFeedbackIDVal = valueIn;
2054 }
2055 
2056 template <>
2057 inline void SetParamVal<ParamType::TTransformFeedbackIDConstPointer>(
2058     const gl::TransformFeedbackID *valueIn,
2059     ParamValue *valueOut)
2060 {
2061     valueOut->TransformFeedbackIDConstPointerVal = valueIn;
2062 }
2063 
2064 template <>
2065 inline void SetParamVal<ParamType::TTransformFeedbackIDPointer>(gl::TransformFeedbackID *valueIn,
2066                                                                 ParamValue *valueOut)
2067 {
2068     valueOut->TransformFeedbackIDPointerVal = valueIn;
2069 }
2070 
2071 template <>
2072 inline void SetParamVal<ParamType::TUniformBlockIndex>(gl::UniformBlockIndex valueIn,
2073                                                        ParamValue *valueOut)
2074 {
2075     valueOut->UniformBlockIndexVal = valueIn;
2076 }
2077 
2078 template <>
2079 inline void SetParamVal<ParamType::TUniformLocation>(gl::UniformLocation valueIn,
2080                                                      ParamValue *valueOut)
2081 {
2082     valueOut->UniformLocationVal = valueIn;
2083 }
2084 
2085 template <>
2086 inline void SetParamVal<ParamType::TVertexArrayID>(gl::VertexArrayID valueIn, ParamValue *valueOut)
2087 {
2088     valueOut->VertexArrayIDVal = valueIn;
2089 }
2090 
2091 template <>
2092 inline void SetParamVal<ParamType::TVertexArrayIDConstPointer>(const gl::VertexArrayID *valueIn,
2093                                                                ParamValue *valueOut)
2094 {
2095     valueOut->VertexArrayIDConstPointerVal = valueIn;
2096 }
2097 
2098 template <>
2099 inline void SetParamVal<ParamType::TVertexArrayIDPointer>(gl::VertexArrayID *valueIn,
2100                                                           ParamValue *valueOut)
2101 {
2102     valueOut->VertexArrayIDPointerVal = valueIn;
2103 }
2104 
2105 template <>
2106 inline void SetParamVal<ParamType::TVertexAttribType>(gl::VertexAttribType valueIn,
2107                                                       ParamValue *valueOut)
2108 {
2109     valueOut->VertexAttribTypeVal = valueIn;
2110 }
2111 
2112 template <>
2113 inline void SetParamVal<ParamType::TvoidConstPointer>(const void *valueIn, ParamValue *valueOut)
2114 {
2115     valueOut->voidConstPointerVal = valueIn;
2116 }
2117 
2118 template <>
2119 inline void SetParamVal<ParamType::TvoidConstPointerPointer>(const void *const *valueIn,
2120                                                              ParamValue *valueOut)
2121 {
2122     valueOut->voidConstPointerPointerVal = valueIn;
2123 }
2124 
2125 template <>
2126 inline void SetParamVal<ParamType::TvoidPointer>(void *valueIn, ParamValue *valueOut)
2127 {
2128     valueOut->voidPointerVal = valueIn;
2129 }
2130 
2131 template <>
2132 inline void SetParamVal<ParamType::TvoidPointerPointer>(void **valueIn, ParamValue *valueOut)
2133 {
2134     valueOut->voidPointerPointerVal = valueIn;
2135 }
2136 
2137 template <ParamType PType, typename T>
SetParamVal(T valueIn,ParamValue * valueOut)2138 void SetParamVal(T valueIn, ParamValue *valueOut)
2139 {
2140     UNREACHABLE();
2141 }
2142 
2143 template <typename T>
InitParamValue(ParamType paramType,T valueIn,ParamValue * valueOut)2144 void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
2145 {
2146     switch (paramType)
2147     {
2148         case ParamType::TAlphaTestFunc:
2149             SetParamVal<ParamType::TAlphaTestFunc>(valueIn, valueOut);
2150             break;
2151         case ParamType::TBufferBinding:
2152             SetParamVal<ParamType::TBufferBinding>(valueIn, valueOut);
2153             break;
2154         case ParamType::TBufferID:
2155             SetParamVal<ParamType::TBufferID>(valueIn, valueOut);
2156             break;
2157         case ParamType::TBufferIDConstPointer:
2158             SetParamVal<ParamType::TBufferIDConstPointer>(valueIn, valueOut);
2159             break;
2160         case ParamType::TBufferIDPointer:
2161             SetParamVal<ParamType::TBufferIDPointer>(valueIn, valueOut);
2162             break;
2163         case ParamType::TBufferUsage:
2164             SetParamVal<ParamType::TBufferUsage>(valueIn, valueOut);
2165             break;
2166         case ParamType::TClientVertexArrayType:
2167             SetParamVal<ParamType::TClientVertexArrayType>(valueIn, valueOut);
2168             break;
2169         case ParamType::TCullFaceMode:
2170             SetParamVal<ParamType::TCullFaceMode>(valueIn, valueOut);
2171             break;
2172         case ParamType::TDrawElementsType:
2173             SetParamVal<ParamType::TDrawElementsType>(valueIn, valueOut);
2174             break;
2175         case ParamType::TFenceNVID:
2176             SetParamVal<ParamType::TFenceNVID>(valueIn, valueOut);
2177             break;
2178         case ParamType::TFenceNVIDConstPointer:
2179             SetParamVal<ParamType::TFenceNVIDConstPointer>(valueIn, valueOut);
2180             break;
2181         case ParamType::TFenceNVIDPointer:
2182             SetParamVal<ParamType::TFenceNVIDPointer>(valueIn, valueOut);
2183             break;
2184         case ParamType::TFramebufferID:
2185             SetParamVal<ParamType::TFramebufferID>(valueIn, valueOut);
2186             break;
2187         case ParamType::TFramebufferIDConstPointer:
2188             SetParamVal<ParamType::TFramebufferIDConstPointer>(valueIn, valueOut);
2189             break;
2190         case ParamType::TFramebufferIDPointer:
2191             SetParamVal<ParamType::TFramebufferIDPointer>(valueIn, valueOut);
2192             break;
2193         case ParamType::TGLDEBUGPROC:
2194             SetParamVal<ParamType::TGLDEBUGPROC>(valueIn, valueOut);
2195             break;
2196         case ParamType::TGLDEBUGPROCKHR:
2197             SetParamVal<ParamType::TGLDEBUGPROCKHR>(valueIn, valueOut);
2198             break;
2199         case ParamType::TGLbitfield:
2200             SetParamVal<ParamType::TGLbitfield>(valueIn, valueOut);
2201             break;
2202         case ParamType::TGLboolean:
2203             SetParamVal<ParamType::TGLboolean>(valueIn, valueOut);
2204             break;
2205         case ParamType::TGLbooleanConstPointer:
2206             SetParamVal<ParamType::TGLbooleanConstPointer>(valueIn, valueOut);
2207             break;
2208         case ParamType::TGLbooleanPointer:
2209             SetParamVal<ParamType::TGLbooleanPointer>(valueIn, valueOut);
2210             break;
2211         case ParamType::TGLbyte:
2212             SetParamVal<ParamType::TGLbyte>(valueIn, valueOut);
2213             break;
2214         case ParamType::TGLbyteConstPointer:
2215             SetParamVal<ParamType::TGLbyteConstPointer>(valueIn, valueOut);
2216             break;
2217         case ParamType::TGLcharConstPointer:
2218             SetParamVal<ParamType::TGLcharConstPointer>(valueIn, valueOut);
2219             break;
2220         case ParamType::TGLcharConstPointerPointer:
2221             SetParamVal<ParamType::TGLcharConstPointerPointer>(valueIn, valueOut);
2222             break;
2223         case ParamType::TGLcharPointer:
2224             SetParamVal<ParamType::TGLcharPointer>(valueIn, valueOut);
2225             break;
2226         case ParamType::TGLclampx:
2227             SetParamVal<ParamType::TGLclampx>(valueIn, valueOut);
2228             break;
2229         case ParamType::TGLdouble:
2230             SetParamVal<ParamType::TGLdouble>(valueIn, valueOut);
2231             break;
2232         case ParamType::TGLdoubleConstPointer:
2233             SetParamVal<ParamType::TGLdoubleConstPointer>(valueIn, valueOut);
2234             break;
2235         case ParamType::TGLdoublePointer:
2236             SetParamVal<ParamType::TGLdoublePointer>(valueIn, valueOut);
2237             break;
2238         case ParamType::TGLeglClientBufferEXT:
2239             SetParamVal<ParamType::TGLeglClientBufferEXT>(valueIn, valueOut);
2240             break;
2241         case ParamType::TGLeglImageOES:
2242             SetParamVal<ParamType::TGLeglImageOES>(valueIn, valueOut);
2243             break;
2244         case ParamType::TGLenum:
2245             SetParamVal<ParamType::TGLenum>(valueIn, valueOut);
2246             break;
2247         case ParamType::TGLenumConstPointer:
2248             SetParamVal<ParamType::TGLenumConstPointer>(valueIn, valueOut);
2249             break;
2250         case ParamType::TGLenumPointer:
2251             SetParamVal<ParamType::TGLenumPointer>(valueIn, valueOut);
2252             break;
2253         case ParamType::TGLfixed:
2254             SetParamVal<ParamType::TGLfixed>(valueIn, valueOut);
2255             break;
2256         case ParamType::TGLfixedConstPointer:
2257             SetParamVal<ParamType::TGLfixedConstPointer>(valueIn, valueOut);
2258             break;
2259         case ParamType::TGLfixedPointer:
2260             SetParamVal<ParamType::TGLfixedPointer>(valueIn, valueOut);
2261             break;
2262         case ParamType::TGLfloat:
2263             SetParamVal<ParamType::TGLfloat>(valueIn, valueOut);
2264             break;
2265         case ParamType::TGLfloatConstPointer:
2266             SetParamVal<ParamType::TGLfloatConstPointer>(valueIn, valueOut);
2267             break;
2268         case ParamType::TGLfloatPointer:
2269             SetParamVal<ParamType::TGLfloatPointer>(valueIn, valueOut);
2270             break;
2271         case ParamType::TGLint:
2272             SetParamVal<ParamType::TGLint>(valueIn, valueOut);
2273             break;
2274         case ParamType::TGLint64Pointer:
2275             SetParamVal<ParamType::TGLint64Pointer>(valueIn, valueOut);
2276             break;
2277         case ParamType::TGLintConstPointer:
2278             SetParamVal<ParamType::TGLintConstPointer>(valueIn, valueOut);
2279             break;
2280         case ParamType::TGLintPointer:
2281             SetParamVal<ParamType::TGLintPointer>(valueIn, valueOut);
2282             break;
2283         case ParamType::TGLintptr:
2284             SetParamVal<ParamType::TGLintptr>(valueIn, valueOut);
2285             break;
2286         case ParamType::TGLintptrConstPointer:
2287             SetParamVal<ParamType::TGLintptrConstPointer>(valueIn, valueOut);
2288             break;
2289         case ParamType::TGLshort:
2290             SetParamVal<ParamType::TGLshort>(valueIn, valueOut);
2291             break;
2292         case ParamType::TGLshortConstPointer:
2293             SetParamVal<ParamType::TGLshortConstPointer>(valueIn, valueOut);
2294             break;
2295         case ParamType::TGLsizei:
2296             SetParamVal<ParamType::TGLsizei>(valueIn, valueOut);
2297             break;
2298         case ParamType::TGLsizeiConstPointer:
2299             SetParamVal<ParamType::TGLsizeiConstPointer>(valueIn, valueOut);
2300             break;
2301         case ParamType::TGLsizeiPointer:
2302             SetParamVal<ParamType::TGLsizeiPointer>(valueIn, valueOut);
2303             break;
2304         case ParamType::TGLsizeiptr:
2305             SetParamVal<ParamType::TGLsizeiptr>(valueIn, valueOut);
2306             break;
2307         case ParamType::TGLsizeiptrConstPointer:
2308             SetParamVal<ParamType::TGLsizeiptrConstPointer>(valueIn, valueOut);
2309             break;
2310         case ParamType::TGLsync:
2311             SetParamVal<ParamType::TGLsync>(valueIn, valueOut);
2312             break;
2313         case ParamType::TGLubyte:
2314             SetParamVal<ParamType::TGLubyte>(valueIn, valueOut);
2315             break;
2316         case ParamType::TGLubyteConstPointer:
2317             SetParamVal<ParamType::TGLubyteConstPointer>(valueIn, valueOut);
2318             break;
2319         case ParamType::TGLubytePointer:
2320             SetParamVal<ParamType::TGLubytePointer>(valueIn, valueOut);
2321             break;
2322         case ParamType::TGLuint:
2323             SetParamVal<ParamType::TGLuint>(valueIn, valueOut);
2324             break;
2325         case ParamType::TGLuint64:
2326             SetParamVal<ParamType::TGLuint64>(valueIn, valueOut);
2327             break;
2328         case ParamType::TGLuint64ConstPointer:
2329             SetParamVal<ParamType::TGLuint64ConstPointer>(valueIn, valueOut);
2330             break;
2331         case ParamType::TGLuint64Pointer:
2332             SetParamVal<ParamType::TGLuint64Pointer>(valueIn, valueOut);
2333             break;
2334         case ParamType::TGLuintConstPointer:
2335             SetParamVal<ParamType::TGLuintConstPointer>(valueIn, valueOut);
2336             break;
2337         case ParamType::TGLuintPointer:
2338             SetParamVal<ParamType::TGLuintPointer>(valueIn, valueOut);
2339             break;
2340         case ParamType::TGLushort:
2341             SetParamVal<ParamType::TGLushort>(valueIn, valueOut);
2342             break;
2343         case ParamType::TGLushortConstPointer:
2344             SetParamVal<ParamType::TGLushortConstPointer>(valueIn, valueOut);
2345             break;
2346         case ParamType::TGLushortPointer:
2347             SetParamVal<ParamType::TGLushortPointer>(valueIn, valueOut);
2348             break;
2349         case ParamType::TGLvoidConstPointer:
2350             SetParamVal<ParamType::TGLvoidConstPointer>(valueIn, valueOut);
2351             break;
2352         case ParamType::TGLvoidConstPointerPointer:
2353             SetParamVal<ParamType::TGLvoidConstPointerPointer>(valueIn, valueOut);
2354             break;
2355         case ParamType::TGraphicsResetStatus:
2356             SetParamVal<ParamType::TGraphicsResetStatus>(valueIn, valueOut);
2357             break;
2358         case ParamType::THandleType:
2359             SetParamVal<ParamType::THandleType>(valueIn, valueOut);
2360             break;
2361         case ParamType::TLightParameter:
2362             SetParamVal<ParamType::TLightParameter>(valueIn, valueOut);
2363             break;
2364         case ParamType::TLogicalOperation:
2365             SetParamVal<ParamType::TLogicalOperation>(valueIn, valueOut);
2366             break;
2367         case ParamType::TMaterialParameter:
2368             SetParamVal<ParamType::TMaterialParameter>(valueIn, valueOut);
2369             break;
2370         case ParamType::TMatrixType:
2371             SetParamVal<ParamType::TMatrixType>(valueIn, valueOut);
2372             break;
2373         case ParamType::TMemoryObjectID:
2374             SetParamVal<ParamType::TMemoryObjectID>(valueIn, valueOut);
2375             break;
2376         case ParamType::TMemoryObjectIDConstPointer:
2377             SetParamVal<ParamType::TMemoryObjectIDConstPointer>(valueIn, valueOut);
2378             break;
2379         case ParamType::TMemoryObjectIDPointer:
2380             SetParamVal<ParamType::TMemoryObjectIDPointer>(valueIn, valueOut);
2381             break;
2382         case ParamType::TPointParameter:
2383             SetParamVal<ParamType::TPointParameter>(valueIn, valueOut);
2384             break;
2385         case ParamType::TPrimitiveMode:
2386             SetParamVal<ParamType::TPrimitiveMode>(valueIn, valueOut);
2387             break;
2388         case ParamType::TProgramPipelineID:
2389             SetParamVal<ParamType::TProgramPipelineID>(valueIn, valueOut);
2390             break;
2391         case ParamType::TProgramPipelineIDConstPointer:
2392             SetParamVal<ParamType::TProgramPipelineIDConstPointer>(valueIn, valueOut);
2393             break;
2394         case ParamType::TProgramPipelineIDPointer:
2395             SetParamVal<ParamType::TProgramPipelineIDPointer>(valueIn, valueOut);
2396             break;
2397         case ParamType::TProvokingVertexConvention:
2398             SetParamVal<ParamType::TProvokingVertexConvention>(valueIn, valueOut);
2399             break;
2400         case ParamType::TQueryID:
2401             SetParamVal<ParamType::TQueryID>(valueIn, valueOut);
2402             break;
2403         case ParamType::TQueryIDConstPointer:
2404             SetParamVal<ParamType::TQueryIDConstPointer>(valueIn, valueOut);
2405             break;
2406         case ParamType::TQueryIDPointer:
2407             SetParamVal<ParamType::TQueryIDPointer>(valueIn, valueOut);
2408             break;
2409         case ParamType::TQueryType:
2410             SetParamVal<ParamType::TQueryType>(valueIn, valueOut);
2411             break;
2412         case ParamType::TRenderbufferID:
2413             SetParamVal<ParamType::TRenderbufferID>(valueIn, valueOut);
2414             break;
2415         case ParamType::TRenderbufferIDConstPointer:
2416             SetParamVal<ParamType::TRenderbufferIDConstPointer>(valueIn, valueOut);
2417             break;
2418         case ParamType::TRenderbufferIDPointer:
2419             SetParamVal<ParamType::TRenderbufferIDPointer>(valueIn, valueOut);
2420             break;
2421         case ParamType::TSamplerID:
2422             SetParamVal<ParamType::TSamplerID>(valueIn, valueOut);
2423             break;
2424         case ParamType::TSamplerIDConstPointer:
2425             SetParamVal<ParamType::TSamplerIDConstPointer>(valueIn, valueOut);
2426             break;
2427         case ParamType::TSamplerIDPointer:
2428             SetParamVal<ParamType::TSamplerIDPointer>(valueIn, valueOut);
2429             break;
2430         case ParamType::TSemaphoreID:
2431             SetParamVal<ParamType::TSemaphoreID>(valueIn, valueOut);
2432             break;
2433         case ParamType::TSemaphoreIDConstPointer:
2434             SetParamVal<ParamType::TSemaphoreIDConstPointer>(valueIn, valueOut);
2435             break;
2436         case ParamType::TSemaphoreIDPointer:
2437             SetParamVal<ParamType::TSemaphoreIDPointer>(valueIn, valueOut);
2438             break;
2439         case ParamType::TShaderProgramID:
2440             SetParamVal<ParamType::TShaderProgramID>(valueIn, valueOut);
2441             break;
2442         case ParamType::TShaderProgramIDConstPointer:
2443             SetParamVal<ParamType::TShaderProgramIDConstPointer>(valueIn, valueOut);
2444             break;
2445         case ParamType::TShaderProgramIDPointer:
2446             SetParamVal<ParamType::TShaderProgramIDPointer>(valueIn, valueOut);
2447             break;
2448         case ParamType::TShaderType:
2449             SetParamVal<ParamType::TShaderType>(valueIn, valueOut);
2450             break;
2451         case ParamType::TShadingModel:
2452             SetParamVal<ParamType::TShadingModel>(valueIn, valueOut);
2453             break;
2454         case ParamType::TTextureEnvParameter:
2455             SetParamVal<ParamType::TTextureEnvParameter>(valueIn, valueOut);
2456             break;
2457         case ParamType::TTextureEnvTarget:
2458             SetParamVal<ParamType::TTextureEnvTarget>(valueIn, valueOut);
2459             break;
2460         case ParamType::TTextureID:
2461             SetParamVal<ParamType::TTextureID>(valueIn, valueOut);
2462             break;
2463         case ParamType::TTextureIDConstPointer:
2464             SetParamVal<ParamType::TTextureIDConstPointer>(valueIn, valueOut);
2465             break;
2466         case ParamType::TTextureIDPointer:
2467             SetParamVal<ParamType::TTextureIDPointer>(valueIn, valueOut);
2468             break;
2469         case ParamType::TTextureTarget:
2470             SetParamVal<ParamType::TTextureTarget>(valueIn, valueOut);
2471             break;
2472         case ParamType::TTextureType:
2473             SetParamVal<ParamType::TTextureType>(valueIn, valueOut);
2474             break;
2475         case ParamType::TTransformFeedbackID:
2476             SetParamVal<ParamType::TTransformFeedbackID>(valueIn, valueOut);
2477             break;
2478         case ParamType::TTransformFeedbackIDConstPointer:
2479             SetParamVal<ParamType::TTransformFeedbackIDConstPointer>(valueIn, valueOut);
2480             break;
2481         case ParamType::TTransformFeedbackIDPointer:
2482             SetParamVal<ParamType::TTransformFeedbackIDPointer>(valueIn, valueOut);
2483             break;
2484         case ParamType::TUniformBlockIndex:
2485             SetParamVal<ParamType::TUniformBlockIndex>(valueIn, valueOut);
2486             break;
2487         case ParamType::TUniformLocation:
2488             SetParamVal<ParamType::TUniformLocation>(valueIn, valueOut);
2489             break;
2490         case ParamType::TVertexArrayID:
2491             SetParamVal<ParamType::TVertexArrayID>(valueIn, valueOut);
2492             break;
2493         case ParamType::TVertexArrayIDConstPointer:
2494             SetParamVal<ParamType::TVertexArrayIDConstPointer>(valueIn, valueOut);
2495             break;
2496         case ParamType::TVertexArrayIDPointer:
2497             SetParamVal<ParamType::TVertexArrayIDPointer>(valueIn, valueOut);
2498             break;
2499         case ParamType::TVertexAttribType:
2500             SetParamVal<ParamType::TVertexAttribType>(valueIn, valueOut);
2501             break;
2502         case ParamType::TvoidConstPointer:
2503             SetParamVal<ParamType::TvoidConstPointer>(valueIn, valueOut);
2504             break;
2505         case ParamType::TvoidConstPointerPointer:
2506             SetParamVal<ParamType::TvoidConstPointerPointer>(valueIn, valueOut);
2507             break;
2508         case ParamType::TvoidPointer:
2509             SetParamVal<ParamType::TvoidPointer>(valueIn, valueOut);
2510             break;
2511         case ParamType::TvoidPointerPointer:
2512             SetParamVal<ParamType::TvoidPointerPointer>(valueIn, valueOut);
2513             break;
2514     }
2515 }
2516 
2517 struct CallCapture;
2518 struct ParamCapture;
2519 
2520 void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const ParamCapture &param);
2521 const char *ParamTypeToString(ParamType paramType);
2522 
2523 enum class ResourceIDType
2524 {
2525     Buffer,
2526     FenceNV,
2527     Framebuffer,
2528     MemoryObject,
2529     ProgramPipeline,
2530     Query,
2531     Renderbuffer,
2532     Sampler,
2533     Semaphore,
2534     ShaderProgram,
2535     Texture,
2536     TransformFeedback,
2537     VertexArray,
2538     EnumCount,
2539     InvalidEnum = EnumCount
2540 };
2541 
2542 ResourceIDType GetResourceIDTypeFromParamType(ParamType paramType);
2543 const char *GetResourceIDTypeName(ResourceIDType resourceIDType);
2544 }  // namespace angle
2545 
2546 #endif  // LIBANGLE_FRAME_CAPTURE_UTILS_AUTOGEN_H_
2547