xref: /aosp_15_r20/external/angle/src/common/frame_capture_utils_autogen.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
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 COMMON_FRAME_CAPTURE_UTILS_AUTOGEN_H_
12 #define COMMON_FRAME_CAPTURE_UTILS_AUTOGEN_H_
13 
14 #include "common/PackedEnums.h"
15 
16 namespace angle
17 {
18 enum class ParamType
19 {
20     TAHardwareBufferConstPointer,
21     TAlphaTestFunc,
22     TBufferBinding,
23     TBufferID,
24     TBufferIDConstPointer,
25     TBufferIDPointer,
26     TBufferUsage,
27     TClientVertexArrayType,
28     TClipDepthMode,
29     TClipOrigin,
30     TCompositorTiming,
31     TContextID,
32     TCullFaceMode,
33     TDrawElementsType,
34     TEGLAttribConstPointer,
35     TEGLAttribKHRPointer,
36     TEGLAttribPointer,
37     TEGLBoolean,
38     TEGLBooleanPointer,
39     TEGLClientBuffer,
40     TEGLConfigPointer,
41     TEGLContext,
42     TEGLDEBUGPROCKHR,
43     TEGLDeviceEXT,
44     TEGLDisplay,
45     TEGLFrameTokenANGLE,
46     TEGLGetBlobFuncANDROID,
47     TEGLImage,
48     TEGLImageKHR,
49     TEGLLabelKHR,
50     TEGLNativeDisplayType,
51     TEGLNativePixmapType,
52     TEGLNativeWindowType,
53     TEGLObjectKHR,
54     TEGLSetBlobFuncANDROID,
55     TEGLStreamKHR,
56     TEGLSurface,
57     TEGLSync,
58     TEGLSyncKHR,
59     TEGLTime,
60     TEGLTimeKHR,
61     TEGLenum,
62     TEGLint,
63     TEGLintConstPointer,
64     TEGLintPointer,
65     TEGLnsecsANDROID,
66     TEGLnsecsANDROIDPointer,
67     TEGLuint64KHR,
68     TEGLuint64KHRPointer,
69     TFenceNVID,
70     TFenceNVIDConstPointer,
71     TFenceNVIDPointer,
72     TFramebufferID,
73     TFramebufferIDConstPointer,
74     TFramebufferIDPointer,
75     TGLDEBUGPROC,
76     TGLDEBUGPROCKHR,
77     TGLGETBLOBPROCANGLE,
78     TGLSETBLOBPROCANGLE,
79     TGLbitfield,
80     TGLboolean,
81     TGLbooleanPointer,
82     TGLcharConstPointer,
83     TGLcharConstPointerPointer,
84     TGLcharPointer,
85     TGLclampx,
86     TGLeglClientBufferEXT,
87     TGLenum,
88     TGLenumConstPointer,
89     TGLenumPointer,
90     TGLfixed,
91     TGLfixedConstPointer,
92     TGLfixedPointer,
93     TGLfloat,
94     TGLfloatConstPointer,
95     TGLfloatPointer,
96     TGLint,
97     TGLint64,
98     TGLint64Pointer,
99     TGLintConstPointer,
100     TGLintPointer,
101     TGLintptr,
102     TGLshort,
103     TGLshortConstPointer,
104     TGLsizei,
105     TGLsizeiConstPointer,
106     TGLsizeiPointer,
107     TGLsizeiptr,
108     TGLsync,
109     TGLubyte,
110     TGLubyteConstPointer,
111     TGLubytePointer,
112     TGLuint,
113     TGLuint64,
114     TGLuint64ConstPointer,
115     TGLuint64Pointer,
116     TGLuintConstPointer,
117     TGLuintPointer,
118     TGraphicsResetStatus,
119     THandleType,
120     TImageID,
121     TLightParameter,
122     TLogicalOperation,
123     TMaterialParameter,
124     TMatrixType,
125     TMemoryObjectID,
126     TMemoryObjectIDConstPointer,
127     TMemoryObjectIDPointer,
128     TObjectType,
129     TPointParameter,
130     TPolygonMode,
131     TPrimitiveMode,
132     TProgramPipelineID,
133     TProgramPipelineIDConstPointer,
134     TProgramPipelineIDPointer,
135     TProvokingVertexConvention,
136     TQueryID,
137     TQueryIDConstPointer,
138     TQueryIDPointer,
139     TQueryType,
140     TRenderbufferID,
141     TRenderbufferIDConstPointer,
142     TRenderbufferIDPointer,
143     TSamplerID,
144     TSamplerIDConstPointer,
145     TSamplerIDPointer,
146     TSemaphoreID,
147     TSemaphoreIDConstPointer,
148     TSemaphoreIDPointer,
149     TShaderProgramID,
150     TShaderProgramIDConstPointer,
151     TShaderProgramIDPointer,
152     TShaderType,
153     TShadingModel,
154     TSurfaceID,
155     TSyncID,
156     TTextureEnvParameter,
157     TTextureEnvTarget,
158     TTextureID,
159     TTextureIDConstPointer,
160     TTextureIDPointer,
161     TTextureTarget,
162     TTextureType,
163     TTimestamp,
164     TTransformFeedbackID,
165     TTransformFeedbackIDConstPointer,
166     TTransformFeedbackIDPointer,
167     TUniformBlockIndex,
168     TUniformLocation,
169     TVertexArrayID,
170     TVertexArrayIDConstPointer,
171     TVertexArrayIDPointer,
172     TVertexAttribType,
173     TcharConstPointer,
174     Tegl_ConfigPointer,
175     Tegl_DevicePointer,
176     Tegl_DisplayPointer,
177     Tegl_StreamPointer,
178     Tegl_SyncID,
179     TvoidConstPointer,
180     TvoidConstPointerPointer,
181     TvoidPointer,
182     TvoidPointerPointer,
183 };
184 
185 constexpr uint32_t kParamTypeCount = 163;
186 
187 union ParamValue
188 {
189     const AHardwareBuffer *AHardwareBufferConstPointerVal;
190     gl::AlphaTestFunc AlphaTestFuncVal;
191     gl::BufferBinding BufferBindingVal;
192     gl::BufferID BufferIDVal;
193     const gl::BufferID *BufferIDConstPointerVal;
194     gl::BufferID *BufferIDPointerVal;
195     gl::BufferUsage BufferUsageVal;
196     gl::ClientVertexArrayType ClientVertexArrayTypeVal;
197     gl::ClipDepthMode ClipDepthModeVal;
198     gl::ClipOrigin ClipOriginVal;
199     egl::CompositorTiming CompositorTimingVal;
200     gl::ContextID ContextIDVal;
201     gl::CullFaceMode CullFaceModeVal;
202     gl::DrawElementsType DrawElementsTypeVal;
203     const EGLAttrib *EGLAttribConstPointerVal;
204     EGLAttribKHR *EGLAttribKHRPointerVal;
205     EGLAttrib *EGLAttribPointerVal;
206     EGLBoolean EGLBooleanVal;
207     EGLBoolean *EGLBooleanPointerVal;
208     EGLClientBuffer EGLClientBufferVal;
209     EGLConfig *EGLConfigPointerVal;
210     EGLContext EGLContextVal;
211     EGLDEBUGPROCKHR EGLDEBUGPROCKHRVal;
212     EGLDeviceEXT EGLDeviceEXTVal;
213     EGLDisplay EGLDisplayVal;
214     EGLFrameTokenANGLE EGLFrameTokenANGLEVal;
215     EGLGetBlobFuncANDROID EGLGetBlobFuncANDROIDVal;
216     EGLImage EGLImageVal;
217     EGLImageKHR EGLImageKHRVal;
218     EGLLabelKHR EGLLabelKHRVal;
219     EGLNativeDisplayType EGLNativeDisplayTypeVal;
220     EGLNativePixmapType EGLNativePixmapTypeVal;
221     EGLNativeWindowType EGLNativeWindowTypeVal;
222     EGLObjectKHR EGLObjectKHRVal;
223     EGLSetBlobFuncANDROID EGLSetBlobFuncANDROIDVal;
224     EGLStreamKHR EGLStreamKHRVal;
225     EGLSurface EGLSurfaceVal;
226     EGLSync EGLSyncVal;
227     EGLSyncKHR EGLSyncKHRVal;
228     EGLTime EGLTimeVal;
229     EGLTimeKHR EGLTimeKHRVal;
230     EGLenum EGLenumVal;
231     EGLint EGLintVal;
232     const EGLint *EGLintConstPointerVal;
233     EGLint *EGLintPointerVal;
234     EGLnsecsANDROID EGLnsecsANDROIDVal;
235     EGLnsecsANDROID *EGLnsecsANDROIDPointerVal;
236     EGLuint64KHR EGLuint64KHRVal;
237     EGLuint64KHR *EGLuint64KHRPointerVal;
238     gl::FenceNVID FenceNVIDVal;
239     const gl::FenceNVID *FenceNVIDConstPointerVal;
240     gl::FenceNVID *FenceNVIDPointerVal;
241     gl::FramebufferID FramebufferIDVal;
242     const gl::FramebufferID *FramebufferIDConstPointerVal;
243     gl::FramebufferID *FramebufferIDPointerVal;
244     GLDEBUGPROC GLDEBUGPROCVal;
245     GLDEBUGPROCKHR GLDEBUGPROCKHRVal;
246     GLGETBLOBPROCANGLE GLGETBLOBPROCANGLEVal;
247     GLSETBLOBPROCANGLE GLSETBLOBPROCANGLEVal;
248     GLbitfield GLbitfieldVal;
249     GLboolean GLbooleanVal;
250     GLboolean *GLbooleanPointerVal;
251     const GLchar *GLcharConstPointerVal;
252     const GLchar *const *GLcharConstPointerPointerVal;
253     GLchar *GLcharPointerVal;
254     GLclampx GLclampxVal;
255     GLeglClientBufferEXT GLeglClientBufferEXTVal;
256     GLenum GLenumVal;
257     const GLenum *GLenumConstPointerVal;
258     GLenum *GLenumPointerVal;
259     GLfixed GLfixedVal;
260     const GLfixed *GLfixedConstPointerVal;
261     GLfixed *GLfixedPointerVal;
262     GLfloat GLfloatVal;
263     const GLfloat *GLfloatConstPointerVal;
264     GLfloat *GLfloatPointerVal;
265     GLint GLintVal;
266     GLint64 GLint64Val;
267     GLint64 *GLint64PointerVal;
268     const GLint *GLintConstPointerVal;
269     GLint *GLintPointerVal;
270     GLintptr GLintptrVal;
271     GLshort GLshortVal;
272     const GLshort *GLshortConstPointerVal;
273     GLsizei GLsizeiVal;
274     const GLsizei *GLsizeiConstPointerVal;
275     GLsizei *GLsizeiPointerVal;
276     GLsizeiptr GLsizeiptrVal;
277     GLsync GLsyncVal;
278     GLubyte GLubyteVal;
279     const GLubyte *GLubyteConstPointerVal;
280     GLubyte *GLubytePointerVal;
281     GLuint GLuintVal;
282     GLuint64 GLuint64Val;
283     const GLuint64 *GLuint64ConstPointerVal;
284     GLuint64 *GLuint64PointerVal;
285     const GLuint *GLuintConstPointerVal;
286     GLuint *GLuintPointerVal;
287     gl::GraphicsResetStatus GraphicsResetStatusVal;
288     gl::HandleType HandleTypeVal;
289     egl::ImageID ImageIDVal;
290     gl::LightParameter LightParameterVal;
291     gl::LogicalOperation LogicalOperationVal;
292     gl::MaterialParameter MaterialParameterVal;
293     gl::MatrixType MatrixTypeVal;
294     gl::MemoryObjectID MemoryObjectIDVal;
295     const gl::MemoryObjectID *MemoryObjectIDConstPointerVal;
296     gl::MemoryObjectID *MemoryObjectIDPointerVal;
297     egl::ObjectType ObjectTypeVal;
298     gl::PointParameter PointParameterVal;
299     gl::PolygonMode PolygonModeVal;
300     gl::PrimitiveMode PrimitiveModeVal;
301     gl::ProgramPipelineID ProgramPipelineIDVal;
302     const gl::ProgramPipelineID *ProgramPipelineIDConstPointerVal;
303     gl::ProgramPipelineID *ProgramPipelineIDPointerVal;
304     gl::ProvokingVertexConvention ProvokingVertexConventionVal;
305     gl::QueryID QueryIDVal;
306     const gl::QueryID *QueryIDConstPointerVal;
307     gl::QueryID *QueryIDPointerVal;
308     gl::QueryType QueryTypeVal;
309     gl::RenderbufferID RenderbufferIDVal;
310     const gl::RenderbufferID *RenderbufferIDConstPointerVal;
311     gl::RenderbufferID *RenderbufferIDPointerVal;
312     gl::SamplerID SamplerIDVal;
313     const gl::SamplerID *SamplerIDConstPointerVal;
314     gl::SamplerID *SamplerIDPointerVal;
315     gl::SemaphoreID SemaphoreIDVal;
316     const gl::SemaphoreID *SemaphoreIDConstPointerVal;
317     gl::SemaphoreID *SemaphoreIDPointerVal;
318     gl::ShaderProgramID ShaderProgramIDVal;
319     const gl::ShaderProgramID *ShaderProgramIDConstPointerVal;
320     gl::ShaderProgramID *ShaderProgramIDPointerVal;
321     gl::ShaderType ShaderTypeVal;
322     gl::ShadingModel ShadingModelVal;
323     egl::SurfaceID SurfaceIDVal;
324     gl::SyncID SyncIDVal;
325     gl::TextureEnvParameter TextureEnvParameterVal;
326     gl::TextureEnvTarget TextureEnvTargetVal;
327     gl::TextureID TextureIDVal;
328     const gl::TextureID *TextureIDConstPointerVal;
329     gl::TextureID *TextureIDPointerVal;
330     gl::TextureTarget TextureTargetVal;
331     gl::TextureType TextureTypeVal;
332     egl::Timestamp TimestampVal;
333     gl::TransformFeedbackID TransformFeedbackIDVal;
334     const gl::TransformFeedbackID *TransformFeedbackIDConstPointerVal;
335     gl::TransformFeedbackID *TransformFeedbackIDPointerVal;
336     gl::UniformBlockIndex UniformBlockIndexVal;
337     gl::UniformLocation UniformLocationVal;
338     gl::VertexArrayID VertexArrayIDVal;
339     const gl::VertexArrayID *VertexArrayIDConstPointerVal;
340     gl::VertexArrayID *VertexArrayIDPointerVal;
341     gl::VertexAttribType VertexAttribTypeVal;
342     const char *charConstPointerVal;
343     egl::Config *egl_ConfigPointerVal;
344     egl::Device *egl_DevicePointerVal;
345     egl::Display *egl_DisplayPointerVal;
346     egl::Stream *egl_StreamPointerVal;
347     egl::SyncID egl_SyncIDVal;
348     const void *voidConstPointerVal;
349     const void *const *voidConstPointerPointerVal;
350     void *voidPointerVal;
351     void **voidPointerPointerVal;
352 };
353 
354 template <ParamType PType, typename T>
355 T GetParamVal(const ParamValue &value);
356 
357 template <>
358 inline const AHardwareBuffer *GetParamVal<ParamType::TAHardwareBufferConstPointer,
359                                           const AHardwareBuffer *>(const ParamValue &value)
360 {
361     return value.AHardwareBufferConstPointerVal;
362 }
363 
364 template <>
365 inline gl::AlphaTestFunc GetParamVal<ParamType::TAlphaTestFunc, gl::AlphaTestFunc>(
366     const ParamValue &value)
367 {
368     return value.AlphaTestFuncVal;
369 }
370 
371 template <>
372 inline gl::BufferBinding GetParamVal<ParamType::TBufferBinding, gl::BufferBinding>(
373     const ParamValue &value)
374 {
375     return value.BufferBindingVal;
376 }
377 
378 template <>
379 inline gl::BufferID GetParamVal<ParamType::TBufferID, gl::BufferID>(const ParamValue &value)
380 {
381     return value.BufferIDVal;
382 }
383 
384 template <>
385 inline const gl::BufferID *GetParamVal<ParamType::TBufferIDConstPointer, const gl::BufferID *>(
386     const ParamValue &value)
387 {
388     return value.BufferIDConstPointerVal;
389 }
390 
391 template <>
392 inline gl::BufferID *GetParamVal<ParamType::TBufferIDPointer, gl::BufferID *>(
393     const ParamValue &value)
394 {
395     return value.BufferIDPointerVal;
396 }
397 
398 template <>
399 inline gl::BufferUsage GetParamVal<ParamType::TBufferUsage, gl::BufferUsage>(
400     const ParamValue &value)
401 {
402     return value.BufferUsageVal;
403 }
404 
405 template <>
406 inline gl::ClientVertexArrayType
407 GetParamVal<ParamType::TClientVertexArrayType, gl::ClientVertexArrayType>(const ParamValue &value)
408 {
409     return value.ClientVertexArrayTypeVal;
410 }
411 
412 template <>
413 inline gl::ClipDepthMode GetParamVal<ParamType::TClipDepthMode, gl::ClipDepthMode>(
414     const ParamValue &value)
415 {
416     return value.ClipDepthModeVal;
417 }
418 
419 template <>
420 inline gl::ClipOrigin GetParamVal<ParamType::TClipOrigin, gl::ClipOrigin>(const ParamValue &value)
421 {
422     return value.ClipOriginVal;
423 }
424 
425 template <>
426 inline egl::CompositorTiming GetParamVal<ParamType::TCompositorTiming, egl::CompositorTiming>(
427     const ParamValue &value)
428 {
429     return value.CompositorTimingVal;
430 }
431 
432 template <>
433 inline gl::ContextID GetParamVal<ParamType::TContextID, gl::ContextID>(const ParamValue &value)
434 {
435     return value.ContextIDVal;
436 }
437 
438 template <>
439 inline gl::CullFaceMode GetParamVal<ParamType::TCullFaceMode, gl::CullFaceMode>(
440     const ParamValue &value)
441 {
442     return value.CullFaceModeVal;
443 }
444 
445 template <>
446 inline gl::DrawElementsType GetParamVal<ParamType::TDrawElementsType, gl::DrawElementsType>(
447     const ParamValue &value)
448 {
449     return value.DrawElementsTypeVal;
450 }
451 
452 template <>
453 inline const EGLAttrib *GetParamVal<ParamType::TEGLAttribConstPointer, const EGLAttrib *>(
454     const ParamValue &value)
455 {
456     return value.EGLAttribConstPointerVal;
457 }
458 
459 template <>
460 inline EGLAttribKHR *GetParamVal<ParamType::TEGLAttribKHRPointer, EGLAttribKHR *>(
461     const ParamValue &value)
462 {
463     return value.EGLAttribKHRPointerVal;
464 }
465 
466 template <>
467 inline EGLAttrib *GetParamVal<ParamType::TEGLAttribPointer, EGLAttrib *>(const ParamValue &value)
468 {
469     return value.EGLAttribPointerVal;
470 }
471 
472 template <>
473 inline EGLBoolean GetParamVal<ParamType::TEGLBoolean, EGLBoolean>(const ParamValue &value)
474 {
475     return value.EGLBooleanVal;
476 }
477 
478 template <>
479 inline EGLBoolean *GetParamVal<ParamType::TEGLBooleanPointer, EGLBoolean *>(const ParamValue &value)
480 {
481     return value.EGLBooleanPointerVal;
482 }
483 
484 template <>
485 inline EGLClientBuffer GetParamVal<ParamType::TEGLClientBuffer, EGLClientBuffer>(
486     const ParamValue &value)
487 {
488     return value.EGLClientBufferVal;
489 }
490 
491 template <>
492 inline EGLConfig *GetParamVal<ParamType::TEGLConfigPointer, EGLConfig *>(const ParamValue &value)
493 {
494     return value.EGLConfigPointerVal;
495 }
496 
497 template <>
498 inline EGLContext GetParamVal<ParamType::TEGLContext, EGLContext>(const ParamValue &value)
499 {
500     return value.EGLContextVal;
501 }
502 
503 template <>
504 inline EGLDEBUGPROCKHR GetParamVal<ParamType::TEGLDEBUGPROCKHR, EGLDEBUGPROCKHR>(
505     const ParamValue &value)
506 {
507     return value.EGLDEBUGPROCKHRVal;
508 }
509 
510 template <>
511 inline EGLDeviceEXT GetParamVal<ParamType::TEGLDeviceEXT, EGLDeviceEXT>(const ParamValue &value)
512 {
513     return value.EGLDeviceEXTVal;
514 }
515 
516 template <>
517 inline EGLDisplay GetParamVal<ParamType::TEGLDisplay, EGLDisplay>(const ParamValue &value)
518 {
519     return value.EGLDisplayVal;
520 }
521 
522 template <>
523 inline EGLFrameTokenANGLE GetParamVal<ParamType::TEGLFrameTokenANGLE, EGLFrameTokenANGLE>(
524     const ParamValue &value)
525 {
526     return value.EGLFrameTokenANGLEVal;
527 }
528 
529 template <>
530 inline EGLGetBlobFuncANDROID GetParamVal<ParamType::TEGLGetBlobFuncANDROID, EGLGetBlobFuncANDROID>(
531     const ParamValue &value)
532 {
533     return value.EGLGetBlobFuncANDROIDVal;
534 }
535 
536 template <>
537 inline EGLImage GetParamVal<ParamType::TEGLImage, EGLImage>(const ParamValue &value)
538 {
539     return value.EGLImageVal;
540 }
541 
542 template <>
543 inline EGLImageKHR GetParamVal<ParamType::TEGLImageKHR, EGLImageKHR>(const ParamValue &value)
544 {
545     return value.EGLImageKHRVal;
546 }
547 
548 template <>
549 inline EGLLabelKHR GetParamVal<ParamType::TEGLLabelKHR, EGLLabelKHR>(const ParamValue &value)
550 {
551     return value.EGLLabelKHRVal;
552 }
553 
554 template <>
555 inline EGLNativeDisplayType GetParamVal<ParamType::TEGLNativeDisplayType, EGLNativeDisplayType>(
556     const ParamValue &value)
557 {
558     return value.EGLNativeDisplayTypeVal;
559 }
560 
561 template <>
562 inline EGLNativePixmapType GetParamVal<ParamType::TEGLNativePixmapType, EGLNativePixmapType>(
563     const ParamValue &value)
564 {
565     return value.EGLNativePixmapTypeVal;
566 }
567 
568 template <>
569 inline EGLNativeWindowType GetParamVal<ParamType::TEGLNativeWindowType, EGLNativeWindowType>(
570     const ParamValue &value)
571 {
572     return value.EGLNativeWindowTypeVal;
573 }
574 
575 template <>
576 inline EGLObjectKHR GetParamVal<ParamType::TEGLObjectKHR, EGLObjectKHR>(const ParamValue &value)
577 {
578     return value.EGLObjectKHRVal;
579 }
580 
581 template <>
582 inline EGLSetBlobFuncANDROID GetParamVal<ParamType::TEGLSetBlobFuncANDROID, EGLSetBlobFuncANDROID>(
583     const ParamValue &value)
584 {
585     return value.EGLSetBlobFuncANDROIDVal;
586 }
587 
588 template <>
589 inline EGLStreamKHR GetParamVal<ParamType::TEGLStreamKHR, EGLStreamKHR>(const ParamValue &value)
590 {
591     return value.EGLStreamKHRVal;
592 }
593 
594 template <>
595 inline EGLSurface GetParamVal<ParamType::TEGLSurface, EGLSurface>(const ParamValue &value)
596 {
597     return value.EGLSurfaceVal;
598 }
599 
600 template <>
601 inline EGLSync GetParamVal<ParamType::TEGLSync, EGLSync>(const ParamValue &value)
602 {
603     return value.EGLSyncVal;
604 }
605 
606 template <>
607 inline EGLSyncKHR GetParamVal<ParamType::TEGLSyncKHR, EGLSyncKHR>(const ParamValue &value)
608 {
609     return value.EGLSyncKHRVal;
610 }
611 
612 template <>
613 inline EGLTime GetParamVal<ParamType::TEGLTime, EGLTime>(const ParamValue &value)
614 {
615     return value.EGLTimeVal;
616 }
617 
618 template <>
619 inline EGLTimeKHR GetParamVal<ParamType::TEGLTimeKHR, EGLTimeKHR>(const ParamValue &value)
620 {
621     return value.EGLTimeKHRVal;
622 }
623 
624 template <>
625 inline EGLenum GetParamVal<ParamType::TEGLenum, EGLenum>(const ParamValue &value)
626 {
627     return value.EGLenumVal;
628 }
629 
630 template <>
631 inline EGLint GetParamVal<ParamType::TEGLint, EGLint>(const ParamValue &value)
632 {
633     return value.EGLintVal;
634 }
635 
636 template <>
637 inline const EGLint *GetParamVal<ParamType::TEGLintConstPointer, const EGLint *>(
638     const ParamValue &value)
639 {
640     return value.EGLintConstPointerVal;
641 }
642 
643 template <>
644 inline EGLint *GetParamVal<ParamType::TEGLintPointer, EGLint *>(const ParamValue &value)
645 {
646     return value.EGLintPointerVal;
647 }
648 
649 template <>
650 inline EGLnsecsANDROID GetParamVal<ParamType::TEGLnsecsANDROID, EGLnsecsANDROID>(
651     const ParamValue &value)
652 {
653     return value.EGLnsecsANDROIDVal;
654 }
655 
656 template <>
657 inline EGLnsecsANDROID *GetParamVal<ParamType::TEGLnsecsANDROIDPointer, EGLnsecsANDROID *>(
658     const ParamValue &value)
659 {
660     return value.EGLnsecsANDROIDPointerVal;
661 }
662 
663 template <>
664 inline EGLuint64KHR GetParamVal<ParamType::TEGLuint64KHR, EGLuint64KHR>(const ParamValue &value)
665 {
666     return value.EGLuint64KHRVal;
667 }
668 
669 template <>
670 inline EGLuint64KHR *GetParamVal<ParamType::TEGLuint64KHRPointer, EGLuint64KHR *>(
671     const ParamValue &value)
672 {
673     return value.EGLuint64KHRPointerVal;
674 }
675 
676 template <>
677 inline gl::FenceNVID GetParamVal<ParamType::TFenceNVID, gl::FenceNVID>(const ParamValue &value)
678 {
679     return value.FenceNVIDVal;
680 }
681 
682 template <>
683 inline const gl::FenceNVID *GetParamVal<ParamType::TFenceNVIDConstPointer, const gl::FenceNVID *>(
684     const ParamValue &value)
685 {
686     return value.FenceNVIDConstPointerVal;
687 }
688 
689 template <>
690 inline gl::FenceNVID *GetParamVal<ParamType::TFenceNVIDPointer, gl::FenceNVID *>(
691     const ParamValue &value)
692 {
693     return value.FenceNVIDPointerVal;
694 }
695 
696 template <>
697 inline gl::FramebufferID GetParamVal<ParamType::TFramebufferID, gl::FramebufferID>(
698     const ParamValue &value)
699 {
700     return value.FramebufferIDVal;
701 }
702 
703 template <>
704 inline const gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDConstPointer,
705                                             const gl::FramebufferID *>(const ParamValue &value)
706 {
707     return value.FramebufferIDConstPointerVal;
708 }
709 
710 template <>
711 inline gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDPointer, gl::FramebufferID *>(
712     const ParamValue &value)
713 {
714     return value.FramebufferIDPointerVal;
715 }
716 
717 template <>
718 inline GLDEBUGPROC GetParamVal<ParamType::TGLDEBUGPROC, GLDEBUGPROC>(const ParamValue &value)
719 {
720     return value.GLDEBUGPROCVal;
721 }
722 
723 template <>
724 inline GLDEBUGPROCKHR GetParamVal<ParamType::TGLDEBUGPROCKHR, GLDEBUGPROCKHR>(
725     const ParamValue &value)
726 {
727     return value.GLDEBUGPROCKHRVal;
728 }
729 
730 template <>
731 inline GLGETBLOBPROCANGLE GetParamVal<ParamType::TGLGETBLOBPROCANGLE, GLGETBLOBPROCANGLE>(
732     const ParamValue &value)
733 {
734     return value.GLGETBLOBPROCANGLEVal;
735 }
736 
737 template <>
738 inline GLSETBLOBPROCANGLE GetParamVal<ParamType::TGLSETBLOBPROCANGLE, GLSETBLOBPROCANGLE>(
739     const ParamValue &value)
740 {
741     return value.GLSETBLOBPROCANGLEVal;
742 }
743 
744 template <>
745 inline GLbitfield GetParamVal<ParamType::TGLbitfield, GLbitfield>(const ParamValue &value)
746 {
747     return value.GLbitfieldVal;
748 }
749 
750 template <>
751 inline GLboolean GetParamVal<ParamType::TGLboolean, GLboolean>(const ParamValue &value)
752 {
753     return value.GLbooleanVal;
754 }
755 
756 template <>
757 inline GLboolean *GetParamVal<ParamType::TGLbooleanPointer, GLboolean *>(const ParamValue &value)
758 {
759     return value.GLbooleanPointerVal;
760 }
761 
762 template <>
763 inline const GLchar *GetParamVal<ParamType::TGLcharConstPointer, const GLchar *>(
764     const ParamValue &value)
765 {
766     return value.GLcharConstPointerVal;
767 }
768 
769 template <>
770 inline const GLchar *const *
771 GetParamVal<ParamType::TGLcharConstPointerPointer, const GLchar *const *>(const ParamValue &value)
772 {
773     return value.GLcharConstPointerPointerVal;
774 }
775 
776 template <>
777 inline GLchar *GetParamVal<ParamType::TGLcharPointer, GLchar *>(const ParamValue &value)
778 {
779     return value.GLcharPointerVal;
780 }
781 
782 template <>
783 inline GLclampx GetParamVal<ParamType::TGLclampx, GLclampx>(const ParamValue &value)
784 {
785     return value.GLclampxVal;
786 }
787 
788 template <>
789 inline GLeglClientBufferEXT GetParamVal<ParamType::TGLeglClientBufferEXT, GLeglClientBufferEXT>(
790     const ParamValue &value)
791 {
792     return value.GLeglClientBufferEXTVal;
793 }
794 
795 template <>
796 inline GLenum GetParamVal<ParamType::TGLenum, GLenum>(const ParamValue &value)
797 {
798     return value.GLenumVal;
799 }
800 
801 template <>
802 inline const GLenum *GetParamVal<ParamType::TGLenumConstPointer, const GLenum *>(
803     const ParamValue &value)
804 {
805     return value.GLenumConstPointerVal;
806 }
807 
808 template <>
809 inline GLenum *GetParamVal<ParamType::TGLenumPointer, GLenum *>(const ParamValue &value)
810 {
811     return value.GLenumPointerVal;
812 }
813 
814 template <>
815 inline GLfixed GetParamVal<ParamType::TGLfixed, GLfixed>(const ParamValue &value)
816 {
817     return value.GLfixedVal;
818 }
819 
820 template <>
821 inline const GLfixed *GetParamVal<ParamType::TGLfixedConstPointer, const GLfixed *>(
822     const ParamValue &value)
823 {
824     return value.GLfixedConstPointerVal;
825 }
826 
827 template <>
828 inline GLfixed *GetParamVal<ParamType::TGLfixedPointer, GLfixed *>(const ParamValue &value)
829 {
830     return value.GLfixedPointerVal;
831 }
832 
833 template <>
834 inline GLfloat GetParamVal<ParamType::TGLfloat, GLfloat>(const ParamValue &value)
835 {
836     return value.GLfloatVal;
837 }
838 
839 template <>
840 inline const GLfloat *GetParamVal<ParamType::TGLfloatConstPointer, const GLfloat *>(
841     const ParamValue &value)
842 {
843     return value.GLfloatConstPointerVal;
844 }
845 
846 template <>
847 inline GLfloat *GetParamVal<ParamType::TGLfloatPointer, GLfloat *>(const ParamValue &value)
848 {
849     return value.GLfloatPointerVal;
850 }
851 
852 template <>
853 inline GLint GetParamVal<ParamType::TGLint, GLint>(const ParamValue &value)
854 {
855     return value.GLintVal;
856 }
857 
858 template <>
859 inline GLint64 GetParamVal<ParamType::TGLint64, GLint64>(const ParamValue &value)
860 {
861     return value.GLint64Val;
862 }
863 
864 template <>
865 inline GLint64 *GetParamVal<ParamType::TGLint64Pointer, GLint64 *>(const ParamValue &value)
866 {
867     return value.GLint64PointerVal;
868 }
869 
870 template <>
871 inline const GLint *GetParamVal<ParamType::TGLintConstPointer, const GLint *>(
872     const ParamValue &value)
873 {
874     return value.GLintConstPointerVal;
875 }
876 
877 template <>
878 inline GLint *GetParamVal<ParamType::TGLintPointer, GLint *>(const ParamValue &value)
879 {
880     return value.GLintPointerVal;
881 }
882 
883 template <>
884 inline GLintptr GetParamVal<ParamType::TGLintptr, GLintptr>(const ParamValue &value)
885 {
886     return value.GLintptrVal;
887 }
888 
889 template <>
890 inline GLshort GetParamVal<ParamType::TGLshort, GLshort>(const ParamValue &value)
891 {
892     return value.GLshortVal;
893 }
894 
895 template <>
896 inline const GLshort *GetParamVal<ParamType::TGLshortConstPointer, const GLshort *>(
897     const ParamValue &value)
898 {
899     return value.GLshortConstPointerVal;
900 }
901 
902 template <>
903 inline GLsizei GetParamVal<ParamType::TGLsizei, GLsizei>(const ParamValue &value)
904 {
905     return value.GLsizeiVal;
906 }
907 
908 template <>
909 inline const GLsizei *GetParamVal<ParamType::TGLsizeiConstPointer, const GLsizei *>(
910     const ParamValue &value)
911 {
912     return value.GLsizeiConstPointerVal;
913 }
914 
915 template <>
916 inline GLsizei *GetParamVal<ParamType::TGLsizeiPointer, GLsizei *>(const ParamValue &value)
917 {
918     return value.GLsizeiPointerVal;
919 }
920 
921 template <>
922 inline GLsizeiptr GetParamVal<ParamType::TGLsizeiptr, GLsizeiptr>(const ParamValue &value)
923 {
924     return value.GLsizeiptrVal;
925 }
926 
927 template <>
928 inline GLsync GetParamVal<ParamType::TGLsync, GLsync>(const ParamValue &value)
929 {
930     return value.GLsyncVal;
931 }
932 
933 template <>
934 inline GLubyte GetParamVal<ParamType::TGLubyte, GLubyte>(const ParamValue &value)
935 {
936     return value.GLubyteVal;
937 }
938 
939 template <>
940 inline const GLubyte *GetParamVal<ParamType::TGLubyteConstPointer, const GLubyte *>(
941     const ParamValue &value)
942 {
943     return value.GLubyteConstPointerVal;
944 }
945 
946 template <>
947 inline GLubyte *GetParamVal<ParamType::TGLubytePointer, GLubyte *>(const ParamValue &value)
948 {
949     return value.GLubytePointerVal;
950 }
951 
952 template <>
953 inline GLuint GetParamVal<ParamType::TGLuint, GLuint>(const ParamValue &value)
954 {
955     return value.GLuintVal;
956 }
957 
958 template <>
959 inline GLuint64 GetParamVal<ParamType::TGLuint64, GLuint64>(const ParamValue &value)
960 {
961     return value.GLuint64Val;
962 }
963 
964 template <>
965 inline const GLuint64 *GetParamVal<ParamType::TGLuint64ConstPointer, const GLuint64 *>(
966     const ParamValue &value)
967 {
968     return value.GLuint64ConstPointerVal;
969 }
970 
971 template <>
972 inline GLuint64 *GetParamVal<ParamType::TGLuint64Pointer, GLuint64 *>(const ParamValue &value)
973 {
974     return value.GLuint64PointerVal;
975 }
976 
977 template <>
978 inline const GLuint *GetParamVal<ParamType::TGLuintConstPointer, const GLuint *>(
979     const ParamValue &value)
980 {
981     return value.GLuintConstPointerVal;
982 }
983 
984 template <>
985 inline GLuint *GetParamVal<ParamType::TGLuintPointer, GLuint *>(const ParamValue &value)
986 {
987     return value.GLuintPointerVal;
988 }
989 
990 template <>
991 inline gl::GraphicsResetStatus
992 GetParamVal<ParamType::TGraphicsResetStatus, gl::GraphicsResetStatus>(const ParamValue &value)
993 {
994     return value.GraphicsResetStatusVal;
995 }
996 
997 template <>
998 inline gl::HandleType GetParamVal<ParamType::THandleType, gl::HandleType>(const ParamValue &value)
999 {
1000     return value.HandleTypeVal;
1001 }
1002 
1003 template <>
1004 inline egl::ImageID GetParamVal<ParamType::TImageID, egl::ImageID>(const ParamValue &value)
1005 {
1006     return value.ImageIDVal;
1007 }
1008 
1009 template <>
1010 inline gl::LightParameter GetParamVal<ParamType::TLightParameter, gl::LightParameter>(
1011     const ParamValue &value)
1012 {
1013     return value.LightParameterVal;
1014 }
1015 
1016 template <>
1017 inline gl::LogicalOperation GetParamVal<ParamType::TLogicalOperation, gl::LogicalOperation>(
1018     const ParamValue &value)
1019 {
1020     return value.LogicalOperationVal;
1021 }
1022 
1023 template <>
1024 inline gl::MaterialParameter GetParamVal<ParamType::TMaterialParameter, gl::MaterialParameter>(
1025     const ParamValue &value)
1026 {
1027     return value.MaterialParameterVal;
1028 }
1029 
1030 template <>
1031 inline gl::MatrixType GetParamVal<ParamType::TMatrixType, gl::MatrixType>(const ParamValue &value)
1032 {
1033     return value.MatrixTypeVal;
1034 }
1035 
1036 template <>
1037 inline gl::MemoryObjectID GetParamVal<ParamType::TMemoryObjectID, gl::MemoryObjectID>(
1038     const ParamValue &value)
1039 {
1040     return value.MemoryObjectIDVal;
1041 }
1042 
1043 template <>
1044 inline const gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDConstPointer,
1045                                              const gl::MemoryObjectID *>(const ParamValue &value)
1046 {
1047     return value.MemoryObjectIDConstPointerVal;
1048 }
1049 
1050 template <>
1051 inline gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDPointer, gl::MemoryObjectID *>(
1052     const ParamValue &value)
1053 {
1054     return value.MemoryObjectIDPointerVal;
1055 }
1056 
1057 template <>
1058 inline egl::ObjectType GetParamVal<ParamType::TObjectType, egl::ObjectType>(const ParamValue &value)
1059 {
1060     return value.ObjectTypeVal;
1061 }
1062 
1063 template <>
1064 inline gl::PointParameter GetParamVal<ParamType::TPointParameter, gl::PointParameter>(
1065     const ParamValue &value)
1066 {
1067     return value.PointParameterVal;
1068 }
1069 
1070 template <>
1071 inline gl::PolygonMode GetParamVal<ParamType::TPolygonMode, gl::PolygonMode>(
1072     const ParamValue &value)
1073 {
1074     return value.PolygonModeVal;
1075 }
1076 
1077 template <>
1078 inline gl::PrimitiveMode GetParamVal<ParamType::TPrimitiveMode, gl::PrimitiveMode>(
1079     const ParamValue &value)
1080 {
1081     return value.PrimitiveModeVal;
1082 }
1083 
1084 template <>
1085 inline gl::ProgramPipelineID GetParamVal<ParamType::TProgramPipelineID, gl::ProgramPipelineID>(
1086     const ParamValue &value)
1087 {
1088     return value.ProgramPipelineIDVal;
1089 }
1090 
1091 template <>
1092 inline const gl::ProgramPipelineID *
1093 GetParamVal<ParamType::TProgramPipelineIDConstPointer, const gl::ProgramPipelineID *>(
1094     const ParamValue &value)
1095 {
1096     return value.ProgramPipelineIDConstPointerVal;
1097 }
1098 
1099 template <>
1100 inline gl::ProgramPipelineID *
1101 GetParamVal<ParamType::TProgramPipelineIDPointer, gl::ProgramPipelineID *>(const ParamValue &value)
1102 {
1103     return value.ProgramPipelineIDPointerVal;
1104 }
1105 
1106 template <>
1107 inline gl::ProvokingVertexConvention
1108 GetParamVal<ParamType::TProvokingVertexConvention, gl::ProvokingVertexConvention>(
1109     const ParamValue &value)
1110 {
1111     return value.ProvokingVertexConventionVal;
1112 }
1113 
1114 template <>
1115 inline gl::QueryID GetParamVal<ParamType::TQueryID, gl::QueryID>(const ParamValue &value)
1116 {
1117     return value.QueryIDVal;
1118 }
1119 
1120 template <>
1121 inline const gl::QueryID *GetParamVal<ParamType::TQueryIDConstPointer, const gl::QueryID *>(
1122     const ParamValue &value)
1123 {
1124     return value.QueryIDConstPointerVal;
1125 }
1126 
1127 template <>
1128 inline gl::QueryID *GetParamVal<ParamType::TQueryIDPointer, gl::QueryID *>(const ParamValue &value)
1129 {
1130     return value.QueryIDPointerVal;
1131 }
1132 
1133 template <>
1134 inline gl::QueryType GetParamVal<ParamType::TQueryType, gl::QueryType>(const ParamValue &value)
1135 {
1136     return value.QueryTypeVal;
1137 }
1138 
1139 template <>
1140 inline gl::RenderbufferID GetParamVal<ParamType::TRenderbufferID, gl::RenderbufferID>(
1141     const ParamValue &value)
1142 {
1143     return value.RenderbufferIDVal;
1144 }
1145 
1146 template <>
1147 inline const gl::RenderbufferID *GetParamVal<ParamType::TRenderbufferIDConstPointer,
1148                                              const gl::RenderbufferID *>(const ParamValue &value)
1149 {
1150     return value.RenderbufferIDConstPointerVal;
1151 }
1152 
1153 template <>
1154 inline gl::RenderbufferID *GetParamVal<ParamType::TRenderbufferIDPointer, gl::RenderbufferID *>(
1155     const ParamValue &value)
1156 {
1157     return value.RenderbufferIDPointerVal;
1158 }
1159 
1160 template <>
1161 inline gl::SamplerID GetParamVal<ParamType::TSamplerID, gl::SamplerID>(const ParamValue &value)
1162 {
1163     return value.SamplerIDVal;
1164 }
1165 
1166 template <>
1167 inline const gl::SamplerID *GetParamVal<ParamType::TSamplerIDConstPointer, const gl::SamplerID *>(
1168     const ParamValue &value)
1169 {
1170     return value.SamplerIDConstPointerVal;
1171 }
1172 
1173 template <>
1174 inline gl::SamplerID *GetParamVal<ParamType::TSamplerIDPointer, gl::SamplerID *>(
1175     const ParamValue &value)
1176 {
1177     return value.SamplerIDPointerVal;
1178 }
1179 
1180 template <>
1181 inline gl::SemaphoreID GetParamVal<ParamType::TSemaphoreID, gl::SemaphoreID>(
1182     const ParamValue &value)
1183 {
1184     return value.SemaphoreIDVal;
1185 }
1186 
1187 template <>
1188 inline const gl::SemaphoreID *
1189 GetParamVal<ParamType::TSemaphoreIDConstPointer, const gl::SemaphoreID *>(const ParamValue &value)
1190 {
1191     return value.SemaphoreIDConstPointerVal;
1192 }
1193 
1194 template <>
1195 inline gl::SemaphoreID *GetParamVal<ParamType::TSemaphoreIDPointer, gl::SemaphoreID *>(
1196     const ParamValue &value)
1197 {
1198     return value.SemaphoreIDPointerVal;
1199 }
1200 
1201 template <>
1202 inline gl::ShaderProgramID GetParamVal<ParamType::TShaderProgramID, gl::ShaderProgramID>(
1203     const ParamValue &value)
1204 {
1205     return value.ShaderProgramIDVal;
1206 }
1207 
1208 template <>
1209 inline const gl::ShaderProgramID *GetParamVal<ParamType::TShaderProgramIDConstPointer,
1210                                               const gl::ShaderProgramID *>(const ParamValue &value)
1211 {
1212     return value.ShaderProgramIDConstPointerVal;
1213 }
1214 
1215 template <>
1216 inline gl::ShaderProgramID *GetParamVal<ParamType::TShaderProgramIDPointer, gl::ShaderProgramID *>(
1217     const ParamValue &value)
1218 {
1219     return value.ShaderProgramIDPointerVal;
1220 }
1221 
1222 template <>
1223 inline gl::ShaderType GetParamVal<ParamType::TShaderType, gl::ShaderType>(const ParamValue &value)
1224 {
1225     return value.ShaderTypeVal;
1226 }
1227 
1228 template <>
1229 inline gl::ShadingModel GetParamVal<ParamType::TShadingModel, gl::ShadingModel>(
1230     const ParamValue &value)
1231 {
1232     return value.ShadingModelVal;
1233 }
1234 
1235 template <>
1236 inline egl::SurfaceID GetParamVal<ParamType::TSurfaceID, egl::SurfaceID>(const ParamValue &value)
1237 {
1238     return value.SurfaceIDVal;
1239 }
1240 
1241 template <>
1242 inline gl::SyncID GetParamVal<ParamType::TSyncID, gl::SyncID>(const ParamValue &value)
1243 {
1244     return value.SyncIDVal;
1245 }
1246 
1247 template <>
1248 inline gl::TextureEnvParameter
1249 GetParamVal<ParamType::TTextureEnvParameter, gl::TextureEnvParameter>(const ParamValue &value)
1250 {
1251     return value.TextureEnvParameterVal;
1252 }
1253 
1254 template <>
1255 inline gl::TextureEnvTarget GetParamVal<ParamType::TTextureEnvTarget, gl::TextureEnvTarget>(
1256     const ParamValue &value)
1257 {
1258     return value.TextureEnvTargetVal;
1259 }
1260 
1261 template <>
1262 inline gl::TextureID GetParamVal<ParamType::TTextureID, gl::TextureID>(const ParamValue &value)
1263 {
1264     return value.TextureIDVal;
1265 }
1266 
1267 template <>
1268 inline const gl::TextureID *GetParamVal<ParamType::TTextureIDConstPointer, const gl::TextureID *>(
1269     const ParamValue &value)
1270 {
1271     return value.TextureIDConstPointerVal;
1272 }
1273 
1274 template <>
1275 inline gl::TextureID *GetParamVal<ParamType::TTextureIDPointer, gl::TextureID *>(
1276     const ParamValue &value)
1277 {
1278     return value.TextureIDPointerVal;
1279 }
1280 
1281 template <>
1282 inline gl::TextureTarget GetParamVal<ParamType::TTextureTarget, gl::TextureTarget>(
1283     const ParamValue &value)
1284 {
1285     return value.TextureTargetVal;
1286 }
1287 
1288 template <>
1289 inline gl::TextureType GetParamVal<ParamType::TTextureType, gl::TextureType>(
1290     const ParamValue &value)
1291 {
1292     return value.TextureTypeVal;
1293 }
1294 
1295 template <>
1296 inline egl::Timestamp GetParamVal<ParamType::TTimestamp, egl::Timestamp>(const ParamValue &value)
1297 {
1298     return value.TimestampVal;
1299 }
1300 
1301 template <>
1302 inline gl::TransformFeedbackID
1303 GetParamVal<ParamType::TTransformFeedbackID, gl::TransformFeedbackID>(const ParamValue &value)
1304 {
1305     return value.TransformFeedbackIDVal;
1306 }
1307 
1308 template <>
1309 inline const gl::TransformFeedbackID *
1310 GetParamVal<ParamType::TTransformFeedbackIDConstPointer, const gl::TransformFeedbackID *>(
1311     const ParamValue &value)
1312 {
1313     return value.TransformFeedbackIDConstPointerVal;
1314 }
1315 
1316 template <>
1317 inline gl::TransformFeedbackID *GetParamVal<ParamType::TTransformFeedbackIDPointer,
1318                                             gl::TransformFeedbackID *>(const ParamValue &value)
1319 {
1320     return value.TransformFeedbackIDPointerVal;
1321 }
1322 
1323 template <>
1324 inline gl::UniformBlockIndex GetParamVal<ParamType::TUniformBlockIndex, gl::UniformBlockIndex>(
1325     const ParamValue &value)
1326 {
1327     return value.UniformBlockIndexVal;
1328 }
1329 
1330 template <>
1331 inline gl::UniformLocation GetParamVal<ParamType::TUniformLocation, gl::UniformLocation>(
1332     const ParamValue &value)
1333 {
1334     return value.UniformLocationVal;
1335 }
1336 
1337 template <>
1338 inline gl::VertexArrayID GetParamVal<ParamType::TVertexArrayID, gl::VertexArrayID>(
1339     const ParamValue &value)
1340 {
1341     return value.VertexArrayIDVal;
1342 }
1343 
1344 template <>
1345 inline const gl::VertexArrayID *GetParamVal<ParamType::TVertexArrayIDConstPointer,
1346                                             const gl::VertexArrayID *>(const ParamValue &value)
1347 {
1348     return value.VertexArrayIDConstPointerVal;
1349 }
1350 
1351 template <>
1352 inline gl::VertexArrayID *GetParamVal<ParamType::TVertexArrayIDPointer, gl::VertexArrayID *>(
1353     const ParamValue &value)
1354 {
1355     return value.VertexArrayIDPointerVal;
1356 }
1357 
1358 template <>
1359 inline gl::VertexAttribType GetParamVal<ParamType::TVertexAttribType, gl::VertexAttribType>(
1360     const ParamValue &value)
1361 {
1362     return value.VertexAttribTypeVal;
1363 }
1364 
1365 template <>
1366 inline const char *GetParamVal<ParamType::TcharConstPointer, const char *>(const ParamValue &value)
1367 {
1368     return value.charConstPointerVal;
1369 }
1370 
1371 template <>
1372 inline egl::Config *GetParamVal<ParamType::Tegl_ConfigPointer, egl::Config *>(
1373     const ParamValue &value)
1374 {
1375     return value.egl_ConfigPointerVal;
1376 }
1377 
1378 template <>
1379 inline egl::Device *GetParamVal<ParamType::Tegl_DevicePointer, egl::Device *>(
1380     const ParamValue &value)
1381 {
1382     return value.egl_DevicePointerVal;
1383 }
1384 
1385 template <>
1386 inline egl::Display *GetParamVal<ParamType::Tegl_DisplayPointer, egl::Display *>(
1387     const ParamValue &value)
1388 {
1389     return value.egl_DisplayPointerVal;
1390 }
1391 
1392 template <>
1393 inline egl::Stream *GetParamVal<ParamType::Tegl_StreamPointer, egl::Stream *>(
1394     const ParamValue &value)
1395 {
1396     return value.egl_StreamPointerVal;
1397 }
1398 
1399 template <>
1400 inline egl::SyncID GetParamVal<ParamType::Tegl_SyncID, egl::SyncID>(const ParamValue &value)
1401 {
1402     return value.egl_SyncIDVal;
1403 }
1404 
1405 template <>
1406 inline const void *GetParamVal<ParamType::TvoidConstPointer, const void *>(const ParamValue &value)
1407 {
1408     return value.voidConstPointerVal;
1409 }
1410 
1411 template <>
1412 inline const void *const *GetParamVal<ParamType::TvoidConstPointerPointer, const void *const *>(
1413     const ParamValue &value)
1414 {
1415     return value.voidConstPointerPointerVal;
1416 }
1417 
1418 template <>
1419 inline void *GetParamVal<ParamType::TvoidPointer, void *>(const ParamValue &value)
1420 {
1421     return value.voidPointerVal;
1422 }
1423 
1424 template <>
1425 inline void **GetParamVal<ParamType::TvoidPointerPointer, void **>(const ParamValue &value)
1426 {
1427     return value.voidPointerPointerVal;
1428 }
1429 
1430 template <ParamType PType, typename T>
GetParamVal(const ParamValue & value)1431 T GetParamVal(const ParamValue &value)
1432 {
1433     UNREACHABLE();
1434     return T();
1435 }
1436 
1437 template <typename T>
AccessParamValue(ParamType paramType,const ParamValue & value)1438 T AccessParamValue(ParamType paramType, const ParamValue &value)
1439 {
1440     switch (paramType)
1441     {
1442         case ParamType::TAHardwareBufferConstPointer:
1443             return GetParamVal<ParamType::TAHardwareBufferConstPointer, T>(value);
1444         case ParamType::TAlphaTestFunc:
1445             return GetParamVal<ParamType::TAlphaTestFunc, T>(value);
1446         case ParamType::TBufferBinding:
1447             return GetParamVal<ParamType::TBufferBinding, T>(value);
1448         case ParamType::TBufferID:
1449             return GetParamVal<ParamType::TBufferID, T>(value);
1450         case ParamType::TBufferIDConstPointer:
1451             return GetParamVal<ParamType::TBufferIDConstPointer, T>(value);
1452         case ParamType::TBufferIDPointer:
1453             return GetParamVal<ParamType::TBufferIDPointer, T>(value);
1454         case ParamType::TBufferUsage:
1455             return GetParamVal<ParamType::TBufferUsage, T>(value);
1456         case ParamType::TClientVertexArrayType:
1457             return GetParamVal<ParamType::TClientVertexArrayType, T>(value);
1458         case ParamType::TClipDepthMode:
1459             return GetParamVal<ParamType::TClipDepthMode, T>(value);
1460         case ParamType::TClipOrigin:
1461             return GetParamVal<ParamType::TClipOrigin, T>(value);
1462         case ParamType::TCompositorTiming:
1463             return GetParamVal<ParamType::TCompositorTiming, T>(value);
1464         case ParamType::TContextID:
1465             return GetParamVal<ParamType::TContextID, T>(value);
1466         case ParamType::TCullFaceMode:
1467             return GetParamVal<ParamType::TCullFaceMode, T>(value);
1468         case ParamType::TDrawElementsType:
1469             return GetParamVal<ParamType::TDrawElementsType, T>(value);
1470         case ParamType::TEGLAttribConstPointer:
1471             return GetParamVal<ParamType::TEGLAttribConstPointer, T>(value);
1472         case ParamType::TEGLAttribKHRPointer:
1473             return GetParamVal<ParamType::TEGLAttribKHRPointer, T>(value);
1474         case ParamType::TEGLAttribPointer:
1475             return GetParamVal<ParamType::TEGLAttribPointer, T>(value);
1476         case ParamType::TEGLBoolean:
1477             return GetParamVal<ParamType::TEGLBoolean, T>(value);
1478         case ParamType::TEGLBooleanPointer:
1479             return GetParamVal<ParamType::TEGLBooleanPointer, T>(value);
1480         case ParamType::TEGLClientBuffer:
1481             return GetParamVal<ParamType::TEGLClientBuffer, T>(value);
1482         case ParamType::TEGLConfigPointer:
1483             return GetParamVal<ParamType::TEGLConfigPointer, T>(value);
1484         case ParamType::TEGLContext:
1485             return GetParamVal<ParamType::TEGLContext, T>(value);
1486         case ParamType::TEGLDEBUGPROCKHR:
1487             return GetParamVal<ParamType::TEGLDEBUGPROCKHR, T>(value);
1488         case ParamType::TEGLDeviceEXT:
1489             return GetParamVal<ParamType::TEGLDeviceEXT, T>(value);
1490         case ParamType::TEGLDisplay:
1491             return GetParamVal<ParamType::TEGLDisplay, T>(value);
1492         case ParamType::TEGLFrameTokenANGLE:
1493             return GetParamVal<ParamType::TEGLFrameTokenANGLE, T>(value);
1494         case ParamType::TEGLGetBlobFuncANDROID:
1495             return GetParamVal<ParamType::TEGLGetBlobFuncANDROID, T>(value);
1496         case ParamType::TEGLImage:
1497             return GetParamVal<ParamType::TEGLImage, T>(value);
1498         case ParamType::TEGLImageKHR:
1499             return GetParamVal<ParamType::TEGLImageKHR, T>(value);
1500         case ParamType::TEGLLabelKHR:
1501             return GetParamVal<ParamType::TEGLLabelKHR, T>(value);
1502         case ParamType::TEGLNativeDisplayType:
1503             return GetParamVal<ParamType::TEGLNativeDisplayType, T>(value);
1504         case ParamType::TEGLNativePixmapType:
1505             return GetParamVal<ParamType::TEGLNativePixmapType, T>(value);
1506         case ParamType::TEGLNativeWindowType:
1507             return GetParamVal<ParamType::TEGLNativeWindowType, T>(value);
1508         case ParamType::TEGLObjectKHR:
1509             return GetParamVal<ParamType::TEGLObjectKHR, T>(value);
1510         case ParamType::TEGLSetBlobFuncANDROID:
1511             return GetParamVal<ParamType::TEGLSetBlobFuncANDROID, T>(value);
1512         case ParamType::TEGLStreamKHR:
1513             return GetParamVal<ParamType::TEGLStreamKHR, T>(value);
1514         case ParamType::TEGLSurface:
1515             return GetParamVal<ParamType::TEGLSurface, T>(value);
1516         case ParamType::TEGLSync:
1517             return GetParamVal<ParamType::TEGLSync, T>(value);
1518         case ParamType::TEGLSyncKHR:
1519             return GetParamVal<ParamType::TEGLSyncKHR, T>(value);
1520         case ParamType::TEGLTime:
1521             return GetParamVal<ParamType::TEGLTime, T>(value);
1522         case ParamType::TEGLTimeKHR:
1523             return GetParamVal<ParamType::TEGLTimeKHR, T>(value);
1524         case ParamType::TEGLenum:
1525             return GetParamVal<ParamType::TEGLenum, T>(value);
1526         case ParamType::TEGLint:
1527             return GetParamVal<ParamType::TEGLint, T>(value);
1528         case ParamType::TEGLintConstPointer:
1529             return GetParamVal<ParamType::TEGLintConstPointer, T>(value);
1530         case ParamType::TEGLintPointer:
1531             return GetParamVal<ParamType::TEGLintPointer, T>(value);
1532         case ParamType::TEGLnsecsANDROID:
1533             return GetParamVal<ParamType::TEGLnsecsANDROID, T>(value);
1534         case ParamType::TEGLnsecsANDROIDPointer:
1535             return GetParamVal<ParamType::TEGLnsecsANDROIDPointer, T>(value);
1536         case ParamType::TEGLuint64KHR:
1537             return GetParamVal<ParamType::TEGLuint64KHR, T>(value);
1538         case ParamType::TEGLuint64KHRPointer:
1539             return GetParamVal<ParamType::TEGLuint64KHRPointer, T>(value);
1540         case ParamType::TFenceNVID:
1541             return GetParamVal<ParamType::TFenceNVID, T>(value);
1542         case ParamType::TFenceNVIDConstPointer:
1543             return GetParamVal<ParamType::TFenceNVIDConstPointer, T>(value);
1544         case ParamType::TFenceNVIDPointer:
1545             return GetParamVal<ParamType::TFenceNVIDPointer, T>(value);
1546         case ParamType::TFramebufferID:
1547             return GetParamVal<ParamType::TFramebufferID, T>(value);
1548         case ParamType::TFramebufferIDConstPointer:
1549             return GetParamVal<ParamType::TFramebufferIDConstPointer, T>(value);
1550         case ParamType::TFramebufferIDPointer:
1551             return GetParamVal<ParamType::TFramebufferIDPointer, T>(value);
1552         case ParamType::TGLDEBUGPROC:
1553             return GetParamVal<ParamType::TGLDEBUGPROC, T>(value);
1554         case ParamType::TGLDEBUGPROCKHR:
1555             return GetParamVal<ParamType::TGLDEBUGPROCKHR, T>(value);
1556         case ParamType::TGLGETBLOBPROCANGLE:
1557             return GetParamVal<ParamType::TGLGETBLOBPROCANGLE, T>(value);
1558         case ParamType::TGLSETBLOBPROCANGLE:
1559             return GetParamVal<ParamType::TGLSETBLOBPROCANGLE, T>(value);
1560         case ParamType::TGLbitfield:
1561             return GetParamVal<ParamType::TGLbitfield, T>(value);
1562         case ParamType::TGLboolean:
1563             return GetParamVal<ParamType::TGLboolean, T>(value);
1564         case ParamType::TGLbooleanPointer:
1565             return GetParamVal<ParamType::TGLbooleanPointer, T>(value);
1566         case ParamType::TGLcharConstPointer:
1567             return GetParamVal<ParamType::TGLcharConstPointer, T>(value);
1568         case ParamType::TGLcharConstPointerPointer:
1569             return GetParamVal<ParamType::TGLcharConstPointerPointer, T>(value);
1570         case ParamType::TGLcharPointer:
1571             return GetParamVal<ParamType::TGLcharPointer, T>(value);
1572         case ParamType::TGLclampx:
1573             return GetParamVal<ParamType::TGLclampx, T>(value);
1574         case ParamType::TGLeglClientBufferEXT:
1575             return GetParamVal<ParamType::TGLeglClientBufferEXT, T>(value);
1576         case ParamType::TGLenum:
1577             return GetParamVal<ParamType::TGLenum, T>(value);
1578         case ParamType::TGLenumConstPointer:
1579             return GetParamVal<ParamType::TGLenumConstPointer, T>(value);
1580         case ParamType::TGLenumPointer:
1581             return GetParamVal<ParamType::TGLenumPointer, T>(value);
1582         case ParamType::TGLfixed:
1583             return GetParamVal<ParamType::TGLfixed, T>(value);
1584         case ParamType::TGLfixedConstPointer:
1585             return GetParamVal<ParamType::TGLfixedConstPointer, T>(value);
1586         case ParamType::TGLfixedPointer:
1587             return GetParamVal<ParamType::TGLfixedPointer, T>(value);
1588         case ParamType::TGLfloat:
1589             return GetParamVal<ParamType::TGLfloat, T>(value);
1590         case ParamType::TGLfloatConstPointer:
1591             return GetParamVal<ParamType::TGLfloatConstPointer, T>(value);
1592         case ParamType::TGLfloatPointer:
1593             return GetParamVal<ParamType::TGLfloatPointer, T>(value);
1594         case ParamType::TGLint:
1595             return GetParamVal<ParamType::TGLint, T>(value);
1596         case ParamType::TGLint64:
1597             return GetParamVal<ParamType::TGLint64, T>(value);
1598         case ParamType::TGLint64Pointer:
1599             return GetParamVal<ParamType::TGLint64Pointer, T>(value);
1600         case ParamType::TGLintConstPointer:
1601             return GetParamVal<ParamType::TGLintConstPointer, T>(value);
1602         case ParamType::TGLintPointer:
1603             return GetParamVal<ParamType::TGLintPointer, T>(value);
1604         case ParamType::TGLintptr:
1605             return GetParamVal<ParamType::TGLintptr, T>(value);
1606         case ParamType::TGLshort:
1607             return GetParamVal<ParamType::TGLshort, T>(value);
1608         case ParamType::TGLshortConstPointer:
1609             return GetParamVal<ParamType::TGLshortConstPointer, T>(value);
1610         case ParamType::TGLsizei:
1611             return GetParamVal<ParamType::TGLsizei, T>(value);
1612         case ParamType::TGLsizeiConstPointer:
1613             return GetParamVal<ParamType::TGLsizeiConstPointer, T>(value);
1614         case ParamType::TGLsizeiPointer:
1615             return GetParamVal<ParamType::TGLsizeiPointer, T>(value);
1616         case ParamType::TGLsizeiptr:
1617             return GetParamVal<ParamType::TGLsizeiptr, T>(value);
1618         case ParamType::TGLsync:
1619             return GetParamVal<ParamType::TGLsync, T>(value);
1620         case ParamType::TGLubyte:
1621             return GetParamVal<ParamType::TGLubyte, T>(value);
1622         case ParamType::TGLubyteConstPointer:
1623             return GetParamVal<ParamType::TGLubyteConstPointer, T>(value);
1624         case ParamType::TGLubytePointer:
1625             return GetParamVal<ParamType::TGLubytePointer, T>(value);
1626         case ParamType::TGLuint:
1627             return GetParamVal<ParamType::TGLuint, T>(value);
1628         case ParamType::TGLuint64:
1629             return GetParamVal<ParamType::TGLuint64, T>(value);
1630         case ParamType::TGLuint64ConstPointer:
1631             return GetParamVal<ParamType::TGLuint64ConstPointer, T>(value);
1632         case ParamType::TGLuint64Pointer:
1633             return GetParamVal<ParamType::TGLuint64Pointer, T>(value);
1634         case ParamType::TGLuintConstPointer:
1635             return GetParamVal<ParamType::TGLuintConstPointer, T>(value);
1636         case ParamType::TGLuintPointer:
1637             return GetParamVal<ParamType::TGLuintPointer, T>(value);
1638         case ParamType::TGraphicsResetStatus:
1639             return GetParamVal<ParamType::TGraphicsResetStatus, T>(value);
1640         case ParamType::THandleType:
1641             return GetParamVal<ParamType::THandleType, T>(value);
1642         case ParamType::TImageID:
1643             return GetParamVal<ParamType::TImageID, T>(value);
1644         case ParamType::TLightParameter:
1645             return GetParamVal<ParamType::TLightParameter, T>(value);
1646         case ParamType::TLogicalOperation:
1647             return GetParamVal<ParamType::TLogicalOperation, T>(value);
1648         case ParamType::TMaterialParameter:
1649             return GetParamVal<ParamType::TMaterialParameter, T>(value);
1650         case ParamType::TMatrixType:
1651             return GetParamVal<ParamType::TMatrixType, T>(value);
1652         case ParamType::TMemoryObjectID:
1653             return GetParamVal<ParamType::TMemoryObjectID, T>(value);
1654         case ParamType::TMemoryObjectIDConstPointer:
1655             return GetParamVal<ParamType::TMemoryObjectIDConstPointer, T>(value);
1656         case ParamType::TMemoryObjectIDPointer:
1657             return GetParamVal<ParamType::TMemoryObjectIDPointer, T>(value);
1658         case ParamType::TObjectType:
1659             return GetParamVal<ParamType::TObjectType, T>(value);
1660         case ParamType::TPointParameter:
1661             return GetParamVal<ParamType::TPointParameter, T>(value);
1662         case ParamType::TPolygonMode:
1663             return GetParamVal<ParamType::TPolygonMode, T>(value);
1664         case ParamType::TPrimitiveMode:
1665             return GetParamVal<ParamType::TPrimitiveMode, T>(value);
1666         case ParamType::TProgramPipelineID:
1667             return GetParamVal<ParamType::TProgramPipelineID, T>(value);
1668         case ParamType::TProgramPipelineIDConstPointer:
1669             return GetParamVal<ParamType::TProgramPipelineIDConstPointer, T>(value);
1670         case ParamType::TProgramPipelineIDPointer:
1671             return GetParamVal<ParamType::TProgramPipelineIDPointer, T>(value);
1672         case ParamType::TProvokingVertexConvention:
1673             return GetParamVal<ParamType::TProvokingVertexConvention, T>(value);
1674         case ParamType::TQueryID:
1675             return GetParamVal<ParamType::TQueryID, T>(value);
1676         case ParamType::TQueryIDConstPointer:
1677             return GetParamVal<ParamType::TQueryIDConstPointer, T>(value);
1678         case ParamType::TQueryIDPointer:
1679             return GetParamVal<ParamType::TQueryIDPointer, T>(value);
1680         case ParamType::TQueryType:
1681             return GetParamVal<ParamType::TQueryType, T>(value);
1682         case ParamType::TRenderbufferID:
1683             return GetParamVal<ParamType::TRenderbufferID, T>(value);
1684         case ParamType::TRenderbufferIDConstPointer:
1685             return GetParamVal<ParamType::TRenderbufferIDConstPointer, T>(value);
1686         case ParamType::TRenderbufferIDPointer:
1687             return GetParamVal<ParamType::TRenderbufferIDPointer, T>(value);
1688         case ParamType::TSamplerID:
1689             return GetParamVal<ParamType::TSamplerID, T>(value);
1690         case ParamType::TSamplerIDConstPointer:
1691             return GetParamVal<ParamType::TSamplerIDConstPointer, T>(value);
1692         case ParamType::TSamplerIDPointer:
1693             return GetParamVal<ParamType::TSamplerIDPointer, T>(value);
1694         case ParamType::TSemaphoreID:
1695             return GetParamVal<ParamType::TSemaphoreID, T>(value);
1696         case ParamType::TSemaphoreIDConstPointer:
1697             return GetParamVal<ParamType::TSemaphoreIDConstPointer, T>(value);
1698         case ParamType::TSemaphoreIDPointer:
1699             return GetParamVal<ParamType::TSemaphoreIDPointer, T>(value);
1700         case ParamType::TShaderProgramID:
1701             return GetParamVal<ParamType::TShaderProgramID, T>(value);
1702         case ParamType::TShaderProgramIDConstPointer:
1703             return GetParamVal<ParamType::TShaderProgramIDConstPointer, T>(value);
1704         case ParamType::TShaderProgramIDPointer:
1705             return GetParamVal<ParamType::TShaderProgramIDPointer, T>(value);
1706         case ParamType::TShaderType:
1707             return GetParamVal<ParamType::TShaderType, T>(value);
1708         case ParamType::TShadingModel:
1709             return GetParamVal<ParamType::TShadingModel, T>(value);
1710         case ParamType::TSurfaceID:
1711             return GetParamVal<ParamType::TSurfaceID, T>(value);
1712         case ParamType::TSyncID:
1713             return GetParamVal<ParamType::TSyncID, T>(value);
1714         case ParamType::TTextureEnvParameter:
1715             return GetParamVal<ParamType::TTextureEnvParameter, T>(value);
1716         case ParamType::TTextureEnvTarget:
1717             return GetParamVal<ParamType::TTextureEnvTarget, T>(value);
1718         case ParamType::TTextureID:
1719             return GetParamVal<ParamType::TTextureID, T>(value);
1720         case ParamType::TTextureIDConstPointer:
1721             return GetParamVal<ParamType::TTextureIDConstPointer, T>(value);
1722         case ParamType::TTextureIDPointer:
1723             return GetParamVal<ParamType::TTextureIDPointer, T>(value);
1724         case ParamType::TTextureTarget:
1725             return GetParamVal<ParamType::TTextureTarget, T>(value);
1726         case ParamType::TTextureType:
1727             return GetParamVal<ParamType::TTextureType, T>(value);
1728         case ParamType::TTimestamp:
1729             return GetParamVal<ParamType::TTimestamp, T>(value);
1730         case ParamType::TTransformFeedbackID:
1731             return GetParamVal<ParamType::TTransformFeedbackID, T>(value);
1732         case ParamType::TTransformFeedbackIDConstPointer:
1733             return GetParamVal<ParamType::TTransformFeedbackIDConstPointer, T>(value);
1734         case ParamType::TTransformFeedbackIDPointer:
1735             return GetParamVal<ParamType::TTransformFeedbackIDPointer, T>(value);
1736         case ParamType::TUniformBlockIndex:
1737             return GetParamVal<ParamType::TUniformBlockIndex, T>(value);
1738         case ParamType::TUniformLocation:
1739             return GetParamVal<ParamType::TUniformLocation, T>(value);
1740         case ParamType::TVertexArrayID:
1741             return GetParamVal<ParamType::TVertexArrayID, T>(value);
1742         case ParamType::TVertexArrayIDConstPointer:
1743             return GetParamVal<ParamType::TVertexArrayIDConstPointer, T>(value);
1744         case ParamType::TVertexArrayIDPointer:
1745             return GetParamVal<ParamType::TVertexArrayIDPointer, T>(value);
1746         case ParamType::TVertexAttribType:
1747             return GetParamVal<ParamType::TVertexAttribType, T>(value);
1748         case ParamType::TcharConstPointer:
1749             return GetParamVal<ParamType::TcharConstPointer, T>(value);
1750         case ParamType::Tegl_ConfigPointer:
1751             return GetParamVal<ParamType::Tegl_ConfigPointer, T>(value);
1752         case ParamType::Tegl_DevicePointer:
1753             return GetParamVal<ParamType::Tegl_DevicePointer, T>(value);
1754         case ParamType::Tegl_DisplayPointer:
1755             return GetParamVal<ParamType::Tegl_DisplayPointer, T>(value);
1756         case ParamType::Tegl_StreamPointer:
1757             return GetParamVal<ParamType::Tegl_StreamPointer, T>(value);
1758         case ParamType::Tegl_SyncID:
1759             return GetParamVal<ParamType::Tegl_SyncID, T>(value);
1760         case ParamType::TvoidConstPointer:
1761             return GetParamVal<ParamType::TvoidConstPointer, T>(value);
1762         case ParamType::TvoidConstPointerPointer:
1763             return GetParamVal<ParamType::TvoidConstPointerPointer, T>(value);
1764         case ParamType::TvoidPointer:
1765             return GetParamVal<ParamType::TvoidPointer, T>(value);
1766         case ParamType::TvoidPointerPointer:
1767             return GetParamVal<ParamType::TvoidPointerPointer, T>(value);
1768     }
1769     UNREACHABLE();
1770     return T();
1771 }
1772 
1773 template <ParamType PType, typename T>
1774 void SetParamVal(T valueIn, ParamValue *valueOut);
1775 
1776 template <>
1777 inline void SetParamVal<ParamType::TAHardwareBufferConstPointer>(const AHardwareBuffer *valueIn,
1778                                                                  ParamValue *valueOut)
1779 {
1780     valueOut->AHardwareBufferConstPointerVal = valueIn;
1781 }
1782 
1783 template <>
1784 inline void SetParamVal<ParamType::TAlphaTestFunc>(gl::AlphaTestFunc valueIn, ParamValue *valueOut)
1785 {
1786     valueOut->AlphaTestFuncVal = valueIn;
1787 }
1788 
1789 template <>
1790 inline void SetParamVal<ParamType::TBufferBinding>(gl::BufferBinding valueIn, ParamValue *valueOut)
1791 {
1792     valueOut->BufferBindingVal = valueIn;
1793 }
1794 
1795 template <>
1796 inline void SetParamVal<ParamType::TBufferID>(gl::BufferID valueIn, ParamValue *valueOut)
1797 {
1798     valueOut->BufferIDVal = valueIn;
1799 }
1800 
1801 template <>
1802 inline void SetParamVal<ParamType::TBufferIDConstPointer>(const gl::BufferID *valueIn,
1803                                                           ParamValue *valueOut)
1804 {
1805     valueOut->BufferIDConstPointerVal = valueIn;
1806 }
1807 
1808 template <>
1809 inline void SetParamVal<ParamType::TBufferIDPointer>(gl::BufferID *valueIn, ParamValue *valueOut)
1810 {
1811     valueOut->BufferIDPointerVal = valueIn;
1812 }
1813 
1814 template <>
1815 inline void SetParamVal<ParamType::TBufferUsage>(gl::BufferUsage valueIn, ParamValue *valueOut)
1816 {
1817     valueOut->BufferUsageVal = valueIn;
1818 }
1819 
1820 template <>
1821 inline void SetParamVal<ParamType::TClientVertexArrayType>(gl::ClientVertexArrayType valueIn,
1822                                                            ParamValue *valueOut)
1823 {
1824     valueOut->ClientVertexArrayTypeVal = valueIn;
1825 }
1826 
1827 template <>
1828 inline void SetParamVal<ParamType::TClipDepthMode>(gl::ClipDepthMode valueIn, ParamValue *valueOut)
1829 {
1830     valueOut->ClipDepthModeVal = valueIn;
1831 }
1832 
1833 template <>
1834 inline void SetParamVal<ParamType::TClipOrigin>(gl::ClipOrigin valueIn, ParamValue *valueOut)
1835 {
1836     valueOut->ClipOriginVal = valueIn;
1837 }
1838 
1839 template <>
1840 inline void SetParamVal<ParamType::TCompositorTiming>(egl::CompositorTiming valueIn,
1841                                                       ParamValue *valueOut)
1842 {
1843     valueOut->CompositorTimingVal = valueIn;
1844 }
1845 
1846 template <>
1847 inline void SetParamVal<ParamType::TContextID>(gl::ContextID valueIn, ParamValue *valueOut)
1848 {
1849     valueOut->ContextIDVal = valueIn;
1850 }
1851 
1852 template <>
1853 inline void SetParamVal<ParamType::TCullFaceMode>(gl::CullFaceMode valueIn, ParamValue *valueOut)
1854 {
1855     valueOut->CullFaceModeVal = valueIn;
1856 }
1857 
1858 template <>
1859 inline void SetParamVal<ParamType::TDrawElementsType>(gl::DrawElementsType valueIn,
1860                                                       ParamValue *valueOut)
1861 {
1862     valueOut->DrawElementsTypeVal = valueIn;
1863 }
1864 
1865 template <>
1866 inline void SetParamVal<ParamType::TEGLAttribConstPointer>(const EGLAttrib *valueIn,
1867                                                            ParamValue *valueOut)
1868 {
1869     valueOut->EGLAttribConstPointerVal = valueIn;
1870 }
1871 
1872 template <>
1873 inline void SetParamVal<ParamType::TEGLAttribKHRPointer>(EGLAttribKHR *valueIn,
1874                                                          ParamValue *valueOut)
1875 {
1876     valueOut->EGLAttribKHRPointerVal = valueIn;
1877 }
1878 
1879 template <>
1880 inline void SetParamVal<ParamType::TEGLAttribPointer>(EGLAttrib *valueIn, ParamValue *valueOut)
1881 {
1882     valueOut->EGLAttribPointerVal = valueIn;
1883 }
1884 
1885 template <>
1886 inline void SetParamVal<ParamType::TEGLBoolean>(EGLBoolean valueIn, ParamValue *valueOut)
1887 {
1888     valueOut->EGLBooleanVal = valueIn;
1889 }
1890 
1891 template <>
1892 inline void SetParamVal<ParamType::TEGLBooleanPointer>(EGLBoolean *valueIn, ParamValue *valueOut)
1893 {
1894     valueOut->EGLBooleanPointerVal = valueIn;
1895 }
1896 
1897 template <>
1898 inline void SetParamVal<ParamType::TEGLClientBuffer>(EGLClientBuffer valueIn, ParamValue *valueOut)
1899 {
1900     valueOut->EGLClientBufferVal = valueIn;
1901 }
1902 
1903 template <>
1904 inline void SetParamVal<ParamType::TEGLConfigPointer>(EGLConfig *valueIn, ParamValue *valueOut)
1905 {
1906     valueOut->EGLConfigPointerVal = valueIn;
1907 }
1908 
1909 template <>
1910 inline void SetParamVal<ParamType::TEGLContext>(EGLContext valueIn, ParamValue *valueOut)
1911 {
1912     valueOut->EGLContextVal = valueIn;
1913 }
1914 
1915 template <>
1916 inline void SetParamVal<ParamType::TEGLDEBUGPROCKHR>(EGLDEBUGPROCKHR valueIn, ParamValue *valueOut)
1917 {
1918     valueOut->EGLDEBUGPROCKHRVal = valueIn;
1919 }
1920 
1921 template <>
1922 inline void SetParamVal<ParamType::TEGLDeviceEXT>(EGLDeviceEXT valueIn, ParamValue *valueOut)
1923 {
1924     valueOut->EGLDeviceEXTVal = valueIn;
1925 }
1926 
1927 template <>
1928 inline void SetParamVal<ParamType::TEGLDisplay>(EGLDisplay valueIn, ParamValue *valueOut)
1929 {
1930     valueOut->EGLDisplayVal = valueIn;
1931 }
1932 
1933 template <>
1934 inline void SetParamVal<ParamType::TEGLFrameTokenANGLE>(EGLFrameTokenANGLE valueIn,
1935                                                         ParamValue *valueOut)
1936 {
1937     valueOut->EGLFrameTokenANGLEVal = valueIn;
1938 }
1939 
1940 template <>
1941 inline void SetParamVal<ParamType::TEGLGetBlobFuncANDROID>(EGLGetBlobFuncANDROID valueIn,
1942                                                            ParamValue *valueOut)
1943 {
1944     valueOut->EGLGetBlobFuncANDROIDVal = valueIn;
1945 }
1946 
1947 template <>
1948 inline void SetParamVal<ParamType::TEGLImage>(EGLImage valueIn, ParamValue *valueOut)
1949 {
1950     valueOut->EGLImageVal = valueIn;
1951 }
1952 
1953 template <>
1954 inline void SetParamVal<ParamType::TEGLImageKHR>(EGLImageKHR valueIn, ParamValue *valueOut)
1955 {
1956     valueOut->EGLImageKHRVal = valueIn;
1957 }
1958 
1959 template <>
1960 inline void SetParamVal<ParamType::TEGLLabelKHR>(EGLLabelKHR valueIn, ParamValue *valueOut)
1961 {
1962     valueOut->EGLLabelKHRVal = valueIn;
1963 }
1964 
1965 template <>
1966 inline void SetParamVal<ParamType::TEGLNativeDisplayType>(EGLNativeDisplayType valueIn,
1967                                                           ParamValue *valueOut)
1968 {
1969     valueOut->EGLNativeDisplayTypeVal = valueIn;
1970 }
1971 
1972 template <>
1973 inline void SetParamVal<ParamType::TEGLNativePixmapType>(EGLNativePixmapType valueIn,
1974                                                          ParamValue *valueOut)
1975 {
1976     valueOut->EGLNativePixmapTypeVal = valueIn;
1977 }
1978 
1979 template <>
1980 inline void SetParamVal<ParamType::TEGLNativeWindowType>(EGLNativeWindowType valueIn,
1981                                                          ParamValue *valueOut)
1982 {
1983     valueOut->EGLNativeWindowTypeVal = valueIn;
1984 }
1985 
1986 template <>
1987 inline void SetParamVal<ParamType::TEGLObjectKHR>(EGLObjectKHR valueIn, ParamValue *valueOut)
1988 {
1989     valueOut->EGLObjectKHRVal = valueIn;
1990 }
1991 
1992 template <>
1993 inline void SetParamVal<ParamType::TEGLSetBlobFuncANDROID>(EGLSetBlobFuncANDROID valueIn,
1994                                                            ParamValue *valueOut)
1995 {
1996     valueOut->EGLSetBlobFuncANDROIDVal = valueIn;
1997 }
1998 
1999 template <>
2000 inline void SetParamVal<ParamType::TEGLStreamKHR>(EGLStreamKHR valueIn, ParamValue *valueOut)
2001 {
2002     valueOut->EGLStreamKHRVal = valueIn;
2003 }
2004 
2005 template <>
2006 inline void SetParamVal<ParamType::TEGLSurface>(EGLSurface valueIn, ParamValue *valueOut)
2007 {
2008     valueOut->EGLSurfaceVal = valueIn;
2009 }
2010 
2011 template <>
2012 inline void SetParamVal<ParamType::TEGLSync>(EGLSync valueIn, ParamValue *valueOut)
2013 {
2014     valueOut->EGLSyncVal = valueIn;
2015 }
2016 
2017 template <>
2018 inline void SetParamVal<ParamType::TEGLSyncKHR>(EGLSyncKHR valueIn, ParamValue *valueOut)
2019 {
2020     valueOut->EGLSyncKHRVal = valueIn;
2021 }
2022 
2023 template <>
2024 inline void SetParamVal<ParamType::TEGLTime>(EGLTime valueIn, ParamValue *valueOut)
2025 {
2026     valueOut->EGLTimeVal = valueIn;
2027 }
2028 
2029 template <>
2030 inline void SetParamVal<ParamType::TEGLTimeKHR>(EGLTimeKHR valueIn, ParamValue *valueOut)
2031 {
2032     valueOut->EGLTimeKHRVal = valueIn;
2033 }
2034 
2035 template <>
2036 inline void SetParamVal<ParamType::TEGLenum>(EGLenum valueIn, ParamValue *valueOut)
2037 {
2038     valueOut->EGLenumVal = valueIn;
2039 }
2040 
2041 template <>
2042 inline void SetParamVal<ParamType::TEGLint>(EGLint valueIn, ParamValue *valueOut)
2043 {
2044     valueOut->EGLintVal = valueIn;
2045 }
2046 
2047 template <>
2048 inline void SetParamVal<ParamType::TEGLintConstPointer>(const EGLint *valueIn, ParamValue *valueOut)
2049 {
2050     valueOut->EGLintConstPointerVal = valueIn;
2051 }
2052 
2053 template <>
2054 inline void SetParamVal<ParamType::TEGLintPointer>(EGLint *valueIn, ParamValue *valueOut)
2055 {
2056     valueOut->EGLintPointerVal = valueIn;
2057 }
2058 
2059 template <>
2060 inline void SetParamVal<ParamType::TEGLnsecsANDROID>(EGLnsecsANDROID valueIn, ParamValue *valueOut)
2061 {
2062     valueOut->EGLnsecsANDROIDVal = valueIn;
2063 }
2064 
2065 template <>
2066 inline void SetParamVal<ParamType::TEGLnsecsANDROIDPointer>(EGLnsecsANDROID *valueIn,
2067                                                             ParamValue *valueOut)
2068 {
2069     valueOut->EGLnsecsANDROIDPointerVal = valueIn;
2070 }
2071 
2072 template <>
2073 inline void SetParamVal<ParamType::TEGLuint64KHR>(EGLuint64KHR valueIn, ParamValue *valueOut)
2074 {
2075     valueOut->EGLuint64KHRVal = valueIn;
2076 }
2077 
2078 template <>
2079 inline void SetParamVal<ParamType::TEGLuint64KHRPointer>(EGLuint64KHR *valueIn,
2080                                                          ParamValue *valueOut)
2081 {
2082     valueOut->EGLuint64KHRPointerVal = valueIn;
2083 }
2084 
2085 template <>
2086 inline void SetParamVal<ParamType::TFenceNVID>(gl::FenceNVID valueIn, ParamValue *valueOut)
2087 {
2088     valueOut->FenceNVIDVal = valueIn;
2089 }
2090 
2091 template <>
2092 inline void SetParamVal<ParamType::TFenceNVIDConstPointer>(const gl::FenceNVID *valueIn,
2093                                                            ParamValue *valueOut)
2094 {
2095     valueOut->FenceNVIDConstPointerVal = valueIn;
2096 }
2097 
2098 template <>
2099 inline void SetParamVal<ParamType::TFenceNVIDPointer>(gl::FenceNVID *valueIn, ParamValue *valueOut)
2100 {
2101     valueOut->FenceNVIDPointerVal = valueIn;
2102 }
2103 
2104 template <>
2105 inline void SetParamVal<ParamType::TFramebufferID>(gl::FramebufferID valueIn, ParamValue *valueOut)
2106 {
2107     valueOut->FramebufferIDVal = valueIn;
2108 }
2109 
2110 template <>
2111 inline void SetParamVal<ParamType::TFramebufferIDConstPointer>(const gl::FramebufferID *valueIn,
2112                                                                ParamValue *valueOut)
2113 {
2114     valueOut->FramebufferIDConstPointerVal = valueIn;
2115 }
2116 
2117 template <>
2118 inline void SetParamVal<ParamType::TFramebufferIDPointer>(gl::FramebufferID *valueIn,
2119                                                           ParamValue *valueOut)
2120 {
2121     valueOut->FramebufferIDPointerVal = valueIn;
2122 }
2123 
2124 template <>
2125 inline void SetParamVal<ParamType::TGLDEBUGPROC>(GLDEBUGPROC valueIn, ParamValue *valueOut)
2126 {
2127     valueOut->GLDEBUGPROCVal = valueIn;
2128 }
2129 
2130 template <>
2131 inline void SetParamVal<ParamType::TGLDEBUGPROCKHR>(GLDEBUGPROCKHR valueIn, ParamValue *valueOut)
2132 {
2133     valueOut->GLDEBUGPROCKHRVal = valueIn;
2134 }
2135 
2136 template <>
2137 inline void SetParamVal<ParamType::TGLGETBLOBPROCANGLE>(GLGETBLOBPROCANGLE valueIn,
2138                                                         ParamValue *valueOut)
2139 {
2140     valueOut->GLGETBLOBPROCANGLEVal = valueIn;
2141 }
2142 
2143 template <>
2144 inline void SetParamVal<ParamType::TGLSETBLOBPROCANGLE>(GLSETBLOBPROCANGLE valueIn,
2145                                                         ParamValue *valueOut)
2146 {
2147     valueOut->GLSETBLOBPROCANGLEVal = valueIn;
2148 }
2149 
2150 template <>
2151 inline void SetParamVal<ParamType::TGLbitfield>(GLbitfield valueIn, ParamValue *valueOut)
2152 {
2153     valueOut->GLbitfieldVal = valueIn;
2154 }
2155 
2156 template <>
2157 inline void SetParamVal<ParamType::TGLboolean>(GLboolean valueIn, ParamValue *valueOut)
2158 {
2159     valueOut->GLbooleanVal = valueIn;
2160 }
2161 
2162 template <>
2163 inline void SetParamVal<ParamType::TGLbooleanPointer>(GLboolean *valueIn, ParamValue *valueOut)
2164 {
2165     valueOut->GLbooleanPointerVal = valueIn;
2166 }
2167 
2168 template <>
2169 inline void SetParamVal<ParamType::TGLcharConstPointer>(const GLchar *valueIn, ParamValue *valueOut)
2170 {
2171     valueOut->GLcharConstPointerVal = valueIn;
2172 }
2173 
2174 template <>
2175 inline void SetParamVal<ParamType::TGLcharConstPointerPointer>(const GLchar *const *valueIn,
2176                                                                ParamValue *valueOut)
2177 {
2178     valueOut->GLcharConstPointerPointerVal = valueIn;
2179 }
2180 
2181 template <>
2182 inline void SetParamVal<ParamType::TGLcharPointer>(GLchar *valueIn, ParamValue *valueOut)
2183 {
2184     valueOut->GLcharPointerVal = valueIn;
2185 }
2186 
2187 template <>
2188 inline void SetParamVal<ParamType::TGLclampx>(GLclampx valueIn, ParamValue *valueOut)
2189 {
2190     valueOut->GLclampxVal = valueIn;
2191 }
2192 
2193 template <>
2194 inline void SetParamVal<ParamType::TGLeglClientBufferEXT>(GLeglClientBufferEXT valueIn,
2195                                                           ParamValue *valueOut)
2196 {
2197     valueOut->GLeglClientBufferEXTVal = valueIn;
2198 }
2199 
2200 template <>
2201 inline void SetParamVal<ParamType::TGLenum>(GLenum valueIn, ParamValue *valueOut)
2202 {
2203     valueOut->GLenumVal = valueIn;
2204 }
2205 
2206 template <>
2207 inline void SetParamVal<ParamType::TGLenumConstPointer>(const GLenum *valueIn, ParamValue *valueOut)
2208 {
2209     valueOut->GLenumConstPointerVal = valueIn;
2210 }
2211 
2212 template <>
2213 inline void SetParamVal<ParamType::TGLenumPointer>(GLenum *valueIn, ParamValue *valueOut)
2214 {
2215     valueOut->GLenumPointerVal = valueIn;
2216 }
2217 
2218 template <>
2219 inline void SetParamVal<ParamType::TGLfixed>(GLfixed valueIn, ParamValue *valueOut)
2220 {
2221     valueOut->GLfixedVal = valueIn;
2222 }
2223 
2224 template <>
2225 inline void SetParamVal<ParamType::TGLfixedConstPointer>(const GLfixed *valueIn,
2226                                                          ParamValue *valueOut)
2227 {
2228     valueOut->GLfixedConstPointerVal = valueIn;
2229 }
2230 
2231 template <>
2232 inline void SetParamVal<ParamType::TGLfixedPointer>(GLfixed *valueIn, ParamValue *valueOut)
2233 {
2234     valueOut->GLfixedPointerVal = valueIn;
2235 }
2236 
2237 template <>
2238 inline void SetParamVal<ParamType::TGLfloat>(GLfloat valueIn, ParamValue *valueOut)
2239 {
2240     valueOut->GLfloatVal = valueIn;
2241 }
2242 
2243 template <>
2244 inline void SetParamVal<ParamType::TGLfloatConstPointer>(const GLfloat *valueIn,
2245                                                          ParamValue *valueOut)
2246 {
2247     valueOut->GLfloatConstPointerVal = valueIn;
2248 }
2249 
2250 template <>
2251 inline void SetParamVal<ParamType::TGLfloatPointer>(GLfloat *valueIn, ParamValue *valueOut)
2252 {
2253     valueOut->GLfloatPointerVal = valueIn;
2254 }
2255 
2256 template <>
2257 inline void SetParamVal<ParamType::TGLint>(GLint valueIn, ParamValue *valueOut)
2258 {
2259     valueOut->GLintVal = valueIn;
2260 }
2261 
2262 template <>
2263 inline void SetParamVal<ParamType::TGLint64>(GLint64 valueIn, ParamValue *valueOut)
2264 {
2265     valueOut->GLint64Val = valueIn;
2266 }
2267 
2268 template <>
2269 inline void SetParamVal<ParamType::TGLint64Pointer>(GLint64 *valueIn, ParamValue *valueOut)
2270 {
2271     valueOut->GLint64PointerVal = valueIn;
2272 }
2273 
2274 template <>
2275 inline void SetParamVal<ParamType::TGLintConstPointer>(const GLint *valueIn, ParamValue *valueOut)
2276 {
2277     valueOut->GLintConstPointerVal = valueIn;
2278 }
2279 
2280 template <>
2281 inline void SetParamVal<ParamType::TGLintPointer>(GLint *valueIn, ParamValue *valueOut)
2282 {
2283     valueOut->GLintPointerVal = valueIn;
2284 }
2285 
2286 template <>
2287 inline void SetParamVal<ParamType::TGLintptr>(GLintptr valueIn, ParamValue *valueOut)
2288 {
2289     valueOut->GLintptrVal = valueIn;
2290 }
2291 
2292 template <>
2293 inline void SetParamVal<ParamType::TGLshort>(GLshort valueIn, ParamValue *valueOut)
2294 {
2295     valueOut->GLshortVal = valueIn;
2296 }
2297 
2298 template <>
2299 inline void SetParamVal<ParamType::TGLshortConstPointer>(const GLshort *valueIn,
2300                                                          ParamValue *valueOut)
2301 {
2302     valueOut->GLshortConstPointerVal = valueIn;
2303 }
2304 
2305 template <>
2306 inline void SetParamVal<ParamType::TGLsizei>(GLsizei valueIn, ParamValue *valueOut)
2307 {
2308     valueOut->GLsizeiVal = valueIn;
2309 }
2310 
2311 template <>
2312 inline void SetParamVal<ParamType::TGLsizeiConstPointer>(const GLsizei *valueIn,
2313                                                          ParamValue *valueOut)
2314 {
2315     valueOut->GLsizeiConstPointerVal = valueIn;
2316 }
2317 
2318 template <>
2319 inline void SetParamVal<ParamType::TGLsizeiPointer>(GLsizei *valueIn, ParamValue *valueOut)
2320 {
2321     valueOut->GLsizeiPointerVal = valueIn;
2322 }
2323 
2324 template <>
2325 inline void SetParamVal<ParamType::TGLsizeiptr>(GLsizeiptr valueIn, ParamValue *valueOut)
2326 {
2327     valueOut->GLsizeiptrVal = valueIn;
2328 }
2329 
2330 template <>
2331 inline void SetParamVal<ParamType::TGLsync>(GLsync valueIn, ParamValue *valueOut)
2332 {
2333     valueOut->GLsyncVal = valueIn;
2334 }
2335 
2336 template <>
2337 inline void SetParamVal<ParamType::TGLubyte>(GLubyte valueIn, ParamValue *valueOut)
2338 {
2339     valueOut->GLubyteVal = valueIn;
2340 }
2341 
2342 template <>
2343 inline void SetParamVal<ParamType::TGLubyteConstPointer>(const GLubyte *valueIn,
2344                                                          ParamValue *valueOut)
2345 {
2346     valueOut->GLubyteConstPointerVal = valueIn;
2347 }
2348 
2349 template <>
2350 inline void SetParamVal<ParamType::TGLubytePointer>(GLubyte *valueIn, ParamValue *valueOut)
2351 {
2352     valueOut->GLubytePointerVal = valueIn;
2353 }
2354 
2355 template <>
2356 inline void SetParamVal<ParamType::TGLuint>(GLuint valueIn, ParamValue *valueOut)
2357 {
2358     valueOut->GLuintVal = valueIn;
2359 }
2360 
2361 template <>
2362 inline void SetParamVal<ParamType::TGLuint64>(GLuint64 valueIn, ParamValue *valueOut)
2363 {
2364     valueOut->GLuint64Val = valueIn;
2365 }
2366 
2367 template <>
2368 inline void SetParamVal<ParamType::TGLuint64ConstPointer>(const GLuint64 *valueIn,
2369                                                           ParamValue *valueOut)
2370 {
2371     valueOut->GLuint64ConstPointerVal = valueIn;
2372 }
2373 
2374 template <>
2375 inline void SetParamVal<ParamType::TGLuint64Pointer>(GLuint64 *valueIn, ParamValue *valueOut)
2376 {
2377     valueOut->GLuint64PointerVal = valueIn;
2378 }
2379 
2380 template <>
2381 inline void SetParamVal<ParamType::TGLuintConstPointer>(const GLuint *valueIn, ParamValue *valueOut)
2382 {
2383     valueOut->GLuintConstPointerVal = valueIn;
2384 }
2385 
2386 template <>
2387 inline void SetParamVal<ParamType::TGLuintPointer>(GLuint *valueIn, ParamValue *valueOut)
2388 {
2389     valueOut->GLuintPointerVal = valueIn;
2390 }
2391 
2392 template <>
2393 inline void SetParamVal<ParamType::TGraphicsResetStatus>(gl::GraphicsResetStatus valueIn,
2394                                                          ParamValue *valueOut)
2395 {
2396     valueOut->GraphicsResetStatusVal = valueIn;
2397 }
2398 
2399 template <>
2400 inline void SetParamVal<ParamType::THandleType>(gl::HandleType valueIn, ParamValue *valueOut)
2401 {
2402     valueOut->HandleTypeVal = valueIn;
2403 }
2404 
2405 template <>
2406 inline void SetParamVal<ParamType::TImageID>(egl::ImageID valueIn, ParamValue *valueOut)
2407 {
2408     valueOut->ImageIDVal = valueIn;
2409 }
2410 
2411 template <>
2412 inline void SetParamVal<ParamType::TLightParameter>(gl::LightParameter valueIn,
2413                                                     ParamValue *valueOut)
2414 {
2415     valueOut->LightParameterVal = valueIn;
2416 }
2417 
2418 template <>
2419 inline void SetParamVal<ParamType::TLogicalOperation>(gl::LogicalOperation valueIn,
2420                                                       ParamValue *valueOut)
2421 {
2422     valueOut->LogicalOperationVal = valueIn;
2423 }
2424 
2425 template <>
2426 inline void SetParamVal<ParamType::TMaterialParameter>(gl::MaterialParameter valueIn,
2427                                                        ParamValue *valueOut)
2428 {
2429     valueOut->MaterialParameterVal = valueIn;
2430 }
2431 
2432 template <>
2433 inline void SetParamVal<ParamType::TMatrixType>(gl::MatrixType valueIn, ParamValue *valueOut)
2434 {
2435     valueOut->MatrixTypeVal = valueIn;
2436 }
2437 
2438 template <>
2439 inline void SetParamVal<ParamType::TMemoryObjectID>(gl::MemoryObjectID valueIn,
2440                                                     ParamValue *valueOut)
2441 {
2442     valueOut->MemoryObjectIDVal = valueIn;
2443 }
2444 
2445 template <>
2446 inline void SetParamVal<ParamType::TMemoryObjectIDConstPointer>(const gl::MemoryObjectID *valueIn,
2447                                                                 ParamValue *valueOut)
2448 {
2449     valueOut->MemoryObjectIDConstPointerVal = valueIn;
2450 }
2451 
2452 template <>
2453 inline void SetParamVal<ParamType::TMemoryObjectIDPointer>(gl::MemoryObjectID *valueIn,
2454                                                            ParamValue *valueOut)
2455 {
2456     valueOut->MemoryObjectIDPointerVal = valueIn;
2457 }
2458 
2459 template <>
2460 inline void SetParamVal<ParamType::TObjectType>(egl::ObjectType valueIn, ParamValue *valueOut)
2461 {
2462     valueOut->ObjectTypeVal = valueIn;
2463 }
2464 
2465 template <>
2466 inline void SetParamVal<ParamType::TPointParameter>(gl::PointParameter valueIn,
2467                                                     ParamValue *valueOut)
2468 {
2469     valueOut->PointParameterVal = valueIn;
2470 }
2471 
2472 template <>
2473 inline void SetParamVal<ParamType::TPolygonMode>(gl::PolygonMode valueIn, ParamValue *valueOut)
2474 {
2475     valueOut->PolygonModeVal = valueIn;
2476 }
2477 
2478 template <>
2479 inline void SetParamVal<ParamType::TPrimitiveMode>(gl::PrimitiveMode valueIn, ParamValue *valueOut)
2480 {
2481     valueOut->PrimitiveModeVal = valueIn;
2482 }
2483 
2484 template <>
2485 inline void SetParamVal<ParamType::TProgramPipelineID>(gl::ProgramPipelineID valueIn,
2486                                                        ParamValue *valueOut)
2487 {
2488     valueOut->ProgramPipelineIDVal = valueIn;
2489 }
2490 
2491 template <>
2492 inline void SetParamVal<ParamType::TProgramPipelineIDConstPointer>(
2493     const gl::ProgramPipelineID *valueIn,
2494     ParamValue *valueOut)
2495 {
2496     valueOut->ProgramPipelineIDConstPointerVal = valueIn;
2497 }
2498 
2499 template <>
2500 inline void SetParamVal<ParamType::TProgramPipelineIDPointer>(gl::ProgramPipelineID *valueIn,
2501                                                               ParamValue *valueOut)
2502 {
2503     valueOut->ProgramPipelineIDPointerVal = valueIn;
2504 }
2505 
2506 template <>
2507 inline void SetParamVal<ParamType::TProvokingVertexConvention>(
2508     gl::ProvokingVertexConvention valueIn,
2509     ParamValue *valueOut)
2510 {
2511     valueOut->ProvokingVertexConventionVal = valueIn;
2512 }
2513 
2514 template <>
2515 inline void SetParamVal<ParamType::TQueryID>(gl::QueryID valueIn, ParamValue *valueOut)
2516 {
2517     valueOut->QueryIDVal = valueIn;
2518 }
2519 
2520 template <>
2521 inline void SetParamVal<ParamType::TQueryIDConstPointer>(const gl::QueryID *valueIn,
2522                                                          ParamValue *valueOut)
2523 {
2524     valueOut->QueryIDConstPointerVal = valueIn;
2525 }
2526 
2527 template <>
2528 inline void SetParamVal<ParamType::TQueryIDPointer>(gl::QueryID *valueIn, ParamValue *valueOut)
2529 {
2530     valueOut->QueryIDPointerVal = valueIn;
2531 }
2532 
2533 template <>
2534 inline void SetParamVal<ParamType::TQueryType>(gl::QueryType valueIn, ParamValue *valueOut)
2535 {
2536     valueOut->QueryTypeVal = valueIn;
2537 }
2538 
2539 template <>
2540 inline void SetParamVal<ParamType::TRenderbufferID>(gl::RenderbufferID valueIn,
2541                                                     ParamValue *valueOut)
2542 {
2543     valueOut->RenderbufferIDVal = valueIn;
2544 }
2545 
2546 template <>
2547 inline void SetParamVal<ParamType::TRenderbufferIDConstPointer>(const gl::RenderbufferID *valueIn,
2548                                                                 ParamValue *valueOut)
2549 {
2550     valueOut->RenderbufferIDConstPointerVal = valueIn;
2551 }
2552 
2553 template <>
2554 inline void SetParamVal<ParamType::TRenderbufferIDPointer>(gl::RenderbufferID *valueIn,
2555                                                            ParamValue *valueOut)
2556 {
2557     valueOut->RenderbufferIDPointerVal = valueIn;
2558 }
2559 
2560 template <>
2561 inline void SetParamVal<ParamType::TSamplerID>(gl::SamplerID valueIn, ParamValue *valueOut)
2562 {
2563     valueOut->SamplerIDVal = valueIn;
2564 }
2565 
2566 template <>
2567 inline void SetParamVal<ParamType::TSamplerIDConstPointer>(const gl::SamplerID *valueIn,
2568                                                            ParamValue *valueOut)
2569 {
2570     valueOut->SamplerIDConstPointerVal = valueIn;
2571 }
2572 
2573 template <>
2574 inline void SetParamVal<ParamType::TSamplerIDPointer>(gl::SamplerID *valueIn, ParamValue *valueOut)
2575 {
2576     valueOut->SamplerIDPointerVal = valueIn;
2577 }
2578 
2579 template <>
2580 inline void SetParamVal<ParamType::TSemaphoreID>(gl::SemaphoreID valueIn, ParamValue *valueOut)
2581 {
2582     valueOut->SemaphoreIDVal = valueIn;
2583 }
2584 
2585 template <>
2586 inline void SetParamVal<ParamType::TSemaphoreIDConstPointer>(const gl::SemaphoreID *valueIn,
2587                                                              ParamValue *valueOut)
2588 {
2589     valueOut->SemaphoreIDConstPointerVal = valueIn;
2590 }
2591 
2592 template <>
2593 inline void SetParamVal<ParamType::TSemaphoreIDPointer>(gl::SemaphoreID *valueIn,
2594                                                         ParamValue *valueOut)
2595 {
2596     valueOut->SemaphoreIDPointerVal = valueIn;
2597 }
2598 
2599 template <>
2600 inline void SetParamVal<ParamType::TShaderProgramID>(gl::ShaderProgramID valueIn,
2601                                                      ParamValue *valueOut)
2602 {
2603     valueOut->ShaderProgramIDVal = valueIn;
2604 }
2605 
2606 template <>
2607 inline void SetParamVal<ParamType::TShaderProgramIDConstPointer>(const gl::ShaderProgramID *valueIn,
2608                                                                  ParamValue *valueOut)
2609 {
2610     valueOut->ShaderProgramIDConstPointerVal = valueIn;
2611 }
2612 
2613 template <>
2614 inline void SetParamVal<ParamType::TShaderProgramIDPointer>(gl::ShaderProgramID *valueIn,
2615                                                             ParamValue *valueOut)
2616 {
2617     valueOut->ShaderProgramIDPointerVal = valueIn;
2618 }
2619 
2620 template <>
2621 inline void SetParamVal<ParamType::TShaderType>(gl::ShaderType valueIn, ParamValue *valueOut)
2622 {
2623     valueOut->ShaderTypeVal = valueIn;
2624 }
2625 
2626 template <>
2627 inline void SetParamVal<ParamType::TShadingModel>(gl::ShadingModel valueIn, ParamValue *valueOut)
2628 {
2629     valueOut->ShadingModelVal = valueIn;
2630 }
2631 
2632 template <>
2633 inline void SetParamVal<ParamType::TSurfaceID>(egl::SurfaceID valueIn, ParamValue *valueOut)
2634 {
2635     valueOut->SurfaceIDVal = valueIn;
2636 }
2637 
2638 template <>
2639 inline void SetParamVal<ParamType::TSyncID>(gl::SyncID valueIn, ParamValue *valueOut)
2640 {
2641     valueOut->SyncIDVal = valueIn;
2642 }
2643 
2644 template <>
2645 inline void SetParamVal<ParamType::TTextureEnvParameter>(gl::TextureEnvParameter valueIn,
2646                                                          ParamValue *valueOut)
2647 {
2648     valueOut->TextureEnvParameterVal = valueIn;
2649 }
2650 
2651 template <>
2652 inline void SetParamVal<ParamType::TTextureEnvTarget>(gl::TextureEnvTarget valueIn,
2653                                                       ParamValue *valueOut)
2654 {
2655     valueOut->TextureEnvTargetVal = valueIn;
2656 }
2657 
2658 template <>
2659 inline void SetParamVal<ParamType::TTextureID>(gl::TextureID valueIn, ParamValue *valueOut)
2660 {
2661     valueOut->TextureIDVal = valueIn;
2662 }
2663 
2664 template <>
2665 inline void SetParamVal<ParamType::TTextureIDConstPointer>(const gl::TextureID *valueIn,
2666                                                            ParamValue *valueOut)
2667 {
2668     valueOut->TextureIDConstPointerVal = valueIn;
2669 }
2670 
2671 template <>
2672 inline void SetParamVal<ParamType::TTextureIDPointer>(gl::TextureID *valueIn, ParamValue *valueOut)
2673 {
2674     valueOut->TextureIDPointerVal = valueIn;
2675 }
2676 
2677 template <>
2678 inline void SetParamVal<ParamType::TTextureTarget>(gl::TextureTarget valueIn, ParamValue *valueOut)
2679 {
2680     valueOut->TextureTargetVal = valueIn;
2681 }
2682 
2683 template <>
2684 inline void SetParamVal<ParamType::TTextureType>(gl::TextureType valueIn, ParamValue *valueOut)
2685 {
2686     valueOut->TextureTypeVal = valueIn;
2687 }
2688 
2689 template <>
2690 inline void SetParamVal<ParamType::TTimestamp>(egl::Timestamp valueIn, ParamValue *valueOut)
2691 {
2692     valueOut->TimestampVal = valueIn;
2693 }
2694 
2695 template <>
2696 inline void SetParamVal<ParamType::TTransformFeedbackID>(gl::TransformFeedbackID valueIn,
2697                                                          ParamValue *valueOut)
2698 {
2699     valueOut->TransformFeedbackIDVal = valueIn;
2700 }
2701 
2702 template <>
2703 inline void SetParamVal<ParamType::TTransformFeedbackIDConstPointer>(
2704     const gl::TransformFeedbackID *valueIn,
2705     ParamValue *valueOut)
2706 {
2707     valueOut->TransformFeedbackIDConstPointerVal = valueIn;
2708 }
2709 
2710 template <>
2711 inline void SetParamVal<ParamType::TTransformFeedbackIDPointer>(gl::TransformFeedbackID *valueIn,
2712                                                                 ParamValue *valueOut)
2713 {
2714     valueOut->TransformFeedbackIDPointerVal = valueIn;
2715 }
2716 
2717 template <>
2718 inline void SetParamVal<ParamType::TUniformBlockIndex>(gl::UniformBlockIndex valueIn,
2719                                                        ParamValue *valueOut)
2720 {
2721     valueOut->UniformBlockIndexVal = valueIn;
2722 }
2723 
2724 template <>
2725 inline void SetParamVal<ParamType::TUniformLocation>(gl::UniformLocation valueIn,
2726                                                      ParamValue *valueOut)
2727 {
2728     valueOut->UniformLocationVal = valueIn;
2729 }
2730 
2731 template <>
2732 inline void SetParamVal<ParamType::TVertexArrayID>(gl::VertexArrayID valueIn, ParamValue *valueOut)
2733 {
2734     valueOut->VertexArrayIDVal = valueIn;
2735 }
2736 
2737 template <>
2738 inline void SetParamVal<ParamType::TVertexArrayIDConstPointer>(const gl::VertexArrayID *valueIn,
2739                                                                ParamValue *valueOut)
2740 {
2741     valueOut->VertexArrayIDConstPointerVal = valueIn;
2742 }
2743 
2744 template <>
2745 inline void SetParamVal<ParamType::TVertexArrayIDPointer>(gl::VertexArrayID *valueIn,
2746                                                           ParamValue *valueOut)
2747 {
2748     valueOut->VertexArrayIDPointerVal = valueIn;
2749 }
2750 
2751 template <>
2752 inline void SetParamVal<ParamType::TVertexAttribType>(gl::VertexAttribType valueIn,
2753                                                       ParamValue *valueOut)
2754 {
2755     valueOut->VertexAttribTypeVal = valueIn;
2756 }
2757 
2758 template <>
2759 inline void SetParamVal<ParamType::TcharConstPointer>(const char *valueIn, ParamValue *valueOut)
2760 {
2761     valueOut->charConstPointerVal = valueIn;
2762 }
2763 
2764 template <>
2765 inline void SetParamVal<ParamType::Tegl_ConfigPointer>(egl::Config *valueIn, ParamValue *valueOut)
2766 {
2767     valueOut->egl_ConfigPointerVal = valueIn;
2768 }
2769 
2770 template <>
2771 inline void SetParamVal<ParamType::Tegl_DevicePointer>(egl::Device *valueIn, ParamValue *valueOut)
2772 {
2773     valueOut->egl_DevicePointerVal = valueIn;
2774 }
2775 
2776 template <>
2777 inline void SetParamVal<ParamType::Tegl_DisplayPointer>(egl::Display *valueIn, ParamValue *valueOut)
2778 {
2779     valueOut->egl_DisplayPointerVal = valueIn;
2780 }
2781 
2782 template <>
2783 inline void SetParamVal<ParamType::Tegl_StreamPointer>(egl::Stream *valueIn, ParamValue *valueOut)
2784 {
2785     valueOut->egl_StreamPointerVal = valueIn;
2786 }
2787 
2788 template <>
2789 inline void SetParamVal<ParamType::Tegl_SyncID>(egl::SyncID valueIn, ParamValue *valueOut)
2790 {
2791     valueOut->egl_SyncIDVal = valueIn;
2792 }
2793 
2794 template <>
2795 inline void SetParamVal<ParamType::TvoidConstPointer>(const void *valueIn, ParamValue *valueOut)
2796 {
2797     valueOut->voidConstPointerVal = valueIn;
2798 }
2799 
2800 template <>
2801 inline void SetParamVal<ParamType::TvoidConstPointerPointer>(const void *const *valueIn,
2802                                                              ParamValue *valueOut)
2803 {
2804     valueOut->voidConstPointerPointerVal = valueIn;
2805 }
2806 
2807 template <>
2808 inline void SetParamVal<ParamType::TvoidPointer>(void *valueIn, ParamValue *valueOut)
2809 {
2810     valueOut->voidPointerVal = valueIn;
2811 }
2812 
2813 template <>
2814 inline void SetParamVal<ParamType::TvoidPointerPointer>(void **valueIn, ParamValue *valueOut)
2815 {
2816     valueOut->voidPointerPointerVal = valueIn;
2817 }
2818 
2819 template <ParamType PType, typename T>
SetParamVal(T valueIn,ParamValue * valueOut)2820 void SetParamVal(T valueIn, ParamValue *valueOut)
2821 {
2822     UNREACHABLE();
2823 }
2824 
2825 template <typename T>
InitParamValue(ParamType paramType,T valueIn,ParamValue * valueOut)2826 void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
2827 {
2828     switch (paramType)
2829     {
2830         case ParamType::TAHardwareBufferConstPointer:
2831             SetParamVal<ParamType::TAHardwareBufferConstPointer>(valueIn, valueOut);
2832             break;
2833         case ParamType::TAlphaTestFunc:
2834             SetParamVal<ParamType::TAlphaTestFunc>(valueIn, valueOut);
2835             break;
2836         case ParamType::TBufferBinding:
2837             SetParamVal<ParamType::TBufferBinding>(valueIn, valueOut);
2838             break;
2839         case ParamType::TBufferID:
2840             SetParamVal<ParamType::TBufferID>(valueIn, valueOut);
2841             break;
2842         case ParamType::TBufferIDConstPointer:
2843             SetParamVal<ParamType::TBufferIDConstPointer>(valueIn, valueOut);
2844             break;
2845         case ParamType::TBufferIDPointer:
2846             SetParamVal<ParamType::TBufferIDPointer>(valueIn, valueOut);
2847             break;
2848         case ParamType::TBufferUsage:
2849             SetParamVal<ParamType::TBufferUsage>(valueIn, valueOut);
2850             break;
2851         case ParamType::TClientVertexArrayType:
2852             SetParamVal<ParamType::TClientVertexArrayType>(valueIn, valueOut);
2853             break;
2854         case ParamType::TClipDepthMode:
2855             SetParamVal<ParamType::TClipDepthMode>(valueIn, valueOut);
2856             break;
2857         case ParamType::TClipOrigin:
2858             SetParamVal<ParamType::TClipOrigin>(valueIn, valueOut);
2859             break;
2860         case ParamType::TCompositorTiming:
2861             SetParamVal<ParamType::TCompositorTiming>(valueIn, valueOut);
2862             break;
2863         case ParamType::TContextID:
2864             SetParamVal<ParamType::TContextID>(valueIn, valueOut);
2865             break;
2866         case ParamType::TCullFaceMode:
2867             SetParamVal<ParamType::TCullFaceMode>(valueIn, valueOut);
2868             break;
2869         case ParamType::TDrawElementsType:
2870             SetParamVal<ParamType::TDrawElementsType>(valueIn, valueOut);
2871             break;
2872         case ParamType::TEGLAttribConstPointer:
2873             SetParamVal<ParamType::TEGLAttribConstPointer>(valueIn, valueOut);
2874             break;
2875         case ParamType::TEGLAttribKHRPointer:
2876             SetParamVal<ParamType::TEGLAttribKHRPointer>(valueIn, valueOut);
2877             break;
2878         case ParamType::TEGLAttribPointer:
2879             SetParamVal<ParamType::TEGLAttribPointer>(valueIn, valueOut);
2880             break;
2881         case ParamType::TEGLBoolean:
2882             SetParamVal<ParamType::TEGLBoolean>(valueIn, valueOut);
2883             break;
2884         case ParamType::TEGLBooleanPointer:
2885             SetParamVal<ParamType::TEGLBooleanPointer>(valueIn, valueOut);
2886             break;
2887         case ParamType::TEGLClientBuffer:
2888             SetParamVal<ParamType::TEGLClientBuffer>(valueIn, valueOut);
2889             break;
2890         case ParamType::TEGLConfigPointer:
2891             SetParamVal<ParamType::TEGLConfigPointer>(valueIn, valueOut);
2892             break;
2893         case ParamType::TEGLContext:
2894             SetParamVal<ParamType::TEGLContext>(valueIn, valueOut);
2895             break;
2896         case ParamType::TEGLDEBUGPROCKHR:
2897             SetParamVal<ParamType::TEGLDEBUGPROCKHR>(valueIn, valueOut);
2898             break;
2899         case ParamType::TEGLDeviceEXT:
2900             SetParamVal<ParamType::TEGLDeviceEXT>(valueIn, valueOut);
2901             break;
2902         case ParamType::TEGLDisplay:
2903             SetParamVal<ParamType::TEGLDisplay>(valueIn, valueOut);
2904             break;
2905         case ParamType::TEGLFrameTokenANGLE:
2906             SetParamVal<ParamType::TEGLFrameTokenANGLE>(valueIn, valueOut);
2907             break;
2908         case ParamType::TEGLGetBlobFuncANDROID:
2909             SetParamVal<ParamType::TEGLGetBlobFuncANDROID>(valueIn, valueOut);
2910             break;
2911         case ParamType::TEGLImage:
2912             SetParamVal<ParamType::TEGLImage>(valueIn, valueOut);
2913             break;
2914         case ParamType::TEGLImageKHR:
2915             SetParamVal<ParamType::TEGLImageKHR>(valueIn, valueOut);
2916             break;
2917         case ParamType::TEGLLabelKHR:
2918             SetParamVal<ParamType::TEGLLabelKHR>(valueIn, valueOut);
2919             break;
2920         case ParamType::TEGLNativeDisplayType:
2921             SetParamVal<ParamType::TEGLNativeDisplayType>(valueIn, valueOut);
2922             break;
2923         case ParamType::TEGLNativePixmapType:
2924             SetParamVal<ParamType::TEGLNativePixmapType>(valueIn, valueOut);
2925             break;
2926         case ParamType::TEGLNativeWindowType:
2927             SetParamVal<ParamType::TEGLNativeWindowType>(valueIn, valueOut);
2928             break;
2929         case ParamType::TEGLObjectKHR:
2930             SetParamVal<ParamType::TEGLObjectKHR>(valueIn, valueOut);
2931             break;
2932         case ParamType::TEGLSetBlobFuncANDROID:
2933             SetParamVal<ParamType::TEGLSetBlobFuncANDROID>(valueIn, valueOut);
2934             break;
2935         case ParamType::TEGLStreamKHR:
2936             SetParamVal<ParamType::TEGLStreamKHR>(valueIn, valueOut);
2937             break;
2938         case ParamType::TEGLSurface:
2939             SetParamVal<ParamType::TEGLSurface>(valueIn, valueOut);
2940             break;
2941         case ParamType::TEGLSync:
2942             SetParamVal<ParamType::TEGLSync>(valueIn, valueOut);
2943             break;
2944         case ParamType::TEGLSyncKHR:
2945             SetParamVal<ParamType::TEGLSyncKHR>(valueIn, valueOut);
2946             break;
2947         case ParamType::TEGLTime:
2948             SetParamVal<ParamType::TEGLTime>(valueIn, valueOut);
2949             break;
2950         case ParamType::TEGLTimeKHR:
2951             SetParamVal<ParamType::TEGLTimeKHR>(valueIn, valueOut);
2952             break;
2953         case ParamType::TEGLenum:
2954             SetParamVal<ParamType::TEGLenum>(valueIn, valueOut);
2955             break;
2956         case ParamType::TEGLint:
2957             SetParamVal<ParamType::TEGLint>(valueIn, valueOut);
2958             break;
2959         case ParamType::TEGLintConstPointer:
2960             SetParamVal<ParamType::TEGLintConstPointer>(valueIn, valueOut);
2961             break;
2962         case ParamType::TEGLintPointer:
2963             SetParamVal<ParamType::TEGLintPointer>(valueIn, valueOut);
2964             break;
2965         case ParamType::TEGLnsecsANDROID:
2966             SetParamVal<ParamType::TEGLnsecsANDROID>(valueIn, valueOut);
2967             break;
2968         case ParamType::TEGLnsecsANDROIDPointer:
2969             SetParamVal<ParamType::TEGLnsecsANDROIDPointer>(valueIn, valueOut);
2970             break;
2971         case ParamType::TEGLuint64KHR:
2972             SetParamVal<ParamType::TEGLuint64KHR>(valueIn, valueOut);
2973             break;
2974         case ParamType::TEGLuint64KHRPointer:
2975             SetParamVal<ParamType::TEGLuint64KHRPointer>(valueIn, valueOut);
2976             break;
2977         case ParamType::TFenceNVID:
2978             SetParamVal<ParamType::TFenceNVID>(valueIn, valueOut);
2979             break;
2980         case ParamType::TFenceNVIDConstPointer:
2981             SetParamVal<ParamType::TFenceNVIDConstPointer>(valueIn, valueOut);
2982             break;
2983         case ParamType::TFenceNVIDPointer:
2984             SetParamVal<ParamType::TFenceNVIDPointer>(valueIn, valueOut);
2985             break;
2986         case ParamType::TFramebufferID:
2987             SetParamVal<ParamType::TFramebufferID>(valueIn, valueOut);
2988             break;
2989         case ParamType::TFramebufferIDConstPointer:
2990             SetParamVal<ParamType::TFramebufferIDConstPointer>(valueIn, valueOut);
2991             break;
2992         case ParamType::TFramebufferIDPointer:
2993             SetParamVal<ParamType::TFramebufferIDPointer>(valueIn, valueOut);
2994             break;
2995         case ParamType::TGLDEBUGPROC:
2996             SetParamVal<ParamType::TGLDEBUGPROC>(valueIn, valueOut);
2997             break;
2998         case ParamType::TGLDEBUGPROCKHR:
2999             SetParamVal<ParamType::TGLDEBUGPROCKHR>(valueIn, valueOut);
3000             break;
3001         case ParamType::TGLGETBLOBPROCANGLE:
3002             SetParamVal<ParamType::TGLGETBLOBPROCANGLE>(valueIn, valueOut);
3003             break;
3004         case ParamType::TGLSETBLOBPROCANGLE:
3005             SetParamVal<ParamType::TGLSETBLOBPROCANGLE>(valueIn, valueOut);
3006             break;
3007         case ParamType::TGLbitfield:
3008             SetParamVal<ParamType::TGLbitfield>(valueIn, valueOut);
3009             break;
3010         case ParamType::TGLboolean:
3011             SetParamVal<ParamType::TGLboolean>(valueIn, valueOut);
3012             break;
3013         case ParamType::TGLbooleanPointer:
3014             SetParamVal<ParamType::TGLbooleanPointer>(valueIn, valueOut);
3015             break;
3016         case ParamType::TGLcharConstPointer:
3017             SetParamVal<ParamType::TGLcharConstPointer>(valueIn, valueOut);
3018             break;
3019         case ParamType::TGLcharConstPointerPointer:
3020             SetParamVal<ParamType::TGLcharConstPointerPointer>(valueIn, valueOut);
3021             break;
3022         case ParamType::TGLcharPointer:
3023             SetParamVal<ParamType::TGLcharPointer>(valueIn, valueOut);
3024             break;
3025         case ParamType::TGLclampx:
3026             SetParamVal<ParamType::TGLclampx>(valueIn, valueOut);
3027             break;
3028         case ParamType::TGLeglClientBufferEXT:
3029             SetParamVal<ParamType::TGLeglClientBufferEXT>(valueIn, valueOut);
3030             break;
3031         case ParamType::TGLenum:
3032             SetParamVal<ParamType::TGLenum>(valueIn, valueOut);
3033             break;
3034         case ParamType::TGLenumConstPointer:
3035             SetParamVal<ParamType::TGLenumConstPointer>(valueIn, valueOut);
3036             break;
3037         case ParamType::TGLenumPointer:
3038             SetParamVal<ParamType::TGLenumPointer>(valueIn, valueOut);
3039             break;
3040         case ParamType::TGLfixed:
3041             SetParamVal<ParamType::TGLfixed>(valueIn, valueOut);
3042             break;
3043         case ParamType::TGLfixedConstPointer:
3044             SetParamVal<ParamType::TGLfixedConstPointer>(valueIn, valueOut);
3045             break;
3046         case ParamType::TGLfixedPointer:
3047             SetParamVal<ParamType::TGLfixedPointer>(valueIn, valueOut);
3048             break;
3049         case ParamType::TGLfloat:
3050             SetParamVal<ParamType::TGLfloat>(valueIn, valueOut);
3051             break;
3052         case ParamType::TGLfloatConstPointer:
3053             SetParamVal<ParamType::TGLfloatConstPointer>(valueIn, valueOut);
3054             break;
3055         case ParamType::TGLfloatPointer:
3056             SetParamVal<ParamType::TGLfloatPointer>(valueIn, valueOut);
3057             break;
3058         case ParamType::TGLint:
3059             SetParamVal<ParamType::TGLint>(valueIn, valueOut);
3060             break;
3061         case ParamType::TGLint64:
3062             SetParamVal<ParamType::TGLint64>(valueIn, valueOut);
3063             break;
3064         case ParamType::TGLint64Pointer:
3065             SetParamVal<ParamType::TGLint64Pointer>(valueIn, valueOut);
3066             break;
3067         case ParamType::TGLintConstPointer:
3068             SetParamVal<ParamType::TGLintConstPointer>(valueIn, valueOut);
3069             break;
3070         case ParamType::TGLintPointer:
3071             SetParamVal<ParamType::TGLintPointer>(valueIn, valueOut);
3072             break;
3073         case ParamType::TGLintptr:
3074             SetParamVal<ParamType::TGLintptr>(valueIn, valueOut);
3075             break;
3076         case ParamType::TGLshort:
3077             SetParamVal<ParamType::TGLshort>(valueIn, valueOut);
3078             break;
3079         case ParamType::TGLshortConstPointer:
3080             SetParamVal<ParamType::TGLshortConstPointer>(valueIn, valueOut);
3081             break;
3082         case ParamType::TGLsizei:
3083             SetParamVal<ParamType::TGLsizei>(valueIn, valueOut);
3084             break;
3085         case ParamType::TGLsizeiConstPointer:
3086             SetParamVal<ParamType::TGLsizeiConstPointer>(valueIn, valueOut);
3087             break;
3088         case ParamType::TGLsizeiPointer:
3089             SetParamVal<ParamType::TGLsizeiPointer>(valueIn, valueOut);
3090             break;
3091         case ParamType::TGLsizeiptr:
3092             SetParamVal<ParamType::TGLsizeiptr>(valueIn, valueOut);
3093             break;
3094         case ParamType::TGLsync:
3095             SetParamVal<ParamType::TGLsync>(valueIn, valueOut);
3096             break;
3097         case ParamType::TGLubyte:
3098             SetParamVal<ParamType::TGLubyte>(valueIn, valueOut);
3099             break;
3100         case ParamType::TGLubyteConstPointer:
3101             SetParamVal<ParamType::TGLubyteConstPointer>(valueIn, valueOut);
3102             break;
3103         case ParamType::TGLubytePointer:
3104             SetParamVal<ParamType::TGLubytePointer>(valueIn, valueOut);
3105             break;
3106         case ParamType::TGLuint:
3107             SetParamVal<ParamType::TGLuint>(valueIn, valueOut);
3108             break;
3109         case ParamType::TGLuint64:
3110             SetParamVal<ParamType::TGLuint64>(valueIn, valueOut);
3111             break;
3112         case ParamType::TGLuint64ConstPointer:
3113             SetParamVal<ParamType::TGLuint64ConstPointer>(valueIn, valueOut);
3114             break;
3115         case ParamType::TGLuint64Pointer:
3116             SetParamVal<ParamType::TGLuint64Pointer>(valueIn, valueOut);
3117             break;
3118         case ParamType::TGLuintConstPointer:
3119             SetParamVal<ParamType::TGLuintConstPointer>(valueIn, valueOut);
3120             break;
3121         case ParamType::TGLuintPointer:
3122             SetParamVal<ParamType::TGLuintPointer>(valueIn, valueOut);
3123             break;
3124         case ParamType::TGraphicsResetStatus:
3125             SetParamVal<ParamType::TGraphicsResetStatus>(valueIn, valueOut);
3126             break;
3127         case ParamType::THandleType:
3128             SetParamVal<ParamType::THandleType>(valueIn, valueOut);
3129             break;
3130         case ParamType::TImageID:
3131             SetParamVal<ParamType::TImageID>(valueIn, valueOut);
3132             break;
3133         case ParamType::TLightParameter:
3134             SetParamVal<ParamType::TLightParameter>(valueIn, valueOut);
3135             break;
3136         case ParamType::TLogicalOperation:
3137             SetParamVal<ParamType::TLogicalOperation>(valueIn, valueOut);
3138             break;
3139         case ParamType::TMaterialParameter:
3140             SetParamVal<ParamType::TMaterialParameter>(valueIn, valueOut);
3141             break;
3142         case ParamType::TMatrixType:
3143             SetParamVal<ParamType::TMatrixType>(valueIn, valueOut);
3144             break;
3145         case ParamType::TMemoryObjectID:
3146             SetParamVal<ParamType::TMemoryObjectID>(valueIn, valueOut);
3147             break;
3148         case ParamType::TMemoryObjectIDConstPointer:
3149             SetParamVal<ParamType::TMemoryObjectIDConstPointer>(valueIn, valueOut);
3150             break;
3151         case ParamType::TMemoryObjectIDPointer:
3152             SetParamVal<ParamType::TMemoryObjectIDPointer>(valueIn, valueOut);
3153             break;
3154         case ParamType::TObjectType:
3155             SetParamVal<ParamType::TObjectType>(valueIn, valueOut);
3156             break;
3157         case ParamType::TPointParameter:
3158             SetParamVal<ParamType::TPointParameter>(valueIn, valueOut);
3159             break;
3160         case ParamType::TPolygonMode:
3161             SetParamVal<ParamType::TPolygonMode>(valueIn, valueOut);
3162             break;
3163         case ParamType::TPrimitiveMode:
3164             SetParamVal<ParamType::TPrimitiveMode>(valueIn, valueOut);
3165             break;
3166         case ParamType::TProgramPipelineID:
3167             SetParamVal<ParamType::TProgramPipelineID>(valueIn, valueOut);
3168             break;
3169         case ParamType::TProgramPipelineIDConstPointer:
3170             SetParamVal<ParamType::TProgramPipelineIDConstPointer>(valueIn, valueOut);
3171             break;
3172         case ParamType::TProgramPipelineIDPointer:
3173             SetParamVal<ParamType::TProgramPipelineIDPointer>(valueIn, valueOut);
3174             break;
3175         case ParamType::TProvokingVertexConvention:
3176             SetParamVal<ParamType::TProvokingVertexConvention>(valueIn, valueOut);
3177             break;
3178         case ParamType::TQueryID:
3179             SetParamVal<ParamType::TQueryID>(valueIn, valueOut);
3180             break;
3181         case ParamType::TQueryIDConstPointer:
3182             SetParamVal<ParamType::TQueryIDConstPointer>(valueIn, valueOut);
3183             break;
3184         case ParamType::TQueryIDPointer:
3185             SetParamVal<ParamType::TQueryIDPointer>(valueIn, valueOut);
3186             break;
3187         case ParamType::TQueryType:
3188             SetParamVal<ParamType::TQueryType>(valueIn, valueOut);
3189             break;
3190         case ParamType::TRenderbufferID:
3191             SetParamVal<ParamType::TRenderbufferID>(valueIn, valueOut);
3192             break;
3193         case ParamType::TRenderbufferIDConstPointer:
3194             SetParamVal<ParamType::TRenderbufferIDConstPointer>(valueIn, valueOut);
3195             break;
3196         case ParamType::TRenderbufferIDPointer:
3197             SetParamVal<ParamType::TRenderbufferIDPointer>(valueIn, valueOut);
3198             break;
3199         case ParamType::TSamplerID:
3200             SetParamVal<ParamType::TSamplerID>(valueIn, valueOut);
3201             break;
3202         case ParamType::TSamplerIDConstPointer:
3203             SetParamVal<ParamType::TSamplerIDConstPointer>(valueIn, valueOut);
3204             break;
3205         case ParamType::TSamplerIDPointer:
3206             SetParamVal<ParamType::TSamplerIDPointer>(valueIn, valueOut);
3207             break;
3208         case ParamType::TSemaphoreID:
3209             SetParamVal<ParamType::TSemaphoreID>(valueIn, valueOut);
3210             break;
3211         case ParamType::TSemaphoreIDConstPointer:
3212             SetParamVal<ParamType::TSemaphoreIDConstPointer>(valueIn, valueOut);
3213             break;
3214         case ParamType::TSemaphoreIDPointer:
3215             SetParamVal<ParamType::TSemaphoreIDPointer>(valueIn, valueOut);
3216             break;
3217         case ParamType::TShaderProgramID:
3218             SetParamVal<ParamType::TShaderProgramID>(valueIn, valueOut);
3219             break;
3220         case ParamType::TShaderProgramIDConstPointer:
3221             SetParamVal<ParamType::TShaderProgramIDConstPointer>(valueIn, valueOut);
3222             break;
3223         case ParamType::TShaderProgramIDPointer:
3224             SetParamVal<ParamType::TShaderProgramIDPointer>(valueIn, valueOut);
3225             break;
3226         case ParamType::TShaderType:
3227             SetParamVal<ParamType::TShaderType>(valueIn, valueOut);
3228             break;
3229         case ParamType::TShadingModel:
3230             SetParamVal<ParamType::TShadingModel>(valueIn, valueOut);
3231             break;
3232         case ParamType::TSurfaceID:
3233             SetParamVal<ParamType::TSurfaceID>(valueIn, valueOut);
3234             break;
3235         case ParamType::TSyncID:
3236             SetParamVal<ParamType::TSyncID>(valueIn, valueOut);
3237             break;
3238         case ParamType::TTextureEnvParameter:
3239             SetParamVal<ParamType::TTextureEnvParameter>(valueIn, valueOut);
3240             break;
3241         case ParamType::TTextureEnvTarget:
3242             SetParamVal<ParamType::TTextureEnvTarget>(valueIn, valueOut);
3243             break;
3244         case ParamType::TTextureID:
3245             SetParamVal<ParamType::TTextureID>(valueIn, valueOut);
3246             break;
3247         case ParamType::TTextureIDConstPointer:
3248             SetParamVal<ParamType::TTextureIDConstPointer>(valueIn, valueOut);
3249             break;
3250         case ParamType::TTextureIDPointer:
3251             SetParamVal<ParamType::TTextureIDPointer>(valueIn, valueOut);
3252             break;
3253         case ParamType::TTextureTarget:
3254             SetParamVal<ParamType::TTextureTarget>(valueIn, valueOut);
3255             break;
3256         case ParamType::TTextureType:
3257             SetParamVal<ParamType::TTextureType>(valueIn, valueOut);
3258             break;
3259         case ParamType::TTimestamp:
3260             SetParamVal<ParamType::TTimestamp>(valueIn, valueOut);
3261             break;
3262         case ParamType::TTransformFeedbackID:
3263             SetParamVal<ParamType::TTransformFeedbackID>(valueIn, valueOut);
3264             break;
3265         case ParamType::TTransformFeedbackIDConstPointer:
3266             SetParamVal<ParamType::TTransformFeedbackIDConstPointer>(valueIn, valueOut);
3267             break;
3268         case ParamType::TTransformFeedbackIDPointer:
3269             SetParamVal<ParamType::TTransformFeedbackIDPointer>(valueIn, valueOut);
3270             break;
3271         case ParamType::TUniformBlockIndex:
3272             SetParamVal<ParamType::TUniformBlockIndex>(valueIn, valueOut);
3273             break;
3274         case ParamType::TUniformLocation:
3275             SetParamVal<ParamType::TUniformLocation>(valueIn, valueOut);
3276             break;
3277         case ParamType::TVertexArrayID:
3278             SetParamVal<ParamType::TVertexArrayID>(valueIn, valueOut);
3279             break;
3280         case ParamType::TVertexArrayIDConstPointer:
3281             SetParamVal<ParamType::TVertexArrayIDConstPointer>(valueIn, valueOut);
3282             break;
3283         case ParamType::TVertexArrayIDPointer:
3284             SetParamVal<ParamType::TVertexArrayIDPointer>(valueIn, valueOut);
3285             break;
3286         case ParamType::TVertexAttribType:
3287             SetParamVal<ParamType::TVertexAttribType>(valueIn, valueOut);
3288             break;
3289         case ParamType::TcharConstPointer:
3290             SetParamVal<ParamType::TcharConstPointer>(valueIn, valueOut);
3291             break;
3292         case ParamType::Tegl_ConfigPointer:
3293             SetParamVal<ParamType::Tegl_ConfigPointer>(valueIn, valueOut);
3294             break;
3295         case ParamType::Tegl_DevicePointer:
3296             SetParamVal<ParamType::Tegl_DevicePointer>(valueIn, valueOut);
3297             break;
3298         case ParamType::Tegl_DisplayPointer:
3299             SetParamVal<ParamType::Tegl_DisplayPointer>(valueIn, valueOut);
3300             break;
3301         case ParamType::Tegl_StreamPointer:
3302             SetParamVal<ParamType::Tegl_StreamPointer>(valueIn, valueOut);
3303             break;
3304         case ParamType::Tegl_SyncID:
3305             SetParamVal<ParamType::Tegl_SyncID>(valueIn, valueOut);
3306             break;
3307         case ParamType::TvoidConstPointer:
3308             SetParamVal<ParamType::TvoidConstPointer>(valueIn, valueOut);
3309             break;
3310         case ParamType::TvoidConstPointerPointer:
3311             SetParamVal<ParamType::TvoidConstPointerPointer>(valueIn, valueOut);
3312             break;
3313         case ParamType::TvoidPointer:
3314             SetParamVal<ParamType::TvoidPointer>(valueIn, valueOut);
3315             break;
3316         case ParamType::TvoidPointerPointer:
3317             SetParamVal<ParamType::TvoidPointerPointer>(valueIn, valueOut);
3318             break;
3319     }
3320 }
3321 
3322 struct CallCapture;
3323 struct ParamCapture;
3324 
3325 void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const ParamCapture &param);
3326 const char *ParamTypeToString(ParamType paramType);
3327 
3328 enum class ResourceIDType
3329 {
3330     Buffer,
3331     Context,
3332     FenceNV,
3333     Framebuffer,
3334     Image,
3335     MemoryObject,
3336     ProgramPipeline,
3337     Query,
3338     Renderbuffer,
3339     Sampler,
3340     Semaphore,
3341     ShaderProgram,
3342     Surface,
3343     Sync,
3344     Texture,
3345     TransformFeedback,
3346     VertexArray,
3347     egl_Sync,
3348     EnumCount,
3349     InvalidEnum = EnumCount
3350 };
3351 
3352 ResourceIDType GetResourceIDTypeFromParamType(ParamType paramType);
3353 const char *GetResourceIDTypeName(ResourceIDType resourceIDType);
3354 
3355 template <typename ResourceType>
3356 struct GetResourceIDTypeFromType;
3357 
3358 template <>
3359 struct GetResourceIDTypeFromType<gl::BufferID>
3360 {
3361     static constexpr ResourceIDType IDType = ResourceIDType::Buffer;
3362 };
3363 
3364 template <>
3365 struct GetResourceIDTypeFromType<gl::ContextID>
3366 {
3367     static constexpr ResourceIDType IDType = ResourceIDType::Context;
3368 };
3369 
3370 template <>
3371 struct GetResourceIDTypeFromType<gl::FenceNVID>
3372 {
3373     static constexpr ResourceIDType IDType = ResourceIDType::FenceNV;
3374 };
3375 
3376 template <>
3377 struct GetResourceIDTypeFromType<gl::FramebufferID>
3378 {
3379     static constexpr ResourceIDType IDType = ResourceIDType::Framebuffer;
3380 };
3381 
3382 template <>
3383 struct GetResourceIDTypeFromType<egl::ImageID>
3384 {
3385     static constexpr ResourceIDType IDType = ResourceIDType::Image;
3386 };
3387 
3388 template <>
3389 struct GetResourceIDTypeFromType<gl::MemoryObjectID>
3390 {
3391     static constexpr ResourceIDType IDType = ResourceIDType::MemoryObject;
3392 };
3393 
3394 template <>
3395 struct GetResourceIDTypeFromType<gl::ProgramPipelineID>
3396 {
3397     static constexpr ResourceIDType IDType = ResourceIDType::ProgramPipeline;
3398 };
3399 
3400 template <>
3401 struct GetResourceIDTypeFromType<gl::QueryID>
3402 {
3403     static constexpr ResourceIDType IDType = ResourceIDType::Query;
3404 };
3405 
3406 template <>
3407 struct GetResourceIDTypeFromType<gl::RenderbufferID>
3408 {
3409     static constexpr ResourceIDType IDType = ResourceIDType::Renderbuffer;
3410 };
3411 
3412 template <>
3413 struct GetResourceIDTypeFromType<gl::SamplerID>
3414 {
3415     static constexpr ResourceIDType IDType = ResourceIDType::Sampler;
3416 };
3417 
3418 template <>
3419 struct GetResourceIDTypeFromType<gl::SemaphoreID>
3420 {
3421     static constexpr ResourceIDType IDType = ResourceIDType::Semaphore;
3422 };
3423 
3424 template <>
3425 struct GetResourceIDTypeFromType<gl::ShaderProgramID>
3426 {
3427     static constexpr ResourceIDType IDType = ResourceIDType::ShaderProgram;
3428 };
3429 
3430 template <>
3431 struct GetResourceIDTypeFromType<egl::SurfaceID>
3432 {
3433     static constexpr ResourceIDType IDType = ResourceIDType::Surface;
3434 };
3435 
3436 template <>
3437 struct GetResourceIDTypeFromType<gl::SyncID>
3438 {
3439     static constexpr ResourceIDType IDType = ResourceIDType::Sync;
3440 };
3441 
3442 template <>
3443 struct GetResourceIDTypeFromType<gl::TextureID>
3444 {
3445     static constexpr ResourceIDType IDType = ResourceIDType::Texture;
3446 };
3447 
3448 template <>
3449 struct GetResourceIDTypeFromType<gl::TransformFeedbackID>
3450 {
3451     static constexpr ResourceIDType IDType = ResourceIDType::TransformFeedback;
3452 };
3453 
3454 template <>
3455 struct GetResourceIDTypeFromType<gl::VertexArrayID>
3456 {
3457     static constexpr ResourceIDType IDType = ResourceIDType::VertexArray;
3458 };
3459 
3460 template <>
3461 struct GetResourceIDTypeFromType<egl::SyncID>
3462 {
3463     static constexpr ResourceIDType IDType = ResourceIDType::egl_Sync;
3464 };
3465 
3466 }  // namespace angle
3467 
3468 #endif  // COMMON_FRAME_CAPTURE_UTILS_AUTOGEN_H_
3469