• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // capture_gles_ext_autogen.cpp:
9 //   Capture functions for the OpenGL ES extension entry points.
10 
11 #include "libANGLE/capture/capture_gles_ext_autogen.h"
12 
13 #include "libANGLE/Context.h"
14 #include "libANGLE/capture/FrameCapture.h"
15 #include "libANGLE/capture/gl_enum_utils.h"
16 #include "libANGLE/validationESEXT.h"
17 
18 using namespace angle;
19 
20 namespace gl
21 {
22 
CaptureDrawArraysInstancedBaseInstanceANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLint first,GLsizei count,GLsizei instanceCount,GLuint baseInstance)23 CallCapture CaptureDrawArraysInstancedBaseInstanceANGLE(const State &glState,
24                                                         bool isCallValid,
25                                                         PrimitiveMode modePacked,
26                                                         GLint first,
27                                                         GLsizei count,
28                                                         GLsizei instanceCount,
29                                                         GLuint baseInstance)
30 {
31     ParamBuffer paramBuffer;
32 
33     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
34     paramBuffer.addValueParam("first", ParamType::TGLint, first);
35     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
36     paramBuffer.addValueParam("instanceCount", ParamType::TGLsizei, instanceCount);
37     paramBuffer.addValueParam("baseInstance", ParamType::TGLuint, baseInstance);
38 
39     return CallCapture(angle::EntryPoint::GLDrawArraysInstancedBaseInstanceANGLE,
40                        std::move(paramBuffer));
41 }
42 
CaptureDrawElementsInstancedBaseVertexBaseInstanceANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const GLvoid * indices,GLsizei instanceCounts,GLint baseVertex,GLuint baseInstance)43 CallCapture CaptureDrawElementsInstancedBaseVertexBaseInstanceANGLE(const State &glState,
44                                                                     bool isCallValid,
45                                                                     PrimitiveMode modePacked,
46                                                                     GLsizei count,
47                                                                     DrawElementsType typePacked,
48                                                                     const GLvoid *indices,
49                                                                     GLsizei instanceCounts,
50                                                                     GLint baseVertex,
51                                                                     GLuint baseInstance)
52 {
53     ParamBuffer paramBuffer;
54 
55     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
56     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
57     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
58 
59     if (isCallValid)
60     {
61         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointer);
62         InitParamValue(ParamType::TGLvoidConstPointer, indices, &indicesParam.value);
63         CaptureDrawElementsInstancedBaseVertexBaseInstanceANGLE_indices(
64             glState, isCallValid, modePacked, count, typePacked, indices, instanceCounts,
65             baseVertex, baseInstance, &indicesParam);
66         paramBuffer.addParam(std::move(indicesParam));
67     }
68     else
69     {
70         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointer);
71         InitParamValue(ParamType::TGLvoidConstPointer, static_cast<const GLvoid *>(nullptr),
72                        &indicesParam.value);
73         paramBuffer.addParam(std::move(indicesParam));
74     }
75 
76     paramBuffer.addValueParam("instanceCounts", ParamType::TGLsizei, instanceCounts);
77     paramBuffer.addValueParam("baseVertex", ParamType::TGLint, baseVertex);
78     paramBuffer.addValueParam("baseInstance", ParamType::TGLuint, baseInstance);
79 
80     return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseVertexBaseInstanceANGLE,
81                        std::move(paramBuffer));
82 }
83 
CaptureMultiDrawArraysInstancedBaseInstanceANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,const GLint * firsts,const GLsizei * counts,const GLsizei * instanceCounts,const GLuint * baseInstances,GLsizei drawcount)84 CallCapture CaptureMultiDrawArraysInstancedBaseInstanceANGLE(const State &glState,
85                                                              bool isCallValid,
86                                                              PrimitiveMode modePacked,
87                                                              const GLint *firsts,
88                                                              const GLsizei *counts,
89                                                              const GLsizei *instanceCounts,
90                                                              const GLuint *baseInstances,
91                                                              GLsizei drawcount)
92 {
93     ParamBuffer paramBuffer;
94 
95     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
96 
97     if (isCallValid)
98     {
99         ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
100         InitParamValue(ParamType::TGLintConstPointer, firsts, &firstsParam.value);
101         CaptureMultiDrawArraysInstancedBaseInstanceANGLE_firsts(
102             glState, isCallValid, modePacked, firsts, counts, instanceCounts, baseInstances,
103             drawcount, &firstsParam);
104         paramBuffer.addParam(std::move(firstsParam));
105     }
106     else
107     {
108         ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
109         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
110                        &firstsParam.value);
111         paramBuffer.addParam(std::move(firstsParam));
112     }
113 
114     if (isCallValid)
115     {
116         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
117         InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
118         CaptureMultiDrawArraysInstancedBaseInstanceANGLE_counts(
119             glState, isCallValid, modePacked, firsts, counts, instanceCounts, baseInstances,
120             drawcount, &countsParam);
121         paramBuffer.addParam(std::move(countsParam));
122     }
123     else
124     {
125         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
126         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
127                        &countsParam.value);
128         paramBuffer.addParam(std::move(countsParam));
129     }
130 
131     if (isCallValid)
132     {
133         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
134         InitParamValue(ParamType::TGLsizeiConstPointer, instanceCounts, &instanceCountsParam.value);
135         CaptureMultiDrawArraysInstancedBaseInstanceANGLE_instanceCounts(
136             glState, isCallValid, modePacked, firsts, counts, instanceCounts, baseInstances,
137             drawcount, &instanceCountsParam);
138         paramBuffer.addParam(std::move(instanceCountsParam));
139     }
140     else
141     {
142         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
143         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
144                        &instanceCountsParam.value);
145         paramBuffer.addParam(std::move(instanceCountsParam));
146     }
147 
148     if (isCallValid)
149     {
150         ParamCapture baseInstancesParam("baseInstances", ParamType::TGLuintConstPointer);
151         InitParamValue(ParamType::TGLuintConstPointer, baseInstances, &baseInstancesParam.value);
152         CaptureMultiDrawArraysInstancedBaseInstanceANGLE_baseInstances(
153             glState, isCallValid, modePacked, firsts, counts, instanceCounts, baseInstances,
154             drawcount, &baseInstancesParam);
155         paramBuffer.addParam(std::move(baseInstancesParam));
156     }
157     else
158     {
159         ParamCapture baseInstancesParam("baseInstances", ParamType::TGLuintConstPointer);
160         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
161                        &baseInstancesParam.value);
162         paramBuffer.addParam(std::move(baseInstancesParam));
163     }
164 
165     paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
166 
167     return CallCapture(angle::EntryPoint::GLMultiDrawArraysInstancedBaseInstanceANGLE,
168                        std::move(paramBuffer));
169 }
170 
CaptureMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,const GLsizei * counts,DrawElementsType typePacked,const GLvoid * const * indices,const GLsizei * instanceCounts,const GLint * baseVertices,const GLuint * baseInstances,GLsizei drawcount)171 CallCapture CaptureMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(
172     const State &glState,
173     bool isCallValid,
174     PrimitiveMode modePacked,
175     const GLsizei *counts,
176     DrawElementsType typePacked,
177     const GLvoid *const *indices,
178     const GLsizei *instanceCounts,
179     const GLint *baseVertices,
180     const GLuint *baseInstances,
181     GLsizei drawcount)
182 {
183     ParamBuffer paramBuffer;
184 
185     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
186 
187     if (isCallValid)
188     {
189         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
190         InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
191         CaptureMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE_counts(
192             glState, isCallValid, modePacked, counts, typePacked, indices, instanceCounts,
193             baseVertices, baseInstances, drawcount, &countsParam);
194         paramBuffer.addParam(std::move(countsParam));
195     }
196     else
197     {
198         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
199         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
200                        &countsParam.value);
201         paramBuffer.addParam(std::move(countsParam));
202     }
203 
204     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
205 
206     if (isCallValid)
207     {
208         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
209         InitParamValue(ParamType::TGLvoidConstPointerPointer, indices, &indicesParam.value);
210         CaptureMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE_indices(
211             glState, isCallValid, modePacked, counts, typePacked, indices, instanceCounts,
212             baseVertices, baseInstances, drawcount, &indicesParam);
213         paramBuffer.addParam(std::move(indicesParam));
214     }
215     else
216     {
217         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
218         InitParamValue(ParamType::TGLvoidConstPointerPointer,
219                        static_cast<const GLvoid *const *>(nullptr), &indicesParam.value);
220         paramBuffer.addParam(std::move(indicesParam));
221     }
222 
223     if (isCallValid)
224     {
225         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
226         InitParamValue(ParamType::TGLsizeiConstPointer, instanceCounts, &instanceCountsParam.value);
227         CaptureMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE_instanceCounts(
228             glState, isCallValid, modePacked, counts, typePacked, indices, instanceCounts,
229             baseVertices, baseInstances, drawcount, &instanceCountsParam);
230         paramBuffer.addParam(std::move(instanceCountsParam));
231     }
232     else
233     {
234         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
235         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
236                        &instanceCountsParam.value);
237         paramBuffer.addParam(std::move(instanceCountsParam));
238     }
239 
240     if (isCallValid)
241     {
242         ParamCapture baseVerticesParam("baseVertices", ParamType::TGLintConstPointer);
243         InitParamValue(ParamType::TGLintConstPointer, baseVertices, &baseVerticesParam.value);
244         CaptureMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE_baseVertices(
245             glState, isCallValid, modePacked, counts, typePacked, indices, instanceCounts,
246             baseVertices, baseInstances, drawcount, &baseVerticesParam);
247         paramBuffer.addParam(std::move(baseVerticesParam));
248     }
249     else
250     {
251         ParamCapture baseVerticesParam("baseVertices", ParamType::TGLintConstPointer);
252         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
253                        &baseVerticesParam.value);
254         paramBuffer.addParam(std::move(baseVerticesParam));
255     }
256 
257     if (isCallValid)
258     {
259         ParamCapture baseInstancesParam("baseInstances", ParamType::TGLuintConstPointer);
260         InitParamValue(ParamType::TGLuintConstPointer, baseInstances, &baseInstancesParam.value);
261         CaptureMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE_baseInstances(
262             glState, isCallValid, modePacked, counts, typePacked, indices, instanceCounts,
263             baseVertices, baseInstances, drawcount, &baseInstancesParam);
264         paramBuffer.addParam(std::move(baseInstancesParam));
265     }
266     else
267     {
268         ParamCapture baseInstancesParam("baseInstances", ParamType::TGLuintConstPointer);
269         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
270                        &baseInstancesParam.value);
271         paramBuffer.addParam(std::move(baseInstancesParam));
272     }
273 
274     paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
275 
276     return CallCapture(angle::EntryPoint::GLMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE,
277                        std::move(paramBuffer));
278 }
279 
CaptureCopyTexture3DANGLE(const State & glState,bool isCallValid,TextureID sourceIdPacked,GLint sourceLevel,TextureTarget destTargetPacked,TextureID destIdPacked,GLint destLevel,GLint internalFormat,GLenum destType,GLboolean unpackFlipY,GLboolean unpackPremultiplyAlpha,GLboolean unpackUnmultiplyAlpha)280 CallCapture CaptureCopyTexture3DANGLE(const State &glState,
281                                       bool isCallValid,
282                                       TextureID sourceIdPacked,
283                                       GLint sourceLevel,
284                                       TextureTarget destTargetPacked,
285                                       TextureID destIdPacked,
286                                       GLint destLevel,
287                                       GLint internalFormat,
288                                       GLenum destType,
289                                       GLboolean unpackFlipY,
290                                       GLboolean unpackPremultiplyAlpha,
291                                       GLboolean unpackUnmultiplyAlpha)
292 {
293     ParamBuffer paramBuffer;
294 
295     paramBuffer.addValueParam("sourceIdPacked", ParamType::TTextureID, sourceIdPacked);
296     paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
297     paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
298     paramBuffer.addValueParam("destIdPacked", ParamType::TTextureID, destIdPacked);
299     paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
300     paramBuffer.addValueParam("internalFormat", ParamType::TGLint, internalFormat);
301     paramBuffer.addEnumParam("destType", GLenumGroup::DefaultGroup, ParamType::TGLenum, destType);
302     paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
303     paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
304                               unpackPremultiplyAlpha);
305     paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
306                               unpackUnmultiplyAlpha);
307 
308     return CallCapture(angle::EntryPoint::GLCopyTexture3DANGLE, std::move(paramBuffer));
309 }
310 
CaptureCopySubTexture3DANGLE(const State & glState,bool isCallValid,TextureID sourceIdPacked,GLint sourceLevel,TextureTarget destTargetPacked,TextureID destIdPacked,GLint destLevel,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLint z,GLint width,GLint height,GLint depth,GLboolean unpackFlipY,GLboolean unpackPremultiplyAlpha,GLboolean unpackUnmultiplyAlpha)311 CallCapture CaptureCopySubTexture3DANGLE(const State &glState,
312                                          bool isCallValid,
313                                          TextureID sourceIdPacked,
314                                          GLint sourceLevel,
315                                          TextureTarget destTargetPacked,
316                                          TextureID destIdPacked,
317                                          GLint destLevel,
318                                          GLint xoffset,
319                                          GLint yoffset,
320                                          GLint zoffset,
321                                          GLint x,
322                                          GLint y,
323                                          GLint z,
324                                          GLint width,
325                                          GLint height,
326                                          GLint depth,
327                                          GLboolean unpackFlipY,
328                                          GLboolean unpackPremultiplyAlpha,
329                                          GLboolean unpackUnmultiplyAlpha)
330 {
331     ParamBuffer paramBuffer;
332 
333     paramBuffer.addValueParam("sourceIdPacked", ParamType::TTextureID, sourceIdPacked);
334     paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
335     paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
336     paramBuffer.addValueParam("destIdPacked", ParamType::TTextureID, destIdPacked);
337     paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
338     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
339     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
340     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
341     paramBuffer.addValueParam("x", ParamType::TGLint, x);
342     paramBuffer.addValueParam("y", ParamType::TGLint, y);
343     paramBuffer.addValueParam("z", ParamType::TGLint, z);
344     paramBuffer.addValueParam("width", ParamType::TGLint, width);
345     paramBuffer.addValueParam("height", ParamType::TGLint, height);
346     paramBuffer.addValueParam("depth", ParamType::TGLint, depth);
347     paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
348     paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
349                               unpackPremultiplyAlpha);
350     paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
351                               unpackUnmultiplyAlpha);
352 
353     return CallCapture(angle::EntryPoint::GLCopySubTexture3DANGLE, std::move(paramBuffer));
354 }
355 
CaptureBlitFramebufferANGLE(const State & glState,bool isCallValid,GLint srcX0,GLint srcY0,GLint srcX1,GLint srcY1,GLint dstX0,GLint dstY0,GLint dstX1,GLint dstY1,GLbitfield mask,GLenum filter)356 CallCapture CaptureBlitFramebufferANGLE(const State &glState,
357                                         bool isCallValid,
358                                         GLint srcX0,
359                                         GLint srcY0,
360                                         GLint srcX1,
361                                         GLint srcY1,
362                                         GLint dstX0,
363                                         GLint dstY0,
364                                         GLint dstX1,
365                                         GLint dstY1,
366                                         GLbitfield mask,
367                                         GLenum filter)
368 {
369     ParamBuffer paramBuffer;
370 
371     paramBuffer.addValueParam("srcX0", ParamType::TGLint, srcX0);
372     paramBuffer.addValueParam("srcY0", ParamType::TGLint, srcY0);
373     paramBuffer.addValueParam("srcX1", ParamType::TGLint, srcX1);
374     paramBuffer.addValueParam("srcY1", ParamType::TGLint, srcY1);
375     paramBuffer.addValueParam("dstX0", ParamType::TGLint, dstX0);
376     paramBuffer.addValueParam("dstY0", ParamType::TGLint, dstY0);
377     paramBuffer.addValueParam("dstX1", ParamType::TGLint, dstX1);
378     paramBuffer.addValueParam("dstY1", ParamType::TGLint, dstY1);
379     paramBuffer.addEnumParam("mask", GLenumGroup::ClearBufferMask, ParamType::TGLbitfield, mask);
380     paramBuffer.addEnumParam("filter", GLenumGroup::BlitFramebufferFilter, ParamType::TGLenum,
381                              filter);
382 
383     return CallCapture(angle::EntryPoint::GLBlitFramebufferANGLE, std::move(paramBuffer));
384 }
385 
CaptureRenderbufferStorageMultisampleANGLE(const State & glState,bool isCallValid,GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height)386 CallCapture CaptureRenderbufferStorageMultisampleANGLE(const State &glState,
387                                                        bool isCallValid,
388                                                        GLenum target,
389                                                        GLsizei samples,
390                                                        GLenum internalformat,
391                                                        GLsizei width,
392                                                        GLsizei height)
393 {
394     ParamBuffer paramBuffer;
395 
396     paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
397     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
398     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
399                              internalformat);
400     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
401     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
402 
403     return CallCapture(angle::EntryPoint::GLRenderbufferStorageMultisampleANGLE,
404                        std::move(paramBuffer));
405 }
406 
CaptureGetTexImageANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum format,GLenum type,void * pixels)407 CallCapture CaptureGetTexImageANGLE(const State &glState,
408                                     bool isCallValid,
409                                     TextureTarget targetPacked,
410                                     GLint level,
411                                     GLenum format,
412                                     GLenum type,
413                                     void *pixels)
414 {
415     ParamBuffer paramBuffer;
416 
417     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
418     paramBuffer.addValueParam("level", ParamType::TGLint, level);
419     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
420     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
421 
422     if (isCallValid)
423     {
424         ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
425         InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
426         CaptureGetTexImageANGLE_pixels(glState, isCallValid, targetPacked, level, format, type,
427                                        pixels, &pixelsParam);
428         paramBuffer.addParam(std::move(pixelsParam));
429     }
430     else
431     {
432         ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
433         InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
434         paramBuffer.addParam(std::move(pixelsParam));
435     }
436 
437     return CallCapture(angle::EntryPoint::GLGetTexImageANGLE, std::move(paramBuffer));
438 }
439 
CaptureGetRenderbufferImageANGLE(const State & glState,bool isCallValid,GLenum target,GLenum format,GLenum type,void * pixels)440 CallCapture CaptureGetRenderbufferImageANGLE(const State &glState,
441                                              bool isCallValid,
442                                              GLenum target,
443                                              GLenum format,
444                                              GLenum type,
445                                              void *pixels)
446 {
447     ParamBuffer paramBuffer;
448 
449     paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
450     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
451     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
452 
453     if (isCallValid)
454     {
455         ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
456         InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
457         CaptureGetRenderbufferImageANGLE_pixels(glState, isCallValid, target, format, type, pixels,
458                                                 &pixelsParam);
459         paramBuffer.addParam(std::move(pixelsParam));
460     }
461     else
462     {
463         ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
464         InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
465         paramBuffer.addParam(std::move(pixelsParam));
466     }
467 
468     return CallCapture(angle::EntryPoint::GLGetRenderbufferImageANGLE, std::move(paramBuffer));
469 }
470 
CaptureGetTexLevelParameterivANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum pname,GLint * params)471 CallCapture CaptureGetTexLevelParameterivANGLE(const State &glState,
472                                                bool isCallValid,
473                                                TextureTarget targetPacked,
474                                                GLint level,
475                                                GLenum pname,
476                                                GLint *params)
477 {
478     ParamBuffer paramBuffer;
479 
480     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
481     paramBuffer.addValueParam("level", ParamType::TGLint, level);
482     paramBuffer.addEnumParam("pname", GLenumGroup::GetTextureParameter, ParamType::TGLenum, pname);
483 
484     if (isCallValid)
485     {
486         ParamCapture paramsParam("params", ParamType::TGLintPointer);
487         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
488         CaptureGetTexLevelParameterivANGLE_params(glState, isCallValid, targetPacked, level, pname,
489                                                   params, &paramsParam);
490         paramBuffer.addParam(std::move(paramsParam));
491     }
492     else
493     {
494         ParamCapture paramsParam("params", ParamType::TGLintPointer);
495         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
496         paramBuffer.addParam(std::move(paramsParam));
497     }
498 
499     return CallCapture(angle::EntryPoint::GLGetTexLevelParameterivANGLE, std::move(paramBuffer));
500 }
501 
CaptureGetTexLevelParameterfvANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum pname,GLfloat * params)502 CallCapture CaptureGetTexLevelParameterfvANGLE(const State &glState,
503                                                bool isCallValid,
504                                                TextureTarget targetPacked,
505                                                GLint level,
506                                                GLenum pname,
507                                                GLfloat *params)
508 {
509     ParamBuffer paramBuffer;
510 
511     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
512     paramBuffer.addValueParam("level", ParamType::TGLint, level);
513     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
514 
515     if (isCallValid)
516     {
517         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
518         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
519         CaptureGetTexLevelParameterfvANGLE_params(glState, isCallValid, targetPacked, level, pname,
520                                                   params, &paramsParam);
521         paramBuffer.addParam(std::move(paramsParam));
522     }
523     else
524     {
525         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
526         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
527                        &paramsParam.value);
528         paramBuffer.addParam(std::move(paramsParam));
529     }
530 
531     return CallCapture(angle::EntryPoint::GLGetTexLevelParameterfvANGLE, std::move(paramBuffer));
532 }
533 
CaptureDrawArraysInstancedANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLint first,GLsizei count,GLsizei primcount)534 CallCapture CaptureDrawArraysInstancedANGLE(const State &glState,
535                                             bool isCallValid,
536                                             PrimitiveMode modePacked,
537                                             GLint first,
538                                             GLsizei count,
539                                             GLsizei primcount)
540 {
541     ParamBuffer paramBuffer;
542 
543     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
544     paramBuffer.addValueParam("first", ParamType::TGLint, first);
545     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
546     paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);
547 
548     return CallCapture(angle::EntryPoint::GLDrawArraysInstancedANGLE, std::move(paramBuffer));
549 }
550 
CaptureDrawElementsInstancedANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei primcount)551 CallCapture CaptureDrawElementsInstancedANGLE(const State &glState,
552                                               bool isCallValid,
553                                               PrimitiveMode modePacked,
554                                               GLsizei count,
555                                               DrawElementsType typePacked,
556                                               const void *indices,
557                                               GLsizei primcount)
558 {
559     ParamBuffer paramBuffer;
560 
561     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
562     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
563     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
564 
565     if (isCallValid)
566     {
567         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
568         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
569         CaptureDrawElementsInstancedANGLE_indices(glState, isCallValid, modePacked, count,
570                                                   typePacked, indices, primcount, &indicesParam);
571         paramBuffer.addParam(std::move(indicesParam));
572     }
573     else
574     {
575         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
576         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
577                        &indicesParam.value);
578         paramBuffer.addParam(std::move(indicesParam));
579     }
580 
581     paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);
582 
583     return CallCapture(angle::EntryPoint::GLDrawElementsInstancedANGLE, std::move(paramBuffer));
584 }
585 
CaptureVertexAttribDivisorANGLE(const State & glState,bool isCallValid,GLuint index,GLuint divisor)586 CallCapture CaptureVertexAttribDivisorANGLE(const State &glState,
587                                             bool isCallValid,
588                                             GLuint index,
589                                             GLuint divisor)
590 {
591     ParamBuffer paramBuffer;
592 
593     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
594     paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
595 
596     return CallCapture(angle::EntryPoint::GLVertexAttribDivisorANGLE, std::move(paramBuffer));
597 }
598 
CaptureTexStorageMemFlags2DANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalFormat,GLsizei width,GLsizei height,MemoryObjectID memoryPacked,GLuint64 offset,GLbitfield createFlags,GLbitfield usageFlags)599 CallCapture CaptureTexStorageMemFlags2DANGLE(const State &glState,
600                                              bool isCallValid,
601                                              TextureType targetPacked,
602                                              GLsizei levels,
603                                              GLenum internalFormat,
604                                              GLsizei width,
605                                              GLsizei height,
606                                              MemoryObjectID memoryPacked,
607                                              GLuint64 offset,
608                                              GLbitfield createFlags,
609                                              GLbitfield usageFlags)
610 {
611     ParamBuffer paramBuffer;
612 
613     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
614     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
615     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
616                              internalFormat);
617     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
618     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
619     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
620     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
621     paramBuffer.addEnumParam("createFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
622                              createFlags);
623     paramBuffer.addEnumParam("usageFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
624                              usageFlags);
625 
626     return CallCapture(angle::EntryPoint::GLTexStorageMemFlags2DANGLE, std::move(paramBuffer));
627 }
628 
CaptureTexStorageMemFlags2DMultisampleANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalFormat,GLsizei width,GLsizei height,GLboolean fixedSampleLocations,MemoryObjectID memoryPacked,GLuint64 offset,GLbitfield createFlags,GLbitfield usageFlags)629 CallCapture CaptureTexStorageMemFlags2DMultisampleANGLE(const State &glState,
630                                                         bool isCallValid,
631                                                         TextureType targetPacked,
632                                                         GLsizei samples,
633                                                         GLenum internalFormat,
634                                                         GLsizei width,
635                                                         GLsizei height,
636                                                         GLboolean fixedSampleLocations,
637                                                         MemoryObjectID memoryPacked,
638                                                         GLuint64 offset,
639                                                         GLbitfield createFlags,
640                                                         GLbitfield usageFlags)
641 {
642     ParamBuffer paramBuffer;
643 
644     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
645     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
646     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
647                              internalFormat);
648     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
649     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
650     paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
651     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
652     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
653     paramBuffer.addEnumParam("createFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
654                              createFlags);
655     paramBuffer.addEnumParam("usageFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
656                              usageFlags);
657 
658     return CallCapture(angle::EntryPoint::GLTexStorageMemFlags2DMultisampleANGLE,
659                        std::move(paramBuffer));
660 }
661 
CaptureTexStorageMemFlags3DANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalFormat,GLsizei width,GLsizei height,GLsizei depth,MemoryObjectID memoryPacked,GLuint64 offset,GLbitfield createFlags,GLbitfield usageFlags)662 CallCapture CaptureTexStorageMemFlags3DANGLE(const State &glState,
663                                              bool isCallValid,
664                                              TextureType targetPacked,
665                                              GLsizei levels,
666                                              GLenum internalFormat,
667                                              GLsizei width,
668                                              GLsizei height,
669                                              GLsizei depth,
670                                              MemoryObjectID memoryPacked,
671                                              GLuint64 offset,
672                                              GLbitfield createFlags,
673                                              GLbitfield usageFlags)
674 {
675     ParamBuffer paramBuffer;
676 
677     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
678     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
679     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
680                              internalFormat);
681     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
682     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
683     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
684     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
685     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
686     paramBuffer.addEnumParam("createFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
687                              createFlags);
688     paramBuffer.addEnumParam("usageFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
689                              usageFlags);
690 
691     return CallCapture(angle::EntryPoint::GLTexStorageMemFlags3DANGLE, std::move(paramBuffer));
692 }
693 
CaptureTexStorageMemFlags3DMultisampleANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalFormat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedSampleLocations,MemoryObjectID memoryPacked,GLuint64 offset,GLbitfield createFlags,GLbitfield usageFlags)694 CallCapture CaptureTexStorageMemFlags3DMultisampleANGLE(const State &glState,
695                                                         bool isCallValid,
696                                                         TextureType targetPacked,
697                                                         GLsizei samples,
698                                                         GLenum internalFormat,
699                                                         GLsizei width,
700                                                         GLsizei height,
701                                                         GLsizei depth,
702                                                         GLboolean fixedSampleLocations,
703                                                         MemoryObjectID memoryPacked,
704                                                         GLuint64 offset,
705                                                         GLbitfield createFlags,
706                                                         GLbitfield usageFlags)
707 {
708     ParamBuffer paramBuffer;
709 
710     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
711     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
712     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
713                              internalFormat);
714     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
715     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
716     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
717     paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
718     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
719     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
720     paramBuffer.addEnumParam("createFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
721                              createFlags);
722     paramBuffer.addEnumParam("usageFlags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield,
723                              usageFlags);
724 
725     return CallCapture(angle::EntryPoint::GLTexStorageMemFlags3DMultisampleANGLE,
726                        std::move(paramBuffer));
727 }
728 
CaptureImportMemoryZirconHandleANGLE(const State & glState,bool isCallValid,MemoryObjectID memoryPacked,GLuint64 size,HandleType handleTypePacked,GLuint handle)729 CallCapture CaptureImportMemoryZirconHandleANGLE(const State &glState,
730                                                  bool isCallValid,
731                                                  MemoryObjectID memoryPacked,
732                                                  GLuint64 size,
733                                                  HandleType handleTypePacked,
734                                                  GLuint handle)
735 {
736     ParamBuffer paramBuffer;
737 
738     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
739     paramBuffer.addValueParam("size", ParamType::TGLuint64, size);
740     paramBuffer.addValueParam("handleTypePacked", ParamType::THandleType, handleTypePacked);
741     paramBuffer.addValueParam("handle", ParamType::TGLuint, handle);
742 
743     return CallCapture(angle::EntryPoint::GLImportMemoryZirconHandleANGLE, std::move(paramBuffer));
744 }
745 
CaptureMultiDrawArraysANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,const GLint * firsts,const GLsizei * counts,GLsizei drawcount)746 CallCapture CaptureMultiDrawArraysANGLE(const State &glState,
747                                         bool isCallValid,
748                                         PrimitiveMode modePacked,
749                                         const GLint *firsts,
750                                         const GLsizei *counts,
751                                         GLsizei drawcount)
752 {
753     ParamBuffer paramBuffer;
754 
755     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
756 
757     if (isCallValid)
758     {
759         ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
760         InitParamValue(ParamType::TGLintConstPointer, firsts, &firstsParam.value);
761         CaptureMultiDrawArraysANGLE_firsts(glState, isCallValid, modePacked, firsts, counts,
762                                            drawcount, &firstsParam);
763         paramBuffer.addParam(std::move(firstsParam));
764     }
765     else
766     {
767         ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
768         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
769                        &firstsParam.value);
770         paramBuffer.addParam(std::move(firstsParam));
771     }
772 
773     if (isCallValid)
774     {
775         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
776         InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
777         CaptureMultiDrawArraysANGLE_counts(glState, isCallValid, modePacked, firsts, counts,
778                                            drawcount, &countsParam);
779         paramBuffer.addParam(std::move(countsParam));
780     }
781     else
782     {
783         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
784         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
785                        &countsParam.value);
786         paramBuffer.addParam(std::move(countsParam));
787     }
788 
789     paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
790 
791     return CallCapture(angle::EntryPoint::GLMultiDrawArraysANGLE, std::move(paramBuffer));
792 }
793 
CaptureMultiDrawArraysInstancedANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,const GLint * firsts,const GLsizei * counts,const GLsizei * instanceCounts,GLsizei drawcount)794 CallCapture CaptureMultiDrawArraysInstancedANGLE(const State &glState,
795                                                  bool isCallValid,
796                                                  PrimitiveMode modePacked,
797                                                  const GLint *firsts,
798                                                  const GLsizei *counts,
799                                                  const GLsizei *instanceCounts,
800                                                  GLsizei drawcount)
801 {
802     ParamBuffer paramBuffer;
803 
804     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
805 
806     if (isCallValid)
807     {
808         ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
809         InitParamValue(ParamType::TGLintConstPointer, firsts, &firstsParam.value);
810         CaptureMultiDrawArraysInstancedANGLE_firsts(glState, isCallValid, modePacked, firsts,
811                                                     counts, instanceCounts, drawcount,
812                                                     &firstsParam);
813         paramBuffer.addParam(std::move(firstsParam));
814     }
815     else
816     {
817         ParamCapture firstsParam("firsts", ParamType::TGLintConstPointer);
818         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
819                        &firstsParam.value);
820         paramBuffer.addParam(std::move(firstsParam));
821     }
822 
823     if (isCallValid)
824     {
825         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
826         InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
827         CaptureMultiDrawArraysInstancedANGLE_counts(glState, isCallValid, modePacked, firsts,
828                                                     counts, instanceCounts, drawcount,
829                                                     &countsParam);
830         paramBuffer.addParam(std::move(countsParam));
831     }
832     else
833     {
834         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
835         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
836                        &countsParam.value);
837         paramBuffer.addParam(std::move(countsParam));
838     }
839 
840     if (isCallValid)
841     {
842         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
843         InitParamValue(ParamType::TGLsizeiConstPointer, instanceCounts, &instanceCountsParam.value);
844         CaptureMultiDrawArraysInstancedANGLE_instanceCounts(glState, isCallValid, modePacked,
845                                                             firsts, counts, instanceCounts,
846                                                             drawcount, &instanceCountsParam);
847         paramBuffer.addParam(std::move(instanceCountsParam));
848     }
849     else
850     {
851         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
852         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
853                        &instanceCountsParam.value);
854         paramBuffer.addParam(std::move(instanceCountsParam));
855     }
856 
857     paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
858 
859     return CallCapture(angle::EntryPoint::GLMultiDrawArraysInstancedANGLE, std::move(paramBuffer));
860 }
861 
CaptureMultiDrawElementsANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,const GLsizei * counts,DrawElementsType typePacked,const GLvoid * const * indices,GLsizei drawcount)862 CallCapture CaptureMultiDrawElementsANGLE(const State &glState,
863                                           bool isCallValid,
864                                           PrimitiveMode modePacked,
865                                           const GLsizei *counts,
866                                           DrawElementsType typePacked,
867                                           const GLvoid *const *indices,
868                                           GLsizei drawcount)
869 {
870     ParamBuffer paramBuffer;
871 
872     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
873 
874     if (isCallValid)
875     {
876         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
877         InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
878         CaptureMultiDrawElementsANGLE_counts(glState, isCallValid, modePacked, counts, typePacked,
879                                              indices, drawcount, &countsParam);
880         paramBuffer.addParam(std::move(countsParam));
881     }
882     else
883     {
884         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
885         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
886                        &countsParam.value);
887         paramBuffer.addParam(std::move(countsParam));
888     }
889 
890     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
891 
892     if (isCallValid)
893     {
894         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
895         InitParamValue(ParamType::TGLvoidConstPointerPointer, indices, &indicesParam.value);
896         CaptureMultiDrawElementsANGLE_indices(glState, isCallValid, modePacked, counts, typePacked,
897                                               indices, drawcount, &indicesParam);
898         paramBuffer.addParam(std::move(indicesParam));
899     }
900     else
901     {
902         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
903         InitParamValue(ParamType::TGLvoidConstPointerPointer,
904                        static_cast<const GLvoid *const *>(nullptr), &indicesParam.value);
905         paramBuffer.addParam(std::move(indicesParam));
906     }
907 
908     paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
909 
910     return CallCapture(angle::EntryPoint::GLMultiDrawElementsANGLE, std::move(paramBuffer));
911 }
912 
CaptureMultiDrawElementsInstancedANGLE(const State & glState,bool isCallValid,PrimitiveMode modePacked,const GLsizei * counts,DrawElementsType typePacked,const GLvoid * const * indices,const GLsizei * instanceCounts,GLsizei drawcount)913 CallCapture CaptureMultiDrawElementsInstancedANGLE(const State &glState,
914                                                    bool isCallValid,
915                                                    PrimitiveMode modePacked,
916                                                    const GLsizei *counts,
917                                                    DrawElementsType typePacked,
918                                                    const GLvoid *const *indices,
919                                                    const GLsizei *instanceCounts,
920                                                    GLsizei drawcount)
921 {
922     ParamBuffer paramBuffer;
923 
924     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
925 
926     if (isCallValid)
927     {
928         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
929         InitParamValue(ParamType::TGLsizeiConstPointer, counts, &countsParam.value);
930         CaptureMultiDrawElementsInstancedANGLE_counts(glState, isCallValid, modePacked, counts,
931                                                       typePacked, indices, instanceCounts,
932                                                       drawcount, &countsParam);
933         paramBuffer.addParam(std::move(countsParam));
934     }
935     else
936     {
937         ParamCapture countsParam("counts", ParamType::TGLsizeiConstPointer);
938         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
939                        &countsParam.value);
940         paramBuffer.addParam(std::move(countsParam));
941     }
942 
943     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
944 
945     if (isCallValid)
946     {
947         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
948         InitParamValue(ParamType::TGLvoidConstPointerPointer, indices, &indicesParam.value);
949         CaptureMultiDrawElementsInstancedANGLE_indices(glState, isCallValid, modePacked, counts,
950                                                        typePacked, indices, instanceCounts,
951                                                        drawcount, &indicesParam);
952         paramBuffer.addParam(std::move(indicesParam));
953     }
954     else
955     {
956         ParamCapture indicesParam("indices", ParamType::TGLvoidConstPointerPointer);
957         InitParamValue(ParamType::TGLvoidConstPointerPointer,
958                        static_cast<const GLvoid *const *>(nullptr), &indicesParam.value);
959         paramBuffer.addParam(std::move(indicesParam));
960     }
961 
962     if (isCallValid)
963     {
964         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
965         InitParamValue(ParamType::TGLsizeiConstPointer, instanceCounts, &instanceCountsParam.value);
966         CaptureMultiDrawElementsInstancedANGLE_instanceCounts(
967             glState, isCallValid, modePacked, counts, typePacked, indices, instanceCounts,
968             drawcount, &instanceCountsParam);
969         paramBuffer.addParam(std::move(instanceCountsParam));
970     }
971     else
972     {
973         ParamCapture instanceCountsParam("instanceCounts", ParamType::TGLsizeiConstPointer);
974         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
975                        &instanceCountsParam.value);
976         paramBuffer.addParam(std::move(instanceCountsParam));
977     }
978 
979     paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
980 
981     return CallCapture(angle::EntryPoint::GLMultiDrawElementsInstancedANGLE,
982                        std::move(paramBuffer));
983 }
984 
CaptureProvokingVertexANGLE(const State & glState,bool isCallValid,ProvokingVertexConvention modePacked)985 CallCapture CaptureProvokingVertexANGLE(const State &glState,
986                                         bool isCallValid,
987                                         ProvokingVertexConvention modePacked)
988 {
989     ParamBuffer paramBuffer;
990 
991     paramBuffer.addValueParam("modePacked", ParamType::TProvokingVertexConvention, modePacked);
992 
993     return CallCapture(angle::EntryPoint::GLProvokingVertexANGLE, std::move(paramBuffer));
994 }
995 
CaptureRequestExtensionANGLE(const State & glState,bool isCallValid,const GLchar * name)996 CallCapture CaptureRequestExtensionANGLE(const State &glState, bool isCallValid, const GLchar *name)
997 {
998     ParamBuffer paramBuffer;
999 
1000     if (isCallValid)
1001     {
1002         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
1003         InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
1004         CaptureRequestExtensionANGLE_name(glState, isCallValid, name, &nameParam);
1005         paramBuffer.addParam(std::move(nameParam));
1006     }
1007     else
1008     {
1009         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
1010         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
1011                        &nameParam.value);
1012         paramBuffer.addParam(std::move(nameParam));
1013     }
1014 
1015     return CallCapture(angle::EntryPoint::GLRequestExtensionANGLE, std::move(paramBuffer));
1016 }
1017 
CaptureDisableExtensionANGLE(const State & glState,bool isCallValid,const GLchar * name)1018 CallCapture CaptureDisableExtensionANGLE(const State &glState, bool isCallValid, const GLchar *name)
1019 {
1020     ParamBuffer paramBuffer;
1021 
1022     if (isCallValid)
1023     {
1024         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
1025         InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
1026         CaptureDisableExtensionANGLE_name(glState, isCallValid, name, &nameParam);
1027         paramBuffer.addParam(std::move(nameParam));
1028     }
1029     else
1030     {
1031         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
1032         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
1033                        &nameParam.value);
1034         paramBuffer.addParam(std::move(nameParam));
1035     }
1036 
1037     return CallCapture(angle::EntryPoint::GLDisableExtensionANGLE, std::move(paramBuffer));
1038 }
1039 
CaptureGetBooleanvRobustANGLE(const State & glState,bool isCallValid,GLenum pname,GLsizei bufSize,GLsizei * length,GLboolean * params)1040 CallCapture CaptureGetBooleanvRobustANGLE(const State &glState,
1041                                           bool isCallValid,
1042                                           GLenum pname,
1043                                           GLsizei bufSize,
1044                                           GLsizei *length,
1045                                           GLboolean *params)
1046 {
1047     ParamBuffer paramBuffer;
1048 
1049     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1050     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1051 
1052     if (isCallValid)
1053     {
1054         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1055         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1056         CaptureGetBooleanvRobustANGLE_length(glState, isCallValid, pname, bufSize, length, params,
1057                                              &lengthParam);
1058         paramBuffer.addParam(std::move(lengthParam));
1059     }
1060     else
1061     {
1062         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1063         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1064                        &lengthParam.value);
1065         paramBuffer.addParam(std::move(lengthParam));
1066     }
1067 
1068     if (isCallValid)
1069     {
1070         ParamCapture paramsParam("params", ParamType::TGLbooleanPointer);
1071         InitParamValue(ParamType::TGLbooleanPointer, params, &paramsParam.value);
1072         CaptureGetBooleanvRobustANGLE_params(glState, isCallValid, pname, bufSize, length, params,
1073                                              &paramsParam);
1074         paramBuffer.addParam(std::move(paramsParam));
1075     }
1076     else
1077     {
1078         ParamCapture paramsParam("params", ParamType::TGLbooleanPointer);
1079         InitParamValue(ParamType::TGLbooleanPointer, static_cast<GLboolean *>(nullptr),
1080                        &paramsParam.value);
1081         paramBuffer.addParam(std::move(paramsParam));
1082     }
1083 
1084     return CallCapture(angle::EntryPoint::GLGetBooleanvRobustANGLE, std::move(paramBuffer));
1085 }
1086 
CaptureGetBufferParameterivRobustANGLE(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)1087 CallCapture CaptureGetBufferParameterivRobustANGLE(const State &glState,
1088                                                    bool isCallValid,
1089                                                    BufferBinding targetPacked,
1090                                                    GLenum pname,
1091                                                    GLsizei bufSize,
1092                                                    GLsizei *length,
1093                                                    GLint *params)
1094 {
1095     ParamBuffer paramBuffer;
1096 
1097     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
1098     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1099     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1100 
1101     if (isCallValid)
1102     {
1103         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1104         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1105         CaptureGetBufferParameterivRobustANGLE_length(glState, isCallValid, targetPacked, pname,
1106                                                       bufSize, length, params, &lengthParam);
1107         paramBuffer.addParam(std::move(lengthParam));
1108     }
1109     else
1110     {
1111         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1112         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1113                        &lengthParam.value);
1114         paramBuffer.addParam(std::move(lengthParam));
1115     }
1116 
1117     if (isCallValid)
1118     {
1119         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1120         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1121         CaptureGetBufferParameterivRobustANGLE_params(glState, isCallValid, targetPacked, pname,
1122                                                       bufSize, length, params, &paramsParam);
1123         paramBuffer.addParam(std::move(paramsParam));
1124     }
1125     else
1126     {
1127         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1128         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1129         paramBuffer.addParam(std::move(paramsParam));
1130     }
1131 
1132     return CallCapture(angle::EntryPoint::GLGetBufferParameterivRobustANGLE,
1133                        std::move(paramBuffer));
1134 }
1135 
CaptureGetFloatvRobustANGLE(const State & glState,bool isCallValid,GLenum pname,GLsizei bufSize,GLsizei * length,GLfloat * params)1136 CallCapture CaptureGetFloatvRobustANGLE(const State &glState,
1137                                         bool isCallValid,
1138                                         GLenum pname,
1139                                         GLsizei bufSize,
1140                                         GLsizei *length,
1141                                         GLfloat *params)
1142 {
1143     ParamBuffer paramBuffer;
1144 
1145     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1146     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1147 
1148     if (isCallValid)
1149     {
1150         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1151         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1152         CaptureGetFloatvRobustANGLE_length(glState, isCallValid, pname, bufSize, length, params,
1153                                            &lengthParam);
1154         paramBuffer.addParam(std::move(lengthParam));
1155     }
1156     else
1157     {
1158         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1159         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1160                        &lengthParam.value);
1161         paramBuffer.addParam(std::move(lengthParam));
1162     }
1163 
1164     if (isCallValid)
1165     {
1166         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1167         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
1168         CaptureGetFloatvRobustANGLE_params(glState, isCallValid, pname, bufSize, length, params,
1169                                            &paramsParam);
1170         paramBuffer.addParam(std::move(paramsParam));
1171     }
1172     else
1173     {
1174         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1175         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
1176                        &paramsParam.value);
1177         paramBuffer.addParam(std::move(paramsParam));
1178     }
1179 
1180     return CallCapture(angle::EntryPoint::GLGetFloatvRobustANGLE, std::move(paramBuffer));
1181 }
1182 
CaptureGetFramebufferAttachmentParameterivRobustANGLE(const State & glState,bool isCallValid,GLenum target,GLenum attachment,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)1183 CallCapture CaptureGetFramebufferAttachmentParameterivRobustANGLE(const State &glState,
1184                                                                   bool isCallValid,
1185                                                                   GLenum target,
1186                                                                   GLenum attachment,
1187                                                                   GLenum pname,
1188                                                                   GLsizei bufSize,
1189                                                                   GLsizei *length,
1190                                                                   GLint *params)
1191 {
1192     ParamBuffer paramBuffer;
1193 
1194     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
1195     paramBuffer.addEnumParam("attachment", GLenumGroup::DefaultGroup, ParamType::TGLenum,
1196                              attachment);
1197     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1198     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1199 
1200     if (isCallValid)
1201     {
1202         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1203         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1204         CaptureGetFramebufferAttachmentParameterivRobustANGLE_length(
1205             glState, isCallValid, target, attachment, pname, bufSize, length, params, &lengthParam);
1206         paramBuffer.addParam(std::move(lengthParam));
1207     }
1208     else
1209     {
1210         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1211         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1212                        &lengthParam.value);
1213         paramBuffer.addParam(std::move(lengthParam));
1214     }
1215 
1216     if (isCallValid)
1217     {
1218         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1219         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1220         CaptureGetFramebufferAttachmentParameterivRobustANGLE_params(
1221             glState, isCallValid, target, attachment, pname, bufSize, length, params, &paramsParam);
1222         paramBuffer.addParam(std::move(paramsParam));
1223     }
1224     else
1225     {
1226         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1227         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1228         paramBuffer.addParam(std::move(paramsParam));
1229     }
1230 
1231     return CallCapture(angle::EntryPoint::GLGetFramebufferAttachmentParameterivRobustANGLE,
1232                        std::move(paramBuffer));
1233 }
1234 
CaptureGetIntegervRobustANGLE(const State & glState,bool isCallValid,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * data)1235 CallCapture CaptureGetIntegervRobustANGLE(const State &glState,
1236                                           bool isCallValid,
1237                                           GLenum pname,
1238                                           GLsizei bufSize,
1239                                           GLsizei *length,
1240                                           GLint *data)
1241 {
1242     ParamBuffer paramBuffer;
1243 
1244     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1245     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1246 
1247     if (isCallValid)
1248     {
1249         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1250         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1251         CaptureGetIntegervRobustANGLE_length(glState, isCallValid, pname, bufSize, length, data,
1252                                              &lengthParam);
1253         paramBuffer.addParam(std::move(lengthParam));
1254     }
1255     else
1256     {
1257         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1258         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1259                        &lengthParam.value);
1260         paramBuffer.addParam(std::move(lengthParam));
1261     }
1262 
1263     if (isCallValid)
1264     {
1265         ParamCapture dataParam("data", ParamType::TGLintPointer);
1266         InitParamValue(ParamType::TGLintPointer, data, &dataParam.value);
1267         CaptureGetIntegervRobustANGLE_data(glState, isCallValid, pname, bufSize, length, data,
1268                                            &dataParam);
1269         paramBuffer.addParam(std::move(dataParam));
1270     }
1271     else
1272     {
1273         ParamCapture dataParam("data", ParamType::TGLintPointer);
1274         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &dataParam.value);
1275         paramBuffer.addParam(std::move(dataParam));
1276     }
1277 
1278     return CallCapture(angle::EntryPoint::GLGetIntegervRobustANGLE, std::move(paramBuffer));
1279 }
1280 
CaptureGetProgramivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)1281 CallCapture CaptureGetProgramivRobustANGLE(const State &glState,
1282                                            bool isCallValid,
1283                                            ShaderProgramID programPacked,
1284                                            GLenum pname,
1285                                            GLsizei bufSize,
1286                                            GLsizei *length,
1287                                            GLint *params)
1288 {
1289     ParamBuffer paramBuffer;
1290 
1291     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1292     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1293     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1294 
1295     if (isCallValid)
1296     {
1297         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1298         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1299         CaptureGetProgramivRobustANGLE_length(glState, isCallValid, programPacked, pname, bufSize,
1300                                               length, params, &lengthParam);
1301         paramBuffer.addParam(std::move(lengthParam));
1302     }
1303     else
1304     {
1305         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1306         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1307                        &lengthParam.value);
1308         paramBuffer.addParam(std::move(lengthParam));
1309     }
1310 
1311     if (isCallValid)
1312     {
1313         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1314         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1315         CaptureGetProgramivRobustANGLE_params(glState, isCallValid, programPacked, pname, bufSize,
1316                                               length, params, &paramsParam);
1317         paramBuffer.addParam(std::move(paramsParam));
1318     }
1319     else
1320     {
1321         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1322         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1323         paramBuffer.addParam(std::move(paramsParam));
1324     }
1325 
1326     return CallCapture(angle::EntryPoint::GLGetProgramivRobustANGLE, std::move(paramBuffer));
1327 }
1328 
CaptureGetRenderbufferParameterivRobustANGLE(const State & glState,bool isCallValid,GLenum target,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)1329 CallCapture CaptureGetRenderbufferParameterivRobustANGLE(const State &glState,
1330                                                          bool isCallValid,
1331                                                          GLenum target,
1332                                                          GLenum pname,
1333                                                          GLsizei bufSize,
1334                                                          GLsizei *length,
1335                                                          GLint *params)
1336 {
1337     ParamBuffer paramBuffer;
1338 
1339     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
1340     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1341     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1342 
1343     if (isCallValid)
1344     {
1345         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1346         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1347         CaptureGetRenderbufferParameterivRobustANGLE_length(glState, isCallValid, target, pname,
1348                                                             bufSize, length, params, &lengthParam);
1349         paramBuffer.addParam(std::move(lengthParam));
1350     }
1351     else
1352     {
1353         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1354         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1355                        &lengthParam.value);
1356         paramBuffer.addParam(std::move(lengthParam));
1357     }
1358 
1359     if (isCallValid)
1360     {
1361         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1362         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1363         CaptureGetRenderbufferParameterivRobustANGLE_params(glState, isCallValid, target, pname,
1364                                                             bufSize, length, params, &paramsParam);
1365         paramBuffer.addParam(std::move(paramsParam));
1366     }
1367     else
1368     {
1369         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1370         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1371         paramBuffer.addParam(std::move(paramsParam));
1372     }
1373 
1374     return CallCapture(angle::EntryPoint::GLGetRenderbufferParameterivRobustANGLE,
1375                        std::move(paramBuffer));
1376 }
1377 
CaptureGetShaderivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID shaderPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)1378 CallCapture CaptureGetShaderivRobustANGLE(const State &glState,
1379                                           bool isCallValid,
1380                                           ShaderProgramID shaderPacked,
1381                                           GLenum pname,
1382                                           GLsizei bufSize,
1383                                           GLsizei *length,
1384                                           GLint *params)
1385 {
1386     ParamBuffer paramBuffer;
1387 
1388     paramBuffer.addValueParam("shaderPacked", ParamType::TShaderProgramID, shaderPacked);
1389     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1390     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1391 
1392     if (isCallValid)
1393     {
1394         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1395         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1396         CaptureGetShaderivRobustANGLE_length(glState, isCallValid, shaderPacked, pname, bufSize,
1397                                              length, params, &lengthParam);
1398         paramBuffer.addParam(std::move(lengthParam));
1399     }
1400     else
1401     {
1402         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1403         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1404                        &lengthParam.value);
1405         paramBuffer.addParam(std::move(lengthParam));
1406     }
1407 
1408     if (isCallValid)
1409     {
1410         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1411         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1412         CaptureGetShaderivRobustANGLE_params(glState, isCallValid, shaderPacked, pname, bufSize,
1413                                              length, params, &paramsParam);
1414         paramBuffer.addParam(std::move(paramsParam));
1415     }
1416     else
1417     {
1418         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1419         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1420         paramBuffer.addParam(std::move(paramsParam));
1421     }
1422 
1423     return CallCapture(angle::EntryPoint::GLGetShaderivRobustANGLE, std::move(paramBuffer));
1424 }
1425 
CaptureGetTexParameterfvRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLfloat * params)1426 CallCapture CaptureGetTexParameterfvRobustANGLE(const State &glState,
1427                                                 bool isCallValid,
1428                                                 TextureType targetPacked,
1429                                                 GLenum pname,
1430                                                 GLsizei bufSize,
1431                                                 GLsizei *length,
1432                                                 GLfloat *params)
1433 {
1434     ParamBuffer paramBuffer;
1435 
1436     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1437     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1438     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1439 
1440     if (isCallValid)
1441     {
1442         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1443         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1444         CaptureGetTexParameterfvRobustANGLE_length(glState, isCallValid, targetPacked, pname,
1445                                                    bufSize, length, params, &lengthParam);
1446         paramBuffer.addParam(std::move(lengthParam));
1447     }
1448     else
1449     {
1450         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1451         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1452                        &lengthParam.value);
1453         paramBuffer.addParam(std::move(lengthParam));
1454     }
1455 
1456     if (isCallValid)
1457     {
1458         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1459         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
1460         CaptureGetTexParameterfvRobustANGLE_params(glState, isCallValid, targetPacked, pname,
1461                                                    bufSize, length, params, &paramsParam);
1462         paramBuffer.addParam(std::move(paramsParam));
1463     }
1464     else
1465     {
1466         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1467         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
1468                        &paramsParam.value);
1469         paramBuffer.addParam(std::move(paramsParam));
1470     }
1471 
1472     return CallCapture(angle::EntryPoint::GLGetTexParameterfvRobustANGLE, std::move(paramBuffer));
1473 }
1474 
CaptureGetTexParameterivRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)1475 CallCapture CaptureGetTexParameterivRobustANGLE(const State &glState,
1476                                                 bool isCallValid,
1477                                                 TextureType targetPacked,
1478                                                 GLenum pname,
1479                                                 GLsizei bufSize,
1480                                                 GLsizei *length,
1481                                                 GLint *params)
1482 {
1483     ParamBuffer paramBuffer;
1484 
1485     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1486     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1487     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1488 
1489     if (isCallValid)
1490     {
1491         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1492         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1493         CaptureGetTexParameterivRobustANGLE_length(glState, isCallValid, targetPacked, pname,
1494                                                    bufSize, length, params, &lengthParam);
1495         paramBuffer.addParam(std::move(lengthParam));
1496     }
1497     else
1498     {
1499         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1500         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1501                        &lengthParam.value);
1502         paramBuffer.addParam(std::move(lengthParam));
1503     }
1504 
1505     if (isCallValid)
1506     {
1507         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1508         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1509         CaptureGetTexParameterivRobustANGLE_params(glState, isCallValid, targetPacked, pname,
1510                                                    bufSize, length, params, &paramsParam);
1511         paramBuffer.addParam(std::move(paramsParam));
1512     }
1513     else
1514     {
1515         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1516         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1517         paramBuffer.addParam(std::move(paramsParam));
1518     }
1519 
1520     return CallCapture(angle::EntryPoint::GLGetTexParameterivRobustANGLE, std::move(paramBuffer));
1521 }
1522 
CaptureGetUniformfvRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLsizei * length,GLfloat * params)1523 CallCapture CaptureGetUniformfvRobustANGLE(const State &glState,
1524                                            bool isCallValid,
1525                                            ShaderProgramID programPacked,
1526                                            UniformLocation locationPacked,
1527                                            GLsizei bufSize,
1528                                            GLsizei *length,
1529                                            GLfloat *params)
1530 {
1531     ParamBuffer paramBuffer;
1532 
1533     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1534     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1535     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1536 
1537     if (isCallValid)
1538     {
1539         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1540         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1541         CaptureGetUniformfvRobustANGLE_length(glState, isCallValid, programPacked, locationPacked,
1542                                               bufSize, length, params, &lengthParam);
1543         paramBuffer.addParam(std::move(lengthParam));
1544     }
1545     else
1546     {
1547         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1548         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1549                        &lengthParam.value);
1550         paramBuffer.addParam(std::move(lengthParam));
1551     }
1552 
1553     if (isCallValid)
1554     {
1555         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1556         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
1557         CaptureGetUniformfvRobustANGLE_params(glState, isCallValid, programPacked, locationPacked,
1558                                               bufSize, length, params, &paramsParam);
1559         paramBuffer.addParam(std::move(paramsParam));
1560     }
1561     else
1562     {
1563         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1564         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
1565                        &paramsParam.value);
1566         paramBuffer.addParam(std::move(paramsParam));
1567     }
1568 
1569     return CallCapture(angle::EntryPoint::GLGetUniformfvRobustANGLE, std::move(paramBuffer));
1570 }
1571 
CaptureGetUniformivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLsizei * length,GLint * params)1572 CallCapture CaptureGetUniformivRobustANGLE(const State &glState,
1573                                            bool isCallValid,
1574                                            ShaderProgramID programPacked,
1575                                            UniformLocation locationPacked,
1576                                            GLsizei bufSize,
1577                                            GLsizei *length,
1578                                            GLint *params)
1579 {
1580     ParamBuffer paramBuffer;
1581 
1582     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1583     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1584     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1585 
1586     if (isCallValid)
1587     {
1588         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1589         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1590         CaptureGetUniformivRobustANGLE_length(glState, isCallValid, programPacked, locationPacked,
1591                                               bufSize, length, params, &lengthParam);
1592         paramBuffer.addParam(std::move(lengthParam));
1593     }
1594     else
1595     {
1596         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1597         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1598                        &lengthParam.value);
1599         paramBuffer.addParam(std::move(lengthParam));
1600     }
1601 
1602     if (isCallValid)
1603     {
1604         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1605         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1606         CaptureGetUniformivRobustANGLE_params(glState, isCallValid, programPacked, locationPacked,
1607                                               bufSize, length, params, &paramsParam);
1608         paramBuffer.addParam(std::move(paramsParam));
1609     }
1610     else
1611     {
1612         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1613         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1614         paramBuffer.addParam(std::move(paramsParam));
1615     }
1616 
1617     return CallCapture(angle::EntryPoint::GLGetUniformivRobustANGLE, std::move(paramBuffer));
1618 }
1619 
CaptureGetVertexAttribfvRobustANGLE(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLsizei bufSize,GLsizei * length,GLfloat * params)1620 CallCapture CaptureGetVertexAttribfvRobustANGLE(const State &glState,
1621                                                 bool isCallValid,
1622                                                 GLuint index,
1623                                                 GLenum pname,
1624                                                 GLsizei bufSize,
1625                                                 GLsizei *length,
1626                                                 GLfloat *params)
1627 {
1628     ParamBuffer paramBuffer;
1629 
1630     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1631     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1632     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1633 
1634     if (isCallValid)
1635     {
1636         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1637         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1638         CaptureGetVertexAttribfvRobustANGLE_length(glState, isCallValid, index, pname, bufSize,
1639                                                    length, params, &lengthParam);
1640         paramBuffer.addParam(std::move(lengthParam));
1641     }
1642     else
1643     {
1644         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1645         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1646                        &lengthParam.value);
1647         paramBuffer.addParam(std::move(lengthParam));
1648     }
1649 
1650     if (isCallValid)
1651     {
1652         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1653         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
1654         CaptureGetVertexAttribfvRobustANGLE_params(glState, isCallValid, index, pname, bufSize,
1655                                                    length, params, &paramsParam);
1656         paramBuffer.addParam(std::move(paramsParam));
1657     }
1658     else
1659     {
1660         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
1661         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
1662                        &paramsParam.value);
1663         paramBuffer.addParam(std::move(paramsParam));
1664     }
1665 
1666     return CallCapture(angle::EntryPoint::GLGetVertexAttribfvRobustANGLE, std::move(paramBuffer));
1667 }
1668 
CaptureGetVertexAttribivRobustANGLE(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)1669 CallCapture CaptureGetVertexAttribivRobustANGLE(const State &glState,
1670                                                 bool isCallValid,
1671                                                 GLuint index,
1672                                                 GLenum pname,
1673                                                 GLsizei bufSize,
1674                                                 GLsizei *length,
1675                                                 GLint *params)
1676 {
1677     ParamBuffer paramBuffer;
1678 
1679     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1680     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1681     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1682 
1683     if (isCallValid)
1684     {
1685         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1686         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1687         CaptureGetVertexAttribivRobustANGLE_length(glState, isCallValid, index, pname, bufSize,
1688                                                    length, params, &lengthParam);
1689         paramBuffer.addParam(std::move(lengthParam));
1690     }
1691     else
1692     {
1693         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1694         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1695                        &lengthParam.value);
1696         paramBuffer.addParam(std::move(lengthParam));
1697     }
1698 
1699     if (isCallValid)
1700     {
1701         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1702         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1703         CaptureGetVertexAttribivRobustANGLE_params(glState, isCallValid, index, pname, bufSize,
1704                                                    length, params, &paramsParam);
1705         paramBuffer.addParam(std::move(paramsParam));
1706     }
1707     else
1708     {
1709         ParamCapture paramsParam("params", ParamType::TGLintPointer);
1710         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
1711         paramBuffer.addParam(std::move(paramsParam));
1712     }
1713 
1714     return CallCapture(angle::EntryPoint::GLGetVertexAttribivRobustANGLE, std::move(paramBuffer));
1715 }
1716 
CaptureGetVertexAttribPointervRobustANGLE(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLsizei bufSize,GLsizei * length,void ** pointer)1717 CallCapture CaptureGetVertexAttribPointervRobustANGLE(const State &glState,
1718                                                       bool isCallValid,
1719                                                       GLuint index,
1720                                                       GLenum pname,
1721                                                       GLsizei bufSize,
1722                                                       GLsizei *length,
1723                                                       void **pointer)
1724 {
1725     ParamBuffer paramBuffer;
1726 
1727     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1728     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1729     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1730 
1731     if (isCallValid)
1732     {
1733         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1734         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1735         CaptureGetVertexAttribPointervRobustANGLE_length(glState, isCallValid, index, pname,
1736                                                          bufSize, length, pointer, &lengthParam);
1737         paramBuffer.addParam(std::move(lengthParam));
1738     }
1739     else
1740     {
1741         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1742         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1743                        &lengthParam.value);
1744         paramBuffer.addParam(std::move(lengthParam));
1745     }
1746 
1747     if (isCallValid)
1748     {
1749         ParamCapture pointerParam("pointer", ParamType::TvoidPointerPointer);
1750         InitParamValue(ParamType::TvoidPointerPointer, pointer, &pointerParam.value);
1751         CaptureGetVertexAttribPointervRobustANGLE_pointer(glState, isCallValid, index, pname,
1752                                                           bufSize, length, pointer, &pointerParam);
1753         paramBuffer.addParam(std::move(pointerParam));
1754     }
1755     else
1756     {
1757         ParamCapture pointerParam("pointer", ParamType::TvoidPointerPointer);
1758         InitParamValue(ParamType::TvoidPointerPointer, static_cast<void **>(nullptr),
1759                        &pointerParam.value);
1760         paramBuffer.addParam(std::move(pointerParam));
1761     }
1762 
1763     return CallCapture(angle::EntryPoint::GLGetVertexAttribPointervRobustANGLE,
1764                        std::move(paramBuffer));
1765 }
1766 
CaptureReadPixelsRobustANGLE(const State & glState,bool isCallValid,GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,GLsizei * length,GLsizei * columns,GLsizei * rows,void * pixels)1767 CallCapture CaptureReadPixelsRobustANGLE(const State &glState,
1768                                          bool isCallValid,
1769                                          GLint x,
1770                                          GLint y,
1771                                          GLsizei width,
1772                                          GLsizei height,
1773                                          GLenum format,
1774                                          GLenum type,
1775                                          GLsizei bufSize,
1776                                          GLsizei *length,
1777                                          GLsizei *columns,
1778                                          GLsizei *rows,
1779                                          void *pixels)
1780 {
1781     ParamBuffer paramBuffer;
1782 
1783     paramBuffer.addValueParam("x", ParamType::TGLint, x);
1784     paramBuffer.addValueParam("y", ParamType::TGLint, y);
1785     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1786     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1787     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
1788     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
1789     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1790 
1791     if (isCallValid)
1792     {
1793         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1794         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1795         CaptureReadPixelsRobustANGLE_length(glState, isCallValid, x, y, width, height, format, type,
1796                                             bufSize, length, columns, rows, pixels, &lengthParam);
1797         paramBuffer.addParam(std::move(lengthParam));
1798     }
1799     else
1800     {
1801         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1802         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1803                        &lengthParam.value);
1804         paramBuffer.addParam(std::move(lengthParam));
1805     }
1806 
1807     if (isCallValid)
1808     {
1809         ParamCapture columnsParam("columns", ParamType::TGLsizeiPointer);
1810         InitParamValue(ParamType::TGLsizeiPointer, columns, &columnsParam.value);
1811         CaptureReadPixelsRobustANGLE_columns(glState, isCallValid, x, y, width, height, format,
1812                                              type, bufSize, length, columns, rows, pixels,
1813                                              &columnsParam);
1814         paramBuffer.addParam(std::move(columnsParam));
1815     }
1816     else
1817     {
1818         ParamCapture columnsParam("columns", ParamType::TGLsizeiPointer);
1819         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1820                        &columnsParam.value);
1821         paramBuffer.addParam(std::move(columnsParam));
1822     }
1823 
1824     if (isCallValid)
1825     {
1826         ParamCapture rowsParam("rows", ParamType::TGLsizeiPointer);
1827         InitParamValue(ParamType::TGLsizeiPointer, rows, &rowsParam.value);
1828         CaptureReadPixelsRobustANGLE_rows(glState, isCallValid, x, y, width, height, format, type,
1829                                           bufSize, length, columns, rows, pixels, &rowsParam);
1830         paramBuffer.addParam(std::move(rowsParam));
1831     }
1832     else
1833     {
1834         ParamCapture rowsParam("rows", ParamType::TGLsizeiPointer);
1835         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
1836                        &rowsParam.value);
1837         paramBuffer.addParam(std::move(rowsParam));
1838     }
1839 
1840     if (isCallValid)
1841     {
1842         ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
1843         InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
1844         CaptureReadPixelsRobustANGLE_pixels(glState, isCallValid, x, y, width, height, format, type,
1845                                             bufSize, length, columns, rows, pixels, &pixelsParam);
1846         paramBuffer.addParam(std::move(pixelsParam));
1847     }
1848     else
1849     {
1850         ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
1851         InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
1852         paramBuffer.addParam(std::move(pixelsParam));
1853     }
1854 
1855     return CallCapture(angle::EntryPoint::GLReadPixelsRobustANGLE, std::move(paramBuffer));
1856 }
1857 
CaptureTexImage2DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,GLsizei bufSize,const void * pixels)1858 CallCapture CaptureTexImage2DRobustANGLE(const State &glState,
1859                                          bool isCallValid,
1860                                          TextureTarget targetPacked,
1861                                          GLint level,
1862                                          GLint internalformat,
1863                                          GLsizei width,
1864                                          GLsizei height,
1865                                          GLint border,
1866                                          GLenum format,
1867                                          GLenum type,
1868                                          GLsizei bufSize,
1869                                          const void *pixels)
1870 {
1871     ParamBuffer paramBuffer;
1872 
1873     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
1874     paramBuffer.addValueParam("level", ParamType::TGLint, level);
1875     paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
1876     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1877     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1878     paramBuffer.addValueParam("border", ParamType::TGLint, border);
1879     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
1880     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
1881     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1882 
1883     if (isCallValid)
1884     {
1885         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
1886         InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
1887         CaptureTexImage2DRobustANGLE_pixels(glState, isCallValid, targetPacked, level,
1888                                             internalformat, width, height, border, format, type,
1889                                             bufSize, pixels, &pixelsParam);
1890         paramBuffer.addParam(std::move(pixelsParam));
1891     }
1892     else
1893     {
1894         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
1895         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
1896                        &pixelsParam.value);
1897         paramBuffer.addParam(std::move(pixelsParam));
1898     }
1899 
1900     return CallCapture(angle::EntryPoint::GLTexImage2DRobustANGLE, std::move(paramBuffer));
1901 }
1902 
CaptureTexParameterfvRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,const GLfloat * params)1903 CallCapture CaptureTexParameterfvRobustANGLE(const State &glState,
1904                                              bool isCallValid,
1905                                              TextureType targetPacked,
1906                                              GLenum pname,
1907                                              GLsizei bufSize,
1908                                              const GLfloat *params)
1909 {
1910     ParamBuffer paramBuffer;
1911 
1912     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1913     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1914     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1915 
1916     if (isCallValid)
1917     {
1918         ParamCapture paramsParam("params", ParamType::TGLfloatConstPointer);
1919         InitParamValue(ParamType::TGLfloatConstPointer, params, &paramsParam.value);
1920         CaptureTexParameterfvRobustANGLE_params(glState, isCallValid, targetPacked, pname, bufSize,
1921                                                 params, &paramsParam);
1922         paramBuffer.addParam(std::move(paramsParam));
1923     }
1924     else
1925     {
1926         ParamCapture paramsParam("params", ParamType::TGLfloatConstPointer);
1927         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1928                        &paramsParam.value);
1929         paramBuffer.addParam(std::move(paramsParam));
1930     }
1931 
1932     return CallCapture(angle::EntryPoint::GLTexParameterfvRobustANGLE, std::move(paramBuffer));
1933 }
1934 
CaptureTexParameterivRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,const GLint * params)1935 CallCapture CaptureTexParameterivRobustANGLE(const State &glState,
1936                                              bool isCallValid,
1937                                              TextureType targetPacked,
1938                                              GLenum pname,
1939                                              GLsizei bufSize,
1940                                              const GLint *params)
1941 {
1942     ParamBuffer paramBuffer;
1943 
1944     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1945     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
1946     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1947 
1948     if (isCallValid)
1949     {
1950         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
1951         InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
1952         CaptureTexParameterivRobustANGLE_params(glState, isCallValid, targetPacked, pname, bufSize,
1953                                                 params, &paramsParam);
1954         paramBuffer.addParam(std::move(paramsParam));
1955     }
1956     else
1957     {
1958         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
1959         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1960                        &paramsParam.value);
1961         paramBuffer.addParam(std::move(paramsParam));
1962     }
1963 
1964     return CallCapture(angle::EntryPoint::GLTexParameterivRobustANGLE, std::move(paramBuffer));
1965 }
1966 
CaptureTexSubImage2DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,const void * pixels)1967 CallCapture CaptureTexSubImage2DRobustANGLE(const State &glState,
1968                                             bool isCallValid,
1969                                             TextureTarget targetPacked,
1970                                             GLint level,
1971                                             GLint xoffset,
1972                                             GLint yoffset,
1973                                             GLsizei width,
1974                                             GLsizei height,
1975                                             GLenum format,
1976                                             GLenum type,
1977                                             GLsizei bufSize,
1978                                             const void *pixels)
1979 {
1980     ParamBuffer paramBuffer;
1981 
1982     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
1983     paramBuffer.addValueParam("level", ParamType::TGLint, level);
1984     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
1985     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
1986     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1987     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1988     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
1989     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
1990     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1991 
1992     if (isCallValid)
1993     {
1994         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
1995         InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
1996         CaptureTexSubImage2DRobustANGLE_pixels(glState, isCallValid, targetPacked, level, xoffset,
1997                                                yoffset, width, height, format, type, bufSize,
1998                                                pixels, &pixelsParam);
1999         paramBuffer.addParam(std::move(pixelsParam));
2000     }
2001     else
2002     {
2003         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
2004         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2005                        &pixelsParam.value);
2006         paramBuffer.addParam(std::move(pixelsParam));
2007     }
2008 
2009     return CallCapture(angle::EntryPoint::GLTexSubImage2DRobustANGLE, std::move(paramBuffer));
2010 }
2011 
CaptureTexImage3DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,GLsizei bufSize,const void * pixels)2012 CallCapture CaptureTexImage3DRobustANGLE(const State &glState,
2013                                          bool isCallValid,
2014                                          TextureTarget targetPacked,
2015                                          GLint level,
2016                                          GLint internalformat,
2017                                          GLsizei width,
2018                                          GLsizei height,
2019                                          GLsizei depth,
2020                                          GLint border,
2021                                          GLenum format,
2022                                          GLenum type,
2023                                          GLsizei bufSize,
2024                                          const void *pixels)
2025 {
2026     ParamBuffer paramBuffer;
2027 
2028     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
2029     paramBuffer.addValueParam("level", ParamType::TGLint, level);
2030     paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
2031     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2032     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2033     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
2034     paramBuffer.addValueParam("border", ParamType::TGLint, border);
2035     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
2036     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
2037     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2038 
2039     if (isCallValid)
2040     {
2041         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
2042         InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
2043         CaptureTexImage3DRobustANGLE_pixels(glState, isCallValid, targetPacked, level,
2044                                             internalformat, width, height, depth, border, format,
2045                                             type, bufSize, pixels, &pixelsParam);
2046         paramBuffer.addParam(std::move(pixelsParam));
2047     }
2048     else
2049     {
2050         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
2051         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2052                        &pixelsParam.value);
2053         paramBuffer.addParam(std::move(pixelsParam));
2054     }
2055 
2056     return CallCapture(angle::EntryPoint::GLTexImage3DRobustANGLE, std::move(paramBuffer));
2057 }
2058 
CaptureTexSubImage3DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,GLsizei bufSize,const void * pixels)2059 CallCapture CaptureTexSubImage3DRobustANGLE(const State &glState,
2060                                             bool isCallValid,
2061                                             TextureTarget targetPacked,
2062                                             GLint level,
2063                                             GLint xoffset,
2064                                             GLint yoffset,
2065                                             GLint zoffset,
2066                                             GLsizei width,
2067                                             GLsizei height,
2068                                             GLsizei depth,
2069                                             GLenum format,
2070                                             GLenum type,
2071                                             GLsizei bufSize,
2072                                             const void *pixels)
2073 {
2074     ParamBuffer paramBuffer;
2075 
2076     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
2077     paramBuffer.addValueParam("level", ParamType::TGLint, level);
2078     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
2079     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
2080     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
2081     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2082     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2083     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
2084     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
2085     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
2086     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2087 
2088     if (isCallValid)
2089     {
2090         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
2091         InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
2092         CaptureTexSubImage3DRobustANGLE_pixels(glState, isCallValid, targetPacked, level, xoffset,
2093                                                yoffset, zoffset, width, height, depth, format, type,
2094                                                bufSize, pixels, &pixelsParam);
2095         paramBuffer.addParam(std::move(pixelsParam));
2096     }
2097     else
2098     {
2099         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
2100         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2101                        &pixelsParam.value);
2102         paramBuffer.addParam(std::move(pixelsParam));
2103     }
2104 
2105     return CallCapture(angle::EntryPoint::GLTexSubImage3DRobustANGLE, std::move(paramBuffer));
2106 }
2107 
CaptureCompressedTexImage2DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLint border,GLsizei imageSize,GLsizei dataSize,const GLvoid * data)2108 CallCapture CaptureCompressedTexImage2DRobustANGLE(const State &glState,
2109                                                    bool isCallValid,
2110                                                    TextureTarget targetPacked,
2111                                                    GLint level,
2112                                                    GLenum internalformat,
2113                                                    GLsizei width,
2114                                                    GLsizei height,
2115                                                    GLint border,
2116                                                    GLsizei imageSize,
2117                                                    GLsizei dataSize,
2118                                                    const GLvoid *data)
2119 {
2120     ParamBuffer paramBuffer;
2121 
2122     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
2123     paramBuffer.addValueParam("level", ParamType::TGLint, level);
2124     paramBuffer.addEnumParam("internalformat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
2125                              internalformat);
2126     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2127     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2128     paramBuffer.addValueParam("border", ParamType::TGLint, border);
2129     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
2130     paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);
2131 
2132     if (isCallValid)
2133     {
2134         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2135         InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
2136         CaptureCompressedTexImage2DRobustANGLE_data(glState, isCallValid, targetPacked, level,
2137                                                     internalformat, width, height, border,
2138                                                     imageSize, dataSize, data, &dataParam);
2139         paramBuffer.addParam(std::move(dataParam));
2140     }
2141     else
2142     {
2143         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2144         InitParamValue(ParamType::TGLvoidConstPointer, static_cast<const GLvoid *>(nullptr),
2145                        &dataParam.value);
2146         paramBuffer.addParam(std::move(dataParam));
2147     }
2148 
2149     return CallCapture(angle::EntryPoint::GLCompressedTexImage2DRobustANGLE,
2150                        std::move(paramBuffer));
2151 }
2152 
CaptureCompressedTexSubImage2DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLsizei xoffset,GLsizei yoffset,GLsizei width,GLsizei height,GLenum format,GLsizei imageSize,GLsizei dataSize,const GLvoid * data)2153 CallCapture CaptureCompressedTexSubImage2DRobustANGLE(const State &glState,
2154                                                       bool isCallValid,
2155                                                       TextureTarget targetPacked,
2156                                                       GLint level,
2157                                                       GLsizei xoffset,
2158                                                       GLsizei yoffset,
2159                                                       GLsizei width,
2160                                                       GLsizei height,
2161                                                       GLenum format,
2162                                                       GLsizei imageSize,
2163                                                       GLsizei dataSize,
2164                                                       const GLvoid *data)
2165 {
2166     ParamBuffer paramBuffer;
2167 
2168     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
2169     paramBuffer.addValueParam("level", ParamType::TGLint, level);
2170     paramBuffer.addValueParam("xoffset", ParamType::TGLsizei, xoffset);
2171     paramBuffer.addValueParam("yoffset", ParamType::TGLsizei, yoffset);
2172     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2173     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2174     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
2175     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
2176     paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);
2177 
2178     if (isCallValid)
2179     {
2180         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2181         InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
2182         CaptureCompressedTexSubImage2DRobustANGLE_data(glState, isCallValid, targetPacked, level,
2183                                                        xoffset, yoffset, width, height, format,
2184                                                        imageSize, dataSize, data, &dataParam);
2185         paramBuffer.addParam(std::move(dataParam));
2186     }
2187     else
2188     {
2189         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2190         InitParamValue(ParamType::TGLvoidConstPointer, static_cast<const GLvoid *>(nullptr),
2191                        &dataParam.value);
2192         paramBuffer.addParam(std::move(dataParam));
2193     }
2194 
2195     return CallCapture(angle::EntryPoint::GLCompressedTexSubImage2DRobustANGLE,
2196                        std::move(paramBuffer));
2197 }
2198 
CaptureCompressedTexImage3DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLsizei imageSize,GLsizei dataSize,const GLvoid * data)2199 CallCapture CaptureCompressedTexImage3DRobustANGLE(const State &glState,
2200                                                    bool isCallValid,
2201                                                    TextureTarget targetPacked,
2202                                                    GLint level,
2203                                                    GLenum internalformat,
2204                                                    GLsizei width,
2205                                                    GLsizei height,
2206                                                    GLsizei depth,
2207                                                    GLint border,
2208                                                    GLsizei imageSize,
2209                                                    GLsizei dataSize,
2210                                                    const GLvoid *data)
2211 {
2212     ParamBuffer paramBuffer;
2213 
2214     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
2215     paramBuffer.addValueParam("level", ParamType::TGLint, level);
2216     paramBuffer.addEnumParam("internalformat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
2217                              internalformat);
2218     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2219     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2220     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
2221     paramBuffer.addValueParam("border", ParamType::TGLint, border);
2222     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
2223     paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);
2224 
2225     if (isCallValid)
2226     {
2227         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2228         InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
2229         CaptureCompressedTexImage3DRobustANGLE_data(glState, isCallValid, targetPacked, level,
2230                                                     internalformat, width, height, depth, border,
2231                                                     imageSize, dataSize, data, &dataParam);
2232         paramBuffer.addParam(std::move(dataParam));
2233     }
2234     else
2235     {
2236         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2237         InitParamValue(ParamType::TGLvoidConstPointer, static_cast<const GLvoid *>(nullptr),
2238                        &dataParam.value);
2239         paramBuffer.addParam(std::move(dataParam));
2240     }
2241 
2242     return CallCapture(angle::EntryPoint::GLCompressedTexImage3DRobustANGLE,
2243                        std::move(paramBuffer));
2244 }
2245 
CaptureCompressedTexSubImage3DRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,GLsizei dataSize,const GLvoid * data)2246 CallCapture CaptureCompressedTexSubImage3DRobustANGLE(const State &glState,
2247                                                       bool isCallValid,
2248                                                       TextureTarget targetPacked,
2249                                                       GLint level,
2250                                                       GLint xoffset,
2251                                                       GLint yoffset,
2252                                                       GLint zoffset,
2253                                                       GLsizei width,
2254                                                       GLsizei height,
2255                                                       GLsizei depth,
2256                                                       GLenum format,
2257                                                       GLsizei imageSize,
2258                                                       GLsizei dataSize,
2259                                                       const GLvoid *data)
2260 {
2261     ParamBuffer paramBuffer;
2262 
2263     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
2264     paramBuffer.addValueParam("level", ParamType::TGLint, level);
2265     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
2266     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
2267     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
2268     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2269     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2270     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
2271     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
2272     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
2273     paramBuffer.addValueParam("dataSize", ParamType::TGLsizei, dataSize);
2274 
2275     if (isCallValid)
2276     {
2277         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2278         InitParamValue(ParamType::TGLvoidConstPointer, data, &dataParam.value);
2279         CaptureCompressedTexSubImage3DRobustANGLE_data(
2280             glState, isCallValid, targetPacked, level, xoffset, yoffset, zoffset, width, height,
2281             depth, format, imageSize, dataSize, data, &dataParam);
2282         paramBuffer.addParam(std::move(dataParam));
2283     }
2284     else
2285     {
2286         ParamCapture dataParam("data", ParamType::TGLvoidConstPointer);
2287         InitParamValue(ParamType::TGLvoidConstPointer, static_cast<const GLvoid *>(nullptr),
2288                        &dataParam.value);
2289         paramBuffer.addParam(std::move(dataParam));
2290     }
2291 
2292     return CallCapture(angle::EntryPoint::GLCompressedTexSubImage3DRobustANGLE,
2293                        std::move(paramBuffer));
2294 }
2295 
CaptureGetQueryivRobustANGLE(const State & glState,bool isCallValid,QueryType targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)2296 CallCapture CaptureGetQueryivRobustANGLE(const State &glState,
2297                                          bool isCallValid,
2298                                          QueryType targetPacked,
2299                                          GLenum pname,
2300                                          GLsizei bufSize,
2301                                          GLsizei *length,
2302                                          GLint *params)
2303 {
2304     ParamBuffer paramBuffer;
2305 
2306     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
2307     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2308     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2309 
2310     if (isCallValid)
2311     {
2312         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2313         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2314         CaptureGetQueryivRobustANGLE_length(glState, isCallValid, targetPacked, pname, bufSize,
2315                                             length, params, &lengthParam);
2316         paramBuffer.addParam(std::move(lengthParam));
2317     }
2318     else
2319     {
2320         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2321         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2322                        &lengthParam.value);
2323         paramBuffer.addParam(std::move(lengthParam));
2324     }
2325 
2326     if (isCallValid)
2327     {
2328         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2329         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
2330         CaptureGetQueryivRobustANGLE_params(glState, isCallValid, targetPacked, pname, bufSize,
2331                                             length, params, &paramsParam);
2332         paramBuffer.addParam(std::move(paramsParam));
2333     }
2334     else
2335     {
2336         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2337         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
2338         paramBuffer.addParam(std::move(paramsParam));
2339     }
2340 
2341     return CallCapture(angle::EntryPoint::GLGetQueryivRobustANGLE, std::move(paramBuffer));
2342 }
2343 
CaptureGetQueryObjectuivRobustANGLE(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLuint * params)2344 CallCapture CaptureGetQueryObjectuivRobustANGLE(const State &glState,
2345                                                 bool isCallValid,
2346                                                 QueryID idPacked,
2347                                                 GLenum pname,
2348                                                 GLsizei bufSize,
2349                                                 GLsizei *length,
2350                                                 GLuint *params)
2351 {
2352     ParamBuffer paramBuffer;
2353 
2354     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
2355     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2356     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2357 
2358     if (isCallValid)
2359     {
2360         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2361         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2362         CaptureGetQueryObjectuivRobustANGLE_length(glState, isCallValid, idPacked, pname, bufSize,
2363                                                    length, params, &lengthParam);
2364         paramBuffer.addParam(std::move(lengthParam));
2365     }
2366     else
2367     {
2368         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2369         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2370                        &lengthParam.value);
2371         paramBuffer.addParam(std::move(lengthParam));
2372     }
2373 
2374     if (isCallValid)
2375     {
2376         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
2377         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
2378         CaptureGetQueryObjectuivRobustANGLE_params(glState, isCallValid, idPacked, pname, bufSize,
2379                                                    length, params, &paramsParam);
2380         paramBuffer.addParam(std::move(paramsParam));
2381     }
2382     else
2383     {
2384         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
2385         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
2386                        &paramsParam.value);
2387         paramBuffer.addParam(std::move(paramsParam));
2388     }
2389 
2390     return CallCapture(angle::EntryPoint::GLGetQueryObjectuivRobustANGLE, std::move(paramBuffer));
2391 }
2392 
CaptureGetBufferPointervRobustANGLE(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,void ** params)2393 CallCapture CaptureGetBufferPointervRobustANGLE(const State &glState,
2394                                                 bool isCallValid,
2395                                                 BufferBinding targetPacked,
2396                                                 GLenum pname,
2397                                                 GLsizei bufSize,
2398                                                 GLsizei *length,
2399                                                 void **params)
2400 {
2401     ParamBuffer paramBuffer;
2402 
2403     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
2404     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2405     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2406 
2407     if (isCallValid)
2408     {
2409         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2410         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2411         CaptureGetBufferPointervRobustANGLE_length(glState, isCallValid, targetPacked, pname,
2412                                                    bufSize, length, params, &lengthParam);
2413         paramBuffer.addParam(std::move(lengthParam));
2414     }
2415     else
2416     {
2417         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2418         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2419                        &lengthParam.value);
2420         paramBuffer.addParam(std::move(lengthParam));
2421     }
2422 
2423     if (isCallValid)
2424     {
2425         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
2426         InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
2427         CaptureGetBufferPointervRobustANGLE_params(glState, isCallValid, targetPacked, pname,
2428                                                    bufSize, length, params, &paramsParam);
2429         paramBuffer.addParam(std::move(paramsParam));
2430     }
2431     else
2432     {
2433         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
2434         InitParamValue(ParamType::TvoidPointerPointer, static_cast<void **>(nullptr),
2435                        &paramsParam.value);
2436         paramBuffer.addParam(std::move(paramsParam));
2437     }
2438 
2439     return CallCapture(angle::EntryPoint::GLGetBufferPointervRobustANGLE, std::move(paramBuffer));
2440 }
2441 
CaptureGetIntegeri_vRobustANGLE(const State & glState,bool isCallValid,GLenum target,GLuint index,GLsizei bufSize,GLsizei * length,GLint * data)2442 CallCapture CaptureGetIntegeri_vRobustANGLE(const State &glState,
2443                                             bool isCallValid,
2444                                             GLenum target,
2445                                             GLuint index,
2446                                             GLsizei bufSize,
2447                                             GLsizei *length,
2448                                             GLint *data)
2449 {
2450     ParamBuffer paramBuffer;
2451 
2452     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
2453     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
2454     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2455 
2456     if (isCallValid)
2457     {
2458         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2459         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2460         CaptureGetIntegeri_vRobustANGLE_length(glState, isCallValid, target, index, bufSize, length,
2461                                                data, &lengthParam);
2462         paramBuffer.addParam(std::move(lengthParam));
2463     }
2464     else
2465     {
2466         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2467         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2468                        &lengthParam.value);
2469         paramBuffer.addParam(std::move(lengthParam));
2470     }
2471 
2472     if (isCallValid)
2473     {
2474         ParamCapture dataParam("data", ParamType::TGLintPointer);
2475         InitParamValue(ParamType::TGLintPointer, data, &dataParam.value);
2476         CaptureGetIntegeri_vRobustANGLE_data(glState, isCallValid, target, index, bufSize, length,
2477                                              data, &dataParam);
2478         paramBuffer.addParam(std::move(dataParam));
2479     }
2480     else
2481     {
2482         ParamCapture dataParam("data", ParamType::TGLintPointer);
2483         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &dataParam.value);
2484         paramBuffer.addParam(std::move(dataParam));
2485     }
2486 
2487     return CallCapture(angle::EntryPoint::GLGetIntegeri_vRobustANGLE, std::move(paramBuffer));
2488 }
2489 
CaptureGetInternalformativRobustANGLE(const State & glState,bool isCallValid,GLenum target,GLenum internalformat,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)2490 CallCapture CaptureGetInternalformativRobustANGLE(const State &glState,
2491                                                   bool isCallValid,
2492                                                   GLenum target,
2493                                                   GLenum internalformat,
2494                                                   GLenum pname,
2495                                                   GLsizei bufSize,
2496                                                   GLsizei *length,
2497                                                   GLint *params)
2498 {
2499     ParamBuffer paramBuffer;
2500 
2501     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
2502     paramBuffer.addEnumParam("internalformat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
2503                              internalformat);
2504     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2505     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2506 
2507     if (isCallValid)
2508     {
2509         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2510         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2511         CaptureGetInternalformativRobustANGLE_length(glState, isCallValid, target, internalformat,
2512                                                      pname, bufSize, length, params, &lengthParam);
2513         paramBuffer.addParam(std::move(lengthParam));
2514     }
2515     else
2516     {
2517         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2518         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2519                        &lengthParam.value);
2520         paramBuffer.addParam(std::move(lengthParam));
2521     }
2522 
2523     if (isCallValid)
2524     {
2525         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2526         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
2527         CaptureGetInternalformativRobustANGLE_params(glState, isCallValid, target, internalformat,
2528                                                      pname, bufSize, length, params, &paramsParam);
2529         paramBuffer.addParam(std::move(paramsParam));
2530     }
2531     else
2532     {
2533         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2534         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
2535         paramBuffer.addParam(std::move(paramsParam));
2536     }
2537 
2538     return CallCapture(angle::EntryPoint::GLGetInternalformativRobustANGLE, std::move(paramBuffer));
2539 }
2540 
CaptureGetVertexAttribIivRobustANGLE(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)2541 CallCapture CaptureGetVertexAttribIivRobustANGLE(const State &glState,
2542                                                  bool isCallValid,
2543                                                  GLuint index,
2544                                                  GLenum pname,
2545                                                  GLsizei bufSize,
2546                                                  GLsizei *length,
2547                                                  GLint *params)
2548 {
2549     ParamBuffer paramBuffer;
2550 
2551     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
2552     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2553     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2554 
2555     if (isCallValid)
2556     {
2557         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2558         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2559         CaptureGetVertexAttribIivRobustANGLE_length(glState, isCallValid, index, pname, bufSize,
2560                                                     length, params, &lengthParam);
2561         paramBuffer.addParam(std::move(lengthParam));
2562     }
2563     else
2564     {
2565         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2566         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2567                        &lengthParam.value);
2568         paramBuffer.addParam(std::move(lengthParam));
2569     }
2570 
2571     if (isCallValid)
2572     {
2573         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2574         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
2575         CaptureGetVertexAttribIivRobustANGLE_params(glState, isCallValid, index, pname, bufSize,
2576                                                     length, params, &paramsParam);
2577         paramBuffer.addParam(std::move(paramsParam));
2578     }
2579     else
2580     {
2581         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2582         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
2583         paramBuffer.addParam(std::move(paramsParam));
2584     }
2585 
2586     return CallCapture(angle::EntryPoint::GLGetVertexAttribIivRobustANGLE, std::move(paramBuffer));
2587 }
2588 
CaptureGetVertexAttribIuivRobustANGLE(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLsizei bufSize,GLsizei * length,GLuint * params)2589 CallCapture CaptureGetVertexAttribIuivRobustANGLE(const State &glState,
2590                                                   bool isCallValid,
2591                                                   GLuint index,
2592                                                   GLenum pname,
2593                                                   GLsizei bufSize,
2594                                                   GLsizei *length,
2595                                                   GLuint *params)
2596 {
2597     ParamBuffer paramBuffer;
2598 
2599     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
2600     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2601     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2602 
2603     if (isCallValid)
2604     {
2605         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2606         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2607         CaptureGetVertexAttribIuivRobustANGLE_length(glState, isCallValid, index, pname, bufSize,
2608                                                      length, params, &lengthParam);
2609         paramBuffer.addParam(std::move(lengthParam));
2610     }
2611     else
2612     {
2613         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2614         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2615                        &lengthParam.value);
2616         paramBuffer.addParam(std::move(lengthParam));
2617     }
2618 
2619     if (isCallValid)
2620     {
2621         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
2622         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
2623         CaptureGetVertexAttribIuivRobustANGLE_params(glState, isCallValid, index, pname, bufSize,
2624                                                      length, params, &paramsParam);
2625         paramBuffer.addParam(std::move(paramsParam));
2626     }
2627     else
2628     {
2629         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
2630         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
2631                        &paramsParam.value);
2632         paramBuffer.addParam(std::move(paramsParam));
2633     }
2634 
2635     return CallCapture(angle::EntryPoint::GLGetVertexAttribIuivRobustANGLE, std::move(paramBuffer));
2636 }
2637 
CaptureGetUniformuivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLsizei * length,GLuint * params)2638 CallCapture CaptureGetUniformuivRobustANGLE(const State &glState,
2639                                             bool isCallValid,
2640                                             ShaderProgramID programPacked,
2641                                             UniformLocation locationPacked,
2642                                             GLsizei bufSize,
2643                                             GLsizei *length,
2644                                             GLuint *params)
2645 {
2646     ParamBuffer paramBuffer;
2647 
2648     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
2649     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
2650     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2651 
2652     if (isCallValid)
2653     {
2654         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2655         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2656         CaptureGetUniformuivRobustANGLE_length(glState, isCallValid, programPacked, locationPacked,
2657                                                bufSize, length, params, &lengthParam);
2658         paramBuffer.addParam(std::move(lengthParam));
2659     }
2660     else
2661     {
2662         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2663         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2664                        &lengthParam.value);
2665         paramBuffer.addParam(std::move(lengthParam));
2666     }
2667 
2668     if (isCallValid)
2669     {
2670         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
2671         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
2672         CaptureGetUniformuivRobustANGLE_params(glState, isCallValid, programPacked, locationPacked,
2673                                                bufSize, length, params, &paramsParam);
2674         paramBuffer.addParam(std::move(paramsParam));
2675     }
2676     else
2677     {
2678         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
2679         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
2680                        &paramsParam.value);
2681         paramBuffer.addParam(std::move(paramsParam));
2682     }
2683 
2684     return CallCapture(angle::EntryPoint::GLGetUniformuivRobustANGLE, std::move(paramBuffer));
2685 }
2686 
CaptureGetActiveUniformBlockivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformBlockIndex uniformBlockIndexPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)2687 CallCapture CaptureGetActiveUniformBlockivRobustANGLE(const State &glState,
2688                                                       bool isCallValid,
2689                                                       ShaderProgramID programPacked,
2690                                                       UniformBlockIndex uniformBlockIndexPacked,
2691                                                       GLenum pname,
2692                                                       GLsizei bufSize,
2693                                                       GLsizei *length,
2694                                                       GLint *params)
2695 {
2696     ParamBuffer paramBuffer;
2697 
2698     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
2699     paramBuffer.addValueParam("uniformBlockIndexPacked", ParamType::TUniformBlockIndex,
2700                               uniformBlockIndexPacked);
2701     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2702     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2703 
2704     if (isCallValid)
2705     {
2706         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2707         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2708         CaptureGetActiveUniformBlockivRobustANGLE_length(glState, isCallValid, programPacked,
2709                                                          uniformBlockIndexPacked, pname, bufSize,
2710                                                          length, params, &lengthParam);
2711         paramBuffer.addParam(std::move(lengthParam));
2712     }
2713     else
2714     {
2715         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2716         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2717                        &lengthParam.value);
2718         paramBuffer.addParam(std::move(lengthParam));
2719     }
2720 
2721     if (isCallValid)
2722     {
2723         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2724         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
2725         CaptureGetActiveUniformBlockivRobustANGLE_params(glState, isCallValid, programPacked,
2726                                                          uniformBlockIndexPacked, pname, bufSize,
2727                                                          length, params, &paramsParam);
2728         paramBuffer.addParam(std::move(paramsParam));
2729     }
2730     else
2731     {
2732         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2733         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
2734         paramBuffer.addParam(std::move(paramsParam));
2735     }
2736 
2737     return CallCapture(angle::EntryPoint::GLGetActiveUniformBlockivRobustANGLE,
2738                        std::move(paramBuffer));
2739 }
2740 
CaptureGetInteger64vRobustANGLE(const State & glState,bool isCallValid,GLenum pname,GLsizei bufSize,GLsizei * length,GLint64 * data)2741 CallCapture CaptureGetInteger64vRobustANGLE(const State &glState,
2742                                             bool isCallValid,
2743                                             GLenum pname,
2744                                             GLsizei bufSize,
2745                                             GLsizei *length,
2746                                             GLint64 *data)
2747 {
2748     ParamBuffer paramBuffer;
2749 
2750     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2751     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2752 
2753     if (isCallValid)
2754     {
2755         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2756         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2757         CaptureGetInteger64vRobustANGLE_length(glState, isCallValid, pname, bufSize, length, data,
2758                                                &lengthParam);
2759         paramBuffer.addParam(std::move(lengthParam));
2760     }
2761     else
2762     {
2763         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2764         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2765                        &lengthParam.value);
2766         paramBuffer.addParam(std::move(lengthParam));
2767     }
2768 
2769     if (isCallValid)
2770     {
2771         ParamCapture dataParam("data", ParamType::TGLint64Pointer);
2772         InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
2773         CaptureGetInteger64vRobustANGLE_data(glState, isCallValid, pname, bufSize, length, data,
2774                                              &dataParam);
2775         paramBuffer.addParam(std::move(dataParam));
2776     }
2777     else
2778     {
2779         ParamCapture dataParam("data", ParamType::TGLint64Pointer);
2780         InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
2781                        &dataParam.value);
2782         paramBuffer.addParam(std::move(dataParam));
2783     }
2784 
2785     return CallCapture(angle::EntryPoint::GLGetInteger64vRobustANGLE, std::move(paramBuffer));
2786 }
2787 
CaptureGetInteger64i_vRobustANGLE(const State & glState,bool isCallValid,GLenum target,GLuint index,GLsizei bufSize,GLsizei * length,GLint64 * data)2788 CallCapture CaptureGetInteger64i_vRobustANGLE(const State &glState,
2789                                               bool isCallValid,
2790                                               GLenum target,
2791                                               GLuint index,
2792                                               GLsizei bufSize,
2793                                               GLsizei *length,
2794                                               GLint64 *data)
2795 {
2796     ParamBuffer paramBuffer;
2797 
2798     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
2799     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
2800     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2801 
2802     if (isCallValid)
2803     {
2804         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2805         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2806         CaptureGetInteger64i_vRobustANGLE_length(glState, isCallValid, target, index, bufSize,
2807                                                  length, data, &lengthParam);
2808         paramBuffer.addParam(std::move(lengthParam));
2809     }
2810     else
2811     {
2812         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2813         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2814                        &lengthParam.value);
2815         paramBuffer.addParam(std::move(lengthParam));
2816     }
2817 
2818     if (isCallValid)
2819     {
2820         ParamCapture dataParam("data", ParamType::TGLint64Pointer);
2821         InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
2822         CaptureGetInteger64i_vRobustANGLE_data(glState, isCallValid, target, index, bufSize, length,
2823                                                data, &dataParam);
2824         paramBuffer.addParam(std::move(dataParam));
2825     }
2826     else
2827     {
2828         ParamCapture dataParam("data", ParamType::TGLint64Pointer);
2829         InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
2830                        &dataParam.value);
2831         paramBuffer.addParam(std::move(dataParam));
2832     }
2833 
2834     return CallCapture(angle::EntryPoint::GLGetInteger64i_vRobustANGLE, std::move(paramBuffer));
2835 }
2836 
CaptureGetBufferParameteri64vRobustANGLE(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint64 * params)2837 CallCapture CaptureGetBufferParameteri64vRobustANGLE(const State &glState,
2838                                                      bool isCallValid,
2839                                                      BufferBinding targetPacked,
2840                                                      GLenum pname,
2841                                                      GLsizei bufSize,
2842                                                      GLsizei *length,
2843                                                      GLint64 *params)
2844 {
2845     ParamBuffer paramBuffer;
2846 
2847     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
2848     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2849     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2850 
2851     if (isCallValid)
2852     {
2853         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2854         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2855         CaptureGetBufferParameteri64vRobustANGLE_length(glState, isCallValid, targetPacked, pname,
2856                                                         bufSize, length, params, &lengthParam);
2857         paramBuffer.addParam(std::move(lengthParam));
2858     }
2859     else
2860     {
2861         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2862         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2863                        &lengthParam.value);
2864         paramBuffer.addParam(std::move(lengthParam));
2865     }
2866 
2867     if (isCallValid)
2868     {
2869         ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
2870         InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
2871         CaptureGetBufferParameteri64vRobustANGLE_params(glState, isCallValid, targetPacked, pname,
2872                                                         bufSize, length, params, &paramsParam);
2873         paramBuffer.addParam(std::move(paramsParam));
2874     }
2875     else
2876     {
2877         ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
2878         InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
2879                        &paramsParam.value);
2880         paramBuffer.addParam(std::move(paramsParam));
2881     }
2882 
2883     return CallCapture(angle::EntryPoint::GLGetBufferParameteri64vRobustANGLE,
2884                        std::move(paramBuffer));
2885 }
2886 
CaptureSamplerParameterivRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLuint pname,GLsizei bufSize,const GLint * param)2887 CallCapture CaptureSamplerParameterivRobustANGLE(const State &glState,
2888                                                  bool isCallValid,
2889                                                  SamplerID samplerPacked,
2890                                                  GLuint pname,
2891                                                  GLsizei bufSize,
2892                                                  const GLint *param)
2893 {
2894     ParamBuffer paramBuffer;
2895 
2896     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
2897     paramBuffer.addValueParam("pname", ParamType::TGLuint, pname);
2898     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2899 
2900     if (isCallValid)
2901     {
2902         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
2903         InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
2904         CaptureSamplerParameterivRobustANGLE_param(glState, isCallValid, samplerPacked, pname,
2905                                                    bufSize, param, &paramParam);
2906         paramBuffer.addParam(std::move(paramParam));
2907     }
2908     else
2909     {
2910         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
2911         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
2912                        &paramParam.value);
2913         paramBuffer.addParam(std::move(paramParam));
2914     }
2915 
2916     return CallCapture(angle::EntryPoint::GLSamplerParameterivRobustANGLE, std::move(paramBuffer));
2917 }
2918 
CaptureSamplerParameterfvRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLsizei bufSize,const GLfloat * param)2919 CallCapture CaptureSamplerParameterfvRobustANGLE(const State &glState,
2920                                                  bool isCallValid,
2921                                                  SamplerID samplerPacked,
2922                                                  GLenum pname,
2923                                                  GLsizei bufSize,
2924                                                  const GLfloat *param)
2925 {
2926     ParamBuffer paramBuffer;
2927 
2928     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
2929     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2930     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2931 
2932     if (isCallValid)
2933     {
2934         ParamCapture paramParam("param", ParamType::TGLfloatConstPointer);
2935         InitParamValue(ParamType::TGLfloatConstPointer, param, &paramParam.value);
2936         CaptureSamplerParameterfvRobustANGLE_param(glState, isCallValid, samplerPacked, pname,
2937                                                    bufSize, param, &paramParam);
2938         paramBuffer.addParam(std::move(paramParam));
2939     }
2940     else
2941     {
2942         ParamCapture paramParam("param", ParamType::TGLfloatConstPointer);
2943         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
2944                        &paramParam.value);
2945         paramBuffer.addParam(std::move(paramParam));
2946     }
2947 
2948     return CallCapture(angle::EntryPoint::GLSamplerParameterfvRobustANGLE, std::move(paramBuffer));
2949 }
2950 
CaptureGetSamplerParameterivRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)2951 CallCapture CaptureGetSamplerParameterivRobustANGLE(const State &glState,
2952                                                     bool isCallValid,
2953                                                     SamplerID samplerPacked,
2954                                                     GLenum pname,
2955                                                     GLsizei bufSize,
2956                                                     GLsizei *length,
2957                                                     GLint *params)
2958 {
2959     ParamBuffer paramBuffer;
2960 
2961     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
2962     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
2963     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
2964 
2965     if (isCallValid)
2966     {
2967         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2968         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
2969         CaptureGetSamplerParameterivRobustANGLE_length(glState, isCallValid, samplerPacked, pname,
2970                                                        bufSize, length, params, &lengthParam);
2971         paramBuffer.addParam(std::move(lengthParam));
2972     }
2973     else
2974     {
2975         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
2976         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
2977                        &lengthParam.value);
2978         paramBuffer.addParam(std::move(lengthParam));
2979     }
2980 
2981     if (isCallValid)
2982     {
2983         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2984         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
2985         CaptureGetSamplerParameterivRobustANGLE_params(glState, isCallValid, samplerPacked, pname,
2986                                                        bufSize, length, params, &paramsParam);
2987         paramBuffer.addParam(std::move(paramsParam));
2988     }
2989     else
2990     {
2991         ParamCapture paramsParam("params", ParamType::TGLintPointer);
2992         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
2993         paramBuffer.addParam(std::move(paramsParam));
2994     }
2995 
2996     return CallCapture(angle::EntryPoint::GLGetSamplerParameterivRobustANGLE,
2997                        std::move(paramBuffer));
2998 }
2999 
CaptureGetSamplerParameterfvRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLfloat * params)3000 CallCapture CaptureGetSamplerParameterfvRobustANGLE(const State &glState,
3001                                                     bool isCallValid,
3002                                                     SamplerID samplerPacked,
3003                                                     GLenum pname,
3004                                                     GLsizei bufSize,
3005                                                     GLsizei *length,
3006                                                     GLfloat *params)
3007 {
3008     ParamBuffer paramBuffer;
3009 
3010     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
3011     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3012     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3013 
3014     if (isCallValid)
3015     {
3016         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3017         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3018         CaptureGetSamplerParameterfvRobustANGLE_length(glState, isCallValid, samplerPacked, pname,
3019                                                        bufSize, length, params, &lengthParam);
3020         paramBuffer.addParam(std::move(lengthParam));
3021     }
3022     else
3023     {
3024         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3025         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3026                        &lengthParam.value);
3027         paramBuffer.addParam(std::move(lengthParam));
3028     }
3029 
3030     if (isCallValid)
3031     {
3032         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
3033         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
3034         CaptureGetSamplerParameterfvRobustANGLE_params(glState, isCallValid, samplerPacked, pname,
3035                                                        bufSize, length, params, &paramsParam);
3036         paramBuffer.addParam(std::move(paramsParam));
3037     }
3038     else
3039     {
3040         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
3041         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
3042                        &paramsParam.value);
3043         paramBuffer.addParam(std::move(paramsParam));
3044     }
3045 
3046     return CallCapture(angle::EntryPoint::GLGetSamplerParameterfvRobustANGLE,
3047                        std::move(paramBuffer));
3048 }
3049 
CaptureGetFramebufferParameterivRobustANGLE(const State & glState,bool isCallValid,GLenum target,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)3050 CallCapture CaptureGetFramebufferParameterivRobustANGLE(const State &glState,
3051                                                         bool isCallValid,
3052                                                         GLenum target,
3053                                                         GLenum pname,
3054                                                         GLsizei bufSize,
3055                                                         GLsizei *length,
3056                                                         GLint *params)
3057 {
3058     ParamBuffer paramBuffer;
3059 
3060     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
3061     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3062     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3063 
3064     if (isCallValid)
3065     {
3066         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3067         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3068         CaptureGetFramebufferParameterivRobustANGLE_length(glState, isCallValid, target, pname,
3069                                                            bufSize, length, params, &lengthParam);
3070         paramBuffer.addParam(std::move(lengthParam));
3071     }
3072     else
3073     {
3074         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3075         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3076                        &lengthParam.value);
3077         paramBuffer.addParam(std::move(lengthParam));
3078     }
3079 
3080     if (isCallValid)
3081     {
3082         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3083         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
3084         CaptureGetFramebufferParameterivRobustANGLE_params(glState, isCallValid, target, pname,
3085                                                            bufSize, length, params, &paramsParam);
3086         paramBuffer.addParam(std::move(paramsParam));
3087     }
3088     else
3089     {
3090         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3091         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
3092         paramBuffer.addParam(std::move(paramsParam));
3093     }
3094 
3095     return CallCapture(angle::EntryPoint::GLGetFramebufferParameterivRobustANGLE,
3096                        std::move(paramBuffer));
3097 }
3098 
CaptureGetProgramInterfaceivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)3099 CallCapture CaptureGetProgramInterfaceivRobustANGLE(const State &glState,
3100                                                     bool isCallValid,
3101                                                     ShaderProgramID programPacked,
3102                                                     GLenum programInterface,
3103                                                     GLenum pname,
3104                                                     GLsizei bufSize,
3105                                                     GLsizei *length,
3106                                                     GLint *params)
3107 {
3108     ParamBuffer paramBuffer;
3109 
3110     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
3111     paramBuffer.addEnumParam("programInterface", GLenumGroup::DefaultGroup, ParamType::TGLenum,
3112                              programInterface);
3113     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3114     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3115 
3116     if (isCallValid)
3117     {
3118         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3119         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3120         CaptureGetProgramInterfaceivRobustANGLE_length(glState, isCallValid, programPacked,
3121                                                        programInterface, pname, bufSize, length,
3122                                                        params, &lengthParam);
3123         paramBuffer.addParam(std::move(lengthParam));
3124     }
3125     else
3126     {
3127         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3128         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3129                        &lengthParam.value);
3130         paramBuffer.addParam(std::move(lengthParam));
3131     }
3132 
3133     if (isCallValid)
3134     {
3135         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3136         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
3137         CaptureGetProgramInterfaceivRobustANGLE_params(glState, isCallValid, programPacked,
3138                                                        programInterface, pname, bufSize, length,
3139                                                        params, &paramsParam);
3140         paramBuffer.addParam(std::move(paramsParam));
3141     }
3142     else
3143     {
3144         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3145         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
3146         paramBuffer.addParam(std::move(paramsParam));
3147     }
3148 
3149     return CallCapture(angle::EntryPoint::GLGetProgramInterfaceivRobustANGLE,
3150                        std::move(paramBuffer));
3151 }
3152 
CaptureGetBooleani_vRobustANGLE(const State & glState,bool isCallValid,GLenum target,GLuint index,GLsizei bufSize,GLsizei * length,GLboolean * data)3153 CallCapture CaptureGetBooleani_vRobustANGLE(const State &glState,
3154                                             bool isCallValid,
3155                                             GLenum target,
3156                                             GLuint index,
3157                                             GLsizei bufSize,
3158                                             GLsizei *length,
3159                                             GLboolean *data)
3160 {
3161     ParamBuffer paramBuffer;
3162 
3163     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
3164     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
3165     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3166 
3167     if (isCallValid)
3168     {
3169         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3170         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3171         CaptureGetBooleani_vRobustANGLE_length(glState, isCallValid, target, index, bufSize, length,
3172                                                data, &lengthParam);
3173         paramBuffer.addParam(std::move(lengthParam));
3174     }
3175     else
3176     {
3177         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3178         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3179                        &lengthParam.value);
3180         paramBuffer.addParam(std::move(lengthParam));
3181     }
3182 
3183     if (isCallValid)
3184     {
3185         ParamCapture dataParam("data", ParamType::TGLbooleanPointer);
3186         InitParamValue(ParamType::TGLbooleanPointer, data, &dataParam.value);
3187         CaptureGetBooleani_vRobustANGLE_data(glState, isCallValid, target, index, bufSize, length,
3188                                              data, &dataParam);
3189         paramBuffer.addParam(std::move(dataParam));
3190     }
3191     else
3192     {
3193         ParamCapture dataParam("data", ParamType::TGLbooleanPointer);
3194         InitParamValue(ParamType::TGLbooleanPointer, static_cast<GLboolean *>(nullptr),
3195                        &dataParam.value);
3196         paramBuffer.addParam(std::move(dataParam));
3197     }
3198 
3199     return CallCapture(angle::EntryPoint::GLGetBooleani_vRobustANGLE, std::move(paramBuffer));
3200 }
3201 
CaptureGetMultisamplefvRobustANGLE(const State & glState,bool isCallValid,GLenum pname,GLuint index,GLsizei bufSize,GLsizei * length,GLfloat * val)3202 CallCapture CaptureGetMultisamplefvRobustANGLE(const State &glState,
3203                                                bool isCallValid,
3204                                                GLenum pname,
3205                                                GLuint index,
3206                                                GLsizei bufSize,
3207                                                GLsizei *length,
3208                                                GLfloat *val)
3209 {
3210     ParamBuffer paramBuffer;
3211 
3212     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3213     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
3214     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3215 
3216     if (isCallValid)
3217     {
3218         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3219         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3220         CaptureGetMultisamplefvRobustANGLE_length(glState, isCallValid, pname, index, bufSize,
3221                                                   length, val, &lengthParam);
3222         paramBuffer.addParam(std::move(lengthParam));
3223     }
3224     else
3225     {
3226         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3227         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3228                        &lengthParam.value);
3229         paramBuffer.addParam(std::move(lengthParam));
3230     }
3231 
3232     if (isCallValid)
3233     {
3234         ParamCapture valParam("val", ParamType::TGLfloatPointer);
3235         InitParamValue(ParamType::TGLfloatPointer, val, &valParam.value);
3236         CaptureGetMultisamplefvRobustANGLE_val(glState, isCallValid, pname, index, bufSize, length,
3237                                                val, &valParam);
3238         paramBuffer.addParam(std::move(valParam));
3239     }
3240     else
3241     {
3242         ParamCapture valParam("val", ParamType::TGLfloatPointer);
3243         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
3244                        &valParam.value);
3245         paramBuffer.addParam(std::move(valParam));
3246     }
3247 
3248     return CallCapture(angle::EntryPoint::GLGetMultisamplefvRobustANGLE, std::move(paramBuffer));
3249 }
3250 
CaptureGetTexLevelParameterivRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)3251 CallCapture CaptureGetTexLevelParameterivRobustANGLE(const State &glState,
3252                                                      bool isCallValid,
3253                                                      TextureTarget targetPacked,
3254                                                      GLint level,
3255                                                      GLenum pname,
3256                                                      GLsizei bufSize,
3257                                                      GLsizei *length,
3258                                                      GLint *params)
3259 {
3260     ParamBuffer paramBuffer;
3261 
3262     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
3263     paramBuffer.addValueParam("level", ParamType::TGLint, level);
3264     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3265     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3266 
3267     if (isCallValid)
3268     {
3269         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3270         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3271         CaptureGetTexLevelParameterivRobustANGLE_length(glState, isCallValid, targetPacked, level,
3272                                                         pname, bufSize, length, params,
3273                                                         &lengthParam);
3274         paramBuffer.addParam(std::move(lengthParam));
3275     }
3276     else
3277     {
3278         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3279         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3280                        &lengthParam.value);
3281         paramBuffer.addParam(std::move(lengthParam));
3282     }
3283 
3284     if (isCallValid)
3285     {
3286         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3287         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
3288         CaptureGetTexLevelParameterivRobustANGLE_params(glState, isCallValid, targetPacked, level,
3289                                                         pname, bufSize, length, params,
3290                                                         &paramsParam);
3291         paramBuffer.addParam(std::move(paramsParam));
3292     }
3293     else
3294     {
3295         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3296         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
3297         paramBuffer.addParam(std::move(paramsParam));
3298     }
3299 
3300     return CallCapture(angle::EntryPoint::GLGetTexLevelParameterivRobustANGLE,
3301                        std::move(paramBuffer));
3302 }
3303 
CaptureGetTexLevelParameterfvRobustANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum pname,GLsizei bufSize,GLsizei * length,GLfloat * params)3304 CallCapture CaptureGetTexLevelParameterfvRobustANGLE(const State &glState,
3305                                                      bool isCallValid,
3306                                                      TextureTarget targetPacked,
3307                                                      GLint level,
3308                                                      GLenum pname,
3309                                                      GLsizei bufSize,
3310                                                      GLsizei *length,
3311                                                      GLfloat *params)
3312 {
3313     ParamBuffer paramBuffer;
3314 
3315     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
3316     paramBuffer.addValueParam("level", ParamType::TGLint, level);
3317     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3318     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3319 
3320     if (isCallValid)
3321     {
3322         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3323         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3324         CaptureGetTexLevelParameterfvRobustANGLE_length(glState, isCallValid, targetPacked, level,
3325                                                         pname, bufSize, length, params,
3326                                                         &lengthParam);
3327         paramBuffer.addParam(std::move(lengthParam));
3328     }
3329     else
3330     {
3331         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3332         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3333                        &lengthParam.value);
3334         paramBuffer.addParam(std::move(lengthParam));
3335     }
3336 
3337     if (isCallValid)
3338     {
3339         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
3340         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
3341         CaptureGetTexLevelParameterfvRobustANGLE_params(glState, isCallValid, targetPacked, level,
3342                                                         pname, bufSize, length, params,
3343                                                         &paramsParam);
3344         paramBuffer.addParam(std::move(paramsParam));
3345     }
3346     else
3347     {
3348         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
3349         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
3350                        &paramsParam.value);
3351         paramBuffer.addParam(std::move(paramsParam));
3352     }
3353 
3354     return CallCapture(angle::EntryPoint::GLGetTexLevelParameterfvRobustANGLE,
3355                        std::move(paramBuffer));
3356 }
3357 
CaptureGetPointervRobustANGLERobustANGLE(const State & glState,bool isCallValid,GLenum pname,GLsizei bufSize,GLsizei * length,void ** params)3358 CallCapture CaptureGetPointervRobustANGLERobustANGLE(const State &glState,
3359                                                      bool isCallValid,
3360                                                      GLenum pname,
3361                                                      GLsizei bufSize,
3362                                                      GLsizei *length,
3363                                                      void **params)
3364 {
3365     ParamBuffer paramBuffer;
3366 
3367     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3368     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3369 
3370     if (isCallValid)
3371     {
3372         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3373         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3374         CaptureGetPointervRobustANGLERobustANGLE_length(glState, isCallValid, pname, bufSize,
3375                                                         length, params, &lengthParam);
3376         paramBuffer.addParam(std::move(lengthParam));
3377     }
3378     else
3379     {
3380         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3381         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3382                        &lengthParam.value);
3383         paramBuffer.addParam(std::move(lengthParam));
3384     }
3385 
3386     if (isCallValid)
3387     {
3388         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
3389         InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
3390         CaptureGetPointervRobustANGLERobustANGLE_params(glState, isCallValid, pname, bufSize,
3391                                                         length, params, &paramsParam);
3392         paramBuffer.addParam(std::move(paramsParam));
3393     }
3394     else
3395     {
3396         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
3397         InitParamValue(ParamType::TvoidPointerPointer, static_cast<void **>(nullptr),
3398                        &paramsParam.value);
3399         paramBuffer.addParam(std::move(paramsParam));
3400     }
3401 
3402     return CallCapture(angle::EntryPoint::GLGetPointervRobustANGLERobustANGLE,
3403                        std::move(paramBuffer));
3404 }
3405 
CaptureReadnPixelsRobustANGLE(const State & glState,bool isCallValid,GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,GLsizei * length,GLsizei * columns,GLsizei * rows,void * data)3406 CallCapture CaptureReadnPixelsRobustANGLE(const State &glState,
3407                                           bool isCallValid,
3408                                           GLint x,
3409                                           GLint y,
3410                                           GLsizei width,
3411                                           GLsizei height,
3412                                           GLenum format,
3413                                           GLenum type,
3414                                           GLsizei bufSize,
3415                                           GLsizei *length,
3416                                           GLsizei *columns,
3417                                           GLsizei *rows,
3418                                           void *data)
3419 {
3420     ParamBuffer paramBuffer;
3421 
3422     paramBuffer.addValueParam("x", ParamType::TGLint, x);
3423     paramBuffer.addValueParam("y", ParamType::TGLint, y);
3424     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3425     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
3426     paramBuffer.addEnumParam("format", GLenumGroup::DefaultGroup, ParamType::TGLenum, format);
3427     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
3428     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3429 
3430     if (isCallValid)
3431     {
3432         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3433         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3434         CaptureReadnPixelsRobustANGLE_length(glState, isCallValid, x, y, width, height, format,
3435                                              type, bufSize, length, columns, rows, data,
3436                                              &lengthParam);
3437         paramBuffer.addParam(std::move(lengthParam));
3438     }
3439     else
3440     {
3441         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3442         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3443                        &lengthParam.value);
3444         paramBuffer.addParam(std::move(lengthParam));
3445     }
3446 
3447     if (isCallValid)
3448     {
3449         ParamCapture columnsParam("columns", ParamType::TGLsizeiPointer);
3450         InitParamValue(ParamType::TGLsizeiPointer, columns, &columnsParam.value);
3451         CaptureReadnPixelsRobustANGLE_columns(glState, isCallValid, x, y, width, height, format,
3452                                               type, bufSize, length, columns, rows, data,
3453                                               &columnsParam);
3454         paramBuffer.addParam(std::move(columnsParam));
3455     }
3456     else
3457     {
3458         ParamCapture columnsParam("columns", ParamType::TGLsizeiPointer);
3459         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3460                        &columnsParam.value);
3461         paramBuffer.addParam(std::move(columnsParam));
3462     }
3463 
3464     if (isCallValid)
3465     {
3466         ParamCapture rowsParam("rows", ParamType::TGLsizeiPointer);
3467         InitParamValue(ParamType::TGLsizeiPointer, rows, &rowsParam.value);
3468         CaptureReadnPixelsRobustANGLE_rows(glState, isCallValid, x, y, width, height, format, type,
3469                                            bufSize, length, columns, rows, data, &rowsParam);
3470         paramBuffer.addParam(std::move(rowsParam));
3471     }
3472     else
3473     {
3474         ParamCapture rowsParam("rows", ParamType::TGLsizeiPointer);
3475         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3476                        &rowsParam.value);
3477         paramBuffer.addParam(std::move(rowsParam));
3478     }
3479 
3480     if (isCallValid)
3481     {
3482         ParamCapture dataParam("data", ParamType::TvoidPointer);
3483         InitParamValue(ParamType::TvoidPointer, data, &dataParam.value);
3484         CaptureReadnPixelsRobustANGLE_data(glState, isCallValid, x, y, width, height, format, type,
3485                                            bufSize, length, columns, rows, data, &dataParam);
3486         paramBuffer.addParam(std::move(dataParam));
3487     }
3488     else
3489     {
3490         ParamCapture dataParam("data", ParamType::TvoidPointer);
3491         InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &dataParam.value);
3492         paramBuffer.addParam(std::move(dataParam));
3493     }
3494 
3495     return CallCapture(angle::EntryPoint::GLReadnPixelsRobustANGLE, std::move(paramBuffer));
3496 }
3497 
CaptureGetnUniformfvRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLsizei * length,GLfloat * params)3498 CallCapture CaptureGetnUniformfvRobustANGLE(const State &glState,
3499                                             bool isCallValid,
3500                                             ShaderProgramID programPacked,
3501                                             UniformLocation locationPacked,
3502                                             GLsizei bufSize,
3503                                             GLsizei *length,
3504                                             GLfloat *params)
3505 {
3506     ParamBuffer paramBuffer;
3507 
3508     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
3509     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
3510     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3511 
3512     if (isCallValid)
3513     {
3514         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3515         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3516         CaptureGetnUniformfvRobustANGLE_length(glState, isCallValid, programPacked, locationPacked,
3517                                                bufSize, length, params, &lengthParam);
3518         paramBuffer.addParam(std::move(lengthParam));
3519     }
3520     else
3521     {
3522         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3523         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3524                        &lengthParam.value);
3525         paramBuffer.addParam(std::move(lengthParam));
3526     }
3527 
3528     if (isCallValid)
3529     {
3530         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
3531         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
3532         CaptureGetnUniformfvRobustANGLE_params(glState, isCallValid, programPacked, locationPacked,
3533                                                bufSize, length, params, &paramsParam);
3534         paramBuffer.addParam(std::move(paramsParam));
3535     }
3536     else
3537     {
3538         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
3539         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
3540                        &paramsParam.value);
3541         paramBuffer.addParam(std::move(paramsParam));
3542     }
3543 
3544     return CallCapture(angle::EntryPoint::GLGetnUniformfvRobustANGLE, std::move(paramBuffer));
3545 }
3546 
CaptureGetnUniformivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLsizei * length,GLint * params)3547 CallCapture CaptureGetnUniformivRobustANGLE(const State &glState,
3548                                             bool isCallValid,
3549                                             ShaderProgramID programPacked,
3550                                             UniformLocation locationPacked,
3551                                             GLsizei bufSize,
3552                                             GLsizei *length,
3553                                             GLint *params)
3554 {
3555     ParamBuffer paramBuffer;
3556 
3557     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
3558     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
3559     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3560 
3561     if (isCallValid)
3562     {
3563         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3564         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3565         CaptureGetnUniformivRobustANGLE_length(glState, isCallValid, programPacked, locationPacked,
3566                                                bufSize, length, params, &lengthParam);
3567         paramBuffer.addParam(std::move(lengthParam));
3568     }
3569     else
3570     {
3571         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3572         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3573                        &lengthParam.value);
3574         paramBuffer.addParam(std::move(lengthParam));
3575     }
3576 
3577     if (isCallValid)
3578     {
3579         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3580         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
3581         CaptureGetnUniformivRobustANGLE_params(glState, isCallValid, programPacked, locationPacked,
3582                                                bufSize, length, params, &paramsParam);
3583         paramBuffer.addParam(std::move(paramsParam));
3584     }
3585     else
3586     {
3587         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3588         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
3589         paramBuffer.addParam(std::move(paramsParam));
3590     }
3591 
3592     return CallCapture(angle::EntryPoint::GLGetnUniformivRobustANGLE, std::move(paramBuffer));
3593 }
3594 
CaptureGetnUniformuivRobustANGLE(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLsizei * length,GLuint * params)3595 CallCapture CaptureGetnUniformuivRobustANGLE(const State &glState,
3596                                              bool isCallValid,
3597                                              ShaderProgramID programPacked,
3598                                              UniformLocation locationPacked,
3599                                              GLsizei bufSize,
3600                                              GLsizei *length,
3601                                              GLuint *params)
3602 {
3603     ParamBuffer paramBuffer;
3604 
3605     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
3606     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
3607     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3608 
3609     if (isCallValid)
3610     {
3611         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3612         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3613         CaptureGetnUniformuivRobustANGLE_length(glState, isCallValid, programPacked, locationPacked,
3614                                                 bufSize, length, params, &lengthParam);
3615         paramBuffer.addParam(std::move(lengthParam));
3616     }
3617     else
3618     {
3619         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3620         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3621                        &lengthParam.value);
3622         paramBuffer.addParam(std::move(lengthParam));
3623     }
3624 
3625     if (isCallValid)
3626     {
3627         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
3628         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
3629         CaptureGetnUniformuivRobustANGLE_params(glState, isCallValid, programPacked, locationPacked,
3630                                                 bufSize, length, params, &paramsParam);
3631         paramBuffer.addParam(std::move(paramsParam));
3632     }
3633     else
3634     {
3635         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
3636         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
3637                        &paramsParam.value);
3638         paramBuffer.addParam(std::move(paramsParam));
3639     }
3640 
3641     return CallCapture(angle::EntryPoint::GLGetnUniformuivRobustANGLE, std::move(paramBuffer));
3642 }
3643 
CaptureTexParameterIivRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,const GLint * params)3644 CallCapture CaptureTexParameterIivRobustANGLE(const State &glState,
3645                                               bool isCallValid,
3646                                               TextureType targetPacked,
3647                                               GLenum pname,
3648                                               GLsizei bufSize,
3649                                               const GLint *params)
3650 {
3651     ParamBuffer paramBuffer;
3652 
3653     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
3654     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3655     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3656 
3657     if (isCallValid)
3658     {
3659         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
3660         InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
3661         CaptureTexParameterIivRobustANGLE_params(glState, isCallValid, targetPacked, pname, bufSize,
3662                                                  params, &paramsParam);
3663         paramBuffer.addParam(std::move(paramsParam));
3664     }
3665     else
3666     {
3667         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
3668         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
3669                        &paramsParam.value);
3670         paramBuffer.addParam(std::move(paramsParam));
3671     }
3672 
3673     return CallCapture(angle::EntryPoint::GLTexParameterIivRobustANGLE, std::move(paramBuffer));
3674 }
3675 
CaptureTexParameterIuivRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,const GLuint * params)3676 CallCapture CaptureTexParameterIuivRobustANGLE(const State &glState,
3677                                                bool isCallValid,
3678                                                TextureType targetPacked,
3679                                                GLenum pname,
3680                                                GLsizei bufSize,
3681                                                const GLuint *params)
3682 {
3683     ParamBuffer paramBuffer;
3684 
3685     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
3686     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3687     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3688 
3689     if (isCallValid)
3690     {
3691         ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
3692         InitParamValue(ParamType::TGLuintConstPointer, params, &paramsParam.value);
3693         CaptureTexParameterIuivRobustANGLE_params(glState, isCallValid, targetPacked, pname,
3694                                                   bufSize, params, &paramsParam);
3695         paramBuffer.addParam(std::move(paramsParam));
3696     }
3697     else
3698     {
3699         ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
3700         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
3701                        &paramsParam.value);
3702         paramBuffer.addParam(std::move(paramsParam));
3703     }
3704 
3705     return CallCapture(angle::EntryPoint::GLTexParameterIuivRobustANGLE, std::move(paramBuffer));
3706 }
3707 
CaptureGetTexParameterIivRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)3708 CallCapture CaptureGetTexParameterIivRobustANGLE(const State &glState,
3709                                                  bool isCallValid,
3710                                                  TextureType targetPacked,
3711                                                  GLenum pname,
3712                                                  GLsizei bufSize,
3713                                                  GLsizei *length,
3714                                                  GLint *params)
3715 {
3716     ParamBuffer paramBuffer;
3717 
3718     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
3719     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3720     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3721 
3722     if (isCallValid)
3723     {
3724         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3725         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3726         CaptureGetTexParameterIivRobustANGLE_length(glState, isCallValid, targetPacked, pname,
3727                                                     bufSize, length, params, &lengthParam);
3728         paramBuffer.addParam(std::move(lengthParam));
3729     }
3730     else
3731     {
3732         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3733         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3734                        &lengthParam.value);
3735         paramBuffer.addParam(std::move(lengthParam));
3736     }
3737 
3738     if (isCallValid)
3739     {
3740         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3741         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
3742         CaptureGetTexParameterIivRobustANGLE_params(glState, isCallValid, targetPacked, pname,
3743                                                     bufSize, length, params, &paramsParam);
3744         paramBuffer.addParam(std::move(paramsParam));
3745     }
3746     else
3747     {
3748         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3749         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
3750         paramBuffer.addParam(std::move(paramsParam));
3751     }
3752 
3753     return CallCapture(angle::EntryPoint::GLGetTexParameterIivRobustANGLE, std::move(paramBuffer));
3754 }
3755 
CaptureGetTexParameterIuivRobustANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLuint * params)3756 CallCapture CaptureGetTexParameterIuivRobustANGLE(const State &glState,
3757                                                   bool isCallValid,
3758                                                   TextureType targetPacked,
3759                                                   GLenum pname,
3760                                                   GLsizei bufSize,
3761                                                   GLsizei *length,
3762                                                   GLuint *params)
3763 {
3764     ParamBuffer paramBuffer;
3765 
3766     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
3767     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3768     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3769 
3770     if (isCallValid)
3771     {
3772         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3773         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3774         CaptureGetTexParameterIuivRobustANGLE_length(glState, isCallValid, targetPacked, pname,
3775                                                      bufSize, length, params, &lengthParam);
3776         paramBuffer.addParam(std::move(lengthParam));
3777     }
3778     else
3779     {
3780         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3781         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3782                        &lengthParam.value);
3783         paramBuffer.addParam(std::move(lengthParam));
3784     }
3785 
3786     if (isCallValid)
3787     {
3788         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
3789         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
3790         CaptureGetTexParameterIuivRobustANGLE_params(glState, isCallValid, targetPacked, pname,
3791                                                      bufSize, length, params, &paramsParam);
3792         paramBuffer.addParam(std::move(paramsParam));
3793     }
3794     else
3795     {
3796         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
3797         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
3798                        &paramsParam.value);
3799         paramBuffer.addParam(std::move(paramsParam));
3800     }
3801 
3802     return CallCapture(angle::EntryPoint::GLGetTexParameterIuivRobustANGLE, std::move(paramBuffer));
3803 }
3804 
CaptureSamplerParameterIivRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLsizei bufSize,const GLint * param)3805 CallCapture CaptureSamplerParameterIivRobustANGLE(const State &glState,
3806                                                   bool isCallValid,
3807                                                   SamplerID samplerPacked,
3808                                                   GLenum pname,
3809                                                   GLsizei bufSize,
3810                                                   const GLint *param)
3811 {
3812     ParamBuffer paramBuffer;
3813 
3814     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
3815     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3816     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3817 
3818     if (isCallValid)
3819     {
3820         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
3821         InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
3822         CaptureSamplerParameterIivRobustANGLE_param(glState, isCallValid, samplerPacked, pname,
3823                                                     bufSize, param, &paramParam);
3824         paramBuffer.addParam(std::move(paramParam));
3825     }
3826     else
3827     {
3828         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
3829         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
3830                        &paramParam.value);
3831         paramBuffer.addParam(std::move(paramParam));
3832     }
3833 
3834     return CallCapture(angle::EntryPoint::GLSamplerParameterIivRobustANGLE, std::move(paramBuffer));
3835 }
3836 
CaptureSamplerParameterIuivRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLsizei bufSize,const GLuint * param)3837 CallCapture CaptureSamplerParameterIuivRobustANGLE(const State &glState,
3838                                                    bool isCallValid,
3839                                                    SamplerID samplerPacked,
3840                                                    GLenum pname,
3841                                                    GLsizei bufSize,
3842                                                    const GLuint *param)
3843 {
3844     ParamBuffer paramBuffer;
3845 
3846     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
3847     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3848     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3849 
3850     if (isCallValid)
3851     {
3852         ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
3853         InitParamValue(ParamType::TGLuintConstPointer, param, &paramParam.value);
3854         CaptureSamplerParameterIuivRobustANGLE_param(glState, isCallValid, samplerPacked, pname,
3855                                                      bufSize, param, &paramParam);
3856         paramBuffer.addParam(std::move(paramParam));
3857     }
3858     else
3859     {
3860         ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
3861         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
3862                        &paramParam.value);
3863         paramBuffer.addParam(std::move(paramParam));
3864     }
3865 
3866     return CallCapture(angle::EntryPoint::GLSamplerParameterIuivRobustANGLE,
3867                        std::move(paramBuffer));
3868 }
3869 
CaptureGetSamplerParameterIivRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)3870 CallCapture CaptureGetSamplerParameterIivRobustANGLE(const State &glState,
3871                                                      bool isCallValid,
3872                                                      SamplerID samplerPacked,
3873                                                      GLenum pname,
3874                                                      GLsizei bufSize,
3875                                                      GLsizei *length,
3876                                                      GLint *params)
3877 {
3878     ParamBuffer paramBuffer;
3879 
3880     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
3881     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3882     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3883 
3884     if (isCallValid)
3885     {
3886         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3887         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3888         CaptureGetSamplerParameterIivRobustANGLE_length(glState, isCallValid, samplerPacked, pname,
3889                                                         bufSize, length, params, &lengthParam);
3890         paramBuffer.addParam(std::move(lengthParam));
3891     }
3892     else
3893     {
3894         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3895         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3896                        &lengthParam.value);
3897         paramBuffer.addParam(std::move(lengthParam));
3898     }
3899 
3900     if (isCallValid)
3901     {
3902         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3903         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
3904         CaptureGetSamplerParameterIivRobustANGLE_params(glState, isCallValid, samplerPacked, pname,
3905                                                         bufSize, length, params, &paramsParam);
3906         paramBuffer.addParam(std::move(paramsParam));
3907     }
3908     else
3909     {
3910         ParamCapture paramsParam("params", ParamType::TGLintPointer);
3911         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
3912         paramBuffer.addParam(std::move(paramsParam));
3913     }
3914 
3915     return CallCapture(angle::EntryPoint::GLGetSamplerParameterIivRobustANGLE,
3916                        std::move(paramBuffer));
3917 }
3918 
CaptureGetSamplerParameterIuivRobustANGLE(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLuint * params)3919 CallCapture CaptureGetSamplerParameterIuivRobustANGLE(const State &glState,
3920                                                       bool isCallValid,
3921                                                       SamplerID samplerPacked,
3922                                                       GLenum pname,
3923                                                       GLsizei bufSize,
3924                                                       GLsizei *length,
3925                                                       GLuint *params)
3926 {
3927     ParamBuffer paramBuffer;
3928 
3929     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
3930     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3931     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3932 
3933     if (isCallValid)
3934     {
3935         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3936         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3937         CaptureGetSamplerParameterIuivRobustANGLE_length(glState, isCallValid, samplerPacked, pname,
3938                                                          bufSize, length, params, &lengthParam);
3939         paramBuffer.addParam(std::move(lengthParam));
3940     }
3941     else
3942     {
3943         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3944         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3945                        &lengthParam.value);
3946         paramBuffer.addParam(std::move(lengthParam));
3947     }
3948 
3949     if (isCallValid)
3950     {
3951         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
3952         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
3953         CaptureGetSamplerParameterIuivRobustANGLE_params(glState, isCallValid, samplerPacked, pname,
3954                                                          bufSize, length, params, &paramsParam);
3955         paramBuffer.addParam(std::move(paramsParam));
3956     }
3957     else
3958     {
3959         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
3960         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
3961                        &paramsParam.value);
3962         paramBuffer.addParam(std::move(paramsParam));
3963     }
3964 
3965     return CallCapture(angle::EntryPoint::GLGetSamplerParameterIuivRobustANGLE,
3966                        std::move(paramBuffer));
3967 }
3968 
CaptureGetQueryObjectivRobustANGLE(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * params)3969 CallCapture CaptureGetQueryObjectivRobustANGLE(const State &glState,
3970                                                bool isCallValid,
3971                                                QueryID idPacked,
3972                                                GLenum pname,
3973                                                GLsizei bufSize,
3974                                                GLsizei *length,
3975                                                GLint *params)
3976 {
3977     ParamBuffer paramBuffer;
3978 
3979     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
3980     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
3981     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3982 
3983     if (isCallValid)
3984     {
3985         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3986         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
3987         CaptureGetQueryObjectivRobustANGLE_length(glState, isCallValid, idPacked, pname, bufSize,
3988                                                   length, params, &lengthParam);
3989         paramBuffer.addParam(std::move(lengthParam));
3990     }
3991     else
3992     {
3993         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
3994         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
3995                        &lengthParam.value);
3996         paramBuffer.addParam(std::move(lengthParam));
3997     }
3998 
3999     if (isCallValid)
4000     {
4001         ParamCapture paramsParam("params", ParamType::TGLintPointer);
4002         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
4003         CaptureGetQueryObjectivRobustANGLE_params(glState, isCallValid, idPacked, pname, bufSize,
4004                                                   length, params, &paramsParam);
4005         paramBuffer.addParam(std::move(paramsParam));
4006     }
4007     else
4008     {
4009         ParamCapture paramsParam("params", ParamType::TGLintPointer);
4010         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
4011         paramBuffer.addParam(std::move(paramsParam));
4012     }
4013 
4014     return CallCapture(angle::EntryPoint::GLGetQueryObjectivRobustANGLE, std::move(paramBuffer));
4015 }
4016 
CaptureGetQueryObjecti64vRobustANGLE(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLint64 * params)4017 CallCapture CaptureGetQueryObjecti64vRobustANGLE(const State &glState,
4018                                                  bool isCallValid,
4019                                                  QueryID idPacked,
4020                                                  GLenum pname,
4021                                                  GLsizei bufSize,
4022                                                  GLsizei *length,
4023                                                  GLint64 *params)
4024 {
4025     ParamBuffer paramBuffer;
4026 
4027     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
4028     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
4029     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4030 
4031     if (isCallValid)
4032     {
4033         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4034         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
4035         CaptureGetQueryObjecti64vRobustANGLE_length(glState, isCallValid, idPacked, pname, bufSize,
4036                                                     length, params, &lengthParam);
4037         paramBuffer.addParam(std::move(lengthParam));
4038     }
4039     else
4040     {
4041         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4042         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
4043                        &lengthParam.value);
4044         paramBuffer.addParam(std::move(lengthParam));
4045     }
4046 
4047     if (isCallValid)
4048     {
4049         ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
4050         InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
4051         CaptureGetQueryObjecti64vRobustANGLE_params(glState, isCallValid, idPacked, pname, bufSize,
4052                                                     length, params, &paramsParam);
4053         paramBuffer.addParam(std::move(paramsParam));
4054     }
4055     else
4056     {
4057         ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
4058         InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
4059                        &paramsParam.value);
4060         paramBuffer.addParam(std::move(paramsParam));
4061     }
4062 
4063     return CallCapture(angle::EntryPoint::GLGetQueryObjecti64vRobustANGLE, std::move(paramBuffer));
4064 }
4065 
CaptureGetQueryObjectui64vRobustANGLE(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLsizei bufSize,GLsizei * length,GLuint64 * params)4066 CallCapture CaptureGetQueryObjectui64vRobustANGLE(const State &glState,
4067                                                   bool isCallValid,
4068                                                   QueryID idPacked,
4069                                                   GLenum pname,
4070                                                   GLsizei bufSize,
4071                                                   GLsizei *length,
4072                                                   GLuint64 *params)
4073 {
4074     ParamBuffer paramBuffer;
4075 
4076     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
4077     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
4078     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4079 
4080     if (isCallValid)
4081     {
4082         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4083         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
4084         CaptureGetQueryObjectui64vRobustANGLE_length(glState, isCallValid, idPacked, pname, bufSize,
4085                                                      length, params, &lengthParam);
4086         paramBuffer.addParam(std::move(lengthParam));
4087     }
4088     else
4089     {
4090         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4091         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
4092                        &lengthParam.value);
4093         paramBuffer.addParam(std::move(lengthParam));
4094     }
4095 
4096     if (isCallValid)
4097     {
4098         ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
4099         InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
4100         CaptureGetQueryObjectui64vRobustANGLE_params(glState, isCallValid, idPacked, pname, bufSize,
4101                                                      length, params, &paramsParam);
4102         paramBuffer.addParam(std::move(paramsParam));
4103     }
4104     else
4105     {
4106         ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
4107         InitParamValue(ParamType::TGLuint64Pointer, static_cast<GLuint64 *>(nullptr),
4108                        &paramsParam.value);
4109         paramBuffer.addParam(std::move(paramsParam));
4110     }
4111 
4112     return CallCapture(angle::EntryPoint::GLGetQueryObjectui64vRobustANGLE, std::move(paramBuffer));
4113 }
4114 
CaptureImportSemaphoreZirconHandleANGLE(const State & glState,bool isCallValid,SemaphoreID semaphorePacked,HandleType handleTypePacked,GLuint handle)4115 CallCapture CaptureImportSemaphoreZirconHandleANGLE(const State &glState,
4116                                                     bool isCallValid,
4117                                                     SemaphoreID semaphorePacked,
4118                                                     HandleType handleTypePacked,
4119                                                     GLuint handle)
4120 {
4121     ParamBuffer paramBuffer;
4122 
4123     paramBuffer.addValueParam("semaphorePacked", ParamType::TSemaphoreID, semaphorePacked);
4124     paramBuffer.addValueParam("handleTypePacked", ParamType::THandleType, handleTypePacked);
4125     paramBuffer.addValueParam("handle", ParamType::TGLuint, handle);
4126 
4127     return CallCapture(angle::EntryPoint::GLImportSemaphoreZirconHandleANGLE,
4128                        std::move(paramBuffer));
4129 }
4130 
CaptureTexImage2DExternalANGLE(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type)4131 CallCapture CaptureTexImage2DExternalANGLE(const State &glState,
4132                                            bool isCallValid,
4133                                            TextureTarget targetPacked,
4134                                            GLint level,
4135                                            GLint internalformat,
4136                                            GLsizei width,
4137                                            GLsizei height,
4138                                            GLint border,
4139                                            GLenum format,
4140                                            GLenum type)
4141 {
4142     ParamBuffer paramBuffer;
4143 
4144     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
4145     paramBuffer.addValueParam("level", ParamType::TGLint, level);
4146     paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
4147     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
4148     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
4149     paramBuffer.addValueParam("border", ParamType::TGLint, border);
4150     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
4151     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
4152 
4153     return CallCapture(angle::EntryPoint::GLTexImage2DExternalANGLE, std::move(paramBuffer));
4154 }
4155 
CaptureInvalidateTextureANGLE(const State & glState,bool isCallValid,TextureType targetPacked)4156 CallCapture CaptureInvalidateTextureANGLE(const State &glState,
4157                                           bool isCallValid,
4158                                           TextureType targetPacked)
4159 {
4160     ParamBuffer paramBuffer;
4161 
4162     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
4163 
4164     return CallCapture(angle::EntryPoint::GLInvalidateTextureANGLE, std::move(paramBuffer));
4165 }
4166 
CaptureTexStorage2DMultisampleANGLE(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLboolean fixedsamplelocations)4167 CallCapture CaptureTexStorage2DMultisampleANGLE(const State &glState,
4168                                                 bool isCallValid,
4169                                                 TextureType targetPacked,
4170                                                 GLsizei samples,
4171                                                 GLenum internalformat,
4172                                                 GLsizei width,
4173                                                 GLsizei height,
4174                                                 GLboolean fixedsamplelocations)
4175 {
4176     ParamBuffer paramBuffer;
4177 
4178     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
4179     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
4180     paramBuffer.addEnumParam("internalformat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
4181                              internalformat);
4182     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
4183     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
4184     paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);
4185 
4186     return CallCapture(angle::EntryPoint::GLTexStorage2DMultisampleANGLE, std::move(paramBuffer));
4187 }
4188 
CaptureGetMultisamplefvANGLE(const State & glState,bool isCallValid,GLenum pname,GLuint index,GLfloat * val)4189 CallCapture CaptureGetMultisamplefvANGLE(const State &glState,
4190                                          bool isCallValid,
4191                                          GLenum pname,
4192                                          GLuint index,
4193                                          GLfloat *val)
4194 {
4195     ParamBuffer paramBuffer;
4196 
4197     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
4198     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
4199 
4200     if (isCallValid)
4201     {
4202         ParamCapture valParam("val", ParamType::TGLfloatPointer);
4203         InitParamValue(ParamType::TGLfloatPointer, val, &valParam.value);
4204         CaptureGetMultisamplefvANGLE_val(glState, isCallValid, pname, index, val, &valParam);
4205         paramBuffer.addParam(std::move(valParam));
4206     }
4207     else
4208     {
4209         ParamCapture valParam("val", ParamType::TGLfloatPointer);
4210         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
4211                        &valParam.value);
4212         paramBuffer.addParam(std::move(valParam));
4213     }
4214 
4215     return CallCapture(angle::EntryPoint::GLGetMultisamplefvANGLE, std::move(paramBuffer));
4216 }
4217 
CaptureSampleMaskiANGLE(const State & glState,bool isCallValid,GLuint maskNumber,GLbitfield mask)4218 CallCapture CaptureSampleMaskiANGLE(const State &glState,
4219                                     bool isCallValid,
4220                                     GLuint maskNumber,
4221                                     GLbitfield mask)
4222 {
4223     ParamBuffer paramBuffer;
4224 
4225     paramBuffer.addValueParam("maskNumber", ParamType::TGLuint, maskNumber);
4226     paramBuffer.addEnumParam("mask", GLenumGroup::DefaultGroup, ParamType::TGLbitfield, mask);
4227 
4228     return CallCapture(angle::EntryPoint::GLSampleMaskiANGLE, std::move(paramBuffer));
4229 }
4230 
CaptureGetTranslatedShaderSourceANGLE(const State & glState,bool isCallValid,ShaderProgramID shaderPacked,GLsizei bufsize,GLsizei * length,GLchar * source)4231 CallCapture CaptureGetTranslatedShaderSourceANGLE(const State &glState,
4232                                                   bool isCallValid,
4233                                                   ShaderProgramID shaderPacked,
4234                                                   GLsizei bufsize,
4235                                                   GLsizei *length,
4236                                                   GLchar *source)
4237 {
4238     ParamBuffer paramBuffer;
4239 
4240     paramBuffer.addValueParam("shaderPacked", ParamType::TShaderProgramID, shaderPacked);
4241     paramBuffer.addValueParam("bufsize", ParamType::TGLsizei, bufsize);
4242 
4243     if (isCallValid)
4244     {
4245         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4246         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
4247         CaptureGetTranslatedShaderSourceANGLE_length(glState, isCallValid, shaderPacked, bufsize,
4248                                                      length, source, &lengthParam);
4249         paramBuffer.addParam(std::move(lengthParam));
4250     }
4251     else
4252     {
4253         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4254         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
4255                        &lengthParam.value);
4256         paramBuffer.addParam(std::move(lengthParam));
4257     }
4258 
4259     if (isCallValid)
4260     {
4261         ParamCapture sourceParam("source", ParamType::TGLcharPointer);
4262         InitParamValue(ParamType::TGLcharPointer, source, &sourceParam.value);
4263         CaptureGetTranslatedShaderSourceANGLE_source(glState, isCallValid, shaderPacked, bufsize,
4264                                                      length, source, &sourceParam);
4265         paramBuffer.addParam(std::move(sourceParam));
4266     }
4267     else
4268     {
4269         ParamCapture sourceParam("source", ParamType::TGLcharPointer);
4270         InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
4271                        &sourceParam.value);
4272         paramBuffer.addParam(std::move(sourceParam));
4273     }
4274 
4275     return CallCapture(angle::EntryPoint::GLGetTranslatedShaderSourceANGLE, std::move(paramBuffer));
4276 }
4277 
CaptureBindUniformLocationCHROMIUM(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,const GLchar * name)4278 CallCapture CaptureBindUniformLocationCHROMIUM(const State &glState,
4279                                                bool isCallValid,
4280                                                ShaderProgramID programPacked,
4281                                                UniformLocation locationPacked,
4282                                                const GLchar *name)
4283 {
4284     ParamBuffer paramBuffer;
4285 
4286     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
4287     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
4288 
4289     if (isCallValid)
4290     {
4291         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4292         InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
4293         CaptureBindUniformLocationCHROMIUM_name(glState, isCallValid, programPacked, locationPacked,
4294                                                 name, &nameParam);
4295         paramBuffer.addParam(std::move(nameParam));
4296     }
4297     else
4298     {
4299         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4300         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4301                        &nameParam.value);
4302         paramBuffer.addParam(std::move(nameParam));
4303     }
4304 
4305     return CallCapture(angle::EntryPoint::GLBindUniformLocationCHROMIUM, std::move(paramBuffer));
4306 }
4307 
CaptureCompressedCopyTextureCHROMIUM(const State & glState,bool isCallValid,TextureID sourceIdPacked,TextureID destIdPacked)4308 CallCapture CaptureCompressedCopyTextureCHROMIUM(const State &glState,
4309                                                  bool isCallValid,
4310                                                  TextureID sourceIdPacked,
4311                                                  TextureID destIdPacked)
4312 {
4313     ParamBuffer paramBuffer;
4314 
4315     paramBuffer.addValueParam("sourceIdPacked", ParamType::TTextureID, sourceIdPacked);
4316     paramBuffer.addValueParam("destIdPacked", ParamType::TTextureID, destIdPacked);
4317 
4318     return CallCapture(angle::EntryPoint::GLCompressedCopyTextureCHROMIUM, std::move(paramBuffer));
4319 }
4320 
CaptureCopyTextureCHROMIUM(const State & glState,bool isCallValid,TextureID sourceIdPacked,GLint sourceLevel,TextureTarget destTargetPacked,TextureID destIdPacked,GLint destLevel,GLint internalFormat,GLenum destType,GLboolean unpackFlipY,GLboolean unpackPremultiplyAlpha,GLboolean unpackUnmultiplyAlpha)4321 CallCapture CaptureCopyTextureCHROMIUM(const State &glState,
4322                                        bool isCallValid,
4323                                        TextureID sourceIdPacked,
4324                                        GLint sourceLevel,
4325                                        TextureTarget destTargetPacked,
4326                                        TextureID destIdPacked,
4327                                        GLint destLevel,
4328                                        GLint internalFormat,
4329                                        GLenum destType,
4330                                        GLboolean unpackFlipY,
4331                                        GLboolean unpackPremultiplyAlpha,
4332                                        GLboolean unpackUnmultiplyAlpha)
4333 {
4334     ParamBuffer paramBuffer;
4335 
4336     paramBuffer.addValueParam("sourceIdPacked", ParamType::TTextureID, sourceIdPacked);
4337     paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
4338     paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
4339     paramBuffer.addValueParam("destIdPacked", ParamType::TTextureID, destIdPacked);
4340     paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
4341     paramBuffer.addValueParam("internalFormat", ParamType::TGLint, internalFormat);
4342     paramBuffer.addEnumParam("destType", GLenumGroup::DefaultGroup, ParamType::TGLenum, destType);
4343     paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
4344     paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
4345                               unpackPremultiplyAlpha);
4346     paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
4347                               unpackUnmultiplyAlpha);
4348 
4349     return CallCapture(angle::EntryPoint::GLCopyTextureCHROMIUM, std::move(paramBuffer));
4350 }
4351 
CaptureCopySubTextureCHROMIUM(const State & glState,bool isCallValid,TextureID sourceIdPacked,GLint sourceLevel,TextureTarget destTargetPacked,TextureID destIdPacked,GLint destLevel,GLint xoffset,GLint yoffset,GLint x,GLint y,GLint width,GLint height,GLboolean unpackFlipY,GLboolean unpackPremultiplyAlpha,GLboolean unpackUnmultiplyAlpha)4352 CallCapture CaptureCopySubTextureCHROMIUM(const State &glState,
4353                                           bool isCallValid,
4354                                           TextureID sourceIdPacked,
4355                                           GLint sourceLevel,
4356                                           TextureTarget destTargetPacked,
4357                                           TextureID destIdPacked,
4358                                           GLint destLevel,
4359                                           GLint xoffset,
4360                                           GLint yoffset,
4361                                           GLint x,
4362                                           GLint y,
4363                                           GLint width,
4364                                           GLint height,
4365                                           GLboolean unpackFlipY,
4366                                           GLboolean unpackPremultiplyAlpha,
4367                                           GLboolean unpackUnmultiplyAlpha)
4368 {
4369     ParamBuffer paramBuffer;
4370 
4371     paramBuffer.addValueParam("sourceIdPacked", ParamType::TTextureID, sourceIdPacked);
4372     paramBuffer.addValueParam("sourceLevel", ParamType::TGLint, sourceLevel);
4373     paramBuffer.addValueParam("destTargetPacked", ParamType::TTextureTarget, destTargetPacked);
4374     paramBuffer.addValueParam("destIdPacked", ParamType::TTextureID, destIdPacked);
4375     paramBuffer.addValueParam("destLevel", ParamType::TGLint, destLevel);
4376     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
4377     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
4378     paramBuffer.addValueParam("x", ParamType::TGLint, x);
4379     paramBuffer.addValueParam("y", ParamType::TGLint, y);
4380     paramBuffer.addValueParam("width", ParamType::TGLint, width);
4381     paramBuffer.addValueParam("height", ParamType::TGLint, height);
4382     paramBuffer.addValueParam("unpackFlipY", ParamType::TGLboolean, unpackFlipY);
4383     paramBuffer.addValueParam("unpackPremultiplyAlpha", ParamType::TGLboolean,
4384                               unpackPremultiplyAlpha);
4385     paramBuffer.addValueParam("unpackUnmultiplyAlpha", ParamType::TGLboolean,
4386                               unpackUnmultiplyAlpha);
4387 
4388     return CallCapture(angle::EntryPoint::GLCopySubTextureCHROMIUM, std::move(paramBuffer));
4389 }
4390 
CaptureCoverageModulationCHROMIUM(const State & glState,bool isCallValid,GLenum components)4391 CallCapture CaptureCoverageModulationCHROMIUM(const State &glState,
4392                                               bool isCallValid,
4393                                               GLenum components)
4394 {
4395     ParamBuffer paramBuffer;
4396 
4397     paramBuffer.addEnumParam("components", GLenumGroup::DefaultGroup, ParamType::TGLenum,
4398                              components);
4399 
4400     return CallCapture(angle::EntryPoint::GLCoverageModulationCHROMIUM, std::move(paramBuffer));
4401 }
4402 
CaptureLoseContextCHROMIUM(const State & glState,bool isCallValid,GraphicsResetStatus currentPacked,GraphicsResetStatus otherPacked)4403 CallCapture CaptureLoseContextCHROMIUM(const State &glState,
4404                                        bool isCallValid,
4405                                        GraphicsResetStatus currentPacked,
4406                                        GraphicsResetStatus otherPacked)
4407 {
4408     ParamBuffer paramBuffer;
4409 
4410     paramBuffer.addValueParam("currentPacked", ParamType::TGraphicsResetStatus, currentPacked);
4411     paramBuffer.addValueParam("otherPacked", ParamType::TGraphicsResetStatus, otherPacked);
4412 
4413     return CallCapture(angle::EntryPoint::GLLoseContextCHROMIUM, std::move(paramBuffer));
4414 }
4415 
CaptureBindFragDataLocationEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint color,const GLchar * name)4416 CallCapture CaptureBindFragDataLocationEXT(const State &glState,
4417                                            bool isCallValid,
4418                                            ShaderProgramID programPacked,
4419                                            GLuint color,
4420                                            const GLchar *name)
4421 {
4422     ParamBuffer paramBuffer;
4423 
4424     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
4425     paramBuffer.addValueParam("color", ParamType::TGLuint, color);
4426 
4427     if (isCallValid)
4428     {
4429         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4430         InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
4431         CaptureBindFragDataLocationEXT_name(glState, isCallValid, programPacked, color, name,
4432                                             &nameParam);
4433         paramBuffer.addParam(std::move(nameParam));
4434     }
4435     else
4436     {
4437         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4438         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4439                        &nameParam.value);
4440         paramBuffer.addParam(std::move(nameParam));
4441     }
4442 
4443     return CallCapture(angle::EntryPoint::GLBindFragDataLocationEXT, std::move(paramBuffer));
4444 }
4445 
CaptureBindFragDataLocationIndexedEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint colorNumber,GLuint index,const GLchar * name)4446 CallCapture CaptureBindFragDataLocationIndexedEXT(const State &glState,
4447                                                   bool isCallValid,
4448                                                   ShaderProgramID programPacked,
4449                                                   GLuint colorNumber,
4450                                                   GLuint index,
4451                                                   const GLchar *name)
4452 {
4453     ParamBuffer paramBuffer;
4454 
4455     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
4456     paramBuffer.addValueParam("colorNumber", ParamType::TGLuint, colorNumber);
4457     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
4458 
4459     if (isCallValid)
4460     {
4461         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4462         InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
4463         CaptureBindFragDataLocationIndexedEXT_name(glState, isCallValid, programPacked, colorNumber,
4464                                                    index, name, &nameParam);
4465         paramBuffer.addParam(std::move(nameParam));
4466     }
4467     else
4468     {
4469         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4470         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4471                        &nameParam.value);
4472         paramBuffer.addParam(std::move(nameParam));
4473     }
4474 
4475     return CallCapture(angle::EntryPoint::GLBindFragDataLocationIndexedEXT, std::move(paramBuffer));
4476 }
4477 
CaptureGetFragDataIndexEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,const GLchar * name,GLint returnValue)4478 CallCapture CaptureGetFragDataIndexEXT(const State &glState,
4479                                        bool isCallValid,
4480                                        ShaderProgramID programPacked,
4481                                        const GLchar *name,
4482                                        GLint returnValue)
4483 {
4484     ParamBuffer paramBuffer;
4485 
4486     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
4487 
4488     if (isCallValid)
4489     {
4490         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4491         InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
4492         CaptureGetFragDataIndexEXT_name(glState, isCallValid, programPacked, name, &nameParam);
4493         paramBuffer.addParam(std::move(nameParam));
4494     }
4495     else
4496     {
4497         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4498         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4499                        &nameParam.value);
4500         paramBuffer.addParam(std::move(nameParam));
4501     }
4502 
4503     ParamCapture returnValueCapture("returnValue", ParamType::TGLint);
4504     InitParamValue(ParamType::TGLint, returnValue, &returnValueCapture.value);
4505     paramBuffer.addReturnValue(std::move(returnValueCapture));
4506 
4507     return CallCapture(angle::EntryPoint::GLGetFragDataIndexEXT, std::move(paramBuffer));
4508 }
4509 
CaptureGetProgramResourceLocationIndexEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,const GLchar * name,GLint returnValue)4510 CallCapture CaptureGetProgramResourceLocationIndexEXT(const State &glState,
4511                                                       bool isCallValid,
4512                                                       ShaderProgramID programPacked,
4513                                                       GLenum programInterface,
4514                                                       const GLchar *name,
4515                                                       GLint returnValue)
4516 {
4517     ParamBuffer paramBuffer;
4518 
4519     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
4520     paramBuffer.addEnumParam("programInterface", GLenumGroup::ProgramInterface, ParamType::TGLenum,
4521                              programInterface);
4522 
4523     if (isCallValid)
4524     {
4525         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4526         InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
4527         CaptureGetProgramResourceLocationIndexEXT_name(glState, isCallValid, programPacked,
4528                                                        programInterface, name, &nameParam);
4529         paramBuffer.addParam(std::move(nameParam));
4530     }
4531     else
4532     {
4533         ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
4534         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4535                        &nameParam.value);
4536         paramBuffer.addParam(std::move(nameParam));
4537     }
4538 
4539     ParamCapture returnValueCapture("returnValue", ParamType::TGLint);
4540     InitParamValue(ParamType::TGLint, returnValue, &returnValueCapture.value);
4541     paramBuffer.addReturnValue(std::move(returnValueCapture));
4542 
4543     return CallCapture(angle::EntryPoint::GLGetProgramResourceLocationIndexEXT,
4544                        std::move(paramBuffer));
4545 }
4546 
CaptureBufferStorageEXT(const State & glState,bool isCallValid,BufferBinding targetPacked,GLsizeiptr size,const void * data,GLbitfield flags)4547 CallCapture CaptureBufferStorageEXT(const State &glState,
4548                                     bool isCallValid,
4549                                     BufferBinding targetPacked,
4550                                     GLsizeiptr size,
4551                                     const void *data,
4552                                     GLbitfield flags)
4553 {
4554     ParamBuffer paramBuffer;
4555 
4556     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
4557     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
4558 
4559     if (isCallValid)
4560     {
4561         ParamCapture dataParam("data", ParamType::TvoidConstPointer);
4562         InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
4563         CaptureBufferStorageEXT_data(glState, isCallValid, targetPacked, size, data, flags,
4564                                      &dataParam);
4565         paramBuffer.addParam(std::move(dataParam));
4566     }
4567     else
4568     {
4569         ParamCapture dataParam("data", ParamType::TvoidConstPointer);
4570         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
4571                        &dataParam.value);
4572         paramBuffer.addParam(std::move(dataParam));
4573     }
4574 
4575     paramBuffer.addEnumParam("flags", GLenumGroup::MapBufferUsageMask, ParamType::TGLbitfield,
4576                              flags);
4577 
4578     return CallCapture(angle::EntryPoint::GLBufferStorageEXT, std::move(paramBuffer));
4579 }
4580 
CaptureClipControlEXT(const State & glState,bool isCallValid,GLenum origin,GLenum depth)4581 CallCapture CaptureClipControlEXT(const State &glState,
4582                                   bool isCallValid,
4583                                   GLenum origin,
4584                                   GLenum depth)
4585 {
4586     ParamBuffer paramBuffer;
4587 
4588     paramBuffer.addEnumParam("origin", GLenumGroup::DefaultGroup, ParamType::TGLenum, origin);
4589     paramBuffer.addEnumParam("depth", GLenumGroup::DefaultGroup, ParamType::TGLenum, depth);
4590 
4591     return CallCapture(angle::EntryPoint::GLClipControlEXT, std::move(paramBuffer));
4592 }
4593 
CaptureCopyImageSubDataEXT(const State & glState,bool isCallValid,GLuint srcName,GLenum srcTarget,GLint srcLevel,GLint srcX,GLint srcY,GLint srcZ,GLuint dstName,GLenum dstTarget,GLint dstLevel,GLint dstX,GLint dstY,GLint dstZ,GLsizei srcWidth,GLsizei srcHeight,GLsizei srcDepth)4594 CallCapture CaptureCopyImageSubDataEXT(const State &glState,
4595                                        bool isCallValid,
4596                                        GLuint srcName,
4597                                        GLenum srcTarget,
4598                                        GLint srcLevel,
4599                                        GLint srcX,
4600                                        GLint srcY,
4601                                        GLint srcZ,
4602                                        GLuint dstName,
4603                                        GLenum dstTarget,
4604                                        GLint dstLevel,
4605                                        GLint dstX,
4606                                        GLint dstY,
4607                                        GLint dstZ,
4608                                        GLsizei srcWidth,
4609                                        GLsizei srcHeight,
4610                                        GLsizei srcDepth)
4611 {
4612     ParamBuffer paramBuffer;
4613 
4614     paramBuffer.addValueParam("srcName", ParamType::TGLuint, srcName);
4615     paramBuffer.addEnumParam("srcTarget", GLenumGroup::CopyBufferSubDataTarget, ParamType::TGLenum,
4616                              srcTarget);
4617     paramBuffer.addValueParam("srcLevel", ParamType::TGLint, srcLevel);
4618     paramBuffer.addValueParam("srcX", ParamType::TGLint, srcX);
4619     paramBuffer.addValueParam("srcY", ParamType::TGLint, srcY);
4620     paramBuffer.addValueParam("srcZ", ParamType::TGLint, srcZ);
4621     paramBuffer.addValueParam("dstName", ParamType::TGLuint, dstName);
4622     paramBuffer.addEnumParam("dstTarget", GLenumGroup::CopyBufferSubDataTarget, ParamType::TGLenum,
4623                              dstTarget);
4624     paramBuffer.addValueParam("dstLevel", ParamType::TGLint, dstLevel);
4625     paramBuffer.addValueParam("dstX", ParamType::TGLint, dstX);
4626     paramBuffer.addValueParam("dstY", ParamType::TGLint, dstY);
4627     paramBuffer.addValueParam("dstZ", ParamType::TGLint, dstZ);
4628     paramBuffer.addValueParam("srcWidth", ParamType::TGLsizei, srcWidth);
4629     paramBuffer.addValueParam("srcHeight", ParamType::TGLsizei, srcHeight);
4630     paramBuffer.addValueParam("srcDepth", ParamType::TGLsizei, srcDepth);
4631 
4632     return CallCapture(angle::EntryPoint::GLCopyImageSubDataEXT, std::move(paramBuffer));
4633 }
4634 
CaptureGetObjectLabelEXT(const State & glState,bool isCallValid,GLenum type,GLuint object,GLsizei bufSize,GLsizei * length,GLchar * label)4635 CallCapture CaptureGetObjectLabelEXT(const State &glState,
4636                                      bool isCallValid,
4637                                      GLenum type,
4638                                      GLuint object,
4639                                      GLsizei bufSize,
4640                                      GLsizei *length,
4641                                      GLchar *label)
4642 {
4643     ParamBuffer paramBuffer;
4644 
4645     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
4646     paramBuffer.addValueParam("object", ParamType::TGLuint, object);
4647     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4648 
4649     if (isCallValid)
4650     {
4651         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4652         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
4653         CaptureGetObjectLabelEXT_length(glState, isCallValid, type, object, bufSize, length, label,
4654                                         &lengthParam);
4655         paramBuffer.addParam(std::move(lengthParam));
4656     }
4657     else
4658     {
4659         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
4660         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
4661                        &lengthParam.value);
4662         paramBuffer.addParam(std::move(lengthParam));
4663     }
4664 
4665     if (isCallValid)
4666     {
4667         ParamCapture labelParam("label", ParamType::TGLcharPointer);
4668         InitParamValue(ParamType::TGLcharPointer, label, &labelParam.value);
4669         CaptureGetObjectLabelEXT_label(glState, isCallValid, type, object, bufSize, length, label,
4670                                        &labelParam);
4671         paramBuffer.addParam(std::move(labelParam));
4672     }
4673     else
4674     {
4675         ParamCapture labelParam("label", ParamType::TGLcharPointer);
4676         InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
4677                        &labelParam.value);
4678         paramBuffer.addParam(std::move(labelParam));
4679     }
4680 
4681     return CallCapture(angle::EntryPoint::GLGetObjectLabelEXT, std::move(paramBuffer));
4682 }
4683 
CaptureLabelObjectEXT(const State & glState,bool isCallValid,GLenum type,GLuint object,GLsizei length,const GLchar * label)4684 CallCapture CaptureLabelObjectEXT(const State &glState,
4685                                   bool isCallValid,
4686                                   GLenum type,
4687                                   GLuint object,
4688                                   GLsizei length,
4689                                   const GLchar *label)
4690 {
4691     ParamBuffer paramBuffer;
4692 
4693     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
4694     paramBuffer.addValueParam("object", ParamType::TGLuint, object);
4695     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
4696 
4697     if (isCallValid)
4698     {
4699         ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
4700         InitParamValue(ParamType::TGLcharConstPointer, label, &labelParam.value);
4701         CaptureLabelObjectEXT_label(glState, isCallValid, type, object, length, label, &labelParam);
4702         paramBuffer.addParam(std::move(labelParam));
4703     }
4704     else
4705     {
4706         ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
4707         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4708                        &labelParam.value);
4709         paramBuffer.addParam(std::move(labelParam));
4710     }
4711 
4712     return CallCapture(angle::EntryPoint::GLLabelObjectEXT, std::move(paramBuffer));
4713 }
4714 
CaptureInsertEventMarkerEXT(const State & glState,bool isCallValid,GLsizei length,const GLchar * marker)4715 CallCapture CaptureInsertEventMarkerEXT(const State &glState,
4716                                         bool isCallValid,
4717                                         GLsizei length,
4718                                         const GLchar *marker)
4719 {
4720     ParamBuffer paramBuffer;
4721 
4722     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
4723 
4724     if (isCallValid)
4725     {
4726         ParamCapture markerParam("marker", ParamType::TGLcharConstPointer);
4727         InitParamValue(ParamType::TGLcharConstPointer, marker, &markerParam.value);
4728         CaptureInsertEventMarkerEXT_marker(glState, isCallValid, length, marker, &markerParam);
4729         paramBuffer.addParam(std::move(markerParam));
4730     }
4731     else
4732     {
4733         ParamCapture markerParam("marker", ParamType::TGLcharConstPointer);
4734         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4735                        &markerParam.value);
4736         paramBuffer.addParam(std::move(markerParam));
4737     }
4738 
4739     return CallCapture(angle::EntryPoint::GLInsertEventMarkerEXT, std::move(paramBuffer));
4740 }
4741 
CapturePopGroupMarkerEXT(const State & glState,bool isCallValid)4742 CallCapture CapturePopGroupMarkerEXT(const State &glState, bool isCallValid)
4743 {
4744     ParamBuffer paramBuffer;
4745 
4746     return CallCapture(angle::EntryPoint::GLPopGroupMarkerEXT, std::move(paramBuffer));
4747 }
4748 
CapturePushGroupMarkerEXT(const State & glState,bool isCallValid,GLsizei length,const GLchar * marker)4749 CallCapture CapturePushGroupMarkerEXT(const State &glState,
4750                                       bool isCallValid,
4751                                       GLsizei length,
4752                                       const GLchar *marker)
4753 {
4754     ParamBuffer paramBuffer;
4755 
4756     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
4757 
4758     if (isCallValid)
4759     {
4760         ParamCapture markerParam("marker", ParamType::TGLcharConstPointer);
4761         InitParamValue(ParamType::TGLcharConstPointer, marker, &markerParam.value);
4762         CapturePushGroupMarkerEXT_marker(glState, isCallValid, length, marker, &markerParam);
4763         paramBuffer.addParam(std::move(markerParam));
4764     }
4765     else
4766     {
4767         ParamCapture markerParam("marker", ParamType::TGLcharConstPointer);
4768         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
4769                        &markerParam.value);
4770         paramBuffer.addParam(std::move(markerParam));
4771     }
4772 
4773     return CallCapture(angle::EntryPoint::GLPushGroupMarkerEXT, std::move(paramBuffer));
4774 }
4775 
CaptureDiscardFramebufferEXT(const State & glState,bool isCallValid,GLenum target,GLsizei numAttachments,const GLenum * attachments)4776 CallCapture CaptureDiscardFramebufferEXT(const State &glState,
4777                                          bool isCallValid,
4778                                          GLenum target,
4779                                          GLsizei numAttachments,
4780                                          const GLenum *attachments)
4781 {
4782     ParamBuffer paramBuffer;
4783 
4784     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
4785     paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);
4786 
4787     if (isCallValid)
4788     {
4789         ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
4790         InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
4791         CaptureDiscardFramebufferEXT_attachments(glState, isCallValid, target, numAttachments,
4792                                                  attachments, &attachmentsParam);
4793         paramBuffer.addParam(std::move(attachmentsParam));
4794     }
4795     else
4796     {
4797         ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
4798         InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
4799                        &attachmentsParam.value);
4800         paramBuffer.addParam(std::move(attachmentsParam));
4801     }
4802 
4803     return CallCapture(angle::EntryPoint::GLDiscardFramebufferEXT, std::move(paramBuffer));
4804 }
4805 
CaptureBeginQueryEXT(const State & glState,bool isCallValid,QueryType targetPacked,QueryID idPacked)4806 CallCapture CaptureBeginQueryEXT(const State &glState,
4807                                  bool isCallValid,
4808                                  QueryType targetPacked,
4809                                  QueryID idPacked)
4810 {
4811     ParamBuffer paramBuffer;
4812 
4813     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
4814     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
4815 
4816     return CallCapture(angle::EntryPoint::GLBeginQueryEXT, std::move(paramBuffer));
4817 }
4818 
CaptureDeleteQueriesEXT(const State & glState,bool isCallValid,GLsizei n,const QueryID * idsPacked)4819 CallCapture CaptureDeleteQueriesEXT(const State &glState,
4820                                     bool isCallValid,
4821                                     GLsizei n,
4822                                     const QueryID *idsPacked)
4823 {
4824     ParamBuffer paramBuffer;
4825 
4826     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
4827 
4828     if (isCallValid)
4829     {
4830         ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDConstPointer);
4831         InitParamValue(ParamType::TQueryIDConstPointer, idsPacked, &idsPackedParam.value);
4832         CaptureDeleteQueriesEXT_idsPacked(glState, isCallValid, n, idsPacked, &idsPackedParam);
4833         paramBuffer.addParam(std::move(idsPackedParam));
4834     }
4835     else
4836     {
4837         ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDConstPointer);
4838         InitParamValue(ParamType::TQueryIDConstPointer, static_cast<const QueryID *>(nullptr),
4839                        &idsPackedParam.value);
4840         paramBuffer.addParam(std::move(idsPackedParam));
4841     }
4842 
4843     return CallCapture(angle::EntryPoint::GLDeleteQueriesEXT, std::move(paramBuffer));
4844 }
4845 
CaptureEndQueryEXT(const State & glState,bool isCallValid,QueryType targetPacked)4846 CallCapture CaptureEndQueryEXT(const State &glState, bool isCallValid, QueryType targetPacked)
4847 {
4848     ParamBuffer paramBuffer;
4849 
4850     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
4851 
4852     return CallCapture(angle::EntryPoint::GLEndQueryEXT, std::move(paramBuffer));
4853 }
4854 
CaptureGenQueriesEXT(const State & glState,bool isCallValid,GLsizei n,QueryID * idsPacked)4855 CallCapture CaptureGenQueriesEXT(const State &glState,
4856                                  bool isCallValid,
4857                                  GLsizei n,
4858                                  QueryID *idsPacked)
4859 {
4860     ParamBuffer paramBuffer;
4861 
4862     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
4863 
4864     if (isCallValid)
4865     {
4866         ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDPointer);
4867         InitParamValue(ParamType::TQueryIDPointer, idsPacked, &idsPackedParam.value);
4868         CaptureGenQueriesEXT_idsPacked(glState, isCallValid, n, idsPacked, &idsPackedParam);
4869         paramBuffer.addParam(std::move(idsPackedParam));
4870     }
4871     else
4872     {
4873         ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDPointer);
4874         InitParamValue(ParamType::TQueryIDPointer, static_cast<QueryID *>(nullptr),
4875                        &idsPackedParam.value);
4876         paramBuffer.addParam(std::move(idsPackedParam));
4877     }
4878 
4879     return CallCapture(angle::EntryPoint::GLGenQueriesEXT, std::move(paramBuffer));
4880 }
4881 
CaptureGetInteger64vEXT(const State & glState,bool isCallValid,GLenum pname,GLint64 * data)4882 CallCapture CaptureGetInteger64vEXT(const State &glState,
4883                                     bool isCallValid,
4884                                     GLenum pname,
4885                                     GLint64 *data)
4886 {
4887     ParamBuffer paramBuffer;
4888 
4889     paramBuffer.addEnumParam("pname", GLenumGroup::GetPName, ParamType::TGLenum, pname);
4890 
4891     if (isCallValid)
4892     {
4893         ParamCapture dataParam("data", ParamType::TGLint64Pointer);
4894         InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
4895         CaptureGetInteger64vEXT_data(glState, isCallValid, pname, data, &dataParam);
4896         paramBuffer.addParam(std::move(dataParam));
4897     }
4898     else
4899     {
4900         ParamCapture dataParam("data", ParamType::TGLint64Pointer);
4901         InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
4902                        &dataParam.value);
4903         paramBuffer.addParam(std::move(dataParam));
4904     }
4905 
4906     return CallCapture(angle::EntryPoint::GLGetInteger64vEXT, std::move(paramBuffer));
4907 }
4908 
CaptureGetQueryObjecti64vEXT(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLint64 * params)4909 CallCapture CaptureGetQueryObjecti64vEXT(const State &glState,
4910                                          bool isCallValid,
4911                                          QueryID idPacked,
4912                                          GLenum pname,
4913                                          GLint64 *params)
4914 {
4915     ParamBuffer paramBuffer;
4916 
4917     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
4918     paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
4919                              pname);
4920 
4921     if (isCallValid)
4922     {
4923         ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
4924         InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
4925         CaptureGetQueryObjecti64vEXT_params(glState, isCallValid, idPacked, pname, params,
4926                                             &paramsParam);
4927         paramBuffer.addParam(std::move(paramsParam));
4928     }
4929     else
4930     {
4931         ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
4932         InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
4933                        &paramsParam.value);
4934         paramBuffer.addParam(std::move(paramsParam));
4935     }
4936 
4937     return CallCapture(angle::EntryPoint::GLGetQueryObjecti64vEXT, std::move(paramBuffer));
4938 }
4939 
CaptureGetQueryObjectivEXT(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLint * params)4940 CallCapture CaptureGetQueryObjectivEXT(const State &glState,
4941                                        bool isCallValid,
4942                                        QueryID idPacked,
4943                                        GLenum pname,
4944                                        GLint *params)
4945 {
4946     ParamBuffer paramBuffer;
4947 
4948     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
4949     paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
4950                              pname);
4951 
4952     if (isCallValid)
4953     {
4954         ParamCapture paramsParam("params", ParamType::TGLintPointer);
4955         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
4956         CaptureGetQueryObjectivEXT_params(glState, isCallValid, idPacked, pname, params,
4957                                           &paramsParam);
4958         paramBuffer.addParam(std::move(paramsParam));
4959     }
4960     else
4961     {
4962         ParamCapture paramsParam("params", ParamType::TGLintPointer);
4963         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
4964         paramBuffer.addParam(std::move(paramsParam));
4965     }
4966 
4967     return CallCapture(angle::EntryPoint::GLGetQueryObjectivEXT, std::move(paramBuffer));
4968 }
4969 
CaptureGetQueryObjectui64vEXT(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLuint64 * params)4970 CallCapture CaptureGetQueryObjectui64vEXT(const State &glState,
4971                                           bool isCallValid,
4972                                           QueryID idPacked,
4973                                           GLenum pname,
4974                                           GLuint64 *params)
4975 {
4976     ParamBuffer paramBuffer;
4977 
4978     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
4979     paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
4980                              pname);
4981 
4982     if (isCallValid)
4983     {
4984         ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
4985         InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
4986         CaptureGetQueryObjectui64vEXT_params(glState, isCallValid, idPacked, pname, params,
4987                                              &paramsParam);
4988         paramBuffer.addParam(std::move(paramsParam));
4989     }
4990     else
4991     {
4992         ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
4993         InitParamValue(ParamType::TGLuint64Pointer, static_cast<GLuint64 *>(nullptr),
4994                        &paramsParam.value);
4995         paramBuffer.addParam(std::move(paramsParam));
4996     }
4997 
4998     return CallCapture(angle::EntryPoint::GLGetQueryObjectui64vEXT, std::move(paramBuffer));
4999 }
5000 
CaptureGetQueryObjectuivEXT(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLuint * params)5001 CallCapture CaptureGetQueryObjectuivEXT(const State &glState,
5002                                         bool isCallValid,
5003                                         QueryID idPacked,
5004                                         GLenum pname,
5005                                         GLuint *params)
5006 {
5007     ParamBuffer paramBuffer;
5008 
5009     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
5010     paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
5011                              pname);
5012 
5013     if (isCallValid)
5014     {
5015         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
5016         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
5017         CaptureGetQueryObjectuivEXT_params(glState, isCallValid, idPacked, pname, params,
5018                                            &paramsParam);
5019         paramBuffer.addParam(std::move(paramsParam));
5020     }
5021     else
5022     {
5023         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
5024         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
5025                        &paramsParam.value);
5026         paramBuffer.addParam(std::move(paramsParam));
5027     }
5028 
5029     return CallCapture(angle::EntryPoint::GLGetQueryObjectuivEXT, std::move(paramBuffer));
5030 }
5031 
CaptureGetQueryivEXT(const State & glState,bool isCallValid,QueryType targetPacked,GLenum pname,GLint * params)5032 CallCapture CaptureGetQueryivEXT(const State &glState,
5033                                  bool isCallValid,
5034                                  QueryType targetPacked,
5035                                  GLenum pname,
5036                                  GLint *params)
5037 {
5038     ParamBuffer paramBuffer;
5039 
5040     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
5041     paramBuffer.addEnumParam("pname", GLenumGroup::QueryParameterName, ParamType::TGLenum, pname);
5042 
5043     if (isCallValid)
5044     {
5045         ParamCapture paramsParam("params", ParamType::TGLintPointer);
5046         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
5047         CaptureGetQueryivEXT_params(glState, isCallValid, targetPacked, pname, params,
5048                                     &paramsParam);
5049         paramBuffer.addParam(std::move(paramsParam));
5050     }
5051     else
5052     {
5053         ParamCapture paramsParam("params", ParamType::TGLintPointer);
5054         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
5055         paramBuffer.addParam(std::move(paramsParam));
5056     }
5057 
5058     return CallCapture(angle::EntryPoint::GLGetQueryivEXT, std::move(paramBuffer));
5059 }
5060 
CaptureIsQueryEXT(const State & glState,bool isCallValid,QueryID idPacked,GLboolean returnValue)5061 CallCapture CaptureIsQueryEXT(const State &glState,
5062                               bool isCallValid,
5063                               QueryID idPacked,
5064                               GLboolean returnValue)
5065 {
5066     ParamBuffer paramBuffer;
5067 
5068     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
5069 
5070     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
5071     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
5072     paramBuffer.addReturnValue(std::move(returnValueCapture));
5073 
5074     return CallCapture(angle::EntryPoint::GLIsQueryEXT, std::move(paramBuffer));
5075 }
5076 
CaptureQueryCounterEXT(const State & glState,bool isCallValid,QueryID idPacked,QueryType targetPacked)5077 CallCapture CaptureQueryCounterEXT(const State &glState,
5078                                    bool isCallValid,
5079                                    QueryID idPacked,
5080                                    QueryType targetPacked)
5081 {
5082     ParamBuffer paramBuffer;
5083 
5084     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
5085     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
5086 
5087     return CallCapture(angle::EntryPoint::GLQueryCounterEXT, std::move(paramBuffer));
5088 }
5089 
CaptureDrawBuffersEXT(const State & glState,bool isCallValid,GLsizei n,const GLenum * bufs)5090 CallCapture CaptureDrawBuffersEXT(const State &glState,
5091                                   bool isCallValid,
5092                                   GLsizei n,
5093                                   const GLenum *bufs)
5094 {
5095     ParamBuffer paramBuffer;
5096 
5097     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
5098 
5099     if (isCallValid)
5100     {
5101         ParamCapture bufsParam("bufs", ParamType::TGLenumConstPointer);
5102         InitParamValue(ParamType::TGLenumConstPointer, bufs, &bufsParam.value);
5103         CaptureDrawBuffersEXT_bufs(glState, isCallValid, n, bufs, &bufsParam);
5104         paramBuffer.addParam(std::move(bufsParam));
5105     }
5106     else
5107     {
5108         ParamCapture bufsParam("bufs", ParamType::TGLenumConstPointer);
5109         InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
5110                        &bufsParam.value);
5111         paramBuffer.addParam(std::move(bufsParam));
5112     }
5113 
5114     return CallCapture(angle::EntryPoint::GLDrawBuffersEXT, std::move(paramBuffer));
5115 }
5116 
CaptureBlendEquationSeparateiEXT(const State & glState,bool isCallValid,GLuint buf,GLenum modeRGB,GLenum modeAlpha)5117 CallCapture CaptureBlendEquationSeparateiEXT(const State &glState,
5118                                              bool isCallValid,
5119                                              GLuint buf,
5120                                              GLenum modeRGB,
5121                                              GLenum modeAlpha)
5122 {
5123     ParamBuffer paramBuffer;
5124 
5125     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
5126     paramBuffer.addEnumParam("modeRGB", GLenumGroup::BlendEquationModeEXT, ParamType::TGLenum,
5127                              modeRGB);
5128     paramBuffer.addEnumParam("modeAlpha", GLenumGroup::BlendEquationModeEXT, ParamType::TGLenum,
5129                              modeAlpha);
5130 
5131     return CallCapture(angle::EntryPoint::GLBlendEquationSeparateiEXT, std::move(paramBuffer));
5132 }
5133 
CaptureBlendEquationiEXT(const State & glState,bool isCallValid,GLuint buf,GLenum mode)5134 CallCapture CaptureBlendEquationiEXT(const State &glState,
5135                                      bool isCallValid,
5136                                      GLuint buf,
5137                                      GLenum mode)
5138 {
5139     ParamBuffer paramBuffer;
5140 
5141     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
5142     paramBuffer.addEnumParam("mode", GLenumGroup::BlendEquationModeEXT, ParamType::TGLenum, mode);
5143 
5144     return CallCapture(angle::EntryPoint::GLBlendEquationiEXT, std::move(paramBuffer));
5145 }
5146 
CaptureBlendFuncSeparateiEXT(const State & glState,bool isCallValid,GLuint buf,GLenum srcRGB,GLenum dstRGB,GLenum srcAlpha,GLenum dstAlpha)5147 CallCapture CaptureBlendFuncSeparateiEXT(const State &glState,
5148                                          bool isCallValid,
5149                                          GLuint buf,
5150                                          GLenum srcRGB,
5151                                          GLenum dstRGB,
5152                                          GLenum srcAlpha,
5153                                          GLenum dstAlpha)
5154 {
5155     ParamBuffer paramBuffer;
5156 
5157     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
5158     paramBuffer.addEnumParam("srcRGB", GLenumGroup::BlendingFactor, ParamType::TGLenum, srcRGB);
5159     paramBuffer.addEnumParam("dstRGB", GLenumGroup::BlendingFactor, ParamType::TGLenum, dstRGB);
5160     paramBuffer.addEnumParam("srcAlpha", GLenumGroup::BlendingFactor, ParamType::TGLenum, srcAlpha);
5161     paramBuffer.addEnumParam("dstAlpha", GLenumGroup::BlendingFactor, ParamType::TGLenum, dstAlpha);
5162 
5163     return CallCapture(angle::EntryPoint::GLBlendFuncSeparateiEXT, std::move(paramBuffer));
5164 }
5165 
CaptureBlendFunciEXT(const State & glState,bool isCallValid,GLuint buf,GLenum src,GLenum dst)5166 CallCapture CaptureBlendFunciEXT(const State &glState,
5167                                  bool isCallValid,
5168                                  GLuint buf,
5169                                  GLenum src,
5170                                  GLenum dst)
5171 {
5172     ParamBuffer paramBuffer;
5173 
5174     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
5175     paramBuffer.addEnumParam("src", GLenumGroup::BlendingFactor, ParamType::TGLenum, src);
5176     paramBuffer.addEnumParam("dst", GLenumGroup::BlendingFactor, ParamType::TGLenum, dst);
5177 
5178     return CallCapture(angle::EntryPoint::GLBlendFunciEXT, std::move(paramBuffer));
5179 }
5180 
CaptureColorMaskiEXT(const State & glState,bool isCallValid,GLuint index,GLboolean r,GLboolean g,GLboolean b,GLboolean a)5181 CallCapture CaptureColorMaskiEXT(const State &glState,
5182                                  bool isCallValid,
5183                                  GLuint index,
5184                                  GLboolean r,
5185                                  GLboolean g,
5186                                  GLboolean b,
5187                                  GLboolean a)
5188 {
5189     ParamBuffer paramBuffer;
5190 
5191     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5192     paramBuffer.addValueParam("r", ParamType::TGLboolean, r);
5193     paramBuffer.addValueParam("g", ParamType::TGLboolean, g);
5194     paramBuffer.addValueParam("b", ParamType::TGLboolean, b);
5195     paramBuffer.addValueParam("a", ParamType::TGLboolean, a);
5196 
5197     return CallCapture(angle::EntryPoint::GLColorMaskiEXT, std::move(paramBuffer));
5198 }
5199 
CaptureDisableiEXT(const State & glState,bool isCallValid,GLenum target,GLuint index)5200 CallCapture CaptureDisableiEXT(const State &glState, bool isCallValid, GLenum target, GLuint index)
5201 {
5202     ParamBuffer paramBuffer;
5203 
5204     paramBuffer.addEnumParam("target", GLenumGroup::EnableCap, ParamType::TGLenum, target);
5205     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5206 
5207     return CallCapture(angle::EntryPoint::GLDisableiEXT, std::move(paramBuffer));
5208 }
5209 
CaptureEnableiEXT(const State & glState,bool isCallValid,GLenum target,GLuint index)5210 CallCapture CaptureEnableiEXT(const State &glState, bool isCallValid, GLenum target, GLuint index)
5211 {
5212     ParamBuffer paramBuffer;
5213 
5214     paramBuffer.addEnumParam("target", GLenumGroup::EnableCap, ParamType::TGLenum, target);
5215     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5216 
5217     return CallCapture(angle::EntryPoint::GLEnableiEXT, std::move(paramBuffer));
5218 }
5219 
CaptureIsEnablediEXT(const State & glState,bool isCallValid,GLenum target,GLuint index,GLboolean returnValue)5220 CallCapture CaptureIsEnablediEXT(const State &glState,
5221                                  bool isCallValid,
5222                                  GLenum target,
5223                                  GLuint index,
5224                                  GLboolean returnValue)
5225 {
5226     ParamBuffer paramBuffer;
5227 
5228     paramBuffer.addEnumParam("target", GLenumGroup::EnableCap, ParamType::TGLenum, target);
5229     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5230 
5231     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
5232     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
5233     paramBuffer.addReturnValue(std::move(returnValueCapture));
5234 
5235     return CallCapture(angle::EntryPoint::GLIsEnablediEXT, std::move(paramBuffer));
5236 }
5237 
CaptureDrawElementsBaseVertexEXT(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex)5238 CallCapture CaptureDrawElementsBaseVertexEXT(const State &glState,
5239                                              bool isCallValid,
5240                                              PrimitiveMode modePacked,
5241                                              GLsizei count,
5242                                              DrawElementsType typePacked,
5243                                              const void *indices,
5244                                              GLint basevertex)
5245 {
5246     ParamBuffer paramBuffer;
5247 
5248     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
5249     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
5250     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
5251 
5252     if (isCallValid)
5253     {
5254         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5255         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
5256         CaptureDrawElementsBaseVertexEXT_indices(glState, isCallValid, modePacked, count,
5257                                                  typePacked, indices, basevertex, &indicesParam);
5258         paramBuffer.addParam(std::move(indicesParam));
5259     }
5260     else
5261     {
5262         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5263         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5264                        &indicesParam.value);
5265         paramBuffer.addParam(std::move(indicesParam));
5266     }
5267 
5268     paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
5269 
5270     return CallCapture(angle::EntryPoint::GLDrawElementsBaseVertexEXT, std::move(paramBuffer));
5271 }
5272 
CaptureDrawElementsInstancedBaseVertexEXT(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount,GLint basevertex)5273 CallCapture CaptureDrawElementsInstancedBaseVertexEXT(const State &glState,
5274                                                       bool isCallValid,
5275                                                       PrimitiveMode modePacked,
5276                                                       GLsizei count,
5277                                                       DrawElementsType typePacked,
5278                                                       const void *indices,
5279                                                       GLsizei instancecount,
5280                                                       GLint basevertex)
5281 {
5282     ParamBuffer paramBuffer;
5283 
5284     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
5285     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
5286     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
5287 
5288     if (isCallValid)
5289     {
5290         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5291         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
5292         CaptureDrawElementsInstancedBaseVertexEXT_indices(glState, isCallValid, modePacked, count,
5293                                                           typePacked, indices, instancecount,
5294                                                           basevertex, &indicesParam);
5295         paramBuffer.addParam(std::move(indicesParam));
5296     }
5297     else
5298     {
5299         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5300         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5301                        &indicesParam.value);
5302         paramBuffer.addParam(std::move(indicesParam));
5303     }
5304 
5305     paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
5306     paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
5307 
5308     return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseVertexEXT,
5309                        std::move(paramBuffer));
5310 }
5311 
CaptureDrawRangeElementsBaseVertexEXT(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLuint start,GLuint end,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex)5312 CallCapture CaptureDrawRangeElementsBaseVertexEXT(const State &glState,
5313                                                   bool isCallValid,
5314                                                   PrimitiveMode modePacked,
5315                                                   GLuint start,
5316                                                   GLuint end,
5317                                                   GLsizei count,
5318                                                   DrawElementsType typePacked,
5319                                                   const void *indices,
5320                                                   GLint basevertex)
5321 {
5322     ParamBuffer paramBuffer;
5323 
5324     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
5325     paramBuffer.addValueParam("start", ParamType::TGLuint, start);
5326     paramBuffer.addValueParam("end", ParamType::TGLuint, end);
5327     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
5328     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
5329 
5330     if (isCallValid)
5331     {
5332         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5333         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
5334         CaptureDrawRangeElementsBaseVertexEXT_indices(glState, isCallValid, modePacked, start, end,
5335                                                       count, typePacked, indices, basevertex,
5336                                                       &indicesParam);
5337         paramBuffer.addParam(std::move(indicesParam));
5338     }
5339     else
5340     {
5341         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5342         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5343                        &indicesParam.value);
5344         paramBuffer.addParam(std::move(indicesParam));
5345     }
5346 
5347     paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
5348 
5349     return CallCapture(angle::EntryPoint::GLDrawRangeElementsBaseVertexEXT, std::move(paramBuffer));
5350 }
5351 
CaptureMultiDrawElementsBaseVertexEXT(const State & glState,bool isCallValid,PrimitiveMode modePacked,const GLsizei * count,DrawElementsType typePacked,const void * const * indices,GLsizei primcount,const GLint * basevertex)5352 CallCapture CaptureMultiDrawElementsBaseVertexEXT(const State &glState,
5353                                                   bool isCallValid,
5354                                                   PrimitiveMode modePacked,
5355                                                   const GLsizei *count,
5356                                                   DrawElementsType typePacked,
5357                                                   const void *const *indices,
5358                                                   GLsizei primcount,
5359                                                   const GLint *basevertex)
5360 {
5361     ParamBuffer paramBuffer;
5362 
5363     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
5364 
5365     if (isCallValid)
5366     {
5367         ParamCapture countParam("count", ParamType::TGLsizeiConstPointer);
5368         InitParamValue(ParamType::TGLsizeiConstPointer, count, &countParam.value);
5369         CaptureMultiDrawElementsBaseVertexEXT_count(glState, isCallValid, modePacked, count,
5370                                                     typePacked, indices, primcount, basevertex,
5371                                                     &countParam);
5372         paramBuffer.addParam(std::move(countParam));
5373     }
5374     else
5375     {
5376         ParamCapture countParam("count", ParamType::TGLsizeiConstPointer);
5377         InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
5378                        &countParam.value);
5379         paramBuffer.addParam(std::move(countParam));
5380     }
5381 
5382     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
5383 
5384     if (isCallValid)
5385     {
5386         ParamCapture indicesParam("indices", ParamType::TvoidConstPointerPointer);
5387         InitParamValue(ParamType::TvoidConstPointerPointer, indices, &indicesParam.value);
5388         CaptureMultiDrawElementsBaseVertexEXT_indices(glState, isCallValid, modePacked, count,
5389                                                       typePacked, indices, primcount, basevertex,
5390                                                       &indicesParam);
5391         paramBuffer.addParam(std::move(indicesParam));
5392     }
5393     else
5394     {
5395         ParamCapture indicesParam("indices", ParamType::TvoidConstPointerPointer);
5396         InitParamValue(ParamType::TvoidConstPointerPointer,
5397                        static_cast<const void *const *>(nullptr), &indicesParam.value);
5398         paramBuffer.addParam(std::move(indicesParam));
5399     }
5400 
5401     paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);
5402 
5403     if (isCallValid)
5404     {
5405         ParamCapture basevertexParam("basevertex", ParamType::TGLintConstPointer);
5406         InitParamValue(ParamType::TGLintConstPointer, basevertex, &basevertexParam.value);
5407         CaptureMultiDrawElementsBaseVertexEXT_basevertex(glState, isCallValid, modePacked, count,
5408                                                          typePacked, indices, primcount, basevertex,
5409                                                          &basevertexParam);
5410         paramBuffer.addParam(std::move(basevertexParam));
5411     }
5412     else
5413     {
5414         ParamCapture basevertexParam("basevertex", ParamType::TGLintConstPointer);
5415         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
5416                        &basevertexParam.value);
5417         paramBuffer.addParam(std::move(basevertexParam));
5418     }
5419 
5420     return CallCapture(angle::EntryPoint::GLMultiDrawElementsBaseVertexEXT, std::move(paramBuffer));
5421 }
5422 
CaptureBufferStorageExternalEXT(const State & glState,bool isCallValid,BufferBinding targetPacked,GLintptr offset,GLsizeiptr size,GLeglClientBufferEXT clientBuffer,GLbitfield flags)5423 CallCapture CaptureBufferStorageExternalEXT(const State &glState,
5424                                             bool isCallValid,
5425                                             BufferBinding targetPacked,
5426                                             GLintptr offset,
5427                                             GLsizeiptr size,
5428                                             GLeglClientBufferEXT clientBuffer,
5429                                             GLbitfield flags)
5430 {
5431     ParamBuffer paramBuffer;
5432 
5433     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
5434     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5435     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5436     paramBuffer.addValueParam("clientBuffer", ParamType::TGLeglClientBufferEXT, clientBuffer);
5437     paramBuffer.addEnumParam("flags", GLenumGroup::MapBufferUsageMask, ParamType::TGLbitfield,
5438                              flags);
5439 
5440     return CallCapture(angle::EntryPoint::GLBufferStorageExternalEXT, std::move(paramBuffer));
5441 }
5442 
CaptureNamedBufferStorageExternalEXT(const State & glState,bool isCallValid,GLuint buffer,GLintptr offset,GLsizeiptr size,GLeglClientBufferEXT clientBuffer,GLbitfield flags)5443 CallCapture CaptureNamedBufferStorageExternalEXT(const State &glState,
5444                                                  bool isCallValid,
5445                                                  GLuint buffer,
5446                                                  GLintptr offset,
5447                                                  GLsizeiptr size,
5448                                                  GLeglClientBufferEXT clientBuffer,
5449                                                  GLbitfield flags)
5450 {
5451     ParamBuffer paramBuffer;
5452 
5453     paramBuffer.addValueParam("buffer", ParamType::TGLuint, buffer);
5454     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5455     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5456     paramBuffer.addValueParam("clientBuffer", ParamType::TGLeglClientBufferEXT, clientBuffer);
5457     paramBuffer.addEnumParam("flags", GLenumGroup::MapBufferUsageMask, ParamType::TGLbitfield,
5458                              flags);
5459 
5460     return CallCapture(angle::EntryPoint::GLNamedBufferStorageExternalEXT, std::move(paramBuffer));
5461 }
5462 
CaptureFramebufferTextureEXT(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureID texturePacked,GLint level)5463 CallCapture CaptureFramebufferTextureEXT(const State &glState,
5464                                          bool isCallValid,
5465                                          GLenum target,
5466                                          GLenum attachment,
5467                                          TextureID texturePacked,
5468                                          GLint level)
5469 {
5470     ParamBuffer paramBuffer;
5471 
5472     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
5473     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
5474                              attachment);
5475     paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5476     paramBuffer.addValueParam("level", ParamType::TGLint, level);
5477 
5478     return CallCapture(angle::EntryPoint::GLFramebufferTextureEXT, std::move(paramBuffer));
5479 }
5480 
CaptureDrawArraysInstancedEXT(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLint start,GLsizei count,GLsizei primcount)5481 CallCapture CaptureDrawArraysInstancedEXT(const State &glState,
5482                                           bool isCallValid,
5483                                           PrimitiveMode modePacked,
5484                                           GLint start,
5485                                           GLsizei count,
5486                                           GLsizei primcount)
5487 {
5488     ParamBuffer paramBuffer;
5489 
5490     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
5491     paramBuffer.addValueParam("start", ParamType::TGLint, start);
5492     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
5493     paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);
5494 
5495     return CallCapture(angle::EntryPoint::GLDrawArraysInstancedEXT, std::move(paramBuffer));
5496 }
5497 
CaptureDrawElementsInstancedEXT(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei primcount)5498 CallCapture CaptureDrawElementsInstancedEXT(const State &glState,
5499                                             bool isCallValid,
5500                                             PrimitiveMode modePacked,
5501                                             GLsizei count,
5502                                             DrawElementsType typePacked,
5503                                             const void *indices,
5504                                             GLsizei primcount)
5505 {
5506     ParamBuffer paramBuffer;
5507 
5508     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
5509     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
5510     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
5511 
5512     if (isCallValid)
5513     {
5514         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5515         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
5516         CaptureDrawElementsInstancedEXT_indices(glState, isCallValid, modePacked, count, typePacked,
5517                                                 indices, primcount, &indicesParam);
5518         paramBuffer.addParam(std::move(indicesParam));
5519     }
5520     else
5521     {
5522         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
5523         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5524                        &indicesParam.value);
5525         paramBuffer.addParam(std::move(indicesParam));
5526     }
5527 
5528     paramBuffer.addValueParam("primcount", ParamType::TGLsizei, primcount);
5529 
5530     return CallCapture(angle::EntryPoint::GLDrawElementsInstancedEXT, std::move(paramBuffer));
5531 }
5532 
CaptureVertexAttribDivisorEXT(const State & glState,bool isCallValid,GLuint index,GLuint divisor)5533 CallCapture CaptureVertexAttribDivisorEXT(const State &glState,
5534                                           bool isCallValid,
5535                                           GLuint index,
5536                                           GLuint divisor)
5537 {
5538     ParamBuffer paramBuffer;
5539 
5540     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5541     paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
5542 
5543     return CallCapture(angle::EntryPoint::GLVertexAttribDivisorEXT, std::move(paramBuffer));
5544 }
5545 
CaptureFlushMappedBufferRangeEXT(const State & glState,bool isCallValid,BufferBinding targetPacked,GLintptr offset,GLsizeiptr length)5546 CallCapture CaptureFlushMappedBufferRangeEXT(const State &glState,
5547                                              bool isCallValid,
5548                                              BufferBinding targetPacked,
5549                                              GLintptr offset,
5550                                              GLsizeiptr length)
5551 {
5552     ParamBuffer paramBuffer;
5553 
5554     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
5555     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5556     paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
5557 
5558     return CallCapture(angle::EntryPoint::GLFlushMappedBufferRangeEXT, std::move(paramBuffer));
5559 }
5560 
CaptureMapBufferRangeEXT(const State & glState,bool isCallValid,BufferBinding targetPacked,GLintptr offset,GLsizeiptr length,GLbitfield access,void * returnValue)5561 CallCapture CaptureMapBufferRangeEXT(const State &glState,
5562                                      bool isCallValid,
5563                                      BufferBinding targetPacked,
5564                                      GLintptr offset,
5565                                      GLsizeiptr length,
5566                                      GLbitfield access,
5567                                      void *returnValue)
5568 {
5569     ParamBuffer paramBuffer;
5570 
5571     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
5572     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5573     paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
5574     paramBuffer.addEnumParam("access", GLenumGroup::BufferAccessMask, ParamType::TGLbitfield,
5575                              access);
5576 
5577     ParamCapture returnValueCapture("returnValue", ParamType::TvoidPointer);
5578     InitParamValue(ParamType::TvoidPointer, returnValue, &returnValueCapture.value);
5579     paramBuffer.addReturnValue(std::move(returnValueCapture));
5580 
5581     return CallCapture(angle::EntryPoint::GLMapBufferRangeEXT, std::move(paramBuffer));
5582 }
5583 
CaptureBufferStorageMemEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLsizeiptr size,MemoryObjectID memoryPacked,GLuint64 offset)5584 CallCapture CaptureBufferStorageMemEXT(const State &glState,
5585                                        bool isCallValid,
5586                                        TextureType targetPacked,
5587                                        GLsizeiptr size,
5588                                        MemoryObjectID memoryPacked,
5589                                        GLuint64 offset)
5590 {
5591     ParamBuffer paramBuffer;
5592 
5593     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
5594     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5595     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
5596     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
5597 
5598     return CallCapture(angle::EntryPoint::GLBufferStorageMemEXT, std::move(paramBuffer));
5599 }
5600 
CaptureCreateMemoryObjectsEXT(const State & glState,bool isCallValid,GLsizei n,MemoryObjectID * memoryObjectsPacked)5601 CallCapture CaptureCreateMemoryObjectsEXT(const State &glState,
5602                                           bool isCallValid,
5603                                           GLsizei n,
5604                                           MemoryObjectID *memoryObjectsPacked)
5605 {
5606     ParamBuffer paramBuffer;
5607 
5608     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
5609 
5610     if (isCallValid)
5611     {
5612         ParamCapture memoryObjectsPackedParam("memoryObjectsPacked",
5613                                               ParamType::TMemoryObjectIDPointer);
5614         InitParamValue(ParamType::TMemoryObjectIDPointer, memoryObjectsPacked,
5615                        &memoryObjectsPackedParam.value);
5616         CaptureCreateMemoryObjectsEXT_memoryObjectsPacked(
5617             glState, isCallValid, n, memoryObjectsPacked, &memoryObjectsPackedParam);
5618         paramBuffer.addParam(std::move(memoryObjectsPackedParam));
5619     }
5620     else
5621     {
5622         ParamCapture memoryObjectsPackedParam("memoryObjectsPacked",
5623                                               ParamType::TMemoryObjectIDPointer);
5624         InitParamValue(ParamType::TMemoryObjectIDPointer, static_cast<MemoryObjectID *>(nullptr),
5625                        &memoryObjectsPackedParam.value);
5626         paramBuffer.addParam(std::move(memoryObjectsPackedParam));
5627     }
5628 
5629     return CallCapture(angle::EntryPoint::GLCreateMemoryObjectsEXT, std::move(paramBuffer));
5630 }
5631 
CaptureDeleteMemoryObjectsEXT(const State & glState,bool isCallValid,GLsizei n,const MemoryObjectID * memoryObjectsPacked)5632 CallCapture CaptureDeleteMemoryObjectsEXT(const State &glState,
5633                                           bool isCallValid,
5634                                           GLsizei n,
5635                                           const MemoryObjectID *memoryObjectsPacked)
5636 {
5637     ParamBuffer paramBuffer;
5638 
5639     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
5640 
5641     if (isCallValid)
5642     {
5643         ParamCapture memoryObjectsPackedParam("memoryObjectsPacked",
5644                                               ParamType::TMemoryObjectIDConstPointer);
5645         InitParamValue(ParamType::TMemoryObjectIDConstPointer, memoryObjectsPacked,
5646                        &memoryObjectsPackedParam.value);
5647         CaptureDeleteMemoryObjectsEXT_memoryObjectsPacked(
5648             glState, isCallValid, n, memoryObjectsPacked, &memoryObjectsPackedParam);
5649         paramBuffer.addParam(std::move(memoryObjectsPackedParam));
5650     }
5651     else
5652     {
5653         ParamCapture memoryObjectsPackedParam("memoryObjectsPacked",
5654                                               ParamType::TMemoryObjectIDConstPointer);
5655         InitParamValue(ParamType::TMemoryObjectIDConstPointer,
5656                        static_cast<const MemoryObjectID *>(nullptr),
5657                        &memoryObjectsPackedParam.value);
5658         paramBuffer.addParam(std::move(memoryObjectsPackedParam));
5659     }
5660 
5661     return CallCapture(angle::EntryPoint::GLDeleteMemoryObjectsEXT, std::move(paramBuffer));
5662 }
5663 
CaptureGetMemoryObjectParameterivEXT(const State & glState,bool isCallValid,MemoryObjectID memoryObjectPacked,GLenum pname,GLint * params)5664 CallCapture CaptureGetMemoryObjectParameterivEXT(const State &glState,
5665                                                  bool isCallValid,
5666                                                  MemoryObjectID memoryObjectPacked,
5667                                                  GLenum pname,
5668                                                  GLint *params)
5669 {
5670     ParamBuffer paramBuffer;
5671 
5672     paramBuffer.addValueParam("memoryObjectPacked", ParamType::TMemoryObjectID, memoryObjectPacked);
5673     paramBuffer.addEnumParam("pname", GLenumGroup::MemoryObjectParameterName, ParamType::TGLenum,
5674                              pname);
5675 
5676     if (isCallValid)
5677     {
5678         ParamCapture paramsParam("params", ParamType::TGLintPointer);
5679         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
5680         CaptureGetMemoryObjectParameterivEXT_params(glState, isCallValid, memoryObjectPacked, pname,
5681                                                     params, &paramsParam);
5682         paramBuffer.addParam(std::move(paramsParam));
5683     }
5684     else
5685     {
5686         ParamCapture paramsParam("params", ParamType::TGLintPointer);
5687         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
5688         paramBuffer.addParam(std::move(paramsParam));
5689     }
5690 
5691     return CallCapture(angle::EntryPoint::GLGetMemoryObjectParameterivEXT, std::move(paramBuffer));
5692 }
5693 
CaptureGetUnsignedBytevEXT(const State & glState,bool isCallValid,GLenum pname,GLubyte * data)5694 CallCapture CaptureGetUnsignedBytevEXT(const State &glState,
5695                                        bool isCallValid,
5696                                        GLenum pname,
5697                                        GLubyte *data)
5698 {
5699     ParamBuffer paramBuffer;
5700 
5701     paramBuffer.addEnumParam("pname", GLenumGroup::GetPName, ParamType::TGLenum, pname);
5702 
5703     if (isCallValid)
5704     {
5705         ParamCapture dataParam("data", ParamType::TGLubytePointer);
5706         InitParamValue(ParamType::TGLubytePointer, data, &dataParam.value);
5707         CaptureGetUnsignedBytevEXT_data(glState, isCallValid, pname, data, &dataParam);
5708         paramBuffer.addParam(std::move(dataParam));
5709     }
5710     else
5711     {
5712         ParamCapture dataParam("data", ParamType::TGLubytePointer);
5713         InitParamValue(ParamType::TGLubytePointer, static_cast<GLubyte *>(nullptr),
5714                        &dataParam.value);
5715         paramBuffer.addParam(std::move(dataParam));
5716     }
5717 
5718     return CallCapture(angle::EntryPoint::GLGetUnsignedBytevEXT, std::move(paramBuffer));
5719 }
5720 
CaptureGetUnsignedBytei_vEXT(const State & glState,bool isCallValid,GLenum target,GLuint index,GLubyte * data)5721 CallCapture CaptureGetUnsignedBytei_vEXT(const State &glState,
5722                                          bool isCallValid,
5723                                          GLenum target,
5724                                          GLuint index,
5725                                          GLubyte *data)
5726 {
5727     ParamBuffer paramBuffer;
5728 
5729     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
5730     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5731 
5732     if (isCallValid)
5733     {
5734         ParamCapture dataParam("data", ParamType::TGLubytePointer);
5735         InitParamValue(ParamType::TGLubytePointer, data, &dataParam.value);
5736         CaptureGetUnsignedBytei_vEXT_data(glState, isCallValid, target, index, data, &dataParam);
5737         paramBuffer.addParam(std::move(dataParam));
5738     }
5739     else
5740     {
5741         ParamCapture dataParam("data", ParamType::TGLubytePointer);
5742         InitParamValue(ParamType::TGLubytePointer, static_cast<GLubyte *>(nullptr),
5743                        &dataParam.value);
5744         paramBuffer.addParam(std::move(dataParam));
5745     }
5746 
5747     return CallCapture(angle::EntryPoint::GLGetUnsignedBytei_vEXT, std::move(paramBuffer));
5748 }
5749 
CaptureIsMemoryObjectEXT(const State & glState,bool isCallValid,MemoryObjectID memoryObjectPacked,GLboolean returnValue)5750 CallCapture CaptureIsMemoryObjectEXT(const State &glState,
5751                                      bool isCallValid,
5752                                      MemoryObjectID memoryObjectPacked,
5753                                      GLboolean returnValue)
5754 {
5755     ParamBuffer paramBuffer;
5756 
5757     paramBuffer.addValueParam("memoryObjectPacked", ParamType::TMemoryObjectID, memoryObjectPacked);
5758 
5759     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
5760     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
5761     paramBuffer.addReturnValue(std::move(returnValueCapture));
5762 
5763     return CallCapture(angle::EntryPoint::GLIsMemoryObjectEXT, std::move(paramBuffer));
5764 }
5765 
CaptureMemoryObjectParameterivEXT(const State & glState,bool isCallValid,MemoryObjectID memoryObjectPacked,GLenum pname,const GLint * params)5766 CallCapture CaptureMemoryObjectParameterivEXT(const State &glState,
5767                                               bool isCallValid,
5768                                               MemoryObjectID memoryObjectPacked,
5769                                               GLenum pname,
5770                                               const GLint *params)
5771 {
5772     ParamBuffer paramBuffer;
5773 
5774     paramBuffer.addValueParam("memoryObjectPacked", ParamType::TMemoryObjectID, memoryObjectPacked);
5775     paramBuffer.addEnumParam("pname", GLenumGroup::MemoryObjectParameterName, ParamType::TGLenum,
5776                              pname);
5777 
5778     if (isCallValid)
5779     {
5780         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
5781         InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
5782         CaptureMemoryObjectParameterivEXT_params(glState, isCallValid, memoryObjectPacked, pname,
5783                                                  params, &paramsParam);
5784         paramBuffer.addParam(std::move(paramsParam));
5785     }
5786     else
5787     {
5788         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
5789         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
5790                        &paramsParam.value);
5791         paramBuffer.addParam(std::move(paramsParam));
5792     }
5793 
5794     return CallCapture(angle::EntryPoint::GLMemoryObjectParameterivEXT, std::move(paramBuffer));
5795 }
5796 
CaptureTexStorageMem2DEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalFormat,GLsizei width,GLsizei height,MemoryObjectID memoryPacked,GLuint64 offset)5797 CallCapture CaptureTexStorageMem2DEXT(const State &glState,
5798                                       bool isCallValid,
5799                                       TextureType targetPacked,
5800                                       GLsizei levels,
5801                                       GLenum internalFormat,
5802                                       GLsizei width,
5803                                       GLsizei height,
5804                                       MemoryObjectID memoryPacked,
5805                                       GLuint64 offset)
5806 {
5807     ParamBuffer paramBuffer;
5808 
5809     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
5810     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
5811     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
5812                              internalFormat);
5813     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5814     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5815     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
5816     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
5817 
5818     return CallCapture(angle::EntryPoint::GLTexStorageMem2DEXT, std::move(paramBuffer));
5819 }
5820 
CaptureTexStorageMem2DMultisampleEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalFormat,GLsizei width,GLsizei height,GLboolean fixedSampleLocations,MemoryObjectID memoryPacked,GLuint64 offset)5821 CallCapture CaptureTexStorageMem2DMultisampleEXT(const State &glState,
5822                                                  bool isCallValid,
5823                                                  TextureType targetPacked,
5824                                                  GLsizei samples,
5825                                                  GLenum internalFormat,
5826                                                  GLsizei width,
5827                                                  GLsizei height,
5828                                                  GLboolean fixedSampleLocations,
5829                                                  MemoryObjectID memoryPacked,
5830                                                  GLuint64 offset)
5831 {
5832     ParamBuffer paramBuffer;
5833 
5834     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
5835     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
5836     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
5837                              internalFormat);
5838     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5839     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5840     paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
5841     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
5842     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
5843 
5844     return CallCapture(angle::EntryPoint::GLTexStorageMem2DMultisampleEXT, std::move(paramBuffer));
5845 }
5846 
CaptureTexStorageMem3DEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalFormat,GLsizei width,GLsizei height,GLsizei depth,MemoryObjectID memoryPacked,GLuint64 offset)5847 CallCapture CaptureTexStorageMem3DEXT(const State &glState,
5848                                       bool isCallValid,
5849                                       TextureType targetPacked,
5850                                       GLsizei levels,
5851                                       GLenum internalFormat,
5852                                       GLsizei width,
5853                                       GLsizei height,
5854                                       GLsizei depth,
5855                                       MemoryObjectID memoryPacked,
5856                                       GLuint64 offset)
5857 {
5858     ParamBuffer paramBuffer;
5859 
5860     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
5861     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
5862     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
5863                              internalFormat);
5864     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5865     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5866     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
5867     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
5868     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
5869 
5870     return CallCapture(angle::EntryPoint::GLTexStorageMem3DEXT, std::move(paramBuffer));
5871 }
5872 
CaptureTexStorageMem3DMultisampleEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalFormat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedSampleLocations,MemoryObjectID memoryPacked,GLuint64 offset)5873 CallCapture CaptureTexStorageMem3DMultisampleEXT(const State &glState,
5874                                                  bool isCallValid,
5875                                                  TextureType targetPacked,
5876                                                  GLsizei samples,
5877                                                  GLenum internalFormat,
5878                                                  GLsizei width,
5879                                                  GLsizei height,
5880                                                  GLsizei depth,
5881                                                  GLboolean fixedSampleLocations,
5882                                                  MemoryObjectID memoryPacked,
5883                                                  GLuint64 offset)
5884 {
5885     ParamBuffer paramBuffer;
5886 
5887     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
5888     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
5889     paramBuffer.addEnumParam("internalFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
5890                              internalFormat);
5891     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5892     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5893     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
5894     paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
5895     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
5896     paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
5897 
5898     return CallCapture(angle::EntryPoint::GLTexStorageMem3DMultisampleEXT, std::move(paramBuffer));
5899 }
5900 
CaptureImportMemoryFdEXT(const State & glState,bool isCallValid,MemoryObjectID memoryPacked,GLuint64 size,HandleType handleTypePacked,GLint fd)5901 CallCapture CaptureImportMemoryFdEXT(const State &glState,
5902                                      bool isCallValid,
5903                                      MemoryObjectID memoryPacked,
5904                                      GLuint64 size,
5905                                      HandleType handleTypePacked,
5906                                      GLint fd)
5907 {
5908     ParamBuffer paramBuffer;
5909 
5910     paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
5911     paramBuffer.addValueParam("size", ParamType::TGLuint64, size);
5912     paramBuffer.addValueParam("handleTypePacked", ParamType::THandleType, handleTypePacked);
5913     paramBuffer.addValueParam("fd", ParamType::TGLint, fd);
5914 
5915     return CallCapture(angle::EntryPoint::GLImportMemoryFdEXT, std::move(paramBuffer));
5916 }
5917 
CaptureFramebufferTexture2DMultisampleEXT(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureTarget textargetPacked,TextureID texturePacked,GLint level,GLsizei samples)5918 CallCapture CaptureFramebufferTexture2DMultisampleEXT(const State &glState,
5919                                                       bool isCallValid,
5920                                                       GLenum target,
5921                                                       GLenum attachment,
5922                                                       TextureTarget textargetPacked,
5923                                                       TextureID texturePacked,
5924                                                       GLint level,
5925                                                       GLsizei samples)
5926 {
5927     ParamBuffer paramBuffer;
5928 
5929     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
5930     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
5931                              attachment);
5932     paramBuffer.addValueParam("textargetPacked", ParamType::TTextureTarget, textargetPacked);
5933     paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5934     paramBuffer.addValueParam("level", ParamType::TGLint, level);
5935     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
5936 
5937     return CallCapture(angle::EntryPoint::GLFramebufferTexture2DMultisampleEXT,
5938                        std::move(paramBuffer));
5939 }
5940 
CaptureRenderbufferStorageMultisampleEXT(const State & glState,bool isCallValid,GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height)5941 CallCapture CaptureRenderbufferStorageMultisampleEXT(const State &glState,
5942                                                      bool isCallValid,
5943                                                      GLenum target,
5944                                                      GLsizei samples,
5945                                                      GLenum internalformat,
5946                                                      GLsizei width,
5947                                                      GLsizei height)
5948 {
5949     ParamBuffer paramBuffer;
5950 
5951     paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
5952     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
5953     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
5954                              internalformat);
5955     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5956     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5957 
5958     return CallCapture(angle::EntryPoint::GLRenderbufferStorageMultisampleEXT,
5959                        std::move(paramBuffer));
5960 }
5961 
CapturePrimitiveBoundingBoxEXT(const State & glState,bool isCallValid,GLfloat minX,GLfloat minY,GLfloat minZ,GLfloat minW,GLfloat maxX,GLfloat maxY,GLfloat maxZ,GLfloat maxW)5962 CallCapture CapturePrimitiveBoundingBoxEXT(const State &glState,
5963                                            bool isCallValid,
5964                                            GLfloat minX,
5965                                            GLfloat minY,
5966                                            GLfloat minZ,
5967                                            GLfloat minW,
5968                                            GLfloat maxX,
5969                                            GLfloat maxY,
5970                                            GLfloat maxZ,
5971                                            GLfloat maxW)
5972 {
5973     ParamBuffer paramBuffer;
5974 
5975     paramBuffer.addValueParam("minX", ParamType::TGLfloat, minX);
5976     paramBuffer.addValueParam("minY", ParamType::TGLfloat, minY);
5977     paramBuffer.addValueParam("minZ", ParamType::TGLfloat, minZ);
5978     paramBuffer.addValueParam("minW", ParamType::TGLfloat, minW);
5979     paramBuffer.addValueParam("maxX", ParamType::TGLfloat, maxX);
5980     paramBuffer.addValueParam("maxY", ParamType::TGLfloat, maxY);
5981     paramBuffer.addValueParam("maxZ", ParamType::TGLfloat, maxZ);
5982     paramBuffer.addValueParam("maxW", ParamType::TGLfloat, maxW);
5983 
5984     return CallCapture(angle::EntryPoint::GLPrimitiveBoundingBoxEXT, std::move(paramBuffer));
5985 }
5986 
CaptureGetGraphicsResetStatusEXT(const State & glState,bool isCallValid,GLenum returnValue)5987 CallCapture CaptureGetGraphicsResetStatusEXT(const State &glState,
5988                                              bool isCallValid,
5989                                              GLenum returnValue)
5990 {
5991     ParamBuffer paramBuffer;
5992 
5993     ParamCapture returnValueCapture("returnValue", ParamType::TGLenum);
5994     InitParamValue(ParamType::TGLenum, returnValue, &returnValueCapture.value);
5995     paramBuffer.addReturnValue(std::move(returnValueCapture));
5996 
5997     return CallCapture(angle::EntryPoint::GLGetGraphicsResetStatusEXT, std::move(paramBuffer));
5998 }
5999 
CaptureGetnUniformfvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLfloat * params)6000 CallCapture CaptureGetnUniformfvEXT(const State &glState,
6001                                     bool isCallValid,
6002                                     ShaderProgramID programPacked,
6003                                     UniformLocation locationPacked,
6004                                     GLsizei bufSize,
6005                                     GLfloat *params)
6006 {
6007     ParamBuffer paramBuffer;
6008 
6009     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6010     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6011     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
6012 
6013     if (isCallValid)
6014     {
6015         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
6016         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
6017         CaptureGetnUniformfvEXT_params(glState, isCallValid, programPacked, locationPacked, bufSize,
6018                                        params, &paramsParam);
6019         paramBuffer.addParam(std::move(paramsParam));
6020     }
6021     else
6022     {
6023         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
6024         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
6025                        &paramsParam.value);
6026         paramBuffer.addParam(std::move(paramsParam));
6027     }
6028 
6029     return CallCapture(angle::EntryPoint::GLGetnUniformfvEXT, std::move(paramBuffer));
6030 }
6031 
CaptureGetnUniformivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLint * params)6032 CallCapture CaptureGetnUniformivEXT(const State &glState,
6033                                     bool isCallValid,
6034                                     ShaderProgramID programPacked,
6035                                     UniformLocation locationPacked,
6036                                     GLsizei bufSize,
6037                                     GLint *params)
6038 {
6039     ParamBuffer paramBuffer;
6040 
6041     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6042     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6043     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
6044 
6045     if (isCallValid)
6046     {
6047         ParamCapture paramsParam("params", ParamType::TGLintPointer);
6048         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
6049         CaptureGetnUniformivEXT_params(glState, isCallValid, programPacked, locationPacked, bufSize,
6050                                        params, &paramsParam);
6051         paramBuffer.addParam(std::move(paramsParam));
6052     }
6053     else
6054     {
6055         ParamCapture paramsParam("params", ParamType::TGLintPointer);
6056         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
6057         paramBuffer.addParam(std::move(paramsParam));
6058     }
6059 
6060     return CallCapture(angle::EntryPoint::GLGetnUniformivEXT, std::move(paramBuffer));
6061 }
6062 
CaptureReadnPixelsEXT(const State & glState,bool isCallValid,GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,void * data)6063 CallCapture CaptureReadnPixelsEXT(const State &glState,
6064                                   bool isCallValid,
6065                                   GLint x,
6066                                   GLint y,
6067                                   GLsizei width,
6068                                   GLsizei height,
6069                                   GLenum format,
6070                                   GLenum type,
6071                                   GLsizei bufSize,
6072                                   void *data)
6073 {
6074     ParamBuffer paramBuffer;
6075 
6076     paramBuffer.addValueParam("x", ParamType::TGLint, x);
6077     paramBuffer.addValueParam("y", ParamType::TGLint, y);
6078     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
6079     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
6080     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
6081     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
6082     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
6083 
6084     if (isCallValid)
6085     {
6086         ParamCapture dataParam("data", ParamType::TvoidPointer);
6087         InitParamValue(ParamType::TvoidPointer, data, &dataParam.value);
6088         CaptureReadnPixelsEXT_data(glState, isCallValid, x, y, width, height, format, type, bufSize,
6089                                    data, &dataParam);
6090         paramBuffer.addParam(std::move(dataParam));
6091     }
6092     else
6093     {
6094         ParamCapture dataParam("data", ParamType::TvoidPointer);
6095         InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &dataParam.value);
6096         paramBuffer.addParam(std::move(dataParam));
6097     }
6098 
6099     return CallCapture(angle::EntryPoint::GLReadnPixelsEXT, std::move(paramBuffer));
6100 }
6101 
CaptureDeleteSemaphoresEXT(const State & glState,bool isCallValid,GLsizei n,const SemaphoreID * semaphoresPacked)6102 CallCapture CaptureDeleteSemaphoresEXT(const State &glState,
6103                                        bool isCallValid,
6104                                        GLsizei n,
6105                                        const SemaphoreID *semaphoresPacked)
6106 {
6107     ParamBuffer paramBuffer;
6108 
6109     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
6110 
6111     if (isCallValid)
6112     {
6113         ParamCapture semaphoresPackedParam("semaphoresPacked", ParamType::TSemaphoreIDConstPointer);
6114         InitParamValue(ParamType::TSemaphoreIDConstPointer, semaphoresPacked,
6115                        &semaphoresPackedParam.value);
6116         CaptureDeleteSemaphoresEXT_semaphoresPacked(glState, isCallValid, n, semaphoresPacked,
6117                                                     &semaphoresPackedParam);
6118         paramBuffer.addParam(std::move(semaphoresPackedParam));
6119     }
6120     else
6121     {
6122         ParamCapture semaphoresPackedParam("semaphoresPacked", ParamType::TSemaphoreIDConstPointer);
6123         InitParamValue(ParamType::TSemaphoreIDConstPointer,
6124                        static_cast<const SemaphoreID *>(nullptr), &semaphoresPackedParam.value);
6125         paramBuffer.addParam(std::move(semaphoresPackedParam));
6126     }
6127 
6128     return CallCapture(angle::EntryPoint::GLDeleteSemaphoresEXT, std::move(paramBuffer));
6129 }
6130 
CaptureGenSemaphoresEXT(const State & glState,bool isCallValid,GLsizei n,SemaphoreID * semaphoresPacked)6131 CallCapture CaptureGenSemaphoresEXT(const State &glState,
6132                                     bool isCallValid,
6133                                     GLsizei n,
6134                                     SemaphoreID *semaphoresPacked)
6135 {
6136     ParamBuffer paramBuffer;
6137 
6138     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
6139 
6140     if (isCallValid)
6141     {
6142         ParamCapture semaphoresPackedParam("semaphoresPacked", ParamType::TSemaphoreIDPointer);
6143         InitParamValue(ParamType::TSemaphoreIDPointer, semaphoresPacked,
6144                        &semaphoresPackedParam.value);
6145         CaptureGenSemaphoresEXT_semaphoresPacked(glState, isCallValid, n, semaphoresPacked,
6146                                                  &semaphoresPackedParam);
6147         paramBuffer.addParam(std::move(semaphoresPackedParam));
6148     }
6149     else
6150     {
6151         ParamCapture semaphoresPackedParam("semaphoresPacked", ParamType::TSemaphoreIDPointer);
6152         InitParamValue(ParamType::TSemaphoreIDPointer, static_cast<SemaphoreID *>(nullptr),
6153                        &semaphoresPackedParam.value);
6154         paramBuffer.addParam(std::move(semaphoresPackedParam));
6155     }
6156 
6157     return CallCapture(angle::EntryPoint::GLGenSemaphoresEXT, std::move(paramBuffer));
6158 }
6159 
CaptureGetSemaphoreParameterui64vEXT(const State & glState,bool isCallValid,SemaphoreID semaphorePacked,GLenum pname,GLuint64 * params)6160 CallCapture CaptureGetSemaphoreParameterui64vEXT(const State &glState,
6161                                                  bool isCallValid,
6162                                                  SemaphoreID semaphorePacked,
6163                                                  GLenum pname,
6164                                                  GLuint64 *params)
6165 {
6166     ParamBuffer paramBuffer;
6167 
6168     paramBuffer.addValueParam("semaphorePacked", ParamType::TSemaphoreID, semaphorePacked);
6169     paramBuffer.addEnumParam("pname", GLenumGroup::SemaphoreParameterName, ParamType::TGLenum,
6170                              pname);
6171 
6172     if (isCallValid)
6173     {
6174         ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
6175         InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
6176         CaptureGetSemaphoreParameterui64vEXT_params(glState, isCallValid, semaphorePacked, pname,
6177                                                     params, &paramsParam);
6178         paramBuffer.addParam(std::move(paramsParam));
6179     }
6180     else
6181     {
6182         ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
6183         InitParamValue(ParamType::TGLuint64Pointer, static_cast<GLuint64 *>(nullptr),
6184                        &paramsParam.value);
6185         paramBuffer.addParam(std::move(paramsParam));
6186     }
6187 
6188     return CallCapture(angle::EntryPoint::GLGetSemaphoreParameterui64vEXT, std::move(paramBuffer));
6189 }
6190 
CaptureIsSemaphoreEXT(const State & glState,bool isCallValid,SemaphoreID semaphorePacked,GLboolean returnValue)6191 CallCapture CaptureIsSemaphoreEXT(const State &glState,
6192                                   bool isCallValid,
6193                                   SemaphoreID semaphorePacked,
6194                                   GLboolean returnValue)
6195 {
6196     ParamBuffer paramBuffer;
6197 
6198     paramBuffer.addValueParam("semaphorePacked", ParamType::TSemaphoreID, semaphorePacked);
6199 
6200     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
6201     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
6202     paramBuffer.addReturnValue(std::move(returnValueCapture));
6203 
6204     return CallCapture(angle::EntryPoint::GLIsSemaphoreEXT, std::move(paramBuffer));
6205 }
6206 
CaptureSemaphoreParameterui64vEXT(const State & glState,bool isCallValid,SemaphoreID semaphorePacked,GLenum pname,const GLuint64 * params)6207 CallCapture CaptureSemaphoreParameterui64vEXT(const State &glState,
6208                                               bool isCallValid,
6209                                               SemaphoreID semaphorePacked,
6210                                               GLenum pname,
6211                                               const GLuint64 *params)
6212 {
6213     ParamBuffer paramBuffer;
6214 
6215     paramBuffer.addValueParam("semaphorePacked", ParamType::TSemaphoreID, semaphorePacked);
6216     paramBuffer.addEnumParam("pname", GLenumGroup::SemaphoreParameterName, ParamType::TGLenum,
6217                              pname);
6218 
6219     if (isCallValid)
6220     {
6221         ParamCapture paramsParam("params", ParamType::TGLuint64ConstPointer);
6222         InitParamValue(ParamType::TGLuint64ConstPointer, params, &paramsParam.value);
6223         CaptureSemaphoreParameterui64vEXT_params(glState, isCallValid, semaphorePacked, pname,
6224                                                  params, &paramsParam);
6225         paramBuffer.addParam(std::move(paramsParam));
6226     }
6227     else
6228     {
6229         ParamCapture paramsParam("params", ParamType::TGLuint64ConstPointer);
6230         InitParamValue(ParamType::TGLuint64ConstPointer, static_cast<const GLuint64 *>(nullptr),
6231                        &paramsParam.value);
6232         paramBuffer.addParam(std::move(paramsParam));
6233     }
6234 
6235     return CallCapture(angle::EntryPoint::GLSemaphoreParameterui64vEXT, std::move(paramBuffer));
6236 }
6237 
CaptureSignalSemaphoreEXT(const State & glState,bool isCallValid,SemaphoreID semaphorePacked,GLuint numBufferBarriers,const BufferID * buffersPacked,GLuint numTextureBarriers,const TextureID * texturesPacked,const GLenum * dstLayouts)6238 CallCapture CaptureSignalSemaphoreEXT(const State &glState,
6239                                       bool isCallValid,
6240                                       SemaphoreID semaphorePacked,
6241                                       GLuint numBufferBarriers,
6242                                       const BufferID *buffersPacked,
6243                                       GLuint numTextureBarriers,
6244                                       const TextureID *texturesPacked,
6245                                       const GLenum *dstLayouts)
6246 {
6247     ParamBuffer paramBuffer;
6248 
6249     paramBuffer.addValueParam("semaphorePacked", ParamType::TSemaphoreID, semaphorePacked);
6250     paramBuffer.addValueParam("numBufferBarriers", ParamType::TGLuint, numBufferBarriers);
6251 
6252     if (isCallValid)
6253     {
6254         ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
6255         InitParamValue(ParamType::TBufferIDConstPointer, buffersPacked, &buffersPackedParam.value);
6256         CaptureSignalSemaphoreEXT_buffersPacked(
6257             glState, isCallValid, semaphorePacked, numBufferBarriers, buffersPacked,
6258             numTextureBarriers, texturesPacked, dstLayouts, &buffersPackedParam);
6259         paramBuffer.addParam(std::move(buffersPackedParam));
6260     }
6261     else
6262     {
6263         ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
6264         InitParamValue(ParamType::TBufferIDConstPointer, static_cast<const BufferID *>(nullptr),
6265                        &buffersPackedParam.value);
6266         paramBuffer.addParam(std::move(buffersPackedParam));
6267     }
6268 
6269     paramBuffer.addValueParam("numTextureBarriers", ParamType::TGLuint, numTextureBarriers);
6270 
6271     if (isCallValid)
6272     {
6273         ParamCapture texturesPackedParam("texturesPacked", ParamType::TTextureIDConstPointer);
6274         InitParamValue(ParamType::TTextureIDConstPointer, texturesPacked,
6275                        &texturesPackedParam.value);
6276         CaptureSignalSemaphoreEXT_texturesPacked(
6277             glState, isCallValid, semaphorePacked, numBufferBarriers, buffersPacked,
6278             numTextureBarriers, texturesPacked, dstLayouts, &texturesPackedParam);
6279         paramBuffer.addParam(std::move(texturesPackedParam));
6280     }
6281     else
6282     {
6283         ParamCapture texturesPackedParam("texturesPacked", ParamType::TTextureIDConstPointer);
6284         InitParamValue(ParamType::TTextureIDConstPointer, static_cast<const TextureID *>(nullptr),
6285                        &texturesPackedParam.value);
6286         paramBuffer.addParam(std::move(texturesPackedParam));
6287     }
6288 
6289     if (isCallValid)
6290     {
6291         ParamCapture dstLayoutsParam("dstLayouts", ParamType::TGLenumConstPointer);
6292         InitParamValue(ParamType::TGLenumConstPointer, dstLayouts, &dstLayoutsParam.value);
6293         CaptureSignalSemaphoreEXT_dstLayouts(glState, isCallValid, semaphorePacked,
6294                                              numBufferBarriers, buffersPacked, numTextureBarriers,
6295                                              texturesPacked, dstLayouts, &dstLayoutsParam);
6296         paramBuffer.addParam(std::move(dstLayoutsParam));
6297     }
6298     else
6299     {
6300         ParamCapture dstLayoutsParam("dstLayouts", ParamType::TGLenumConstPointer);
6301         InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
6302                        &dstLayoutsParam.value);
6303         paramBuffer.addParam(std::move(dstLayoutsParam));
6304     }
6305 
6306     return CallCapture(angle::EntryPoint::GLSignalSemaphoreEXT, std::move(paramBuffer));
6307 }
6308 
CaptureWaitSemaphoreEXT(const State & glState,bool isCallValid,SemaphoreID semaphorePacked,GLuint numBufferBarriers,const BufferID * buffersPacked,GLuint numTextureBarriers,const TextureID * texturesPacked,const GLenum * srcLayouts)6309 CallCapture CaptureWaitSemaphoreEXT(const State &glState,
6310                                     bool isCallValid,
6311                                     SemaphoreID semaphorePacked,
6312                                     GLuint numBufferBarriers,
6313                                     const BufferID *buffersPacked,
6314                                     GLuint numTextureBarriers,
6315                                     const TextureID *texturesPacked,
6316                                     const GLenum *srcLayouts)
6317 {
6318     ParamBuffer paramBuffer;
6319 
6320     paramBuffer.addValueParam("semaphorePacked", ParamType::TSemaphoreID, semaphorePacked);
6321     paramBuffer.addValueParam("numBufferBarriers", ParamType::TGLuint, numBufferBarriers);
6322 
6323     if (isCallValid)
6324     {
6325         ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
6326         InitParamValue(ParamType::TBufferIDConstPointer, buffersPacked, &buffersPackedParam.value);
6327         CaptureWaitSemaphoreEXT_buffersPacked(glState, isCallValid, semaphorePacked,
6328                                               numBufferBarriers, buffersPacked, numTextureBarriers,
6329                                               texturesPacked, srcLayouts, &buffersPackedParam);
6330         paramBuffer.addParam(std::move(buffersPackedParam));
6331     }
6332     else
6333     {
6334         ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
6335         InitParamValue(ParamType::TBufferIDConstPointer, static_cast<const BufferID *>(nullptr),
6336                        &buffersPackedParam.value);
6337         paramBuffer.addParam(std::move(buffersPackedParam));
6338     }
6339 
6340     paramBuffer.addValueParam("numTextureBarriers", ParamType::TGLuint, numTextureBarriers);
6341 
6342     if (isCallValid)
6343     {
6344         ParamCapture texturesPackedParam("texturesPacked", ParamType::TTextureIDConstPointer);
6345         InitParamValue(ParamType::TTextureIDConstPointer, texturesPacked,
6346                        &texturesPackedParam.value);
6347         CaptureWaitSemaphoreEXT_texturesPacked(glState, isCallValid, semaphorePacked,
6348                                                numBufferBarriers, buffersPacked, numTextureBarriers,
6349                                                texturesPacked, srcLayouts, &texturesPackedParam);
6350         paramBuffer.addParam(std::move(texturesPackedParam));
6351     }
6352     else
6353     {
6354         ParamCapture texturesPackedParam("texturesPacked", ParamType::TTextureIDConstPointer);
6355         InitParamValue(ParamType::TTextureIDConstPointer, static_cast<const TextureID *>(nullptr),
6356                        &texturesPackedParam.value);
6357         paramBuffer.addParam(std::move(texturesPackedParam));
6358     }
6359 
6360     if (isCallValid)
6361     {
6362         ParamCapture srcLayoutsParam("srcLayouts", ParamType::TGLenumConstPointer);
6363         InitParamValue(ParamType::TGLenumConstPointer, srcLayouts, &srcLayoutsParam.value);
6364         CaptureWaitSemaphoreEXT_srcLayouts(glState, isCallValid, semaphorePacked, numBufferBarriers,
6365                                            buffersPacked, numTextureBarriers, texturesPacked,
6366                                            srcLayouts, &srcLayoutsParam);
6367         paramBuffer.addParam(std::move(srcLayoutsParam));
6368     }
6369     else
6370     {
6371         ParamCapture srcLayoutsParam("srcLayouts", ParamType::TGLenumConstPointer);
6372         InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
6373                        &srcLayoutsParam.value);
6374         paramBuffer.addParam(std::move(srcLayoutsParam));
6375     }
6376 
6377     return CallCapture(angle::EntryPoint::GLWaitSemaphoreEXT, std::move(paramBuffer));
6378 }
6379 
CaptureImportSemaphoreFdEXT(const State & glState,bool isCallValid,SemaphoreID semaphorePacked,HandleType handleTypePacked,GLint fd)6380 CallCapture CaptureImportSemaphoreFdEXT(const State &glState,
6381                                         bool isCallValid,
6382                                         SemaphoreID semaphorePacked,
6383                                         HandleType handleTypePacked,
6384                                         GLint fd)
6385 {
6386     ParamBuffer paramBuffer;
6387 
6388     paramBuffer.addValueParam("semaphorePacked", ParamType::TSemaphoreID, semaphorePacked);
6389     paramBuffer.addValueParam("handleTypePacked", ParamType::THandleType, handleTypePacked);
6390     paramBuffer.addValueParam("fd", ParamType::TGLint, fd);
6391 
6392     return CallCapture(angle::EntryPoint::GLImportSemaphoreFdEXT, std::move(paramBuffer));
6393 }
6394 
CaptureActiveShaderProgramEXT(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,ShaderProgramID programPacked)6395 CallCapture CaptureActiveShaderProgramEXT(const State &glState,
6396                                           bool isCallValid,
6397                                           ProgramPipelineID pipelinePacked,
6398                                           ShaderProgramID programPacked)
6399 {
6400     ParamBuffer paramBuffer;
6401 
6402     paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
6403     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6404 
6405     return CallCapture(angle::EntryPoint::GLActiveShaderProgramEXT, std::move(paramBuffer));
6406 }
6407 
CaptureBindProgramPipelineEXT(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked)6408 CallCapture CaptureBindProgramPipelineEXT(const State &glState,
6409                                           bool isCallValid,
6410                                           ProgramPipelineID pipelinePacked)
6411 {
6412     ParamBuffer paramBuffer;
6413 
6414     paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
6415 
6416     return CallCapture(angle::EntryPoint::GLBindProgramPipelineEXT, std::move(paramBuffer));
6417 }
6418 
CaptureCreateShaderProgramvEXT(const State & glState,bool isCallValid,ShaderType typePacked,GLsizei count,const GLchar ** strings,GLuint returnValue)6419 CallCapture CaptureCreateShaderProgramvEXT(const State &glState,
6420                                            bool isCallValid,
6421                                            ShaderType typePacked,
6422                                            GLsizei count,
6423                                            const GLchar **strings,
6424                                            GLuint returnValue)
6425 {
6426     ParamBuffer paramBuffer;
6427 
6428     paramBuffer.addValueParam("typePacked", ParamType::TShaderType, typePacked);
6429     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6430 
6431     if (isCallValid)
6432     {
6433         ParamCapture stringsParam("strings", ParamType::TGLcharConstPointerPointer);
6434         InitParamValue(ParamType::TGLcharConstPointerPointer, strings, &stringsParam.value);
6435         CaptureCreateShaderProgramvEXT_strings(glState, isCallValid, typePacked, count, strings,
6436                                                &stringsParam);
6437         paramBuffer.addParam(std::move(stringsParam));
6438     }
6439     else
6440     {
6441         ParamCapture stringsParam("strings", ParamType::TGLcharConstPointerPointer);
6442         InitParamValue(ParamType::TGLcharConstPointerPointer, static_cast<const GLchar **>(nullptr),
6443                        &stringsParam.value);
6444         paramBuffer.addParam(std::move(stringsParam));
6445     }
6446 
6447     ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
6448     InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
6449     paramBuffer.addReturnValue(std::move(returnValueCapture));
6450 
6451     return CallCapture(angle::EntryPoint::GLCreateShaderProgramvEXT, std::move(paramBuffer));
6452 }
6453 
CaptureDeleteProgramPipelinesEXT(const State & glState,bool isCallValid,GLsizei n,const ProgramPipelineID * pipelinesPacked)6454 CallCapture CaptureDeleteProgramPipelinesEXT(const State &glState,
6455                                              bool isCallValid,
6456                                              GLsizei n,
6457                                              const ProgramPipelineID *pipelinesPacked)
6458 {
6459     ParamBuffer paramBuffer;
6460 
6461     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
6462 
6463     if (isCallValid)
6464     {
6465         ParamCapture pipelinesPackedParam("pipelinesPacked",
6466                                           ParamType::TProgramPipelineIDConstPointer);
6467         InitParamValue(ParamType::TProgramPipelineIDConstPointer, pipelinesPacked,
6468                        &pipelinesPackedParam.value);
6469         CaptureDeleteProgramPipelinesEXT_pipelinesPacked(glState, isCallValid, n, pipelinesPacked,
6470                                                          &pipelinesPackedParam);
6471         paramBuffer.addParam(std::move(pipelinesPackedParam));
6472     }
6473     else
6474     {
6475         ParamCapture pipelinesPackedParam("pipelinesPacked",
6476                                           ParamType::TProgramPipelineIDConstPointer);
6477         InitParamValue(ParamType::TProgramPipelineIDConstPointer,
6478                        static_cast<const ProgramPipelineID *>(nullptr),
6479                        &pipelinesPackedParam.value);
6480         paramBuffer.addParam(std::move(pipelinesPackedParam));
6481     }
6482 
6483     return CallCapture(angle::EntryPoint::GLDeleteProgramPipelinesEXT, std::move(paramBuffer));
6484 }
6485 
CaptureGenProgramPipelinesEXT(const State & glState,bool isCallValid,GLsizei n,ProgramPipelineID * pipelinesPacked)6486 CallCapture CaptureGenProgramPipelinesEXT(const State &glState,
6487                                           bool isCallValid,
6488                                           GLsizei n,
6489                                           ProgramPipelineID *pipelinesPacked)
6490 {
6491     ParamBuffer paramBuffer;
6492 
6493     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
6494 
6495     if (isCallValid)
6496     {
6497         ParamCapture pipelinesPackedParam("pipelinesPacked", ParamType::TProgramPipelineIDPointer);
6498         InitParamValue(ParamType::TProgramPipelineIDPointer, pipelinesPacked,
6499                        &pipelinesPackedParam.value);
6500         CaptureGenProgramPipelinesEXT_pipelinesPacked(glState, isCallValid, n, pipelinesPacked,
6501                                                       &pipelinesPackedParam);
6502         paramBuffer.addParam(std::move(pipelinesPackedParam));
6503     }
6504     else
6505     {
6506         ParamCapture pipelinesPackedParam("pipelinesPacked", ParamType::TProgramPipelineIDPointer);
6507         InitParamValue(ParamType::TProgramPipelineIDPointer,
6508                        static_cast<ProgramPipelineID *>(nullptr), &pipelinesPackedParam.value);
6509         paramBuffer.addParam(std::move(pipelinesPackedParam));
6510     }
6511 
6512     return CallCapture(angle::EntryPoint::GLGenProgramPipelinesEXT, std::move(paramBuffer));
6513 }
6514 
CaptureGetProgramPipelineInfoLogEXT(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLsizei bufSize,GLsizei * length,GLchar * infoLog)6515 CallCapture CaptureGetProgramPipelineInfoLogEXT(const State &glState,
6516                                                 bool isCallValid,
6517                                                 ProgramPipelineID pipelinePacked,
6518                                                 GLsizei bufSize,
6519                                                 GLsizei *length,
6520                                                 GLchar *infoLog)
6521 {
6522     ParamBuffer paramBuffer;
6523 
6524     paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
6525     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
6526 
6527     if (isCallValid)
6528     {
6529         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
6530         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
6531         CaptureGetProgramPipelineInfoLogEXT_length(glState, isCallValid, pipelinePacked, bufSize,
6532                                                    length, infoLog, &lengthParam);
6533         paramBuffer.addParam(std::move(lengthParam));
6534     }
6535     else
6536     {
6537         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
6538         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
6539                        &lengthParam.value);
6540         paramBuffer.addParam(std::move(lengthParam));
6541     }
6542 
6543     if (isCallValid)
6544     {
6545         ParamCapture infoLogParam("infoLog", ParamType::TGLcharPointer);
6546         InitParamValue(ParamType::TGLcharPointer, infoLog, &infoLogParam.value);
6547         CaptureGetProgramPipelineInfoLogEXT_infoLog(glState, isCallValid, pipelinePacked, bufSize,
6548                                                     length, infoLog, &infoLogParam);
6549         paramBuffer.addParam(std::move(infoLogParam));
6550     }
6551     else
6552     {
6553         ParamCapture infoLogParam("infoLog", ParamType::TGLcharPointer);
6554         InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
6555                        &infoLogParam.value);
6556         paramBuffer.addParam(std::move(infoLogParam));
6557     }
6558 
6559     return CallCapture(angle::EntryPoint::GLGetProgramPipelineInfoLogEXT, std::move(paramBuffer));
6560 }
6561 
CaptureGetProgramPipelineivEXT(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLenum pname,GLint * params)6562 CallCapture CaptureGetProgramPipelineivEXT(const State &glState,
6563                                            bool isCallValid,
6564                                            ProgramPipelineID pipelinePacked,
6565                                            GLenum pname,
6566                                            GLint *params)
6567 {
6568     ParamBuffer paramBuffer;
6569 
6570     paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
6571     paramBuffer.addEnumParam("pname", GLenumGroup::PipelineParameterName, ParamType::TGLenum,
6572                              pname);
6573 
6574     if (isCallValid)
6575     {
6576         ParamCapture paramsParam("params", ParamType::TGLintPointer);
6577         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
6578         CaptureGetProgramPipelineivEXT_params(glState, isCallValid, pipelinePacked, pname, params,
6579                                               &paramsParam);
6580         paramBuffer.addParam(std::move(paramsParam));
6581     }
6582     else
6583     {
6584         ParamCapture paramsParam("params", ParamType::TGLintPointer);
6585         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
6586         paramBuffer.addParam(std::move(paramsParam));
6587     }
6588 
6589     return CallCapture(angle::EntryPoint::GLGetProgramPipelineivEXT, std::move(paramBuffer));
6590 }
6591 
CaptureIsProgramPipelineEXT(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLboolean returnValue)6592 CallCapture CaptureIsProgramPipelineEXT(const State &glState,
6593                                         bool isCallValid,
6594                                         ProgramPipelineID pipelinePacked,
6595                                         GLboolean returnValue)
6596 {
6597     ParamBuffer paramBuffer;
6598 
6599     paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
6600 
6601     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
6602     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
6603     paramBuffer.addReturnValue(std::move(returnValueCapture));
6604 
6605     return CallCapture(angle::EntryPoint::GLIsProgramPipelineEXT, std::move(paramBuffer));
6606 }
6607 
CaptureProgramParameteriEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum pname,GLint value)6608 CallCapture CaptureProgramParameteriEXT(const State &glState,
6609                                         bool isCallValid,
6610                                         ShaderProgramID programPacked,
6611                                         GLenum pname,
6612                                         GLint value)
6613 {
6614     ParamBuffer paramBuffer;
6615 
6616     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6617     paramBuffer.addEnumParam("pname", GLenumGroup::ProgramParameterPName, ParamType::TGLenum,
6618                              pname);
6619     paramBuffer.addValueParam("value", ParamType::TGLint, value);
6620 
6621     return CallCapture(angle::EntryPoint::GLProgramParameteriEXT, std::move(paramBuffer));
6622 }
6623 
CaptureProgramUniform1fEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0)6624 CallCapture CaptureProgramUniform1fEXT(const State &glState,
6625                                        bool isCallValid,
6626                                        ShaderProgramID programPacked,
6627                                        UniformLocation locationPacked,
6628                                        GLfloat v0)
6629 {
6630     ParamBuffer paramBuffer;
6631 
6632     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6633     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6634     paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
6635 
6636     return CallCapture(angle::EntryPoint::GLProgramUniform1fEXT, std::move(paramBuffer));
6637 }
6638 
CaptureProgramUniform1fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)6639 CallCapture CaptureProgramUniform1fvEXT(const State &glState,
6640                                         bool isCallValid,
6641                                         ShaderProgramID programPacked,
6642                                         UniformLocation locationPacked,
6643                                         GLsizei count,
6644                                         const GLfloat *value)
6645 {
6646     ParamBuffer paramBuffer;
6647 
6648     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6649     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6650     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6651 
6652     if (isCallValid)
6653     {
6654         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
6655         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
6656         CaptureProgramUniform1fvEXT_value(glState, isCallValid, programPacked, locationPacked,
6657                                           count, value, &valueParam);
6658         paramBuffer.addParam(std::move(valueParam));
6659     }
6660     else
6661     {
6662         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
6663         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
6664                        &valueParam.value);
6665         paramBuffer.addParam(std::move(valueParam));
6666     }
6667 
6668     return CallCapture(angle::EntryPoint::GLProgramUniform1fvEXT, std::move(paramBuffer));
6669 }
6670 
CaptureProgramUniform1iEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0)6671 CallCapture CaptureProgramUniform1iEXT(const State &glState,
6672                                        bool isCallValid,
6673                                        ShaderProgramID programPacked,
6674                                        UniformLocation locationPacked,
6675                                        GLint v0)
6676 {
6677     ParamBuffer paramBuffer;
6678 
6679     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6680     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6681     paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
6682 
6683     return CallCapture(angle::EntryPoint::GLProgramUniform1iEXT, std::move(paramBuffer));
6684 }
6685 
CaptureProgramUniform1ivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)6686 CallCapture CaptureProgramUniform1ivEXT(const State &glState,
6687                                         bool isCallValid,
6688                                         ShaderProgramID programPacked,
6689                                         UniformLocation locationPacked,
6690                                         GLsizei count,
6691                                         const GLint *value)
6692 {
6693     ParamBuffer paramBuffer;
6694 
6695     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6696     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6697     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6698 
6699     if (isCallValid)
6700     {
6701         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
6702         InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
6703         CaptureProgramUniform1ivEXT_value(glState, isCallValid, programPacked, locationPacked,
6704                                           count, value, &valueParam);
6705         paramBuffer.addParam(std::move(valueParam));
6706     }
6707     else
6708     {
6709         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
6710         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
6711                        &valueParam.value);
6712         paramBuffer.addParam(std::move(valueParam));
6713     }
6714 
6715     return CallCapture(angle::EntryPoint::GLProgramUniform1ivEXT, std::move(paramBuffer));
6716 }
6717 
CaptureProgramUniform1uiEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0)6718 CallCapture CaptureProgramUniform1uiEXT(const State &glState,
6719                                         bool isCallValid,
6720                                         ShaderProgramID programPacked,
6721                                         UniformLocation locationPacked,
6722                                         GLuint v0)
6723 {
6724     ParamBuffer paramBuffer;
6725 
6726     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6727     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6728     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
6729 
6730     return CallCapture(angle::EntryPoint::GLProgramUniform1uiEXT, std::move(paramBuffer));
6731 }
6732 
CaptureProgramUniform1uivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)6733 CallCapture CaptureProgramUniform1uivEXT(const State &glState,
6734                                          bool isCallValid,
6735                                          ShaderProgramID programPacked,
6736                                          UniformLocation locationPacked,
6737                                          GLsizei count,
6738                                          const GLuint *value)
6739 {
6740     ParamBuffer paramBuffer;
6741 
6742     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6743     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6744     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6745 
6746     if (isCallValid)
6747     {
6748         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
6749         InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
6750         CaptureProgramUniform1uivEXT_value(glState, isCallValid, programPacked, locationPacked,
6751                                            count, value, &valueParam);
6752         paramBuffer.addParam(std::move(valueParam));
6753     }
6754     else
6755     {
6756         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
6757         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
6758                        &valueParam.value);
6759         paramBuffer.addParam(std::move(valueParam));
6760     }
6761 
6762     return CallCapture(angle::EntryPoint::GLProgramUniform1uivEXT, std::move(paramBuffer));
6763 }
6764 
CaptureProgramUniform2fEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0,GLfloat v1)6765 CallCapture CaptureProgramUniform2fEXT(const State &glState,
6766                                        bool isCallValid,
6767                                        ShaderProgramID programPacked,
6768                                        UniformLocation locationPacked,
6769                                        GLfloat v0,
6770                                        GLfloat v1)
6771 {
6772     ParamBuffer paramBuffer;
6773 
6774     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6775     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6776     paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
6777     paramBuffer.addValueParam("v1", ParamType::TGLfloat, v1);
6778 
6779     return CallCapture(angle::EntryPoint::GLProgramUniform2fEXT, std::move(paramBuffer));
6780 }
6781 
CaptureProgramUniform2fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)6782 CallCapture CaptureProgramUniform2fvEXT(const State &glState,
6783                                         bool isCallValid,
6784                                         ShaderProgramID programPacked,
6785                                         UniformLocation locationPacked,
6786                                         GLsizei count,
6787                                         const GLfloat *value)
6788 {
6789     ParamBuffer paramBuffer;
6790 
6791     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6792     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6793     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6794 
6795     if (isCallValid)
6796     {
6797         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
6798         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
6799         CaptureProgramUniform2fvEXT_value(glState, isCallValid, programPacked, locationPacked,
6800                                           count, value, &valueParam);
6801         paramBuffer.addParam(std::move(valueParam));
6802     }
6803     else
6804     {
6805         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
6806         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
6807                        &valueParam.value);
6808         paramBuffer.addParam(std::move(valueParam));
6809     }
6810 
6811     return CallCapture(angle::EntryPoint::GLProgramUniform2fvEXT, std::move(paramBuffer));
6812 }
6813 
CaptureProgramUniform2iEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0,GLint v1)6814 CallCapture CaptureProgramUniform2iEXT(const State &glState,
6815                                        bool isCallValid,
6816                                        ShaderProgramID programPacked,
6817                                        UniformLocation locationPacked,
6818                                        GLint v0,
6819                                        GLint v1)
6820 {
6821     ParamBuffer paramBuffer;
6822 
6823     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6824     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6825     paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
6826     paramBuffer.addValueParam("v1", ParamType::TGLint, v1);
6827 
6828     return CallCapture(angle::EntryPoint::GLProgramUniform2iEXT, std::move(paramBuffer));
6829 }
6830 
CaptureProgramUniform2ivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)6831 CallCapture CaptureProgramUniform2ivEXT(const State &glState,
6832                                         bool isCallValid,
6833                                         ShaderProgramID programPacked,
6834                                         UniformLocation locationPacked,
6835                                         GLsizei count,
6836                                         const GLint *value)
6837 {
6838     ParamBuffer paramBuffer;
6839 
6840     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6841     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6842     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6843 
6844     if (isCallValid)
6845     {
6846         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
6847         InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
6848         CaptureProgramUniform2ivEXT_value(glState, isCallValid, programPacked, locationPacked,
6849                                           count, value, &valueParam);
6850         paramBuffer.addParam(std::move(valueParam));
6851     }
6852     else
6853     {
6854         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
6855         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
6856                        &valueParam.value);
6857         paramBuffer.addParam(std::move(valueParam));
6858     }
6859 
6860     return CallCapture(angle::EntryPoint::GLProgramUniform2ivEXT, std::move(paramBuffer));
6861 }
6862 
CaptureProgramUniform2uiEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0,GLuint v1)6863 CallCapture CaptureProgramUniform2uiEXT(const State &glState,
6864                                         bool isCallValid,
6865                                         ShaderProgramID programPacked,
6866                                         UniformLocation locationPacked,
6867                                         GLuint v0,
6868                                         GLuint v1)
6869 {
6870     ParamBuffer paramBuffer;
6871 
6872     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6873     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6874     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
6875     paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
6876 
6877     return CallCapture(angle::EntryPoint::GLProgramUniform2uiEXT, std::move(paramBuffer));
6878 }
6879 
CaptureProgramUniform2uivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)6880 CallCapture CaptureProgramUniform2uivEXT(const State &glState,
6881                                          bool isCallValid,
6882                                          ShaderProgramID programPacked,
6883                                          UniformLocation locationPacked,
6884                                          GLsizei count,
6885                                          const GLuint *value)
6886 {
6887     ParamBuffer paramBuffer;
6888 
6889     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6890     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6891     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6892 
6893     if (isCallValid)
6894     {
6895         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
6896         InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
6897         CaptureProgramUniform2uivEXT_value(glState, isCallValid, programPacked, locationPacked,
6898                                            count, value, &valueParam);
6899         paramBuffer.addParam(std::move(valueParam));
6900     }
6901     else
6902     {
6903         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
6904         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
6905                        &valueParam.value);
6906         paramBuffer.addParam(std::move(valueParam));
6907     }
6908 
6909     return CallCapture(angle::EntryPoint::GLProgramUniform2uivEXT, std::move(paramBuffer));
6910 }
6911 
CaptureProgramUniform3fEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0,GLfloat v1,GLfloat v2)6912 CallCapture CaptureProgramUniform3fEXT(const State &glState,
6913                                        bool isCallValid,
6914                                        ShaderProgramID programPacked,
6915                                        UniformLocation locationPacked,
6916                                        GLfloat v0,
6917                                        GLfloat v1,
6918                                        GLfloat v2)
6919 {
6920     ParamBuffer paramBuffer;
6921 
6922     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6923     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6924     paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
6925     paramBuffer.addValueParam("v1", ParamType::TGLfloat, v1);
6926     paramBuffer.addValueParam("v2", ParamType::TGLfloat, v2);
6927 
6928     return CallCapture(angle::EntryPoint::GLProgramUniform3fEXT, std::move(paramBuffer));
6929 }
6930 
CaptureProgramUniform3fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)6931 CallCapture CaptureProgramUniform3fvEXT(const State &glState,
6932                                         bool isCallValid,
6933                                         ShaderProgramID programPacked,
6934                                         UniformLocation locationPacked,
6935                                         GLsizei count,
6936                                         const GLfloat *value)
6937 {
6938     ParamBuffer paramBuffer;
6939 
6940     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6941     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6942     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6943 
6944     if (isCallValid)
6945     {
6946         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
6947         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
6948         CaptureProgramUniform3fvEXT_value(glState, isCallValid, programPacked, locationPacked,
6949                                           count, value, &valueParam);
6950         paramBuffer.addParam(std::move(valueParam));
6951     }
6952     else
6953     {
6954         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
6955         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
6956                        &valueParam.value);
6957         paramBuffer.addParam(std::move(valueParam));
6958     }
6959 
6960     return CallCapture(angle::EntryPoint::GLProgramUniform3fvEXT, std::move(paramBuffer));
6961 }
6962 
CaptureProgramUniform3iEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0,GLint v1,GLint v2)6963 CallCapture CaptureProgramUniform3iEXT(const State &glState,
6964                                        bool isCallValid,
6965                                        ShaderProgramID programPacked,
6966                                        UniformLocation locationPacked,
6967                                        GLint v0,
6968                                        GLint v1,
6969                                        GLint v2)
6970 {
6971     ParamBuffer paramBuffer;
6972 
6973     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6974     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6975     paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
6976     paramBuffer.addValueParam("v1", ParamType::TGLint, v1);
6977     paramBuffer.addValueParam("v2", ParamType::TGLint, v2);
6978 
6979     return CallCapture(angle::EntryPoint::GLProgramUniform3iEXT, std::move(paramBuffer));
6980 }
6981 
CaptureProgramUniform3ivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)6982 CallCapture CaptureProgramUniform3ivEXT(const State &glState,
6983                                         bool isCallValid,
6984                                         ShaderProgramID programPacked,
6985                                         UniformLocation locationPacked,
6986                                         GLsizei count,
6987                                         const GLint *value)
6988 {
6989     ParamBuffer paramBuffer;
6990 
6991     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
6992     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
6993     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
6994 
6995     if (isCallValid)
6996     {
6997         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
6998         InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
6999         CaptureProgramUniform3ivEXT_value(glState, isCallValid, programPacked, locationPacked,
7000                                           count, value, &valueParam);
7001         paramBuffer.addParam(std::move(valueParam));
7002     }
7003     else
7004     {
7005         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
7006         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
7007                        &valueParam.value);
7008         paramBuffer.addParam(std::move(valueParam));
7009     }
7010 
7011     return CallCapture(angle::EntryPoint::GLProgramUniform3ivEXT, std::move(paramBuffer));
7012 }
7013 
CaptureProgramUniform3uiEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0,GLuint v1,GLuint v2)7014 CallCapture CaptureProgramUniform3uiEXT(const State &glState,
7015                                         bool isCallValid,
7016                                         ShaderProgramID programPacked,
7017                                         UniformLocation locationPacked,
7018                                         GLuint v0,
7019                                         GLuint v1,
7020                                         GLuint v2)
7021 {
7022     ParamBuffer paramBuffer;
7023 
7024     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7025     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7026     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
7027     paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
7028     paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);
7029 
7030     return CallCapture(angle::EntryPoint::GLProgramUniform3uiEXT, std::move(paramBuffer));
7031 }
7032 
CaptureProgramUniform3uivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)7033 CallCapture CaptureProgramUniform3uivEXT(const State &glState,
7034                                          bool isCallValid,
7035                                          ShaderProgramID programPacked,
7036                                          UniformLocation locationPacked,
7037                                          GLsizei count,
7038                                          const GLuint *value)
7039 {
7040     ParamBuffer paramBuffer;
7041 
7042     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7043     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7044     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7045 
7046     if (isCallValid)
7047     {
7048         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
7049         InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
7050         CaptureProgramUniform3uivEXT_value(glState, isCallValid, programPacked, locationPacked,
7051                                            count, value, &valueParam);
7052         paramBuffer.addParam(std::move(valueParam));
7053     }
7054     else
7055     {
7056         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
7057         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
7058                        &valueParam.value);
7059         paramBuffer.addParam(std::move(valueParam));
7060     }
7061 
7062     return CallCapture(angle::EntryPoint::GLProgramUniform3uivEXT, std::move(paramBuffer));
7063 }
7064 
CaptureProgramUniform4fEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0,GLfloat v1,GLfloat v2,GLfloat v3)7065 CallCapture CaptureProgramUniform4fEXT(const State &glState,
7066                                        bool isCallValid,
7067                                        ShaderProgramID programPacked,
7068                                        UniformLocation locationPacked,
7069                                        GLfloat v0,
7070                                        GLfloat v1,
7071                                        GLfloat v2,
7072                                        GLfloat v3)
7073 {
7074     ParamBuffer paramBuffer;
7075 
7076     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7077     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7078     paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
7079     paramBuffer.addValueParam("v1", ParamType::TGLfloat, v1);
7080     paramBuffer.addValueParam("v2", ParamType::TGLfloat, v2);
7081     paramBuffer.addValueParam("v3", ParamType::TGLfloat, v3);
7082 
7083     return CallCapture(angle::EntryPoint::GLProgramUniform4fEXT, std::move(paramBuffer));
7084 }
7085 
CaptureProgramUniform4fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)7086 CallCapture CaptureProgramUniform4fvEXT(const State &glState,
7087                                         bool isCallValid,
7088                                         ShaderProgramID programPacked,
7089                                         UniformLocation locationPacked,
7090                                         GLsizei count,
7091                                         const GLfloat *value)
7092 {
7093     ParamBuffer paramBuffer;
7094 
7095     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7096     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7097     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7098 
7099     if (isCallValid)
7100     {
7101         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7102         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7103         CaptureProgramUniform4fvEXT_value(glState, isCallValid, programPacked, locationPacked,
7104                                           count, value, &valueParam);
7105         paramBuffer.addParam(std::move(valueParam));
7106     }
7107     else
7108     {
7109         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7110         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7111                        &valueParam.value);
7112         paramBuffer.addParam(std::move(valueParam));
7113     }
7114 
7115     return CallCapture(angle::EntryPoint::GLProgramUniform4fvEXT, std::move(paramBuffer));
7116 }
7117 
CaptureProgramUniform4iEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0,GLint v1,GLint v2,GLint v3)7118 CallCapture CaptureProgramUniform4iEXT(const State &glState,
7119                                        bool isCallValid,
7120                                        ShaderProgramID programPacked,
7121                                        UniformLocation locationPacked,
7122                                        GLint v0,
7123                                        GLint v1,
7124                                        GLint v2,
7125                                        GLint v3)
7126 {
7127     ParamBuffer paramBuffer;
7128 
7129     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7130     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7131     paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
7132     paramBuffer.addValueParam("v1", ParamType::TGLint, v1);
7133     paramBuffer.addValueParam("v2", ParamType::TGLint, v2);
7134     paramBuffer.addValueParam("v3", ParamType::TGLint, v3);
7135 
7136     return CallCapture(angle::EntryPoint::GLProgramUniform4iEXT, std::move(paramBuffer));
7137 }
7138 
CaptureProgramUniform4ivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)7139 CallCapture CaptureProgramUniform4ivEXT(const State &glState,
7140                                         bool isCallValid,
7141                                         ShaderProgramID programPacked,
7142                                         UniformLocation locationPacked,
7143                                         GLsizei count,
7144                                         const GLint *value)
7145 {
7146     ParamBuffer paramBuffer;
7147 
7148     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7149     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7150     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7151 
7152     if (isCallValid)
7153     {
7154         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
7155         InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
7156         CaptureProgramUniform4ivEXT_value(glState, isCallValid, programPacked, locationPacked,
7157                                           count, value, &valueParam);
7158         paramBuffer.addParam(std::move(valueParam));
7159     }
7160     else
7161     {
7162         ParamCapture valueParam("value", ParamType::TGLintConstPointer);
7163         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
7164                        &valueParam.value);
7165         paramBuffer.addParam(std::move(valueParam));
7166     }
7167 
7168     return CallCapture(angle::EntryPoint::GLProgramUniform4ivEXT, std::move(paramBuffer));
7169 }
7170 
CaptureProgramUniform4uiEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0,GLuint v1,GLuint v2,GLuint v3)7171 CallCapture CaptureProgramUniform4uiEXT(const State &glState,
7172                                         bool isCallValid,
7173                                         ShaderProgramID programPacked,
7174                                         UniformLocation locationPacked,
7175                                         GLuint v0,
7176                                         GLuint v1,
7177                                         GLuint v2,
7178                                         GLuint v3)
7179 {
7180     ParamBuffer paramBuffer;
7181 
7182     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7183     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7184     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
7185     paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
7186     paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);
7187     paramBuffer.addValueParam("v3", ParamType::TGLuint, v3);
7188 
7189     return CallCapture(angle::EntryPoint::GLProgramUniform4uiEXT, std::move(paramBuffer));
7190 }
7191 
CaptureProgramUniform4uivEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)7192 CallCapture CaptureProgramUniform4uivEXT(const State &glState,
7193                                          bool isCallValid,
7194                                          ShaderProgramID programPacked,
7195                                          UniformLocation locationPacked,
7196                                          GLsizei count,
7197                                          const GLuint *value)
7198 {
7199     ParamBuffer paramBuffer;
7200 
7201     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7202     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7203     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7204 
7205     if (isCallValid)
7206     {
7207         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
7208         InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
7209         CaptureProgramUniform4uivEXT_value(glState, isCallValid, programPacked, locationPacked,
7210                                            count, value, &valueParam);
7211         paramBuffer.addParam(std::move(valueParam));
7212     }
7213     else
7214     {
7215         ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
7216         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
7217                        &valueParam.value);
7218         paramBuffer.addParam(std::move(valueParam));
7219     }
7220 
7221     return CallCapture(angle::EntryPoint::GLProgramUniform4uivEXT, std::move(paramBuffer));
7222 }
7223 
CaptureProgramUniformMatrix2fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7224 CallCapture CaptureProgramUniformMatrix2fvEXT(const State &glState,
7225                                               bool isCallValid,
7226                                               ShaderProgramID programPacked,
7227                                               UniformLocation locationPacked,
7228                                               GLsizei count,
7229                                               GLboolean transpose,
7230                                               const GLfloat *value)
7231 {
7232     ParamBuffer paramBuffer;
7233 
7234     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7235     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7236     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7237     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7238 
7239     if (isCallValid)
7240     {
7241         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7242         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7243         CaptureProgramUniformMatrix2fvEXT_value(glState, isCallValid, programPacked, locationPacked,
7244                                                 count, transpose, value, &valueParam);
7245         paramBuffer.addParam(std::move(valueParam));
7246     }
7247     else
7248     {
7249         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7250         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7251                        &valueParam.value);
7252         paramBuffer.addParam(std::move(valueParam));
7253     }
7254 
7255     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2fvEXT, std::move(paramBuffer));
7256 }
7257 
CaptureProgramUniformMatrix2x3fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7258 CallCapture CaptureProgramUniformMatrix2x3fvEXT(const State &glState,
7259                                                 bool isCallValid,
7260                                                 ShaderProgramID programPacked,
7261                                                 UniformLocation locationPacked,
7262                                                 GLsizei count,
7263                                                 GLboolean transpose,
7264                                                 const GLfloat *value)
7265 {
7266     ParamBuffer paramBuffer;
7267 
7268     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7269     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7270     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7271     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7272 
7273     if (isCallValid)
7274     {
7275         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7276         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7277         CaptureProgramUniformMatrix2x3fvEXT_value(glState, isCallValid, programPacked,
7278                                                   locationPacked, count, transpose, value,
7279                                                   &valueParam);
7280         paramBuffer.addParam(std::move(valueParam));
7281     }
7282     else
7283     {
7284         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7285         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7286                        &valueParam.value);
7287         paramBuffer.addParam(std::move(valueParam));
7288     }
7289 
7290     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2x3fvEXT, std::move(paramBuffer));
7291 }
7292 
CaptureProgramUniformMatrix2x4fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7293 CallCapture CaptureProgramUniformMatrix2x4fvEXT(const State &glState,
7294                                                 bool isCallValid,
7295                                                 ShaderProgramID programPacked,
7296                                                 UniformLocation locationPacked,
7297                                                 GLsizei count,
7298                                                 GLboolean transpose,
7299                                                 const GLfloat *value)
7300 {
7301     ParamBuffer paramBuffer;
7302 
7303     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7304     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7305     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7306     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7307 
7308     if (isCallValid)
7309     {
7310         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7311         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7312         CaptureProgramUniformMatrix2x4fvEXT_value(glState, isCallValid, programPacked,
7313                                                   locationPacked, count, transpose, value,
7314                                                   &valueParam);
7315         paramBuffer.addParam(std::move(valueParam));
7316     }
7317     else
7318     {
7319         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7320         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7321                        &valueParam.value);
7322         paramBuffer.addParam(std::move(valueParam));
7323     }
7324 
7325     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2x4fvEXT, std::move(paramBuffer));
7326 }
7327 
CaptureProgramUniformMatrix3fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7328 CallCapture CaptureProgramUniformMatrix3fvEXT(const State &glState,
7329                                               bool isCallValid,
7330                                               ShaderProgramID programPacked,
7331                                               UniformLocation locationPacked,
7332                                               GLsizei count,
7333                                               GLboolean transpose,
7334                                               const GLfloat *value)
7335 {
7336     ParamBuffer paramBuffer;
7337 
7338     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7339     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7340     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7341     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7342 
7343     if (isCallValid)
7344     {
7345         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7346         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7347         CaptureProgramUniformMatrix3fvEXT_value(glState, isCallValid, programPacked, locationPacked,
7348                                                 count, transpose, value, &valueParam);
7349         paramBuffer.addParam(std::move(valueParam));
7350     }
7351     else
7352     {
7353         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7354         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7355                        &valueParam.value);
7356         paramBuffer.addParam(std::move(valueParam));
7357     }
7358 
7359     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3fvEXT, std::move(paramBuffer));
7360 }
7361 
CaptureProgramUniformMatrix3x2fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7362 CallCapture CaptureProgramUniformMatrix3x2fvEXT(const State &glState,
7363                                                 bool isCallValid,
7364                                                 ShaderProgramID programPacked,
7365                                                 UniformLocation locationPacked,
7366                                                 GLsizei count,
7367                                                 GLboolean transpose,
7368                                                 const GLfloat *value)
7369 {
7370     ParamBuffer paramBuffer;
7371 
7372     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7373     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7374     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7375     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7376 
7377     if (isCallValid)
7378     {
7379         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7380         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7381         CaptureProgramUniformMatrix3x2fvEXT_value(glState, isCallValid, programPacked,
7382                                                   locationPacked, count, transpose, value,
7383                                                   &valueParam);
7384         paramBuffer.addParam(std::move(valueParam));
7385     }
7386     else
7387     {
7388         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7389         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7390                        &valueParam.value);
7391         paramBuffer.addParam(std::move(valueParam));
7392     }
7393 
7394     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3x2fvEXT, std::move(paramBuffer));
7395 }
7396 
CaptureProgramUniformMatrix3x4fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7397 CallCapture CaptureProgramUniformMatrix3x4fvEXT(const State &glState,
7398                                                 bool isCallValid,
7399                                                 ShaderProgramID programPacked,
7400                                                 UniformLocation locationPacked,
7401                                                 GLsizei count,
7402                                                 GLboolean transpose,
7403                                                 const GLfloat *value)
7404 {
7405     ParamBuffer paramBuffer;
7406 
7407     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7408     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7409     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7410     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7411 
7412     if (isCallValid)
7413     {
7414         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7415         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7416         CaptureProgramUniformMatrix3x4fvEXT_value(glState, isCallValid, programPacked,
7417                                                   locationPacked, count, transpose, value,
7418                                                   &valueParam);
7419         paramBuffer.addParam(std::move(valueParam));
7420     }
7421     else
7422     {
7423         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7424         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7425                        &valueParam.value);
7426         paramBuffer.addParam(std::move(valueParam));
7427     }
7428 
7429     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3x4fvEXT, std::move(paramBuffer));
7430 }
7431 
CaptureProgramUniformMatrix4fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7432 CallCapture CaptureProgramUniformMatrix4fvEXT(const State &glState,
7433                                               bool isCallValid,
7434                                               ShaderProgramID programPacked,
7435                                               UniformLocation locationPacked,
7436                                               GLsizei count,
7437                                               GLboolean transpose,
7438                                               const GLfloat *value)
7439 {
7440     ParamBuffer paramBuffer;
7441 
7442     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7443     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7444     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7445     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7446 
7447     if (isCallValid)
7448     {
7449         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7450         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7451         CaptureProgramUniformMatrix4fvEXT_value(glState, isCallValid, programPacked, locationPacked,
7452                                                 count, transpose, value, &valueParam);
7453         paramBuffer.addParam(std::move(valueParam));
7454     }
7455     else
7456     {
7457         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7458         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7459                        &valueParam.value);
7460         paramBuffer.addParam(std::move(valueParam));
7461     }
7462 
7463     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4fvEXT, std::move(paramBuffer));
7464 }
7465 
CaptureProgramUniformMatrix4x2fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7466 CallCapture CaptureProgramUniformMatrix4x2fvEXT(const State &glState,
7467                                                 bool isCallValid,
7468                                                 ShaderProgramID programPacked,
7469                                                 UniformLocation locationPacked,
7470                                                 GLsizei count,
7471                                                 GLboolean transpose,
7472                                                 const GLfloat *value)
7473 {
7474     ParamBuffer paramBuffer;
7475 
7476     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7477     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7478     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7479     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7480 
7481     if (isCallValid)
7482     {
7483         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7484         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7485         CaptureProgramUniformMatrix4x2fvEXT_value(glState, isCallValid, programPacked,
7486                                                   locationPacked, count, transpose, value,
7487                                                   &valueParam);
7488         paramBuffer.addParam(std::move(valueParam));
7489     }
7490     else
7491     {
7492         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7493         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7494                        &valueParam.value);
7495         paramBuffer.addParam(std::move(valueParam));
7496     }
7497 
7498     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4x2fvEXT, std::move(paramBuffer));
7499 }
7500 
CaptureProgramUniformMatrix4x3fvEXT(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)7501 CallCapture CaptureProgramUniformMatrix4x3fvEXT(const State &glState,
7502                                                 bool isCallValid,
7503                                                 ShaderProgramID programPacked,
7504                                                 UniformLocation locationPacked,
7505                                                 GLsizei count,
7506                                                 GLboolean transpose,
7507                                                 const GLfloat *value)
7508 {
7509     ParamBuffer paramBuffer;
7510 
7511     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7512     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
7513     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7514     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
7515 
7516     if (isCallValid)
7517     {
7518         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7519         InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
7520         CaptureProgramUniformMatrix4x3fvEXT_value(glState, isCallValid, programPacked,
7521                                                   locationPacked, count, transpose, value,
7522                                                   &valueParam);
7523         paramBuffer.addParam(std::move(valueParam));
7524     }
7525     else
7526     {
7527         ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
7528         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
7529                        &valueParam.value);
7530         paramBuffer.addParam(std::move(valueParam));
7531     }
7532 
7533     return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4x3fvEXT, std::move(paramBuffer));
7534 }
7535 
CaptureUseProgramStagesEXT(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLbitfield stages,ShaderProgramID programPacked)7536 CallCapture CaptureUseProgramStagesEXT(const State &glState,
7537                                        bool isCallValid,
7538                                        ProgramPipelineID pipelinePacked,
7539                                        GLbitfield stages,
7540                                        ShaderProgramID programPacked)
7541 {
7542     ParamBuffer paramBuffer;
7543 
7544     paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
7545     paramBuffer.addEnumParam("stages", GLenumGroup::UseProgramStageMask, ParamType::TGLbitfield,
7546                              stages);
7547     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
7548 
7549     return CallCapture(angle::EntryPoint::GLUseProgramStagesEXT, std::move(paramBuffer));
7550 }
7551 
CaptureValidateProgramPipelineEXT(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked)7552 CallCapture CaptureValidateProgramPipelineEXT(const State &glState,
7553                                               bool isCallValid,
7554                                               ProgramPipelineID pipelinePacked)
7555 {
7556     ParamBuffer paramBuffer;
7557 
7558     paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
7559 
7560     return CallCapture(angle::EntryPoint::GLValidateProgramPipelineEXT, std::move(paramBuffer));
7561 }
7562 
CaptureFramebufferFetchBarrierEXT(const State & glState,bool isCallValid)7563 CallCapture CaptureFramebufferFetchBarrierEXT(const State &glState, bool isCallValid)
7564 {
7565     ParamBuffer paramBuffer;
7566 
7567     return CallCapture(angle::EntryPoint::GLFramebufferFetchBarrierEXT, std::move(paramBuffer));
7568 }
7569 
CapturePatchParameteriEXT(const State & glState,bool isCallValid,GLenum pname,GLint value)7570 CallCapture CapturePatchParameteriEXT(const State &glState,
7571                                       bool isCallValid,
7572                                       GLenum pname,
7573                                       GLint value)
7574 {
7575     ParamBuffer paramBuffer;
7576 
7577     paramBuffer.addEnumParam("pname", GLenumGroup::PatchParameterName, ParamType::TGLenum, pname);
7578     paramBuffer.addValueParam("value", ParamType::TGLint, value);
7579 
7580     return CallCapture(angle::EntryPoint::GLPatchParameteriEXT, std::move(paramBuffer));
7581 }
7582 
CaptureGetSamplerParameterIivEXT(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLint * params)7583 CallCapture CaptureGetSamplerParameterIivEXT(const State &glState,
7584                                              bool isCallValid,
7585                                              SamplerID samplerPacked,
7586                                              GLenum pname,
7587                                              GLint *params)
7588 {
7589     ParamBuffer paramBuffer;
7590 
7591     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
7592     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
7593 
7594     if (isCallValid)
7595     {
7596         ParamCapture paramsParam("params", ParamType::TGLintPointer);
7597         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
7598         CaptureGetSamplerParameterIivEXT_params(glState, isCallValid, samplerPacked, pname, params,
7599                                                 &paramsParam);
7600         paramBuffer.addParam(std::move(paramsParam));
7601     }
7602     else
7603     {
7604         ParamCapture paramsParam("params", ParamType::TGLintPointer);
7605         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
7606         paramBuffer.addParam(std::move(paramsParam));
7607     }
7608 
7609     return CallCapture(angle::EntryPoint::GLGetSamplerParameterIivEXT, std::move(paramBuffer));
7610 }
7611 
CaptureGetSamplerParameterIuivEXT(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLuint * params)7612 CallCapture CaptureGetSamplerParameterIuivEXT(const State &glState,
7613                                               bool isCallValid,
7614                                               SamplerID samplerPacked,
7615                                               GLenum pname,
7616                                               GLuint *params)
7617 {
7618     ParamBuffer paramBuffer;
7619 
7620     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
7621     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
7622 
7623     if (isCallValid)
7624     {
7625         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
7626         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
7627         CaptureGetSamplerParameterIuivEXT_params(glState, isCallValid, samplerPacked, pname, params,
7628                                                  &paramsParam);
7629         paramBuffer.addParam(std::move(paramsParam));
7630     }
7631     else
7632     {
7633         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
7634         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
7635                        &paramsParam.value);
7636         paramBuffer.addParam(std::move(paramsParam));
7637     }
7638 
7639     return CallCapture(angle::EntryPoint::GLGetSamplerParameterIuivEXT, std::move(paramBuffer));
7640 }
7641 
CaptureGetTexParameterIivEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLint * params)7642 CallCapture CaptureGetTexParameterIivEXT(const State &glState,
7643                                          bool isCallValid,
7644                                          TextureType targetPacked,
7645                                          GLenum pname,
7646                                          GLint *params)
7647 {
7648     ParamBuffer paramBuffer;
7649 
7650     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7651     paramBuffer.addEnumParam("pname", GLenumGroup::GetTextureParameter, ParamType::TGLenum, pname);
7652 
7653     if (isCallValid)
7654     {
7655         ParamCapture paramsParam("params", ParamType::TGLintPointer);
7656         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
7657         CaptureGetTexParameterIivEXT_params(glState, isCallValid, targetPacked, pname, params,
7658                                             &paramsParam);
7659         paramBuffer.addParam(std::move(paramsParam));
7660     }
7661     else
7662     {
7663         ParamCapture paramsParam("params", ParamType::TGLintPointer);
7664         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
7665         paramBuffer.addParam(std::move(paramsParam));
7666     }
7667 
7668     return CallCapture(angle::EntryPoint::GLGetTexParameterIivEXT, std::move(paramBuffer));
7669 }
7670 
CaptureGetTexParameterIuivEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLuint * params)7671 CallCapture CaptureGetTexParameterIuivEXT(const State &glState,
7672                                           bool isCallValid,
7673                                           TextureType targetPacked,
7674                                           GLenum pname,
7675                                           GLuint *params)
7676 {
7677     ParamBuffer paramBuffer;
7678 
7679     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7680     paramBuffer.addEnumParam("pname", GLenumGroup::GetTextureParameter, ParamType::TGLenum, pname);
7681 
7682     if (isCallValid)
7683     {
7684         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
7685         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
7686         CaptureGetTexParameterIuivEXT_params(glState, isCallValid, targetPacked, pname, params,
7687                                              &paramsParam);
7688         paramBuffer.addParam(std::move(paramsParam));
7689     }
7690     else
7691     {
7692         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
7693         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
7694                        &paramsParam.value);
7695         paramBuffer.addParam(std::move(paramsParam));
7696     }
7697 
7698     return CallCapture(angle::EntryPoint::GLGetTexParameterIuivEXT, std::move(paramBuffer));
7699 }
7700 
CaptureSamplerParameterIivEXT(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLint * param)7701 CallCapture CaptureSamplerParameterIivEXT(const State &glState,
7702                                           bool isCallValid,
7703                                           SamplerID samplerPacked,
7704                                           GLenum pname,
7705                                           const GLint *param)
7706 {
7707     ParamBuffer paramBuffer;
7708 
7709     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
7710     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
7711 
7712     if (isCallValid)
7713     {
7714         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
7715         InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
7716         CaptureSamplerParameterIivEXT_param(glState, isCallValid, samplerPacked, pname, param,
7717                                             &paramParam);
7718         paramBuffer.addParam(std::move(paramParam));
7719     }
7720     else
7721     {
7722         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
7723         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
7724                        &paramParam.value);
7725         paramBuffer.addParam(std::move(paramParam));
7726     }
7727 
7728     return CallCapture(angle::EntryPoint::GLSamplerParameterIivEXT, std::move(paramBuffer));
7729 }
7730 
CaptureSamplerParameterIuivEXT(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLuint * param)7731 CallCapture CaptureSamplerParameterIuivEXT(const State &glState,
7732                                            bool isCallValid,
7733                                            SamplerID samplerPacked,
7734                                            GLenum pname,
7735                                            const GLuint *param)
7736 {
7737     ParamBuffer paramBuffer;
7738 
7739     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
7740     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
7741 
7742     if (isCallValid)
7743     {
7744         ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
7745         InitParamValue(ParamType::TGLuintConstPointer, param, &paramParam.value);
7746         CaptureSamplerParameterIuivEXT_param(glState, isCallValid, samplerPacked, pname, param,
7747                                              &paramParam);
7748         paramBuffer.addParam(std::move(paramParam));
7749     }
7750     else
7751     {
7752         ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
7753         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
7754                        &paramParam.value);
7755         paramBuffer.addParam(std::move(paramParam));
7756     }
7757 
7758     return CallCapture(angle::EntryPoint::GLSamplerParameterIuivEXT, std::move(paramBuffer));
7759 }
7760 
CaptureTexParameterIivEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLint * params)7761 CallCapture CaptureTexParameterIivEXT(const State &glState,
7762                                       bool isCallValid,
7763                                       TextureType targetPacked,
7764                                       GLenum pname,
7765                                       const GLint *params)
7766 {
7767     ParamBuffer paramBuffer;
7768 
7769     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7770     paramBuffer.addEnumParam("pname", GLenumGroup::TextureParameterName, ParamType::TGLenum, pname);
7771 
7772     if (isCallValid)
7773     {
7774         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
7775         InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
7776         CaptureTexParameterIivEXT_params(glState, isCallValid, targetPacked, pname, params,
7777                                          &paramsParam);
7778         paramBuffer.addParam(std::move(paramsParam));
7779     }
7780     else
7781     {
7782         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
7783         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
7784                        &paramsParam.value);
7785         paramBuffer.addParam(std::move(paramsParam));
7786     }
7787 
7788     return CallCapture(angle::EntryPoint::GLTexParameterIivEXT, std::move(paramBuffer));
7789 }
7790 
CaptureTexParameterIuivEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLuint * params)7791 CallCapture CaptureTexParameterIuivEXT(const State &glState,
7792                                        bool isCallValid,
7793                                        TextureType targetPacked,
7794                                        GLenum pname,
7795                                        const GLuint *params)
7796 {
7797     ParamBuffer paramBuffer;
7798 
7799     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7800     paramBuffer.addEnumParam("pname", GLenumGroup::TextureParameterName, ParamType::TGLenum, pname);
7801 
7802     if (isCallValid)
7803     {
7804         ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
7805         InitParamValue(ParamType::TGLuintConstPointer, params, &paramsParam.value);
7806         CaptureTexParameterIuivEXT_params(glState, isCallValid, targetPacked, pname, params,
7807                                           &paramsParam);
7808         paramBuffer.addParam(std::move(paramsParam));
7809     }
7810     else
7811     {
7812         ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
7813         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
7814                        &paramsParam.value);
7815         paramBuffer.addParam(std::move(paramsParam));
7816     }
7817 
7818     return CallCapture(angle::EntryPoint::GLTexParameterIuivEXT, std::move(paramBuffer));
7819 }
7820 
CaptureTexBufferEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLenum internalformat,BufferID bufferPacked)7821 CallCapture CaptureTexBufferEXT(const State &glState,
7822                                 bool isCallValid,
7823                                 TextureType targetPacked,
7824                                 GLenum internalformat,
7825                                 BufferID bufferPacked)
7826 {
7827     ParamBuffer paramBuffer;
7828 
7829     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7830     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
7831                              internalformat);
7832     paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
7833 
7834     return CallCapture(angle::EntryPoint::GLTexBufferEXT, std::move(paramBuffer));
7835 }
7836 
CaptureTexBufferRangeEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLenum internalformat,BufferID bufferPacked,GLintptr offset,GLsizeiptr size)7837 CallCapture CaptureTexBufferRangeEXT(const State &glState,
7838                                      bool isCallValid,
7839                                      TextureType targetPacked,
7840                                      GLenum internalformat,
7841                                      BufferID bufferPacked,
7842                                      GLintptr offset,
7843                                      GLsizeiptr size)
7844 {
7845     ParamBuffer paramBuffer;
7846 
7847     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7848     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
7849                              internalformat);
7850     paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
7851     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
7852     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
7853 
7854     return CallCapture(angle::EntryPoint::GLTexBufferRangeEXT, std::move(paramBuffer));
7855 }
7856 
CaptureTexStorage1DEXT(const State & glState,bool isCallValid,GLenum target,GLsizei levels,GLenum internalformat,GLsizei width)7857 CallCapture CaptureTexStorage1DEXT(const State &glState,
7858                                    bool isCallValid,
7859                                    GLenum target,
7860                                    GLsizei levels,
7861                                    GLenum internalformat,
7862                                    GLsizei width)
7863 {
7864     ParamBuffer paramBuffer;
7865 
7866     paramBuffer.addEnumParam("target", GLenumGroup::TextureTarget, ParamType::TGLenum, target);
7867     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
7868     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
7869                              internalformat);
7870     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
7871 
7872     return CallCapture(angle::EntryPoint::GLTexStorage1DEXT, std::move(paramBuffer));
7873 }
7874 
CaptureTexStorage2DEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height)7875 CallCapture CaptureTexStorage2DEXT(const State &glState,
7876                                    bool isCallValid,
7877                                    TextureType targetPacked,
7878                                    GLsizei levels,
7879                                    GLenum internalformat,
7880                                    GLsizei width,
7881                                    GLsizei height)
7882 {
7883     ParamBuffer paramBuffer;
7884 
7885     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7886     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
7887     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
7888                              internalformat);
7889     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
7890     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
7891 
7892     return CallCapture(angle::EntryPoint::GLTexStorage2DEXT, std::move(paramBuffer));
7893 }
7894 
CaptureTexStorage3DEXT(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth)7895 CallCapture CaptureTexStorage3DEXT(const State &glState,
7896                                    bool isCallValid,
7897                                    TextureType targetPacked,
7898                                    GLsizei levels,
7899                                    GLenum internalformat,
7900                                    GLsizei width,
7901                                    GLsizei height,
7902                                    GLsizei depth)
7903 {
7904     ParamBuffer paramBuffer;
7905 
7906     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
7907     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
7908     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
7909                              internalformat);
7910     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
7911     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
7912     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
7913 
7914     return CallCapture(angle::EntryPoint::GLTexStorage3DEXT, std::move(paramBuffer));
7915 }
7916 
CaptureBlendBarrierKHR(const State & glState,bool isCallValid)7917 CallCapture CaptureBlendBarrierKHR(const State &glState, bool isCallValid)
7918 {
7919     ParamBuffer paramBuffer;
7920 
7921     return CallCapture(angle::EntryPoint::GLBlendBarrierKHR, std::move(paramBuffer));
7922 }
7923 
CaptureDebugMessageCallbackKHR(const State & glState,bool isCallValid,GLDEBUGPROCKHR callback,const void * userParam)7924 CallCapture CaptureDebugMessageCallbackKHR(const State &glState,
7925                                            bool isCallValid,
7926                                            GLDEBUGPROCKHR callback,
7927                                            const void *userParam)
7928 {
7929     ParamBuffer paramBuffer;
7930 
7931     paramBuffer.addValueParam("callback", ParamType::TGLDEBUGPROCKHR, callback);
7932 
7933     if (isCallValid)
7934     {
7935         ParamCapture userParamParam("userParam", ParamType::TvoidConstPointer);
7936         InitParamValue(ParamType::TvoidConstPointer, userParam, &userParamParam.value);
7937         CaptureDebugMessageCallbackKHR_userParam(glState, isCallValid, callback, userParam,
7938                                                  &userParamParam);
7939         paramBuffer.addParam(std::move(userParamParam));
7940     }
7941     else
7942     {
7943         ParamCapture userParamParam("userParam", ParamType::TvoidConstPointer);
7944         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
7945                        &userParamParam.value);
7946         paramBuffer.addParam(std::move(userParamParam));
7947     }
7948 
7949     return CallCapture(angle::EntryPoint::GLDebugMessageCallbackKHR, std::move(paramBuffer));
7950 }
7951 
CaptureDebugMessageControlKHR(const State & glState,bool isCallValid,GLenum source,GLenum type,GLenum severity,GLsizei count,const GLuint * ids,GLboolean enabled)7952 CallCapture CaptureDebugMessageControlKHR(const State &glState,
7953                                           bool isCallValid,
7954                                           GLenum source,
7955                                           GLenum type,
7956                                           GLenum severity,
7957                                           GLsizei count,
7958                                           const GLuint *ids,
7959                                           GLboolean enabled)
7960 {
7961     ParamBuffer paramBuffer;
7962 
7963     paramBuffer.addEnumParam("source", GLenumGroup::DebugSource, ParamType::TGLenum, source);
7964     paramBuffer.addEnumParam("type", GLenumGroup::DebugType, ParamType::TGLenum, type);
7965     paramBuffer.addEnumParam("severity", GLenumGroup::DebugSeverity, ParamType::TGLenum, severity);
7966     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
7967 
7968     if (isCallValid)
7969     {
7970         ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
7971         InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
7972         CaptureDebugMessageControlKHR_ids(glState, isCallValid, source, type, severity, count, ids,
7973                                           enabled, &idsParam);
7974         paramBuffer.addParam(std::move(idsParam));
7975     }
7976     else
7977     {
7978         ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
7979         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
7980                        &idsParam.value);
7981         paramBuffer.addParam(std::move(idsParam));
7982     }
7983 
7984     paramBuffer.addValueParam("enabled", ParamType::TGLboolean, enabled);
7985 
7986     return CallCapture(angle::EntryPoint::GLDebugMessageControlKHR, std::move(paramBuffer));
7987 }
7988 
CaptureDebugMessageInsertKHR(const State & glState,bool isCallValid,GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar * buf)7989 CallCapture CaptureDebugMessageInsertKHR(const State &glState,
7990                                          bool isCallValid,
7991                                          GLenum source,
7992                                          GLenum type,
7993                                          GLuint id,
7994                                          GLenum severity,
7995                                          GLsizei length,
7996                                          const GLchar *buf)
7997 {
7998     ParamBuffer paramBuffer;
7999 
8000     paramBuffer.addEnumParam("source", GLenumGroup::DebugSource, ParamType::TGLenum, source);
8001     paramBuffer.addEnumParam("type", GLenumGroup::DebugType, ParamType::TGLenum, type);
8002     paramBuffer.addValueParam("id", ParamType::TGLuint, id);
8003     paramBuffer.addEnumParam("severity", GLenumGroup::DebugSeverity, ParamType::TGLenum, severity);
8004     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
8005 
8006     if (isCallValid)
8007     {
8008         ParamCapture bufParam("buf", ParamType::TGLcharConstPointer);
8009         InitParamValue(ParamType::TGLcharConstPointer, buf, &bufParam.value);
8010         CaptureDebugMessageInsertKHR_buf(glState, isCallValid, source, type, id, severity, length,
8011                                          buf, &bufParam);
8012         paramBuffer.addParam(std::move(bufParam));
8013     }
8014     else
8015     {
8016         ParamCapture bufParam("buf", ParamType::TGLcharConstPointer);
8017         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
8018                        &bufParam.value);
8019         paramBuffer.addParam(std::move(bufParam));
8020     }
8021 
8022     return CallCapture(angle::EntryPoint::GLDebugMessageInsertKHR, std::move(paramBuffer));
8023 }
8024 
CaptureGetDebugMessageLogKHR(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,GLuint returnValue)8025 CallCapture CaptureGetDebugMessageLogKHR(const State &glState,
8026                                          bool isCallValid,
8027                                          GLuint count,
8028                                          GLsizei bufSize,
8029                                          GLenum *sources,
8030                                          GLenum *types,
8031                                          GLuint *ids,
8032                                          GLenum *severities,
8033                                          GLsizei *lengths,
8034                                          GLchar *messageLog,
8035                                          GLuint returnValue)
8036 {
8037     ParamBuffer paramBuffer;
8038 
8039     paramBuffer.addValueParam("count", ParamType::TGLuint, count);
8040     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
8041 
8042     if (isCallValid)
8043     {
8044         ParamCapture sourcesParam("sources", ParamType::TGLenumPointer);
8045         InitParamValue(ParamType::TGLenumPointer, sources, &sourcesParam.value);
8046         CaptureGetDebugMessageLogKHR_sources(glState, isCallValid, count, bufSize, sources, types,
8047                                              ids, severities, lengths, messageLog, &sourcesParam);
8048         paramBuffer.addParam(std::move(sourcesParam));
8049     }
8050     else
8051     {
8052         ParamCapture sourcesParam("sources", ParamType::TGLenumPointer);
8053         InitParamValue(ParamType::TGLenumPointer, static_cast<GLenum *>(nullptr),
8054                        &sourcesParam.value);
8055         paramBuffer.addParam(std::move(sourcesParam));
8056     }
8057 
8058     if (isCallValid)
8059     {
8060         ParamCapture typesParam("types", ParamType::TGLenumPointer);
8061         InitParamValue(ParamType::TGLenumPointer, types, &typesParam.value);
8062         CaptureGetDebugMessageLogKHR_types(glState, isCallValid, count, bufSize, sources, types,
8063                                            ids, severities, lengths, messageLog, &typesParam);
8064         paramBuffer.addParam(std::move(typesParam));
8065     }
8066     else
8067     {
8068         ParamCapture typesParam("types", ParamType::TGLenumPointer);
8069         InitParamValue(ParamType::TGLenumPointer, static_cast<GLenum *>(nullptr),
8070                        &typesParam.value);
8071         paramBuffer.addParam(std::move(typesParam));
8072     }
8073 
8074     if (isCallValid)
8075     {
8076         ParamCapture idsParam("ids", ParamType::TGLuintPointer);
8077         InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
8078         CaptureGetDebugMessageLogKHR_ids(glState, isCallValid, count, bufSize, sources, types, ids,
8079                                          severities, lengths, messageLog, &idsParam);
8080         paramBuffer.addParam(std::move(idsParam));
8081     }
8082     else
8083     {
8084         ParamCapture idsParam("ids", ParamType::TGLuintPointer);
8085         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr), &idsParam.value);
8086         paramBuffer.addParam(std::move(idsParam));
8087     }
8088 
8089     if (isCallValid)
8090     {
8091         ParamCapture severitiesParam("severities", ParamType::TGLenumPointer);
8092         InitParamValue(ParamType::TGLenumPointer, severities, &severitiesParam.value);
8093         CaptureGetDebugMessageLogKHR_severities(glState, isCallValid, count, bufSize, sources,
8094                                                 types, ids, severities, lengths, messageLog,
8095                                                 &severitiesParam);
8096         paramBuffer.addParam(std::move(severitiesParam));
8097     }
8098     else
8099     {
8100         ParamCapture severitiesParam("severities", ParamType::TGLenumPointer);
8101         InitParamValue(ParamType::TGLenumPointer, static_cast<GLenum *>(nullptr),
8102                        &severitiesParam.value);
8103         paramBuffer.addParam(std::move(severitiesParam));
8104     }
8105 
8106     if (isCallValid)
8107     {
8108         ParamCapture lengthsParam("lengths", ParamType::TGLsizeiPointer);
8109         InitParamValue(ParamType::TGLsizeiPointer, lengths, &lengthsParam.value);
8110         CaptureGetDebugMessageLogKHR_lengths(glState, isCallValid, count, bufSize, sources, types,
8111                                              ids, severities, lengths, messageLog, &lengthsParam);
8112         paramBuffer.addParam(std::move(lengthsParam));
8113     }
8114     else
8115     {
8116         ParamCapture lengthsParam("lengths", ParamType::TGLsizeiPointer);
8117         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
8118                        &lengthsParam.value);
8119         paramBuffer.addParam(std::move(lengthsParam));
8120     }
8121 
8122     if (isCallValid)
8123     {
8124         ParamCapture messageLogParam("messageLog", ParamType::TGLcharPointer);
8125         InitParamValue(ParamType::TGLcharPointer, messageLog, &messageLogParam.value);
8126         CaptureGetDebugMessageLogKHR_messageLog(glState, isCallValid, count, bufSize, sources,
8127                                                 types, ids, severities, lengths, messageLog,
8128                                                 &messageLogParam);
8129         paramBuffer.addParam(std::move(messageLogParam));
8130     }
8131     else
8132     {
8133         ParamCapture messageLogParam("messageLog", ParamType::TGLcharPointer);
8134         InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
8135                        &messageLogParam.value);
8136         paramBuffer.addParam(std::move(messageLogParam));
8137     }
8138 
8139     ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
8140     InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
8141     paramBuffer.addReturnValue(std::move(returnValueCapture));
8142 
8143     return CallCapture(angle::EntryPoint::GLGetDebugMessageLogKHR, std::move(paramBuffer));
8144 }
8145 
CaptureGetObjectLabelKHR(const State & glState,bool isCallValid,GLenum identifier,GLuint name,GLsizei bufSize,GLsizei * length,GLchar * label)8146 CallCapture CaptureGetObjectLabelKHR(const State &glState,
8147                                      bool isCallValid,
8148                                      GLenum identifier,
8149                                      GLuint name,
8150                                      GLsizei bufSize,
8151                                      GLsizei *length,
8152                                      GLchar *label)
8153 {
8154     ParamBuffer paramBuffer;
8155 
8156     paramBuffer.addEnumParam("identifier", GLenumGroup::DefaultGroup, ParamType::TGLenum,
8157                              identifier);
8158     paramBuffer.addValueParam("name", ParamType::TGLuint, name);
8159     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
8160 
8161     if (isCallValid)
8162     {
8163         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
8164         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
8165         CaptureGetObjectLabelKHR_length(glState, isCallValid, identifier, name, bufSize, length,
8166                                         label, &lengthParam);
8167         paramBuffer.addParam(std::move(lengthParam));
8168     }
8169     else
8170     {
8171         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
8172         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
8173                        &lengthParam.value);
8174         paramBuffer.addParam(std::move(lengthParam));
8175     }
8176 
8177     if (isCallValid)
8178     {
8179         ParamCapture labelParam("label", ParamType::TGLcharPointer);
8180         InitParamValue(ParamType::TGLcharPointer, label, &labelParam.value);
8181         CaptureGetObjectLabelKHR_label(glState, isCallValid, identifier, name, bufSize, length,
8182                                        label, &labelParam);
8183         paramBuffer.addParam(std::move(labelParam));
8184     }
8185     else
8186     {
8187         ParamCapture labelParam("label", ParamType::TGLcharPointer);
8188         InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
8189                        &labelParam.value);
8190         paramBuffer.addParam(std::move(labelParam));
8191     }
8192 
8193     return CallCapture(angle::EntryPoint::GLGetObjectLabelKHR, std::move(paramBuffer));
8194 }
8195 
CaptureGetObjectPtrLabelKHR(const State & glState,bool isCallValid,const void * ptr,GLsizei bufSize,GLsizei * length,GLchar * label)8196 CallCapture CaptureGetObjectPtrLabelKHR(const State &glState,
8197                                         bool isCallValid,
8198                                         const void *ptr,
8199                                         GLsizei bufSize,
8200                                         GLsizei *length,
8201                                         GLchar *label)
8202 {
8203     ParamBuffer paramBuffer;
8204 
8205     if (isCallValid)
8206     {
8207         ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
8208         InitParamValue(ParamType::TvoidConstPointer, ptr, &ptrParam.value);
8209         CaptureGetObjectPtrLabelKHR_ptr(glState, isCallValid, ptr, bufSize, length, label,
8210                                         &ptrParam);
8211         paramBuffer.addParam(std::move(ptrParam));
8212     }
8213     else
8214     {
8215         ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
8216         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
8217                        &ptrParam.value);
8218         paramBuffer.addParam(std::move(ptrParam));
8219     }
8220 
8221     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
8222 
8223     if (isCallValid)
8224     {
8225         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
8226         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
8227         CaptureGetObjectPtrLabelKHR_length(glState, isCallValid, ptr, bufSize, length, label,
8228                                            &lengthParam);
8229         paramBuffer.addParam(std::move(lengthParam));
8230     }
8231     else
8232     {
8233         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
8234         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
8235                        &lengthParam.value);
8236         paramBuffer.addParam(std::move(lengthParam));
8237     }
8238 
8239     if (isCallValid)
8240     {
8241         ParamCapture labelParam("label", ParamType::TGLcharPointer);
8242         InitParamValue(ParamType::TGLcharPointer, label, &labelParam.value);
8243         CaptureGetObjectPtrLabelKHR_label(glState, isCallValid, ptr, bufSize, length, label,
8244                                           &labelParam);
8245         paramBuffer.addParam(std::move(labelParam));
8246     }
8247     else
8248     {
8249         ParamCapture labelParam("label", ParamType::TGLcharPointer);
8250         InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
8251                        &labelParam.value);
8252         paramBuffer.addParam(std::move(labelParam));
8253     }
8254 
8255     return CallCapture(angle::EntryPoint::GLGetObjectPtrLabelKHR, std::move(paramBuffer));
8256 }
8257 
CaptureGetPointervKHR(const State & glState,bool isCallValid,GLenum pname,void ** params)8258 CallCapture CaptureGetPointervKHR(const State &glState,
8259                                   bool isCallValid,
8260                                   GLenum pname,
8261                                   void **params)
8262 {
8263     ParamBuffer paramBuffer;
8264 
8265     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
8266 
8267     if (isCallValid)
8268     {
8269         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
8270         InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
8271         CaptureGetPointervKHR_params(glState, isCallValid, pname, params, &paramsParam);
8272         paramBuffer.addParam(std::move(paramsParam));
8273     }
8274     else
8275     {
8276         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
8277         InitParamValue(ParamType::TvoidPointerPointer, static_cast<void **>(nullptr),
8278                        &paramsParam.value);
8279         paramBuffer.addParam(std::move(paramsParam));
8280     }
8281 
8282     return CallCapture(angle::EntryPoint::GLGetPointervKHR, std::move(paramBuffer));
8283 }
8284 
CaptureObjectLabelKHR(const State & glState,bool isCallValid,GLenum identifier,GLuint name,GLsizei length,const GLchar * label)8285 CallCapture CaptureObjectLabelKHR(const State &glState,
8286                                   bool isCallValid,
8287                                   GLenum identifier,
8288                                   GLuint name,
8289                                   GLsizei length,
8290                                   const GLchar *label)
8291 {
8292     ParamBuffer paramBuffer;
8293 
8294     paramBuffer.addEnumParam("identifier", GLenumGroup::ObjectIdentifier, ParamType::TGLenum,
8295                              identifier);
8296     paramBuffer.addValueParam("name", ParamType::TGLuint, name);
8297     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
8298 
8299     if (isCallValid)
8300     {
8301         ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
8302         InitParamValue(ParamType::TGLcharConstPointer, label, &labelParam.value);
8303         CaptureObjectLabelKHR_label(glState, isCallValid, identifier, name, length, label,
8304                                     &labelParam);
8305         paramBuffer.addParam(std::move(labelParam));
8306     }
8307     else
8308     {
8309         ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
8310         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
8311                        &labelParam.value);
8312         paramBuffer.addParam(std::move(labelParam));
8313     }
8314 
8315     return CallCapture(angle::EntryPoint::GLObjectLabelKHR, std::move(paramBuffer));
8316 }
8317 
CaptureObjectPtrLabelKHR(const State & glState,bool isCallValid,const void * ptr,GLsizei length,const GLchar * label)8318 CallCapture CaptureObjectPtrLabelKHR(const State &glState,
8319                                      bool isCallValid,
8320                                      const void *ptr,
8321                                      GLsizei length,
8322                                      const GLchar *label)
8323 {
8324     ParamBuffer paramBuffer;
8325 
8326     if (isCallValid)
8327     {
8328         ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
8329         InitParamValue(ParamType::TvoidConstPointer, ptr, &ptrParam.value);
8330         CaptureObjectPtrLabelKHR_ptr(glState, isCallValid, ptr, length, label, &ptrParam);
8331         paramBuffer.addParam(std::move(ptrParam));
8332     }
8333     else
8334     {
8335         ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
8336         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
8337                        &ptrParam.value);
8338         paramBuffer.addParam(std::move(ptrParam));
8339     }
8340 
8341     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
8342 
8343     if (isCallValid)
8344     {
8345         ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
8346         InitParamValue(ParamType::TGLcharConstPointer, label, &labelParam.value);
8347         CaptureObjectPtrLabelKHR_label(glState, isCallValid, ptr, length, label, &labelParam);
8348         paramBuffer.addParam(std::move(labelParam));
8349     }
8350     else
8351     {
8352         ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
8353         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
8354                        &labelParam.value);
8355         paramBuffer.addParam(std::move(labelParam));
8356     }
8357 
8358     return CallCapture(angle::EntryPoint::GLObjectPtrLabelKHR, std::move(paramBuffer));
8359 }
8360 
CapturePopDebugGroupKHR(const State & glState,bool isCallValid)8361 CallCapture CapturePopDebugGroupKHR(const State &glState, bool isCallValid)
8362 {
8363     ParamBuffer paramBuffer;
8364 
8365     return CallCapture(angle::EntryPoint::GLPopDebugGroupKHR, std::move(paramBuffer));
8366 }
8367 
CapturePushDebugGroupKHR(const State & glState,bool isCallValid,GLenum source,GLuint id,GLsizei length,const GLchar * message)8368 CallCapture CapturePushDebugGroupKHR(const State &glState,
8369                                      bool isCallValid,
8370                                      GLenum source,
8371                                      GLuint id,
8372                                      GLsizei length,
8373                                      const GLchar *message)
8374 {
8375     ParamBuffer paramBuffer;
8376 
8377     paramBuffer.addEnumParam("source", GLenumGroup::DebugSource, ParamType::TGLenum, source);
8378     paramBuffer.addValueParam("id", ParamType::TGLuint, id);
8379     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
8380 
8381     if (isCallValid)
8382     {
8383         ParamCapture messageParam("message", ParamType::TGLcharConstPointer);
8384         InitParamValue(ParamType::TGLcharConstPointer, message, &messageParam.value);
8385         CapturePushDebugGroupKHR_message(glState, isCallValid, source, id, length, message,
8386                                          &messageParam);
8387         paramBuffer.addParam(std::move(messageParam));
8388     }
8389     else
8390     {
8391         ParamCapture messageParam("message", ParamType::TGLcharConstPointer);
8392         InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
8393                        &messageParam.value);
8394         paramBuffer.addParam(std::move(messageParam));
8395     }
8396 
8397     return CallCapture(angle::EntryPoint::GLPushDebugGroupKHR, std::move(paramBuffer));
8398 }
8399 
CaptureMaxShaderCompilerThreadsKHR(const State & glState,bool isCallValid,GLuint count)8400 CallCapture CaptureMaxShaderCompilerThreadsKHR(const State &glState, bool isCallValid, GLuint count)
8401 {
8402     ParamBuffer paramBuffer;
8403 
8404     paramBuffer.addValueParam("count", ParamType::TGLuint, count);
8405 
8406     return CallCapture(angle::EntryPoint::GLMaxShaderCompilerThreadsKHR, std::move(paramBuffer));
8407 }
8408 
CaptureDeleteFencesNV(const State & glState,bool isCallValid,GLsizei n,const FenceNVID * fencesPacked)8409 CallCapture CaptureDeleteFencesNV(const State &glState,
8410                                   bool isCallValid,
8411                                   GLsizei n,
8412                                   const FenceNVID *fencesPacked)
8413 {
8414     ParamBuffer paramBuffer;
8415 
8416     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
8417 
8418     if (isCallValid)
8419     {
8420         ParamCapture fencesPackedParam("fencesPacked", ParamType::TFenceNVIDConstPointer);
8421         InitParamValue(ParamType::TFenceNVIDConstPointer, fencesPacked, &fencesPackedParam.value);
8422         CaptureDeleteFencesNV_fencesPacked(glState, isCallValid, n, fencesPacked,
8423                                            &fencesPackedParam);
8424         paramBuffer.addParam(std::move(fencesPackedParam));
8425     }
8426     else
8427     {
8428         ParamCapture fencesPackedParam("fencesPacked", ParamType::TFenceNVIDConstPointer);
8429         InitParamValue(ParamType::TFenceNVIDConstPointer, static_cast<const FenceNVID *>(nullptr),
8430                        &fencesPackedParam.value);
8431         paramBuffer.addParam(std::move(fencesPackedParam));
8432     }
8433 
8434     return CallCapture(angle::EntryPoint::GLDeleteFencesNV, std::move(paramBuffer));
8435 }
8436 
CaptureFinishFenceNV(const State & glState,bool isCallValid,FenceNVID fencePacked)8437 CallCapture CaptureFinishFenceNV(const State &glState, bool isCallValid, FenceNVID fencePacked)
8438 {
8439     ParamBuffer paramBuffer;
8440 
8441     paramBuffer.addValueParam("fencePacked", ParamType::TFenceNVID, fencePacked);
8442 
8443     return CallCapture(angle::EntryPoint::GLFinishFenceNV, std::move(paramBuffer));
8444 }
8445 
CaptureGenFencesNV(const State & glState,bool isCallValid,GLsizei n,FenceNVID * fencesPacked)8446 CallCapture CaptureGenFencesNV(const State &glState,
8447                                bool isCallValid,
8448                                GLsizei n,
8449                                FenceNVID *fencesPacked)
8450 {
8451     ParamBuffer paramBuffer;
8452 
8453     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
8454 
8455     if (isCallValid)
8456     {
8457         ParamCapture fencesPackedParam("fencesPacked", ParamType::TFenceNVIDPointer);
8458         InitParamValue(ParamType::TFenceNVIDPointer, fencesPacked, &fencesPackedParam.value);
8459         CaptureGenFencesNV_fencesPacked(glState, isCallValid, n, fencesPacked, &fencesPackedParam);
8460         paramBuffer.addParam(std::move(fencesPackedParam));
8461     }
8462     else
8463     {
8464         ParamCapture fencesPackedParam("fencesPacked", ParamType::TFenceNVIDPointer);
8465         InitParamValue(ParamType::TFenceNVIDPointer, static_cast<FenceNVID *>(nullptr),
8466                        &fencesPackedParam.value);
8467         paramBuffer.addParam(std::move(fencesPackedParam));
8468     }
8469 
8470     return CallCapture(angle::EntryPoint::GLGenFencesNV, std::move(paramBuffer));
8471 }
8472 
CaptureGetFenceivNV(const State & glState,bool isCallValid,FenceNVID fencePacked,GLenum pname,GLint * params)8473 CallCapture CaptureGetFenceivNV(const State &glState,
8474                                 bool isCallValid,
8475                                 FenceNVID fencePacked,
8476                                 GLenum pname,
8477                                 GLint *params)
8478 {
8479     ParamBuffer paramBuffer;
8480 
8481     paramBuffer.addValueParam("fencePacked", ParamType::TFenceNVID, fencePacked);
8482     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
8483 
8484     if (isCallValid)
8485     {
8486         ParamCapture paramsParam("params", ParamType::TGLintPointer);
8487         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
8488         CaptureGetFenceivNV_params(glState, isCallValid, fencePacked, pname, params, &paramsParam);
8489         paramBuffer.addParam(std::move(paramsParam));
8490     }
8491     else
8492     {
8493         ParamCapture paramsParam("params", ParamType::TGLintPointer);
8494         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
8495         paramBuffer.addParam(std::move(paramsParam));
8496     }
8497 
8498     return CallCapture(angle::EntryPoint::GLGetFenceivNV, std::move(paramBuffer));
8499 }
8500 
CaptureIsFenceNV(const State & glState,bool isCallValid,FenceNVID fencePacked,GLboolean returnValue)8501 CallCapture CaptureIsFenceNV(const State &glState,
8502                              bool isCallValid,
8503                              FenceNVID fencePacked,
8504                              GLboolean returnValue)
8505 {
8506     ParamBuffer paramBuffer;
8507 
8508     paramBuffer.addValueParam("fencePacked", ParamType::TFenceNVID, fencePacked);
8509 
8510     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
8511     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
8512     paramBuffer.addReturnValue(std::move(returnValueCapture));
8513 
8514     return CallCapture(angle::EntryPoint::GLIsFenceNV, std::move(paramBuffer));
8515 }
8516 
CaptureSetFenceNV(const State & glState,bool isCallValid,FenceNVID fencePacked,GLenum condition)8517 CallCapture CaptureSetFenceNV(const State &glState,
8518                               bool isCallValid,
8519                               FenceNVID fencePacked,
8520                               GLenum condition)
8521 {
8522     ParamBuffer paramBuffer;
8523 
8524     paramBuffer.addValueParam("fencePacked", ParamType::TFenceNVID, fencePacked);
8525     paramBuffer.addEnumParam("condition", GLenumGroup::DefaultGroup, ParamType::TGLenum, condition);
8526 
8527     return CallCapture(angle::EntryPoint::GLSetFenceNV, std::move(paramBuffer));
8528 }
8529 
CaptureTestFenceNV(const State & glState,bool isCallValid,FenceNVID fencePacked,GLboolean returnValue)8530 CallCapture CaptureTestFenceNV(const State &glState,
8531                                bool isCallValid,
8532                                FenceNVID fencePacked,
8533                                GLboolean returnValue)
8534 {
8535     ParamBuffer paramBuffer;
8536 
8537     paramBuffer.addValueParam("fencePacked", ParamType::TFenceNVID, fencePacked);
8538 
8539     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
8540     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
8541     paramBuffer.addReturnValue(std::move(returnValueCapture));
8542 
8543     return CallCapture(angle::EntryPoint::GLTestFenceNV, std::move(paramBuffer));
8544 }
8545 
CaptureBlitFramebufferNV(const State & glState,bool isCallValid,GLint srcX0,GLint srcY0,GLint srcX1,GLint srcY1,GLint dstX0,GLint dstY0,GLint dstX1,GLint dstY1,GLbitfield mask,GLenum filter)8546 CallCapture CaptureBlitFramebufferNV(const State &glState,
8547                                      bool isCallValid,
8548                                      GLint srcX0,
8549                                      GLint srcY0,
8550                                      GLint srcX1,
8551                                      GLint srcY1,
8552                                      GLint dstX0,
8553                                      GLint dstY0,
8554                                      GLint dstX1,
8555                                      GLint dstY1,
8556                                      GLbitfield mask,
8557                                      GLenum filter)
8558 {
8559     ParamBuffer paramBuffer;
8560 
8561     paramBuffer.addValueParam("srcX0", ParamType::TGLint, srcX0);
8562     paramBuffer.addValueParam("srcY0", ParamType::TGLint, srcY0);
8563     paramBuffer.addValueParam("srcX1", ParamType::TGLint, srcX1);
8564     paramBuffer.addValueParam("srcY1", ParamType::TGLint, srcY1);
8565     paramBuffer.addValueParam("dstX0", ParamType::TGLint, dstX0);
8566     paramBuffer.addValueParam("dstY0", ParamType::TGLint, dstY0);
8567     paramBuffer.addValueParam("dstX1", ParamType::TGLint, dstX1);
8568     paramBuffer.addValueParam("dstY1", ParamType::TGLint, dstY1);
8569     paramBuffer.addEnumParam("mask", GLenumGroup::ClearBufferMask, ParamType::TGLbitfield, mask);
8570     paramBuffer.addEnumParam("filter", GLenumGroup::BlitFramebufferFilter, ParamType::TGLenum,
8571                              filter);
8572 
8573     return CallCapture(angle::EntryPoint::GLBlitFramebufferNV, std::move(paramBuffer));
8574 }
8575 
CaptureEGLImageTargetRenderbufferStorageOES(const State & glState,bool isCallValid,GLenum target,GLeglImageOES image)8576 CallCapture CaptureEGLImageTargetRenderbufferStorageOES(const State &glState,
8577                                                         bool isCallValid,
8578                                                         GLenum target,
8579                                                         GLeglImageOES image)
8580 {
8581     ParamBuffer paramBuffer;
8582 
8583     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
8584     paramBuffer.addValueParam("image", ParamType::TGLeglImageOES, image);
8585 
8586     return CallCapture(angle::EntryPoint::GLEGLImageTargetRenderbufferStorageOES,
8587                        std::move(paramBuffer));
8588 }
8589 
CaptureEGLImageTargetTexture2DOES(const State & glState,bool isCallValid,TextureType targetPacked,GLeglImageOES image)8590 CallCapture CaptureEGLImageTargetTexture2DOES(const State &glState,
8591                                               bool isCallValid,
8592                                               TextureType targetPacked,
8593                                               GLeglImageOES image)
8594 {
8595     ParamBuffer paramBuffer;
8596 
8597     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
8598     paramBuffer.addValueParam("image", ParamType::TGLeglImageOES, image);
8599 
8600     return CallCapture(angle::EntryPoint::GLEGLImageTargetTexture2DOES, std::move(paramBuffer));
8601 }
8602 
CaptureCopyImageSubDataOES(const State & glState,bool isCallValid,GLuint srcName,GLenum srcTarget,GLint srcLevel,GLint srcX,GLint srcY,GLint srcZ,GLuint dstName,GLenum dstTarget,GLint dstLevel,GLint dstX,GLint dstY,GLint dstZ,GLsizei srcWidth,GLsizei srcHeight,GLsizei srcDepth)8603 CallCapture CaptureCopyImageSubDataOES(const State &glState,
8604                                        bool isCallValid,
8605                                        GLuint srcName,
8606                                        GLenum srcTarget,
8607                                        GLint srcLevel,
8608                                        GLint srcX,
8609                                        GLint srcY,
8610                                        GLint srcZ,
8611                                        GLuint dstName,
8612                                        GLenum dstTarget,
8613                                        GLint dstLevel,
8614                                        GLint dstX,
8615                                        GLint dstY,
8616                                        GLint dstZ,
8617                                        GLsizei srcWidth,
8618                                        GLsizei srcHeight,
8619                                        GLsizei srcDepth)
8620 {
8621     ParamBuffer paramBuffer;
8622 
8623     paramBuffer.addValueParam("srcName", ParamType::TGLuint, srcName);
8624     paramBuffer.addEnumParam("srcTarget", GLenumGroup::CopyBufferSubDataTarget, ParamType::TGLenum,
8625                              srcTarget);
8626     paramBuffer.addValueParam("srcLevel", ParamType::TGLint, srcLevel);
8627     paramBuffer.addValueParam("srcX", ParamType::TGLint, srcX);
8628     paramBuffer.addValueParam("srcY", ParamType::TGLint, srcY);
8629     paramBuffer.addValueParam("srcZ", ParamType::TGLint, srcZ);
8630     paramBuffer.addValueParam("dstName", ParamType::TGLuint, dstName);
8631     paramBuffer.addEnumParam("dstTarget", GLenumGroup::CopyBufferSubDataTarget, ParamType::TGLenum,
8632                              dstTarget);
8633     paramBuffer.addValueParam("dstLevel", ParamType::TGLint, dstLevel);
8634     paramBuffer.addValueParam("dstX", ParamType::TGLint, dstX);
8635     paramBuffer.addValueParam("dstY", ParamType::TGLint, dstY);
8636     paramBuffer.addValueParam("dstZ", ParamType::TGLint, dstZ);
8637     paramBuffer.addValueParam("srcWidth", ParamType::TGLsizei, srcWidth);
8638     paramBuffer.addValueParam("srcHeight", ParamType::TGLsizei, srcHeight);
8639     paramBuffer.addValueParam("srcDepth", ParamType::TGLsizei, srcDepth);
8640 
8641     return CallCapture(angle::EntryPoint::GLCopyImageSubDataOES, std::move(paramBuffer));
8642 }
8643 
CaptureBlendEquationSeparateiOES(const State & glState,bool isCallValid,GLuint buf,GLenum modeRGB,GLenum modeAlpha)8644 CallCapture CaptureBlendEquationSeparateiOES(const State &glState,
8645                                              bool isCallValid,
8646                                              GLuint buf,
8647                                              GLenum modeRGB,
8648                                              GLenum modeAlpha)
8649 {
8650     ParamBuffer paramBuffer;
8651 
8652     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
8653     paramBuffer.addEnumParam("modeRGB", GLenumGroup::BlendEquationModeEXT, ParamType::TGLenum,
8654                              modeRGB);
8655     paramBuffer.addEnumParam("modeAlpha", GLenumGroup::BlendEquationModeEXT, ParamType::TGLenum,
8656                              modeAlpha);
8657 
8658     return CallCapture(angle::EntryPoint::GLBlendEquationSeparateiOES, std::move(paramBuffer));
8659 }
8660 
CaptureBlendEquationiOES(const State & glState,bool isCallValid,GLuint buf,GLenum mode)8661 CallCapture CaptureBlendEquationiOES(const State &glState,
8662                                      bool isCallValid,
8663                                      GLuint buf,
8664                                      GLenum mode)
8665 {
8666     ParamBuffer paramBuffer;
8667 
8668     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
8669     paramBuffer.addEnumParam("mode", GLenumGroup::BlendEquationModeEXT, ParamType::TGLenum, mode);
8670 
8671     return CallCapture(angle::EntryPoint::GLBlendEquationiOES, std::move(paramBuffer));
8672 }
8673 
CaptureBlendFuncSeparateiOES(const State & glState,bool isCallValid,GLuint buf,GLenum srcRGB,GLenum dstRGB,GLenum srcAlpha,GLenum dstAlpha)8674 CallCapture CaptureBlendFuncSeparateiOES(const State &glState,
8675                                          bool isCallValid,
8676                                          GLuint buf,
8677                                          GLenum srcRGB,
8678                                          GLenum dstRGB,
8679                                          GLenum srcAlpha,
8680                                          GLenum dstAlpha)
8681 {
8682     ParamBuffer paramBuffer;
8683 
8684     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
8685     paramBuffer.addEnumParam("srcRGB", GLenumGroup::BlendingFactor, ParamType::TGLenum, srcRGB);
8686     paramBuffer.addEnumParam("dstRGB", GLenumGroup::BlendingFactor, ParamType::TGLenum, dstRGB);
8687     paramBuffer.addEnumParam("srcAlpha", GLenumGroup::BlendingFactor, ParamType::TGLenum, srcAlpha);
8688     paramBuffer.addEnumParam("dstAlpha", GLenumGroup::BlendingFactor, ParamType::TGLenum, dstAlpha);
8689 
8690     return CallCapture(angle::EntryPoint::GLBlendFuncSeparateiOES, std::move(paramBuffer));
8691 }
8692 
CaptureBlendFunciOES(const State & glState,bool isCallValid,GLuint buf,GLenum src,GLenum dst)8693 CallCapture CaptureBlendFunciOES(const State &glState,
8694                                  bool isCallValid,
8695                                  GLuint buf,
8696                                  GLenum src,
8697                                  GLenum dst)
8698 {
8699     ParamBuffer paramBuffer;
8700 
8701     paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
8702     paramBuffer.addEnumParam("src", GLenumGroup::BlendingFactor, ParamType::TGLenum, src);
8703     paramBuffer.addEnumParam("dst", GLenumGroup::BlendingFactor, ParamType::TGLenum, dst);
8704 
8705     return CallCapture(angle::EntryPoint::GLBlendFunciOES, std::move(paramBuffer));
8706 }
8707 
CaptureColorMaskiOES(const State & glState,bool isCallValid,GLuint index,GLboolean r,GLboolean g,GLboolean b,GLboolean a)8708 CallCapture CaptureColorMaskiOES(const State &glState,
8709                                  bool isCallValid,
8710                                  GLuint index,
8711                                  GLboolean r,
8712                                  GLboolean g,
8713                                  GLboolean b,
8714                                  GLboolean a)
8715 {
8716     ParamBuffer paramBuffer;
8717 
8718     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
8719     paramBuffer.addValueParam("r", ParamType::TGLboolean, r);
8720     paramBuffer.addValueParam("g", ParamType::TGLboolean, g);
8721     paramBuffer.addValueParam("b", ParamType::TGLboolean, b);
8722     paramBuffer.addValueParam("a", ParamType::TGLboolean, a);
8723 
8724     return CallCapture(angle::EntryPoint::GLColorMaskiOES, std::move(paramBuffer));
8725 }
8726 
CaptureDisableiOES(const State & glState,bool isCallValid,GLenum target,GLuint index)8727 CallCapture CaptureDisableiOES(const State &glState, bool isCallValid, GLenum target, GLuint index)
8728 {
8729     ParamBuffer paramBuffer;
8730 
8731     paramBuffer.addEnumParam("target", GLenumGroup::EnableCap, ParamType::TGLenum, target);
8732     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
8733 
8734     return CallCapture(angle::EntryPoint::GLDisableiOES, std::move(paramBuffer));
8735 }
8736 
CaptureEnableiOES(const State & glState,bool isCallValid,GLenum target,GLuint index)8737 CallCapture CaptureEnableiOES(const State &glState, bool isCallValid, GLenum target, GLuint index)
8738 {
8739     ParamBuffer paramBuffer;
8740 
8741     paramBuffer.addEnumParam("target", GLenumGroup::EnableCap, ParamType::TGLenum, target);
8742     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
8743 
8744     return CallCapture(angle::EntryPoint::GLEnableiOES, std::move(paramBuffer));
8745 }
8746 
CaptureIsEnablediOES(const State & glState,bool isCallValid,GLenum target,GLuint index,GLboolean returnValue)8747 CallCapture CaptureIsEnablediOES(const State &glState,
8748                                  bool isCallValid,
8749                                  GLenum target,
8750                                  GLuint index,
8751                                  GLboolean returnValue)
8752 {
8753     ParamBuffer paramBuffer;
8754 
8755     paramBuffer.addEnumParam("target", GLenumGroup::EnableCap, ParamType::TGLenum, target);
8756     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
8757 
8758     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
8759     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
8760     paramBuffer.addReturnValue(std::move(returnValueCapture));
8761 
8762     return CallCapture(angle::EntryPoint::GLIsEnablediOES, std::move(paramBuffer));
8763 }
8764 
CaptureDrawElementsBaseVertexOES(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex)8765 CallCapture CaptureDrawElementsBaseVertexOES(const State &glState,
8766                                              bool isCallValid,
8767                                              PrimitiveMode modePacked,
8768                                              GLsizei count,
8769                                              DrawElementsType typePacked,
8770                                              const void *indices,
8771                                              GLint basevertex)
8772 {
8773     ParamBuffer paramBuffer;
8774 
8775     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
8776     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
8777     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
8778 
8779     if (isCallValid)
8780     {
8781         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
8782         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
8783         CaptureDrawElementsBaseVertexOES_indices(glState, isCallValid, modePacked, count,
8784                                                  typePacked, indices, basevertex, &indicesParam);
8785         paramBuffer.addParam(std::move(indicesParam));
8786     }
8787     else
8788     {
8789         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
8790         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
8791                        &indicesParam.value);
8792         paramBuffer.addParam(std::move(indicesParam));
8793     }
8794 
8795     paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
8796 
8797     return CallCapture(angle::EntryPoint::GLDrawElementsBaseVertexOES, std::move(paramBuffer));
8798 }
8799 
CaptureDrawElementsInstancedBaseVertexOES(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount,GLint basevertex)8800 CallCapture CaptureDrawElementsInstancedBaseVertexOES(const State &glState,
8801                                                       bool isCallValid,
8802                                                       PrimitiveMode modePacked,
8803                                                       GLsizei count,
8804                                                       DrawElementsType typePacked,
8805                                                       const void *indices,
8806                                                       GLsizei instancecount,
8807                                                       GLint basevertex)
8808 {
8809     ParamBuffer paramBuffer;
8810 
8811     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
8812     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
8813     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
8814 
8815     if (isCallValid)
8816     {
8817         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
8818         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
8819         CaptureDrawElementsInstancedBaseVertexOES_indices(glState, isCallValid, modePacked, count,
8820                                                           typePacked, indices, instancecount,
8821                                                           basevertex, &indicesParam);
8822         paramBuffer.addParam(std::move(indicesParam));
8823     }
8824     else
8825     {
8826         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
8827         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
8828                        &indicesParam.value);
8829         paramBuffer.addParam(std::move(indicesParam));
8830     }
8831 
8832     paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
8833     paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
8834 
8835     return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseVertexOES,
8836                        std::move(paramBuffer));
8837 }
8838 
CaptureDrawRangeElementsBaseVertexOES(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLuint start,GLuint end,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex)8839 CallCapture CaptureDrawRangeElementsBaseVertexOES(const State &glState,
8840                                                   bool isCallValid,
8841                                                   PrimitiveMode modePacked,
8842                                                   GLuint start,
8843                                                   GLuint end,
8844                                                   GLsizei count,
8845                                                   DrawElementsType typePacked,
8846                                                   const void *indices,
8847                                                   GLint basevertex)
8848 {
8849     ParamBuffer paramBuffer;
8850 
8851     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
8852     paramBuffer.addValueParam("start", ParamType::TGLuint, start);
8853     paramBuffer.addValueParam("end", ParamType::TGLuint, end);
8854     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
8855     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
8856 
8857     if (isCallValid)
8858     {
8859         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
8860         InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
8861         CaptureDrawRangeElementsBaseVertexOES_indices(glState, isCallValid, modePacked, start, end,
8862                                                       count, typePacked, indices, basevertex,
8863                                                       &indicesParam);
8864         paramBuffer.addParam(std::move(indicesParam));
8865     }
8866     else
8867     {
8868         ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
8869         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
8870                        &indicesParam.value);
8871         paramBuffer.addParam(std::move(indicesParam));
8872     }
8873 
8874     paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
8875 
8876     return CallCapture(angle::EntryPoint::GLDrawRangeElementsBaseVertexOES, std::move(paramBuffer));
8877 }
8878 
CaptureDrawTexfOES(const State & glState,bool isCallValid,GLfloat x,GLfloat y,GLfloat z,GLfloat width,GLfloat height)8879 CallCapture CaptureDrawTexfOES(const State &glState,
8880                                bool isCallValid,
8881                                GLfloat x,
8882                                GLfloat y,
8883                                GLfloat z,
8884                                GLfloat width,
8885                                GLfloat height)
8886 {
8887     ParamBuffer paramBuffer;
8888 
8889     paramBuffer.addValueParam("x", ParamType::TGLfloat, x);
8890     paramBuffer.addValueParam("y", ParamType::TGLfloat, y);
8891     paramBuffer.addValueParam("z", ParamType::TGLfloat, z);
8892     paramBuffer.addValueParam("width", ParamType::TGLfloat, width);
8893     paramBuffer.addValueParam("height", ParamType::TGLfloat, height);
8894 
8895     return CallCapture(angle::EntryPoint::GLDrawTexfOES, std::move(paramBuffer));
8896 }
8897 
CaptureDrawTexfvOES(const State & glState,bool isCallValid,const GLfloat * coords)8898 CallCapture CaptureDrawTexfvOES(const State &glState, bool isCallValid, const GLfloat *coords)
8899 {
8900     ParamBuffer paramBuffer;
8901 
8902     if (isCallValid)
8903     {
8904         ParamCapture coordsParam("coords", ParamType::TGLfloatConstPointer);
8905         InitParamValue(ParamType::TGLfloatConstPointer, coords, &coordsParam.value);
8906         CaptureDrawTexfvOES_coords(glState, isCallValid, coords, &coordsParam);
8907         paramBuffer.addParam(std::move(coordsParam));
8908     }
8909     else
8910     {
8911         ParamCapture coordsParam("coords", ParamType::TGLfloatConstPointer);
8912         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
8913                        &coordsParam.value);
8914         paramBuffer.addParam(std::move(coordsParam));
8915     }
8916 
8917     return CallCapture(angle::EntryPoint::GLDrawTexfvOES, std::move(paramBuffer));
8918 }
8919 
CaptureDrawTexiOES(const State & glState,bool isCallValid,GLint x,GLint y,GLint z,GLint width,GLint height)8920 CallCapture CaptureDrawTexiOES(const State &glState,
8921                                bool isCallValid,
8922                                GLint x,
8923                                GLint y,
8924                                GLint z,
8925                                GLint width,
8926                                GLint height)
8927 {
8928     ParamBuffer paramBuffer;
8929 
8930     paramBuffer.addValueParam("x", ParamType::TGLint, x);
8931     paramBuffer.addValueParam("y", ParamType::TGLint, y);
8932     paramBuffer.addValueParam("z", ParamType::TGLint, z);
8933     paramBuffer.addValueParam("width", ParamType::TGLint, width);
8934     paramBuffer.addValueParam("height", ParamType::TGLint, height);
8935 
8936     return CallCapture(angle::EntryPoint::GLDrawTexiOES, std::move(paramBuffer));
8937 }
8938 
CaptureDrawTexivOES(const State & glState,bool isCallValid,const GLint * coords)8939 CallCapture CaptureDrawTexivOES(const State &glState, bool isCallValid, const GLint *coords)
8940 {
8941     ParamBuffer paramBuffer;
8942 
8943     if (isCallValid)
8944     {
8945         ParamCapture coordsParam("coords", ParamType::TGLintConstPointer);
8946         InitParamValue(ParamType::TGLintConstPointer, coords, &coordsParam.value);
8947         CaptureDrawTexivOES_coords(glState, isCallValid, coords, &coordsParam);
8948         paramBuffer.addParam(std::move(coordsParam));
8949     }
8950     else
8951     {
8952         ParamCapture coordsParam("coords", ParamType::TGLintConstPointer);
8953         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
8954                        &coordsParam.value);
8955         paramBuffer.addParam(std::move(coordsParam));
8956     }
8957 
8958     return CallCapture(angle::EntryPoint::GLDrawTexivOES, std::move(paramBuffer));
8959 }
8960 
CaptureDrawTexsOES(const State & glState,bool isCallValid,GLshort x,GLshort y,GLshort z,GLshort width,GLshort height)8961 CallCapture CaptureDrawTexsOES(const State &glState,
8962                                bool isCallValid,
8963                                GLshort x,
8964                                GLshort y,
8965                                GLshort z,
8966                                GLshort width,
8967                                GLshort height)
8968 {
8969     ParamBuffer paramBuffer;
8970 
8971     paramBuffer.addValueParam("x", ParamType::TGLshort, x);
8972     paramBuffer.addValueParam("y", ParamType::TGLshort, y);
8973     paramBuffer.addValueParam("z", ParamType::TGLshort, z);
8974     paramBuffer.addValueParam("width", ParamType::TGLshort, width);
8975     paramBuffer.addValueParam("height", ParamType::TGLshort, height);
8976 
8977     return CallCapture(angle::EntryPoint::GLDrawTexsOES, std::move(paramBuffer));
8978 }
8979 
CaptureDrawTexsvOES(const State & glState,bool isCallValid,const GLshort * coords)8980 CallCapture CaptureDrawTexsvOES(const State &glState, bool isCallValid, const GLshort *coords)
8981 {
8982     ParamBuffer paramBuffer;
8983 
8984     if (isCallValid)
8985     {
8986         ParamCapture coordsParam("coords", ParamType::TGLshortConstPointer);
8987         InitParamValue(ParamType::TGLshortConstPointer, coords, &coordsParam.value);
8988         CaptureDrawTexsvOES_coords(glState, isCallValid, coords, &coordsParam);
8989         paramBuffer.addParam(std::move(coordsParam));
8990     }
8991     else
8992     {
8993         ParamCapture coordsParam("coords", ParamType::TGLshortConstPointer);
8994         InitParamValue(ParamType::TGLshortConstPointer, static_cast<const GLshort *>(nullptr),
8995                        &coordsParam.value);
8996         paramBuffer.addParam(std::move(coordsParam));
8997     }
8998 
8999     return CallCapture(angle::EntryPoint::GLDrawTexsvOES, std::move(paramBuffer));
9000 }
9001 
CaptureDrawTexxOES(const State & glState,bool isCallValid,GLfixed x,GLfixed y,GLfixed z,GLfixed width,GLfixed height)9002 CallCapture CaptureDrawTexxOES(const State &glState,
9003                                bool isCallValid,
9004                                GLfixed x,
9005                                GLfixed y,
9006                                GLfixed z,
9007                                GLfixed width,
9008                                GLfixed height)
9009 {
9010     ParamBuffer paramBuffer;
9011 
9012     paramBuffer.addValueParam("x", ParamType::TGLfixed, x);
9013     paramBuffer.addValueParam("y", ParamType::TGLfixed, y);
9014     paramBuffer.addValueParam("z", ParamType::TGLfixed, z);
9015     paramBuffer.addValueParam("width", ParamType::TGLfixed, width);
9016     paramBuffer.addValueParam("height", ParamType::TGLfixed, height);
9017 
9018     return CallCapture(angle::EntryPoint::GLDrawTexxOES, std::move(paramBuffer));
9019 }
9020 
CaptureDrawTexxvOES(const State & glState,bool isCallValid,const GLfixed * coords)9021 CallCapture CaptureDrawTexxvOES(const State &glState, bool isCallValid, const GLfixed *coords)
9022 {
9023     ParamBuffer paramBuffer;
9024 
9025     if (isCallValid)
9026     {
9027         ParamCapture coordsParam("coords", ParamType::TGLfixedConstPointer);
9028         InitParamValue(ParamType::TGLfixedConstPointer, coords, &coordsParam.value);
9029         CaptureDrawTexxvOES_coords(glState, isCallValid, coords, &coordsParam);
9030         paramBuffer.addParam(std::move(coordsParam));
9031     }
9032     else
9033     {
9034         ParamCapture coordsParam("coords", ParamType::TGLfixedConstPointer);
9035         InitParamValue(ParamType::TGLfixedConstPointer, static_cast<const GLfixed *>(nullptr),
9036                        &coordsParam.value);
9037         paramBuffer.addParam(std::move(coordsParam));
9038     }
9039 
9040     return CallCapture(angle::EntryPoint::GLDrawTexxvOES, std::move(paramBuffer));
9041 }
9042 
CaptureBindFramebufferOES(const State & glState,bool isCallValid,GLenum target,FramebufferID framebufferPacked)9043 CallCapture CaptureBindFramebufferOES(const State &glState,
9044                                       bool isCallValid,
9045                                       GLenum target,
9046                                       FramebufferID framebufferPacked)
9047 {
9048     ParamBuffer paramBuffer;
9049 
9050     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
9051     paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
9052 
9053     return CallCapture(angle::EntryPoint::GLBindFramebufferOES, std::move(paramBuffer));
9054 }
9055 
CaptureBindRenderbufferOES(const State & glState,bool isCallValid,GLenum target,RenderbufferID renderbufferPacked)9056 CallCapture CaptureBindRenderbufferOES(const State &glState,
9057                                        bool isCallValid,
9058                                        GLenum target,
9059                                        RenderbufferID renderbufferPacked)
9060 {
9061     ParamBuffer paramBuffer;
9062 
9063     paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
9064     paramBuffer.addValueParam("renderbufferPacked", ParamType::TRenderbufferID, renderbufferPacked);
9065 
9066     return CallCapture(angle::EntryPoint::GLBindRenderbufferOES, std::move(paramBuffer));
9067 }
9068 
CaptureCheckFramebufferStatusOES(const State & glState,bool isCallValid,GLenum target,GLenum returnValue)9069 CallCapture CaptureCheckFramebufferStatusOES(const State &glState,
9070                                              bool isCallValid,
9071                                              GLenum target,
9072                                              GLenum returnValue)
9073 {
9074     ParamBuffer paramBuffer;
9075 
9076     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
9077 
9078     ParamCapture returnValueCapture("returnValue", ParamType::TGLenum);
9079     InitParamValue(ParamType::TGLenum, returnValue, &returnValueCapture.value);
9080     paramBuffer.addReturnValue(std::move(returnValueCapture));
9081 
9082     return CallCapture(angle::EntryPoint::GLCheckFramebufferStatusOES, std::move(paramBuffer));
9083 }
9084 
CaptureDeleteFramebuffersOES(const State & glState,bool isCallValid,GLsizei n,const FramebufferID * framebuffersPacked)9085 CallCapture CaptureDeleteFramebuffersOES(const State &glState,
9086                                          bool isCallValid,
9087                                          GLsizei n,
9088                                          const FramebufferID *framebuffersPacked)
9089 {
9090     ParamBuffer paramBuffer;
9091 
9092     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
9093 
9094     if (isCallValid)
9095     {
9096         ParamCapture framebuffersPackedParam("framebuffersPacked",
9097                                              ParamType::TFramebufferIDConstPointer);
9098         InitParamValue(ParamType::TFramebufferIDConstPointer, framebuffersPacked,
9099                        &framebuffersPackedParam.value);
9100         CaptureDeleteFramebuffersOES_framebuffersPacked(glState, isCallValid, n, framebuffersPacked,
9101                                                         &framebuffersPackedParam);
9102         paramBuffer.addParam(std::move(framebuffersPackedParam));
9103     }
9104     else
9105     {
9106         ParamCapture framebuffersPackedParam("framebuffersPacked",
9107                                              ParamType::TFramebufferIDConstPointer);
9108         InitParamValue(ParamType::TFramebufferIDConstPointer,
9109                        static_cast<const FramebufferID *>(nullptr), &framebuffersPackedParam.value);
9110         paramBuffer.addParam(std::move(framebuffersPackedParam));
9111     }
9112 
9113     return CallCapture(angle::EntryPoint::GLDeleteFramebuffersOES, std::move(paramBuffer));
9114 }
9115 
CaptureDeleteRenderbuffersOES(const State & glState,bool isCallValid,GLsizei n,const RenderbufferID * renderbuffersPacked)9116 CallCapture CaptureDeleteRenderbuffersOES(const State &glState,
9117                                           bool isCallValid,
9118                                           GLsizei n,
9119                                           const RenderbufferID *renderbuffersPacked)
9120 {
9121     ParamBuffer paramBuffer;
9122 
9123     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
9124 
9125     if (isCallValid)
9126     {
9127         ParamCapture renderbuffersPackedParam("renderbuffersPacked",
9128                                               ParamType::TRenderbufferIDConstPointer);
9129         InitParamValue(ParamType::TRenderbufferIDConstPointer, renderbuffersPacked,
9130                        &renderbuffersPackedParam.value);
9131         CaptureDeleteRenderbuffersOES_renderbuffersPacked(
9132             glState, isCallValid, n, renderbuffersPacked, &renderbuffersPackedParam);
9133         paramBuffer.addParam(std::move(renderbuffersPackedParam));
9134     }
9135     else
9136     {
9137         ParamCapture renderbuffersPackedParam("renderbuffersPacked",
9138                                               ParamType::TRenderbufferIDConstPointer);
9139         InitParamValue(ParamType::TRenderbufferIDConstPointer,
9140                        static_cast<const RenderbufferID *>(nullptr),
9141                        &renderbuffersPackedParam.value);
9142         paramBuffer.addParam(std::move(renderbuffersPackedParam));
9143     }
9144 
9145     return CallCapture(angle::EntryPoint::GLDeleteRenderbuffersOES, std::move(paramBuffer));
9146 }
9147 
CaptureFramebufferRenderbufferOES(const State & glState,bool isCallValid,GLenum target,GLenum attachment,GLenum renderbuffertarget,RenderbufferID renderbufferPacked)9148 CallCapture CaptureFramebufferRenderbufferOES(const State &glState,
9149                                               bool isCallValid,
9150                                               GLenum target,
9151                                               GLenum attachment,
9152                                               GLenum renderbuffertarget,
9153                                               RenderbufferID renderbufferPacked)
9154 {
9155     ParamBuffer paramBuffer;
9156 
9157     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
9158     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
9159                              attachment);
9160     paramBuffer.addEnumParam("renderbuffertarget", GLenumGroup::RenderbufferTarget,
9161                              ParamType::TGLenum, renderbuffertarget);
9162     paramBuffer.addValueParam("renderbufferPacked", ParamType::TRenderbufferID, renderbufferPacked);
9163 
9164     return CallCapture(angle::EntryPoint::GLFramebufferRenderbufferOES, std::move(paramBuffer));
9165 }
9166 
CaptureFramebufferTexture2DOES(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureTarget textargetPacked,TextureID texturePacked,GLint level)9167 CallCapture CaptureFramebufferTexture2DOES(const State &glState,
9168                                            bool isCallValid,
9169                                            GLenum target,
9170                                            GLenum attachment,
9171                                            TextureTarget textargetPacked,
9172                                            TextureID texturePacked,
9173                                            GLint level)
9174 {
9175     ParamBuffer paramBuffer;
9176 
9177     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
9178     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
9179                              attachment);
9180     paramBuffer.addValueParam("textargetPacked", ParamType::TTextureTarget, textargetPacked);
9181     paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
9182     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9183 
9184     return CallCapture(angle::EntryPoint::GLFramebufferTexture2DOES, std::move(paramBuffer));
9185 }
9186 
CaptureGenFramebuffersOES(const State & glState,bool isCallValid,GLsizei n,FramebufferID * framebuffersPacked)9187 CallCapture CaptureGenFramebuffersOES(const State &glState,
9188                                       bool isCallValid,
9189                                       GLsizei n,
9190                                       FramebufferID *framebuffersPacked)
9191 {
9192     ParamBuffer paramBuffer;
9193 
9194     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
9195 
9196     if (isCallValid)
9197     {
9198         ParamCapture framebuffersPackedParam("framebuffersPacked",
9199                                              ParamType::TFramebufferIDPointer);
9200         InitParamValue(ParamType::TFramebufferIDPointer, framebuffersPacked,
9201                        &framebuffersPackedParam.value);
9202         CaptureGenFramebuffersOES_framebuffersPacked(glState, isCallValid, n, framebuffersPacked,
9203                                                      &framebuffersPackedParam);
9204         paramBuffer.addParam(std::move(framebuffersPackedParam));
9205     }
9206     else
9207     {
9208         ParamCapture framebuffersPackedParam("framebuffersPacked",
9209                                              ParamType::TFramebufferIDPointer);
9210         InitParamValue(ParamType::TFramebufferIDPointer, static_cast<FramebufferID *>(nullptr),
9211                        &framebuffersPackedParam.value);
9212         paramBuffer.addParam(std::move(framebuffersPackedParam));
9213     }
9214 
9215     return CallCapture(angle::EntryPoint::GLGenFramebuffersOES, std::move(paramBuffer));
9216 }
9217 
CaptureGenRenderbuffersOES(const State & glState,bool isCallValid,GLsizei n,RenderbufferID * renderbuffersPacked)9218 CallCapture CaptureGenRenderbuffersOES(const State &glState,
9219                                        bool isCallValid,
9220                                        GLsizei n,
9221                                        RenderbufferID *renderbuffersPacked)
9222 {
9223     ParamBuffer paramBuffer;
9224 
9225     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
9226 
9227     if (isCallValid)
9228     {
9229         ParamCapture renderbuffersPackedParam("renderbuffersPacked",
9230                                               ParamType::TRenderbufferIDPointer);
9231         InitParamValue(ParamType::TRenderbufferIDPointer, renderbuffersPacked,
9232                        &renderbuffersPackedParam.value);
9233         CaptureGenRenderbuffersOES_renderbuffersPacked(glState, isCallValid, n, renderbuffersPacked,
9234                                                        &renderbuffersPackedParam);
9235         paramBuffer.addParam(std::move(renderbuffersPackedParam));
9236     }
9237     else
9238     {
9239         ParamCapture renderbuffersPackedParam("renderbuffersPacked",
9240                                               ParamType::TRenderbufferIDPointer);
9241         InitParamValue(ParamType::TRenderbufferIDPointer, static_cast<RenderbufferID *>(nullptr),
9242                        &renderbuffersPackedParam.value);
9243         paramBuffer.addParam(std::move(renderbuffersPackedParam));
9244     }
9245 
9246     return CallCapture(angle::EntryPoint::GLGenRenderbuffersOES, std::move(paramBuffer));
9247 }
9248 
CaptureGenerateMipmapOES(const State & glState,bool isCallValid,TextureType targetPacked)9249 CallCapture CaptureGenerateMipmapOES(const State &glState,
9250                                      bool isCallValid,
9251                                      TextureType targetPacked)
9252 {
9253     ParamBuffer paramBuffer;
9254 
9255     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
9256 
9257     return CallCapture(angle::EntryPoint::GLGenerateMipmapOES, std::move(paramBuffer));
9258 }
9259 
CaptureGetFramebufferAttachmentParameterivOES(const State & glState,bool isCallValid,GLenum target,GLenum attachment,GLenum pname,GLint * params)9260 CallCapture CaptureGetFramebufferAttachmentParameterivOES(const State &glState,
9261                                                           bool isCallValid,
9262                                                           GLenum target,
9263                                                           GLenum attachment,
9264                                                           GLenum pname,
9265                                                           GLint *params)
9266 {
9267     ParamBuffer paramBuffer;
9268 
9269     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
9270     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
9271                              attachment);
9272     paramBuffer.addEnumParam("pname", GLenumGroup::FramebufferAttachmentParameterName,
9273                              ParamType::TGLenum, pname);
9274 
9275     if (isCallValid)
9276     {
9277         ParamCapture paramsParam("params", ParamType::TGLintPointer);
9278         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
9279         CaptureGetFramebufferAttachmentParameterivOES_params(
9280             glState, isCallValid, target, attachment, pname, params, &paramsParam);
9281         paramBuffer.addParam(std::move(paramsParam));
9282     }
9283     else
9284     {
9285         ParamCapture paramsParam("params", ParamType::TGLintPointer);
9286         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
9287         paramBuffer.addParam(std::move(paramsParam));
9288     }
9289 
9290     return CallCapture(angle::EntryPoint::GLGetFramebufferAttachmentParameterivOES,
9291                        std::move(paramBuffer));
9292 }
9293 
CaptureGetRenderbufferParameterivOES(const State & glState,bool isCallValid,GLenum target,GLenum pname,GLint * params)9294 CallCapture CaptureGetRenderbufferParameterivOES(const State &glState,
9295                                                  bool isCallValid,
9296                                                  GLenum target,
9297                                                  GLenum pname,
9298                                                  GLint *params)
9299 {
9300     ParamBuffer paramBuffer;
9301 
9302     paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
9303     paramBuffer.addEnumParam("pname", GLenumGroup::RenderbufferParameterName, ParamType::TGLenum,
9304                              pname);
9305 
9306     if (isCallValid)
9307     {
9308         ParamCapture paramsParam("params", ParamType::TGLintPointer);
9309         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
9310         CaptureGetRenderbufferParameterivOES_params(glState, isCallValid, target, pname, params,
9311                                                     &paramsParam);
9312         paramBuffer.addParam(std::move(paramsParam));
9313     }
9314     else
9315     {
9316         ParamCapture paramsParam("params", ParamType::TGLintPointer);
9317         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
9318         paramBuffer.addParam(std::move(paramsParam));
9319     }
9320 
9321     return CallCapture(angle::EntryPoint::GLGetRenderbufferParameterivOES, std::move(paramBuffer));
9322 }
9323 
CaptureIsFramebufferOES(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLboolean returnValue)9324 CallCapture CaptureIsFramebufferOES(const State &glState,
9325                                     bool isCallValid,
9326                                     FramebufferID framebufferPacked,
9327                                     GLboolean returnValue)
9328 {
9329     ParamBuffer paramBuffer;
9330 
9331     paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
9332 
9333     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
9334     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
9335     paramBuffer.addReturnValue(std::move(returnValueCapture));
9336 
9337     return CallCapture(angle::EntryPoint::GLIsFramebufferOES, std::move(paramBuffer));
9338 }
9339 
CaptureIsRenderbufferOES(const State & glState,bool isCallValid,RenderbufferID renderbufferPacked,GLboolean returnValue)9340 CallCapture CaptureIsRenderbufferOES(const State &glState,
9341                                      bool isCallValid,
9342                                      RenderbufferID renderbufferPacked,
9343                                      GLboolean returnValue)
9344 {
9345     ParamBuffer paramBuffer;
9346 
9347     paramBuffer.addValueParam("renderbufferPacked", ParamType::TRenderbufferID, renderbufferPacked);
9348 
9349     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
9350     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
9351     paramBuffer.addReturnValue(std::move(returnValueCapture));
9352 
9353     return CallCapture(angle::EntryPoint::GLIsRenderbufferOES, std::move(paramBuffer));
9354 }
9355 
CaptureRenderbufferStorageOES(const State & glState,bool isCallValid,GLenum target,GLenum internalformat,GLsizei width,GLsizei height)9356 CallCapture CaptureRenderbufferStorageOES(const State &glState,
9357                                           bool isCallValid,
9358                                           GLenum target,
9359                                           GLenum internalformat,
9360                                           GLsizei width,
9361                                           GLsizei height)
9362 {
9363     ParamBuffer paramBuffer;
9364 
9365     paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
9366     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
9367                              internalformat);
9368     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
9369     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
9370 
9371     return CallCapture(angle::EntryPoint::GLRenderbufferStorageOES, std::move(paramBuffer));
9372 }
9373 
CaptureFramebufferTextureOES(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureID texturePacked,GLint level)9374 CallCapture CaptureFramebufferTextureOES(const State &glState,
9375                                          bool isCallValid,
9376                                          GLenum target,
9377                                          GLenum attachment,
9378                                          TextureID texturePacked,
9379                                          GLint level)
9380 {
9381     ParamBuffer paramBuffer;
9382 
9383     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
9384     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
9385                              attachment);
9386     paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
9387     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9388 
9389     return CallCapture(angle::EntryPoint::GLFramebufferTextureOES, std::move(paramBuffer));
9390 }
9391 
CaptureGetProgramBinaryOES(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLsizei bufSize,GLsizei * length,GLenum * binaryFormat,void * binary)9392 CallCapture CaptureGetProgramBinaryOES(const State &glState,
9393                                        bool isCallValid,
9394                                        ShaderProgramID programPacked,
9395                                        GLsizei bufSize,
9396                                        GLsizei *length,
9397                                        GLenum *binaryFormat,
9398                                        void *binary)
9399 {
9400     ParamBuffer paramBuffer;
9401 
9402     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
9403     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
9404 
9405     if (isCallValid)
9406     {
9407         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
9408         InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
9409         CaptureGetProgramBinaryOES_length(glState, isCallValid, programPacked, bufSize, length,
9410                                           binaryFormat, binary, &lengthParam);
9411         paramBuffer.addParam(std::move(lengthParam));
9412     }
9413     else
9414     {
9415         ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
9416         InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
9417                        &lengthParam.value);
9418         paramBuffer.addParam(std::move(lengthParam));
9419     }
9420 
9421     if (isCallValid)
9422     {
9423         ParamCapture binaryFormatParam("binaryFormat", ParamType::TGLenumPointer);
9424         InitParamValue(ParamType::TGLenumPointer, binaryFormat, &binaryFormatParam.value);
9425         CaptureGetProgramBinaryOES_binaryFormat(glState, isCallValid, programPacked, bufSize,
9426                                                 length, binaryFormat, binary, &binaryFormatParam);
9427         paramBuffer.addParam(std::move(binaryFormatParam));
9428     }
9429     else
9430     {
9431         ParamCapture binaryFormatParam("binaryFormat", ParamType::TGLenumPointer);
9432         InitParamValue(ParamType::TGLenumPointer, static_cast<GLenum *>(nullptr),
9433                        &binaryFormatParam.value);
9434         paramBuffer.addParam(std::move(binaryFormatParam));
9435     }
9436 
9437     if (isCallValid)
9438     {
9439         ParamCapture binaryParam("binary", ParamType::TvoidPointer);
9440         InitParamValue(ParamType::TvoidPointer, binary, &binaryParam.value);
9441         CaptureGetProgramBinaryOES_binary(glState, isCallValid, programPacked, bufSize, length,
9442                                           binaryFormat, binary, &binaryParam);
9443         paramBuffer.addParam(std::move(binaryParam));
9444     }
9445     else
9446     {
9447         ParamCapture binaryParam("binary", ParamType::TvoidPointer);
9448         InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &binaryParam.value);
9449         paramBuffer.addParam(std::move(binaryParam));
9450     }
9451 
9452     return CallCapture(angle::EntryPoint::GLGetProgramBinaryOES, std::move(paramBuffer));
9453 }
9454 
CaptureProgramBinaryOES(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum binaryFormat,const void * binary,GLint length)9455 CallCapture CaptureProgramBinaryOES(const State &glState,
9456                                     bool isCallValid,
9457                                     ShaderProgramID programPacked,
9458                                     GLenum binaryFormat,
9459                                     const void *binary,
9460                                     GLint length)
9461 {
9462     ParamBuffer paramBuffer;
9463 
9464     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
9465     paramBuffer.addEnumParam("binaryFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
9466                              binaryFormat);
9467 
9468     if (isCallValid)
9469     {
9470         ParamCapture binaryParam("binary", ParamType::TvoidConstPointer);
9471         InitParamValue(ParamType::TvoidConstPointer, binary, &binaryParam.value);
9472         CaptureProgramBinaryOES_binary(glState, isCallValid, programPacked, binaryFormat, binary,
9473                                        length, &binaryParam);
9474         paramBuffer.addParam(std::move(binaryParam));
9475     }
9476     else
9477     {
9478         ParamCapture binaryParam("binary", ParamType::TvoidConstPointer);
9479         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9480                        &binaryParam.value);
9481         paramBuffer.addParam(std::move(binaryParam));
9482     }
9483 
9484     paramBuffer.addValueParam("length", ParamType::TGLint, length);
9485 
9486     return CallCapture(angle::EntryPoint::GLProgramBinaryOES, std::move(paramBuffer));
9487 }
9488 
CaptureGetBufferPointervOES(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,void ** params)9489 CallCapture CaptureGetBufferPointervOES(const State &glState,
9490                                         bool isCallValid,
9491                                         BufferBinding targetPacked,
9492                                         GLenum pname,
9493                                         void **params)
9494 {
9495     ParamBuffer paramBuffer;
9496 
9497     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
9498     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
9499 
9500     if (isCallValid)
9501     {
9502         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
9503         InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
9504         CaptureGetBufferPointervOES_params(glState, isCallValid, targetPacked, pname, params,
9505                                            &paramsParam);
9506         paramBuffer.addParam(std::move(paramsParam));
9507     }
9508     else
9509     {
9510         ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
9511         InitParamValue(ParamType::TvoidPointerPointer, static_cast<void **>(nullptr),
9512                        &paramsParam.value);
9513         paramBuffer.addParam(std::move(paramsParam));
9514     }
9515 
9516     return CallCapture(angle::EntryPoint::GLGetBufferPointervOES, std::move(paramBuffer));
9517 }
9518 
CaptureMapBufferOES(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum access,void * returnValue)9519 CallCapture CaptureMapBufferOES(const State &glState,
9520                                 bool isCallValid,
9521                                 BufferBinding targetPacked,
9522                                 GLenum access,
9523                                 void *returnValue)
9524 {
9525     ParamBuffer paramBuffer;
9526 
9527     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
9528     paramBuffer.addEnumParam("access", GLenumGroup::BufferAccessARB, ParamType::TGLenum, access);
9529 
9530     ParamCapture returnValueCapture("returnValue", ParamType::TvoidPointer);
9531     InitParamValue(ParamType::TvoidPointer, returnValue, &returnValueCapture.value);
9532     paramBuffer.addReturnValue(std::move(returnValueCapture));
9533 
9534     return CallCapture(angle::EntryPoint::GLMapBufferOES, std::move(paramBuffer));
9535 }
9536 
CaptureUnmapBufferOES(const State & glState,bool isCallValid,BufferBinding targetPacked,GLboolean returnValue)9537 CallCapture CaptureUnmapBufferOES(const State &glState,
9538                                   bool isCallValid,
9539                                   BufferBinding targetPacked,
9540                                   GLboolean returnValue)
9541 {
9542     ParamBuffer paramBuffer;
9543 
9544     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
9545 
9546     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
9547     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
9548     paramBuffer.addReturnValue(std::move(returnValueCapture));
9549 
9550     return CallCapture(angle::EntryPoint::GLUnmapBufferOES, std::move(paramBuffer));
9551 }
9552 
CaptureCurrentPaletteMatrixOES(const State & glState,bool isCallValid,GLuint matrixpaletteindex)9553 CallCapture CaptureCurrentPaletteMatrixOES(const State &glState,
9554                                            bool isCallValid,
9555                                            GLuint matrixpaletteindex)
9556 {
9557     ParamBuffer paramBuffer;
9558 
9559     paramBuffer.addValueParam("matrixpaletteindex", ParamType::TGLuint, matrixpaletteindex);
9560 
9561     return CallCapture(angle::EntryPoint::GLCurrentPaletteMatrixOES, std::move(paramBuffer));
9562 }
9563 
CaptureLoadPaletteFromModelViewMatrixOES(const State & glState,bool isCallValid)9564 CallCapture CaptureLoadPaletteFromModelViewMatrixOES(const State &glState, bool isCallValid)
9565 {
9566     ParamBuffer paramBuffer;
9567 
9568     return CallCapture(angle::EntryPoint::GLLoadPaletteFromModelViewMatrixOES,
9569                        std::move(paramBuffer));
9570 }
9571 
CaptureMatrixIndexPointerOES(const State & glState,bool isCallValid,GLint size,GLenum type,GLsizei stride,const void * pointer)9572 CallCapture CaptureMatrixIndexPointerOES(const State &glState,
9573                                          bool isCallValid,
9574                                          GLint size,
9575                                          GLenum type,
9576                                          GLsizei stride,
9577                                          const void *pointer)
9578 {
9579     ParamBuffer paramBuffer;
9580 
9581     paramBuffer.addValueParam("size", ParamType::TGLint, size);
9582     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
9583     paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
9584 
9585     if (isCallValid)
9586     {
9587         ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
9588         InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
9589         CaptureMatrixIndexPointerOES_pointer(glState, isCallValid, size, type, stride, pointer,
9590                                              &pointerParam);
9591         paramBuffer.addParam(std::move(pointerParam));
9592     }
9593     else
9594     {
9595         ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
9596         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9597                        &pointerParam.value);
9598         paramBuffer.addParam(std::move(pointerParam));
9599     }
9600 
9601     return CallCapture(angle::EntryPoint::GLMatrixIndexPointerOES, std::move(paramBuffer));
9602 }
9603 
CaptureWeightPointerOES(const State & glState,bool isCallValid,GLint size,GLenum type,GLsizei stride,const void * pointer)9604 CallCapture CaptureWeightPointerOES(const State &glState,
9605                                     bool isCallValid,
9606                                     GLint size,
9607                                     GLenum type,
9608                                     GLsizei stride,
9609                                     const void *pointer)
9610 {
9611     ParamBuffer paramBuffer;
9612 
9613     paramBuffer.addValueParam("size", ParamType::TGLint, size);
9614     paramBuffer.addEnumParam("type", GLenumGroup::DefaultGroup, ParamType::TGLenum, type);
9615     paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
9616 
9617     if (isCallValid)
9618     {
9619         ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
9620         InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
9621         CaptureWeightPointerOES_pointer(glState, isCallValid, size, type, stride, pointer,
9622                                         &pointerParam);
9623         paramBuffer.addParam(std::move(pointerParam));
9624     }
9625     else
9626     {
9627         ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
9628         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9629                        &pointerParam.value);
9630         paramBuffer.addParam(std::move(pointerParam));
9631     }
9632 
9633     return CallCapture(angle::EntryPoint::GLWeightPointerOES, std::move(paramBuffer));
9634 }
9635 
CapturePointSizePointerOES(const State & glState,bool isCallValid,VertexAttribType typePacked,GLsizei stride,const void * pointer)9636 CallCapture CapturePointSizePointerOES(const State &glState,
9637                                        bool isCallValid,
9638                                        VertexAttribType typePacked,
9639                                        GLsizei stride,
9640                                        const void *pointer)
9641 {
9642     ParamBuffer paramBuffer;
9643 
9644     paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
9645     paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
9646 
9647     if (isCallValid)
9648     {
9649         ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
9650         InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
9651         CapturePointSizePointerOES_pointer(glState, isCallValid, typePacked, stride, pointer,
9652                                            &pointerParam);
9653         paramBuffer.addParam(std::move(pointerParam));
9654     }
9655     else
9656     {
9657         ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
9658         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9659                        &pointerParam.value);
9660         paramBuffer.addParam(std::move(pointerParam));
9661     }
9662 
9663     return CallCapture(angle::EntryPoint::GLPointSizePointerOES, std::move(paramBuffer));
9664 }
9665 
CaptureQueryMatrixxOES(const State & glState,bool isCallValid,GLfixed * mantissa,GLint * exponent,GLbitfield returnValue)9666 CallCapture CaptureQueryMatrixxOES(const State &glState,
9667                                    bool isCallValid,
9668                                    GLfixed *mantissa,
9669                                    GLint *exponent,
9670                                    GLbitfield returnValue)
9671 {
9672     ParamBuffer paramBuffer;
9673 
9674     if (isCallValid)
9675     {
9676         ParamCapture mantissaParam("mantissa", ParamType::TGLfixedPointer);
9677         InitParamValue(ParamType::TGLfixedPointer, mantissa, &mantissaParam.value);
9678         CaptureQueryMatrixxOES_mantissa(glState, isCallValid, mantissa, exponent, &mantissaParam);
9679         paramBuffer.addParam(std::move(mantissaParam));
9680     }
9681     else
9682     {
9683         ParamCapture mantissaParam("mantissa", ParamType::TGLfixedPointer);
9684         InitParamValue(ParamType::TGLfixedPointer, static_cast<GLfixed *>(nullptr),
9685                        &mantissaParam.value);
9686         paramBuffer.addParam(std::move(mantissaParam));
9687     }
9688 
9689     if (isCallValid)
9690     {
9691         ParamCapture exponentParam("exponent", ParamType::TGLintPointer);
9692         InitParamValue(ParamType::TGLintPointer, exponent, &exponentParam.value);
9693         CaptureQueryMatrixxOES_exponent(glState, isCallValid, mantissa, exponent, &exponentParam);
9694         paramBuffer.addParam(std::move(exponentParam));
9695     }
9696     else
9697     {
9698         ParamCapture exponentParam("exponent", ParamType::TGLintPointer);
9699         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr),
9700                        &exponentParam.value);
9701         paramBuffer.addParam(std::move(exponentParam));
9702     }
9703 
9704     ParamCapture returnValueCapture("returnValue", ParamType::TGLbitfield);
9705     InitParamValue(ParamType::TGLbitfield, returnValue, &returnValueCapture.value);
9706     paramBuffer.addReturnValue(std::move(returnValueCapture));
9707 
9708     return CallCapture(angle::EntryPoint::GLQueryMatrixxOES, std::move(paramBuffer));
9709 }
9710 
CaptureMinSampleShadingOES(const State & glState,bool isCallValid,GLfloat value)9711 CallCapture CaptureMinSampleShadingOES(const State &glState, bool isCallValid, GLfloat value)
9712 {
9713     ParamBuffer paramBuffer;
9714 
9715     paramBuffer.addValueParam("value", ParamType::TGLfloat, value);
9716 
9717     return CallCapture(angle::EntryPoint::GLMinSampleShadingOES, std::move(paramBuffer));
9718 }
9719 
CaptureCompressedTexImage3DOES(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLsizei imageSize,const void * data)9720 CallCapture CaptureCompressedTexImage3DOES(const State &glState,
9721                                            bool isCallValid,
9722                                            TextureTarget targetPacked,
9723                                            GLint level,
9724                                            GLenum internalformat,
9725                                            GLsizei width,
9726                                            GLsizei height,
9727                                            GLsizei depth,
9728                                            GLint border,
9729                                            GLsizei imageSize,
9730                                            const void *data)
9731 {
9732     ParamBuffer paramBuffer;
9733 
9734     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
9735     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9736     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
9737                              internalformat);
9738     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
9739     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
9740     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
9741     paramBuffer.addValueParam("border", ParamType::TGLint, border);
9742     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
9743 
9744     if (isCallValid)
9745     {
9746         ParamCapture dataParam("data", ParamType::TvoidConstPointer);
9747         InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
9748         CaptureCompressedTexImage3DOES_data(glState, isCallValid, targetPacked, level,
9749                                             internalformat, width, height, depth, border, imageSize,
9750                                             data, &dataParam);
9751         paramBuffer.addParam(std::move(dataParam));
9752     }
9753     else
9754     {
9755         ParamCapture dataParam("data", ParamType::TvoidConstPointer);
9756         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9757                        &dataParam.value);
9758         paramBuffer.addParam(std::move(dataParam));
9759     }
9760 
9761     return CallCapture(angle::EntryPoint::GLCompressedTexImage3DOES, std::move(paramBuffer));
9762 }
9763 
CaptureCompressedTexSubImage3DOES(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,const void * data)9764 CallCapture CaptureCompressedTexSubImage3DOES(const State &glState,
9765                                               bool isCallValid,
9766                                               TextureTarget targetPacked,
9767                                               GLint level,
9768                                               GLint xoffset,
9769                                               GLint yoffset,
9770                                               GLint zoffset,
9771                                               GLsizei width,
9772                                               GLsizei height,
9773                                               GLsizei depth,
9774                                               GLenum format,
9775                                               GLsizei imageSize,
9776                                               const void *data)
9777 {
9778     ParamBuffer paramBuffer;
9779 
9780     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
9781     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9782     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
9783     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
9784     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
9785     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
9786     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
9787     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
9788     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
9789     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
9790 
9791     if (isCallValid)
9792     {
9793         ParamCapture dataParam("data", ParamType::TvoidConstPointer);
9794         InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
9795         CaptureCompressedTexSubImage3DOES_data(glState, isCallValid, targetPacked, level, xoffset,
9796                                                yoffset, zoffset, width, height, depth, format,
9797                                                imageSize, data, &dataParam);
9798         paramBuffer.addParam(std::move(dataParam));
9799     }
9800     else
9801     {
9802         ParamCapture dataParam("data", ParamType::TvoidConstPointer);
9803         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9804                        &dataParam.value);
9805         paramBuffer.addParam(std::move(dataParam));
9806     }
9807 
9808     return CallCapture(angle::EntryPoint::GLCompressedTexSubImage3DOES, std::move(paramBuffer));
9809 }
9810 
CaptureCopyTexSubImage3DOES(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLsizei width,GLsizei height)9811 CallCapture CaptureCopyTexSubImage3DOES(const State &glState,
9812                                         bool isCallValid,
9813                                         TextureTarget targetPacked,
9814                                         GLint level,
9815                                         GLint xoffset,
9816                                         GLint yoffset,
9817                                         GLint zoffset,
9818                                         GLint x,
9819                                         GLint y,
9820                                         GLsizei width,
9821                                         GLsizei height)
9822 {
9823     ParamBuffer paramBuffer;
9824 
9825     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
9826     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9827     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
9828     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
9829     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
9830     paramBuffer.addValueParam("x", ParamType::TGLint, x);
9831     paramBuffer.addValueParam("y", ParamType::TGLint, y);
9832     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
9833     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
9834 
9835     return CallCapture(angle::EntryPoint::GLCopyTexSubImage3DOES, std::move(paramBuffer));
9836 }
9837 
CaptureFramebufferTexture3DOES(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureTarget textargetPacked,TextureID texturePacked,GLint level,GLint zoffset)9838 CallCapture CaptureFramebufferTexture3DOES(const State &glState,
9839                                            bool isCallValid,
9840                                            GLenum target,
9841                                            GLenum attachment,
9842                                            TextureTarget textargetPacked,
9843                                            TextureID texturePacked,
9844                                            GLint level,
9845                                            GLint zoffset)
9846 {
9847     ParamBuffer paramBuffer;
9848 
9849     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
9850     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
9851                              attachment);
9852     paramBuffer.addValueParam("textargetPacked", ParamType::TTextureTarget, textargetPacked);
9853     paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
9854     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9855     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
9856 
9857     return CallCapture(angle::EntryPoint::GLFramebufferTexture3DOES, std::move(paramBuffer));
9858 }
9859 
CaptureTexImage3DOES(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,const void * pixels)9860 CallCapture CaptureTexImage3DOES(const State &glState,
9861                                  bool isCallValid,
9862                                  TextureTarget targetPacked,
9863                                  GLint level,
9864                                  GLenum internalformat,
9865                                  GLsizei width,
9866                                  GLsizei height,
9867                                  GLsizei depth,
9868                                  GLint border,
9869                                  GLenum format,
9870                                  GLenum type,
9871                                  const void *pixels)
9872 {
9873     ParamBuffer paramBuffer;
9874 
9875     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
9876     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9877     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
9878                              internalformat);
9879     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
9880     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
9881     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
9882     paramBuffer.addValueParam("border", ParamType::TGLint, border);
9883     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
9884     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
9885 
9886     if (isCallValid)
9887     {
9888         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
9889         InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
9890         CaptureTexImage3DOES_pixels(glState, isCallValid, targetPacked, level, internalformat,
9891                                     width, height, depth, border, format, type, pixels,
9892                                     &pixelsParam);
9893         paramBuffer.addParam(std::move(pixelsParam));
9894     }
9895     else
9896     {
9897         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
9898         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9899                        &pixelsParam.value);
9900         paramBuffer.addParam(std::move(pixelsParam));
9901     }
9902 
9903     return CallCapture(angle::EntryPoint::GLTexImage3DOES, std::move(paramBuffer));
9904 }
9905 
CaptureTexSubImage3DOES(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const void * pixels)9906 CallCapture CaptureTexSubImage3DOES(const State &glState,
9907                                     bool isCallValid,
9908                                     TextureTarget targetPacked,
9909                                     GLint level,
9910                                     GLint xoffset,
9911                                     GLint yoffset,
9912                                     GLint zoffset,
9913                                     GLsizei width,
9914                                     GLsizei height,
9915                                     GLsizei depth,
9916                                     GLenum format,
9917                                     GLenum type,
9918                                     const void *pixels)
9919 {
9920     ParamBuffer paramBuffer;
9921 
9922     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
9923     paramBuffer.addValueParam("level", ParamType::TGLint, level);
9924     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
9925     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
9926     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
9927     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
9928     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
9929     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
9930     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
9931     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
9932 
9933     if (isCallValid)
9934     {
9935         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
9936         InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
9937         CaptureTexSubImage3DOES_pixels(glState, isCallValid, targetPacked, level, xoffset, yoffset,
9938                                        zoffset, width, height, depth, format, type, pixels,
9939                                        &pixelsParam);
9940         paramBuffer.addParam(std::move(pixelsParam));
9941     }
9942     else
9943     {
9944         ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
9945         InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
9946                        &pixelsParam.value);
9947         paramBuffer.addParam(std::move(pixelsParam));
9948     }
9949 
9950     return CallCapture(angle::EntryPoint::GLTexSubImage3DOES, std::move(paramBuffer));
9951 }
9952 
CaptureGetSamplerParameterIivOES(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLint * params)9953 CallCapture CaptureGetSamplerParameterIivOES(const State &glState,
9954                                              bool isCallValid,
9955                                              SamplerID samplerPacked,
9956                                              GLenum pname,
9957                                              GLint *params)
9958 {
9959     ParamBuffer paramBuffer;
9960 
9961     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
9962     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
9963 
9964     if (isCallValid)
9965     {
9966         ParamCapture paramsParam("params", ParamType::TGLintPointer);
9967         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
9968         CaptureGetSamplerParameterIivOES_params(glState, isCallValid, samplerPacked, pname, params,
9969                                                 &paramsParam);
9970         paramBuffer.addParam(std::move(paramsParam));
9971     }
9972     else
9973     {
9974         ParamCapture paramsParam("params", ParamType::TGLintPointer);
9975         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
9976         paramBuffer.addParam(std::move(paramsParam));
9977     }
9978 
9979     return CallCapture(angle::EntryPoint::GLGetSamplerParameterIivOES, std::move(paramBuffer));
9980 }
9981 
CaptureGetSamplerParameterIuivOES(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLuint * params)9982 CallCapture CaptureGetSamplerParameterIuivOES(const State &glState,
9983                                               bool isCallValid,
9984                                               SamplerID samplerPacked,
9985                                               GLenum pname,
9986                                               GLuint *params)
9987 {
9988     ParamBuffer paramBuffer;
9989 
9990     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
9991     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
9992 
9993     if (isCallValid)
9994     {
9995         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
9996         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
9997         CaptureGetSamplerParameterIuivOES_params(glState, isCallValid, samplerPacked, pname, params,
9998                                                  &paramsParam);
9999         paramBuffer.addParam(std::move(paramsParam));
10000     }
10001     else
10002     {
10003         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
10004         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
10005                        &paramsParam.value);
10006         paramBuffer.addParam(std::move(paramsParam));
10007     }
10008 
10009     return CallCapture(angle::EntryPoint::GLGetSamplerParameterIuivOES, std::move(paramBuffer));
10010 }
10011 
CaptureGetTexParameterIivOES(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLint * params)10012 CallCapture CaptureGetTexParameterIivOES(const State &glState,
10013                                          bool isCallValid,
10014                                          TextureType targetPacked,
10015                                          GLenum pname,
10016                                          GLint *params)
10017 {
10018     ParamBuffer paramBuffer;
10019 
10020     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
10021     paramBuffer.addEnumParam("pname", GLenumGroup::GetTextureParameter, ParamType::TGLenum, pname);
10022 
10023     if (isCallValid)
10024     {
10025         ParamCapture paramsParam("params", ParamType::TGLintPointer);
10026         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
10027         CaptureGetTexParameterIivOES_params(glState, isCallValid, targetPacked, pname, params,
10028                                             &paramsParam);
10029         paramBuffer.addParam(std::move(paramsParam));
10030     }
10031     else
10032     {
10033         ParamCapture paramsParam("params", ParamType::TGLintPointer);
10034         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
10035         paramBuffer.addParam(std::move(paramsParam));
10036     }
10037 
10038     return CallCapture(angle::EntryPoint::GLGetTexParameterIivOES, std::move(paramBuffer));
10039 }
10040 
CaptureGetTexParameterIuivOES(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLuint * params)10041 CallCapture CaptureGetTexParameterIuivOES(const State &glState,
10042                                           bool isCallValid,
10043                                           TextureType targetPacked,
10044                                           GLenum pname,
10045                                           GLuint *params)
10046 {
10047     ParamBuffer paramBuffer;
10048 
10049     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
10050     paramBuffer.addEnumParam("pname", GLenumGroup::GetTextureParameter, ParamType::TGLenum, pname);
10051 
10052     if (isCallValid)
10053     {
10054         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
10055         InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
10056         CaptureGetTexParameterIuivOES_params(glState, isCallValid, targetPacked, pname, params,
10057                                              &paramsParam);
10058         paramBuffer.addParam(std::move(paramsParam));
10059     }
10060     else
10061     {
10062         ParamCapture paramsParam("params", ParamType::TGLuintPointer);
10063         InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
10064                        &paramsParam.value);
10065         paramBuffer.addParam(std::move(paramsParam));
10066     }
10067 
10068     return CallCapture(angle::EntryPoint::GLGetTexParameterIuivOES, std::move(paramBuffer));
10069 }
10070 
CaptureSamplerParameterIivOES(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLint * param)10071 CallCapture CaptureSamplerParameterIivOES(const State &glState,
10072                                           bool isCallValid,
10073                                           SamplerID samplerPacked,
10074                                           GLenum pname,
10075                                           const GLint *param)
10076 {
10077     ParamBuffer paramBuffer;
10078 
10079     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
10080     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
10081 
10082     if (isCallValid)
10083     {
10084         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
10085         InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
10086         CaptureSamplerParameterIivOES_param(glState, isCallValid, samplerPacked, pname, param,
10087                                             &paramParam);
10088         paramBuffer.addParam(std::move(paramParam));
10089     }
10090     else
10091     {
10092         ParamCapture paramParam("param", ParamType::TGLintConstPointer);
10093         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
10094                        &paramParam.value);
10095         paramBuffer.addParam(std::move(paramParam));
10096     }
10097 
10098     return CallCapture(angle::EntryPoint::GLSamplerParameterIivOES, std::move(paramBuffer));
10099 }
10100 
CaptureSamplerParameterIuivOES(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLuint * param)10101 CallCapture CaptureSamplerParameterIuivOES(const State &glState,
10102                                            bool isCallValid,
10103                                            SamplerID samplerPacked,
10104                                            GLenum pname,
10105                                            const GLuint *param)
10106 {
10107     ParamBuffer paramBuffer;
10108 
10109     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
10110     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
10111 
10112     if (isCallValid)
10113     {
10114         ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
10115         InitParamValue(ParamType::TGLuintConstPointer, param, &paramParam.value);
10116         CaptureSamplerParameterIuivOES_param(glState, isCallValid, samplerPacked, pname, param,
10117                                              &paramParam);
10118         paramBuffer.addParam(std::move(paramParam));
10119     }
10120     else
10121     {
10122         ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
10123         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
10124                        &paramParam.value);
10125         paramBuffer.addParam(std::move(paramParam));
10126     }
10127 
10128     return CallCapture(angle::EntryPoint::GLSamplerParameterIuivOES, std::move(paramBuffer));
10129 }
10130 
CaptureTexParameterIivOES(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLint * params)10131 CallCapture CaptureTexParameterIivOES(const State &glState,
10132                                       bool isCallValid,
10133                                       TextureType targetPacked,
10134                                       GLenum pname,
10135                                       const GLint *params)
10136 {
10137     ParamBuffer paramBuffer;
10138 
10139     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
10140     paramBuffer.addEnumParam("pname", GLenumGroup::TextureParameterName, ParamType::TGLenum, pname);
10141 
10142     if (isCallValid)
10143     {
10144         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
10145         InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
10146         CaptureTexParameterIivOES_params(glState, isCallValid, targetPacked, pname, params,
10147                                          &paramsParam);
10148         paramBuffer.addParam(std::move(paramsParam));
10149     }
10150     else
10151     {
10152         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
10153         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
10154                        &paramsParam.value);
10155         paramBuffer.addParam(std::move(paramsParam));
10156     }
10157 
10158     return CallCapture(angle::EntryPoint::GLTexParameterIivOES, std::move(paramBuffer));
10159 }
10160 
CaptureTexParameterIuivOES(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLuint * params)10161 CallCapture CaptureTexParameterIuivOES(const State &glState,
10162                                        bool isCallValid,
10163                                        TextureType targetPacked,
10164                                        GLenum pname,
10165                                        const GLuint *params)
10166 {
10167     ParamBuffer paramBuffer;
10168 
10169     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
10170     paramBuffer.addEnumParam("pname", GLenumGroup::TextureParameterName, ParamType::TGLenum, pname);
10171 
10172     if (isCallValid)
10173     {
10174         ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
10175         InitParamValue(ParamType::TGLuintConstPointer, params, &paramsParam.value);
10176         CaptureTexParameterIuivOES_params(glState, isCallValid, targetPacked, pname, params,
10177                                           &paramsParam);
10178         paramBuffer.addParam(std::move(paramsParam));
10179     }
10180     else
10181     {
10182         ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
10183         InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
10184                        &paramsParam.value);
10185         paramBuffer.addParam(std::move(paramsParam));
10186     }
10187 
10188     return CallCapture(angle::EntryPoint::GLTexParameterIuivOES, std::move(paramBuffer));
10189 }
10190 
CaptureTexBufferOES(const State & glState,bool isCallValid,TextureType targetPacked,GLenum internalformat,BufferID bufferPacked)10191 CallCapture CaptureTexBufferOES(const State &glState,
10192                                 bool isCallValid,
10193                                 TextureType targetPacked,
10194                                 GLenum internalformat,
10195                                 BufferID bufferPacked)
10196 {
10197     ParamBuffer paramBuffer;
10198 
10199     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
10200     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
10201                              internalformat);
10202     paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
10203 
10204     return CallCapture(angle::EntryPoint::GLTexBufferOES, std::move(paramBuffer));
10205 }
10206 
CaptureTexBufferRangeOES(const State & glState,bool isCallValid,TextureType targetPacked,GLenum internalformat,BufferID bufferPacked,GLintptr offset,GLsizeiptr size)10207 CallCapture CaptureTexBufferRangeOES(const State &glState,
10208                                      bool isCallValid,
10209                                      TextureType targetPacked,
10210                                      GLenum internalformat,
10211                                      BufferID bufferPacked,
10212                                      GLintptr offset,
10213                                      GLsizeiptr size)
10214 {
10215     ParamBuffer paramBuffer;
10216 
10217     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
10218     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
10219                              internalformat);
10220     paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
10221     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
10222     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
10223 
10224     return CallCapture(angle::EntryPoint::GLTexBufferRangeOES, std::move(paramBuffer));
10225 }
10226 
CaptureGetTexGenfvOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,GLfloat * params)10227 CallCapture CaptureGetTexGenfvOES(const State &glState,
10228                                   bool isCallValid,
10229                                   GLenum coord,
10230                                   GLenum pname,
10231                                   GLfloat *params)
10232 {
10233     ParamBuffer paramBuffer;
10234 
10235     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10236     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10237 
10238     if (isCallValid)
10239     {
10240         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
10241         InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
10242         CaptureGetTexGenfvOES_params(glState, isCallValid, coord, pname, params, &paramsParam);
10243         paramBuffer.addParam(std::move(paramsParam));
10244     }
10245     else
10246     {
10247         ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
10248         InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
10249                        &paramsParam.value);
10250         paramBuffer.addParam(std::move(paramsParam));
10251     }
10252 
10253     return CallCapture(angle::EntryPoint::GLGetTexGenfvOES, std::move(paramBuffer));
10254 }
10255 
CaptureGetTexGenivOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,GLint * params)10256 CallCapture CaptureGetTexGenivOES(const State &glState,
10257                                   bool isCallValid,
10258                                   GLenum coord,
10259                                   GLenum pname,
10260                                   GLint *params)
10261 {
10262     ParamBuffer paramBuffer;
10263 
10264     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10265     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10266 
10267     if (isCallValid)
10268     {
10269         ParamCapture paramsParam("params", ParamType::TGLintPointer);
10270         InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
10271         CaptureGetTexGenivOES_params(glState, isCallValid, coord, pname, params, &paramsParam);
10272         paramBuffer.addParam(std::move(paramsParam));
10273     }
10274     else
10275     {
10276         ParamCapture paramsParam("params", ParamType::TGLintPointer);
10277         InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &paramsParam.value);
10278         paramBuffer.addParam(std::move(paramsParam));
10279     }
10280 
10281     return CallCapture(angle::EntryPoint::GLGetTexGenivOES, std::move(paramBuffer));
10282 }
10283 
CaptureGetTexGenxvOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,GLfixed * params)10284 CallCapture CaptureGetTexGenxvOES(const State &glState,
10285                                   bool isCallValid,
10286                                   GLenum coord,
10287                                   GLenum pname,
10288                                   GLfixed *params)
10289 {
10290     ParamBuffer paramBuffer;
10291 
10292     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10293     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10294 
10295     if (isCallValid)
10296     {
10297         ParamCapture paramsParam("params", ParamType::TGLfixedPointer);
10298         InitParamValue(ParamType::TGLfixedPointer, params, &paramsParam.value);
10299         CaptureGetTexGenxvOES_params(glState, isCallValid, coord, pname, params, &paramsParam);
10300         paramBuffer.addParam(std::move(paramsParam));
10301     }
10302     else
10303     {
10304         ParamCapture paramsParam("params", ParamType::TGLfixedPointer);
10305         InitParamValue(ParamType::TGLfixedPointer, static_cast<GLfixed *>(nullptr),
10306                        &paramsParam.value);
10307         paramBuffer.addParam(std::move(paramsParam));
10308     }
10309 
10310     return CallCapture(angle::EntryPoint::GLGetTexGenxvOES, std::move(paramBuffer));
10311 }
10312 
CaptureTexGenfOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,GLfloat param)10313 CallCapture CaptureTexGenfOES(const State &glState,
10314                               bool isCallValid,
10315                               GLenum coord,
10316                               GLenum pname,
10317                               GLfloat param)
10318 {
10319     ParamBuffer paramBuffer;
10320 
10321     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10322     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10323     paramBuffer.addValueParam("param", ParamType::TGLfloat, param);
10324 
10325     return CallCapture(angle::EntryPoint::GLTexGenfOES, std::move(paramBuffer));
10326 }
10327 
CaptureTexGenfvOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,const GLfloat * params)10328 CallCapture CaptureTexGenfvOES(const State &glState,
10329                                bool isCallValid,
10330                                GLenum coord,
10331                                GLenum pname,
10332                                const GLfloat *params)
10333 {
10334     ParamBuffer paramBuffer;
10335 
10336     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10337     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10338 
10339     if (isCallValid)
10340     {
10341         ParamCapture paramsParam("params", ParamType::TGLfloatConstPointer);
10342         InitParamValue(ParamType::TGLfloatConstPointer, params, &paramsParam.value);
10343         CaptureTexGenfvOES_params(glState, isCallValid, coord, pname, params, &paramsParam);
10344         paramBuffer.addParam(std::move(paramsParam));
10345     }
10346     else
10347     {
10348         ParamCapture paramsParam("params", ParamType::TGLfloatConstPointer);
10349         InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
10350                        &paramsParam.value);
10351         paramBuffer.addParam(std::move(paramsParam));
10352     }
10353 
10354     return CallCapture(angle::EntryPoint::GLTexGenfvOES, std::move(paramBuffer));
10355 }
10356 
CaptureTexGeniOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,GLint param)10357 CallCapture CaptureTexGeniOES(const State &glState,
10358                               bool isCallValid,
10359                               GLenum coord,
10360                               GLenum pname,
10361                               GLint param)
10362 {
10363     ParamBuffer paramBuffer;
10364 
10365     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10366     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10367     paramBuffer.addValueParam("param", ParamType::TGLint, param);
10368 
10369     return CallCapture(angle::EntryPoint::GLTexGeniOES, std::move(paramBuffer));
10370 }
10371 
CaptureTexGenivOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,const GLint * params)10372 CallCapture CaptureTexGenivOES(const State &glState,
10373                                bool isCallValid,
10374                                GLenum coord,
10375                                GLenum pname,
10376                                const GLint *params)
10377 {
10378     ParamBuffer paramBuffer;
10379 
10380     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10381     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10382 
10383     if (isCallValid)
10384     {
10385         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
10386         InitParamValue(ParamType::TGLintConstPointer, params, &paramsParam.value);
10387         CaptureTexGenivOES_params(glState, isCallValid, coord, pname, params, &paramsParam);
10388         paramBuffer.addParam(std::move(paramsParam));
10389     }
10390     else
10391     {
10392         ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
10393         InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
10394                        &paramsParam.value);
10395         paramBuffer.addParam(std::move(paramsParam));
10396     }
10397 
10398     return CallCapture(angle::EntryPoint::GLTexGenivOES, std::move(paramBuffer));
10399 }
10400 
CaptureTexGenxOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,GLfixed param)10401 CallCapture CaptureTexGenxOES(const State &glState,
10402                               bool isCallValid,
10403                               GLenum coord,
10404                               GLenum pname,
10405                               GLfixed param)
10406 {
10407     ParamBuffer paramBuffer;
10408 
10409     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10410     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10411     paramBuffer.addValueParam("param", ParamType::TGLfixed, param);
10412 
10413     return CallCapture(angle::EntryPoint::GLTexGenxOES, std::move(paramBuffer));
10414 }
10415 
CaptureTexGenxvOES(const State & glState,bool isCallValid,GLenum coord,GLenum pname,const GLfixed * params)10416 CallCapture CaptureTexGenxvOES(const State &glState,
10417                                bool isCallValid,
10418                                GLenum coord,
10419                                GLenum pname,
10420                                const GLfixed *params)
10421 {
10422     ParamBuffer paramBuffer;
10423 
10424     paramBuffer.addEnumParam("coord", GLenumGroup::TextureCoordName, ParamType::TGLenum, coord);
10425     paramBuffer.addEnumParam("pname", GLenumGroup::TextureGenParameter, ParamType::TGLenum, pname);
10426 
10427     if (isCallValid)
10428     {
10429         ParamCapture paramsParam("params", ParamType::TGLfixedConstPointer);
10430         InitParamValue(ParamType::TGLfixedConstPointer, params, &paramsParam.value);
10431         CaptureTexGenxvOES_params(glState, isCallValid, coord, pname, params, &paramsParam);
10432         paramBuffer.addParam(std::move(paramsParam));
10433     }
10434     else
10435     {
10436         ParamCapture paramsParam("params", ParamType::TGLfixedConstPointer);
10437         InitParamValue(ParamType::TGLfixedConstPointer, static_cast<const GLfixed *>(nullptr),
10438                        &paramsParam.value);
10439         paramBuffer.addParam(std::move(paramsParam));
10440     }
10441 
10442     return CallCapture(angle::EntryPoint::GLTexGenxvOES, std::move(paramBuffer));
10443 }
10444 
CaptureTexStorage3DMultisampleOES(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedsamplelocations)10445 CallCapture CaptureTexStorage3DMultisampleOES(const State &glState,
10446                                               bool isCallValid,
10447                                               TextureType targetPacked,
10448                                               GLsizei samples,
10449                                               GLenum internalformat,
10450                                               GLsizei width,
10451                                               GLsizei height,
10452                                               GLsizei depth,
10453                                               GLboolean fixedsamplelocations)
10454 {
10455     ParamBuffer paramBuffer;
10456 
10457     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
10458     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
10459     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
10460                              internalformat);
10461     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
10462     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
10463     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
10464     paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);
10465 
10466     return CallCapture(angle::EntryPoint::GLTexStorage3DMultisampleOES, std::move(paramBuffer));
10467 }
10468 
CaptureBindVertexArrayOES(const State & glState,bool isCallValid,VertexArrayID arrayPacked)10469 CallCapture CaptureBindVertexArrayOES(const State &glState,
10470                                       bool isCallValid,
10471                                       VertexArrayID arrayPacked)
10472 {
10473     ParamBuffer paramBuffer;
10474 
10475     paramBuffer.addValueParam("arrayPacked", ParamType::TVertexArrayID, arrayPacked);
10476 
10477     return CallCapture(angle::EntryPoint::GLBindVertexArrayOES, std::move(paramBuffer));
10478 }
10479 
CaptureDeleteVertexArraysOES(const State & glState,bool isCallValid,GLsizei n,const VertexArrayID * arraysPacked)10480 CallCapture CaptureDeleteVertexArraysOES(const State &glState,
10481                                          bool isCallValid,
10482                                          GLsizei n,
10483                                          const VertexArrayID *arraysPacked)
10484 {
10485     ParamBuffer paramBuffer;
10486 
10487     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
10488 
10489     if (isCallValid)
10490     {
10491         ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDConstPointer);
10492         InitParamValue(ParamType::TVertexArrayIDConstPointer, arraysPacked,
10493                        &arraysPackedParam.value);
10494         CaptureDeleteVertexArraysOES_arraysPacked(glState, isCallValid, n, arraysPacked,
10495                                                   &arraysPackedParam);
10496         paramBuffer.addParam(std::move(arraysPackedParam));
10497     }
10498     else
10499     {
10500         ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDConstPointer);
10501         InitParamValue(ParamType::TVertexArrayIDConstPointer,
10502                        static_cast<const VertexArrayID *>(nullptr), &arraysPackedParam.value);
10503         paramBuffer.addParam(std::move(arraysPackedParam));
10504     }
10505 
10506     return CallCapture(angle::EntryPoint::GLDeleteVertexArraysOES, std::move(paramBuffer));
10507 }
10508 
CaptureGenVertexArraysOES(const State & glState,bool isCallValid,GLsizei n,VertexArrayID * arraysPacked)10509 CallCapture CaptureGenVertexArraysOES(const State &glState,
10510                                       bool isCallValid,
10511                                       GLsizei n,
10512                                       VertexArrayID *arraysPacked)
10513 {
10514     ParamBuffer paramBuffer;
10515 
10516     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
10517 
10518     if (isCallValid)
10519     {
10520         ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDPointer);
10521         InitParamValue(ParamType::TVertexArrayIDPointer, arraysPacked, &arraysPackedParam.value);
10522         CaptureGenVertexArraysOES_arraysPacked(glState, isCallValid, n, arraysPacked,
10523                                                &arraysPackedParam);
10524         paramBuffer.addParam(std::move(arraysPackedParam));
10525     }
10526     else
10527     {
10528         ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDPointer);
10529         InitParamValue(ParamType::TVertexArrayIDPointer, static_cast<VertexArrayID *>(nullptr),
10530                        &arraysPackedParam.value);
10531         paramBuffer.addParam(std::move(arraysPackedParam));
10532     }
10533 
10534     return CallCapture(angle::EntryPoint::GLGenVertexArraysOES, std::move(paramBuffer));
10535 }
10536 
CaptureIsVertexArrayOES(const State & glState,bool isCallValid,VertexArrayID arrayPacked,GLboolean returnValue)10537 CallCapture CaptureIsVertexArrayOES(const State &glState,
10538                                     bool isCallValid,
10539                                     VertexArrayID arrayPacked,
10540                                     GLboolean returnValue)
10541 {
10542     ParamBuffer paramBuffer;
10543 
10544     paramBuffer.addValueParam("arrayPacked", ParamType::TVertexArrayID, arrayPacked);
10545 
10546     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
10547     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
10548     paramBuffer.addReturnValue(std::move(returnValueCapture));
10549 
10550     return CallCapture(angle::EntryPoint::GLIsVertexArrayOES, std::move(paramBuffer));
10551 }
10552 
CaptureFramebufferTextureMultiviewOVR(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureID texturePacked,GLint level,GLint baseViewIndex,GLsizei numViews)10553 CallCapture CaptureFramebufferTextureMultiviewOVR(const State &glState,
10554                                                   bool isCallValid,
10555                                                   GLenum target,
10556                                                   GLenum attachment,
10557                                                   TextureID texturePacked,
10558                                                   GLint level,
10559                                                   GLint baseViewIndex,
10560                                                   GLsizei numViews)
10561 {
10562     ParamBuffer paramBuffer;
10563 
10564     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
10565     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
10566                              attachment);
10567     paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
10568     paramBuffer.addValueParam("level", ParamType::TGLint, level);
10569     paramBuffer.addValueParam("baseViewIndex", ParamType::TGLint, baseViewIndex);
10570     paramBuffer.addValueParam("numViews", ParamType::TGLsizei, numViews);
10571 
10572     return CallCapture(angle::EntryPoint::GLFramebufferTextureMultiviewOVR, std::move(paramBuffer));
10573 }
10574 
10575 }  // namespace gl
10576