• 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_3_0_autogen.cpp:
9 //   Capture functions for the OpenGL ES 3.0 entry points.
10 
11 #include "libANGLE/capture_gles_3_0_autogen.h"
12 
13 #include "libANGLE/Context.h"
14 #include "libANGLE/FrameCapture.h"
15 #include "libANGLE/gl_enum_utils.h"
16 #include "libANGLE/validationES3.h"
17 
18 using namespace angle;
19 
20 namespace gl
21 {
22 
CaptureBeginQuery(const State & glState,bool isCallValid,QueryType targetPacked,QueryID idPacked)23 CallCapture CaptureBeginQuery(const State &glState,
24                               bool isCallValid,
25                               QueryType targetPacked,
26                               QueryID idPacked)
27 {
28     ParamBuffer paramBuffer;
29 
30     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
31     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
32 
33     return CallCapture(gl::EntryPoint::BeginQuery, std::move(paramBuffer));
34 }
35 
CaptureBeginTransformFeedback(const State & glState,bool isCallValid,PrimitiveMode primitiveModePacked)36 CallCapture CaptureBeginTransformFeedback(const State &glState,
37                                           bool isCallValid,
38                                           PrimitiveMode primitiveModePacked)
39 {
40     ParamBuffer paramBuffer;
41 
42     paramBuffer.addValueParam("primitiveModePacked", ParamType::TPrimitiveMode,
43                               primitiveModePacked);
44 
45     return CallCapture(gl::EntryPoint::BeginTransformFeedback, std::move(paramBuffer));
46 }
47 
CaptureBindBufferBase(const State & glState,bool isCallValid,BufferBinding targetPacked,GLuint index,BufferID bufferPacked)48 CallCapture CaptureBindBufferBase(const State &glState,
49                                   bool isCallValid,
50                                   BufferBinding targetPacked,
51                                   GLuint index,
52                                   BufferID bufferPacked)
53 {
54     ParamBuffer paramBuffer;
55 
56     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
57     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
58     paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
59 
60     return CallCapture(gl::EntryPoint::BindBufferBase, std::move(paramBuffer));
61 }
62 
CaptureBindBufferRange(const State & glState,bool isCallValid,BufferBinding targetPacked,GLuint index,BufferID bufferPacked,GLintptr offset,GLsizeiptr size)63 CallCapture CaptureBindBufferRange(const State &glState,
64                                    bool isCallValid,
65                                    BufferBinding targetPacked,
66                                    GLuint index,
67                                    BufferID bufferPacked,
68                                    GLintptr offset,
69                                    GLsizeiptr size)
70 {
71     ParamBuffer paramBuffer;
72 
73     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
74     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
75     paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
76     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
77     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
78 
79     return CallCapture(gl::EntryPoint::BindBufferRange, std::move(paramBuffer));
80 }
81 
CaptureBindSampler(const State & glState,bool isCallValid,GLuint unit,SamplerID samplerPacked)82 CallCapture CaptureBindSampler(const State &glState,
83                                bool isCallValid,
84                                GLuint unit,
85                                SamplerID samplerPacked)
86 {
87     ParamBuffer paramBuffer;
88 
89     paramBuffer.addValueParam("unit", ParamType::TGLuint, unit);
90     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
91 
92     return CallCapture(gl::EntryPoint::BindSampler, std::move(paramBuffer));
93 }
94 
CaptureBindTransformFeedback(const State & glState,bool isCallValid,GLenum target,TransformFeedbackID idPacked)95 CallCapture CaptureBindTransformFeedback(const State &glState,
96                                          bool isCallValid,
97                                          GLenum target,
98                                          TransformFeedbackID idPacked)
99 {
100     ParamBuffer paramBuffer;
101 
102     paramBuffer.addEnumParam("target", GLenumGroup::BindTransformFeedbackTarget, ParamType::TGLenum,
103                              target);
104     paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked);
105 
106     return CallCapture(gl::EntryPoint::BindTransformFeedback, std::move(paramBuffer));
107 }
108 
CaptureBindVertexArray(const State & glState,bool isCallValid,VertexArrayID arrayPacked)109 CallCapture CaptureBindVertexArray(const State &glState,
110                                    bool isCallValid,
111                                    VertexArrayID arrayPacked)
112 {
113     ParamBuffer paramBuffer;
114 
115     paramBuffer.addValueParam("arrayPacked", ParamType::TVertexArrayID, arrayPacked);
116 
117     return CallCapture(gl::EntryPoint::BindVertexArray, std::move(paramBuffer));
118 }
119 
CaptureBlitFramebuffer(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)120 CallCapture CaptureBlitFramebuffer(const State &glState,
121                                    bool isCallValid,
122                                    GLint srcX0,
123                                    GLint srcY0,
124                                    GLint srcX1,
125                                    GLint srcY1,
126                                    GLint dstX0,
127                                    GLint dstY0,
128                                    GLint dstX1,
129                                    GLint dstY1,
130                                    GLbitfield mask,
131                                    GLenum filter)
132 {
133     ParamBuffer paramBuffer;
134 
135     paramBuffer.addValueParam("srcX0", ParamType::TGLint, srcX0);
136     paramBuffer.addValueParam("srcY0", ParamType::TGLint, srcY0);
137     paramBuffer.addValueParam("srcX1", ParamType::TGLint, srcX1);
138     paramBuffer.addValueParam("srcY1", ParamType::TGLint, srcY1);
139     paramBuffer.addValueParam("dstX0", ParamType::TGLint, dstX0);
140     paramBuffer.addValueParam("dstY0", ParamType::TGLint, dstY0);
141     paramBuffer.addValueParam("dstX1", ParamType::TGLint, dstX1);
142     paramBuffer.addValueParam("dstY1", ParamType::TGLint, dstY1);
143     paramBuffer.addEnumParam("mask", GLenumGroup::ClearBufferMask, ParamType::TGLbitfield, mask);
144     paramBuffer.addEnumParam("filter", GLenumGroup::BlitFramebufferFilter, ParamType::TGLenum,
145                              filter);
146 
147     return CallCapture(gl::EntryPoint::BlitFramebuffer, std::move(paramBuffer));
148 }
149 
CaptureClearBufferfi(const State & glState,bool isCallValid,GLenum buffer,GLint drawbuffer,GLfloat depth,GLint stencil)150 CallCapture CaptureClearBufferfi(const State &glState,
151                                  bool isCallValid,
152                                  GLenum buffer,
153                                  GLint drawbuffer,
154                                  GLfloat depth,
155                                  GLint stencil)
156 {
157     ParamBuffer paramBuffer;
158 
159     paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
160     paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
161     paramBuffer.addValueParam("depth", ParamType::TGLfloat, depth);
162     paramBuffer.addValueParam("stencil", ParamType::TGLint, stencil);
163 
164     return CallCapture(gl::EntryPoint::ClearBufferfi, std::move(paramBuffer));
165 }
166 
CaptureClearBufferfv(const State & glState,bool isCallValid,GLenum buffer,GLint drawbuffer,const GLfloat * value)167 CallCapture CaptureClearBufferfv(const State &glState,
168                                  bool isCallValid,
169                                  GLenum buffer,
170                                  GLint drawbuffer,
171                                  const GLfloat *value)
172 {
173     ParamBuffer paramBuffer;
174 
175     paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
176     paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
177 
178     ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
179     InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
180     CaptureClearBufferfv_value(glState, isCallValid, buffer, drawbuffer, value, &valueParam);
181     paramBuffer.addParam(std::move(valueParam));
182 
183     return CallCapture(gl::EntryPoint::ClearBufferfv, std::move(paramBuffer));
184 }
185 
CaptureClearBufferiv(const State & glState,bool isCallValid,GLenum buffer,GLint drawbuffer,const GLint * value)186 CallCapture CaptureClearBufferiv(const State &glState,
187                                  bool isCallValid,
188                                  GLenum buffer,
189                                  GLint drawbuffer,
190                                  const GLint *value)
191 {
192     ParamBuffer paramBuffer;
193 
194     paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
195     paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
196 
197     ParamCapture valueParam("value", ParamType::TGLintConstPointer);
198     InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
199     CaptureClearBufferiv_value(glState, isCallValid, buffer, drawbuffer, value, &valueParam);
200     paramBuffer.addParam(std::move(valueParam));
201 
202     return CallCapture(gl::EntryPoint::ClearBufferiv, std::move(paramBuffer));
203 }
204 
CaptureClearBufferuiv(const State & glState,bool isCallValid,GLenum buffer,GLint drawbuffer,const GLuint * value)205 CallCapture CaptureClearBufferuiv(const State &glState,
206                                   bool isCallValid,
207                                   GLenum buffer,
208                                   GLint drawbuffer,
209                                   const GLuint *value)
210 {
211     ParamBuffer paramBuffer;
212 
213     paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
214     paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
215 
216     ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
217     InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
218     CaptureClearBufferuiv_value(glState, isCallValid, buffer, drawbuffer, value, &valueParam);
219     paramBuffer.addParam(std::move(valueParam));
220 
221     return CallCapture(gl::EntryPoint::ClearBufferuiv, std::move(paramBuffer));
222 }
223 
CaptureClientWaitSync(const State & glState,bool isCallValid,GLsync sync,GLbitfield flags,GLuint64 timeout,GLenum returnValue)224 CallCapture CaptureClientWaitSync(const State &glState,
225                                   bool isCallValid,
226                                   GLsync sync,
227                                   GLbitfield flags,
228                                   GLuint64 timeout,
229                                   GLenum returnValue)
230 {
231     ParamBuffer paramBuffer;
232 
233     paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
234     paramBuffer.addEnumParam("flags", GLenumGroup::SyncObjectMask, ParamType::TGLbitfield, flags);
235     paramBuffer.addValueParam("timeout", ParamType::TGLuint64, timeout);
236 
237     ParamCapture returnValueCapture("returnValue", ParamType::TGLenum);
238     InitParamValue(ParamType::TGLenum, returnValue, &returnValueCapture.value);
239     paramBuffer.addReturnValue(std::move(returnValueCapture));
240 
241     return CallCapture(gl::EntryPoint::ClientWaitSync, std::move(paramBuffer));
242 }
243 
CaptureCompressedTexImage3D(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLsizei imageSize,const void * data)244 CallCapture CaptureCompressedTexImage3D(const State &glState,
245                                         bool isCallValid,
246                                         TextureTarget targetPacked,
247                                         GLint level,
248                                         GLenum internalformat,
249                                         GLsizei width,
250                                         GLsizei height,
251                                         GLsizei depth,
252                                         GLint border,
253                                         GLsizei imageSize,
254                                         const void *data)
255 {
256     ParamBuffer paramBuffer;
257 
258     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
259     paramBuffer.addValueParam("level", ParamType::TGLint, level);
260     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
261                              internalformat);
262     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
263     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
264     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
265     paramBuffer.addValueParam("border", ParamType::TGLint, border);
266     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
267 
268     ParamCapture dataParam("data", ParamType::TvoidConstPointer);
269     InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
270     CaptureCompressedTexImage3D_data(glState, isCallValid, targetPacked, level, internalformat,
271                                      width, height, depth, border, imageSize, data, &dataParam);
272     paramBuffer.addParam(std::move(dataParam));
273 
274     return CallCapture(gl::EntryPoint::CompressedTexImage3D, std::move(paramBuffer));
275 }
276 
CaptureCompressedTexSubImage3D(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)277 CallCapture CaptureCompressedTexSubImage3D(const State &glState,
278                                            bool isCallValid,
279                                            TextureTarget targetPacked,
280                                            GLint level,
281                                            GLint xoffset,
282                                            GLint yoffset,
283                                            GLint zoffset,
284                                            GLsizei width,
285                                            GLsizei height,
286                                            GLsizei depth,
287                                            GLenum format,
288                                            GLsizei imageSize,
289                                            const void *data)
290 {
291     ParamBuffer paramBuffer;
292 
293     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
294     paramBuffer.addValueParam("level", ParamType::TGLint, level);
295     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
296     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
297     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
298     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
299     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
300     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
301     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
302     paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
303 
304     ParamCapture dataParam("data", ParamType::TvoidConstPointer);
305     InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
306     CaptureCompressedTexSubImage3D_data(glState, isCallValid, targetPacked, level, xoffset, yoffset,
307                                         zoffset, width, height, depth, format, imageSize, data,
308                                         &dataParam);
309     paramBuffer.addParam(std::move(dataParam));
310 
311     return CallCapture(gl::EntryPoint::CompressedTexSubImage3D, std::move(paramBuffer));
312 }
313 
CaptureCopyBufferSubData(const State & glState,bool isCallValid,BufferBinding readTargetPacked,BufferBinding writeTargetPacked,GLintptr readOffset,GLintptr writeOffset,GLsizeiptr size)314 CallCapture CaptureCopyBufferSubData(const State &glState,
315                                      bool isCallValid,
316                                      BufferBinding readTargetPacked,
317                                      BufferBinding writeTargetPacked,
318                                      GLintptr readOffset,
319                                      GLintptr writeOffset,
320                                      GLsizeiptr size)
321 {
322     ParamBuffer paramBuffer;
323 
324     paramBuffer.addValueParam("readTargetPacked", ParamType::TBufferBinding, readTargetPacked);
325     paramBuffer.addValueParam("writeTargetPacked", ParamType::TBufferBinding, writeTargetPacked);
326     paramBuffer.addValueParam("readOffset", ParamType::TGLintptr, readOffset);
327     paramBuffer.addValueParam("writeOffset", ParamType::TGLintptr, writeOffset);
328     paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
329 
330     return CallCapture(gl::EntryPoint::CopyBufferSubData, std::move(paramBuffer));
331 }
332 
CaptureCopyTexSubImage3D(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLsizei width,GLsizei height)333 CallCapture CaptureCopyTexSubImage3D(const State &glState,
334                                      bool isCallValid,
335                                      TextureTarget targetPacked,
336                                      GLint level,
337                                      GLint xoffset,
338                                      GLint yoffset,
339                                      GLint zoffset,
340                                      GLint x,
341                                      GLint y,
342                                      GLsizei width,
343                                      GLsizei height)
344 {
345     ParamBuffer paramBuffer;
346 
347     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
348     paramBuffer.addValueParam("level", ParamType::TGLint, level);
349     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
350     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
351     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
352     paramBuffer.addValueParam("x", ParamType::TGLint, x);
353     paramBuffer.addValueParam("y", ParamType::TGLint, y);
354     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
355     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
356 
357     return CallCapture(gl::EntryPoint::CopyTexSubImage3D, std::move(paramBuffer));
358 }
359 
CaptureDeleteQueries(const State & glState,bool isCallValid,GLsizei n,const QueryID * idsPacked)360 CallCapture CaptureDeleteQueries(const State &glState,
361                                  bool isCallValid,
362                                  GLsizei n,
363                                  const QueryID *idsPacked)
364 {
365     ParamBuffer paramBuffer;
366 
367     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
368 
369     ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDConstPointer);
370     InitParamValue(ParamType::TQueryIDConstPointer, idsPacked, &idsPackedParam.value);
371     CaptureDeleteQueries_idsPacked(glState, isCallValid, n, idsPacked, &idsPackedParam);
372     paramBuffer.addParam(std::move(idsPackedParam));
373 
374     return CallCapture(gl::EntryPoint::DeleteQueries, std::move(paramBuffer));
375 }
376 
CaptureDeleteSamplers(const State & glState,bool isCallValid,GLsizei count,const SamplerID * samplersPacked)377 CallCapture CaptureDeleteSamplers(const State &glState,
378                                   bool isCallValid,
379                                   GLsizei count,
380                                   const SamplerID *samplersPacked)
381 {
382     ParamBuffer paramBuffer;
383 
384     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
385 
386     ParamCapture samplersPackedParam("samplersPacked", ParamType::TSamplerIDConstPointer);
387     InitParamValue(ParamType::TSamplerIDConstPointer, samplersPacked, &samplersPackedParam.value);
388     CaptureDeleteSamplers_samplersPacked(glState, isCallValid, count, samplersPacked,
389                                          &samplersPackedParam);
390     paramBuffer.addParam(std::move(samplersPackedParam));
391 
392     return CallCapture(gl::EntryPoint::DeleteSamplers, std::move(paramBuffer));
393 }
394 
CaptureDeleteSync(const State & glState,bool isCallValid,GLsync sync)395 CallCapture CaptureDeleteSync(const State &glState, bool isCallValid, GLsync sync)
396 {
397     ParamBuffer paramBuffer;
398 
399     paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
400 
401     return CallCapture(gl::EntryPoint::DeleteSync, std::move(paramBuffer));
402 }
403 
CaptureDeleteTransformFeedbacks(const State & glState,bool isCallValid,GLsizei n,const TransformFeedbackID * idsPacked)404 CallCapture CaptureDeleteTransformFeedbacks(const State &glState,
405                                             bool isCallValid,
406                                             GLsizei n,
407                                             const TransformFeedbackID *idsPacked)
408 {
409     ParamBuffer paramBuffer;
410 
411     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
412 
413     ParamCapture idsPackedParam("idsPacked", ParamType::TTransformFeedbackIDConstPointer);
414     InitParamValue(ParamType::TTransformFeedbackIDConstPointer, idsPacked, &idsPackedParam.value);
415     CaptureDeleteTransformFeedbacks_idsPacked(glState, isCallValid, n, idsPacked, &idsPackedParam);
416     paramBuffer.addParam(std::move(idsPackedParam));
417 
418     return CallCapture(gl::EntryPoint::DeleteTransformFeedbacks, std::move(paramBuffer));
419 }
420 
CaptureDeleteVertexArrays(const State & glState,bool isCallValid,GLsizei n,const VertexArrayID * arraysPacked)421 CallCapture CaptureDeleteVertexArrays(const State &glState,
422                                       bool isCallValid,
423                                       GLsizei n,
424                                       const VertexArrayID *arraysPacked)
425 {
426     ParamBuffer paramBuffer;
427 
428     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
429 
430     ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDConstPointer);
431     InitParamValue(ParamType::TVertexArrayIDConstPointer, arraysPacked, &arraysPackedParam.value);
432     CaptureDeleteVertexArrays_arraysPacked(glState, isCallValid, n, arraysPacked,
433                                            &arraysPackedParam);
434     paramBuffer.addParam(std::move(arraysPackedParam));
435 
436     return CallCapture(gl::EntryPoint::DeleteVertexArrays, std::move(paramBuffer));
437 }
438 
CaptureDrawArraysInstanced(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLint first,GLsizei count,GLsizei instancecount)439 CallCapture CaptureDrawArraysInstanced(const State &glState,
440                                        bool isCallValid,
441                                        PrimitiveMode modePacked,
442                                        GLint first,
443                                        GLsizei count,
444                                        GLsizei instancecount)
445 {
446     ParamBuffer paramBuffer;
447 
448     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
449     paramBuffer.addValueParam("first", ParamType::TGLint, first);
450     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
451     paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
452 
453     return CallCapture(gl::EntryPoint::DrawArraysInstanced, std::move(paramBuffer));
454 }
455 
CaptureDrawBuffers(const State & glState,bool isCallValid,GLsizei n,const GLenum * bufs)456 CallCapture CaptureDrawBuffers(const State &glState,
457                                bool isCallValid,
458                                GLsizei n,
459                                const GLenum *bufs)
460 {
461     ParamBuffer paramBuffer;
462 
463     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
464 
465     ParamCapture bufsParam("bufs", ParamType::TGLenumConstPointer);
466     InitParamValue(ParamType::TGLenumConstPointer, bufs, &bufsParam.value);
467     CaptureDrawBuffers_bufs(glState, isCallValid, n, bufs, &bufsParam);
468     paramBuffer.addParam(std::move(bufsParam));
469 
470     return CallCapture(gl::EntryPoint::DrawBuffers, std::move(paramBuffer));
471 }
472 
CaptureDrawElementsInstanced(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount)473 CallCapture CaptureDrawElementsInstanced(const State &glState,
474                                          bool isCallValid,
475                                          PrimitiveMode modePacked,
476                                          GLsizei count,
477                                          DrawElementsType typePacked,
478                                          const void *indices,
479                                          GLsizei instancecount)
480 {
481     ParamBuffer paramBuffer;
482 
483     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
484     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
485     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
486 
487     ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
488     InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
489     CaptureDrawElementsInstanced_indices(glState, isCallValid, modePacked, count, typePacked,
490                                          indices, instancecount, &indicesParam);
491     paramBuffer.addParam(std::move(indicesParam));
492 
493     paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
494 
495     return CallCapture(gl::EntryPoint::DrawElementsInstanced, std::move(paramBuffer));
496 }
497 
CaptureDrawRangeElements(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLuint start,GLuint end,GLsizei count,DrawElementsType typePacked,const void * indices)498 CallCapture CaptureDrawRangeElements(const State &glState,
499                                      bool isCallValid,
500                                      PrimitiveMode modePacked,
501                                      GLuint start,
502                                      GLuint end,
503                                      GLsizei count,
504                                      DrawElementsType typePacked,
505                                      const void *indices)
506 {
507     ParamBuffer paramBuffer;
508 
509     paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
510     paramBuffer.addValueParam("start", ParamType::TGLuint, start);
511     paramBuffer.addValueParam("end", ParamType::TGLuint, end);
512     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
513     paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
514 
515     ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
516     InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
517     CaptureDrawRangeElements_indices(glState, isCallValid, modePacked, start, end, count,
518                                      typePacked, indices, &indicesParam);
519     paramBuffer.addParam(std::move(indicesParam));
520 
521     return CallCapture(gl::EntryPoint::DrawRangeElements, std::move(paramBuffer));
522 }
523 
CaptureEndQuery(const State & glState,bool isCallValid,QueryType targetPacked)524 CallCapture CaptureEndQuery(const State &glState, bool isCallValid, QueryType targetPacked)
525 {
526     ParamBuffer paramBuffer;
527 
528     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
529 
530     return CallCapture(gl::EntryPoint::EndQuery, std::move(paramBuffer));
531 }
532 
CaptureEndTransformFeedback(const State & glState,bool isCallValid)533 CallCapture CaptureEndTransformFeedback(const State &glState, bool isCallValid)
534 {
535     ParamBuffer paramBuffer;
536 
537     return CallCapture(gl::EntryPoint::EndTransformFeedback, std::move(paramBuffer));
538 }
539 
CaptureFenceSync(const State & glState,bool isCallValid,GLenum condition,GLbitfield flags,GLsync returnValue)540 CallCapture CaptureFenceSync(const State &glState,
541                              bool isCallValid,
542                              GLenum condition,
543                              GLbitfield flags,
544                              GLsync returnValue)
545 {
546     ParamBuffer paramBuffer;
547 
548     paramBuffer.addEnumParam("condition", GLenumGroup::SyncCondition, ParamType::TGLenum,
549                              condition);
550     paramBuffer.addEnumParam("flags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield, flags);
551 
552     ParamCapture returnValueCapture("returnValue", ParamType::TGLsync);
553     InitParamValue(ParamType::TGLsync, returnValue, &returnValueCapture.value);
554     paramBuffer.addReturnValue(std::move(returnValueCapture));
555 
556     return CallCapture(gl::EntryPoint::FenceSync, std::move(paramBuffer));
557 }
558 
CaptureFlushMappedBufferRange(const State & glState,bool isCallValid,BufferBinding targetPacked,GLintptr offset,GLsizeiptr length)559 CallCapture CaptureFlushMappedBufferRange(const State &glState,
560                                           bool isCallValid,
561                                           BufferBinding targetPacked,
562                                           GLintptr offset,
563                                           GLsizeiptr length)
564 {
565     ParamBuffer paramBuffer;
566 
567     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
568     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
569     paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
570 
571     return CallCapture(gl::EntryPoint::FlushMappedBufferRange, std::move(paramBuffer));
572 }
573 
CaptureFramebufferTextureLayer(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureID texturePacked,GLint level,GLint layer)574 CallCapture CaptureFramebufferTextureLayer(const State &glState,
575                                            bool isCallValid,
576                                            GLenum target,
577                                            GLenum attachment,
578                                            TextureID texturePacked,
579                                            GLint level,
580                                            GLint layer)
581 {
582     ParamBuffer paramBuffer;
583 
584     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
585     paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
586                              attachment);
587     paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
588     paramBuffer.addValueParam("level", ParamType::TGLint, level);
589     paramBuffer.addValueParam("layer", ParamType::TGLint, layer);
590 
591     return CallCapture(gl::EntryPoint::FramebufferTextureLayer, std::move(paramBuffer));
592 }
593 
CaptureGenQueries(const State & glState,bool isCallValid,GLsizei n,QueryID * idsPacked)594 CallCapture CaptureGenQueries(const State &glState, bool isCallValid, GLsizei n, QueryID *idsPacked)
595 {
596     ParamBuffer paramBuffer;
597 
598     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
599 
600     ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDPointer);
601     InitParamValue(ParamType::TQueryIDPointer, idsPacked, &idsPackedParam.value);
602     CaptureGenQueries_idsPacked(glState, isCallValid, n, idsPacked, &idsPackedParam);
603     paramBuffer.addParam(std::move(idsPackedParam));
604 
605     return CallCapture(gl::EntryPoint::GenQueries, std::move(paramBuffer));
606 }
607 
CaptureGenSamplers(const State & glState,bool isCallValid,GLsizei count,SamplerID * samplersPacked)608 CallCapture CaptureGenSamplers(const State &glState,
609                                bool isCallValid,
610                                GLsizei count,
611                                SamplerID *samplersPacked)
612 {
613     ParamBuffer paramBuffer;
614 
615     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
616 
617     ParamCapture samplersPackedParam("samplersPacked", ParamType::TSamplerIDPointer);
618     InitParamValue(ParamType::TSamplerIDPointer, samplersPacked, &samplersPackedParam.value);
619     CaptureGenSamplers_samplersPacked(glState, isCallValid, count, samplersPacked,
620                                       &samplersPackedParam);
621     paramBuffer.addParam(std::move(samplersPackedParam));
622 
623     return CallCapture(gl::EntryPoint::GenSamplers, std::move(paramBuffer));
624 }
625 
CaptureGenTransformFeedbacks(const State & glState,bool isCallValid,GLsizei n,TransformFeedbackID * idsPacked)626 CallCapture CaptureGenTransformFeedbacks(const State &glState,
627                                          bool isCallValid,
628                                          GLsizei n,
629                                          TransformFeedbackID *idsPacked)
630 {
631     ParamBuffer paramBuffer;
632 
633     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
634 
635     ParamCapture idsPackedParam("idsPacked", ParamType::TTransformFeedbackIDPointer);
636     InitParamValue(ParamType::TTransformFeedbackIDPointer, idsPacked, &idsPackedParam.value);
637     CaptureGenTransformFeedbacks_idsPacked(glState, isCallValid, n, idsPacked, &idsPackedParam);
638     paramBuffer.addParam(std::move(idsPackedParam));
639 
640     return CallCapture(gl::EntryPoint::GenTransformFeedbacks, std::move(paramBuffer));
641 }
642 
CaptureGenVertexArrays(const State & glState,bool isCallValid,GLsizei n,VertexArrayID * arraysPacked)643 CallCapture CaptureGenVertexArrays(const State &glState,
644                                    bool isCallValid,
645                                    GLsizei n,
646                                    VertexArrayID *arraysPacked)
647 {
648     ParamBuffer paramBuffer;
649 
650     paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
651 
652     ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDPointer);
653     InitParamValue(ParamType::TVertexArrayIDPointer, arraysPacked, &arraysPackedParam.value);
654     CaptureGenVertexArrays_arraysPacked(glState, isCallValid, n, arraysPacked, &arraysPackedParam);
655     paramBuffer.addParam(std::move(arraysPackedParam));
656 
657     return CallCapture(gl::EntryPoint::GenVertexArrays, std::move(paramBuffer));
658 }
659 
CaptureGetActiveUniformBlockName(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint uniformBlockIndex,GLsizei bufSize,GLsizei * length,GLchar * uniformBlockName)660 CallCapture CaptureGetActiveUniformBlockName(const State &glState,
661                                              bool isCallValid,
662                                              ShaderProgramID programPacked,
663                                              GLuint uniformBlockIndex,
664                                              GLsizei bufSize,
665                                              GLsizei *length,
666                                              GLchar *uniformBlockName)
667 {
668     ParamBuffer paramBuffer;
669 
670     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
671     paramBuffer.addValueParam("uniformBlockIndex", ParamType::TGLuint, uniformBlockIndex);
672     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
673 
674     ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
675     InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
676     CaptureGetActiveUniformBlockName_length(glState, isCallValid, programPacked, uniformBlockIndex,
677                                             bufSize, length, uniformBlockName, &lengthParam);
678     paramBuffer.addParam(std::move(lengthParam));
679 
680     ParamCapture uniformBlockNameParam("uniformBlockName", ParamType::TGLcharPointer);
681     InitParamValue(ParamType::TGLcharPointer, uniformBlockName, &uniformBlockNameParam.value);
682     CaptureGetActiveUniformBlockName_uniformBlockName(glState, isCallValid, programPacked,
683                                                       uniformBlockIndex, bufSize, length,
684                                                       uniformBlockName, &uniformBlockNameParam);
685     paramBuffer.addParam(std::move(uniformBlockNameParam));
686 
687     return CallCapture(gl::EntryPoint::GetActiveUniformBlockName, std::move(paramBuffer));
688 }
689 
CaptureGetActiveUniformBlockiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint uniformBlockIndex,GLenum pname,GLint * params)690 CallCapture CaptureGetActiveUniformBlockiv(const State &glState,
691                                            bool isCallValid,
692                                            ShaderProgramID programPacked,
693                                            GLuint uniformBlockIndex,
694                                            GLenum pname,
695                                            GLint *params)
696 {
697     ParamBuffer paramBuffer;
698 
699     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
700     paramBuffer.addValueParam("uniformBlockIndex", ParamType::TGLuint, uniformBlockIndex);
701     paramBuffer.addEnumParam("pname", GLenumGroup::UniformBlockPName, ParamType::TGLenum, pname);
702 
703     ParamCapture paramsParam("params", ParamType::TGLintPointer);
704     InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
705     CaptureGetActiveUniformBlockiv_params(glState, isCallValid, programPacked, uniformBlockIndex,
706                                           pname, params, &paramsParam);
707     paramBuffer.addParam(std::move(paramsParam));
708 
709     return CallCapture(gl::EntryPoint::GetActiveUniformBlockiv, std::move(paramBuffer));
710 }
711 
CaptureGetActiveUniformsiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLsizei uniformCount,const GLuint * uniformIndices,GLenum pname,GLint * params)712 CallCapture CaptureGetActiveUniformsiv(const State &glState,
713                                        bool isCallValid,
714                                        ShaderProgramID programPacked,
715                                        GLsizei uniformCount,
716                                        const GLuint *uniformIndices,
717                                        GLenum pname,
718                                        GLint *params)
719 {
720     ParamBuffer paramBuffer;
721 
722     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
723     paramBuffer.addValueParam("uniformCount", ParamType::TGLsizei, uniformCount);
724 
725     ParamCapture uniformIndicesParam("uniformIndices", ParamType::TGLuintConstPointer);
726     InitParamValue(ParamType::TGLuintConstPointer, uniformIndices, &uniformIndicesParam.value);
727     CaptureGetActiveUniformsiv_uniformIndices(glState, isCallValid, programPacked, uniformCount,
728                                               uniformIndices, pname, params, &uniformIndicesParam);
729     paramBuffer.addParam(std::move(uniformIndicesParam));
730 
731     paramBuffer.addEnumParam("pname", GLenumGroup::UniformPName, ParamType::TGLenum, pname);
732 
733     ParamCapture paramsParam("params", ParamType::TGLintPointer);
734     InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
735     CaptureGetActiveUniformsiv_params(glState, isCallValid, programPacked, uniformCount,
736                                       uniformIndices, pname, params, &paramsParam);
737     paramBuffer.addParam(std::move(paramsParam));
738 
739     return CallCapture(gl::EntryPoint::GetActiveUniformsiv, std::move(paramBuffer));
740 }
741 
CaptureGetBufferParameteri64v(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,GLint64 * params)742 CallCapture CaptureGetBufferParameteri64v(const State &glState,
743                                           bool isCallValid,
744                                           BufferBinding targetPacked,
745                                           GLenum pname,
746                                           GLint64 *params)
747 {
748     ParamBuffer paramBuffer;
749 
750     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
751     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
752 
753     ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
754     InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
755     CaptureGetBufferParameteri64v_params(glState, isCallValid, targetPacked, pname, params,
756                                          &paramsParam);
757     paramBuffer.addParam(std::move(paramsParam));
758 
759     return CallCapture(gl::EntryPoint::GetBufferParameteri64v, std::move(paramBuffer));
760 }
761 
CaptureGetBufferPointerv(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,void ** params)762 CallCapture CaptureGetBufferPointerv(const State &glState,
763                                      bool isCallValid,
764                                      BufferBinding targetPacked,
765                                      GLenum pname,
766                                      void **params)
767 {
768     ParamBuffer paramBuffer;
769 
770     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
771     paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
772 
773     ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
774     InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
775     CaptureGetBufferPointerv_params(glState, isCallValid, targetPacked, pname, params,
776                                     &paramsParam);
777     paramBuffer.addParam(std::move(paramsParam));
778 
779     return CallCapture(gl::EntryPoint::GetBufferPointerv, std::move(paramBuffer));
780 }
781 
CaptureGetFragDataLocation(const State & glState,bool isCallValid,ShaderProgramID programPacked,const GLchar * name,GLint returnValue)782 CallCapture CaptureGetFragDataLocation(const State &glState,
783                                        bool isCallValid,
784                                        ShaderProgramID programPacked,
785                                        const GLchar *name,
786                                        GLint returnValue)
787 {
788     ParamBuffer paramBuffer;
789 
790     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
791 
792     ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
793     InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
794     CaptureGetFragDataLocation_name(glState, isCallValid, programPacked, name, &nameParam);
795     paramBuffer.addParam(std::move(nameParam));
796 
797     ParamCapture returnValueCapture("returnValue", ParamType::TGLint);
798     InitParamValue(ParamType::TGLint, returnValue, &returnValueCapture.value);
799     paramBuffer.addReturnValue(std::move(returnValueCapture));
800 
801     return CallCapture(gl::EntryPoint::GetFragDataLocation, std::move(paramBuffer));
802 }
803 
CaptureGetInteger64i_v(const State & glState,bool isCallValid,GLenum target,GLuint index,GLint64 * data)804 CallCapture CaptureGetInteger64i_v(const State &glState,
805                                    bool isCallValid,
806                                    GLenum target,
807                                    GLuint index,
808                                    GLint64 *data)
809 {
810     ParamBuffer paramBuffer;
811 
812     paramBuffer.addEnumParam("target", GLenumGroup::TypeEnum, ParamType::TGLenum, target);
813     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
814 
815     ParamCapture dataParam("data", ParamType::TGLint64Pointer);
816     InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
817     CaptureGetInteger64i_v_data(glState, isCallValid, target, index, data, &dataParam);
818     paramBuffer.addParam(std::move(dataParam));
819 
820     return CallCapture(gl::EntryPoint::GetInteger64i_v, std::move(paramBuffer));
821 }
822 
CaptureGetInteger64v(const State & glState,bool isCallValid,GLenum pname,GLint64 * data)823 CallCapture CaptureGetInteger64v(const State &glState,
824                                  bool isCallValid,
825                                  GLenum pname,
826                                  GLint64 *data)
827 {
828     ParamBuffer paramBuffer;
829 
830     paramBuffer.addEnumParam("pname", GLenumGroup::GetPName, ParamType::TGLenum, pname);
831 
832     ParamCapture dataParam("data", ParamType::TGLint64Pointer);
833     InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
834     CaptureGetInteger64v_data(glState, isCallValid, pname, data, &dataParam);
835     paramBuffer.addParam(std::move(dataParam));
836 
837     return CallCapture(gl::EntryPoint::GetInteger64v, std::move(paramBuffer));
838 }
839 
CaptureGetIntegeri_v(const State & glState,bool isCallValid,GLenum target,GLuint index,GLint * data)840 CallCapture CaptureGetIntegeri_v(const State &glState,
841                                  bool isCallValid,
842                                  GLenum target,
843                                  GLuint index,
844                                  GLint *data)
845 {
846     ParamBuffer paramBuffer;
847 
848     paramBuffer.addEnumParam("target", GLenumGroup::TypeEnum, ParamType::TGLenum, target);
849     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
850 
851     ParamCapture dataParam("data", ParamType::TGLintPointer);
852     InitParamValue(ParamType::TGLintPointer, data, &dataParam.value);
853     CaptureGetIntegeri_v_data(glState, isCallValid, target, index, data, &dataParam);
854     paramBuffer.addParam(std::move(dataParam));
855 
856     return CallCapture(gl::EntryPoint::GetIntegeri_v, std::move(paramBuffer));
857 }
858 
CaptureGetInternalformativ(const State & glState,bool isCallValid,GLenum target,GLenum internalformat,GLenum pname,GLsizei bufSize,GLint * params)859 CallCapture CaptureGetInternalformativ(const State &glState,
860                                        bool isCallValid,
861                                        GLenum target,
862                                        GLenum internalformat,
863                                        GLenum pname,
864                                        GLsizei bufSize,
865                                        GLint *params)
866 {
867     ParamBuffer paramBuffer;
868 
869     paramBuffer.addEnumParam("target", GLenumGroup::TextureTarget, ParamType::TGLenum, target);
870     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
871                              internalformat);
872     paramBuffer.addEnumParam("pname", GLenumGroup::InternalFormatPName, ParamType::TGLenum, pname);
873     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
874 
875     ParamCapture paramsParam("params", ParamType::TGLintPointer);
876     InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
877     CaptureGetInternalformativ_params(glState, isCallValid, target, internalformat, pname, bufSize,
878                                       params, &paramsParam);
879     paramBuffer.addParam(std::move(paramsParam));
880 
881     return CallCapture(gl::EntryPoint::GetInternalformativ, std::move(paramBuffer));
882 }
883 
CaptureGetProgramBinary(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLsizei bufSize,GLsizei * length,GLenum * binaryFormat,void * binary)884 CallCapture CaptureGetProgramBinary(const State &glState,
885                                     bool isCallValid,
886                                     ShaderProgramID programPacked,
887                                     GLsizei bufSize,
888                                     GLsizei *length,
889                                     GLenum *binaryFormat,
890                                     void *binary)
891 {
892     ParamBuffer paramBuffer;
893 
894     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
895     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
896 
897     ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
898     InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
899     CaptureGetProgramBinary_length(glState, isCallValid, programPacked, bufSize, length,
900                                    binaryFormat, binary, &lengthParam);
901     paramBuffer.addParam(std::move(lengthParam));
902 
903     ParamCapture binaryFormatParam("binaryFormat", ParamType::TGLenumPointer);
904     InitParamValue(ParamType::TGLenumPointer, binaryFormat, &binaryFormatParam.value);
905     CaptureGetProgramBinary_binaryFormat(glState, isCallValid, programPacked, bufSize, length,
906                                          binaryFormat, binary, &binaryFormatParam);
907     paramBuffer.addParam(std::move(binaryFormatParam));
908 
909     ParamCapture binaryParam("binary", ParamType::TvoidPointer);
910     InitParamValue(ParamType::TvoidPointer, binary, &binaryParam.value);
911     CaptureGetProgramBinary_binary(glState, isCallValid, programPacked, bufSize, length,
912                                    binaryFormat, binary, &binaryParam);
913     paramBuffer.addParam(std::move(binaryParam));
914 
915     return CallCapture(gl::EntryPoint::GetProgramBinary, std::move(paramBuffer));
916 }
917 
CaptureGetQueryObjectuiv(const State & glState,bool isCallValid,QueryID idPacked,GLenum pname,GLuint * params)918 CallCapture CaptureGetQueryObjectuiv(const State &glState,
919                                      bool isCallValid,
920                                      QueryID idPacked,
921                                      GLenum pname,
922                                      GLuint *params)
923 {
924     ParamBuffer paramBuffer;
925 
926     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
927     paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
928                              pname);
929 
930     ParamCapture paramsParam("params", ParamType::TGLuintPointer);
931     InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
932     CaptureGetQueryObjectuiv_params(glState, isCallValid, idPacked, pname, params, &paramsParam);
933     paramBuffer.addParam(std::move(paramsParam));
934 
935     return CallCapture(gl::EntryPoint::GetQueryObjectuiv, std::move(paramBuffer));
936 }
937 
CaptureGetQueryiv(const State & glState,bool isCallValid,QueryType targetPacked,GLenum pname,GLint * params)938 CallCapture CaptureGetQueryiv(const State &glState,
939                               bool isCallValid,
940                               QueryType targetPacked,
941                               GLenum pname,
942                               GLint *params)
943 {
944     ParamBuffer paramBuffer;
945 
946     paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
947     paramBuffer.addEnumParam("pname", GLenumGroup::QueryParameterName, ParamType::TGLenum, pname);
948 
949     ParamCapture paramsParam("params", ParamType::TGLintPointer);
950     InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
951     CaptureGetQueryiv_params(glState, isCallValid, targetPacked, pname, params, &paramsParam);
952     paramBuffer.addParam(std::move(paramsParam));
953 
954     return CallCapture(gl::EntryPoint::GetQueryiv, std::move(paramBuffer));
955 }
956 
CaptureGetSamplerParameterfv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLfloat * params)957 CallCapture CaptureGetSamplerParameterfv(const State &glState,
958                                          bool isCallValid,
959                                          SamplerID samplerPacked,
960                                          GLenum pname,
961                                          GLfloat *params)
962 {
963     ParamBuffer paramBuffer;
964 
965     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
966     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
967 
968     ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
969     InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
970     CaptureGetSamplerParameterfv_params(glState, isCallValid, samplerPacked, pname, params,
971                                         &paramsParam);
972     paramBuffer.addParam(std::move(paramsParam));
973 
974     return CallCapture(gl::EntryPoint::GetSamplerParameterfv, std::move(paramBuffer));
975 }
976 
CaptureGetSamplerParameteriv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLint * params)977 CallCapture CaptureGetSamplerParameteriv(const State &glState,
978                                          bool isCallValid,
979                                          SamplerID samplerPacked,
980                                          GLenum pname,
981                                          GLint *params)
982 {
983     ParamBuffer paramBuffer;
984 
985     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
986     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
987 
988     ParamCapture paramsParam("params", ParamType::TGLintPointer);
989     InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
990     CaptureGetSamplerParameteriv_params(glState, isCallValid, samplerPacked, pname, params,
991                                         &paramsParam);
992     paramBuffer.addParam(std::move(paramsParam));
993 
994     return CallCapture(gl::EntryPoint::GetSamplerParameteriv, std::move(paramBuffer));
995 }
996 
CaptureGetStringi(const State & glState,bool isCallValid,GLenum name,GLuint index,const GLubyte * returnValue)997 CallCapture CaptureGetStringi(const State &glState,
998                               bool isCallValid,
999                               GLenum name,
1000                               GLuint index,
1001                               const GLubyte *returnValue)
1002 {
1003     ParamBuffer paramBuffer;
1004 
1005     paramBuffer.addEnumParam("name", GLenumGroup::StringName, ParamType::TGLenum, name);
1006     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1007 
1008     ParamCapture returnValueCapture("returnValue", ParamType::TGLubyteConstPointer);
1009     InitParamValue(ParamType::TGLubyteConstPointer, returnValue, &returnValueCapture.value);
1010     paramBuffer.addReturnValue(std::move(returnValueCapture));
1011 
1012     return CallCapture(gl::EntryPoint::GetStringi, std::move(paramBuffer));
1013 }
1014 
CaptureGetSynciv(const State & glState,bool isCallValid,GLsync sync,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * values)1015 CallCapture CaptureGetSynciv(const State &glState,
1016                              bool isCallValid,
1017                              GLsync sync,
1018                              GLenum pname,
1019                              GLsizei bufSize,
1020                              GLsizei *length,
1021                              GLint *values)
1022 {
1023     ParamBuffer paramBuffer;
1024 
1025     paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
1026     paramBuffer.addEnumParam("pname", GLenumGroup::SyncParameterName, ParamType::TGLenum, pname);
1027     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1028 
1029     ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1030     InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1031     CaptureGetSynciv_length(glState, isCallValid, sync, pname, bufSize, length, values,
1032                             &lengthParam);
1033     paramBuffer.addParam(std::move(lengthParam));
1034 
1035     ParamCapture valuesParam("values", ParamType::TGLintPointer);
1036     InitParamValue(ParamType::TGLintPointer, values, &valuesParam.value);
1037     CaptureGetSynciv_values(glState, isCallValid, sync, pname, bufSize, length, values,
1038                             &valuesParam);
1039     paramBuffer.addParam(std::move(valuesParam));
1040 
1041     return CallCapture(gl::EntryPoint::GetSynciv, std::move(paramBuffer));
1042 }
1043 
CaptureGetTransformFeedbackVarying(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint index,GLsizei bufSize,GLsizei * length,GLsizei * size,GLenum * type,GLchar * name)1044 CallCapture CaptureGetTransformFeedbackVarying(const State &glState,
1045                                                bool isCallValid,
1046                                                ShaderProgramID programPacked,
1047                                                GLuint index,
1048                                                GLsizei bufSize,
1049                                                GLsizei *length,
1050                                                GLsizei *size,
1051                                                GLenum *type,
1052                                                GLchar *name)
1053 {
1054     ParamBuffer paramBuffer;
1055 
1056     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1057     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1058     paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1059 
1060     ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
1061     InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
1062     CaptureGetTransformFeedbackVarying_length(glState, isCallValid, programPacked, index, bufSize,
1063                                               length, size, type, name, &lengthParam);
1064     paramBuffer.addParam(std::move(lengthParam));
1065 
1066     ParamCapture sizeParam("size", ParamType::TGLsizeiPointer);
1067     InitParamValue(ParamType::TGLsizeiPointer, size, &sizeParam.value);
1068     CaptureGetTransformFeedbackVarying_size(glState, isCallValid, programPacked, index, bufSize,
1069                                             length, size, type, name, &sizeParam);
1070     paramBuffer.addParam(std::move(sizeParam));
1071 
1072     ParamCapture typeParam("type", ParamType::TGLenumPointer);
1073     InitParamValue(ParamType::TGLenumPointer, type, &typeParam.value);
1074     CaptureGetTransformFeedbackVarying_type(glState, isCallValid, programPacked, index, bufSize,
1075                                             length, size, type, name, &typeParam);
1076     paramBuffer.addParam(std::move(typeParam));
1077 
1078     ParamCapture nameParam("name", ParamType::TGLcharPointer);
1079     InitParamValue(ParamType::TGLcharPointer, name, &nameParam.value);
1080     CaptureGetTransformFeedbackVarying_name(glState, isCallValid, programPacked, index, bufSize,
1081                                             length, size, type, name, &nameParam);
1082     paramBuffer.addParam(std::move(nameParam));
1083 
1084     return CallCapture(gl::EntryPoint::GetTransformFeedbackVarying, std::move(paramBuffer));
1085 }
1086 
CaptureGetUniformBlockIndex(const State & glState,bool isCallValid,ShaderProgramID programPacked,const GLchar * uniformBlockName,GLuint returnValue)1087 CallCapture CaptureGetUniformBlockIndex(const State &glState,
1088                                         bool isCallValid,
1089                                         ShaderProgramID programPacked,
1090                                         const GLchar *uniformBlockName,
1091                                         GLuint returnValue)
1092 {
1093     ParamBuffer paramBuffer;
1094 
1095     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1096 
1097     ParamCapture uniformBlockNameParam("uniformBlockName", ParamType::TGLcharConstPointer);
1098     InitParamValue(ParamType::TGLcharConstPointer, uniformBlockName, &uniformBlockNameParam.value);
1099     CaptureGetUniformBlockIndex_uniformBlockName(glState, isCallValid, programPacked,
1100                                                  uniformBlockName, &uniformBlockNameParam);
1101     paramBuffer.addParam(std::move(uniformBlockNameParam));
1102 
1103     ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
1104     InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
1105     paramBuffer.addReturnValue(std::move(returnValueCapture));
1106 
1107     return CallCapture(gl::EntryPoint::GetUniformBlockIndex, std::move(paramBuffer));
1108 }
1109 
CaptureGetUniformIndices(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLsizei uniformCount,const GLchar * const * uniformNames,GLuint * uniformIndices)1110 CallCapture CaptureGetUniformIndices(const State &glState,
1111                                      bool isCallValid,
1112                                      ShaderProgramID programPacked,
1113                                      GLsizei uniformCount,
1114                                      const GLchar *const *uniformNames,
1115                                      GLuint *uniformIndices)
1116 {
1117     ParamBuffer paramBuffer;
1118 
1119     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1120     paramBuffer.addValueParam("uniformCount", ParamType::TGLsizei, uniformCount);
1121 
1122     ParamCapture uniformNamesParam("uniformNames", ParamType::TGLcharConstPointerPointer);
1123     InitParamValue(ParamType::TGLcharConstPointerPointer, uniformNames, &uniformNamesParam.value);
1124     CaptureGetUniformIndices_uniformNames(glState, isCallValid, programPacked, uniformCount,
1125                                           uniformNames, uniformIndices, &uniformNamesParam);
1126     paramBuffer.addParam(std::move(uniformNamesParam));
1127 
1128     ParamCapture uniformIndicesParam("uniformIndices", ParamType::TGLuintPointer);
1129     InitParamValue(ParamType::TGLuintPointer, uniformIndices, &uniformIndicesParam.value);
1130     CaptureGetUniformIndices_uniformIndices(glState, isCallValid, programPacked, uniformCount,
1131                                             uniformNames, uniformIndices, &uniformIndicesParam);
1132     paramBuffer.addParam(std::move(uniformIndicesParam));
1133 
1134     return CallCapture(gl::EntryPoint::GetUniformIndices, std::move(paramBuffer));
1135 }
1136 
CaptureGetUniformuiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint * params)1137 CallCapture CaptureGetUniformuiv(const State &glState,
1138                                  bool isCallValid,
1139                                  ShaderProgramID programPacked,
1140                                  UniformLocation locationPacked,
1141                                  GLuint *params)
1142 {
1143     ParamBuffer paramBuffer;
1144 
1145     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1146     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1147 
1148     ParamCapture paramsParam("params", ParamType::TGLuintPointer);
1149     InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
1150     CaptureGetUniformuiv_params(glState, isCallValid, programPacked, locationPacked, params,
1151                                 &paramsParam);
1152     paramBuffer.addParam(std::move(paramsParam));
1153 
1154     return CallCapture(gl::EntryPoint::GetUniformuiv, std::move(paramBuffer));
1155 }
1156 
CaptureGetVertexAttribIiv(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLint * params)1157 CallCapture CaptureGetVertexAttribIiv(const State &glState,
1158                                       bool isCallValid,
1159                                       GLuint index,
1160                                       GLenum pname,
1161                                       GLint *params)
1162 {
1163     ParamBuffer paramBuffer;
1164 
1165     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1166     paramBuffer.addEnumParam("pname", GLenumGroup::VertexAttribEnum, ParamType::TGLenum, pname);
1167 
1168     ParamCapture paramsParam("params", ParamType::TGLintPointer);
1169     InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
1170     CaptureGetVertexAttribIiv_params(glState, isCallValid, index, pname, params, &paramsParam);
1171     paramBuffer.addParam(std::move(paramsParam));
1172 
1173     return CallCapture(gl::EntryPoint::GetVertexAttribIiv, std::move(paramBuffer));
1174 }
1175 
CaptureGetVertexAttribIuiv(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLuint * params)1176 CallCapture CaptureGetVertexAttribIuiv(const State &glState,
1177                                        bool isCallValid,
1178                                        GLuint index,
1179                                        GLenum pname,
1180                                        GLuint *params)
1181 {
1182     ParamBuffer paramBuffer;
1183 
1184     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1185     paramBuffer.addEnumParam("pname", GLenumGroup::VertexAttribEnum, ParamType::TGLenum, pname);
1186 
1187     ParamCapture paramsParam("params", ParamType::TGLuintPointer);
1188     InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
1189     CaptureGetVertexAttribIuiv_params(glState, isCallValid, index, pname, params, &paramsParam);
1190     paramBuffer.addParam(std::move(paramsParam));
1191 
1192     return CallCapture(gl::EntryPoint::GetVertexAttribIuiv, std::move(paramBuffer));
1193 }
1194 
CaptureInvalidateFramebuffer(const State & glState,bool isCallValid,GLenum target,GLsizei numAttachments,const GLenum * attachments)1195 CallCapture CaptureInvalidateFramebuffer(const State &glState,
1196                                          bool isCallValid,
1197                                          GLenum target,
1198                                          GLsizei numAttachments,
1199                                          const GLenum *attachments)
1200 {
1201     ParamBuffer paramBuffer;
1202 
1203     paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
1204     paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);
1205 
1206     ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
1207     InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
1208     CaptureInvalidateFramebuffer_attachments(glState, isCallValid, target, numAttachments,
1209                                              attachments, &attachmentsParam);
1210     paramBuffer.addParam(std::move(attachmentsParam));
1211 
1212     return CallCapture(gl::EntryPoint::InvalidateFramebuffer, std::move(paramBuffer));
1213 }
1214 
CaptureInvalidateSubFramebuffer(const State & glState,bool isCallValid,GLenum target,GLsizei numAttachments,const GLenum * attachments,GLint x,GLint y,GLsizei width,GLsizei height)1215 CallCapture CaptureInvalidateSubFramebuffer(const State &glState,
1216                                             bool isCallValid,
1217                                             GLenum target,
1218                                             GLsizei numAttachments,
1219                                             const GLenum *attachments,
1220                                             GLint x,
1221                                             GLint y,
1222                                             GLsizei width,
1223                                             GLsizei height)
1224 {
1225     ParamBuffer paramBuffer;
1226 
1227     paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
1228     paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);
1229 
1230     ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
1231     InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
1232     CaptureInvalidateSubFramebuffer_attachments(glState, isCallValid, target, numAttachments,
1233                                                 attachments, x, y, width, height,
1234                                                 &attachmentsParam);
1235     paramBuffer.addParam(std::move(attachmentsParam));
1236 
1237     paramBuffer.addValueParam("x", ParamType::TGLint, x);
1238     paramBuffer.addValueParam("y", ParamType::TGLint, y);
1239     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1240     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1241 
1242     return CallCapture(gl::EntryPoint::InvalidateSubFramebuffer, std::move(paramBuffer));
1243 }
1244 
CaptureIsQuery(const State & glState,bool isCallValid,QueryID idPacked,GLboolean returnValue)1245 CallCapture CaptureIsQuery(const State &glState,
1246                            bool isCallValid,
1247                            QueryID idPacked,
1248                            GLboolean returnValue)
1249 {
1250     ParamBuffer paramBuffer;
1251 
1252     paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
1253 
1254     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
1255     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
1256     paramBuffer.addReturnValue(std::move(returnValueCapture));
1257 
1258     return CallCapture(gl::EntryPoint::IsQuery, std::move(paramBuffer));
1259 }
1260 
CaptureIsSampler(const State & glState,bool isCallValid,SamplerID samplerPacked,GLboolean returnValue)1261 CallCapture CaptureIsSampler(const State &glState,
1262                              bool isCallValid,
1263                              SamplerID samplerPacked,
1264                              GLboolean returnValue)
1265 {
1266     ParamBuffer paramBuffer;
1267 
1268     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
1269 
1270     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
1271     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
1272     paramBuffer.addReturnValue(std::move(returnValueCapture));
1273 
1274     return CallCapture(gl::EntryPoint::IsSampler, std::move(paramBuffer));
1275 }
1276 
CaptureIsSync(const State & glState,bool isCallValid,GLsync sync,GLboolean returnValue)1277 CallCapture CaptureIsSync(const State &glState,
1278                           bool isCallValid,
1279                           GLsync sync,
1280                           GLboolean returnValue)
1281 {
1282     ParamBuffer paramBuffer;
1283 
1284     paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
1285 
1286     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
1287     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
1288     paramBuffer.addReturnValue(std::move(returnValueCapture));
1289 
1290     return CallCapture(gl::EntryPoint::IsSync, std::move(paramBuffer));
1291 }
1292 
CaptureIsTransformFeedback(const State & glState,bool isCallValid,TransformFeedbackID idPacked,GLboolean returnValue)1293 CallCapture CaptureIsTransformFeedback(const State &glState,
1294                                        bool isCallValid,
1295                                        TransformFeedbackID idPacked,
1296                                        GLboolean returnValue)
1297 {
1298     ParamBuffer paramBuffer;
1299 
1300     paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked);
1301 
1302     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
1303     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
1304     paramBuffer.addReturnValue(std::move(returnValueCapture));
1305 
1306     return CallCapture(gl::EntryPoint::IsTransformFeedback, std::move(paramBuffer));
1307 }
1308 
CaptureIsVertexArray(const State & glState,bool isCallValid,VertexArrayID arrayPacked,GLboolean returnValue)1309 CallCapture CaptureIsVertexArray(const State &glState,
1310                                  bool isCallValid,
1311                                  VertexArrayID arrayPacked,
1312                                  GLboolean returnValue)
1313 {
1314     ParamBuffer paramBuffer;
1315 
1316     paramBuffer.addValueParam("arrayPacked", ParamType::TVertexArrayID, arrayPacked);
1317 
1318     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
1319     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
1320     paramBuffer.addReturnValue(std::move(returnValueCapture));
1321 
1322     return CallCapture(gl::EntryPoint::IsVertexArray, std::move(paramBuffer));
1323 }
1324 
CaptureMapBufferRange(const State & glState,bool isCallValid,BufferBinding targetPacked,GLintptr offset,GLsizeiptr length,GLbitfield access,void * returnValue)1325 CallCapture CaptureMapBufferRange(const State &glState,
1326                                   bool isCallValid,
1327                                   BufferBinding targetPacked,
1328                                   GLintptr offset,
1329                                   GLsizeiptr length,
1330                                   GLbitfield access,
1331                                   void *returnValue)
1332 {
1333     ParamBuffer paramBuffer;
1334 
1335     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
1336     paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
1337     paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
1338     paramBuffer.addEnumParam("access", GLenumGroup::BufferAccessMask, ParamType::TGLbitfield,
1339                              access);
1340 
1341     ParamCapture returnValueCapture("returnValue", ParamType::TvoidPointer);
1342     InitParamValue(ParamType::TvoidPointer, returnValue, &returnValueCapture.value);
1343     paramBuffer.addReturnValue(std::move(returnValueCapture));
1344 
1345     return CallCapture(gl::EntryPoint::MapBufferRange, std::move(paramBuffer));
1346 }
1347 
CapturePauseTransformFeedback(const State & glState,bool isCallValid)1348 CallCapture CapturePauseTransformFeedback(const State &glState, bool isCallValid)
1349 {
1350     ParamBuffer paramBuffer;
1351 
1352     return CallCapture(gl::EntryPoint::PauseTransformFeedback, std::move(paramBuffer));
1353 }
1354 
CaptureProgramBinary(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum binaryFormat,const void * binary,GLsizei length)1355 CallCapture CaptureProgramBinary(const State &glState,
1356                                  bool isCallValid,
1357                                  ShaderProgramID programPacked,
1358                                  GLenum binaryFormat,
1359                                  const void *binary,
1360                                  GLsizei length)
1361 {
1362     ParamBuffer paramBuffer;
1363 
1364     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1365     paramBuffer.addEnumParam("binaryFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
1366                              binaryFormat);
1367 
1368     ParamCapture binaryParam("binary", ParamType::TvoidConstPointer);
1369     InitParamValue(ParamType::TvoidConstPointer, binary, &binaryParam.value);
1370     CaptureProgramBinary_binary(glState, isCallValid, programPacked, binaryFormat, binary, length,
1371                                 &binaryParam);
1372     paramBuffer.addParam(std::move(binaryParam));
1373 
1374     paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
1375 
1376     return CallCapture(gl::EntryPoint::ProgramBinary, std::move(paramBuffer));
1377 }
1378 
CaptureProgramParameteri(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum pname,GLint value)1379 CallCapture CaptureProgramParameteri(const State &glState,
1380                                      bool isCallValid,
1381                                      ShaderProgramID programPacked,
1382                                      GLenum pname,
1383                                      GLint value)
1384 {
1385     ParamBuffer paramBuffer;
1386 
1387     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1388     paramBuffer.addEnumParam("pname", GLenumGroup::ProgramParameterPName, ParamType::TGLenum,
1389                              pname);
1390     paramBuffer.addValueParam("value", ParamType::TGLint, value);
1391 
1392     return CallCapture(gl::EntryPoint::ProgramParameteri, std::move(paramBuffer));
1393 }
1394 
CaptureReadBuffer(const State & glState,bool isCallValid,GLenum src)1395 CallCapture CaptureReadBuffer(const State &glState, bool isCallValid, GLenum src)
1396 {
1397     ParamBuffer paramBuffer;
1398 
1399     paramBuffer.addEnumParam("src", GLenumGroup::ReadBufferMode, ParamType::TGLenum, src);
1400 
1401     return CallCapture(gl::EntryPoint::ReadBuffer, std::move(paramBuffer));
1402 }
1403 
CaptureRenderbufferStorageMultisample(const State & glState,bool isCallValid,GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height)1404 CallCapture CaptureRenderbufferStorageMultisample(const State &glState,
1405                                                   bool isCallValid,
1406                                                   GLenum target,
1407                                                   GLsizei samples,
1408                                                   GLenum internalformat,
1409                                                   GLsizei width,
1410                                                   GLsizei height)
1411 {
1412     ParamBuffer paramBuffer;
1413 
1414     paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
1415     paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
1416     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
1417                              internalformat);
1418     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1419     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1420 
1421     return CallCapture(gl::EntryPoint::RenderbufferStorageMultisample, std::move(paramBuffer));
1422 }
1423 
CaptureResumeTransformFeedback(const State & glState,bool isCallValid)1424 CallCapture CaptureResumeTransformFeedback(const State &glState, bool isCallValid)
1425 {
1426     ParamBuffer paramBuffer;
1427 
1428     return CallCapture(gl::EntryPoint::ResumeTransformFeedback, std::move(paramBuffer));
1429 }
1430 
CaptureSamplerParameterf(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLfloat param)1431 CallCapture CaptureSamplerParameterf(const State &glState,
1432                                      bool isCallValid,
1433                                      SamplerID samplerPacked,
1434                                      GLenum pname,
1435                                      GLfloat param)
1436 {
1437     ParamBuffer paramBuffer;
1438 
1439     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
1440     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
1441     paramBuffer.addValueParam("param", ParamType::TGLfloat, param);
1442 
1443     return CallCapture(gl::EntryPoint::SamplerParameterf, std::move(paramBuffer));
1444 }
1445 
CaptureSamplerParameterfv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLfloat * param)1446 CallCapture CaptureSamplerParameterfv(const State &glState,
1447                                       bool isCallValid,
1448                                       SamplerID samplerPacked,
1449                                       GLenum pname,
1450                                       const GLfloat *param)
1451 {
1452     ParamBuffer paramBuffer;
1453 
1454     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
1455     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
1456 
1457     ParamCapture paramParam("param", ParamType::TGLfloatConstPointer);
1458     InitParamValue(ParamType::TGLfloatConstPointer, param, &paramParam.value);
1459     CaptureSamplerParameterfv_param(glState, isCallValid, samplerPacked, pname, param, &paramParam);
1460     paramBuffer.addParam(std::move(paramParam));
1461 
1462     return CallCapture(gl::EntryPoint::SamplerParameterfv, std::move(paramBuffer));
1463 }
1464 
CaptureSamplerParameteri(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLint param)1465 CallCapture CaptureSamplerParameteri(const State &glState,
1466                                      bool isCallValid,
1467                                      SamplerID samplerPacked,
1468                                      GLenum pname,
1469                                      GLint param)
1470 {
1471     ParamBuffer paramBuffer;
1472 
1473     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
1474     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
1475     paramBuffer.addValueParam("param", ParamType::TGLint, param);
1476 
1477     return CallCapture(gl::EntryPoint::SamplerParameteri, std::move(paramBuffer));
1478 }
1479 
CaptureSamplerParameteriv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLint * param)1480 CallCapture CaptureSamplerParameteriv(const State &glState,
1481                                       bool isCallValid,
1482                                       SamplerID samplerPacked,
1483                                       GLenum pname,
1484                                       const GLint *param)
1485 {
1486     ParamBuffer paramBuffer;
1487 
1488     paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
1489     paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
1490 
1491     ParamCapture paramParam("param", ParamType::TGLintConstPointer);
1492     InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
1493     CaptureSamplerParameteriv_param(glState, isCallValid, samplerPacked, pname, param, &paramParam);
1494     paramBuffer.addParam(std::move(paramParam));
1495 
1496     return CallCapture(gl::EntryPoint::SamplerParameteriv, std::move(paramBuffer));
1497 }
1498 
CaptureTexImage3D(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,const void * pixels)1499 CallCapture CaptureTexImage3D(const State &glState,
1500                               bool isCallValid,
1501                               TextureTarget targetPacked,
1502                               GLint level,
1503                               GLint internalformat,
1504                               GLsizei width,
1505                               GLsizei height,
1506                               GLsizei depth,
1507                               GLint border,
1508                               GLenum format,
1509                               GLenum type,
1510                               const void *pixels)
1511 {
1512     ParamBuffer paramBuffer;
1513 
1514     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
1515     paramBuffer.addValueParam("level", ParamType::TGLint, level);
1516     paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
1517     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1518     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1519     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
1520     paramBuffer.addValueParam("border", ParamType::TGLint, border);
1521     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
1522     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
1523 
1524     ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
1525     InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
1526     CaptureTexImage3D_pixels(glState, isCallValid, targetPacked, level, internalformat, width,
1527                              height, depth, border, format, type, pixels, &pixelsParam);
1528     paramBuffer.addParam(std::move(pixelsParam));
1529 
1530     return CallCapture(gl::EntryPoint::TexImage3D, std::move(paramBuffer));
1531 }
1532 
CaptureTexStorage2D(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height)1533 CallCapture CaptureTexStorage2D(const State &glState,
1534                                 bool isCallValid,
1535                                 TextureType targetPacked,
1536                                 GLsizei levels,
1537                                 GLenum internalformat,
1538                                 GLsizei width,
1539                                 GLsizei height)
1540 {
1541     ParamBuffer paramBuffer;
1542 
1543     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1544     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
1545     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
1546                              internalformat);
1547     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1548     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1549 
1550     return CallCapture(gl::EntryPoint::TexStorage2D, std::move(paramBuffer));
1551 }
1552 
CaptureTexStorage3D(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth)1553 CallCapture CaptureTexStorage3D(const State &glState,
1554                                 bool isCallValid,
1555                                 TextureType targetPacked,
1556                                 GLsizei levels,
1557                                 GLenum internalformat,
1558                                 GLsizei width,
1559                                 GLsizei height,
1560                                 GLsizei depth)
1561 {
1562     ParamBuffer paramBuffer;
1563 
1564     paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1565     paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
1566     paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
1567                              internalformat);
1568     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1569     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1570     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
1571 
1572     return CallCapture(gl::EntryPoint::TexStorage3D, std::move(paramBuffer));
1573 }
1574 
CaptureTexSubImage3D(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)1575 CallCapture CaptureTexSubImage3D(const State &glState,
1576                                  bool isCallValid,
1577                                  TextureTarget targetPacked,
1578                                  GLint level,
1579                                  GLint xoffset,
1580                                  GLint yoffset,
1581                                  GLint zoffset,
1582                                  GLsizei width,
1583                                  GLsizei height,
1584                                  GLsizei depth,
1585                                  GLenum format,
1586                                  GLenum type,
1587                                  const void *pixels)
1588 {
1589     ParamBuffer paramBuffer;
1590 
1591     paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
1592     paramBuffer.addValueParam("level", ParamType::TGLint, level);
1593     paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
1594     paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
1595     paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
1596     paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1597     paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1598     paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
1599     paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
1600     paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);
1601 
1602     ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
1603     InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
1604     CaptureTexSubImage3D_pixels(glState, isCallValid, targetPacked, level, xoffset, yoffset,
1605                                 zoffset, width, height, depth, format, type, pixels, &pixelsParam);
1606     paramBuffer.addParam(std::move(pixelsParam));
1607 
1608     return CallCapture(gl::EntryPoint::TexSubImage3D, std::move(paramBuffer));
1609 }
1610 
CaptureTransformFeedbackVaryings(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLsizei count,const GLchar * const * varyings,GLenum bufferMode)1611 CallCapture CaptureTransformFeedbackVaryings(const State &glState,
1612                                              bool isCallValid,
1613                                              ShaderProgramID programPacked,
1614                                              GLsizei count,
1615                                              const GLchar *const *varyings,
1616                                              GLenum bufferMode)
1617 {
1618     ParamBuffer paramBuffer;
1619 
1620     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1621     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1622 
1623     ParamCapture varyingsParam("varyings", ParamType::TGLcharConstPointerPointer);
1624     InitParamValue(ParamType::TGLcharConstPointerPointer, varyings, &varyingsParam.value);
1625     CaptureTransformFeedbackVaryings_varyings(glState, isCallValid, programPacked, count, varyings,
1626                                               bufferMode, &varyingsParam);
1627     paramBuffer.addParam(std::move(varyingsParam));
1628 
1629     paramBuffer.addEnumParam("bufferMode", GLenumGroup::DefaultGroup, ParamType::TGLenum,
1630                              bufferMode);
1631 
1632     return CallCapture(gl::EntryPoint::TransformFeedbackVaryings, std::move(paramBuffer));
1633 }
1634 
CaptureUniform1ui(const State & glState,bool isCallValid,UniformLocation locationPacked,GLuint v0)1635 CallCapture CaptureUniform1ui(const State &glState,
1636                               bool isCallValid,
1637                               UniformLocation locationPacked,
1638                               GLuint v0)
1639 {
1640     ParamBuffer paramBuffer;
1641 
1642     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1643     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
1644 
1645     return CallCapture(gl::EntryPoint::Uniform1ui, std::move(paramBuffer));
1646 }
1647 
CaptureUniform1uiv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLuint * value)1648 CallCapture CaptureUniform1uiv(const State &glState,
1649                                bool isCallValid,
1650                                UniformLocation locationPacked,
1651                                GLsizei count,
1652                                const GLuint *value)
1653 {
1654     ParamBuffer paramBuffer;
1655 
1656     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1657     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1658 
1659     ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1660     InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
1661     CaptureUniform1uiv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
1662     paramBuffer.addParam(std::move(valueParam));
1663 
1664     return CallCapture(gl::EntryPoint::Uniform1uiv, std::move(paramBuffer));
1665 }
1666 
CaptureUniform2ui(const State & glState,bool isCallValid,UniformLocation locationPacked,GLuint v0,GLuint v1)1667 CallCapture CaptureUniform2ui(const State &glState,
1668                               bool isCallValid,
1669                               UniformLocation locationPacked,
1670                               GLuint v0,
1671                               GLuint v1)
1672 {
1673     ParamBuffer paramBuffer;
1674 
1675     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1676     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
1677     paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
1678 
1679     return CallCapture(gl::EntryPoint::Uniform2ui, std::move(paramBuffer));
1680 }
1681 
CaptureUniform2uiv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLuint * value)1682 CallCapture CaptureUniform2uiv(const State &glState,
1683                                bool isCallValid,
1684                                UniformLocation locationPacked,
1685                                GLsizei count,
1686                                const GLuint *value)
1687 {
1688     ParamBuffer paramBuffer;
1689 
1690     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1691     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1692 
1693     ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1694     InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
1695     CaptureUniform2uiv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
1696     paramBuffer.addParam(std::move(valueParam));
1697 
1698     return CallCapture(gl::EntryPoint::Uniform2uiv, std::move(paramBuffer));
1699 }
1700 
CaptureUniform3ui(const State & glState,bool isCallValid,UniformLocation locationPacked,GLuint v0,GLuint v1,GLuint v2)1701 CallCapture CaptureUniform3ui(const State &glState,
1702                               bool isCallValid,
1703                               UniformLocation locationPacked,
1704                               GLuint v0,
1705                               GLuint v1,
1706                               GLuint v2)
1707 {
1708     ParamBuffer paramBuffer;
1709 
1710     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1711     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
1712     paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
1713     paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);
1714 
1715     return CallCapture(gl::EntryPoint::Uniform3ui, std::move(paramBuffer));
1716 }
1717 
CaptureUniform3uiv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLuint * value)1718 CallCapture CaptureUniform3uiv(const State &glState,
1719                                bool isCallValid,
1720                                UniformLocation locationPacked,
1721                                GLsizei count,
1722                                const GLuint *value)
1723 {
1724     ParamBuffer paramBuffer;
1725 
1726     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1727     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1728 
1729     ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1730     InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
1731     CaptureUniform3uiv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
1732     paramBuffer.addParam(std::move(valueParam));
1733 
1734     return CallCapture(gl::EntryPoint::Uniform3uiv, std::move(paramBuffer));
1735 }
1736 
CaptureUniform4ui(const State & glState,bool isCallValid,UniformLocation locationPacked,GLuint v0,GLuint v1,GLuint v2,GLuint v3)1737 CallCapture CaptureUniform4ui(const State &glState,
1738                               bool isCallValid,
1739                               UniformLocation locationPacked,
1740                               GLuint v0,
1741                               GLuint v1,
1742                               GLuint v2,
1743                               GLuint v3)
1744 {
1745     ParamBuffer paramBuffer;
1746 
1747     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1748     paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
1749     paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
1750     paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);
1751     paramBuffer.addValueParam("v3", ParamType::TGLuint, v3);
1752 
1753     return CallCapture(gl::EntryPoint::Uniform4ui, std::move(paramBuffer));
1754 }
1755 
CaptureUniform4uiv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLuint * value)1756 CallCapture CaptureUniform4uiv(const State &glState,
1757                                bool isCallValid,
1758                                UniformLocation locationPacked,
1759                                GLsizei count,
1760                                const GLuint *value)
1761 {
1762     ParamBuffer paramBuffer;
1763 
1764     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1765     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1766 
1767     ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1768     InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
1769     CaptureUniform4uiv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
1770     paramBuffer.addParam(std::move(valueParam));
1771 
1772     return CallCapture(gl::EntryPoint::Uniform4uiv, std::move(paramBuffer));
1773 }
1774 
CaptureUniformBlockBinding(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint uniformBlockIndex,GLuint uniformBlockBinding)1775 CallCapture CaptureUniformBlockBinding(const State &glState,
1776                                        bool isCallValid,
1777                                        ShaderProgramID programPacked,
1778                                        GLuint uniformBlockIndex,
1779                                        GLuint uniformBlockBinding)
1780 {
1781     ParamBuffer paramBuffer;
1782 
1783     paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1784     paramBuffer.addValueParam("uniformBlockIndex", ParamType::TGLuint, uniformBlockIndex);
1785     paramBuffer.addValueParam("uniformBlockBinding", ParamType::TGLuint, uniformBlockBinding);
1786 
1787     return CallCapture(gl::EntryPoint::UniformBlockBinding, std::move(paramBuffer));
1788 }
1789 
CaptureUniformMatrix2x3fv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1790 CallCapture CaptureUniformMatrix2x3fv(const State &glState,
1791                                       bool isCallValid,
1792                                       UniformLocation locationPacked,
1793                                       GLsizei count,
1794                                       GLboolean transpose,
1795                                       const GLfloat *value)
1796 {
1797     ParamBuffer paramBuffer;
1798 
1799     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1800     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1801     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1802 
1803     ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1804     InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1805     CaptureUniformMatrix2x3fv_value(glState, isCallValid, locationPacked, count, transpose, value,
1806                                     &valueParam);
1807     paramBuffer.addParam(std::move(valueParam));
1808 
1809     return CallCapture(gl::EntryPoint::UniformMatrix2x3fv, std::move(paramBuffer));
1810 }
1811 
CaptureUniformMatrix2x4fv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1812 CallCapture CaptureUniformMatrix2x4fv(const State &glState,
1813                                       bool isCallValid,
1814                                       UniformLocation locationPacked,
1815                                       GLsizei count,
1816                                       GLboolean transpose,
1817                                       const GLfloat *value)
1818 {
1819     ParamBuffer paramBuffer;
1820 
1821     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1822     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1823     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1824 
1825     ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1826     InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1827     CaptureUniformMatrix2x4fv_value(glState, isCallValid, locationPacked, count, transpose, value,
1828                                     &valueParam);
1829     paramBuffer.addParam(std::move(valueParam));
1830 
1831     return CallCapture(gl::EntryPoint::UniformMatrix2x4fv, std::move(paramBuffer));
1832 }
1833 
CaptureUniformMatrix3x2fv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1834 CallCapture CaptureUniformMatrix3x2fv(const State &glState,
1835                                       bool isCallValid,
1836                                       UniformLocation locationPacked,
1837                                       GLsizei count,
1838                                       GLboolean transpose,
1839                                       const GLfloat *value)
1840 {
1841     ParamBuffer paramBuffer;
1842 
1843     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1844     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1845     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1846 
1847     ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1848     InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1849     CaptureUniformMatrix3x2fv_value(glState, isCallValid, locationPacked, count, transpose, value,
1850                                     &valueParam);
1851     paramBuffer.addParam(std::move(valueParam));
1852 
1853     return CallCapture(gl::EntryPoint::UniformMatrix3x2fv, std::move(paramBuffer));
1854 }
1855 
CaptureUniformMatrix3x4fv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1856 CallCapture CaptureUniformMatrix3x4fv(const State &glState,
1857                                       bool isCallValid,
1858                                       UniformLocation locationPacked,
1859                                       GLsizei count,
1860                                       GLboolean transpose,
1861                                       const GLfloat *value)
1862 {
1863     ParamBuffer paramBuffer;
1864 
1865     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1866     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1867     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1868 
1869     ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1870     InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1871     CaptureUniformMatrix3x4fv_value(glState, isCallValid, locationPacked, count, transpose, value,
1872                                     &valueParam);
1873     paramBuffer.addParam(std::move(valueParam));
1874 
1875     return CallCapture(gl::EntryPoint::UniformMatrix3x4fv, std::move(paramBuffer));
1876 }
1877 
CaptureUniformMatrix4x2fv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1878 CallCapture CaptureUniformMatrix4x2fv(const State &glState,
1879                                       bool isCallValid,
1880                                       UniformLocation locationPacked,
1881                                       GLsizei count,
1882                                       GLboolean transpose,
1883                                       const GLfloat *value)
1884 {
1885     ParamBuffer paramBuffer;
1886 
1887     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1888     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1889     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1890 
1891     ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1892     InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1893     CaptureUniformMatrix4x2fv_value(glState, isCallValid, locationPacked, count, transpose, value,
1894                                     &valueParam);
1895     paramBuffer.addParam(std::move(valueParam));
1896 
1897     return CallCapture(gl::EntryPoint::UniformMatrix4x2fv, std::move(paramBuffer));
1898 }
1899 
CaptureUniformMatrix4x3fv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1900 CallCapture CaptureUniformMatrix4x3fv(const State &glState,
1901                                       bool isCallValid,
1902                                       UniformLocation locationPacked,
1903                                       GLsizei count,
1904                                       GLboolean transpose,
1905                                       const GLfloat *value)
1906 {
1907     ParamBuffer paramBuffer;
1908 
1909     paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1910     paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1911     paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1912 
1913     ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1914     InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1915     CaptureUniformMatrix4x3fv_value(glState, isCallValid, locationPacked, count, transpose, value,
1916                                     &valueParam);
1917     paramBuffer.addParam(std::move(valueParam));
1918 
1919     return CallCapture(gl::EntryPoint::UniformMatrix4x3fv, std::move(paramBuffer));
1920 }
1921 
CaptureUnmapBuffer(const State & glState,bool isCallValid,BufferBinding targetPacked,GLboolean returnValue)1922 CallCapture CaptureUnmapBuffer(const State &glState,
1923                                bool isCallValid,
1924                                BufferBinding targetPacked,
1925                                GLboolean returnValue)
1926 {
1927     ParamBuffer paramBuffer;
1928 
1929     paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
1930 
1931     ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
1932     InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
1933     paramBuffer.addReturnValue(std::move(returnValueCapture));
1934 
1935     return CallCapture(gl::EntryPoint::UnmapBuffer, std::move(paramBuffer));
1936 }
1937 
CaptureVertexAttribDivisor(const State & glState,bool isCallValid,GLuint index,GLuint divisor)1938 CallCapture CaptureVertexAttribDivisor(const State &glState,
1939                                        bool isCallValid,
1940                                        GLuint index,
1941                                        GLuint divisor)
1942 {
1943     ParamBuffer paramBuffer;
1944 
1945     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1946     paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
1947 
1948     return CallCapture(gl::EntryPoint::VertexAttribDivisor, std::move(paramBuffer));
1949 }
1950 
CaptureVertexAttribI4i(const State & glState,bool isCallValid,GLuint index,GLint x,GLint y,GLint z,GLint w)1951 CallCapture CaptureVertexAttribI4i(const State &glState,
1952                                    bool isCallValid,
1953                                    GLuint index,
1954                                    GLint x,
1955                                    GLint y,
1956                                    GLint z,
1957                                    GLint w)
1958 {
1959     ParamBuffer paramBuffer;
1960 
1961     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1962     paramBuffer.addValueParam("x", ParamType::TGLint, x);
1963     paramBuffer.addValueParam("y", ParamType::TGLint, y);
1964     paramBuffer.addValueParam("z", ParamType::TGLint, z);
1965     paramBuffer.addValueParam("w", ParamType::TGLint, w);
1966 
1967     return CallCapture(gl::EntryPoint::VertexAttribI4i, std::move(paramBuffer));
1968 }
1969 
CaptureVertexAttribI4iv(const State & glState,bool isCallValid,GLuint index,const GLint * v)1970 CallCapture CaptureVertexAttribI4iv(const State &glState,
1971                                     bool isCallValid,
1972                                     GLuint index,
1973                                     const GLint *v)
1974 {
1975     ParamBuffer paramBuffer;
1976 
1977     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1978 
1979     ParamCapture vParam("v", ParamType::TGLintConstPointer);
1980     InitParamValue(ParamType::TGLintConstPointer, v, &vParam.value);
1981     CaptureVertexAttribI4iv_v(glState, isCallValid, index, v, &vParam);
1982     paramBuffer.addParam(std::move(vParam));
1983 
1984     return CallCapture(gl::EntryPoint::VertexAttribI4iv, std::move(paramBuffer));
1985 }
1986 
CaptureVertexAttribI4ui(const State & glState,bool isCallValid,GLuint index,GLuint x,GLuint y,GLuint z,GLuint w)1987 CallCapture CaptureVertexAttribI4ui(const State &glState,
1988                                     bool isCallValid,
1989                                     GLuint index,
1990                                     GLuint x,
1991                                     GLuint y,
1992                                     GLuint z,
1993                                     GLuint w)
1994 {
1995     ParamBuffer paramBuffer;
1996 
1997     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1998     paramBuffer.addValueParam("x", ParamType::TGLuint, x);
1999     paramBuffer.addValueParam("y", ParamType::TGLuint, y);
2000     paramBuffer.addValueParam("z", ParamType::TGLuint, z);
2001     paramBuffer.addValueParam("w", ParamType::TGLuint, w);
2002 
2003     return CallCapture(gl::EntryPoint::VertexAttribI4ui, std::move(paramBuffer));
2004 }
2005 
CaptureVertexAttribI4uiv(const State & glState,bool isCallValid,GLuint index,const GLuint * v)2006 CallCapture CaptureVertexAttribI4uiv(const State &glState,
2007                                      bool isCallValid,
2008                                      GLuint index,
2009                                      const GLuint *v)
2010 {
2011     ParamBuffer paramBuffer;
2012 
2013     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
2014 
2015     ParamCapture vParam("v", ParamType::TGLuintConstPointer);
2016     InitParamValue(ParamType::TGLuintConstPointer, v, &vParam.value);
2017     CaptureVertexAttribI4uiv_v(glState, isCallValid, index, v, &vParam);
2018     paramBuffer.addParam(std::move(vParam));
2019 
2020     return CallCapture(gl::EntryPoint::VertexAttribI4uiv, std::move(paramBuffer));
2021 }
2022 
CaptureVertexAttribIPointer(const State & glState,bool isCallValid,GLuint index,GLint size,VertexAttribType typePacked,GLsizei stride,const void * pointer)2023 CallCapture CaptureVertexAttribIPointer(const State &glState,
2024                                         bool isCallValid,
2025                                         GLuint index,
2026                                         GLint size,
2027                                         VertexAttribType typePacked,
2028                                         GLsizei stride,
2029                                         const void *pointer)
2030 {
2031     ParamBuffer paramBuffer;
2032 
2033     paramBuffer.addValueParam("index", ParamType::TGLuint, index);
2034     paramBuffer.addValueParam("size", ParamType::TGLint, size);
2035     paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
2036     paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
2037 
2038     ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
2039     InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
2040     CaptureVertexAttribIPointer_pointer(glState, isCallValid, index, size, typePacked, stride,
2041                                         pointer, &pointerParam);
2042     paramBuffer.addParam(std::move(pointerParam));
2043 
2044     return CallCapture(gl::EntryPoint::VertexAttribIPointer, std::move(paramBuffer));
2045 }
2046 
CaptureWaitSync(const State & glState,bool isCallValid,GLsync sync,GLbitfield flags,GLuint64 timeout)2047 CallCapture CaptureWaitSync(const State &glState,
2048                             bool isCallValid,
2049                             GLsync sync,
2050                             GLbitfield flags,
2051                             GLuint64 timeout)
2052 {
2053     ParamBuffer paramBuffer;
2054 
2055     paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
2056     paramBuffer.addEnumParam("flags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield, flags);
2057     paramBuffer.addValueParam("timeout", ParamType::TGLuint64, timeout);
2058 
2059     return CallCapture(gl::EntryPoint::WaitSync, std::move(paramBuffer));
2060 }
2061 
2062 }  // namespace gl
2063