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_gl_4_autogen.cpp:
9 // Capture functions for the OpenGL ES Desktop GL 4.x entry points.
10
11 #include "libANGLE/capture/capture_gl_4_autogen.h"
12
13 #include "common/gl_enum_utils.h"
14 #include "libANGLE/Context.h"
15 #include "libANGLE/capture/FrameCapture.h"
16 #include "libANGLE/validationGL4_autogen.h"
17
18 using namespace angle;
19
20 namespace gl
21 {
22
23 // GL 4.0
CaptureBeginQueryIndexed(const State & glState,bool isCallValid,GLenum target,GLuint index,QueryID idPacked)24 CallCapture CaptureBeginQueryIndexed(const State &glState,
25 bool isCallValid,
26 GLenum target,
27 GLuint index,
28 QueryID idPacked)
29 {
30 ParamBuffer paramBuffer;
31
32 paramBuffer.addEnumParam("target", BigGLEnum::QueryTarget, ParamType::TGLenum, target);
33 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
34 paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
35
36 return CallCapture(angle::EntryPoint::GLBeginQueryIndexed, std::move(paramBuffer));
37 }
38
CaptureDrawTransformFeedback(const State & glState,bool isCallValid,GLenum mode,TransformFeedbackID idPacked)39 CallCapture CaptureDrawTransformFeedback(const State &glState,
40 bool isCallValid,
41 GLenum mode,
42 TransformFeedbackID idPacked)
43 {
44 ParamBuffer paramBuffer;
45
46 paramBuffer.addEnumParam("mode", BigGLEnum::PrimitiveType, ParamType::TGLenum, mode);
47 paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked);
48
49 return CallCapture(angle::EntryPoint::GLDrawTransformFeedback, std::move(paramBuffer));
50 }
51
CaptureDrawTransformFeedbackStream(const State & glState,bool isCallValid,GLenum mode,TransformFeedbackID idPacked,GLuint stream)52 CallCapture CaptureDrawTransformFeedbackStream(const State &glState,
53 bool isCallValid,
54 GLenum mode,
55 TransformFeedbackID idPacked,
56 GLuint stream)
57 {
58 ParamBuffer paramBuffer;
59
60 paramBuffer.addEnumParam("mode", BigGLEnum::PrimitiveType, ParamType::TGLenum, mode);
61 paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked);
62 paramBuffer.addValueParam("stream", ParamType::TGLuint, stream);
63
64 return CallCapture(angle::EntryPoint::GLDrawTransformFeedbackStream, std::move(paramBuffer));
65 }
66
CaptureEndQueryIndexed(const State & glState,bool isCallValid,GLenum target,GLuint index)67 CallCapture CaptureEndQueryIndexed(const State &glState,
68 bool isCallValid,
69 GLenum target,
70 GLuint index)
71 {
72 ParamBuffer paramBuffer;
73
74 paramBuffer.addEnumParam("target", BigGLEnum::QueryTarget, ParamType::TGLenum, target);
75 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
76
77 return CallCapture(angle::EntryPoint::GLEndQueryIndexed, std::move(paramBuffer));
78 }
79
CaptureGetActiveSubroutineName(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum shadertype,GLuint index,GLsizei bufSize,GLsizei * length,GLchar * name)80 CallCapture CaptureGetActiveSubroutineName(const State &glState,
81 bool isCallValid,
82 ShaderProgramID programPacked,
83 GLenum shadertype,
84 GLuint index,
85 GLsizei bufSize,
86 GLsizei *length,
87 GLchar *name)
88 {
89 ParamBuffer paramBuffer;
90
91 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
92 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
93 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
94 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
95
96 if (isCallValid)
97 {
98 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
99 InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
100 CaptureGetActiveSubroutineName_length(glState, isCallValid, programPacked, shadertype,
101 index, bufSize, length, name, &lengthParam);
102 paramBuffer.addParam(std::move(lengthParam));
103 }
104 else
105 {
106 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
107 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
108 &lengthParam.value);
109 paramBuffer.addParam(std::move(lengthParam));
110 }
111
112 if (isCallValid)
113 {
114 ParamCapture nameParam("name", ParamType::TGLcharPointer);
115 InitParamValue(ParamType::TGLcharPointer, name, &nameParam.value);
116 CaptureGetActiveSubroutineName_name(glState, isCallValid, programPacked, shadertype, index,
117 bufSize, length, name, &nameParam);
118 paramBuffer.addParam(std::move(nameParam));
119 }
120 else
121 {
122 ParamCapture nameParam("name", ParamType::TGLcharPointer);
123 InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr), &nameParam.value);
124 paramBuffer.addParam(std::move(nameParam));
125 }
126
127 return CallCapture(angle::EntryPoint::GLGetActiveSubroutineName, std::move(paramBuffer));
128 }
129
CaptureGetActiveSubroutineUniformName(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum shadertype,GLuint index,GLsizei bufSize,GLsizei * length,GLchar * name)130 CallCapture CaptureGetActiveSubroutineUniformName(const State &glState,
131 bool isCallValid,
132 ShaderProgramID programPacked,
133 GLenum shadertype,
134 GLuint index,
135 GLsizei bufSize,
136 GLsizei *length,
137 GLchar *name)
138 {
139 ParamBuffer paramBuffer;
140
141 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
142 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
143 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
144 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
145
146 if (isCallValid)
147 {
148 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
149 InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
150 CaptureGetActiveSubroutineUniformName_length(glState, isCallValid, programPacked,
151 shadertype, index, bufSize, length, name,
152 &lengthParam);
153 paramBuffer.addParam(std::move(lengthParam));
154 }
155 else
156 {
157 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
158 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
159 &lengthParam.value);
160 paramBuffer.addParam(std::move(lengthParam));
161 }
162
163 if (isCallValid)
164 {
165 ParamCapture nameParam("name", ParamType::TGLcharPointer);
166 InitParamValue(ParamType::TGLcharPointer, name, &nameParam.value);
167 CaptureGetActiveSubroutineUniformName_name(glState, isCallValid, programPacked, shadertype,
168 index, bufSize, length, name, &nameParam);
169 paramBuffer.addParam(std::move(nameParam));
170 }
171 else
172 {
173 ParamCapture nameParam("name", ParamType::TGLcharPointer);
174 InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr), &nameParam.value);
175 paramBuffer.addParam(std::move(nameParam));
176 }
177
178 return CallCapture(angle::EntryPoint::GLGetActiveSubroutineUniformName, std::move(paramBuffer));
179 }
180
CaptureGetActiveSubroutineUniformiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum shadertype,GLuint index,GLenum pname,GLint * values)181 CallCapture CaptureGetActiveSubroutineUniformiv(const State &glState,
182 bool isCallValid,
183 ShaderProgramID programPacked,
184 GLenum shadertype,
185 GLuint index,
186 GLenum pname,
187 GLint *values)
188 {
189 ParamBuffer paramBuffer;
190
191 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
192 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
193 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
194 paramBuffer.addEnumParam("pname", BigGLEnum::SubroutineParameterName, ParamType::TGLenum,
195 pname);
196
197 if (isCallValid)
198 {
199 ParamCapture valuesParam("values", ParamType::TGLintPointer);
200 InitParamValue(ParamType::TGLintPointer, values, &valuesParam.value);
201 CaptureGetActiveSubroutineUniformiv_values(glState, isCallValid, programPacked, shadertype,
202 index, pname, values, &valuesParam);
203 paramBuffer.addParam(std::move(valuesParam));
204 }
205 else
206 {
207 ParamCapture valuesParam("values", ParamType::TGLintPointer);
208 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &valuesParam.value);
209 paramBuffer.addParam(std::move(valuesParam));
210 }
211
212 return CallCapture(angle::EntryPoint::GLGetActiveSubroutineUniformiv, std::move(paramBuffer));
213 }
214
CaptureGetProgramStageiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum shadertype,GLenum pname,GLint * values)215 CallCapture CaptureGetProgramStageiv(const State &glState,
216 bool isCallValid,
217 ShaderProgramID programPacked,
218 GLenum shadertype,
219 GLenum pname,
220 GLint *values)
221 {
222 ParamBuffer paramBuffer;
223
224 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
225 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
226 paramBuffer.addEnumParam("pname", BigGLEnum::ProgramStagePName, ParamType::TGLenum, pname);
227
228 if (isCallValid)
229 {
230 ParamCapture valuesParam("values", ParamType::TGLintPointer);
231 InitParamValue(ParamType::TGLintPointer, values, &valuesParam.value);
232 CaptureGetProgramStageiv_values(glState, isCallValid, programPacked, shadertype, pname,
233 values, &valuesParam);
234 paramBuffer.addParam(std::move(valuesParam));
235 }
236 else
237 {
238 ParamCapture valuesParam("values", ParamType::TGLintPointer);
239 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &valuesParam.value);
240 paramBuffer.addParam(std::move(valuesParam));
241 }
242
243 return CallCapture(angle::EntryPoint::GLGetProgramStageiv, std::move(paramBuffer));
244 }
245
CaptureGetQueryIndexediv(const State & glState,bool isCallValid,GLenum target,GLuint index,GLenum pname,GLint * params)246 CallCapture CaptureGetQueryIndexediv(const State &glState,
247 bool isCallValid,
248 GLenum target,
249 GLuint index,
250 GLenum pname,
251 GLint *params)
252 {
253 ParamBuffer paramBuffer;
254
255 paramBuffer.addEnumParam("target", BigGLEnum::QueryTarget, ParamType::TGLenum, target);
256 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
257 paramBuffer.addEnumParam("pname", BigGLEnum::QueryParameterName, ParamType::TGLenum, pname);
258
259 if (isCallValid)
260 {
261 ParamCapture paramsParam("params", ParamType::TGLintPointer);
262 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
263 CaptureGetQueryIndexediv_params(glState, isCallValid, target, index, pname, params,
264 ¶msParam);
265 paramBuffer.addParam(std::move(paramsParam));
266 }
267 else
268 {
269 ParamCapture paramsParam("params", ParamType::TGLintPointer);
270 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
271 paramBuffer.addParam(std::move(paramsParam));
272 }
273
274 return CallCapture(angle::EntryPoint::GLGetQueryIndexediv, std::move(paramBuffer));
275 }
276
CaptureGetSubroutineIndex(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum shadertype,const GLchar * name,GLuint returnValue)277 CallCapture CaptureGetSubroutineIndex(const State &glState,
278 bool isCallValid,
279 ShaderProgramID programPacked,
280 GLenum shadertype,
281 const GLchar *name,
282 GLuint returnValue)
283 {
284 ParamBuffer paramBuffer;
285
286 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
287 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
288
289 if (isCallValid)
290 {
291 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
292 InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
293 CaptureGetSubroutineIndex_name(glState, isCallValid, programPacked, shadertype, name,
294 &nameParam);
295 paramBuffer.addParam(std::move(nameParam));
296 }
297 else
298 {
299 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
300 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
301 &nameParam.value);
302 paramBuffer.addParam(std::move(nameParam));
303 }
304
305 ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
306 InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
307 paramBuffer.addReturnValue(std::move(returnValueCapture));
308
309 return CallCapture(angle::EntryPoint::GLGetSubroutineIndex, std::move(paramBuffer));
310 }
311
CaptureGetSubroutineUniformLocation(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum shadertype,const GLchar * name,GLint returnValue)312 CallCapture CaptureGetSubroutineUniformLocation(const State &glState,
313 bool isCallValid,
314 ShaderProgramID programPacked,
315 GLenum shadertype,
316 const GLchar *name,
317 GLint returnValue)
318 {
319 ParamBuffer paramBuffer;
320
321 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
322 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
323
324 if (isCallValid)
325 {
326 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
327 InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
328 CaptureGetSubroutineUniformLocation_name(glState, isCallValid, programPacked, shadertype,
329 name, &nameParam);
330 paramBuffer.addParam(std::move(nameParam));
331 }
332 else
333 {
334 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
335 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
336 &nameParam.value);
337 paramBuffer.addParam(std::move(nameParam));
338 }
339
340 ParamCapture returnValueCapture("returnValue", ParamType::TGLint);
341 InitParamValue(ParamType::TGLint, returnValue, &returnValueCapture.value);
342 paramBuffer.addReturnValue(std::move(returnValueCapture));
343
344 return CallCapture(angle::EntryPoint::GLGetSubroutineUniformLocation, std::move(paramBuffer));
345 }
346
CaptureGetUniformSubroutineuiv(const State & glState,bool isCallValid,GLenum shadertype,GLint location,GLuint * params)347 CallCapture CaptureGetUniformSubroutineuiv(const State &glState,
348 bool isCallValid,
349 GLenum shadertype,
350 GLint location,
351 GLuint *params)
352 {
353 ParamBuffer paramBuffer;
354
355 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
356 paramBuffer.addValueParam("location", ParamType::TGLint, location);
357
358 if (isCallValid)
359 {
360 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
361 InitParamValue(ParamType::TGLuintPointer, params, ¶msParam.value);
362 CaptureGetUniformSubroutineuiv_params(glState, isCallValid, shadertype, location, params,
363 ¶msParam);
364 paramBuffer.addParam(std::move(paramsParam));
365 }
366 else
367 {
368 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
369 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
370 ¶msParam.value);
371 paramBuffer.addParam(std::move(paramsParam));
372 }
373
374 return CallCapture(angle::EntryPoint::GLGetUniformSubroutineuiv, std::move(paramBuffer));
375 }
376
CaptureGetUniformdv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLdouble * params)377 CallCapture CaptureGetUniformdv(const State &glState,
378 bool isCallValid,
379 ShaderProgramID programPacked,
380 UniformLocation locationPacked,
381 GLdouble *params)
382 {
383 ParamBuffer paramBuffer;
384
385 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
386 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
387
388 if (isCallValid)
389 {
390 ParamCapture paramsParam("params", ParamType::TGLdoublePointer);
391 InitParamValue(ParamType::TGLdoublePointer, params, ¶msParam.value);
392 CaptureGetUniformdv_params(glState, isCallValid, programPacked, locationPacked, params,
393 ¶msParam);
394 paramBuffer.addParam(std::move(paramsParam));
395 }
396 else
397 {
398 ParamCapture paramsParam("params", ParamType::TGLdoublePointer);
399 InitParamValue(ParamType::TGLdoublePointer, static_cast<GLdouble *>(nullptr),
400 ¶msParam.value);
401 paramBuffer.addParam(std::move(paramsParam));
402 }
403
404 return CallCapture(angle::EntryPoint::GLGetUniformdv, std::move(paramBuffer));
405 }
406
CapturePatchParameterfv(const State & glState,bool isCallValid,GLenum pname,const GLfloat * values)407 CallCapture CapturePatchParameterfv(const State &glState,
408 bool isCallValid,
409 GLenum pname,
410 const GLfloat *values)
411 {
412 ParamBuffer paramBuffer;
413
414 paramBuffer.addEnumParam("pname", BigGLEnum::PatchParameterName, ParamType::TGLenum, pname);
415
416 if (isCallValid)
417 {
418 ParamCapture valuesParam("values", ParamType::TGLfloatConstPointer);
419 InitParamValue(ParamType::TGLfloatConstPointer, values, &valuesParam.value);
420 CapturePatchParameterfv_values(glState, isCallValid, pname, values, &valuesParam);
421 paramBuffer.addParam(std::move(valuesParam));
422 }
423 else
424 {
425 ParamCapture valuesParam("values", ParamType::TGLfloatConstPointer);
426 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
427 &valuesParam.value);
428 paramBuffer.addParam(std::move(valuesParam));
429 }
430
431 return CallCapture(angle::EntryPoint::GLPatchParameterfv, std::move(paramBuffer));
432 }
433
CaptureUniform1d(const State & glState,bool isCallValid,UniformLocation locationPacked,GLdouble x)434 CallCapture CaptureUniform1d(const State &glState,
435 bool isCallValid,
436 UniformLocation locationPacked,
437 GLdouble x)
438 {
439 ParamBuffer paramBuffer;
440
441 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
442 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
443
444 return CallCapture(angle::EntryPoint::GLUniform1d, std::move(paramBuffer));
445 }
446
CaptureUniform1dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLdouble * value)447 CallCapture CaptureUniform1dv(const State &glState,
448 bool isCallValid,
449 UniformLocation locationPacked,
450 GLsizei count,
451 const GLdouble *value)
452 {
453 ParamBuffer paramBuffer;
454
455 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
456 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
457
458 if (isCallValid)
459 {
460 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
461 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
462 CaptureUniform1dv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
463 paramBuffer.addParam(std::move(valueParam));
464 }
465 else
466 {
467 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
468 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
469 &valueParam.value);
470 paramBuffer.addParam(std::move(valueParam));
471 }
472
473 return CallCapture(angle::EntryPoint::GLUniform1dv, std::move(paramBuffer));
474 }
475
CaptureUniform2d(const State & glState,bool isCallValid,UniformLocation locationPacked,GLdouble x,GLdouble y)476 CallCapture CaptureUniform2d(const State &glState,
477 bool isCallValid,
478 UniformLocation locationPacked,
479 GLdouble x,
480 GLdouble y)
481 {
482 ParamBuffer paramBuffer;
483
484 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
485 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
486 paramBuffer.addValueParam("y", ParamType::TGLdouble, y);
487
488 return CallCapture(angle::EntryPoint::GLUniform2d, std::move(paramBuffer));
489 }
490
CaptureUniform2dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLdouble * value)491 CallCapture CaptureUniform2dv(const State &glState,
492 bool isCallValid,
493 UniformLocation locationPacked,
494 GLsizei count,
495 const GLdouble *value)
496 {
497 ParamBuffer paramBuffer;
498
499 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
500 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
501
502 if (isCallValid)
503 {
504 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
505 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
506 CaptureUniform2dv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
507 paramBuffer.addParam(std::move(valueParam));
508 }
509 else
510 {
511 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
512 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
513 &valueParam.value);
514 paramBuffer.addParam(std::move(valueParam));
515 }
516
517 return CallCapture(angle::EntryPoint::GLUniform2dv, std::move(paramBuffer));
518 }
519
CaptureUniform3d(const State & glState,bool isCallValid,UniformLocation locationPacked,GLdouble x,GLdouble y,GLdouble z)520 CallCapture CaptureUniform3d(const State &glState,
521 bool isCallValid,
522 UniformLocation locationPacked,
523 GLdouble x,
524 GLdouble y,
525 GLdouble z)
526 {
527 ParamBuffer paramBuffer;
528
529 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
530 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
531 paramBuffer.addValueParam("y", ParamType::TGLdouble, y);
532 paramBuffer.addValueParam("z", ParamType::TGLdouble, z);
533
534 return CallCapture(angle::EntryPoint::GLUniform3d, std::move(paramBuffer));
535 }
536
CaptureUniform3dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLdouble * value)537 CallCapture CaptureUniform3dv(const State &glState,
538 bool isCallValid,
539 UniformLocation locationPacked,
540 GLsizei count,
541 const GLdouble *value)
542 {
543 ParamBuffer paramBuffer;
544
545 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
546 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
547
548 if (isCallValid)
549 {
550 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
551 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
552 CaptureUniform3dv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
553 paramBuffer.addParam(std::move(valueParam));
554 }
555 else
556 {
557 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
558 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
559 &valueParam.value);
560 paramBuffer.addParam(std::move(valueParam));
561 }
562
563 return CallCapture(angle::EntryPoint::GLUniform3dv, std::move(paramBuffer));
564 }
565
CaptureUniform4d(const State & glState,bool isCallValid,UniformLocation locationPacked,GLdouble x,GLdouble y,GLdouble z,GLdouble w)566 CallCapture CaptureUniform4d(const State &glState,
567 bool isCallValid,
568 UniformLocation locationPacked,
569 GLdouble x,
570 GLdouble y,
571 GLdouble z,
572 GLdouble w)
573 {
574 ParamBuffer paramBuffer;
575
576 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
577 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
578 paramBuffer.addValueParam("y", ParamType::TGLdouble, y);
579 paramBuffer.addValueParam("z", ParamType::TGLdouble, z);
580 paramBuffer.addValueParam("w", ParamType::TGLdouble, w);
581
582 return CallCapture(angle::EntryPoint::GLUniform4d, std::move(paramBuffer));
583 }
584
CaptureUniform4dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,const GLdouble * value)585 CallCapture CaptureUniform4dv(const State &glState,
586 bool isCallValid,
587 UniformLocation locationPacked,
588 GLsizei count,
589 const GLdouble *value)
590 {
591 ParamBuffer paramBuffer;
592
593 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
594 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
595
596 if (isCallValid)
597 {
598 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
599 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
600 CaptureUniform4dv_value(glState, isCallValid, locationPacked, count, value, &valueParam);
601 paramBuffer.addParam(std::move(valueParam));
602 }
603 else
604 {
605 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
606 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
607 &valueParam.value);
608 paramBuffer.addParam(std::move(valueParam));
609 }
610
611 return CallCapture(angle::EntryPoint::GLUniform4dv, std::move(paramBuffer));
612 }
613
CaptureUniformMatrix2dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)614 CallCapture CaptureUniformMatrix2dv(const State &glState,
615 bool isCallValid,
616 UniformLocation locationPacked,
617 GLsizei count,
618 GLboolean transpose,
619 const GLdouble *value)
620 {
621 ParamBuffer paramBuffer;
622
623 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
624 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
625 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
626
627 if (isCallValid)
628 {
629 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
630 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
631 CaptureUniformMatrix2dv_value(glState, isCallValid, locationPacked, count, transpose, value,
632 &valueParam);
633 paramBuffer.addParam(std::move(valueParam));
634 }
635 else
636 {
637 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
638 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
639 &valueParam.value);
640 paramBuffer.addParam(std::move(valueParam));
641 }
642
643 return CallCapture(angle::EntryPoint::GLUniformMatrix2dv, std::move(paramBuffer));
644 }
645
CaptureUniformMatrix2x3dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)646 CallCapture CaptureUniformMatrix2x3dv(const State &glState,
647 bool isCallValid,
648 UniformLocation locationPacked,
649 GLsizei count,
650 GLboolean transpose,
651 const GLdouble *value)
652 {
653 ParamBuffer paramBuffer;
654
655 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
656 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
657 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
658
659 if (isCallValid)
660 {
661 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
662 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
663 CaptureUniformMatrix2x3dv_value(glState, isCallValid, locationPacked, count, transpose,
664 value, &valueParam);
665 paramBuffer.addParam(std::move(valueParam));
666 }
667 else
668 {
669 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
670 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
671 &valueParam.value);
672 paramBuffer.addParam(std::move(valueParam));
673 }
674
675 return CallCapture(angle::EntryPoint::GLUniformMatrix2x3dv, std::move(paramBuffer));
676 }
677
CaptureUniformMatrix2x4dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)678 CallCapture CaptureUniformMatrix2x4dv(const State &glState,
679 bool isCallValid,
680 UniformLocation locationPacked,
681 GLsizei count,
682 GLboolean transpose,
683 const GLdouble *value)
684 {
685 ParamBuffer paramBuffer;
686
687 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
688 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
689 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
690
691 if (isCallValid)
692 {
693 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
694 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
695 CaptureUniformMatrix2x4dv_value(glState, isCallValid, locationPacked, count, transpose,
696 value, &valueParam);
697 paramBuffer.addParam(std::move(valueParam));
698 }
699 else
700 {
701 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
702 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
703 &valueParam.value);
704 paramBuffer.addParam(std::move(valueParam));
705 }
706
707 return CallCapture(angle::EntryPoint::GLUniformMatrix2x4dv, std::move(paramBuffer));
708 }
709
CaptureUniformMatrix3dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)710 CallCapture CaptureUniformMatrix3dv(const State &glState,
711 bool isCallValid,
712 UniformLocation locationPacked,
713 GLsizei count,
714 GLboolean transpose,
715 const GLdouble *value)
716 {
717 ParamBuffer paramBuffer;
718
719 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
720 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
721 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
722
723 if (isCallValid)
724 {
725 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
726 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
727 CaptureUniformMatrix3dv_value(glState, isCallValid, locationPacked, count, transpose, value,
728 &valueParam);
729 paramBuffer.addParam(std::move(valueParam));
730 }
731 else
732 {
733 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
734 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
735 &valueParam.value);
736 paramBuffer.addParam(std::move(valueParam));
737 }
738
739 return CallCapture(angle::EntryPoint::GLUniformMatrix3dv, std::move(paramBuffer));
740 }
741
CaptureUniformMatrix3x2dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)742 CallCapture CaptureUniformMatrix3x2dv(const State &glState,
743 bool isCallValid,
744 UniformLocation locationPacked,
745 GLsizei count,
746 GLboolean transpose,
747 const GLdouble *value)
748 {
749 ParamBuffer paramBuffer;
750
751 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
752 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
753 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
754
755 if (isCallValid)
756 {
757 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
758 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
759 CaptureUniformMatrix3x2dv_value(glState, isCallValid, locationPacked, count, transpose,
760 value, &valueParam);
761 paramBuffer.addParam(std::move(valueParam));
762 }
763 else
764 {
765 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
766 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
767 &valueParam.value);
768 paramBuffer.addParam(std::move(valueParam));
769 }
770
771 return CallCapture(angle::EntryPoint::GLUniformMatrix3x2dv, std::move(paramBuffer));
772 }
773
CaptureUniformMatrix3x4dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)774 CallCapture CaptureUniformMatrix3x4dv(const State &glState,
775 bool isCallValid,
776 UniformLocation locationPacked,
777 GLsizei count,
778 GLboolean transpose,
779 const GLdouble *value)
780 {
781 ParamBuffer paramBuffer;
782
783 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
784 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
785 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
786
787 if (isCallValid)
788 {
789 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
790 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
791 CaptureUniformMatrix3x4dv_value(glState, isCallValid, locationPacked, count, transpose,
792 value, &valueParam);
793 paramBuffer.addParam(std::move(valueParam));
794 }
795 else
796 {
797 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
798 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
799 &valueParam.value);
800 paramBuffer.addParam(std::move(valueParam));
801 }
802
803 return CallCapture(angle::EntryPoint::GLUniformMatrix3x4dv, std::move(paramBuffer));
804 }
805
CaptureUniformMatrix4dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)806 CallCapture CaptureUniformMatrix4dv(const State &glState,
807 bool isCallValid,
808 UniformLocation locationPacked,
809 GLsizei count,
810 GLboolean transpose,
811 const GLdouble *value)
812 {
813 ParamBuffer paramBuffer;
814
815 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
816 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
817 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
818
819 if (isCallValid)
820 {
821 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
822 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
823 CaptureUniformMatrix4dv_value(glState, isCallValid, locationPacked, count, transpose, value,
824 &valueParam);
825 paramBuffer.addParam(std::move(valueParam));
826 }
827 else
828 {
829 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
830 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
831 &valueParam.value);
832 paramBuffer.addParam(std::move(valueParam));
833 }
834
835 return CallCapture(angle::EntryPoint::GLUniformMatrix4dv, std::move(paramBuffer));
836 }
837
CaptureUniformMatrix4x2dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)838 CallCapture CaptureUniformMatrix4x2dv(const State &glState,
839 bool isCallValid,
840 UniformLocation locationPacked,
841 GLsizei count,
842 GLboolean transpose,
843 const GLdouble *value)
844 {
845 ParamBuffer paramBuffer;
846
847 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
848 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
849 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
850
851 if (isCallValid)
852 {
853 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
854 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
855 CaptureUniformMatrix4x2dv_value(glState, isCallValid, locationPacked, count, transpose,
856 value, &valueParam);
857 paramBuffer.addParam(std::move(valueParam));
858 }
859 else
860 {
861 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
862 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
863 &valueParam.value);
864 paramBuffer.addParam(std::move(valueParam));
865 }
866
867 return CallCapture(angle::EntryPoint::GLUniformMatrix4x2dv, std::move(paramBuffer));
868 }
869
CaptureUniformMatrix4x3dv(const State & glState,bool isCallValid,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)870 CallCapture CaptureUniformMatrix4x3dv(const State &glState,
871 bool isCallValid,
872 UniformLocation locationPacked,
873 GLsizei count,
874 GLboolean transpose,
875 const GLdouble *value)
876 {
877 ParamBuffer paramBuffer;
878
879 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
880 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
881 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
882
883 if (isCallValid)
884 {
885 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
886 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
887 CaptureUniformMatrix4x3dv_value(glState, isCallValid, locationPacked, count, transpose,
888 value, &valueParam);
889 paramBuffer.addParam(std::move(valueParam));
890 }
891 else
892 {
893 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
894 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
895 &valueParam.value);
896 paramBuffer.addParam(std::move(valueParam));
897 }
898
899 return CallCapture(angle::EntryPoint::GLUniformMatrix4x3dv, std::move(paramBuffer));
900 }
901
CaptureUniformSubroutinesuiv(const State & glState,bool isCallValid,GLenum shadertype,GLsizei count,const GLuint * indices)902 CallCapture CaptureUniformSubroutinesuiv(const State &glState,
903 bool isCallValid,
904 GLenum shadertype,
905 GLsizei count,
906 const GLuint *indices)
907 {
908 ParamBuffer paramBuffer;
909
910 paramBuffer.addEnumParam("shadertype", BigGLEnum::ShaderType, ParamType::TGLenum, shadertype);
911 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
912
913 if (isCallValid)
914 {
915 ParamCapture indicesParam("indices", ParamType::TGLuintConstPointer);
916 InitParamValue(ParamType::TGLuintConstPointer, indices, &indicesParam.value);
917 CaptureUniformSubroutinesuiv_indices(glState, isCallValid, shadertype, count, indices,
918 &indicesParam);
919 paramBuffer.addParam(std::move(indicesParam));
920 }
921 else
922 {
923 ParamCapture indicesParam("indices", ParamType::TGLuintConstPointer);
924 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
925 &indicesParam.value);
926 paramBuffer.addParam(std::move(indicesParam));
927 }
928
929 return CallCapture(angle::EntryPoint::GLUniformSubroutinesuiv, std::move(paramBuffer));
930 }
931
932 // GL 4.1
CaptureDepthRangeArrayv(const State & glState,bool isCallValid,GLuint first,GLsizei count,const GLdouble * v)933 CallCapture CaptureDepthRangeArrayv(const State &glState,
934 bool isCallValid,
935 GLuint first,
936 GLsizei count,
937 const GLdouble *v)
938 {
939 ParamBuffer paramBuffer;
940
941 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
942 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
943
944 if (isCallValid)
945 {
946 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
947 InitParamValue(ParamType::TGLdoubleConstPointer, v, &vParam.value);
948 CaptureDepthRangeArrayv_v(glState, isCallValid, first, count, v, &vParam);
949 paramBuffer.addParam(std::move(vParam));
950 }
951 else
952 {
953 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
954 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
955 &vParam.value);
956 paramBuffer.addParam(std::move(vParam));
957 }
958
959 return CallCapture(angle::EntryPoint::GLDepthRangeArrayv, std::move(paramBuffer));
960 }
961
CaptureDepthRangeIndexed(const State & glState,bool isCallValid,GLuint index,GLdouble n,GLdouble f)962 CallCapture CaptureDepthRangeIndexed(const State &glState,
963 bool isCallValid,
964 GLuint index,
965 GLdouble n,
966 GLdouble f)
967 {
968 ParamBuffer paramBuffer;
969
970 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
971 paramBuffer.addValueParam("n", ParamType::TGLdouble, n);
972 paramBuffer.addValueParam("f", ParamType::TGLdouble, f);
973
974 return CallCapture(angle::EntryPoint::GLDepthRangeIndexed, std::move(paramBuffer));
975 }
976
CaptureGetDoublei_v(const State & glState,bool isCallValid,GLenum target,GLuint index,GLdouble * data)977 CallCapture CaptureGetDoublei_v(const State &glState,
978 bool isCallValid,
979 GLenum target,
980 GLuint index,
981 GLdouble *data)
982 {
983 ParamBuffer paramBuffer;
984
985 paramBuffer.addEnumParam("target", BigGLEnum::GetPName, ParamType::TGLenum, target);
986 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
987
988 if (isCallValid)
989 {
990 ParamCapture dataParam("data", ParamType::TGLdoublePointer);
991 InitParamValue(ParamType::TGLdoublePointer, data, &dataParam.value);
992 CaptureGetDoublei_v_data(glState, isCallValid, target, index, data, &dataParam);
993 paramBuffer.addParam(std::move(dataParam));
994 }
995 else
996 {
997 ParamCapture dataParam("data", ParamType::TGLdoublePointer);
998 InitParamValue(ParamType::TGLdoublePointer, static_cast<GLdouble *>(nullptr),
999 &dataParam.value);
1000 paramBuffer.addParam(std::move(dataParam));
1001 }
1002
1003 return CallCapture(angle::EntryPoint::GLGetDoublei_v, std::move(paramBuffer));
1004 }
1005
CaptureGetFloati_v(const State & glState,bool isCallValid,GLenum target,GLuint index,GLfloat * data)1006 CallCapture CaptureGetFloati_v(const State &glState,
1007 bool isCallValid,
1008 GLenum target,
1009 GLuint index,
1010 GLfloat *data)
1011 {
1012 ParamBuffer paramBuffer;
1013
1014 paramBuffer.addEnumParam("target", BigGLEnum::GetPName, ParamType::TGLenum, target);
1015 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1016
1017 if (isCallValid)
1018 {
1019 ParamCapture dataParam("data", ParamType::TGLfloatPointer);
1020 InitParamValue(ParamType::TGLfloatPointer, data, &dataParam.value);
1021 CaptureGetFloati_v_data(glState, isCallValid, target, index, data, &dataParam);
1022 paramBuffer.addParam(std::move(dataParam));
1023 }
1024 else
1025 {
1026 ParamCapture dataParam("data", ParamType::TGLfloatPointer);
1027 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
1028 &dataParam.value);
1029 paramBuffer.addParam(std::move(dataParam));
1030 }
1031
1032 return CallCapture(angle::EntryPoint::GLGetFloati_v, std::move(paramBuffer));
1033 }
1034
CaptureGetVertexAttribLdv(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLdouble * params)1035 CallCapture CaptureGetVertexAttribLdv(const State &glState,
1036 bool isCallValid,
1037 GLuint index,
1038 GLenum pname,
1039 GLdouble *params)
1040 {
1041 ParamBuffer paramBuffer;
1042
1043 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1044 paramBuffer.addEnumParam("pname", BigGLEnum::VertexAttribEnum, ParamType::TGLenum, pname);
1045
1046 if (isCallValid)
1047 {
1048 ParamCapture paramsParam("params", ParamType::TGLdoublePointer);
1049 InitParamValue(ParamType::TGLdoublePointer, params, ¶msParam.value);
1050 CaptureGetVertexAttribLdv_params(glState, isCallValid, index, pname, params, ¶msParam);
1051 paramBuffer.addParam(std::move(paramsParam));
1052 }
1053 else
1054 {
1055 ParamCapture paramsParam("params", ParamType::TGLdoublePointer);
1056 InitParamValue(ParamType::TGLdoublePointer, static_cast<GLdouble *>(nullptr),
1057 ¶msParam.value);
1058 paramBuffer.addParam(std::move(paramsParam));
1059 }
1060
1061 return CallCapture(angle::EntryPoint::GLGetVertexAttribLdv, std::move(paramBuffer));
1062 }
1063
CaptureProgramUniform1d(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLdouble v0)1064 CallCapture CaptureProgramUniform1d(const State &glState,
1065 bool isCallValid,
1066 ShaderProgramID programPacked,
1067 UniformLocation locationPacked,
1068 GLdouble v0)
1069 {
1070 ParamBuffer paramBuffer;
1071
1072 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1073 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1074 paramBuffer.addValueParam("v0", ParamType::TGLdouble, v0);
1075
1076 return CallCapture(angle::EntryPoint::GLProgramUniform1d, std::move(paramBuffer));
1077 }
1078
CaptureProgramUniform1dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLdouble * value)1079 CallCapture CaptureProgramUniform1dv(const State &glState,
1080 bool isCallValid,
1081 ShaderProgramID programPacked,
1082 UniformLocation locationPacked,
1083 GLsizei count,
1084 const GLdouble *value)
1085 {
1086 ParamBuffer paramBuffer;
1087
1088 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1089 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1090 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1091
1092 if (isCallValid)
1093 {
1094 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1095 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1096 CaptureProgramUniform1dv_value(glState, isCallValid, programPacked, locationPacked, count,
1097 value, &valueParam);
1098 paramBuffer.addParam(std::move(valueParam));
1099 }
1100 else
1101 {
1102 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1103 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1104 &valueParam.value);
1105 paramBuffer.addParam(std::move(valueParam));
1106 }
1107
1108 return CallCapture(angle::EntryPoint::GLProgramUniform1dv, std::move(paramBuffer));
1109 }
1110
CaptureProgramUniform2d(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLdouble v0,GLdouble v1)1111 CallCapture CaptureProgramUniform2d(const State &glState,
1112 bool isCallValid,
1113 ShaderProgramID programPacked,
1114 UniformLocation locationPacked,
1115 GLdouble v0,
1116 GLdouble v1)
1117 {
1118 ParamBuffer paramBuffer;
1119
1120 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1121 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1122 paramBuffer.addValueParam("v0", ParamType::TGLdouble, v0);
1123 paramBuffer.addValueParam("v1", ParamType::TGLdouble, v1);
1124
1125 return CallCapture(angle::EntryPoint::GLProgramUniform2d, std::move(paramBuffer));
1126 }
1127
CaptureProgramUniform2dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLdouble * value)1128 CallCapture CaptureProgramUniform2dv(const State &glState,
1129 bool isCallValid,
1130 ShaderProgramID programPacked,
1131 UniformLocation locationPacked,
1132 GLsizei count,
1133 const GLdouble *value)
1134 {
1135 ParamBuffer paramBuffer;
1136
1137 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1138 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1139 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1140
1141 if (isCallValid)
1142 {
1143 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1144 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1145 CaptureProgramUniform2dv_value(glState, isCallValid, programPacked, locationPacked, count,
1146 value, &valueParam);
1147 paramBuffer.addParam(std::move(valueParam));
1148 }
1149 else
1150 {
1151 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1152 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1153 &valueParam.value);
1154 paramBuffer.addParam(std::move(valueParam));
1155 }
1156
1157 return CallCapture(angle::EntryPoint::GLProgramUniform2dv, std::move(paramBuffer));
1158 }
1159
CaptureProgramUniform3d(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLdouble v0,GLdouble v1,GLdouble v2)1160 CallCapture CaptureProgramUniform3d(const State &glState,
1161 bool isCallValid,
1162 ShaderProgramID programPacked,
1163 UniformLocation locationPacked,
1164 GLdouble v0,
1165 GLdouble v1,
1166 GLdouble v2)
1167 {
1168 ParamBuffer paramBuffer;
1169
1170 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1171 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1172 paramBuffer.addValueParam("v0", ParamType::TGLdouble, v0);
1173 paramBuffer.addValueParam("v1", ParamType::TGLdouble, v1);
1174 paramBuffer.addValueParam("v2", ParamType::TGLdouble, v2);
1175
1176 return CallCapture(angle::EntryPoint::GLProgramUniform3d, std::move(paramBuffer));
1177 }
1178
CaptureProgramUniform3dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLdouble * value)1179 CallCapture CaptureProgramUniform3dv(const State &glState,
1180 bool isCallValid,
1181 ShaderProgramID programPacked,
1182 UniformLocation locationPacked,
1183 GLsizei count,
1184 const GLdouble *value)
1185 {
1186 ParamBuffer paramBuffer;
1187
1188 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1189 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1190 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1191
1192 if (isCallValid)
1193 {
1194 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1195 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1196 CaptureProgramUniform3dv_value(glState, isCallValid, programPacked, locationPacked, count,
1197 value, &valueParam);
1198 paramBuffer.addParam(std::move(valueParam));
1199 }
1200 else
1201 {
1202 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1203 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1204 &valueParam.value);
1205 paramBuffer.addParam(std::move(valueParam));
1206 }
1207
1208 return CallCapture(angle::EntryPoint::GLProgramUniform3dv, std::move(paramBuffer));
1209 }
1210
CaptureProgramUniform4d(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLdouble v0,GLdouble v1,GLdouble v2,GLdouble v3)1211 CallCapture CaptureProgramUniform4d(const State &glState,
1212 bool isCallValid,
1213 ShaderProgramID programPacked,
1214 UniformLocation locationPacked,
1215 GLdouble v0,
1216 GLdouble v1,
1217 GLdouble v2,
1218 GLdouble v3)
1219 {
1220 ParamBuffer paramBuffer;
1221
1222 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1223 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1224 paramBuffer.addValueParam("v0", ParamType::TGLdouble, v0);
1225 paramBuffer.addValueParam("v1", ParamType::TGLdouble, v1);
1226 paramBuffer.addValueParam("v2", ParamType::TGLdouble, v2);
1227 paramBuffer.addValueParam("v3", ParamType::TGLdouble, v3);
1228
1229 return CallCapture(angle::EntryPoint::GLProgramUniform4d, std::move(paramBuffer));
1230 }
1231
CaptureProgramUniform4dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLdouble * value)1232 CallCapture CaptureProgramUniform4dv(const State &glState,
1233 bool isCallValid,
1234 ShaderProgramID programPacked,
1235 UniformLocation locationPacked,
1236 GLsizei count,
1237 const GLdouble *value)
1238 {
1239 ParamBuffer paramBuffer;
1240
1241 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1242 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1243 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1244
1245 if (isCallValid)
1246 {
1247 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1248 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1249 CaptureProgramUniform4dv_value(glState, isCallValid, programPacked, locationPacked, count,
1250 value, &valueParam);
1251 paramBuffer.addParam(std::move(valueParam));
1252 }
1253 else
1254 {
1255 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1256 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1257 &valueParam.value);
1258 paramBuffer.addParam(std::move(valueParam));
1259 }
1260
1261 return CallCapture(angle::EntryPoint::GLProgramUniform4dv, std::move(paramBuffer));
1262 }
1263
CaptureProgramUniformMatrix2dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1264 CallCapture CaptureProgramUniformMatrix2dv(const State &glState,
1265 bool isCallValid,
1266 ShaderProgramID programPacked,
1267 UniformLocation locationPacked,
1268 GLsizei count,
1269 GLboolean transpose,
1270 const GLdouble *value)
1271 {
1272 ParamBuffer paramBuffer;
1273
1274 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1275 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1276 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1277 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1278
1279 if (isCallValid)
1280 {
1281 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1282 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1283 CaptureProgramUniformMatrix2dv_value(glState, isCallValid, programPacked, locationPacked,
1284 count, transpose, value, &valueParam);
1285 paramBuffer.addParam(std::move(valueParam));
1286 }
1287 else
1288 {
1289 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1290 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1291 &valueParam.value);
1292 paramBuffer.addParam(std::move(valueParam));
1293 }
1294
1295 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2dv, std::move(paramBuffer));
1296 }
1297
CaptureProgramUniformMatrix2x3dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1298 CallCapture CaptureProgramUniformMatrix2x3dv(const State &glState,
1299 bool isCallValid,
1300 ShaderProgramID programPacked,
1301 UniformLocation locationPacked,
1302 GLsizei count,
1303 GLboolean transpose,
1304 const GLdouble *value)
1305 {
1306 ParamBuffer paramBuffer;
1307
1308 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1309 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1310 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1311 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1312
1313 if (isCallValid)
1314 {
1315 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1316 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1317 CaptureProgramUniformMatrix2x3dv_value(glState, isCallValid, programPacked, locationPacked,
1318 count, transpose, value, &valueParam);
1319 paramBuffer.addParam(std::move(valueParam));
1320 }
1321 else
1322 {
1323 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1324 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1325 &valueParam.value);
1326 paramBuffer.addParam(std::move(valueParam));
1327 }
1328
1329 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2x3dv, std::move(paramBuffer));
1330 }
1331
CaptureProgramUniformMatrix2x4dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1332 CallCapture CaptureProgramUniformMatrix2x4dv(const State &glState,
1333 bool isCallValid,
1334 ShaderProgramID programPacked,
1335 UniformLocation locationPacked,
1336 GLsizei count,
1337 GLboolean transpose,
1338 const GLdouble *value)
1339 {
1340 ParamBuffer paramBuffer;
1341
1342 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1343 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1344 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1345 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1346
1347 if (isCallValid)
1348 {
1349 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1350 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1351 CaptureProgramUniformMatrix2x4dv_value(glState, isCallValid, programPacked, locationPacked,
1352 count, transpose, value, &valueParam);
1353 paramBuffer.addParam(std::move(valueParam));
1354 }
1355 else
1356 {
1357 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1358 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1359 &valueParam.value);
1360 paramBuffer.addParam(std::move(valueParam));
1361 }
1362
1363 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2x4dv, std::move(paramBuffer));
1364 }
1365
CaptureProgramUniformMatrix3dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1366 CallCapture CaptureProgramUniformMatrix3dv(const State &glState,
1367 bool isCallValid,
1368 ShaderProgramID programPacked,
1369 UniformLocation locationPacked,
1370 GLsizei count,
1371 GLboolean transpose,
1372 const GLdouble *value)
1373 {
1374 ParamBuffer paramBuffer;
1375
1376 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1377 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1378 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1379 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1380
1381 if (isCallValid)
1382 {
1383 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1384 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1385 CaptureProgramUniformMatrix3dv_value(glState, isCallValid, programPacked, locationPacked,
1386 count, transpose, value, &valueParam);
1387 paramBuffer.addParam(std::move(valueParam));
1388 }
1389 else
1390 {
1391 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1392 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1393 &valueParam.value);
1394 paramBuffer.addParam(std::move(valueParam));
1395 }
1396
1397 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3dv, std::move(paramBuffer));
1398 }
1399
CaptureProgramUniformMatrix3x2dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1400 CallCapture CaptureProgramUniformMatrix3x2dv(const State &glState,
1401 bool isCallValid,
1402 ShaderProgramID programPacked,
1403 UniformLocation locationPacked,
1404 GLsizei count,
1405 GLboolean transpose,
1406 const GLdouble *value)
1407 {
1408 ParamBuffer paramBuffer;
1409
1410 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1411 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1412 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1413 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1414
1415 if (isCallValid)
1416 {
1417 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1418 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1419 CaptureProgramUniformMatrix3x2dv_value(glState, isCallValid, programPacked, locationPacked,
1420 count, transpose, value, &valueParam);
1421 paramBuffer.addParam(std::move(valueParam));
1422 }
1423 else
1424 {
1425 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1426 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1427 &valueParam.value);
1428 paramBuffer.addParam(std::move(valueParam));
1429 }
1430
1431 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3x2dv, std::move(paramBuffer));
1432 }
1433
CaptureProgramUniformMatrix3x4dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1434 CallCapture CaptureProgramUniformMatrix3x4dv(const State &glState,
1435 bool isCallValid,
1436 ShaderProgramID programPacked,
1437 UniformLocation locationPacked,
1438 GLsizei count,
1439 GLboolean transpose,
1440 const GLdouble *value)
1441 {
1442 ParamBuffer paramBuffer;
1443
1444 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1445 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1446 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1447 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1448
1449 if (isCallValid)
1450 {
1451 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1452 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1453 CaptureProgramUniformMatrix3x4dv_value(glState, isCallValid, programPacked, locationPacked,
1454 count, transpose, value, &valueParam);
1455 paramBuffer.addParam(std::move(valueParam));
1456 }
1457 else
1458 {
1459 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1460 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1461 &valueParam.value);
1462 paramBuffer.addParam(std::move(valueParam));
1463 }
1464
1465 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3x4dv, std::move(paramBuffer));
1466 }
1467
CaptureProgramUniformMatrix4dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1468 CallCapture CaptureProgramUniformMatrix4dv(const State &glState,
1469 bool isCallValid,
1470 ShaderProgramID programPacked,
1471 UniformLocation locationPacked,
1472 GLsizei count,
1473 GLboolean transpose,
1474 const GLdouble *value)
1475 {
1476 ParamBuffer paramBuffer;
1477
1478 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1479 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1480 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1481 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1482
1483 if (isCallValid)
1484 {
1485 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1486 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1487 CaptureProgramUniformMatrix4dv_value(glState, isCallValid, programPacked, locationPacked,
1488 count, transpose, value, &valueParam);
1489 paramBuffer.addParam(std::move(valueParam));
1490 }
1491 else
1492 {
1493 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1494 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1495 &valueParam.value);
1496 paramBuffer.addParam(std::move(valueParam));
1497 }
1498
1499 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4dv, std::move(paramBuffer));
1500 }
1501
CaptureProgramUniformMatrix4x2dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1502 CallCapture CaptureProgramUniformMatrix4x2dv(const State &glState,
1503 bool isCallValid,
1504 ShaderProgramID programPacked,
1505 UniformLocation locationPacked,
1506 GLsizei count,
1507 GLboolean transpose,
1508 const GLdouble *value)
1509 {
1510 ParamBuffer paramBuffer;
1511
1512 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1513 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1514 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1515 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1516
1517 if (isCallValid)
1518 {
1519 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1520 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1521 CaptureProgramUniformMatrix4x2dv_value(glState, isCallValid, programPacked, locationPacked,
1522 count, transpose, value, &valueParam);
1523 paramBuffer.addParam(std::move(valueParam));
1524 }
1525 else
1526 {
1527 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1528 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1529 &valueParam.value);
1530 paramBuffer.addParam(std::move(valueParam));
1531 }
1532
1533 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4x2dv, std::move(paramBuffer));
1534 }
1535
CaptureProgramUniformMatrix4x3dv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLdouble * value)1536 CallCapture CaptureProgramUniformMatrix4x3dv(const State &glState,
1537 bool isCallValid,
1538 ShaderProgramID programPacked,
1539 UniformLocation locationPacked,
1540 GLsizei count,
1541 GLboolean transpose,
1542 const GLdouble *value)
1543 {
1544 ParamBuffer paramBuffer;
1545
1546 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1547 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1548 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1549 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1550
1551 if (isCallValid)
1552 {
1553 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1554 InitParamValue(ParamType::TGLdoubleConstPointer, value, &valueParam.value);
1555 CaptureProgramUniformMatrix4x3dv_value(glState, isCallValid, programPacked, locationPacked,
1556 count, transpose, value, &valueParam);
1557 paramBuffer.addParam(std::move(valueParam));
1558 }
1559 else
1560 {
1561 ParamCapture valueParam("value", ParamType::TGLdoubleConstPointer);
1562 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1563 &valueParam.value);
1564 paramBuffer.addParam(std::move(valueParam));
1565 }
1566
1567 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4x3dv, std::move(paramBuffer));
1568 }
1569
CaptureScissorArrayv(const State & glState,bool isCallValid,GLuint first,GLsizei count,const GLint * v)1570 CallCapture CaptureScissorArrayv(const State &glState,
1571 bool isCallValid,
1572 GLuint first,
1573 GLsizei count,
1574 const GLint *v)
1575 {
1576 ParamBuffer paramBuffer;
1577
1578 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
1579 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1580
1581 if (isCallValid)
1582 {
1583 ParamCapture vParam("v", ParamType::TGLintConstPointer);
1584 InitParamValue(ParamType::TGLintConstPointer, v, &vParam.value);
1585 CaptureScissorArrayv_v(glState, isCallValid, first, count, v, &vParam);
1586 paramBuffer.addParam(std::move(vParam));
1587 }
1588 else
1589 {
1590 ParamCapture vParam("v", ParamType::TGLintConstPointer);
1591 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1592 &vParam.value);
1593 paramBuffer.addParam(std::move(vParam));
1594 }
1595
1596 return CallCapture(angle::EntryPoint::GLScissorArrayv, std::move(paramBuffer));
1597 }
1598
CaptureScissorIndexed(const State & glState,bool isCallValid,GLuint index,GLint left,GLint bottom,GLsizei width,GLsizei height)1599 CallCapture CaptureScissorIndexed(const State &glState,
1600 bool isCallValid,
1601 GLuint index,
1602 GLint left,
1603 GLint bottom,
1604 GLsizei width,
1605 GLsizei height)
1606 {
1607 ParamBuffer paramBuffer;
1608
1609 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1610 paramBuffer.addValueParam("left", ParamType::TGLint, left);
1611 paramBuffer.addValueParam("bottom", ParamType::TGLint, bottom);
1612 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1613 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1614
1615 return CallCapture(angle::EntryPoint::GLScissorIndexed, std::move(paramBuffer));
1616 }
1617
CaptureScissorIndexedv(const State & glState,bool isCallValid,GLuint index,const GLint * v)1618 CallCapture CaptureScissorIndexedv(const State &glState,
1619 bool isCallValid,
1620 GLuint index,
1621 const GLint *v)
1622 {
1623 ParamBuffer paramBuffer;
1624
1625 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1626
1627 if (isCallValid)
1628 {
1629 ParamCapture vParam("v", ParamType::TGLintConstPointer);
1630 InitParamValue(ParamType::TGLintConstPointer, v, &vParam.value);
1631 CaptureScissorIndexedv_v(glState, isCallValid, index, v, &vParam);
1632 paramBuffer.addParam(std::move(vParam));
1633 }
1634 else
1635 {
1636 ParamCapture vParam("v", ParamType::TGLintConstPointer);
1637 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1638 &vParam.value);
1639 paramBuffer.addParam(std::move(vParam));
1640 }
1641
1642 return CallCapture(angle::EntryPoint::GLScissorIndexedv, std::move(paramBuffer));
1643 }
1644
CaptureVertexAttribL1d(const State & glState,bool isCallValid,GLuint index,GLdouble x)1645 CallCapture CaptureVertexAttribL1d(const State &glState, bool isCallValid, GLuint index, GLdouble x)
1646 {
1647 ParamBuffer paramBuffer;
1648
1649 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1650 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
1651
1652 return CallCapture(angle::EntryPoint::GLVertexAttribL1d, std::move(paramBuffer));
1653 }
1654
CaptureVertexAttribL1dv(const State & glState,bool isCallValid,GLuint index,const GLdouble * v)1655 CallCapture CaptureVertexAttribL1dv(const State &glState,
1656 bool isCallValid,
1657 GLuint index,
1658 const GLdouble *v)
1659 {
1660 ParamBuffer paramBuffer;
1661
1662 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1663
1664 if (isCallValid)
1665 {
1666 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1667 InitParamValue(ParamType::TGLdoubleConstPointer, v, &vParam.value);
1668 CaptureVertexAttribL1dv_v(glState, isCallValid, index, v, &vParam);
1669 paramBuffer.addParam(std::move(vParam));
1670 }
1671 else
1672 {
1673 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1674 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1675 &vParam.value);
1676 paramBuffer.addParam(std::move(vParam));
1677 }
1678
1679 return CallCapture(angle::EntryPoint::GLVertexAttribL1dv, std::move(paramBuffer));
1680 }
1681
CaptureVertexAttribL2d(const State & glState,bool isCallValid,GLuint index,GLdouble x,GLdouble y)1682 CallCapture CaptureVertexAttribL2d(const State &glState,
1683 bool isCallValid,
1684 GLuint index,
1685 GLdouble x,
1686 GLdouble y)
1687 {
1688 ParamBuffer paramBuffer;
1689
1690 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1691 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
1692 paramBuffer.addValueParam("y", ParamType::TGLdouble, y);
1693
1694 return CallCapture(angle::EntryPoint::GLVertexAttribL2d, std::move(paramBuffer));
1695 }
1696
CaptureVertexAttribL2dv(const State & glState,bool isCallValid,GLuint index,const GLdouble * v)1697 CallCapture CaptureVertexAttribL2dv(const State &glState,
1698 bool isCallValid,
1699 GLuint index,
1700 const GLdouble *v)
1701 {
1702 ParamBuffer paramBuffer;
1703
1704 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1705
1706 if (isCallValid)
1707 {
1708 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1709 InitParamValue(ParamType::TGLdoubleConstPointer, v, &vParam.value);
1710 CaptureVertexAttribL2dv_v(glState, isCallValid, index, v, &vParam);
1711 paramBuffer.addParam(std::move(vParam));
1712 }
1713 else
1714 {
1715 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1716 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1717 &vParam.value);
1718 paramBuffer.addParam(std::move(vParam));
1719 }
1720
1721 return CallCapture(angle::EntryPoint::GLVertexAttribL2dv, std::move(paramBuffer));
1722 }
1723
CaptureVertexAttribL3d(const State & glState,bool isCallValid,GLuint index,GLdouble x,GLdouble y,GLdouble z)1724 CallCapture CaptureVertexAttribL3d(const State &glState,
1725 bool isCallValid,
1726 GLuint index,
1727 GLdouble x,
1728 GLdouble y,
1729 GLdouble z)
1730 {
1731 ParamBuffer paramBuffer;
1732
1733 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1734 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
1735 paramBuffer.addValueParam("y", ParamType::TGLdouble, y);
1736 paramBuffer.addValueParam("z", ParamType::TGLdouble, z);
1737
1738 return CallCapture(angle::EntryPoint::GLVertexAttribL3d, std::move(paramBuffer));
1739 }
1740
CaptureVertexAttribL3dv(const State & glState,bool isCallValid,GLuint index,const GLdouble * v)1741 CallCapture CaptureVertexAttribL3dv(const State &glState,
1742 bool isCallValid,
1743 GLuint index,
1744 const GLdouble *v)
1745 {
1746 ParamBuffer paramBuffer;
1747
1748 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1749
1750 if (isCallValid)
1751 {
1752 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1753 InitParamValue(ParamType::TGLdoubleConstPointer, v, &vParam.value);
1754 CaptureVertexAttribL3dv_v(glState, isCallValid, index, v, &vParam);
1755 paramBuffer.addParam(std::move(vParam));
1756 }
1757 else
1758 {
1759 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1760 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1761 &vParam.value);
1762 paramBuffer.addParam(std::move(vParam));
1763 }
1764
1765 return CallCapture(angle::EntryPoint::GLVertexAttribL3dv, std::move(paramBuffer));
1766 }
1767
CaptureVertexAttribL4d(const State & glState,bool isCallValid,GLuint index,GLdouble x,GLdouble y,GLdouble z,GLdouble w)1768 CallCapture CaptureVertexAttribL4d(const State &glState,
1769 bool isCallValid,
1770 GLuint index,
1771 GLdouble x,
1772 GLdouble y,
1773 GLdouble z,
1774 GLdouble w)
1775 {
1776 ParamBuffer paramBuffer;
1777
1778 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1779 paramBuffer.addValueParam("x", ParamType::TGLdouble, x);
1780 paramBuffer.addValueParam("y", ParamType::TGLdouble, y);
1781 paramBuffer.addValueParam("z", ParamType::TGLdouble, z);
1782 paramBuffer.addValueParam("w", ParamType::TGLdouble, w);
1783
1784 return CallCapture(angle::EntryPoint::GLVertexAttribL4d, std::move(paramBuffer));
1785 }
1786
CaptureVertexAttribL4dv(const State & glState,bool isCallValid,GLuint index,const GLdouble * v)1787 CallCapture CaptureVertexAttribL4dv(const State &glState,
1788 bool isCallValid,
1789 GLuint index,
1790 const GLdouble *v)
1791 {
1792 ParamBuffer paramBuffer;
1793
1794 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1795
1796 if (isCallValid)
1797 {
1798 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1799 InitParamValue(ParamType::TGLdoubleConstPointer, v, &vParam.value);
1800 CaptureVertexAttribL4dv_v(glState, isCallValid, index, v, &vParam);
1801 paramBuffer.addParam(std::move(vParam));
1802 }
1803 else
1804 {
1805 ParamCapture vParam("v", ParamType::TGLdoubleConstPointer);
1806 InitParamValue(ParamType::TGLdoubleConstPointer, static_cast<const GLdouble *>(nullptr),
1807 &vParam.value);
1808 paramBuffer.addParam(std::move(vParam));
1809 }
1810
1811 return CallCapture(angle::EntryPoint::GLVertexAttribL4dv, std::move(paramBuffer));
1812 }
1813
CaptureVertexAttribLPointer(const State & glState,bool isCallValid,GLuint index,GLint size,GLenum type,GLsizei stride,const void * pointer)1814 CallCapture CaptureVertexAttribLPointer(const State &glState,
1815 bool isCallValid,
1816 GLuint index,
1817 GLint size,
1818 GLenum type,
1819 GLsizei stride,
1820 const void *pointer)
1821 {
1822 ParamBuffer paramBuffer;
1823
1824 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1825 paramBuffer.addValueParam("size", ParamType::TGLint, size);
1826 paramBuffer.addEnumParam("type", BigGLEnum::VertexAttribLType, ParamType::TGLenum, type);
1827 paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
1828
1829 if (isCallValid)
1830 {
1831 ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
1832 InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
1833 CaptureVertexAttribLPointer_pointer(glState, isCallValid, index, size, type, stride,
1834 pointer, &pointerParam);
1835 paramBuffer.addParam(std::move(pointerParam));
1836 }
1837 else
1838 {
1839 ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
1840 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
1841 &pointerParam.value);
1842 paramBuffer.addParam(std::move(pointerParam));
1843 }
1844
1845 return CallCapture(angle::EntryPoint::GLVertexAttribLPointer, std::move(paramBuffer));
1846 }
1847
CaptureViewportArrayv(const State & glState,bool isCallValid,GLuint first,GLsizei count,const GLfloat * v)1848 CallCapture CaptureViewportArrayv(const State &glState,
1849 bool isCallValid,
1850 GLuint first,
1851 GLsizei count,
1852 const GLfloat *v)
1853 {
1854 ParamBuffer paramBuffer;
1855
1856 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
1857 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1858
1859 if (isCallValid)
1860 {
1861 ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
1862 InitParamValue(ParamType::TGLfloatConstPointer, v, &vParam.value);
1863 CaptureViewportArrayv_v(glState, isCallValid, first, count, v, &vParam);
1864 paramBuffer.addParam(std::move(vParam));
1865 }
1866 else
1867 {
1868 ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
1869 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1870 &vParam.value);
1871 paramBuffer.addParam(std::move(vParam));
1872 }
1873
1874 return CallCapture(angle::EntryPoint::GLViewportArrayv, std::move(paramBuffer));
1875 }
1876
CaptureViewportIndexedf(const State & glState,bool isCallValid,GLuint index,GLfloat x,GLfloat y,GLfloat w,GLfloat h)1877 CallCapture CaptureViewportIndexedf(const State &glState,
1878 bool isCallValid,
1879 GLuint index,
1880 GLfloat x,
1881 GLfloat y,
1882 GLfloat w,
1883 GLfloat h)
1884 {
1885 ParamBuffer paramBuffer;
1886
1887 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1888 paramBuffer.addValueParam("x", ParamType::TGLfloat, x);
1889 paramBuffer.addValueParam("y", ParamType::TGLfloat, y);
1890 paramBuffer.addValueParam("w", ParamType::TGLfloat, w);
1891 paramBuffer.addValueParam("h", ParamType::TGLfloat, h);
1892
1893 return CallCapture(angle::EntryPoint::GLViewportIndexedf, std::move(paramBuffer));
1894 }
1895
CaptureViewportIndexedfv(const State & glState,bool isCallValid,GLuint index,const GLfloat * v)1896 CallCapture CaptureViewportIndexedfv(const State &glState,
1897 bool isCallValid,
1898 GLuint index,
1899 const GLfloat *v)
1900 {
1901 ParamBuffer paramBuffer;
1902
1903 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
1904
1905 if (isCallValid)
1906 {
1907 ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
1908 InitParamValue(ParamType::TGLfloatConstPointer, v, &vParam.value);
1909 CaptureViewportIndexedfv_v(glState, isCallValid, index, v, &vParam);
1910 paramBuffer.addParam(std::move(vParam));
1911 }
1912 else
1913 {
1914 ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
1915 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1916 &vParam.value);
1917 paramBuffer.addParam(std::move(vParam));
1918 }
1919
1920 return CallCapture(angle::EntryPoint::GLViewportIndexedfv, std::move(paramBuffer));
1921 }
1922
1923 // GL 4.2
CaptureDrawArraysInstancedBaseInstance(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLint first,GLsizei count,GLsizei instancecount,GLuint baseinstance)1924 CallCapture CaptureDrawArraysInstancedBaseInstance(const State &glState,
1925 bool isCallValid,
1926 PrimitiveMode modePacked,
1927 GLint first,
1928 GLsizei count,
1929 GLsizei instancecount,
1930 GLuint baseinstance)
1931 {
1932 ParamBuffer paramBuffer;
1933
1934 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
1935 paramBuffer.addValueParam("first", ParamType::TGLint, first);
1936 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1937 paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
1938 paramBuffer.addValueParam("baseinstance", ParamType::TGLuint, baseinstance);
1939
1940 return CallCapture(angle::EntryPoint::GLDrawArraysInstancedBaseInstance,
1941 std::move(paramBuffer));
1942 }
1943
CaptureDrawElementsInstancedBaseInstance(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount,GLuint baseinstance)1944 CallCapture CaptureDrawElementsInstancedBaseInstance(const State &glState,
1945 bool isCallValid,
1946 PrimitiveMode modePacked,
1947 GLsizei count,
1948 DrawElementsType typePacked,
1949 const void *indices,
1950 GLsizei instancecount,
1951 GLuint baseinstance)
1952 {
1953 ParamBuffer paramBuffer;
1954
1955 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
1956 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1957 paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
1958
1959 if (isCallValid)
1960 {
1961 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
1962 InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
1963 CaptureDrawElementsInstancedBaseInstance_indices(glState, isCallValid, modePacked, count,
1964 typePacked, indices, instancecount,
1965 baseinstance, &indicesParam);
1966 paramBuffer.addParam(std::move(indicesParam));
1967 }
1968 else
1969 {
1970 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
1971 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
1972 &indicesParam.value);
1973 paramBuffer.addParam(std::move(indicesParam));
1974 }
1975
1976 paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
1977 paramBuffer.addValueParam("baseinstance", ParamType::TGLuint, baseinstance);
1978
1979 return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseInstance,
1980 std::move(paramBuffer));
1981 }
1982
CaptureDrawElementsInstancedBaseVertexBaseInstance(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount,GLint basevertex,GLuint baseinstance)1983 CallCapture CaptureDrawElementsInstancedBaseVertexBaseInstance(const State &glState,
1984 bool isCallValid,
1985 PrimitiveMode modePacked,
1986 GLsizei count,
1987 DrawElementsType typePacked,
1988 const void *indices,
1989 GLsizei instancecount,
1990 GLint basevertex,
1991 GLuint baseinstance)
1992 {
1993 ParamBuffer paramBuffer;
1994
1995 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
1996 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1997 paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
1998
1999 if (isCallValid)
2000 {
2001 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
2002 InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
2003 CaptureDrawElementsInstancedBaseVertexBaseInstance_indices(
2004 glState, isCallValid, modePacked, count, typePacked, indices, instancecount, basevertex,
2005 baseinstance, &indicesParam);
2006 paramBuffer.addParam(std::move(indicesParam));
2007 }
2008 else
2009 {
2010 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
2011 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2012 &indicesParam.value);
2013 paramBuffer.addParam(std::move(indicesParam));
2014 }
2015
2016 paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
2017 paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
2018 paramBuffer.addValueParam("baseinstance", ParamType::TGLuint, baseinstance);
2019
2020 return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseVertexBaseInstance,
2021 std::move(paramBuffer));
2022 }
2023
CaptureDrawTransformFeedbackInstanced(const State & glState,bool isCallValid,GLenum mode,TransformFeedbackID idPacked,GLsizei instancecount)2024 CallCapture CaptureDrawTransformFeedbackInstanced(const State &glState,
2025 bool isCallValid,
2026 GLenum mode,
2027 TransformFeedbackID idPacked,
2028 GLsizei instancecount)
2029 {
2030 ParamBuffer paramBuffer;
2031
2032 paramBuffer.addEnumParam("mode", BigGLEnum::PrimitiveType, ParamType::TGLenum, mode);
2033 paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked);
2034 paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
2035
2036 return CallCapture(angle::EntryPoint::GLDrawTransformFeedbackInstanced, std::move(paramBuffer));
2037 }
2038
CaptureDrawTransformFeedbackStreamInstanced(const State & glState,bool isCallValid,GLenum mode,TransformFeedbackID idPacked,GLuint stream,GLsizei instancecount)2039 CallCapture CaptureDrawTransformFeedbackStreamInstanced(const State &glState,
2040 bool isCallValid,
2041 GLenum mode,
2042 TransformFeedbackID idPacked,
2043 GLuint stream,
2044 GLsizei instancecount)
2045 {
2046 ParamBuffer paramBuffer;
2047
2048 paramBuffer.addEnumParam("mode", BigGLEnum::PrimitiveType, ParamType::TGLenum, mode);
2049 paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked);
2050 paramBuffer.addValueParam("stream", ParamType::TGLuint, stream);
2051 paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
2052
2053 return CallCapture(angle::EntryPoint::GLDrawTransformFeedbackStreamInstanced,
2054 std::move(paramBuffer));
2055 }
2056
CaptureGetActiveAtomicCounterBufferiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint bufferIndex,GLenum pname,GLint * params)2057 CallCapture CaptureGetActiveAtomicCounterBufferiv(const State &glState,
2058 bool isCallValid,
2059 ShaderProgramID programPacked,
2060 GLuint bufferIndex,
2061 GLenum pname,
2062 GLint *params)
2063 {
2064 ParamBuffer paramBuffer;
2065
2066 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
2067 paramBuffer.addValueParam("bufferIndex", ParamType::TGLuint, bufferIndex);
2068 paramBuffer.addEnumParam("pname", BigGLEnum::AtomicCounterBufferPName, ParamType::TGLenum,
2069 pname);
2070
2071 if (isCallValid)
2072 {
2073 ParamCapture paramsParam("params", ParamType::TGLintPointer);
2074 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
2075 CaptureGetActiveAtomicCounterBufferiv_params(glState, isCallValid, programPacked,
2076 bufferIndex, pname, params, ¶msParam);
2077 paramBuffer.addParam(std::move(paramsParam));
2078 }
2079 else
2080 {
2081 ParamCapture paramsParam("params", ParamType::TGLintPointer);
2082 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
2083 paramBuffer.addParam(std::move(paramsParam));
2084 }
2085
2086 return CallCapture(angle::EntryPoint::GLGetActiveAtomicCounterBufferiv, std::move(paramBuffer));
2087 }
2088
CaptureTexStorage1D(const State & glState,bool isCallValid,GLenum target,GLsizei levels,GLenum internalformat,GLsizei width)2089 CallCapture CaptureTexStorage1D(const State &glState,
2090 bool isCallValid,
2091 GLenum target,
2092 GLsizei levels,
2093 GLenum internalformat,
2094 GLsizei width)
2095 {
2096 ParamBuffer paramBuffer;
2097
2098 paramBuffer.addEnumParam("target", BigGLEnum::TextureTarget, ParamType::TGLenum, target);
2099 paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
2100 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
2101 internalformat);
2102 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2103
2104 return CallCapture(angle::EntryPoint::GLTexStorage1D, std::move(paramBuffer));
2105 }
2106
2107 // GL 4.3
CaptureClearBufferData(const State & glState,bool isCallValid,GLenum target,GLenum internalformat,GLenum format,GLenum type,const void * data)2108 CallCapture CaptureClearBufferData(const State &glState,
2109 bool isCallValid,
2110 GLenum target,
2111 GLenum internalformat,
2112 GLenum format,
2113 GLenum type,
2114 const void *data)
2115 {
2116 ParamBuffer paramBuffer;
2117
2118 paramBuffer.addEnumParam("target", BigGLEnum::BufferStorageTarget, ParamType::TGLenum, target);
2119 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
2120 internalformat);
2121 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
2122 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
2123
2124 if (isCallValid)
2125 {
2126 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2127 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
2128 CaptureClearBufferData_data(glState, isCallValid, target, internalformat, format, type,
2129 data, &dataParam);
2130 paramBuffer.addParam(std::move(dataParam));
2131 }
2132 else
2133 {
2134 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2135 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2136 &dataParam.value);
2137 paramBuffer.addParam(std::move(dataParam));
2138 }
2139
2140 return CallCapture(angle::EntryPoint::GLClearBufferData, std::move(paramBuffer));
2141 }
2142
CaptureClearBufferSubData(const State & glState,bool isCallValid,GLenum target,GLenum internalformat,GLintptr offset,GLsizeiptr size,GLenum format,GLenum type,const void * data)2143 CallCapture CaptureClearBufferSubData(const State &glState,
2144 bool isCallValid,
2145 GLenum target,
2146 GLenum internalformat,
2147 GLintptr offset,
2148 GLsizeiptr size,
2149 GLenum format,
2150 GLenum type,
2151 const void *data)
2152 {
2153 ParamBuffer paramBuffer;
2154
2155 paramBuffer.addEnumParam("target", BigGLEnum::BufferTargetARB, ParamType::TGLenum, target);
2156 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
2157 internalformat);
2158 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
2159 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
2160 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
2161 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
2162
2163 if (isCallValid)
2164 {
2165 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2166 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
2167 CaptureClearBufferSubData_data(glState, isCallValid, target, internalformat, offset, size,
2168 format, type, data, &dataParam);
2169 paramBuffer.addParam(std::move(dataParam));
2170 }
2171 else
2172 {
2173 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2174 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2175 &dataParam.value);
2176 paramBuffer.addParam(std::move(dataParam));
2177 }
2178
2179 return CallCapture(angle::EntryPoint::GLClearBufferSubData, std::move(paramBuffer));
2180 }
2181
CaptureGetInternalformati64v(const State & glState,bool isCallValid,GLenum target,GLenum internalformat,GLenum pname,GLsizei count,GLint64 * params)2182 CallCapture CaptureGetInternalformati64v(const State &glState,
2183 bool isCallValid,
2184 GLenum target,
2185 GLenum internalformat,
2186 GLenum pname,
2187 GLsizei count,
2188 GLint64 *params)
2189 {
2190 ParamBuffer paramBuffer;
2191
2192 paramBuffer.addEnumParam("target", BigGLEnum::TextureTarget, ParamType::TGLenum, target);
2193 paramBuffer.addEnumParam("internalformat", BigGLEnum::InternalFormat, ParamType::TGLenum,
2194 internalformat);
2195 paramBuffer.addEnumParam("pname", BigGLEnum::InternalFormatPName, ParamType::TGLenum, pname);
2196 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
2197
2198 if (isCallValid)
2199 {
2200 ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
2201 InitParamValue(ParamType::TGLint64Pointer, params, ¶msParam.value);
2202 CaptureGetInternalformati64v_params(glState, isCallValid, target, internalformat, pname,
2203 count, params, ¶msParam);
2204 paramBuffer.addParam(std::move(paramsParam));
2205 }
2206 else
2207 {
2208 ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
2209 InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
2210 ¶msParam.value);
2211 paramBuffer.addParam(std::move(paramsParam));
2212 }
2213
2214 return CallCapture(angle::EntryPoint::GLGetInternalformati64v, std::move(paramBuffer));
2215 }
2216
CaptureGetProgramResourceLocationIndex(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,const GLchar * name,GLint returnValue)2217 CallCapture CaptureGetProgramResourceLocationIndex(const State &glState,
2218 bool isCallValid,
2219 ShaderProgramID programPacked,
2220 GLenum programInterface,
2221 const GLchar *name,
2222 GLint returnValue)
2223 {
2224 ParamBuffer paramBuffer;
2225
2226 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
2227 paramBuffer.addEnumParam("programInterface", BigGLEnum::ProgramInterface, ParamType::TGLenum,
2228 programInterface);
2229
2230 if (isCallValid)
2231 {
2232 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
2233 InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
2234 CaptureGetProgramResourceLocationIndex_name(glState, isCallValid, programPacked,
2235 programInterface, name, &nameParam);
2236 paramBuffer.addParam(std::move(nameParam));
2237 }
2238 else
2239 {
2240 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
2241 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
2242 &nameParam.value);
2243 paramBuffer.addParam(std::move(nameParam));
2244 }
2245
2246 ParamCapture returnValueCapture("returnValue", ParamType::TGLint);
2247 InitParamValue(ParamType::TGLint, returnValue, &returnValueCapture.value);
2248 paramBuffer.addReturnValue(std::move(returnValueCapture));
2249
2250 return CallCapture(angle::EntryPoint::GLGetProgramResourceLocationIndex,
2251 std::move(paramBuffer));
2252 }
2253
CaptureInvalidateBufferData(const State & glState,bool isCallValid,BufferID bufferPacked)2254 CallCapture CaptureInvalidateBufferData(const State &glState,
2255 bool isCallValid,
2256 BufferID bufferPacked)
2257 {
2258 ParamBuffer paramBuffer;
2259
2260 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
2261
2262 return CallCapture(angle::EntryPoint::GLInvalidateBufferData, std::move(paramBuffer));
2263 }
2264
CaptureInvalidateBufferSubData(const State & glState,bool isCallValid,BufferID bufferPacked,GLintptr offset,GLsizeiptr length)2265 CallCapture CaptureInvalidateBufferSubData(const State &glState,
2266 bool isCallValid,
2267 BufferID bufferPacked,
2268 GLintptr offset,
2269 GLsizeiptr length)
2270 {
2271 ParamBuffer paramBuffer;
2272
2273 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
2274 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
2275 paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
2276
2277 return CallCapture(angle::EntryPoint::GLInvalidateBufferSubData, std::move(paramBuffer));
2278 }
2279
CaptureInvalidateTexImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level)2280 CallCapture CaptureInvalidateTexImage(const State &glState,
2281 bool isCallValid,
2282 TextureID texturePacked,
2283 GLint level)
2284 {
2285 ParamBuffer paramBuffer;
2286
2287 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
2288 paramBuffer.addValueParam("level", ParamType::TGLint, level);
2289
2290 return CallCapture(angle::EntryPoint::GLInvalidateTexImage, std::move(paramBuffer));
2291 }
2292
CaptureInvalidateTexSubImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth)2293 CallCapture CaptureInvalidateTexSubImage(const State &glState,
2294 bool isCallValid,
2295 TextureID texturePacked,
2296 GLint level,
2297 GLint xoffset,
2298 GLint yoffset,
2299 GLint zoffset,
2300 GLsizei width,
2301 GLsizei height,
2302 GLsizei depth)
2303 {
2304 ParamBuffer paramBuffer;
2305
2306 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
2307 paramBuffer.addValueParam("level", ParamType::TGLint, level);
2308 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
2309 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
2310 paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
2311 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2312 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2313 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
2314
2315 return CallCapture(angle::EntryPoint::GLInvalidateTexSubImage, std::move(paramBuffer));
2316 }
2317
CaptureMultiDrawArraysIndirect(const State & glState,bool isCallValid,PrimitiveMode modePacked,const void * indirect,GLsizei drawcount,GLsizei stride)2318 CallCapture CaptureMultiDrawArraysIndirect(const State &glState,
2319 bool isCallValid,
2320 PrimitiveMode modePacked,
2321 const void *indirect,
2322 GLsizei drawcount,
2323 GLsizei stride)
2324 {
2325 ParamBuffer paramBuffer;
2326
2327 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
2328
2329 if (isCallValid)
2330 {
2331 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
2332 InitParamValue(ParamType::TvoidConstPointer, indirect, &indirectParam.value);
2333 CaptureMultiDrawArraysIndirect_indirect(glState, isCallValid, modePacked, indirect,
2334 drawcount, stride, &indirectParam);
2335 paramBuffer.addParam(std::move(indirectParam));
2336 }
2337 else
2338 {
2339 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
2340 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2341 &indirectParam.value);
2342 paramBuffer.addParam(std::move(indirectParam));
2343 }
2344
2345 paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
2346 paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
2347
2348 return CallCapture(angle::EntryPoint::GLMultiDrawArraysIndirect, std::move(paramBuffer));
2349 }
2350
CaptureMultiDrawElementsIndirect(const State & glState,bool isCallValid,PrimitiveMode modePacked,DrawElementsType typePacked,const void * indirect,GLsizei drawcount,GLsizei stride)2351 CallCapture CaptureMultiDrawElementsIndirect(const State &glState,
2352 bool isCallValid,
2353 PrimitiveMode modePacked,
2354 DrawElementsType typePacked,
2355 const void *indirect,
2356 GLsizei drawcount,
2357 GLsizei stride)
2358 {
2359 ParamBuffer paramBuffer;
2360
2361 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
2362 paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
2363
2364 if (isCallValid)
2365 {
2366 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
2367 InitParamValue(ParamType::TvoidConstPointer, indirect, &indirectParam.value);
2368 CaptureMultiDrawElementsIndirect_indirect(glState, isCallValid, modePacked, typePacked,
2369 indirect, drawcount, stride, &indirectParam);
2370 paramBuffer.addParam(std::move(indirectParam));
2371 }
2372 else
2373 {
2374 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
2375 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2376 &indirectParam.value);
2377 paramBuffer.addParam(std::move(indirectParam));
2378 }
2379
2380 paramBuffer.addValueParam("drawcount", ParamType::TGLsizei, drawcount);
2381 paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
2382
2383 return CallCapture(angle::EntryPoint::GLMultiDrawElementsIndirect, std::move(paramBuffer));
2384 }
2385
CaptureShaderStorageBlockBinding(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLuint storageBlockIndex,GLuint storageBlockBinding)2386 CallCapture CaptureShaderStorageBlockBinding(const State &glState,
2387 bool isCallValid,
2388 ShaderProgramID programPacked,
2389 GLuint storageBlockIndex,
2390 GLuint storageBlockBinding)
2391 {
2392 ParamBuffer paramBuffer;
2393
2394 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
2395 paramBuffer.addValueParam("storageBlockIndex", ParamType::TGLuint, storageBlockIndex);
2396 paramBuffer.addValueParam("storageBlockBinding", ParamType::TGLuint, storageBlockBinding);
2397
2398 return CallCapture(angle::EntryPoint::GLShaderStorageBlockBinding, std::move(paramBuffer));
2399 }
2400
CaptureTextureView(const State & glState,bool isCallValid,TextureID texturePacked,GLenum target,GLuint origtexture,GLenum internalformat,GLuint minlevel,GLuint numlevels,GLuint minlayer,GLuint numlayers)2401 CallCapture CaptureTextureView(const State &glState,
2402 bool isCallValid,
2403 TextureID texturePacked,
2404 GLenum target,
2405 GLuint origtexture,
2406 GLenum internalformat,
2407 GLuint minlevel,
2408 GLuint numlevels,
2409 GLuint minlayer,
2410 GLuint numlayers)
2411 {
2412 ParamBuffer paramBuffer;
2413
2414 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
2415 paramBuffer.addEnumParam("target", BigGLEnum::TextureTarget, ParamType::TGLenum, target);
2416 paramBuffer.addValueParam("origtexture", ParamType::TGLuint, origtexture);
2417 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
2418 internalformat);
2419 paramBuffer.addValueParam("minlevel", ParamType::TGLuint, minlevel);
2420 paramBuffer.addValueParam("numlevels", ParamType::TGLuint, numlevels);
2421 paramBuffer.addValueParam("minlayer", ParamType::TGLuint, minlayer);
2422 paramBuffer.addValueParam("numlayers", ParamType::TGLuint, numlayers);
2423
2424 return CallCapture(angle::EntryPoint::GLTextureView, std::move(paramBuffer));
2425 }
2426
CaptureVertexAttribLFormat(const State & glState,bool isCallValid,GLuint attribindex,GLint size,GLenum type,GLuint relativeoffset)2427 CallCapture CaptureVertexAttribLFormat(const State &glState,
2428 bool isCallValid,
2429 GLuint attribindex,
2430 GLint size,
2431 GLenum type,
2432 GLuint relativeoffset)
2433 {
2434 ParamBuffer paramBuffer;
2435
2436 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
2437 paramBuffer.addValueParam("size", ParamType::TGLint, size);
2438 paramBuffer.addEnumParam("type", BigGLEnum::VertexAttribLType, ParamType::TGLenum, type);
2439 paramBuffer.addValueParam("relativeoffset", ParamType::TGLuint, relativeoffset);
2440
2441 return CallCapture(angle::EntryPoint::GLVertexAttribLFormat, std::move(paramBuffer));
2442 }
2443
2444 // GL 4.4
CaptureBindBuffersBase(const State & glState,bool isCallValid,GLenum target,GLuint first,GLsizei count,const BufferID * buffersPacked)2445 CallCapture CaptureBindBuffersBase(const State &glState,
2446 bool isCallValid,
2447 GLenum target,
2448 GLuint first,
2449 GLsizei count,
2450 const BufferID *buffersPacked)
2451 {
2452 ParamBuffer paramBuffer;
2453
2454 paramBuffer.addEnumParam("target", BigGLEnum::BufferTargetARB, ParamType::TGLenum, target);
2455 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
2456 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
2457
2458 if (isCallValid)
2459 {
2460 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
2461 InitParamValue(ParamType::TBufferIDConstPointer, buffersPacked, &buffersPackedParam.value);
2462 CaptureBindBuffersBase_buffersPacked(glState, isCallValid, target, first, count,
2463 buffersPacked, &buffersPackedParam);
2464 paramBuffer.addParam(std::move(buffersPackedParam));
2465 }
2466 else
2467 {
2468 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
2469 InitParamValue(ParamType::TBufferIDConstPointer, static_cast<const BufferID *>(nullptr),
2470 &buffersPackedParam.value);
2471 paramBuffer.addParam(std::move(buffersPackedParam));
2472 }
2473
2474 return CallCapture(angle::EntryPoint::GLBindBuffersBase, std::move(paramBuffer));
2475 }
2476
CaptureBindBuffersRange(const State & glState,bool isCallValid,GLenum target,GLuint first,GLsizei count,const BufferID * buffersPacked,const GLintptr * offsets,const GLsizeiptr * sizes)2477 CallCapture CaptureBindBuffersRange(const State &glState,
2478 bool isCallValid,
2479 GLenum target,
2480 GLuint first,
2481 GLsizei count,
2482 const BufferID *buffersPacked,
2483 const GLintptr *offsets,
2484 const GLsizeiptr *sizes)
2485 {
2486 ParamBuffer paramBuffer;
2487
2488 paramBuffer.addEnumParam("target", BigGLEnum::BufferTargetARB, ParamType::TGLenum, target);
2489 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
2490 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
2491
2492 if (isCallValid)
2493 {
2494 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
2495 InitParamValue(ParamType::TBufferIDConstPointer, buffersPacked, &buffersPackedParam.value);
2496 CaptureBindBuffersRange_buffersPacked(glState, isCallValid, target, first, count,
2497 buffersPacked, offsets, sizes, &buffersPackedParam);
2498 paramBuffer.addParam(std::move(buffersPackedParam));
2499 }
2500 else
2501 {
2502 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
2503 InitParamValue(ParamType::TBufferIDConstPointer, static_cast<const BufferID *>(nullptr),
2504 &buffersPackedParam.value);
2505 paramBuffer.addParam(std::move(buffersPackedParam));
2506 }
2507
2508 if (isCallValid)
2509 {
2510 ParamCapture offsetsParam("offsets", ParamType::TGLintptrConstPointer);
2511 InitParamValue(ParamType::TGLintptrConstPointer, offsets, &offsetsParam.value);
2512 CaptureBindBuffersRange_offsets(glState, isCallValid, target, first, count, buffersPacked,
2513 offsets, sizes, &offsetsParam);
2514 paramBuffer.addParam(std::move(offsetsParam));
2515 }
2516 else
2517 {
2518 ParamCapture offsetsParam("offsets", ParamType::TGLintptrConstPointer);
2519 InitParamValue(ParamType::TGLintptrConstPointer, static_cast<const GLintptr *>(nullptr),
2520 &offsetsParam.value);
2521 paramBuffer.addParam(std::move(offsetsParam));
2522 }
2523
2524 if (isCallValid)
2525 {
2526 ParamCapture sizesParam("sizes", ParamType::TGLsizeiptrConstPointer);
2527 InitParamValue(ParamType::TGLsizeiptrConstPointer, sizes, &sizesParam.value);
2528 CaptureBindBuffersRange_sizes(glState, isCallValid, target, first, count, buffersPacked,
2529 offsets, sizes, &sizesParam);
2530 paramBuffer.addParam(std::move(sizesParam));
2531 }
2532 else
2533 {
2534 ParamCapture sizesParam("sizes", ParamType::TGLsizeiptrConstPointer);
2535 InitParamValue(ParamType::TGLsizeiptrConstPointer, static_cast<const GLsizeiptr *>(nullptr),
2536 &sizesParam.value);
2537 paramBuffer.addParam(std::move(sizesParam));
2538 }
2539
2540 return CallCapture(angle::EntryPoint::GLBindBuffersRange, std::move(paramBuffer));
2541 }
2542
CaptureBindImageTextures(const State & glState,bool isCallValid,GLuint first,GLsizei count,const GLuint * textures)2543 CallCapture CaptureBindImageTextures(const State &glState,
2544 bool isCallValid,
2545 GLuint first,
2546 GLsizei count,
2547 const GLuint *textures)
2548 {
2549 ParamBuffer paramBuffer;
2550
2551 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
2552 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
2553
2554 if (isCallValid)
2555 {
2556 ParamCapture texturesParam("textures", ParamType::TGLuintConstPointer);
2557 InitParamValue(ParamType::TGLuintConstPointer, textures, &texturesParam.value);
2558 CaptureBindImageTextures_textures(glState, isCallValid, first, count, textures,
2559 &texturesParam);
2560 paramBuffer.addParam(std::move(texturesParam));
2561 }
2562 else
2563 {
2564 ParamCapture texturesParam("textures", ParamType::TGLuintConstPointer);
2565 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
2566 &texturesParam.value);
2567 paramBuffer.addParam(std::move(texturesParam));
2568 }
2569
2570 return CallCapture(angle::EntryPoint::GLBindImageTextures, std::move(paramBuffer));
2571 }
2572
CaptureBindSamplers(const State & glState,bool isCallValid,GLuint first,GLsizei count,const GLuint * samplers)2573 CallCapture CaptureBindSamplers(const State &glState,
2574 bool isCallValid,
2575 GLuint first,
2576 GLsizei count,
2577 const GLuint *samplers)
2578 {
2579 ParamBuffer paramBuffer;
2580
2581 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
2582 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
2583
2584 if (isCallValid)
2585 {
2586 ParamCapture samplersParam("samplers", ParamType::TGLuintConstPointer);
2587 InitParamValue(ParamType::TGLuintConstPointer, samplers, &samplersParam.value);
2588 CaptureBindSamplers_samplers(glState, isCallValid, first, count, samplers, &samplersParam);
2589 paramBuffer.addParam(std::move(samplersParam));
2590 }
2591 else
2592 {
2593 ParamCapture samplersParam("samplers", ParamType::TGLuintConstPointer);
2594 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
2595 &samplersParam.value);
2596 paramBuffer.addParam(std::move(samplersParam));
2597 }
2598
2599 return CallCapture(angle::EntryPoint::GLBindSamplers, std::move(paramBuffer));
2600 }
2601
CaptureBindTextures(const State & glState,bool isCallValid,GLuint first,GLsizei count,const GLuint * textures)2602 CallCapture CaptureBindTextures(const State &glState,
2603 bool isCallValid,
2604 GLuint first,
2605 GLsizei count,
2606 const GLuint *textures)
2607 {
2608 ParamBuffer paramBuffer;
2609
2610 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
2611 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
2612
2613 if (isCallValid)
2614 {
2615 ParamCapture texturesParam("textures", ParamType::TGLuintConstPointer);
2616 InitParamValue(ParamType::TGLuintConstPointer, textures, &texturesParam.value);
2617 CaptureBindTextures_textures(glState, isCallValid, first, count, textures, &texturesParam);
2618 paramBuffer.addParam(std::move(texturesParam));
2619 }
2620 else
2621 {
2622 ParamCapture texturesParam("textures", ParamType::TGLuintConstPointer);
2623 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
2624 &texturesParam.value);
2625 paramBuffer.addParam(std::move(texturesParam));
2626 }
2627
2628 return CallCapture(angle::EntryPoint::GLBindTextures, std::move(paramBuffer));
2629 }
2630
CaptureBindVertexBuffers(const State & glState,bool isCallValid,GLuint first,GLsizei count,const BufferID * buffersPacked,const GLintptr * offsets,const GLsizei * strides)2631 CallCapture CaptureBindVertexBuffers(const State &glState,
2632 bool isCallValid,
2633 GLuint first,
2634 GLsizei count,
2635 const BufferID *buffersPacked,
2636 const GLintptr *offsets,
2637 const GLsizei *strides)
2638 {
2639 ParamBuffer paramBuffer;
2640
2641 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
2642 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
2643
2644 if (isCallValid)
2645 {
2646 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
2647 InitParamValue(ParamType::TBufferIDConstPointer, buffersPacked, &buffersPackedParam.value);
2648 CaptureBindVertexBuffers_buffersPacked(glState, isCallValid, first, count, buffersPacked,
2649 offsets, strides, &buffersPackedParam);
2650 paramBuffer.addParam(std::move(buffersPackedParam));
2651 }
2652 else
2653 {
2654 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
2655 InitParamValue(ParamType::TBufferIDConstPointer, static_cast<const BufferID *>(nullptr),
2656 &buffersPackedParam.value);
2657 paramBuffer.addParam(std::move(buffersPackedParam));
2658 }
2659
2660 if (isCallValid)
2661 {
2662 ParamCapture offsetsParam("offsets", ParamType::TGLintptrConstPointer);
2663 InitParamValue(ParamType::TGLintptrConstPointer, offsets, &offsetsParam.value);
2664 CaptureBindVertexBuffers_offsets(glState, isCallValid, first, count, buffersPacked, offsets,
2665 strides, &offsetsParam);
2666 paramBuffer.addParam(std::move(offsetsParam));
2667 }
2668 else
2669 {
2670 ParamCapture offsetsParam("offsets", ParamType::TGLintptrConstPointer);
2671 InitParamValue(ParamType::TGLintptrConstPointer, static_cast<const GLintptr *>(nullptr),
2672 &offsetsParam.value);
2673 paramBuffer.addParam(std::move(offsetsParam));
2674 }
2675
2676 if (isCallValid)
2677 {
2678 ParamCapture stridesParam("strides", ParamType::TGLsizeiConstPointer);
2679 InitParamValue(ParamType::TGLsizeiConstPointer, strides, &stridesParam.value);
2680 CaptureBindVertexBuffers_strides(glState, isCallValid, first, count, buffersPacked, offsets,
2681 strides, &stridesParam);
2682 paramBuffer.addParam(std::move(stridesParam));
2683 }
2684 else
2685 {
2686 ParamCapture stridesParam("strides", ParamType::TGLsizeiConstPointer);
2687 InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
2688 &stridesParam.value);
2689 paramBuffer.addParam(std::move(stridesParam));
2690 }
2691
2692 return CallCapture(angle::EntryPoint::GLBindVertexBuffers, std::move(paramBuffer));
2693 }
2694
CaptureBufferStorage(const State & glState,bool isCallValid,BufferBinding targetPacked,GLsizeiptr size,const void * data,GLbitfield flags)2695 CallCapture CaptureBufferStorage(const State &glState,
2696 bool isCallValid,
2697 BufferBinding targetPacked,
2698 GLsizeiptr size,
2699 const void *data,
2700 GLbitfield flags)
2701 {
2702 ParamBuffer paramBuffer;
2703
2704 paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
2705 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
2706
2707 if (isCallValid)
2708 {
2709 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2710 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
2711 CaptureBufferStorage_data(glState, isCallValid, targetPacked, size, data, flags,
2712 &dataParam);
2713 paramBuffer.addParam(std::move(dataParam));
2714 }
2715 else
2716 {
2717 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2718 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2719 &dataParam.value);
2720 paramBuffer.addParam(std::move(dataParam));
2721 }
2722
2723 paramBuffer.addEnumParam("flags", BigGLEnum::BufferStorageMask, ParamType::TGLbitfield, flags);
2724
2725 return CallCapture(angle::EntryPoint::GLBufferStorage, std::move(paramBuffer));
2726 }
2727
CaptureClearTexImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLenum format,GLenum type,const void * data)2728 CallCapture CaptureClearTexImage(const State &glState,
2729 bool isCallValid,
2730 TextureID texturePacked,
2731 GLint level,
2732 GLenum format,
2733 GLenum type,
2734 const void *data)
2735 {
2736 ParamBuffer paramBuffer;
2737
2738 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
2739 paramBuffer.addValueParam("level", ParamType::TGLint, level);
2740 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
2741 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
2742
2743 if (isCallValid)
2744 {
2745 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2746 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
2747 CaptureClearTexImage_data(glState, isCallValid, texturePacked, level, format, type, data,
2748 &dataParam);
2749 paramBuffer.addParam(std::move(dataParam));
2750 }
2751 else
2752 {
2753 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2754 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2755 &dataParam.value);
2756 paramBuffer.addParam(std::move(dataParam));
2757 }
2758
2759 return CallCapture(angle::EntryPoint::GLClearTexImage, std::move(paramBuffer));
2760 }
2761
CaptureClearTexSubImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const void * data)2762 CallCapture CaptureClearTexSubImage(const State &glState,
2763 bool isCallValid,
2764 TextureID texturePacked,
2765 GLint level,
2766 GLint xoffset,
2767 GLint yoffset,
2768 GLint zoffset,
2769 GLsizei width,
2770 GLsizei height,
2771 GLsizei depth,
2772 GLenum format,
2773 GLenum type,
2774 const void *data)
2775 {
2776 ParamBuffer paramBuffer;
2777
2778 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
2779 paramBuffer.addValueParam("level", ParamType::TGLint, level);
2780 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
2781 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
2782 paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
2783 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
2784 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
2785 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
2786 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
2787 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
2788
2789 if (isCallValid)
2790 {
2791 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2792 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
2793 CaptureClearTexSubImage_data(glState, isCallValid, texturePacked, level, xoffset, yoffset,
2794 zoffset, width, height, depth, format, type, data, &dataParam);
2795 paramBuffer.addParam(std::move(dataParam));
2796 }
2797 else
2798 {
2799 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2800 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2801 &dataParam.value);
2802 paramBuffer.addParam(std::move(dataParam));
2803 }
2804
2805 return CallCapture(angle::EntryPoint::GLClearTexSubImage, std::move(paramBuffer));
2806 }
2807
2808 // GL 4.5
CaptureBindTextureUnit(const State & glState,bool isCallValid,GLuint unit,TextureID texturePacked)2809 CallCapture CaptureBindTextureUnit(const State &glState,
2810 bool isCallValid,
2811 GLuint unit,
2812 TextureID texturePacked)
2813 {
2814 ParamBuffer paramBuffer;
2815
2816 paramBuffer.addValueParam("unit", ParamType::TGLuint, unit);
2817 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
2818
2819 return CallCapture(angle::EntryPoint::GLBindTextureUnit, std::move(paramBuffer));
2820 }
2821
CaptureBlitNamedFramebuffer(const State & glState,bool isCallValid,GLuint readFramebuffer,GLuint drawFramebuffer,GLint srcX0,GLint srcY0,GLint srcX1,GLint srcY1,GLint dstX0,GLint dstY0,GLint dstX1,GLint dstY1,GLbitfield mask,GLenum filter)2822 CallCapture CaptureBlitNamedFramebuffer(const State &glState,
2823 bool isCallValid,
2824 GLuint readFramebuffer,
2825 GLuint drawFramebuffer,
2826 GLint srcX0,
2827 GLint srcY0,
2828 GLint srcX1,
2829 GLint srcY1,
2830 GLint dstX0,
2831 GLint dstY0,
2832 GLint dstX1,
2833 GLint dstY1,
2834 GLbitfield mask,
2835 GLenum filter)
2836 {
2837 ParamBuffer paramBuffer;
2838
2839 paramBuffer.addValueParam("readFramebuffer", ParamType::TGLuint, readFramebuffer);
2840 paramBuffer.addValueParam("drawFramebuffer", ParamType::TGLuint, drawFramebuffer);
2841 paramBuffer.addValueParam("srcX0", ParamType::TGLint, srcX0);
2842 paramBuffer.addValueParam("srcY0", ParamType::TGLint, srcY0);
2843 paramBuffer.addValueParam("srcX1", ParamType::TGLint, srcX1);
2844 paramBuffer.addValueParam("srcY1", ParamType::TGLint, srcY1);
2845 paramBuffer.addValueParam("dstX0", ParamType::TGLint, dstX0);
2846 paramBuffer.addValueParam("dstY0", ParamType::TGLint, dstY0);
2847 paramBuffer.addValueParam("dstX1", ParamType::TGLint, dstX1);
2848 paramBuffer.addValueParam("dstY1", ParamType::TGLint, dstY1);
2849 paramBuffer.addEnumParam("mask", BigGLEnum::ClearBufferMask, ParamType::TGLbitfield, mask);
2850 paramBuffer.addEnumParam("filter", BigGLEnum::BlitFramebufferFilter, ParamType::TGLenum,
2851 filter);
2852
2853 return CallCapture(angle::EntryPoint::GLBlitNamedFramebuffer, std::move(paramBuffer));
2854 }
2855
CaptureCheckNamedFramebufferStatus(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum target,GLenum returnValue)2856 CallCapture CaptureCheckNamedFramebufferStatus(const State &glState,
2857 bool isCallValid,
2858 FramebufferID framebufferPacked,
2859 GLenum target,
2860 GLenum returnValue)
2861 {
2862 ParamBuffer paramBuffer;
2863
2864 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
2865 paramBuffer.addEnumParam("target", BigGLEnum::FramebufferTarget, ParamType::TGLenum, target);
2866
2867 ParamCapture returnValueCapture("returnValue", ParamType::TGLenum);
2868 InitParamValue(ParamType::TGLenum, returnValue, &returnValueCapture.value);
2869 paramBuffer.addReturnValue(std::move(returnValueCapture));
2870
2871 return CallCapture(angle::EntryPoint::GLCheckNamedFramebufferStatus, std::move(paramBuffer));
2872 }
2873
CaptureClearNamedBufferData(const State & glState,bool isCallValid,BufferID bufferPacked,GLenum internalformat,GLenum format,GLenum type,const void * data)2874 CallCapture CaptureClearNamedBufferData(const State &glState,
2875 bool isCallValid,
2876 BufferID bufferPacked,
2877 GLenum internalformat,
2878 GLenum format,
2879 GLenum type,
2880 const void *data)
2881 {
2882 ParamBuffer paramBuffer;
2883
2884 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
2885 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
2886 internalformat);
2887 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
2888 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
2889
2890 if (isCallValid)
2891 {
2892 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2893 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
2894 CaptureClearNamedBufferData_data(glState, isCallValid, bufferPacked, internalformat, format,
2895 type, data, &dataParam);
2896 paramBuffer.addParam(std::move(dataParam));
2897 }
2898 else
2899 {
2900 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2901 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2902 &dataParam.value);
2903 paramBuffer.addParam(std::move(dataParam));
2904 }
2905
2906 return CallCapture(angle::EntryPoint::GLClearNamedBufferData, std::move(paramBuffer));
2907 }
2908
CaptureClearNamedBufferSubData(const State & glState,bool isCallValid,BufferID bufferPacked,GLenum internalformat,GLintptr offset,GLsizeiptr size,GLenum format,GLenum type,const void * data)2909 CallCapture CaptureClearNamedBufferSubData(const State &glState,
2910 bool isCallValid,
2911 BufferID bufferPacked,
2912 GLenum internalformat,
2913 GLintptr offset,
2914 GLsizeiptr size,
2915 GLenum format,
2916 GLenum type,
2917 const void *data)
2918 {
2919 ParamBuffer paramBuffer;
2920
2921 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
2922 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
2923 internalformat);
2924 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
2925 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
2926 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
2927 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
2928
2929 if (isCallValid)
2930 {
2931 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2932 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
2933 CaptureClearNamedBufferSubData_data(glState, isCallValid, bufferPacked, internalformat,
2934 offset, size, format, type, data, &dataParam);
2935 paramBuffer.addParam(std::move(dataParam));
2936 }
2937 else
2938 {
2939 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
2940 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
2941 &dataParam.value);
2942 paramBuffer.addParam(std::move(dataParam));
2943 }
2944
2945 return CallCapture(angle::EntryPoint::GLClearNamedBufferSubData, std::move(paramBuffer));
2946 }
2947
CaptureClearNamedFramebufferfi(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum buffer,GLint drawbuffer,GLfloat depth,GLint stencil)2948 CallCapture CaptureClearNamedFramebufferfi(const State &glState,
2949 bool isCallValid,
2950 FramebufferID framebufferPacked,
2951 GLenum buffer,
2952 GLint drawbuffer,
2953 GLfloat depth,
2954 GLint stencil)
2955 {
2956 ParamBuffer paramBuffer;
2957
2958 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
2959 paramBuffer.addEnumParam("buffer", BigGLEnum::Buffer, ParamType::TGLenum, buffer);
2960 paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
2961 paramBuffer.addValueParam("depth", ParamType::TGLfloat, depth);
2962 paramBuffer.addValueParam("stencil", ParamType::TGLint, stencil);
2963
2964 return CallCapture(angle::EntryPoint::GLClearNamedFramebufferfi, std::move(paramBuffer));
2965 }
2966
CaptureClearNamedFramebufferfv(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum buffer,GLint drawbuffer,const GLfloat * value)2967 CallCapture CaptureClearNamedFramebufferfv(const State &glState,
2968 bool isCallValid,
2969 FramebufferID framebufferPacked,
2970 GLenum buffer,
2971 GLint drawbuffer,
2972 const GLfloat *value)
2973 {
2974 ParamBuffer paramBuffer;
2975
2976 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
2977 paramBuffer.addEnumParam("buffer", BigGLEnum::Buffer, ParamType::TGLenum, buffer);
2978 paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
2979
2980 if (isCallValid)
2981 {
2982 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
2983 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
2984 CaptureClearNamedFramebufferfv_value(glState, isCallValid, framebufferPacked, buffer,
2985 drawbuffer, value, &valueParam);
2986 paramBuffer.addParam(std::move(valueParam));
2987 }
2988 else
2989 {
2990 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
2991 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
2992 &valueParam.value);
2993 paramBuffer.addParam(std::move(valueParam));
2994 }
2995
2996 return CallCapture(angle::EntryPoint::GLClearNamedFramebufferfv, std::move(paramBuffer));
2997 }
2998
CaptureClearNamedFramebufferiv(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum buffer,GLint drawbuffer,const GLint * value)2999 CallCapture CaptureClearNamedFramebufferiv(const State &glState,
3000 bool isCallValid,
3001 FramebufferID framebufferPacked,
3002 GLenum buffer,
3003 GLint drawbuffer,
3004 const GLint *value)
3005 {
3006 ParamBuffer paramBuffer;
3007
3008 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
3009 paramBuffer.addEnumParam("buffer", BigGLEnum::Buffer, ParamType::TGLenum, buffer);
3010 paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
3011
3012 if (isCallValid)
3013 {
3014 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
3015 InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
3016 CaptureClearNamedFramebufferiv_value(glState, isCallValid, framebufferPacked, buffer,
3017 drawbuffer, value, &valueParam);
3018 paramBuffer.addParam(std::move(valueParam));
3019 }
3020 else
3021 {
3022 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
3023 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
3024 &valueParam.value);
3025 paramBuffer.addParam(std::move(valueParam));
3026 }
3027
3028 return CallCapture(angle::EntryPoint::GLClearNamedFramebufferiv, std::move(paramBuffer));
3029 }
3030
CaptureClearNamedFramebufferuiv(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum buffer,GLint drawbuffer,const GLuint * value)3031 CallCapture CaptureClearNamedFramebufferuiv(const State &glState,
3032 bool isCallValid,
3033 FramebufferID framebufferPacked,
3034 GLenum buffer,
3035 GLint drawbuffer,
3036 const GLuint *value)
3037 {
3038 ParamBuffer paramBuffer;
3039
3040 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
3041 paramBuffer.addEnumParam("buffer", BigGLEnum::Buffer, ParamType::TGLenum, buffer);
3042 paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
3043
3044 if (isCallValid)
3045 {
3046 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
3047 InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
3048 CaptureClearNamedFramebufferuiv_value(glState, isCallValid, framebufferPacked, buffer,
3049 drawbuffer, value, &valueParam);
3050 paramBuffer.addParam(std::move(valueParam));
3051 }
3052 else
3053 {
3054 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
3055 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
3056 &valueParam.value);
3057 paramBuffer.addParam(std::move(valueParam));
3058 }
3059
3060 return CallCapture(angle::EntryPoint::GLClearNamedFramebufferuiv, std::move(paramBuffer));
3061 }
3062
CaptureClipControl(const State & glState,bool isCallValid,ClipOrigin originPacked,ClipDepthMode depthPacked)3063 CallCapture CaptureClipControl(const State &glState,
3064 bool isCallValid,
3065 ClipOrigin originPacked,
3066 ClipDepthMode depthPacked)
3067 {
3068 ParamBuffer paramBuffer;
3069
3070 paramBuffer.addValueParam("originPacked", ParamType::TClipOrigin, originPacked);
3071 paramBuffer.addValueParam("depthPacked", ParamType::TClipDepthMode, depthPacked);
3072
3073 return CallCapture(angle::EntryPoint::GLClipControl, std::move(paramBuffer));
3074 }
3075
CaptureCompressedTextureSubImage1D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLsizei width,GLenum format,GLsizei imageSize,const void * data)3076 CallCapture CaptureCompressedTextureSubImage1D(const State &glState,
3077 bool isCallValid,
3078 TextureID texturePacked,
3079 GLint level,
3080 GLint xoffset,
3081 GLsizei width,
3082 GLenum format,
3083 GLsizei imageSize,
3084 const void *data)
3085 {
3086 ParamBuffer paramBuffer;
3087
3088 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3089 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3090 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
3091 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3092 paramBuffer.addEnumParam("format", BigGLEnum::InternalFormat, ParamType::TGLenum, format);
3093 paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
3094
3095 if (isCallValid)
3096 {
3097 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
3098 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
3099 CaptureCompressedTextureSubImage1D_data(glState, isCallValid, texturePacked, level, xoffset,
3100 width, format, imageSize, data, &dataParam);
3101 paramBuffer.addParam(std::move(dataParam));
3102 }
3103 else
3104 {
3105 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
3106 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
3107 &dataParam.value);
3108 paramBuffer.addParam(std::move(dataParam));
3109 }
3110
3111 return CallCapture(angle::EntryPoint::GLCompressedTextureSubImage1D, std::move(paramBuffer));
3112 }
3113
CaptureCompressedTextureSubImage2D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLsizei imageSize,const void * data)3114 CallCapture CaptureCompressedTextureSubImage2D(const State &glState,
3115 bool isCallValid,
3116 TextureID texturePacked,
3117 GLint level,
3118 GLint xoffset,
3119 GLint yoffset,
3120 GLsizei width,
3121 GLsizei height,
3122 GLenum format,
3123 GLsizei imageSize,
3124 const void *data)
3125 {
3126 ParamBuffer paramBuffer;
3127
3128 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3129 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3130 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
3131 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
3132 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3133 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
3134 paramBuffer.addEnumParam("format", BigGLEnum::InternalFormat, ParamType::TGLenum, format);
3135 paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
3136
3137 if (isCallValid)
3138 {
3139 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
3140 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
3141 CaptureCompressedTextureSubImage2D_data(glState, isCallValid, texturePacked, level, xoffset,
3142 yoffset, width, height, format, imageSize, data,
3143 &dataParam);
3144 paramBuffer.addParam(std::move(dataParam));
3145 }
3146 else
3147 {
3148 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
3149 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
3150 &dataParam.value);
3151 paramBuffer.addParam(std::move(dataParam));
3152 }
3153
3154 return CallCapture(angle::EntryPoint::GLCompressedTextureSubImage2D, std::move(paramBuffer));
3155 }
3156
CaptureCompressedTextureSubImage3D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,const void * data)3157 CallCapture CaptureCompressedTextureSubImage3D(const State &glState,
3158 bool isCallValid,
3159 TextureID texturePacked,
3160 GLint level,
3161 GLint xoffset,
3162 GLint yoffset,
3163 GLint zoffset,
3164 GLsizei width,
3165 GLsizei height,
3166 GLsizei depth,
3167 GLenum format,
3168 GLsizei imageSize,
3169 const void *data)
3170 {
3171 ParamBuffer paramBuffer;
3172
3173 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3174 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3175 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
3176 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
3177 paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
3178 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3179 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
3180 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
3181 paramBuffer.addEnumParam("format", BigGLEnum::InternalFormat, ParamType::TGLenum, format);
3182 paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);
3183
3184 if (isCallValid)
3185 {
3186 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
3187 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
3188 CaptureCompressedTextureSubImage3D_data(glState, isCallValid, texturePacked, level, xoffset,
3189 yoffset, zoffset, width, height, depth, format,
3190 imageSize, data, &dataParam);
3191 paramBuffer.addParam(std::move(dataParam));
3192 }
3193 else
3194 {
3195 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
3196 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
3197 &dataParam.value);
3198 paramBuffer.addParam(std::move(dataParam));
3199 }
3200
3201 return CallCapture(angle::EntryPoint::GLCompressedTextureSubImage3D, std::move(paramBuffer));
3202 }
3203
CaptureCopyNamedBufferSubData(const State & glState,bool isCallValid,GLuint readBuffer,GLuint writeBuffer,GLintptr readOffset,GLintptr writeOffset,GLsizeiptr size)3204 CallCapture CaptureCopyNamedBufferSubData(const State &glState,
3205 bool isCallValid,
3206 GLuint readBuffer,
3207 GLuint writeBuffer,
3208 GLintptr readOffset,
3209 GLintptr writeOffset,
3210 GLsizeiptr size)
3211 {
3212 ParamBuffer paramBuffer;
3213
3214 paramBuffer.addValueParam("readBuffer", ParamType::TGLuint, readBuffer);
3215 paramBuffer.addValueParam("writeBuffer", ParamType::TGLuint, writeBuffer);
3216 paramBuffer.addValueParam("readOffset", ParamType::TGLintptr, readOffset);
3217 paramBuffer.addValueParam("writeOffset", ParamType::TGLintptr, writeOffset);
3218 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
3219
3220 return CallCapture(angle::EntryPoint::GLCopyNamedBufferSubData, std::move(paramBuffer));
3221 }
3222
CaptureCopyTextureSubImage1D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint x,GLint y,GLsizei width)3223 CallCapture CaptureCopyTextureSubImage1D(const State &glState,
3224 bool isCallValid,
3225 TextureID texturePacked,
3226 GLint level,
3227 GLint xoffset,
3228 GLint x,
3229 GLint y,
3230 GLsizei width)
3231 {
3232 ParamBuffer paramBuffer;
3233
3234 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3235 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3236 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
3237 paramBuffer.addValueParam("x", ParamType::TGLint, x);
3238 paramBuffer.addValueParam("y", ParamType::TGLint, y);
3239 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3240
3241 return CallCapture(angle::EntryPoint::GLCopyTextureSubImage1D, std::move(paramBuffer));
3242 }
3243
CaptureCopyTextureSubImage2D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint x,GLint y,GLsizei width,GLsizei height)3244 CallCapture CaptureCopyTextureSubImage2D(const State &glState,
3245 bool isCallValid,
3246 TextureID texturePacked,
3247 GLint level,
3248 GLint xoffset,
3249 GLint yoffset,
3250 GLint x,
3251 GLint y,
3252 GLsizei width,
3253 GLsizei height)
3254 {
3255 ParamBuffer paramBuffer;
3256
3257 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3258 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3259 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
3260 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
3261 paramBuffer.addValueParam("x", ParamType::TGLint, x);
3262 paramBuffer.addValueParam("y", ParamType::TGLint, y);
3263 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3264 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
3265
3266 return CallCapture(angle::EntryPoint::GLCopyTextureSubImage2D, std::move(paramBuffer));
3267 }
3268
CaptureCopyTextureSubImage3D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLsizei width,GLsizei height)3269 CallCapture CaptureCopyTextureSubImage3D(const State &glState,
3270 bool isCallValid,
3271 TextureID texturePacked,
3272 GLint level,
3273 GLint xoffset,
3274 GLint yoffset,
3275 GLint zoffset,
3276 GLint x,
3277 GLint y,
3278 GLsizei width,
3279 GLsizei height)
3280 {
3281 ParamBuffer paramBuffer;
3282
3283 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3284 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3285 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
3286 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
3287 paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
3288 paramBuffer.addValueParam("x", ParamType::TGLint, x);
3289 paramBuffer.addValueParam("y", ParamType::TGLint, y);
3290 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3291 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
3292
3293 return CallCapture(angle::EntryPoint::GLCopyTextureSubImage3D, std::move(paramBuffer));
3294 }
3295
CaptureCreateBuffers(const State & glState,bool isCallValid,GLsizei n,BufferID * buffersPacked)3296 CallCapture CaptureCreateBuffers(const State &glState,
3297 bool isCallValid,
3298 GLsizei n,
3299 BufferID *buffersPacked)
3300 {
3301 ParamBuffer paramBuffer;
3302
3303 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3304
3305 if (isCallValid)
3306 {
3307 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDPointer);
3308 InitParamValue(ParamType::TBufferIDPointer, buffersPacked, &buffersPackedParam.value);
3309 CaptureCreateBuffers_buffersPacked(glState, isCallValid, n, buffersPacked,
3310 &buffersPackedParam);
3311 paramBuffer.addParam(std::move(buffersPackedParam));
3312 }
3313 else
3314 {
3315 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDPointer);
3316 InitParamValue(ParamType::TBufferIDPointer, static_cast<BufferID *>(nullptr),
3317 &buffersPackedParam.value);
3318 paramBuffer.addParam(std::move(buffersPackedParam));
3319 }
3320
3321 return CallCapture(angle::EntryPoint::GLCreateBuffers, std::move(paramBuffer));
3322 }
3323
CaptureCreateFramebuffers(const State & glState,bool isCallValid,GLsizei n,GLuint * framebuffers)3324 CallCapture CaptureCreateFramebuffers(const State &glState,
3325 bool isCallValid,
3326 GLsizei n,
3327 GLuint *framebuffers)
3328 {
3329 ParamBuffer paramBuffer;
3330
3331 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3332
3333 if (isCallValid)
3334 {
3335 ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintPointer);
3336 InitParamValue(ParamType::TGLuintPointer, framebuffers, &framebuffersParam.value);
3337 CaptureCreateFramebuffers_framebuffers(glState, isCallValid, n, framebuffers,
3338 &framebuffersParam);
3339 paramBuffer.addParam(std::move(framebuffersParam));
3340 }
3341 else
3342 {
3343 ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintPointer);
3344 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
3345 &framebuffersParam.value);
3346 paramBuffer.addParam(std::move(framebuffersParam));
3347 }
3348
3349 return CallCapture(angle::EntryPoint::GLCreateFramebuffers, std::move(paramBuffer));
3350 }
3351
CaptureCreateProgramPipelines(const State & glState,bool isCallValid,GLsizei n,GLuint * pipelines)3352 CallCapture CaptureCreateProgramPipelines(const State &glState,
3353 bool isCallValid,
3354 GLsizei n,
3355 GLuint *pipelines)
3356 {
3357 ParamBuffer paramBuffer;
3358
3359 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3360
3361 if (isCallValid)
3362 {
3363 ParamCapture pipelinesParam("pipelines", ParamType::TGLuintPointer);
3364 InitParamValue(ParamType::TGLuintPointer, pipelines, &pipelinesParam.value);
3365 CaptureCreateProgramPipelines_pipelines(glState, isCallValid, n, pipelines,
3366 &pipelinesParam);
3367 paramBuffer.addParam(std::move(pipelinesParam));
3368 }
3369 else
3370 {
3371 ParamCapture pipelinesParam("pipelines", ParamType::TGLuintPointer);
3372 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
3373 &pipelinesParam.value);
3374 paramBuffer.addParam(std::move(pipelinesParam));
3375 }
3376
3377 return CallCapture(angle::EntryPoint::GLCreateProgramPipelines, std::move(paramBuffer));
3378 }
3379
CaptureCreateQueries(const State & glState,bool isCallValid,GLenum target,GLsizei n,GLuint * ids)3380 CallCapture CaptureCreateQueries(const State &glState,
3381 bool isCallValid,
3382 GLenum target,
3383 GLsizei n,
3384 GLuint *ids)
3385 {
3386 ParamBuffer paramBuffer;
3387
3388 paramBuffer.addEnumParam("target", BigGLEnum::QueryTarget, ParamType::TGLenum, target);
3389 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3390
3391 if (isCallValid)
3392 {
3393 ParamCapture idsParam("ids", ParamType::TGLuintPointer);
3394 InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
3395 CaptureCreateQueries_ids(glState, isCallValid, target, n, ids, &idsParam);
3396 paramBuffer.addParam(std::move(idsParam));
3397 }
3398 else
3399 {
3400 ParamCapture idsParam("ids", ParamType::TGLuintPointer);
3401 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr), &idsParam.value);
3402 paramBuffer.addParam(std::move(idsParam));
3403 }
3404
3405 return CallCapture(angle::EntryPoint::GLCreateQueries, std::move(paramBuffer));
3406 }
3407
CaptureCreateRenderbuffers(const State & glState,bool isCallValid,GLsizei n,RenderbufferID * renderbuffersPacked)3408 CallCapture CaptureCreateRenderbuffers(const State &glState,
3409 bool isCallValid,
3410 GLsizei n,
3411 RenderbufferID *renderbuffersPacked)
3412 {
3413 ParamBuffer paramBuffer;
3414
3415 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3416
3417 if (isCallValid)
3418 {
3419 ParamCapture renderbuffersPackedParam("renderbuffersPacked",
3420 ParamType::TRenderbufferIDPointer);
3421 InitParamValue(ParamType::TRenderbufferIDPointer, renderbuffersPacked,
3422 &renderbuffersPackedParam.value);
3423 CaptureCreateRenderbuffers_renderbuffersPacked(glState, isCallValid, n, renderbuffersPacked,
3424 &renderbuffersPackedParam);
3425 paramBuffer.addParam(std::move(renderbuffersPackedParam));
3426 }
3427 else
3428 {
3429 ParamCapture renderbuffersPackedParam("renderbuffersPacked",
3430 ParamType::TRenderbufferIDPointer);
3431 InitParamValue(ParamType::TRenderbufferIDPointer, static_cast<RenderbufferID *>(nullptr),
3432 &renderbuffersPackedParam.value);
3433 paramBuffer.addParam(std::move(renderbuffersPackedParam));
3434 }
3435
3436 return CallCapture(angle::EntryPoint::GLCreateRenderbuffers, std::move(paramBuffer));
3437 }
3438
CaptureCreateSamplers(const State & glState,bool isCallValid,GLsizei n,GLuint * samplers)3439 CallCapture CaptureCreateSamplers(const State &glState,
3440 bool isCallValid,
3441 GLsizei n,
3442 GLuint *samplers)
3443 {
3444 ParamBuffer paramBuffer;
3445
3446 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3447
3448 if (isCallValid)
3449 {
3450 ParamCapture samplersParam("samplers", ParamType::TGLuintPointer);
3451 InitParamValue(ParamType::TGLuintPointer, samplers, &samplersParam.value);
3452 CaptureCreateSamplers_samplers(glState, isCallValid, n, samplers, &samplersParam);
3453 paramBuffer.addParam(std::move(samplersParam));
3454 }
3455 else
3456 {
3457 ParamCapture samplersParam("samplers", ParamType::TGLuintPointer);
3458 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
3459 &samplersParam.value);
3460 paramBuffer.addParam(std::move(samplersParam));
3461 }
3462
3463 return CallCapture(angle::EntryPoint::GLCreateSamplers, std::move(paramBuffer));
3464 }
3465
CaptureCreateTextures(const State & glState,bool isCallValid,GLenum target,GLsizei n,GLuint * textures)3466 CallCapture CaptureCreateTextures(const State &glState,
3467 bool isCallValid,
3468 GLenum target,
3469 GLsizei n,
3470 GLuint *textures)
3471 {
3472 ParamBuffer paramBuffer;
3473
3474 paramBuffer.addEnumParam("target", BigGLEnum::TextureTarget, ParamType::TGLenum, target);
3475 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3476
3477 if (isCallValid)
3478 {
3479 ParamCapture texturesParam("textures", ParamType::TGLuintPointer);
3480 InitParamValue(ParamType::TGLuintPointer, textures, &texturesParam.value);
3481 CaptureCreateTextures_textures(glState, isCallValid, target, n, textures, &texturesParam);
3482 paramBuffer.addParam(std::move(texturesParam));
3483 }
3484 else
3485 {
3486 ParamCapture texturesParam("textures", ParamType::TGLuintPointer);
3487 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
3488 &texturesParam.value);
3489 paramBuffer.addParam(std::move(texturesParam));
3490 }
3491
3492 return CallCapture(angle::EntryPoint::GLCreateTextures, std::move(paramBuffer));
3493 }
3494
CaptureCreateTransformFeedbacks(const State & glState,bool isCallValid,GLsizei n,GLuint * ids)3495 CallCapture CaptureCreateTransformFeedbacks(const State &glState,
3496 bool isCallValid,
3497 GLsizei n,
3498 GLuint *ids)
3499 {
3500 ParamBuffer paramBuffer;
3501
3502 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3503
3504 if (isCallValid)
3505 {
3506 ParamCapture idsParam("ids", ParamType::TGLuintPointer);
3507 InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
3508 CaptureCreateTransformFeedbacks_ids(glState, isCallValid, n, ids, &idsParam);
3509 paramBuffer.addParam(std::move(idsParam));
3510 }
3511 else
3512 {
3513 ParamCapture idsParam("ids", ParamType::TGLuintPointer);
3514 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr), &idsParam.value);
3515 paramBuffer.addParam(std::move(idsParam));
3516 }
3517
3518 return CallCapture(angle::EntryPoint::GLCreateTransformFeedbacks, std::move(paramBuffer));
3519 }
3520
CaptureCreateVertexArrays(const State & glState,bool isCallValid,GLsizei n,VertexArrayID * arraysPacked)3521 CallCapture CaptureCreateVertexArrays(const State &glState,
3522 bool isCallValid,
3523 GLsizei n,
3524 VertexArrayID *arraysPacked)
3525 {
3526 ParamBuffer paramBuffer;
3527
3528 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
3529
3530 if (isCallValid)
3531 {
3532 ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDPointer);
3533 InitParamValue(ParamType::TVertexArrayIDPointer, arraysPacked, &arraysPackedParam.value);
3534 CaptureCreateVertexArrays_arraysPacked(glState, isCallValid, n, arraysPacked,
3535 &arraysPackedParam);
3536 paramBuffer.addParam(std::move(arraysPackedParam));
3537 }
3538 else
3539 {
3540 ParamCapture arraysPackedParam("arraysPacked", ParamType::TVertexArrayIDPointer);
3541 InitParamValue(ParamType::TVertexArrayIDPointer, static_cast<VertexArrayID *>(nullptr),
3542 &arraysPackedParam.value);
3543 paramBuffer.addParam(std::move(arraysPackedParam));
3544 }
3545
3546 return CallCapture(angle::EntryPoint::GLCreateVertexArrays, std::move(paramBuffer));
3547 }
3548
CaptureDisableVertexArrayAttrib(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint index)3549 CallCapture CaptureDisableVertexArrayAttrib(const State &glState,
3550 bool isCallValid,
3551 VertexArrayID vaobjPacked,
3552 GLuint index)
3553 {
3554 ParamBuffer paramBuffer;
3555
3556 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
3557 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
3558
3559 return CallCapture(angle::EntryPoint::GLDisableVertexArrayAttrib, std::move(paramBuffer));
3560 }
3561
CaptureEnableVertexArrayAttrib(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint index)3562 CallCapture CaptureEnableVertexArrayAttrib(const State &glState,
3563 bool isCallValid,
3564 VertexArrayID vaobjPacked,
3565 GLuint index)
3566 {
3567 ParamBuffer paramBuffer;
3568
3569 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
3570 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
3571
3572 return CallCapture(angle::EntryPoint::GLEnableVertexArrayAttrib, std::move(paramBuffer));
3573 }
3574
CaptureFlushMappedNamedBufferRange(const State & glState,bool isCallValid,BufferID bufferPacked,GLintptr offset,GLsizeiptr length)3575 CallCapture CaptureFlushMappedNamedBufferRange(const State &glState,
3576 bool isCallValid,
3577 BufferID bufferPacked,
3578 GLintptr offset,
3579 GLsizeiptr length)
3580 {
3581 ParamBuffer paramBuffer;
3582
3583 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3584 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
3585 paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
3586
3587 return CallCapture(angle::EntryPoint::GLFlushMappedNamedBufferRange, std::move(paramBuffer));
3588 }
3589
CaptureGenerateTextureMipmap(const State & glState,bool isCallValid,TextureID texturePacked)3590 CallCapture CaptureGenerateTextureMipmap(const State &glState,
3591 bool isCallValid,
3592 TextureID texturePacked)
3593 {
3594 ParamBuffer paramBuffer;
3595
3596 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3597
3598 return CallCapture(angle::EntryPoint::GLGenerateTextureMipmap, std::move(paramBuffer));
3599 }
3600
CaptureGetCompressedTextureImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLsizei bufSize,void * pixels)3601 CallCapture CaptureGetCompressedTextureImage(const State &glState,
3602 bool isCallValid,
3603 TextureID texturePacked,
3604 GLint level,
3605 GLsizei bufSize,
3606 void *pixels)
3607 {
3608 ParamBuffer paramBuffer;
3609
3610 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3611 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3612 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3613
3614 if (isCallValid)
3615 {
3616 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
3617 InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
3618 CaptureGetCompressedTextureImage_pixels(glState, isCallValid, texturePacked, level, bufSize,
3619 pixels, &pixelsParam);
3620 paramBuffer.addParam(std::move(pixelsParam));
3621 }
3622 else
3623 {
3624 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
3625 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
3626 paramBuffer.addParam(std::move(pixelsParam));
3627 }
3628
3629 return CallCapture(angle::EntryPoint::GLGetCompressedTextureImage, std::move(paramBuffer));
3630 }
3631
CaptureGetCompressedTextureSubImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLsizei bufSize,void * pixels)3632 CallCapture CaptureGetCompressedTextureSubImage(const State &glState,
3633 bool isCallValid,
3634 TextureID texturePacked,
3635 GLint level,
3636 GLint xoffset,
3637 GLint yoffset,
3638 GLint zoffset,
3639 GLsizei width,
3640 GLsizei height,
3641 GLsizei depth,
3642 GLsizei bufSize,
3643 void *pixels)
3644 {
3645 ParamBuffer paramBuffer;
3646
3647 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3648 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3649 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
3650 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
3651 paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
3652 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
3653 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
3654 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
3655 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3656
3657 if (isCallValid)
3658 {
3659 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
3660 InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
3661 CaptureGetCompressedTextureSubImage_pixels(glState, isCallValid, texturePacked, level,
3662 xoffset, yoffset, zoffset, width, height, depth,
3663 bufSize, pixels, &pixelsParam);
3664 paramBuffer.addParam(std::move(pixelsParam));
3665 }
3666 else
3667 {
3668 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
3669 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
3670 paramBuffer.addParam(std::move(pixelsParam));
3671 }
3672
3673 return CallCapture(angle::EntryPoint::GLGetCompressedTextureSubImage, std::move(paramBuffer));
3674 }
3675
CaptureGetNamedBufferParameteri64v(const State & glState,bool isCallValid,BufferID bufferPacked,GLenum pname,GLint64 * params)3676 CallCapture CaptureGetNamedBufferParameteri64v(const State &glState,
3677 bool isCallValid,
3678 BufferID bufferPacked,
3679 GLenum pname,
3680 GLint64 *params)
3681 {
3682 ParamBuffer paramBuffer;
3683
3684 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3685 paramBuffer.addEnumParam("pname", BigGLEnum::AllEnums, ParamType::TGLenum, pname);
3686
3687 if (isCallValid)
3688 {
3689 ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
3690 InitParamValue(ParamType::TGLint64Pointer, params, ¶msParam.value);
3691 CaptureGetNamedBufferParameteri64v_params(glState, isCallValid, bufferPacked, pname, params,
3692 ¶msParam);
3693 paramBuffer.addParam(std::move(paramsParam));
3694 }
3695 else
3696 {
3697 ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
3698 InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
3699 ¶msParam.value);
3700 paramBuffer.addParam(std::move(paramsParam));
3701 }
3702
3703 return CallCapture(angle::EntryPoint::GLGetNamedBufferParameteri64v, std::move(paramBuffer));
3704 }
3705
CaptureGetNamedBufferParameteriv(const State & glState,bool isCallValid,BufferID bufferPacked,GLenum pname,GLint * params)3706 CallCapture CaptureGetNamedBufferParameteriv(const State &glState,
3707 bool isCallValid,
3708 BufferID bufferPacked,
3709 GLenum pname,
3710 GLint *params)
3711 {
3712 ParamBuffer paramBuffer;
3713
3714 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3715 paramBuffer.addEnumParam("pname", BigGLEnum::AllEnums, ParamType::TGLenum, pname);
3716
3717 if (isCallValid)
3718 {
3719 ParamCapture paramsParam("params", ParamType::TGLintPointer);
3720 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
3721 CaptureGetNamedBufferParameteriv_params(glState, isCallValid, bufferPacked, pname, params,
3722 ¶msParam);
3723 paramBuffer.addParam(std::move(paramsParam));
3724 }
3725 else
3726 {
3727 ParamCapture paramsParam("params", ParamType::TGLintPointer);
3728 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
3729 paramBuffer.addParam(std::move(paramsParam));
3730 }
3731
3732 return CallCapture(angle::EntryPoint::GLGetNamedBufferParameteriv, std::move(paramBuffer));
3733 }
3734
CaptureGetNamedBufferPointerv(const State & glState,bool isCallValid,BufferID bufferPacked,GLenum pname,void ** params)3735 CallCapture CaptureGetNamedBufferPointerv(const State &glState,
3736 bool isCallValid,
3737 BufferID bufferPacked,
3738 GLenum pname,
3739 void **params)
3740 {
3741 ParamBuffer paramBuffer;
3742
3743 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3744 paramBuffer.addEnumParam("pname", BigGLEnum::AllEnums, ParamType::TGLenum, pname);
3745
3746 if (isCallValid)
3747 {
3748 ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
3749 InitParamValue(ParamType::TvoidPointerPointer, params, ¶msParam.value);
3750 CaptureGetNamedBufferPointerv_params(glState, isCallValid, bufferPacked, pname, params,
3751 ¶msParam);
3752 paramBuffer.addParam(std::move(paramsParam));
3753 }
3754 else
3755 {
3756 ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
3757 InitParamValue(ParamType::TvoidPointerPointer, static_cast<void **>(nullptr),
3758 ¶msParam.value);
3759 paramBuffer.addParam(std::move(paramsParam));
3760 }
3761
3762 return CallCapture(angle::EntryPoint::GLGetNamedBufferPointerv, std::move(paramBuffer));
3763 }
3764
CaptureGetNamedBufferSubData(const State & glState,bool isCallValid,BufferID bufferPacked,GLintptr offset,GLsizeiptr size,void * data)3765 CallCapture CaptureGetNamedBufferSubData(const State &glState,
3766 bool isCallValid,
3767 BufferID bufferPacked,
3768 GLintptr offset,
3769 GLsizeiptr size,
3770 void *data)
3771 {
3772 ParamBuffer paramBuffer;
3773
3774 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3775 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
3776 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
3777
3778 if (isCallValid)
3779 {
3780 ParamCapture dataParam("data", ParamType::TvoidPointer);
3781 InitParamValue(ParamType::TvoidPointer, data, &dataParam.value);
3782 CaptureGetNamedBufferSubData_data(glState, isCallValid, bufferPacked, offset, size, data,
3783 &dataParam);
3784 paramBuffer.addParam(std::move(dataParam));
3785 }
3786 else
3787 {
3788 ParamCapture dataParam("data", ParamType::TvoidPointer);
3789 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &dataParam.value);
3790 paramBuffer.addParam(std::move(dataParam));
3791 }
3792
3793 return CallCapture(angle::EntryPoint::GLGetNamedBufferSubData, std::move(paramBuffer));
3794 }
3795
CaptureGetNamedFramebufferAttachmentParameteriv(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum attachment,GLenum pname,GLint * params)3796 CallCapture CaptureGetNamedFramebufferAttachmentParameteriv(const State &glState,
3797 bool isCallValid,
3798 FramebufferID framebufferPacked,
3799 GLenum attachment,
3800 GLenum pname,
3801 GLint *params)
3802 {
3803 ParamBuffer paramBuffer;
3804
3805 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
3806 paramBuffer.addEnumParam("attachment", BigGLEnum::FramebufferAttachment, ParamType::TGLenum,
3807 attachment);
3808 paramBuffer.addEnumParam("pname", BigGLEnum::FramebufferAttachmentParameterName,
3809 ParamType::TGLenum, pname);
3810
3811 if (isCallValid)
3812 {
3813 ParamCapture paramsParam("params", ParamType::TGLintPointer);
3814 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
3815 CaptureGetNamedFramebufferAttachmentParameteriv_params(
3816 glState, isCallValid, framebufferPacked, attachment, pname, params, ¶msParam);
3817 paramBuffer.addParam(std::move(paramsParam));
3818 }
3819 else
3820 {
3821 ParamCapture paramsParam("params", ParamType::TGLintPointer);
3822 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
3823 paramBuffer.addParam(std::move(paramsParam));
3824 }
3825
3826 return CallCapture(angle::EntryPoint::GLGetNamedFramebufferAttachmentParameteriv,
3827 std::move(paramBuffer));
3828 }
3829
CaptureGetNamedFramebufferParameteriv(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum pname,GLint * param)3830 CallCapture CaptureGetNamedFramebufferParameteriv(const State &glState,
3831 bool isCallValid,
3832 FramebufferID framebufferPacked,
3833 GLenum pname,
3834 GLint *param)
3835 {
3836 ParamBuffer paramBuffer;
3837
3838 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
3839 paramBuffer.addEnumParam("pname", BigGLEnum::GetFramebufferParameter, ParamType::TGLenum,
3840 pname);
3841
3842 if (isCallValid)
3843 {
3844 ParamCapture paramParam("param", ParamType::TGLintPointer);
3845 InitParamValue(ParamType::TGLintPointer, param, ¶mParam.value);
3846 CaptureGetNamedFramebufferParameteriv_param(glState, isCallValid, framebufferPacked, pname,
3847 param, ¶mParam);
3848 paramBuffer.addParam(std::move(paramParam));
3849 }
3850 else
3851 {
3852 ParamCapture paramParam("param", ParamType::TGLintPointer);
3853 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶mParam.value);
3854 paramBuffer.addParam(std::move(paramParam));
3855 }
3856
3857 return CallCapture(angle::EntryPoint::GLGetNamedFramebufferParameteriv, std::move(paramBuffer));
3858 }
3859
CaptureGetNamedRenderbufferParameteriv(const State & glState,bool isCallValid,RenderbufferID renderbufferPacked,GLenum pname,GLint * params)3860 CallCapture CaptureGetNamedRenderbufferParameteriv(const State &glState,
3861 bool isCallValid,
3862 RenderbufferID renderbufferPacked,
3863 GLenum pname,
3864 GLint *params)
3865 {
3866 ParamBuffer paramBuffer;
3867
3868 paramBuffer.addValueParam("renderbufferPacked", ParamType::TRenderbufferID, renderbufferPacked);
3869 paramBuffer.addEnumParam("pname", BigGLEnum::RenderbufferParameterName, ParamType::TGLenum,
3870 pname);
3871
3872 if (isCallValid)
3873 {
3874 ParamCapture paramsParam("params", ParamType::TGLintPointer);
3875 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
3876 CaptureGetNamedRenderbufferParameteriv_params(glState, isCallValid, renderbufferPacked,
3877 pname, params, ¶msParam);
3878 paramBuffer.addParam(std::move(paramsParam));
3879 }
3880 else
3881 {
3882 ParamCapture paramsParam("params", ParamType::TGLintPointer);
3883 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
3884 paramBuffer.addParam(std::move(paramsParam));
3885 }
3886
3887 return CallCapture(angle::EntryPoint::GLGetNamedRenderbufferParameteriv,
3888 std::move(paramBuffer));
3889 }
3890
CaptureGetQueryBufferObjecti64v(const State & glState,bool isCallValid,GLuint id,BufferID bufferPacked,GLenum pname,GLintptr offset)3891 CallCapture CaptureGetQueryBufferObjecti64v(const State &glState,
3892 bool isCallValid,
3893 GLuint id,
3894 BufferID bufferPacked,
3895 GLenum pname,
3896 GLintptr offset)
3897 {
3898 ParamBuffer paramBuffer;
3899
3900 paramBuffer.addValueParam("id", ParamType::TGLuint, id);
3901 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3902 paramBuffer.addEnumParam("pname", BigGLEnum::QueryObjectParameterName, ParamType::TGLenum,
3903 pname);
3904 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
3905
3906 return CallCapture(angle::EntryPoint::GLGetQueryBufferObjecti64v, std::move(paramBuffer));
3907 }
3908
CaptureGetQueryBufferObjectiv(const State & glState,bool isCallValid,GLuint id,BufferID bufferPacked,GLenum pname,GLintptr offset)3909 CallCapture CaptureGetQueryBufferObjectiv(const State &glState,
3910 bool isCallValid,
3911 GLuint id,
3912 BufferID bufferPacked,
3913 GLenum pname,
3914 GLintptr offset)
3915 {
3916 ParamBuffer paramBuffer;
3917
3918 paramBuffer.addValueParam("id", ParamType::TGLuint, id);
3919 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3920 paramBuffer.addEnumParam("pname", BigGLEnum::QueryObjectParameterName, ParamType::TGLenum,
3921 pname);
3922 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
3923
3924 return CallCapture(angle::EntryPoint::GLGetQueryBufferObjectiv, std::move(paramBuffer));
3925 }
3926
CaptureGetQueryBufferObjectui64v(const State & glState,bool isCallValid,GLuint id,BufferID bufferPacked,GLenum pname,GLintptr offset)3927 CallCapture CaptureGetQueryBufferObjectui64v(const State &glState,
3928 bool isCallValid,
3929 GLuint id,
3930 BufferID bufferPacked,
3931 GLenum pname,
3932 GLintptr offset)
3933 {
3934 ParamBuffer paramBuffer;
3935
3936 paramBuffer.addValueParam("id", ParamType::TGLuint, id);
3937 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3938 paramBuffer.addEnumParam("pname", BigGLEnum::QueryObjectParameterName, ParamType::TGLenum,
3939 pname);
3940 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
3941
3942 return CallCapture(angle::EntryPoint::GLGetQueryBufferObjectui64v, std::move(paramBuffer));
3943 }
3944
CaptureGetQueryBufferObjectuiv(const State & glState,bool isCallValid,GLuint id,BufferID bufferPacked,GLenum pname,GLintptr offset)3945 CallCapture CaptureGetQueryBufferObjectuiv(const State &glState,
3946 bool isCallValid,
3947 GLuint id,
3948 BufferID bufferPacked,
3949 GLenum pname,
3950 GLintptr offset)
3951 {
3952 ParamBuffer paramBuffer;
3953
3954 paramBuffer.addValueParam("id", ParamType::TGLuint, id);
3955 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
3956 paramBuffer.addEnumParam("pname", BigGLEnum::QueryObjectParameterName, ParamType::TGLenum,
3957 pname);
3958 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
3959
3960 return CallCapture(angle::EntryPoint::GLGetQueryBufferObjectuiv, std::move(paramBuffer));
3961 }
3962
CaptureGetTextureImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLenum format,GLenum type,GLsizei bufSize,void * pixels)3963 CallCapture CaptureGetTextureImage(const State &glState,
3964 bool isCallValid,
3965 TextureID texturePacked,
3966 GLint level,
3967 GLenum format,
3968 GLenum type,
3969 GLsizei bufSize,
3970 void *pixels)
3971 {
3972 ParamBuffer paramBuffer;
3973
3974 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
3975 paramBuffer.addValueParam("level", ParamType::TGLint, level);
3976 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
3977 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
3978 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
3979
3980 if (isCallValid)
3981 {
3982 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
3983 InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
3984 CaptureGetTextureImage_pixels(glState, isCallValid, texturePacked, level, format, type,
3985 bufSize, pixels, &pixelsParam);
3986 paramBuffer.addParam(std::move(pixelsParam));
3987 }
3988 else
3989 {
3990 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
3991 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
3992 paramBuffer.addParam(std::move(pixelsParam));
3993 }
3994
3995 return CallCapture(angle::EntryPoint::GLGetTextureImage, std::move(paramBuffer));
3996 }
3997
CaptureGetTextureLevelParameterfv(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLenum pname,GLfloat * params)3998 CallCapture CaptureGetTextureLevelParameterfv(const State &glState,
3999 bool isCallValid,
4000 TextureID texturePacked,
4001 GLint level,
4002 GLenum pname,
4003 GLfloat *params)
4004 {
4005 ParamBuffer paramBuffer;
4006
4007 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
4008 paramBuffer.addValueParam("level", ParamType::TGLint, level);
4009 paramBuffer.addEnumParam("pname", BigGLEnum::GetTextureParameter, ParamType::TGLenum, pname);
4010
4011 if (isCallValid)
4012 {
4013 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
4014 InitParamValue(ParamType::TGLfloatPointer, params, ¶msParam.value);
4015 CaptureGetTextureLevelParameterfv_params(glState, isCallValid, texturePacked, level, pname,
4016 params, ¶msParam);
4017 paramBuffer.addParam(std::move(paramsParam));
4018 }
4019 else
4020 {
4021 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
4022 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
4023 ¶msParam.value);
4024 paramBuffer.addParam(std::move(paramsParam));
4025 }
4026
4027 return CallCapture(angle::EntryPoint::GLGetTextureLevelParameterfv, std::move(paramBuffer));
4028 }
4029
CaptureGetTextureLevelParameteriv(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLenum pname,GLint * params)4030 CallCapture CaptureGetTextureLevelParameteriv(const State &glState,
4031 bool isCallValid,
4032 TextureID texturePacked,
4033 GLint level,
4034 GLenum pname,
4035 GLint *params)
4036 {
4037 ParamBuffer paramBuffer;
4038
4039 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
4040 paramBuffer.addValueParam("level", ParamType::TGLint, level);
4041 paramBuffer.addEnumParam("pname", BigGLEnum::GetTextureParameter, ParamType::TGLenum, pname);
4042
4043 if (isCallValid)
4044 {
4045 ParamCapture paramsParam("params", ParamType::TGLintPointer);
4046 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
4047 CaptureGetTextureLevelParameteriv_params(glState, isCallValid, texturePacked, level, pname,
4048 params, ¶msParam);
4049 paramBuffer.addParam(std::move(paramsParam));
4050 }
4051 else
4052 {
4053 ParamCapture paramsParam("params", ParamType::TGLintPointer);
4054 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
4055 paramBuffer.addParam(std::move(paramsParam));
4056 }
4057
4058 return CallCapture(angle::EntryPoint::GLGetTextureLevelParameteriv, std::move(paramBuffer));
4059 }
4060
CaptureGetTextureParameterIiv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,GLint * params)4061 CallCapture CaptureGetTextureParameterIiv(const State &glState,
4062 bool isCallValid,
4063 TextureID texturePacked,
4064 GLenum pname,
4065 GLint *params)
4066 {
4067 ParamBuffer paramBuffer;
4068
4069 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
4070 paramBuffer.addEnumParam("pname", BigGLEnum::GetTextureParameter, ParamType::TGLenum, pname);
4071
4072 if (isCallValid)
4073 {
4074 ParamCapture paramsParam("params", ParamType::TGLintPointer);
4075 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
4076 CaptureGetTextureParameterIiv_params(glState, isCallValid, texturePacked, pname, params,
4077 ¶msParam);
4078 paramBuffer.addParam(std::move(paramsParam));
4079 }
4080 else
4081 {
4082 ParamCapture paramsParam("params", ParamType::TGLintPointer);
4083 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
4084 paramBuffer.addParam(std::move(paramsParam));
4085 }
4086
4087 return CallCapture(angle::EntryPoint::GLGetTextureParameterIiv, std::move(paramBuffer));
4088 }
4089
CaptureGetTextureParameterIuiv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,GLuint * params)4090 CallCapture CaptureGetTextureParameterIuiv(const State &glState,
4091 bool isCallValid,
4092 TextureID texturePacked,
4093 GLenum pname,
4094 GLuint *params)
4095 {
4096 ParamBuffer paramBuffer;
4097
4098 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
4099 paramBuffer.addEnumParam("pname", BigGLEnum::GetTextureParameter, ParamType::TGLenum, pname);
4100
4101 if (isCallValid)
4102 {
4103 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
4104 InitParamValue(ParamType::TGLuintPointer, params, ¶msParam.value);
4105 CaptureGetTextureParameterIuiv_params(glState, isCallValid, texturePacked, pname, params,
4106 ¶msParam);
4107 paramBuffer.addParam(std::move(paramsParam));
4108 }
4109 else
4110 {
4111 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
4112 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
4113 ¶msParam.value);
4114 paramBuffer.addParam(std::move(paramsParam));
4115 }
4116
4117 return CallCapture(angle::EntryPoint::GLGetTextureParameterIuiv, std::move(paramBuffer));
4118 }
4119
CaptureGetTextureParameterfv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,GLfloat * params)4120 CallCapture CaptureGetTextureParameterfv(const State &glState,
4121 bool isCallValid,
4122 TextureID texturePacked,
4123 GLenum pname,
4124 GLfloat *params)
4125 {
4126 ParamBuffer paramBuffer;
4127
4128 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
4129 paramBuffer.addEnumParam("pname", BigGLEnum::GetTextureParameter, ParamType::TGLenum, pname);
4130
4131 if (isCallValid)
4132 {
4133 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
4134 InitParamValue(ParamType::TGLfloatPointer, params, ¶msParam.value);
4135 CaptureGetTextureParameterfv_params(glState, isCallValid, texturePacked, pname, params,
4136 ¶msParam);
4137 paramBuffer.addParam(std::move(paramsParam));
4138 }
4139 else
4140 {
4141 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
4142 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
4143 ¶msParam.value);
4144 paramBuffer.addParam(std::move(paramsParam));
4145 }
4146
4147 return CallCapture(angle::EntryPoint::GLGetTextureParameterfv, std::move(paramBuffer));
4148 }
4149
CaptureGetTextureParameteriv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,GLint * params)4150 CallCapture CaptureGetTextureParameteriv(const State &glState,
4151 bool isCallValid,
4152 TextureID texturePacked,
4153 GLenum pname,
4154 GLint *params)
4155 {
4156 ParamBuffer paramBuffer;
4157
4158 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
4159 paramBuffer.addEnumParam("pname", BigGLEnum::GetTextureParameter, ParamType::TGLenum, pname);
4160
4161 if (isCallValid)
4162 {
4163 ParamCapture paramsParam("params", ParamType::TGLintPointer);
4164 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
4165 CaptureGetTextureParameteriv_params(glState, isCallValid, texturePacked, pname, params,
4166 ¶msParam);
4167 paramBuffer.addParam(std::move(paramsParam));
4168 }
4169 else
4170 {
4171 ParamCapture paramsParam("params", ParamType::TGLintPointer);
4172 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
4173 paramBuffer.addParam(std::move(paramsParam));
4174 }
4175
4176 return CallCapture(angle::EntryPoint::GLGetTextureParameteriv, std::move(paramBuffer));
4177 }
4178
CaptureGetTextureSubImage(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,GLsizei bufSize,void * pixels)4179 CallCapture CaptureGetTextureSubImage(const State &glState,
4180 bool isCallValid,
4181 TextureID texturePacked,
4182 GLint level,
4183 GLint xoffset,
4184 GLint yoffset,
4185 GLint zoffset,
4186 GLsizei width,
4187 GLsizei height,
4188 GLsizei depth,
4189 GLenum format,
4190 GLenum type,
4191 GLsizei bufSize,
4192 void *pixels)
4193 {
4194 ParamBuffer paramBuffer;
4195
4196 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
4197 paramBuffer.addValueParam("level", ParamType::TGLint, level);
4198 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
4199 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
4200 paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
4201 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
4202 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
4203 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
4204 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
4205 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
4206 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4207
4208 if (isCallValid)
4209 {
4210 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
4211 InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
4212 CaptureGetTextureSubImage_pixels(glState, isCallValid, texturePacked, level, xoffset,
4213 yoffset, zoffset, width, height, depth, format, type,
4214 bufSize, pixels, &pixelsParam);
4215 paramBuffer.addParam(std::move(pixelsParam));
4216 }
4217 else
4218 {
4219 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
4220 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
4221 paramBuffer.addParam(std::move(pixelsParam));
4222 }
4223
4224 return CallCapture(angle::EntryPoint::GLGetTextureSubImage, std::move(paramBuffer));
4225 }
4226
CaptureGetTransformFeedbacki64_v(const State & glState,bool isCallValid,GLuint xfb,GLenum pname,GLuint index,GLint64 * param)4227 CallCapture CaptureGetTransformFeedbacki64_v(const State &glState,
4228 bool isCallValid,
4229 GLuint xfb,
4230 GLenum pname,
4231 GLuint index,
4232 GLint64 *param)
4233 {
4234 ParamBuffer paramBuffer;
4235
4236 paramBuffer.addValueParam("xfb", ParamType::TGLuint, xfb);
4237 paramBuffer.addEnumParam("pname", BigGLEnum::TransformFeedbackPName, ParamType::TGLenum, pname);
4238 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
4239
4240 if (isCallValid)
4241 {
4242 ParamCapture paramParam("param", ParamType::TGLint64Pointer);
4243 InitParamValue(ParamType::TGLint64Pointer, param, ¶mParam.value);
4244 CaptureGetTransformFeedbacki64_v_param(glState, isCallValid, xfb, pname, index, param,
4245 ¶mParam);
4246 paramBuffer.addParam(std::move(paramParam));
4247 }
4248 else
4249 {
4250 ParamCapture paramParam("param", ParamType::TGLint64Pointer);
4251 InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
4252 ¶mParam.value);
4253 paramBuffer.addParam(std::move(paramParam));
4254 }
4255
4256 return CallCapture(angle::EntryPoint::GLGetTransformFeedbacki64_v, std::move(paramBuffer));
4257 }
4258
CaptureGetTransformFeedbacki_v(const State & glState,bool isCallValid,GLuint xfb,GLenum pname,GLuint index,GLint * param)4259 CallCapture CaptureGetTransformFeedbacki_v(const State &glState,
4260 bool isCallValid,
4261 GLuint xfb,
4262 GLenum pname,
4263 GLuint index,
4264 GLint *param)
4265 {
4266 ParamBuffer paramBuffer;
4267
4268 paramBuffer.addValueParam("xfb", ParamType::TGLuint, xfb);
4269 paramBuffer.addEnumParam("pname", BigGLEnum::TransformFeedbackPName, ParamType::TGLenum, pname);
4270 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
4271
4272 if (isCallValid)
4273 {
4274 ParamCapture paramParam("param", ParamType::TGLintPointer);
4275 InitParamValue(ParamType::TGLintPointer, param, ¶mParam.value);
4276 CaptureGetTransformFeedbacki_v_param(glState, isCallValid, xfb, pname, index, param,
4277 ¶mParam);
4278 paramBuffer.addParam(std::move(paramParam));
4279 }
4280 else
4281 {
4282 ParamCapture paramParam("param", ParamType::TGLintPointer);
4283 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶mParam.value);
4284 paramBuffer.addParam(std::move(paramParam));
4285 }
4286
4287 return CallCapture(angle::EntryPoint::GLGetTransformFeedbacki_v, std::move(paramBuffer));
4288 }
4289
CaptureGetTransformFeedbackiv(const State & glState,bool isCallValid,GLuint xfb,GLenum pname,GLint * param)4290 CallCapture CaptureGetTransformFeedbackiv(const State &glState,
4291 bool isCallValid,
4292 GLuint xfb,
4293 GLenum pname,
4294 GLint *param)
4295 {
4296 ParamBuffer paramBuffer;
4297
4298 paramBuffer.addValueParam("xfb", ParamType::TGLuint, xfb);
4299 paramBuffer.addEnumParam("pname", BigGLEnum::TransformFeedbackPName, ParamType::TGLenum, pname);
4300
4301 if (isCallValid)
4302 {
4303 ParamCapture paramParam("param", ParamType::TGLintPointer);
4304 InitParamValue(ParamType::TGLintPointer, param, ¶mParam.value);
4305 CaptureGetTransformFeedbackiv_param(glState, isCallValid, xfb, pname, param, ¶mParam);
4306 paramBuffer.addParam(std::move(paramParam));
4307 }
4308 else
4309 {
4310 ParamCapture paramParam("param", ParamType::TGLintPointer);
4311 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶mParam.value);
4312 paramBuffer.addParam(std::move(paramParam));
4313 }
4314
4315 return CallCapture(angle::EntryPoint::GLGetTransformFeedbackiv, std::move(paramBuffer));
4316 }
4317
CaptureGetVertexArrayIndexed64iv(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint index,GLenum pname,GLint64 * param)4318 CallCapture CaptureGetVertexArrayIndexed64iv(const State &glState,
4319 bool isCallValid,
4320 VertexArrayID vaobjPacked,
4321 GLuint index,
4322 GLenum pname,
4323 GLint64 *param)
4324 {
4325 ParamBuffer paramBuffer;
4326
4327 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
4328 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
4329 paramBuffer.addEnumParam("pname", BigGLEnum::VertexArrayPName, ParamType::TGLenum, pname);
4330
4331 if (isCallValid)
4332 {
4333 ParamCapture paramParam("param", ParamType::TGLint64Pointer);
4334 InitParamValue(ParamType::TGLint64Pointer, param, ¶mParam.value);
4335 CaptureGetVertexArrayIndexed64iv_param(glState, isCallValid, vaobjPacked, index, pname,
4336 param, ¶mParam);
4337 paramBuffer.addParam(std::move(paramParam));
4338 }
4339 else
4340 {
4341 ParamCapture paramParam("param", ParamType::TGLint64Pointer);
4342 InitParamValue(ParamType::TGLint64Pointer, static_cast<GLint64 *>(nullptr),
4343 ¶mParam.value);
4344 paramBuffer.addParam(std::move(paramParam));
4345 }
4346
4347 return CallCapture(angle::EntryPoint::GLGetVertexArrayIndexed64iv, std::move(paramBuffer));
4348 }
4349
CaptureGetVertexArrayIndexediv(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint index,GLenum pname,GLint * param)4350 CallCapture CaptureGetVertexArrayIndexediv(const State &glState,
4351 bool isCallValid,
4352 VertexArrayID vaobjPacked,
4353 GLuint index,
4354 GLenum pname,
4355 GLint *param)
4356 {
4357 ParamBuffer paramBuffer;
4358
4359 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
4360 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
4361 paramBuffer.addEnumParam("pname", BigGLEnum::VertexArrayPName, ParamType::TGLenum, pname);
4362
4363 if (isCallValid)
4364 {
4365 ParamCapture paramParam("param", ParamType::TGLintPointer);
4366 InitParamValue(ParamType::TGLintPointer, param, ¶mParam.value);
4367 CaptureGetVertexArrayIndexediv_param(glState, isCallValid, vaobjPacked, index, pname, param,
4368 ¶mParam);
4369 paramBuffer.addParam(std::move(paramParam));
4370 }
4371 else
4372 {
4373 ParamCapture paramParam("param", ParamType::TGLintPointer);
4374 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶mParam.value);
4375 paramBuffer.addParam(std::move(paramParam));
4376 }
4377
4378 return CallCapture(angle::EntryPoint::GLGetVertexArrayIndexediv, std::move(paramBuffer));
4379 }
4380
CaptureGetVertexArrayiv(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLenum pname,GLint * param)4381 CallCapture CaptureGetVertexArrayiv(const State &glState,
4382 bool isCallValid,
4383 VertexArrayID vaobjPacked,
4384 GLenum pname,
4385 GLint *param)
4386 {
4387 ParamBuffer paramBuffer;
4388
4389 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
4390 paramBuffer.addEnumParam("pname", BigGLEnum::VertexArrayPName, ParamType::TGLenum, pname);
4391
4392 if (isCallValid)
4393 {
4394 ParamCapture paramParam("param", ParamType::TGLintPointer);
4395 InitParamValue(ParamType::TGLintPointer, param, ¶mParam.value);
4396 CaptureGetVertexArrayiv_param(glState, isCallValid, vaobjPacked, pname, param, ¶mParam);
4397 paramBuffer.addParam(std::move(paramParam));
4398 }
4399 else
4400 {
4401 ParamCapture paramParam("param", ParamType::TGLintPointer);
4402 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶mParam.value);
4403 paramBuffer.addParam(std::move(paramParam));
4404 }
4405
4406 return CallCapture(angle::EntryPoint::GLGetVertexArrayiv, std::move(paramBuffer));
4407 }
4408
CaptureGetnColorTable(const State & glState,bool isCallValid,GLenum target,GLenum format,GLenum type,GLsizei bufSize,void * table)4409 CallCapture CaptureGetnColorTable(const State &glState,
4410 bool isCallValid,
4411 GLenum target,
4412 GLenum format,
4413 GLenum type,
4414 GLsizei bufSize,
4415 void *table)
4416 {
4417 ParamBuffer paramBuffer;
4418
4419 paramBuffer.addEnumParam("target", BigGLEnum::ColorTableTarget, ParamType::TGLenum, target);
4420 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
4421 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
4422 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4423
4424 if (isCallValid)
4425 {
4426 ParamCapture tableParam("table", ParamType::TvoidPointer);
4427 InitParamValue(ParamType::TvoidPointer, table, &tableParam.value);
4428 CaptureGetnColorTable_table(glState, isCallValid, target, format, type, bufSize, table,
4429 &tableParam);
4430 paramBuffer.addParam(std::move(tableParam));
4431 }
4432 else
4433 {
4434 ParamCapture tableParam("table", ParamType::TvoidPointer);
4435 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &tableParam.value);
4436 paramBuffer.addParam(std::move(tableParam));
4437 }
4438
4439 return CallCapture(angle::EntryPoint::GLGetnColorTable, std::move(paramBuffer));
4440 }
4441
CaptureGetnCompressedTexImage(const State & glState,bool isCallValid,GLenum target,GLint lod,GLsizei bufSize,void * pixels)4442 CallCapture CaptureGetnCompressedTexImage(const State &glState,
4443 bool isCallValid,
4444 GLenum target,
4445 GLint lod,
4446 GLsizei bufSize,
4447 void *pixels)
4448 {
4449 ParamBuffer paramBuffer;
4450
4451 paramBuffer.addEnumParam("target", BigGLEnum::TextureTarget, ParamType::TGLenum, target);
4452 paramBuffer.addValueParam("lod", ParamType::TGLint, lod);
4453 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4454
4455 if (isCallValid)
4456 {
4457 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
4458 InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
4459 CaptureGetnCompressedTexImage_pixels(glState, isCallValid, target, lod, bufSize, pixels,
4460 &pixelsParam);
4461 paramBuffer.addParam(std::move(pixelsParam));
4462 }
4463 else
4464 {
4465 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
4466 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
4467 paramBuffer.addParam(std::move(pixelsParam));
4468 }
4469
4470 return CallCapture(angle::EntryPoint::GLGetnCompressedTexImage, std::move(paramBuffer));
4471 }
4472
CaptureGetnConvolutionFilter(const State & glState,bool isCallValid,GLenum target,GLenum format,GLenum type,GLsizei bufSize,void * image)4473 CallCapture CaptureGetnConvolutionFilter(const State &glState,
4474 bool isCallValid,
4475 GLenum target,
4476 GLenum format,
4477 GLenum type,
4478 GLsizei bufSize,
4479 void *image)
4480 {
4481 ParamBuffer paramBuffer;
4482
4483 paramBuffer.addEnumParam("target", BigGLEnum::ConvolutionTarget, ParamType::TGLenum, target);
4484 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
4485 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
4486 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4487
4488 if (isCallValid)
4489 {
4490 ParamCapture imageParam("image", ParamType::TvoidPointer);
4491 InitParamValue(ParamType::TvoidPointer, image, &imageParam.value);
4492 CaptureGetnConvolutionFilter_image(glState, isCallValid, target, format, type, bufSize,
4493 image, &imageParam);
4494 paramBuffer.addParam(std::move(imageParam));
4495 }
4496 else
4497 {
4498 ParamCapture imageParam("image", ParamType::TvoidPointer);
4499 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &imageParam.value);
4500 paramBuffer.addParam(std::move(imageParam));
4501 }
4502
4503 return CallCapture(angle::EntryPoint::GLGetnConvolutionFilter, std::move(paramBuffer));
4504 }
4505
CaptureGetnHistogram(const State & glState,bool isCallValid,GLenum target,GLboolean reset,GLenum format,GLenum type,GLsizei bufSize,void * values)4506 CallCapture CaptureGetnHistogram(const State &glState,
4507 bool isCallValid,
4508 GLenum target,
4509 GLboolean reset,
4510 GLenum format,
4511 GLenum type,
4512 GLsizei bufSize,
4513 void *values)
4514 {
4515 ParamBuffer paramBuffer;
4516
4517 paramBuffer.addEnumParam("target", BigGLEnum::HistogramTarget, ParamType::TGLenum, target);
4518 paramBuffer.addValueParam("reset", ParamType::TGLboolean, reset);
4519 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
4520 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
4521 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4522
4523 if (isCallValid)
4524 {
4525 ParamCapture valuesParam("values", ParamType::TvoidPointer);
4526 InitParamValue(ParamType::TvoidPointer, values, &valuesParam.value);
4527 CaptureGetnHistogram_values(glState, isCallValid, target, reset, format, type, bufSize,
4528 values, &valuesParam);
4529 paramBuffer.addParam(std::move(valuesParam));
4530 }
4531 else
4532 {
4533 ParamCapture valuesParam("values", ParamType::TvoidPointer);
4534 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &valuesParam.value);
4535 paramBuffer.addParam(std::move(valuesParam));
4536 }
4537
4538 return CallCapture(angle::EntryPoint::GLGetnHistogram, std::move(paramBuffer));
4539 }
4540
CaptureGetnMapdv(const State & glState,bool isCallValid,GLenum target,GLenum query,GLsizei bufSize,GLdouble * v)4541 CallCapture CaptureGetnMapdv(const State &glState,
4542 bool isCallValid,
4543 GLenum target,
4544 GLenum query,
4545 GLsizei bufSize,
4546 GLdouble *v)
4547 {
4548 ParamBuffer paramBuffer;
4549
4550 paramBuffer.addEnumParam("target", BigGLEnum::MapTarget, ParamType::TGLenum, target);
4551 paramBuffer.addEnumParam("query", BigGLEnum::MapQuery, ParamType::TGLenum, query);
4552 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4553
4554 if (isCallValid)
4555 {
4556 ParamCapture vParam("v", ParamType::TGLdoublePointer);
4557 InitParamValue(ParamType::TGLdoublePointer, v, &vParam.value);
4558 CaptureGetnMapdv_v(glState, isCallValid, target, query, bufSize, v, &vParam);
4559 paramBuffer.addParam(std::move(vParam));
4560 }
4561 else
4562 {
4563 ParamCapture vParam("v", ParamType::TGLdoublePointer);
4564 InitParamValue(ParamType::TGLdoublePointer, static_cast<GLdouble *>(nullptr),
4565 &vParam.value);
4566 paramBuffer.addParam(std::move(vParam));
4567 }
4568
4569 return CallCapture(angle::EntryPoint::GLGetnMapdv, std::move(paramBuffer));
4570 }
4571
CaptureGetnMapfv(const State & glState,bool isCallValid,GLenum target,GLenum query,GLsizei bufSize,GLfloat * v)4572 CallCapture CaptureGetnMapfv(const State &glState,
4573 bool isCallValid,
4574 GLenum target,
4575 GLenum query,
4576 GLsizei bufSize,
4577 GLfloat *v)
4578 {
4579 ParamBuffer paramBuffer;
4580
4581 paramBuffer.addEnumParam("target", BigGLEnum::MapTarget, ParamType::TGLenum, target);
4582 paramBuffer.addEnumParam("query", BigGLEnum::MapQuery, ParamType::TGLenum, query);
4583 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4584
4585 if (isCallValid)
4586 {
4587 ParamCapture vParam("v", ParamType::TGLfloatPointer);
4588 InitParamValue(ParamType::TGLfloatPointer, v, &vParam.value);
4589 CaptureGetnMapfv_v(glState, isCallValid, target, query, bufSize, v, &vParam);
4590 paramBuffer.addParam(std::move(vParam));
4591 }
4592 else
4593 {
4594 ParamCapture vParam("v", ParamType::TGLfloatPointer);
4595 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr), &vParam.value);
4596 paramBuffer.addParam(std::move(vParam));
4597 }
4598
4599 return CallCapture(angle::EntryPoint::GLGetnMapfv, std::move(paramBuffer));
4600 }
4601
CaptureGetnMapiv(const State & glState,bool isCallValid,GLenum target,GLenum query,GLsizei bufSize,GLint * v)4602 CallCapture CaptureGetnMapiv(const State &glState,
4603 bool isCallValid,
4604 GLenum target,
4605 GLenum query,
4606 GLsizei bufSize,
4607 GLint *v)
4608 {
4609 ParamBuffer paramBuffer;
4610
4611 paramBuffer.addEnumParam("target", BigGLEnum::MapTarget, ParamType::TGLenum, target);
4612 paramBuffer.addEnumParam("query", BigGLEnum::MapQuery, ParamType::TGLenum, query);
4613 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4614
4615 if (isCallValid)
4616 {
4617 ParamCapture vParam("v", ParamType::TGLintPointer);
4618 InitParamValue(ParamType::TGLintPointer, v, &vParam.value);
4619 CaptureGetnMapiv_v(glState, isCallValid, target, query, bufSize, v, &vParam);
4620 paramBuffer.addParam(std::move(vParam));
4621 }
4622 else
4623 {
4624 ParamCapture vParam("v", ParamType::TGLintPointer);
4625 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), &vParam.value);
4626 paramBuffer.addParam(std::move(vParam));
4627 }
4628
4629 return CallCapture(angle::EntryPoint::GLGetnMapiv, std::move(paramBuffer));
4630 }
4631
CaptureGetnMinmax(const State & glState,bool isCallValid,GLenum target,GLboolean reset,GLenum format,GLenum type,GLsizei bufSize,void * values)4632 CallCapture CaptureGetnMinmax(const State &glState,
4633 bool isCallValid,
4634 GLenum target,
4635 GLboolean reset,
4636 GLenum format,
4637 GLenum type,
4638 GLsizei bufSize,
4639 void *values)
4640 {
4641 ParamBuffer paramBuffer;
4642
4643 paramBuffer.addEnumParam("target", BigGLEnum::MinmaxTarget, ParamType::TGLenum, target);
4644 paramBuffer.addValueParam("reset", ParamType::TGLboolean, reset);
4645 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
4646 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
4647 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4648
4649 if (isCallValid)
4650 {
4651 ParamCapture valuesParam("values", ParamType::TvoidPointer);
4652 InitParamValue(ParamType::TvoidPointer, values, &valuesParam.value);
4653 CaptureGetnMinmax_values(glState, isCallValid, target, reset, format, type, bufSize, values,
4654 &valuesParam);
4655 paramBuffer.addParam(std::move(valuesParam));
4656 }
4657 else
4658 {
4659 ParamCapture valuesParam("values", ParamType::TvoidPointer);
4660 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &valuesParam.value);
4661 paramBuffer.addParam(std::move(valuesParam));
4662 }
4663
4664 return CallCapture(angle::EntryPoint::GLGetnMinmax, std::move(paramBuffer));
4665 }
4666
CaptureGetnPixelMapfv(const State & glState,bool isCallValid,GLenum map,GLsizei bufSize,GLfloat * values)4667 CallCapture CaptureGetnPixelMapfv(const State &glState,
4668 bool isCallValid,
4669 GLenum map,
4670 GLsizei bufSize,
4671 GLfloat *values)
4672 {
4673 ParamBuffer paramBuffer;
4674
4675 paramBuffer.addEnumParam("map", BigGLEnum::PixelMap, ParamType::TGLenum, map);
4676 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4677
4678 if (isCallValid)
4679 {
4680 ParamCapture valuesParam("values", ParamType::TGLfloatPointer);
4681 InitParamValue(ParamType::TGLfloatPointer, values, &valuesParam.value);
4682 CaptureGetnPixelMapfv_values(glState, isCallValid, map, bufSize, values, &valuesParam);
4683 paramBuffer.addParam(std::move(valuesParam));
4684 }
4685 else
4686 {
4687 ParamCapture valuesParam("values", ParamType::TGLfloatPointer);
4688 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
4689 &valuesParam.value);
4690 paramBuffer.addParam(std::move(valuesParam));
4691 }
4692
4693 return CallCapture(angle::EntryPoint::GLGetnPixelMapfv, std::move(paramBuffer));
4694 }
4695
CaptureGetnPixelMapuiv(const State & glState,bool isCallValid,GLenum map,GLsizei bufSize,GLuint * values)4696 CallCapture CaptureGetnPixelMapuiv(const State &glState,
4697 bool isCallValid,
4698 GLenum map,
4699 GLsizei bufSize,
4700 GLuint *values)
4701 {
4702 ParamBuffer paramBuffer;
4703
4704 paramBuffer.addEnumParam("map", BigGLEnum::PixelMap, ParamType::TGLenum, map);
4705 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4706
4707 if (isCallValid)
4708 {
4709 ParamCapture valuesParam("values", ParamType::TGLuintPointer);
4710 InitParamValue(ParamType::TGLuintPointer, values, &valuesParam.value);
4711 CaptureGetnPixelMapuiv_values(glState, isCallValid, map, bufSize, values, &valuesParam);
4712 paramBuffer.addParam(std::move(valuesParam));
4713 }
4714 else
4715 {
4716 ParamCapture valuesParam("values", ParamType::TGLuintPointer);
4717 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
4718 &valuesParam.value);
4719 paramBuffer.addParam(std::move(valuesParam));
4720 }
4721
4722 return CallCapture(angle::EntryPoint::GLGetnPixelMapuiv, std::move(paramBuffer));
4723 }
4724
CaptureGetnPixelMapusv(const State & glState,bool isCallValid,GLenum map,GLsizei bufSize,GLushort * values)4725 CallCapture CaptureGetnPixelMapusv(const State &glState,
4726 bool isCallValid,
4727 GLenum map,
4728 GLsizei bufSize,
4729 GLushort *values)
4730 {
4731 ParamBuffer paramBuffer;
4732
4733 paramBuffer.addEnumParam("map", BigGLEnum::PixelMap, ParamType::TGLenum, map);
4734 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4735
4736 if (isCallValid)
4737 {
4738 ParamCapture valuesParam("values", ParamType::TGLushortPointer);
4739 InitParamValue(ParamType::TGLushortPointer, values, &valuesParam.value);
4740 CaptureGetnPixelMapusv_values(glState, isCallValid, map, bufSize, values, &valuesParam);
4741 paramBuffer.addParam(std::move(valuesParam));
4742 }
4743 else
4744 {
4745 ParamCapture valuesParam("values", ParamType::TGLushortPointer);
4746 InitParamValue(ParamType::TGLushortPointer, static_cast<GLushort *>(nullptr),
4747 &valuesParam.value);
4748 paramBuffer.addParam(std::move(valuesParam));
4749 }
4750
4751 return CallCapture(angle::EntryPoint::GLGetnPixelMapusv, std::move(paramBuffer));
4752 }
4753
CaptureGetnPolygonStipple(const State & glState,bool isCallValid,GLsizei bufSize,GLubyte * pattern)4754 CallCapture CaptureGetnPolygonStipple(const State &glState,
4755 bool isCallValid,
4756 GLsizei bufSize,
4757 GLubyte *pattern)
4758 {
4759 ParamBuffer paramBuffer;
4760
4761 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4762
4763 if (isCallValid)
4764 {
4765 ParamCapture patternParam("pattern", ParamType::TGLubytePointer);
4766 InitParamValue(ParamType::TGLubytePointer, pattern, &patternParam.value);
4767 CaptureGetnPolygonStipple_pattern(glState, isCallValid, bufSize, pattern, &patternParam);
4768 paramBuffer.addParam(std::move(patternParam));
4769 }
4770 else
4771 {
4772 ParamCapture patternParam("pattern", ParamType::TGLubytePointer);
4773 InitParamValue(ParamType::TGLubytePointer, static_cast<GLubyte *>(nullptr),
4774 &patternParam.value);
4775 paramBuffer.addParam(std::move(patternParam));
4776 }
4777
4778 return CallCapture(angle::EntryPoint::GLGetnPolygonStipple, std::move(paramBuffer));
4779 }
4780
CaptureGetnSeparableFilter(const State & glState,bool isCallValid,GLenum target,GLenum format,GLenum type,GLsizei rowBufSize,void * row,GLsizei columnBufSize,void * column,void * span)4781 CallCapture CaptureGetnSeparableFilter(const State &glState,
4782 bool isCallValid,
4783 GLenum target,
4784 GLenum format,
4785 GLenum type,
4786 GLsizei rowBufSize,
4787 void *row,
4788 GLsizei columnBufSize,
4789 void *column,
4790 void *span)
4791 {
4792 ParamBuffer paramBuffer;
4793
4794 paramBuffer.addEnumParam("target", BigGLEnum::SeparableTarget, ParamType::TGLenum, target);
4795 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
4796 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
4797 paramBuffer.addValueParam("rowBufSize", ParamType::TGLsizei, rowBufSize);
4798
4799 if (isCallValid)
4800 {
4801 ParamCapture rowParam("row", ParamType::TvoidPointer);
4802 InitParamValue(ParamType::TvoidPointer, row, &rowParam.value);
4803 CaptureGetnSeparableFilter_row(glState, isCallValid, target, format, type, rowBufSize, row,
4804 columnBufSize, column, span, &rowParam);
4805 paramBuffer.addParam(std::move(rowParam));
4806 }
4807 else
4808 {
4809 ParamCapture rowParam("row", ParamType::TvoidPointer);
4810 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &rowParam.value);
4811 paramBuffer.addParam(std::move(rowParam));
4812 }
4813
4814 paramBuffer.addValueParam("columnBufSize", ParamType::TGLsizei, columnBufSize);
4815
4816 if (isCallValid)
4817 {
4818 ParamCapture columnParam("column", ParamType::TvoidPointer);
4819 InitParamValue(ParamType::TvoidPointer, column, &columnParam.value);
4820 CaptureGetnSeparableFilter_column(glState, isCallValid, target, format, type, rowBufSize,
4821 row, columnBufSize, column, span, &columnParam);
4822 paramBuffer.addParam(std::move(columnParam));
4823 }
4824 else
4825 {
4826 ParamCapture columnParam("column", ParamType::TvoidPointer);
4827 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &columnParam.value);
4828 paramBuffer.addParam(std::move(columnParam));
4829 }
4830
4831 if (isCallValid)
4832 {
4833 ParamCapture spanParam("span", ParamType::TvoidPointer);
4834 InitParamValue(ParamType::TvoidPointer, span, &spanParam.value);
4835 CaptureGetnSeparableFilter_span(glState, isCallValid, target, format, type, rowBufSize, row,
4836 columnBufSize, column, span, &spanParam);
4837 paramBuffer.addParam(std::move(spanParam));
4838 }
4839 else
4840 {
4841 ParamCapture spanParam("span", ParamType::TvoidPointer);
4842 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &spanParam.value);
4843 paramBuffer.addParam(std::move(spanParam));
4844 }
4845
4846 return CallCapture(angle::EntryPoint::GLGetnSeparableFilter, std::move(paramBuffer));
4847 }
4848
CaptureGetnTexImage(const State & glState,bool isCallValid,GLenum target,GLint level,GLenum format,GLenum type,GLsizei bufSize,void * pixels)4849 CallCapture CaptureGetnTexImage(const State &glState,
4850 bool isCallValid,
4851 GLenum target,
4852 GLint level,
4853 GLenum format,
4854 GLenum type,
4855 GLsizei bufSize,
4856 void *pixels)
4857 {
4858 ParamBuffer paramBuffer;
4859
4860 paramBuffer.addEnumParam("target", BigGLEnum::TextureTarget, ParamType::TGLenum, target);
4861 paramBuffer.addValueParam("level", ParamType::TGLint, level);
4862 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
4863 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
4864 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4865
4866 if (isCallValid)
4867 {
4868 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
4869 InitParamValue(ParamType::TvoidPointer, pixels, &pixelsParam.value);
4870 CaptureGetnTexImage_pixels(glState, isCallValid, target, level, format, type, bufSize,
4871 pixels, &pixelsParam);
4872 paramBuffer.addParam(std::move(pixelsParam));
4873 }
4874 else
4875 {
4876 ParamCapture pixelsParam("pixels", ParamType::TvoidPointer);
4877 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &pixelsParam.value);
4878 paramBuffer.addParam(std::move(pixelsParam));
4879 }
4880
4881 return CallCapture(angle::EntryPoint::GLGetnTexImage, std::move(paramBuffer));
4882 }
4883
CaptureGetnUniformdv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLdouble * params)4884 CallCapture CaptureGetnUniformdv(const State &glState,
4885 bool isCallValid,
4886 ShaderProgramID programPacked,
4887 UniformLocation locationPacked,
4888 GLsizei bufSize,
4889 GLdouble *params)
4890 {
4891 ParamBuffer paramBuffer;
4892
4893 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
4894 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
4895 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
4896
4897 if (isCallValid)
4898 {
4899 ParamCapture paramsParam("params", ParamType::TGLdoublePointer);
4900 InitParamValue(ParamType::TGLdoublePointer, params, ¶msParam.value);
4901 CaptureGetnUniformdv_params(glState, isCallValid, programPacked, locationPacked, bufSize,
4902 params, ¶msParam);
4903 paramBuffer.addParam(std::move(paramsParam));
4904 }
4905 else
4906 {
4907 ParamCapture paramsParam("params", ParamType::TGLdoublePointer);
4908 InitParamValue(ParamType::TGLdoublePointer, static_cast<GLdouble *>(nullptr),
4909 ¶msParam.value);
4910 paramBuffer.addParam(std::move(paramsParam));
4911 }
4912
4913 return CallCapture(angle::EntryPoint::GLGetnUniformdv, std::move(paramBuffer));
4914 }
4915
CaptureInvalidateNamedFramebufferData(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLsizei numAttachments,const GLenum * attachments)4916 CallCapture CaptureInvalidateNamedFramebufferData(const State &glState,
4917 bool isCallValid,
4918 FramebufferID framebufferPacked,
4919 GLsizei numAttachments,
4920 const GLenum *attachments)
4921 {
4922 ParamBuffer paramBuffer;
4923
4924 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
4925 paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);
4926
4927 if (isCallValid)
4928 {
4929 ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
4930 InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
4931 CaptureInvalidateNamedFramebufferData_attachments(glState, isCallValid, framebufferPacked,
4932 numAttachments, attachments,
4933 &attachmentsParam);
4934 paramBuffer.addParam(std::move(attachmentsParam));
4935 }
4936 else
4937 {
4938 ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
4939 InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
4940 &attachmentsParam.value);
4941 paramBuffer.addParam(std::move(attachmentsParam));
4942 }
4943
4944 return CallCapture(angle::EntryPoint::GLInvalidateNamedFramebufferData, std::move(paramBuffer));
4945 }
4946
CaptureInvalidateNamedFramebufferSubData(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLsizei numAttachments,const GLenum * attachments,GLint x,GLint y,GLsizei width,GLsizei height)4947 CallCapture CaptureInvalidateNamedFramebufferSubData(const State &glState,
4948 bool isCallValid,
4949 FramebufferID framebufferPacked,
4950 GLsizei numAttachments,
4951 const GLenum *attachments,
4952 GLint x,
4953 GLint y,
4954 GLsizei width,
4955 GLsizei height)
4956 {
4957 ParamBuffer paramBuffer;
4958
4959 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
4960 paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);
4961
4962 if (isCallValid)
4963 {
4964 ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
4965 InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
4966 CaptureInvalidateNamedFramebufferSubData_attachments(
4967 glState, isCallValid, framebufferPacked, numAttachments, attachments, x, y, width,
4968 height, &attachmentsParam);
4969 paramBuffer.addParam(std::move(attachmentsParam));
4970 }
4971 else
4972 {
4973 ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
4974 InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
4975 &attachmentsParam.value);
4976 paramBuffer.addParam(std::move(attachmentsParam));
4977 }
4978
4979 paramBuffer.addValueParam("x", ParamType::TGLint, x);
4980 paramBuffer.addValueParam("y", ParamType::TGLint, y);
4981 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
4982 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
4983
4984 return CallCapture(angle::EntryPoint::GLInvalidateNamedFramebufferSubData,
4985 std::move(paramBuffer));
4986 }
4987
CaptureMapNamedBuffer(const State & glState,bool isCallValid,BufferID bufferPacked,GLenum access,void * returnValue)4988 CallCapture CaptureMapNamedBuffer(const State &glState,
4989 bool isCallValid,
4990 BufferID bufferPacked,
4991 GLenum access,
4992 void *returnValue)
4993 {
4994 ParamBuffer paramBuffer;
4995
4996 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
4997 paramBuffer.addEnumParam("access", BigGLEnum::BufferAccessARB, ParamType::TGLenum, access);
4998
4999 ParamCapture returnValueCapture("returnValue", ParamType::TvoidPointer);
5000 InitParamValue(ParamType::TvoidPointer, returnValue, &returnValueCapture.value);
5001 paramBuffer.addReturnValue(std::move(returnValueCapture));
5002
5003 return CallCapture(angle::EntryPoint::GLMapNamedBuffer, std::move(paramBuffer));
5004 }
5005
CaptureMapNamedBufferRange(const State & glState,bool isCallValid,BufferID bufferPacked,GLintptr offset,GLsizeiptr length,GLbitfield access,void * returnValue)5006 CallCapture CaptureMapNamedBufferRange(const State &glState,
5007 bool isCallValid,
5008 BufferID bufferPacked,
5009 GLintptr offset,
5010 GLsizeiptr length,
5011 GLbitfield access,
5012 void *returnValue)
5013 {
5014 ParamBuffer paramBuffer;
5015
5016 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5017 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5018 paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
5019 paramBuffer.addEnumParam("access", BigGLEnum::MapBufferAccessMask, ParamType::TGLbitfield,
5020 access);
5021
5022 ParamCapture returnValueCapture("returnValue", ParamType::TvoidPointer);
5023 InitParamValue(ParamType::TvoidPointer, returnValue, &returnValueCapture.value);
5024 paramBuffer.addReturnValue(std::move(returnValueCapture));
5025
5026 return CallCapture(angle::EntryPoint::GLMapNamedBufferRange, std::move(paramBuffer));
5027 }
5028
CaptureNamedBufferData(const State & glState,bool isCallValid,BufferID bufferPacked,GLsizeiptr size,const void * data,GLenum usage)5029 CallCapture CaptureNamedBufferData(const State &glState,
5030 bool isCallValid,
5031 BufferID bufferPacked,
5032 GLsizeiptr size,
5033 const void *data,
5034 GLenum usage)
5035 {
5036 ParamBuffer paramBuffer;
5037
5038 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5039 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5040
5041 if (isCallValid)
5042 {
5043 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
5044 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
5045 CaptureNamedBufferData_data(glState, isCallValid, bufferPacked, size, data, usage,
5046 &dataParam);
5047 paramBuffer.addParam(std::move(dataParam));
5048 }
5049 else
5050 {
5051 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
5052 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5053 &dataParam.value);
5054 paramBuffer.addParam(std::move(dataParam));
5055 }
5056
5057 paramBuffer.addEnumParam("usage", BigGLEnum::VertexBufferObjectUsage, ParamType::TGLenum,
5058 usage);
5059
5060 return CallCapture(angle::EntryPoint::GLNamedBufferData, std::move(paramBuffer));
5061 }
5062
CaptureNamedBufferStorage(const State & glState,bool isCallValid,BufferID bufferPacked,GLsizeiptr size,const void * data,GLbitfield flags)5063 CallCapture CaptureNamedBufferStorage(const State &glState,
5064 bool isCallValid,
5065 BufferID bufferPacked,
5066 GLsizeiptr size,
5067 const void *data,
5068 GLbitfield flags)
5069 {
5070 ParamBuffer paramBuffer;
5071
5072 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5073 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5074
5075 if (isCallValid)
5076 {
5077 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
5078 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
5079 CaptureNamedBufferStorage_data(glState, isCallValid, bufferPacked, size, data, flags,
5080 &dataParam);
5081 paramBuffer.addParam(std::move(dataParam));
5082 }
5083 else
5084 {
5085 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
5086 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5087 &dataParam.value);
5088 paramBuffer.addParam(std::move(dataParam));
5089 }
5090
5091 paramBuffer.addEnumParam("flags", BigGLEnum::BufferStorageMask, ParamType::TGLbitfield, flags);
5092
5093 return CallCapture(angle::EntryPoint::GLNamedBufferStorage, std::move(paramBuffer));
5094 }
5095
CaptureNamedBufferSubData(const State & glState,bool isCallValid,BufferID bufferPacked,GLintptr offset,GLsizeiptr size,const void * data)5096 CallCapture CaptureNamedBufferSubData(const State &glState,
5097 bool isCallValid,
5098 BufferID bufferPacked,
5099 GLintptr offset,
5100 GLsizeiptr size,
5101 const void *data)
5102 {
5103 ParamBuffer paramBuffer;
5104
5105 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5106 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5107 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5108
5109 if (isCallValid)
5110 {
5111 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
5112 InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
5113 CaptureNamedBufferSubData_data(glState, isCallValid, bufferPacked, offset, size, data,
5114 &dataParam);
5115 paramBuffer.addParam(std::move(dataParam));
5116 }
5117 else
5118 {
5119 ParamCapture dataParam("data", ParamType::TvoidConstPointer);
5120 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5121 &dataParam.value);
5122 paramBuffer.addParam(std::move(dataParam));
5123 }
5124
5125 return CallCapture(angle::EntryPoint::GLNamedBufferSubData, std::move(paramBuffer));
5126 }
5127
CaptureNamedFramebufferDrawBuffer(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum buf)5128 CallCapture CaptureNamedFramebufferDrawBuffer(const State &glState,
5129 bool isCallValid,
5130 FramebufferID framebufferPacked,
5131 GLenum buf)
5132 {
5133 ParamBuffer paramBuffer;
5134
5135 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
5136 paramBuffer.addEnumParam("buf", BigGLEnum::ColorBuffer, ParamType::TGLenum, buf);
5137
5138 return CallCapture(angle::EntryPoint::GLNamedFramebufferDrawBuffer, std::move(paramBuffer));
5139 }
5140
CaptureNamedFramebufferDrawBuffers(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLsizei n,const GLenum * bufs)5141 CallCapture CaptureNamedFramebufferDrawBuffers(const State &glState,
5142 bool isCallValid,
5143 FramebufferID framebufferPacked,
5144 GLsizei n,
5145 const GLenum *bufs)
5146 {
5147 ParamBuffer paramBuffer;
5148
5149 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
5150 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
5151
5152 if (isCallValid)
5153 {
5154 ParamCapture bufsParam("bufs", ParamType::TGLenumConstPointer);
5155 InitParamValue(ParamType::TGLenumConstPointer, bufs, &bufsParam.value);
5156 CaptureNamedFramebufferDrawBuffers_bufs(glState, isCallValid, framebufferPacked, n, bufs,
5157 &bufsParam);
5158 paramBuffer.addParam(std::move(bufsParam));
5159 }
5160 else
5161 {
5162 ParamCapture bufsParam("bufs", ParamType::TGLenumConstPointer);
5163 InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
5164 &bufsParam.value);
5165 paramBuffer.addParam(std::move(bufsParam));
5166 }
5167
5168 return CallCapture(angle::EntryPoint::GLNamedFramebufferDrawBuffers, std::move(paramBuffer));
5169 }
5170
CaptureNamedFramebufferParameteri(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum pname,GLint param)5171 CallCapture CaptureNamedFramebufferParameteri(const State &glState,
5172 bool isCallValid,
5173 FramebufferID framebufferPacked,
5174 GLenum pname,
5175 GLint param)
5176 {
5177 ParamBuffer paramBuffer;
5178
5179 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
5180 paramBuffer.addEnumParam("pname", BigGLEnum::FramebufferParameterName, ParamType::TGLenum,
5181 pname);
5182 paramBuffer.addValueParam("param", ParamType::TGLint, param);
5183
5184 return CallCapture(angle::EntryPoint::GLNamedFramebufferParameteri, std::move(paramBuffer));
5185 }
5186
CaptureNamedFramebufferReadBuffer(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum src)5187 CallCapture CaptureNamedFramebufferReadBuffer(const State &glState,
5188 bool isCallValid,
5189 FramebufferID framebufferPacked,
5190 GLenum src)
5191 {
5192 ParamBuffer paramBuffer;
5193
5194 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
5195 paramBuffer.addEnumParam("src", BigGLEnum::ColorBuffer, ParamType::TGLenum, src);
5196
5197 return CallCapture(angle::EntryPoint::GLNamedFramebufferReadBuffer, std::move(paramBuffer));
5198 }
5199
CaptureNamedFramebufferRenderbuffer(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum attachment,GLenum renderbuffertarget,RenderbufferID renderbufferPacked)5200 CallCapture CaptureNamedFramebufferRenderbuffer(const State &glState,
5201 bool isCallValid,
5202 FramebufferID framebufferPacked,
5203 GLenum attachment,
5204 GLenum renderbuffertarget,
5205 RenderbufferID renderbufferPacked)
5206 {
5207 ParamBuffer paramBuffer;
5208
5209 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
5210 paramBuffer.addEnumParam("attachment", BigGLEnum::FramebufferAttachment, ParamType::TGLenum,
5211 attachment);
5212 paramBuffer.addEnumParam("renderbuffertarget", BigGLEnum::RenderbufferTarget,
5213 ParamType::TGLenum, renderbuffertarget);
5214 paramBuffer.addValueParam("renderbufferPacked", ParamType::TRenderbufferID, renderbufferPacked);
5215
5216 return CallCapture(angle::EntryPoint::GLNamedFramebufferRenderbuffer, std::move(paramBuffer));
5217 }
5218
CaptureNamedFramebufferTexture(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum attachment,TextureID texturePacked,GLint level)5219 CallCapture CaptureNamedFramebufferTexture(const State &glState,
5220 bool isCallValid,
5221 FramebufferID framebufferPacked,
5222 GLenum attachment,
5223 TextureID texturePacked,
5224 GLint level)
5225 {
5226 ParamBuffer paramBuffer;
5227
5228 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
5229 paramBuffer.addEnumParam("attachment", BigGLEnum::FramebufferAttachment, ParamType::TGLenum,
5230 attachment);
5231 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5232 paramBuffer.addValueParam("level", ParamType::TGLint, level);
5233
5234 return CallCapture(angle::EntryPoint::GLNamedFramebufferTexture, std::move(paramBuffer));
5235 }
5236
CaptureNamedFramebufferTextureLayer(const State & glState,bool isCallValid,FramebufferID framebufferPacked,GLenum attachment,TextureID texturePacked,GLint level,GLint layer)5237 CallCapture CaptureNamedFramebufferTextureLayer(const State &glState,
5238 bool isCallValid,
5239 FramebufferID framebufferPacked,
5240 GLenum attachment,
5241 TextureID texturePacked,
5242 GLint level,
5243 GLint layer)
5244 {
5245 ParamBuffer paramBuffer;
5246
5247 paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
5248 paramBuffer.addEnumParam("attachment", BigGLEnum::FramebufferAttachment, ParamType::TGLenum,
5249 attachment);
5250 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5251 paramBuffer.addValueParam("level", ParamType::TGLint, level);
5252 paramBuffer.addValueParam("layer", ParamType::TGLint, layer);
5253
5254 return CallCapture(angle::EntryPoint::GLNamedFramebufferTextureLayer, std::move(paramBuffer));
5255 }
5256
CaptureNamedRenderbufferStorage(const State & glState,bool isCallValid,RenderbufferID renderbufferPacked,GLenum internalformat,GLsizei width,GLsizei height)5257 CallCapture CaptureNamedRenderbufferStorage(const State &glState,
5258 bool isCallValid,
5259 RenderbufferID renderbufferPacked,
5260 GLenum internalformat,
5261 GLsizei width,
5262 GLsizei height)
5263 {
5264 ParamBuffer paramBuffer;
5265
5266 paramBuffer.addValueParam("renderbufferPacked", ParamType::TRenderbufferID, renderbufferPacked);
5267 paramBuffer.addEnumParam("internalformat", BigGLEnum::InternalFormat, ParamType::TGLenum,
5268 internalformat);
5269 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5270 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5271
5272 return CallCapture(angle::EntryPoint::GLNamedRenderbufferStorage, std::move(paramBuffer));
5273 }
5274
CaptureNamedRenderbufferStorageMultisample(const State & glState,bool isCallValid,RenderbufferID renderbufferPacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height)5275 CallCapture CaptureNamedRenderbufferStorageMultisample(const State &glState,
5276 bool isCallValid,
5277 RenderbufferID renderbufferPacked,
5278 GLsizei samples,
5279 GLenum internalformat,
5280 GLsizei width,
5281 GLsizei height)
5282 {
5283 ParamBuffer paramBuffer;
5284
5285 paramBuffer.addValueParam("renderbufferPacked", ParamType::TRenderbufferID, renderbufferPacked);
5286 paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
5287 paramBuffer.addEnumParam("internalformat", BigGLEnum::InternalFormat, ParamType::TGLenum,
5288 internalformat);
5289 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5290 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5291
5292 return CallCapture(angle::EntryPoint::GLNamedRenderbufferStorageMultisample,
5293 std::move(paramBuffer));
5294 }
5295
CaptureTextureBarrier(const State & glState,bool isCallValid)5296 CallCapture CaptureTextureBarrier(const State &glState, bool isCallValid)
5297 {
5298 ParamBuffer paramBuffer;
5299
5300 return CallCapture(angle::EntryPoint::GLTextureBarrier, std::move(paramBuffer));
5301 }
5302
CaptureTextureBuffer(const State & glState,bool isCallValid,TextureID texturePacked,GLenum internalformat,BufferID bufferPacked)5303 CallCapture CaptureTextureBuffer(const State &glState,
5304 bool isCallValid,
5305 TextureID texturePacked,
5306 GLenum internalformat,
5307 BufferID bufferPacked)
5308 {
5309 ParamBuffer paramBuffer;
5310
5311 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5312 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
5313 internalformat);
5314 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5315
5316 return CallCapture(angle::EntryPoint::GLTextureBuffer, std::move(paramBuffer));
5317 }
5318
CaptureTextureBufferRange(const State & glState,bool isCallValid,TextureID texturePacked,GLenum internalformat,BufferID bufferPacked,GLintptr offset,GLsizeiptr size)5319 CallCapture CaptureTextureBufferRange(const State &glState,
5320 bool isCallValid,
5321 TextureID texturePacked,
5322 GLenum internalformat,
5323 BufferID bufferPacked,
5324 GLintptr offset,
5325 GLsizeiptr size)
5326 {
5327 ParamBuffer paramBuffer;
5328
5329 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5330 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
5331 internalformat);
5332 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5333 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5334 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5335
5336 return CallCapture(angle::EntryPoint::GLTextureBufferRange, std::move(paramBuffer));
5337 }
5338
CaptureTextureParameterIiv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,const GLint * params)5339 CallCapture CaptureTextureParameterIiv(const State &glState,
5340 bool isCallValid,
5341 TextureID texturePacked,
5342 GLenum pname,
5343 const GLint *params)
5344 {
5345 ParamBuffer paramBuffer;
5346
5347 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5348 paramBuffer.addEnumParam("pname", BigGLEnum::TextureParameterName, ParamType::TGLenum, pname);
5349
5350 if (isCallValid)
5351 {
5352 ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
5353 InitParamValue(ParamType::TGLintConstPointer, params, ¶msParam.value);
5354 CaptureTextureParameterIiv_params(glState, isCallValid, texturePacked, pname, params,
5355 ¶msParam);
5356 paramBuffer.addParam(std::move(paramsParam));
5357 }
5358 else
5359 {
5360 ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
5361 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
5362 ¶msParam.value);
5363 paramBuffer.addParam(std::move(paramsParam));
5364 }
5365
5366 return CallCapture(angle::EntryPoint::GLTextureParameterIiv, std::move(paramBuffer));
5367 }
5368
CaptureTextureParameterIuiv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,const GLuint * params)5369 CallCapture CaptureTextureParameterIuiv(const State &glState,
5370 bool isCallValid,
5371 TextureID texturePacked,
5372 GLenum pname,
5373 const GLuint *params)
5374 {
5375 ParamBuffer paramBuffer;
5376
5377 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5378 paramBuffer.addEnumParam("pname", BigGLEnum::TextureParameterName, ParamType::TGLenum, pname);
5379
5380 if (isCallValid)
5381 {
5382 ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
5383 InitParamValue(ParamType::TGLuintConstPointer, params, ¶msParam.value);
5384 CaptureTextureParameterIuiv_params(glState, isCallValid, texturePacked, pname, params,
5385 ¶msParam);
5386 paramBuffer.addParam(std::move(paramsParam));
5387 }
5388 else
5389 {
5390 ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
5391 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
5392 ¶msParam.value);
5393 paramBuffer.addParam(std::move(paramsParam));
5394 }
5395
5396 return CallCapture(angle::EntryPoint::GLTextureParameterIuiv, std::move(paramBuffer));
5397 }
5398
CaptureTextureParameterf(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,GLfloat param)5399 CallCapture CaptureTextureParameterf(const State &glState,
5400 bool isCallValid,
5401 TextureID texturePacked,
5402 GLenum pname,
5403 GLfloat param)
5404 {
5405 ParamBuffer paramBuffer;
5406
5407 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5408 paramBuffer.addEnumParam("pname", BigGLEnum::TextureParameterName, ParamType::TGLenum, pname);
5409 paramBuffer.addValueParam("param", ParamType::TGLfloat, param);
5410
5411 return CallCapture(angle::EntryPoint::GLTextureParameterf, std::move(paramBuffer));
5412 }
5413
CaptureTextureParameterfv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,const GLfloat * param)5414 CallCapture CaptureTextureParameterfv(const State &glState,
5415 bool isCallValid,
5416 TextureID texturePacked,
5417 GLenum pname,
5418 const GLfloat *param)
5419 {
5420 ParamBuffer paramBuffer;
5421
5422 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5423 paramBuffer.addEnumParam("pname", BigGLEnum::TextureParameterName, ParamType::TGLenum, pname);
5424
5425 if (isCallValid)
5426 {
5427 ParamCapture paramParam("param", ParamType::TGLfloatConstPointer);
5428 InitParamValue(ParamType::TGLfloatConstPointer, param, ¶mParam.value);
5429 CaptureTextureParameterfv_param(glState, isCallValid, texturePacked, pname, param,
5430 ¶mParam);
5431 paramBuffer.addParam(std::move(paramParam));
5432 }
5433 else
5434 {
5435 ParamCapture paramParam("param", ParamType::TGLfloatConstPointer);
5436 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
5437 ¶mParam.value);
5438 paramBuffer.addParam(std::move(paramParam));
5439 }
5440
5441 return CallCapture(angle::EntryPoint::GLTextureParameterfv, std::move(paramBuffer));
5442 }
5443
CaptureTextureParameteri(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,GLint param)5444 CallCapture CaptureTextureParameteri(const State &glState,
5445 bool isCallValid,
5446 TextureID texturePacked,
5447 GLenum pname,
5448 GLint param)
5449 {
5450 ParamBuffer paramBuffer;
5451
5452 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5453 paramBuffer.addEnumParam("pname", BigGLEnum::TextureParameterName, ParamType::TGLenum, pname);
5454 paramBuffer.addValueParam("param", ParamType::TGLint, param);
5455
5456 return CallCapture(angle::EntryPoint::GLTextureParameteri, std::move(paramBuffer));
5457 }
5458
CaptureTextureParameteriv(const State & glState,bool isCallValid,TextureID texturePacked,GLenum pname,const GLint * param)5459 CallCapture CaptureTextureParameteriv(const State &glState,
5460 bool isCallValid,
5461 TextureID texturePacked,
5462 GLenum pname,
5463 const GLint *param)
5464 {
5465 ParamBuffer paramBuffer;
5466
5467 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5468 paramBuffer.addEnumParam("pname", BigGLEnum::TextureParameterName, ParamType::TGLenum, pname);
5469
5470 if (isCallValid)
5471 {
5472 ParamCapture paramParam("param", ParamType::TGLintConstPointer);
5473 InitParamValue(ParamType::TGLintConstPointer, param, ¶mParam.value);
5474 CaptureTextureParameteriv_param(glState, isCallValid, texturePacked, pname, param,
5475 ¶mParam);
5476 paramBuffer.addParam(std::move(paramParam));
5477 }
5478 else
5479 {
5480 ParamCapture paramParam("param", ParamType::TGLintConstPointer);
5481 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
5482 ¶mParam.value);
5483 paramBuffer.addParam(std::move(paramParam));
5484 }
5485
5486 return CallCapture(angle::EntryPoint::GLTextureParameteriv, std::move(paramBuffer));
5487 }
5488
CaptureTextureStorage1D(const State & glState,bool isCallValid,TextureID texturePacked,GLsizei levels,GLenum internalformat,GLsizei width)5489 CallCapture CaptureTextureStorage1D(const State &glState,
5490 bool isCallValid,
5491 TextureID texturePacked,
5492 GLsizei levels,
5493 GLenum internalformat,
5494 GLsizei width)
5495 {
5496 ParamBuffer paramBuffer;
5497
5498 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5499 paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
5500 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
5501 internalformat);
5502 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5503
5504 return CallCapture(angle::EntryPoint::GLTextureStorage1D, std::move(paramBuffer));
5505 }
5506
CaptureTextureStorage2D(const State & glState,bool isCallValid,TextureID texturePacked,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height)5507 CallCapture CaptureTextureStorage2D(const State &glState,
5508 bool isCallValid,
5509 TextureID texturePacked,
5510 GLsizei levels,
5511 GLenum internalformat,
5512 GLsizei width,
5513 GLsizei height)
5514 {
5515 ParamBuffer paramBuffer;
5516
5517 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5518 paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
5519 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
5520 internalformat);
5521 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5522 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5523
5524 return CallCapture(angle::EntryPoint::GLTextureStorage2D, std::move(paramBuffer));
5525 }
5526
CaptureTextureStorage2DMultisample(const State & glState,bool isCallValid,TextureID texturePacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLboolean fixedsamplelocations)5527 CallCapture CaptureTextureStorage2DMultisample(const State &glState,
5528 bool isCallValid,
5529 TextureID texturePacked,
5530 GLsizei samples,
5531 GLenum internalformat,
5532 GLsizei width,
5533 GLsizei height,
5534 GLboolean fixedsamplelocations)
5535 {
5536 ParamBuffer paramBuffer;
5537
5538 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5539 paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
5540 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
5541 internalformat);
5542 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5543 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5544 paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);
5545
5546 return CallCapture(angle::EntryPoint::GLTextureStorage2DMultisample, std::move(paramBuffer));
5547 }
5548
CaptureTextureStorage3D(const State & glState,bool isCallValid,TextureID texturePacked,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth)5549 CallCapture CaptureTextureStorage3D(const State &glState,
5550 bool isCallValid,
5551 TextureID texturePacked,
5552 GLsizei levels,
5553 GLenum internalformat,
5554 GLsizei width,
5555 GLsizei height,
5556 GLsizei depth)
5557 {
5558 ParamBuffer paramBuffer;
5559
5560 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5561 paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
5562 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
5563 internalformat);
5564 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5565 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5566 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
5567
5568 return CallCapture(angle::EntryPoint::GLTextureStorage3D, std::move(paramBuffer));
5569 }
5570
CaptureTextureStorage3DMultisample(const State & glState,bool isCallValid,TextureID texturePacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedsamplelocations)5571 CallCapture CaptureTextureStorage3DMultisample(const State &glState,
5572 bool isCallValid,
5573 TextureID texturePacked,
5574 GLsizei samples,
5575 GLenum internalformat,
5576 GLsizei width,
5577 GLsizei height,
5578 GLsizei depth,
5579 GLboolean fixedsamplelocations)
5580 {
5581 ParamBuffer paramBuffer;
5582
5583 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5584 paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
5585 paramBuffer.addEnumParam("internalformat", BigGLEnum::SizedInternalFormat, ParamType::TGLenum,
5586 internalformat);
5587 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5588 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5589 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
5590 paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);
5591
5592 return CallCapture(angle::EntryPoint::GLTextureStorage3DMultisample, std::move(paramBuffer));
5593 }
5594
CaptureTextureSubImage1D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLsizei width,GLenum format,GLenum type,const void * pixels)5595 CallCapture CaptureTextureSubImage1D(const State &glState,
5596 bool isCallValid,
5597 TextureID texturePacked,
5598 GLint level,
5599 GLint xoffset,
5600 GLsizei width,
5601 GLenum format,
5602 GLenum type,
5603 const void *pixels)
5604 {
5605 ParamBuffer paramBuffer;
5606
5607 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5608 paramBuffer.addValueParam("level", ParamType::TGLint, level);
5609 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
5610 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5611 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
5612 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
5613
5614 if (isCallValid)
5615 {
5616 ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
5617 InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
5618 CaptureTextureSubImage1D_pixels(glState, isCallValid, texturePacked, level, xoffset, width,
5619 format, type, pixels, &pixelsParam);
5620 paramBuffer.addParam(std::move(pixelsParam));
5621 }
5622 else
5623 {
5624 ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
5625 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5626 &pixelsParam.value);
5627 paramBuffer.addParam(std::move(pixelsParam));
5628 }
5629
5630 return CallCapture(angle::EntryPoint::GLTextureSubImage1D, std::move(paramBuffer));
5631 }
5632
CaptureTextureSubImage2D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void * pixels)5633 CallCapture CaptureTextureSubImage2D(const State &glState,
5634 bool isCallValid,
5635 TextureID texturePacked,
5636 GLint level,
5637 GLint xoffset,
5638 GLint yoffset,
5639 GLsizei width,
5640 GLsizei height,
5641 GLenum format,
5642 GLenum type,
5643 const void *pixels)
5644 {
5645 ParamBuffer paramBuffer;
5646
5647 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5648 paramBuffer.addValueParam("level", ParamType::TGLint, level);
5649 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
5650 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
5651 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5652 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5653 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
5654 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
5655
5656 if (isCallValid)
5657 {
5658 ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
5659 InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
5660 CaptureTextureSubImage2D_pixels(glState, isCallValid, texturePacked, level, xoffset,
5661 yoffset, width, height, format, type, pixels, &pixelsParam);
5662 paramBuffer.addParam(std::move(pixelsParam));
5663 }
5664 else
5665 {
5666 ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
5667 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5668 &pixelsParam.value);
5669 paramBuffer.addParam(std::move(pixelsParam));
5670 }
5671
5672 return CallCapture(angle::EntryPoint::GLTextureSubImage2D, std::move(paramBuffer));
5673 }
5674
CaptureTextureSubImage3D(const State & glState,bool isCallValid,TextureID texturePacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const void * pixels)5675 CallCapture CaptureTextureSubImage3D(const State &glState,
5676 bool isCallValid,
5677 TextureID texturePacked,
5678 GLint level,
5679 GLint xoffset,
5680 GLint yoffset,
5681 GLint zoffset,
5682 GLsizei width,
5683 GLsizei height,
5684 GLsizei depth,
5685 GLenum format,
5686 GLenum type,
5687 const void *pixels)
5688 {
5689 ParamBuffer paramBuffer;
5690
5691 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
5692 paramBuffer.addValueParam("level", ParamType::TGLint, level);
5693 paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
5694 paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
5695 paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
5696 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
5697 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
5698 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
5699 paramBuffer.addEnumParam("format", BigGLEnum::PixelFormat, ParamType::TGLenum, format);
5700 paramBuffer.addEnumParam("type", BigGLEnum::PixelType, ParamType::TGLenum, type);
5701
5702 if (isCallValid)
5703 {
5704 ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
5705 InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
5706 CaptureTextureSubImage3D_pixels(glState, isCallValid, texturePacked, level, xoffset,
5707 yoffset, zoffset, width, height, depth, format, type,
5708 pixels, &pixelsParam);
5709 paramBuffer.addParam(std::move(pixelsParam));
5710 }
5711 else
5712 {
5713 ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
5714 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5715 &pixelsParam.value);
5716 paramBuffer.addParam(std::move(pixelsParam));
5717 }
5718
5719 return CallCapture(angle::EntryPoint::GLTextureSubImage3D, std::move(paramBuffer));
5720 }
5721
CaptureTransformFeedbackBufferBase(const State & glState,bool isCallValid,GLuint xfb,GLuint index,BufferID bufferPacked)5722 CallCapture CaptureTransformFeedbackBufferBase(const State &glState,
5723 bool isCallValid,
5724 GLuint xfb,
5725 GLuint index,
5726 BufferID bufferPacked)
5727 {
5728 ParamBuffer paramBuffer;
5729
5730 paramBuffer.addValueParam("xfb", ParamType::TGLuint, xfb);
5731 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5732 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5733
5734 return CallCapture(angle::EntryPoint::GLTransformFeedbackBufferBase, std::move(paramBuffer));
5735 }
5736
CaptureTransformFeedbackBufferRange(const State & glState,bool isCallValid,GLuint xfb,GLuint index,BufferID bufferPacked,GLintptr offset,GLsizeiptr size)5737 CallCapture CaptureTransformFeedbackBufferRange(const State &glState,
5738 bool isCallValid,
5739 GLuint xfb,
5740 GLuint index,
5741 BufferID bufferPacked,
5742 GLintptr offset,
5743 GLsizeiptr size)
5744 {
5745 ParamBuffer paramBuffer;
5746
5747 paramBuffer.addValueParam("xfb", ParamType::TGLuint, xfb);
5748 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
5749 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5750 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5751 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
5752
5753 return CallCapture(angle::EntryPoint::GLTransformFeedbackBufferRange, std::move(paramBuffer));
5754 }
5755
CaptureUnmapNamedBuffer(const State & glState,bool isCallValid,BufferID bufferPacked,GLboolean returnValue)5756 CallCapture CaptureUnmapNamedBuffer(const State &glState,
5757 bool isCallValid,
5758 BufferID bufferPacked,
5759 GLboolean returnValue)
5760 {
5761 ParamBuffer paramBuffer;
5762
5763 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5764
5765 ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
5766 InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
5767 paramBuffer.addReturnValue(std::move(returnValueCapture));
5768
5769 return CallCapture(angle::EntryPoint::GLUnmapNamedBuffer, std::move(paramBuffer));
5770 }
5771
CaptureVertexArrayAttribBinding(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint attribindex,GLuint bindingindex)5772 CallCapture CaptureVertexArrayAttribBinding(const State &glState,
5773 bool isCallValid,
5774 VertexArrayID vaobjPacked,
5775 GLuint attribindex,
5776 GLuint bindingindex)
5777 {
5778 ParamBuffer paramBuffer;
5779
5780 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5781 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
5782 paramBuffer.addValueParam("bindingindex", ParamType::TGLuint, bindingindex);
5783
5784 return CallCapture(angle::EntryPoint::GLVertexArrayAttribBinding, std::move(paramBuffer));
5785 }
5786
CaptureVertexArrayAttribFormat(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint attribindex,GLint size,GLenum type,GLboolean normalized,GLuint relativeoffset)5787 CallCapture CaptureVertexArrayAttribFormat(const State &glState,
5788 bool isCallValid,
5789 VertexArrayID vaobjPacked,
5790 GLuint attribindex,
5791 GLint size,
5792 GLenum type,
5793 GLboolean normalized,
5794 GLuint relativeoffset)
5795 {
5796 ParamBuffer paramBuffer;
5797
5798 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5799 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
5800 paramBuffer.addValueParam("size", ParamType::TGLint, size);
5801 paramBuffer.addEnumParam("type", BigGLEnum::VertexAttribType, ParamType::TGLenum, type);
5802 paramBuffer.addValueParam("normalized", ParamType::TGLboolean, normalized);
5803 paramBuffer.addValueParam("relativeoffset", ParamType::TGLuint, relativeoffset);
5804
5805 return CallCapture(angle::EntryPoint::GLVertexArrayAttribFormat, std::move(paramBuffer));
5806 }
5807
CaptureVertexArrayAttribIFormat(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint attribindex,GLint size,GLenum type,GLuint relativeoffset)5808 CallCapture CaptureVertexArrayAttribIFormat(const State &glState,
5809 bool isCallValid,
5810 VertexArrayID vaobjPacked,
5811 GLuint attribindex,
5812 GLint size,
5813 GLenum type,
5814 GLuint relativeoffset)
5815 {
5816 ParamBuffer paramBuffer;
5817
5818 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5819 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
5820 paramBuffer.addValueParam("size", ParamType::TGLint, size);
5821 paramBuffer.addEnumParam("type", BigGLEnum::VertexAttribIType, ParamType::TGLenum, type);
5822 paramBuffer.addValueParam("relativeoffset", ParamType::TGLuint, relativeoffset);
5823
5824 return CallCapture(angle::EntryPoint::GLVertexArrayAttribIFormat, std::move(paramBuffer));
5825 }
5826
CaptureVertexArrayAttribLFormat(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint attribindex,GLint size,GLenum type,GLuint relativeoffset)5827 CallCapture CaptureVertexArrayAttribLFormat(const State &glState,
5828 bool isCallValid,
5829 VertexArrayID vaobjPacked,
5830 GLuint attribindex,
5831 GLint size,
5832 GLenum type,
5833 GLuint relativeoffset)
5834 {
5835 ParamBuffer paramBuffer;
5836
5837 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5838 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
5839 paramBuffer.addValueParam("size", ParamType::TGLint, size);
5840 paramBuffer.addEnumParam("type", BigGLEnum::VertexAttribLType, ParamType::TGLenum, type);
5841 paramBuffer.addValueParam("relativeoffset", ParamType::TGLuint, relativeoffset);
5842
5843 return CallCapture(angle::EntryPoint::GLVertexArrayAttribLFormat, std::move(paramBuffer));
5844 }
5845
CaptureVertexArrayBindingDivisor(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint bindingindex,GLuint divisor)5846 CallCapture CaptureVertexArrayBindingDivisor(const State &glState,
5847 bool isCallValid,
5848 VertexArrayID vaobjPacked,
5849 GLuint bindingindex,
5850 GLuint divisor)
5851 {
5852 ParamBuffer paramBuffer;
5853
5854 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5855 paramBuffer.addValueParam("bindingindex", ParamType::TGLuint, bindingindex);
5856 paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
5857
5858 return CallCapture(angle::EntryPoint::GLVertexArrayBindingDivisor, std::move(paramBuffer));
5859 }
5860
CaptureVertexArrayElementBuffer(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,BufferID bufferPacked)5861 CallCapture CaptureVertexArrayElementBuffer(const State &glState,
5862 bool isCallValid,
5863 VertexArrayID vaobjPacked,
5864 BufferID bufferPacked)
5865 {
5866 ParamBuffer paramBuffer;
5867
5868 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5869 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5870
5871 return CallCapture(angle::EntryPoint::GLVertexArrayElementBuffer, std::move(paramBuffer));
5872 }
5873
CaptureVertexArrayVertexBuffer(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint bindingindex,BufferID bufferPacked,GLintptr offset,GLsizei stride)5874 CallCapture CaptureVertexArrayVertexBuffer(const State &glState,
5875 bool isCallValid,
5876 VertexArrayID vaobjPacked,
5877 GLuint bindingindex,
5878 BufferID bufferPacked,
5879 GLintptr offset,
5880 GLsizei stride)
5881 {
5882 ParamBuffer paramBuffer;
5883
5884 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5885 paramBuffer.addValueParam("bindingindex", ParamType::TGLuint, bindingindex);
5886 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
5887 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
5888 paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
5889
5890 return CallCapture(angle::EntryPoint::GLVertexArrayVertexBuffer, std::move(paramBuffer));
5891 }
5892
CaptureVertexArrayVertexBuffers(const State & glState,bool isCallValid,VertexArrayID vaobjPacked,GLuint first,GLsizei count,const BufferID * buffersPacked,const GLintptr * offsets,const GLsizei * strides)5893 CallCapture CaptureVertexArrayVertexBuffers(const State &glState,
5894 bool isCallValid,
5895 VertexArrayID vaobjPacked,
5896 GLuint first,
5897 GLsizei count,
5898 const BufferID *buffersPacked,
5899 const GLintptr *offsets,
5900 const GLsizei *strides)
5901 {
5902 ParamBuffer paramBuffer;
5903
5904 paramBuffer.addValueParam("vaobjPacked", ParamType::TVertexArrayID, vaobjPacked);
5905 paramBuffer.addValueParam("first", ParamType::TGLuint, first);
5906 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
5907
5908 if (isCallValid)
5909 {
5910 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
5911 InitParamValue(ParamType::TBufferIDConstPointer, buffersPacked, &buffersPackedParam.value);
5912 CaptureVertexArrayVertexBuffers_buffersPacked(glState, isCallValid, vaobjPacked, first,
5913 count, buffersPacked, offsets, strides,
5914 &buffersPackedParam);
5915 paramBuffer.addParam(std::move(buffersPackedParam));
5916 }
5917 else
5918 {
5919 ParamCapture buffersPackedParam("buffersPacked", ParamType::TBufferIDConstPointer);
5920 InitParamValue(ParamType::TBufferIDConstPointer, static_cast<const BufferID *>(nullptr),
5921 &buffersPackedParam.value);
5922 paramBuffer.addParam(std::move(buffersPackedParam));
5923 }
5924
5925 if (isCallValid)
5926 {
5927 ParamCapture offsetsParam("offsets", ParamType::TGLintptrConstPointer);
5928 InitParamValue(ParamType::TGLintptrConstPointer, offsets, &offsetsParam.value);
5929 CaptureVertexArrayVertexBuffers_offsets(glState, isCallValid, vaobjPacked, first, count,
5930 buffersPacked, offsets, strides, &offsetsParam);
5931 paramBuffer.addParam(std::move(offsetsParam));
5932 }
5933 else
5934 {
5935 ParamCapture offsetsParam("offsets", ParamType::TGLintptrConstPointer);
5936 InitParamValue(ParamType::TGLintptrConstPointer, static_cast<const GLintptr *>(nullptr),
5937 &offsetsParam.value);
5938 paramBuffer.addParam(std::move(offsetsParam));
5939 }
5940
5941 if (isCallValid)
5942 {
5943 ParamCapture stridesParam("strides", ParamType::TGLsizeiConstPointer);
5944 InitParamValue(ParamType::TGLsizeiConstPointer, strides, &stridesParam.value);
5945 CaptureVertexArrayVertexBuffers_strides(glState, isCallValid, vaobjPacked, first, count,
5946 buffersPacked, offsets, strides, &stridesParam);
5947 paramBuffer.addParam(std::move(stridesParam));
5948 }
5949 else
5950 {
5951 ParamCapture stridesParam("strides", ParamType::TGLsizeiConstPointer);
5952 InitParamValue(ParamType::TGLsizeiConstPointer, static_cast<const GLsizei *>(nullptr),
5953 &stridesParam.value);
5954 paramBuffer.addParam(std::move(stridesParam));
5955 }
5956
5957 return CallCapture(angle::EntryPoint::GLVertexArrayVertexBuffers, std::move(paramBuffer));
5958 }
5959
5960 // GL 4.6
CaptureMultiDrawArraysIndirectCount(const State & glState,bool isCallValid,GLenum mode,const void * indirect,GLintptr drawcount,GLsizei maxdrawcount,GLsizei stride)5961 CallCapture CaptureMultiDrawArraysIndirectCount(const State &glState,
5962 bool isCallValid,
5963 GLenum mode,
5964 const void *indirect,
5965 GLintptr drawcount,
5966 GLsizei maxdrawcount,
5967 GLsizei stride)
5968 {
5969 ParamBuffer paramBuffer;
5970
5971 paramBuffer.addEnumParam("mode", BigGLEnum::PrimitiveType, ParamType::TGLenum, mode);
5972
5973 if (isCallValid)
5974 {
5975 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
5976 InitParamValue(ParamType::TvoidConstPointer, indirect, &indirectParam.value);
5977 CaptureMultiDrawArraysIndirectCount_indirect(
5978 glState, isCallValid, mode, indirect, drawcount, maxdrawcount, stride, &indirectParam);
5979 paramBuffer.addParam(std::move(indirectParam));
5980 }
5981 else
5982 {
5983 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
5984 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
5985 &indirectParam.value);
5986 paramBuffer.addParam(std::move(indirectParam));
5987 }
5988
5989 paramBuffer.addValueParam("drawcount", ParamType::TGLintptr, drawcount);
5990 paramBuffer.addValueParam("maxdrawcount", ParamType::TGLsizei, maxdrawcount);
5991 paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
5992
5993 return CallCapture(angle::EntryPoint::GLMultiDrawArraysIndirectCount, std::move(paramBuffer));
5994 }
5995
CaptureMultiDrawElementsIndirectCount(const State & glState,bool isCallValid,GLenum mode,GLenum type,const void * indirect,GLintptr drawcount,GLsizei maxdrawcount,GLsizei stride)5996 CallCapture CaptureMultiDrawElementsIndirectCount(const State &glState,
5997 bool isCallValid,
5998 GLenum mode,
5999 GLenum type,
6000 const void *indirect,
6001 GLintptr drawcount,
6002 GLsizei maxdrawcount,
6003 GLsizei stride)
6004 {
6005 ParamBuffer paramBuffer;
6006
6007 paramBuffer.addEnumParam("mode", BigGLEnum::PrimitiveType, ParamType::TGLenum, mode);
6008 paramBuffer.addEnumParam("type", BigGLEnum::DrawElementsType, ParamType::TGLenum, type);
6009
6010 if (isCallValid)
6011 {
6012 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
6013 InitParamValue(ParamType::TvoidConstPointer, indirect, &indirectParam.value);
6014 CaptureMultiDrawElementsIndirectCount_indirect(glState, isCallValid, mode, type, indirect,
6015 drawcount, maxdrawcount, stride,
6016 &indirectParam);
6017 paramBuffer.addParam(std::move(indirectParam));
6018 }
6019 else
6020 {
6021 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
6022 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
6023 &indirectParam.value);
6024 paramBuffer.addParam(std::move(indirectParam));
6025 }
6026
6027 paramBuffer.addValueParam("drawcount", ParamType::TGLintptr, drawcount);
6028 paramBuffer.addValueParam("maxdrawcount", ParamType::TGLsizei, maxdrawcount);
6029 paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
6030
6031 return CallCapture(angle::EntryPoint::GLMultiDrawElementsIndirectCount, std::move(paramBuffer));
6032 }
6033
CapturePolygonOffsetClamp(const State & glState,bool isCallValid,GLfloat factor,GLfloat units,GLfloat clamp)6034 CallCapture CapturePolygonOffsetClamp(const State &glState,
6035 bool isCallValid,
6036 GLfloat factor,
6037 GLfloat units,
6038 GLfloat clamp)
6039 {
6040 ParamBuffer paramBuffer;
6041
6042 paramBuffer.addValueParam("factor", ParamType::TGLfloat, factor);
6043 paramBuffer.addValueParam("units", ParamType::TGLfloat, units);
6044 paramBuffer.addValueParam("clamp", ParamType::TGLfloat, clamp);
6045
6046 return CallCapture(angle::EntryPoint::GLPolygonOffsetClamp, std::move(paramBuffer));
6047 }
6048
CaptureSpecializeShader(const State & glState,bool isCallValid,GLuint shader,const GLchar * pEntryPoint,GLuint numSpecializationConstants,const GLuint * pConstantIndex,const GLuint * pConstantValue)6049 CallCapture CaptureSpecializeShader(const State &glState,
6050 bool isCallValid,
6051 GLuint shader,
6052 const GLchar *pEntryPoint,
6053 GLuint numSpecializationConstants,
6054 const GLuint *pConstantIndex,
6055 const GLuint *pConstantValue)
6056 {
6057 ParamBuffer paramBuffer;
6058
6059 paramBuffer.addValueParam("shader", ParamType::TGLuint, shader);
6060
6061 if (isCallValid)
6062 {
6063 ParamCapture pEntryPointParam("pEntryPoint", ParamType::TGLcharConstPointer);
6064 InitParamValue(ParamType::TGLcharConstPointer, pEntryPoint, &pEntryPointParam.value);
6065 CaptureSpecializeShader_pEntryPoint(glState, isCallValid, shader, pEntryPoint,
6066 numSpecializationConstants, pConstantIndex,
6067 pConstantValue, &pEntryPointParam);
6068 paramBuffer.addParam(std::move(pEntryPointParam));
6069 }
6070 else
6071 {
6072 ParamCapture pEntryPointParam("pEntryPoint", ParamType::TGLcharConstPointer);
6073 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
6074 &pEntryPointParam.value);
6075 paramBuffer.addParam(std::move(pEntryPointParam));
6076 }
6077
6078 paramBuffer.addValueParam("numSpecializationConstants", ParamType::TGLuint,
6079 numSpecializationConstants);
6080
6081 if (isCallValid)
6082 {
6083 ParamCapture pConstantIndexParam("pConstantIndex", ParamType::TGLuintConstPointer);
6084 InitParamValue(ParamType::TGLuintConstPointer, pConstantIndex, &pConstantIndexParam.value);
6085 CaptureSpecializeShader_pConstantIndex(glState, isCallValid, shader, pEntryPoint,
6086 numSpecializationConstants, pConstantIndex,
6087 pConstantValue, &pConstantIndexParam);
6088 paramBuffer.addParam(std::move(pConstantIndexParam));
6089 }
6090 else
6091 {
6092 ParamCapture pConstantIndexParam("pConstantIndex", ParamType::TGLuintConstPointer);
6093 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
6094 &pConstantIndexParam.value);
6095 paramBuffer.addParam(std::move(pConstantIndexParam));
6096 }
6097
6098 if (isCallValid)
6099 {
6100 ParamCapture pConstantValueParam("pConstantValue", ParamType::TGLuintConstPointer);
6101 InitParamValue(ParamType::TGLuintConstPointer, pConstantValue, &pConstantValueParam.value);
6102 CaptureSpecializeShader_pConstantValue(glState, isCallValid, shader, pEntryPoint,
6103 numSpecializationConstants, pConstantIndex,
6104 pConstantValue, &pConstantValueParam);
6105 paramBuffer.addParam(std::move(pConstantValueParam));
6106 }
6107 else
6108 {
6109 ParamCapture pConstantValueParam("pConstantValue", ParamType::TGLuintConstPointer);
6110 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
6111 &pConstantValueParam.value);
6112 paramBuffer.addParam(std::move(pConstantValueParam));
6113 }
6114
6115 return CallCapture(angle::EntryPoint::GLSpecializeShader, std::move(paramBuffer));
6116 }
6117
6118 } // namespace gl
6119