1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // capture_gles_3_1_autogen.cpp:
9 // Capture functions for the OpenGL ES 3.1 entry points.
10
11 #include "libANGLE/capture/capture_gles_3_1_autogen.h"
12
13 #include "libANGLE/Context.h"
14 #include "libANGLE/capture/FrameCapture.h"
15 #include "libANGLE/capture/gl_enum_utils.h"
16 #include "libANGLE/validationES31.h"
17
18 using namespace angle;
19
20 namespace gl
21 {
22
CaptureActiveShaderProgram(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,ShaderProgramID programPacked)23 CallCapture CaptureActiveShaderProgram(const State &glState,
24 bool isCallValid,
25 ProgramPipelineID pipelinePacked,
26 ShaderProgramID programPacked)
27 {
28 ParamBuffer paramBuffer;
29
30 paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
31 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
32
33 return CallCapture(angle::EntryPoint::GLActiveShaderProgram, std::move(paramBuffer));
34 }
35
CaptureBindImageTexture(const State & glState,bool isCallValid,GLuint unit,TextureID texturePacked,GLint level,GLboolean layered,GLint layer,GLenum access,GLenum format)36 CallCapture CaptureBindImageTexture(const State &glState,
37 bool isCallValid,
38 GLuint unit,
39 TextureID texturePacked,
40 GLint level,
41 GLboolean layered,
42 GLint layer,
43 GLenum access,
44 GLenum format)
45 {
46 ParamBuffer paramBuffer;
47
48 paramBuffer.addValueParam("unit", ParamType::TGLuint, unit);
49 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
50 paramBuffer.addValueParam("level", ParamType::TGLint, level);
51 paramBuffer.addValueParam("layered", ParamType::TGLboolean, layered);
52 paramBuffer.addValueParam("layer", ParamType::TGLint, layer);
53 paramBuffer.addEnumParam("access", GLenumGroup::BufferAccessARB, ParamType::TGLenum, access);
54 paramBuffer.addEnumParam("format", GLenumGroup::InternalFormat, ParamType::TGLenum, format);
55
56 return CallCapture(angle::EntryPoint::GLBindImageTexture, std::move(paramBuffer));
57 }
58
CaptureBindProgramPipeline(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked)59 CallCapture CaptureBindProgramPipeline(const State &glState,
60 bool isCallValid,
61 ProgramPipelineID pipelinePacked)
62 {
63 ParamBuffer paramBuffer;
64
65 paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
66
67 return CallCapture(angle::EntryPoint::GLBindProgramPipeline, std::move(paramBuffer));
68 }
69
CaptureBindVertexBuffer(const State & glState,bool isCallValid,GLuint bindingindex,BufferID bufferPacked,GLintptr offset,GLsizei stride)70 CallCapture CaptureBindVertexBuffer(const State &glState,
71 bool isCallValid,
72 GLuint bindingindex,
73 BufferID bufferPacked,
74 GLintptr offset,
75 GLsizei stride)
76 {
77 ParamBuffer paramBuffer;
78
79 paramBuffer.addValueParam("bindingindex", ParamType::TGLuint, bindingindex);
80 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
81 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
82 paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
83
84 return CallCapture(angle::EntryPoint::GLBindVertexBuffer, std::move(paramBuffer));
85 }
86
CaptureCreateShaderProgramv(const State & glState,bool isCallValid,ShaderType typePacked,GLsizei count,const GLchar * const * strings,GLuint returnValue)87 CallCapture CaptureCreateShaderProgramv(const State &glState,
88 bool isCallValid,
89 ShaderType typePacked,
90 GLsizei count,
91 const GLchar *const *strings,
92 GLuint returnValue)
93 {
94 ParamBuffer paramBuffer;
95
96 paramBuffer.addValueParam("typePacked", ParamType::TShaderType, typePacked);
97 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
98
99 if (isCallValid)
100 {
101 ParamCapture stringsParam("strings", ParamType::TGLcharConstPointerPointer);
102 InitParamValue(ParamType::TGLcharConstPointerPointer, strings, &stringsParam.value);
103 CaptureCreateShaderProgramv_strings(glState, isCallValid, typePacked, count, strings,
104 &stringsParam);
105 paramBuffer.addParam(std::move(stringsParam));
106 }
107 else
108 {
109 ParamCapture stringsParam("strings", ParamType::TGLcharConstPointerPointer);
110 InitParamValue(ParamType::TGLcharConstPointerPointer,
111 static_cast<const GLchar *const *>(nullptr), &stringsParam.value);
112 paramBuffer.addParam(std::move(stringsParam));
113 }
114
115 ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
116 InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
117 paramBuffer.addReturnValue(std::move(returnValueCapture));
118
119 return CallCapture(angle::EntryPoint::GLCreateShaderProgramv, std::move(paramBuffer));
120 }
121
CaptureDeleteProgramPipelines(const State & glState,bool isCallValid,GLsizei n,const ProgramPipelineID * pipelinesPacked)122 CallCapture CaptureDeleteProgramPipelines(const State &glState,
123 bool isCallValid,
124 GLsizei n,
125 const ProgramPipelineID *pipelinesPacked)
126 {
127 ParamBuffer paramBuffer;
128
129 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
130
131 if (isCallValid)
132 {
133 ParamCapture pipelinesPackedParam("pipelinesPacked",
134 ParamType::TProgramPipelineIDConstPointer);
135 InitParamValue(ParamType::TProgramPipelineIDConstPointer, pipelinesPacked,
136 &pipelinesPackedParam.value);
137 CaptureDeleteProgramPipelines_pipelinesPacked(glState, isCallValid, n, pipelinesPacked,
138 &pipelinesPackedParam);
139 paramBuffer.addParam(std::move(pipelinesPackedParam));
140 }
141 else
142 {
143 ParamCapture pipelinesPackedParam("pipelinesPacked",
144 ParamType::TProgramPipelineIDConstPointer);
145 InitParamValue(ParamType::TProgramPipelineIDConstPointer,
146 static_cast<const ProgramPipelineID *>(nullptr),
147 &pipelinesPackedParam.value);
148 paramBuffer.addParam(std::move(pipelinesPackedParam));
149 }
150
151 return CallCapture(angle::EntryPoint::GLDeleteProgramPipelines, std::move(paramBuffer));
152 }
153
CaptureDispatchCompute(const State & glState,bool isCallValid,GLuint num_groups_x,GLuint num_groups_y,GLuint num_groups_z)154 CallCapture CaptureDispatchCompute(const State &glState,
155 bool isCallValid,
156 GLuint num_groups_x,
157 GLuint num_groups_y,
158 GLuint num_groups_z)
159 {
160 ParamBuffer paramBuffer;
161
162 paramBuffer.addValueParam("num_groups_x", ParamType::TGLuint, num_groups_x);
163 paramBuffer.addValueParam("num_groups_y", ParamType::TGLuint, num_groups_y);
164 paramBuffer.addValueParam("num_groups_z", ParamType::TGLuint, num_groups_z);
165
166 return CallCapture(angle::EntryPoint::GLDispatchCompute, std::move(paramBuffer));
167 }
168
CaptureDispatchComputeIndirect(const State & glState,bool isCallValid,GLintptr indirect)169 CallCapture CaptureDispatchComputeIndirect(const State &glState,
170 bool isCallValid,
171 GLintptr indirect)
172 {
173 ParamBuffer paramBuffer;
174
175 paramBuffer.addValueParam("indirect", ParamType::TGLintptr, indirect);
176
177 return CallCapture(angle::EntryPoint::GLDispatchComputeIndirect, std::move(paramBuffer));
178 }
179
CaptureDrawArraysIndirect(const State & glState,bool isCallValid,PrimitiveMode modePacked,const void * indirect)180 CallCapture CaptureDrawArraysIndirect(const State &glState,
181 bool isCallValid,
182 PrimitiveMode modePacked,
183 const void *indirect)
184 {
185 ParamBuffer paramBuffer;
186
187 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
188
189 if (isCallValid)
190 {
191 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
192 InitParamValue(ParamType::TvoidConstPointer, indirect, &indirectParam.value);
193 CaptureDrawArraysIndirect_indirect(glState, isCallValid, modePacked, indirect,
194 &indirectParam);
195 paramBuffer.addParam(std::move(indirectParam));
196 }
197 else
198 {
199 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
200 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
201 &indirectParam.value);
202 paramBuffer.addParam(std::move(indirectParam));
203 }
204
205 return CallCapture(angle::EntryPoint::GLDrawArraysIndirect, std::move(paramBuffer));
206 }
207
CaptureDrawElementsIndirect(const State & glState,bool isCallValid,PrimitiveMode modePacked,DrawElementsType typePacked,const void * indirect)208 CallCapture CaptureDrawElementsIndirect(const State &glState,
209 bool isCallValid,
210 PrimitiveMode modePacked,
211 DrawElementsType typePacked,
212 const void *indirect)
213 {
214 ParamBuffer paramBuffer;
215
216 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
217 paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
218
219 if (isCallValid)
220 {
221 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
222 InitParamValue(ParamType::TvoidConstPointer, indirect, &indirectParam.value);
223 CaptureDrawElementsIndirect_indirect(glState, isCallValid, modePacked, typePacked, indirect,
224 &indirectParam);
225 paramBuffer.addParam(std::move(indirectParam));
226 }
227 else
228 {
229 ParamCapture indirectParam("indirect", ParamType::TvoidConstPointer);
230 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
231 &indirectParam.value);
232 paramBuffer.addParam(std::move(indirectParam));
233 }
234
235 return CallCapture(angle::EntryPoint::GLDrawElementsIndirect, std::move(paramBuffer));
236 }
237
CaptureFramebufferParameteri(const State & glState,bool isCallValid,GLenum target,GLenum pname,GLint param)238 CallCapture CaptureFramebufferParameteri(const State &glState,
239 bool isCallValid,
240 GLenum target,
241 GLenum pname,
242 GLint param)
243 {
244 ParamBuffer paramBuffer;
245
246 paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
247 paramBuffer.addEnumParam("pname", GLenumGroup::FramebufferParameterName, ParamType::TGLenum,
248 pname);
249 paramBuffer.addValueParam("param", ParamType::TGLint, param);
250
251 return CallCapture(angle::EntryPoint::GLFramebufferParameteri, std::move(paramBuffer));
252 }
253
CaptureGenProgramPipelines(const State & glState,bool isCallValid,GLsizei n,ProgramPipelineID * pipelinesPacked)254 CallCapture CaptureGenProgramPipelines(const State &glState,
255 bool isCallValid,
256 GLsizei n,
257 ProgramPipelineID *pipelinesPacked)
258 {
259 ParamBuffer paramBuffer;
260
261 paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
262
263 if (isCallValid)
264 {
265 ParamCapture pipelinesPackedParam("pipelinesPacked", ParamType::TProgramPipelineIDPointer);
266 InitParamValue(ParamType::TProgramPipelineIDPointer, pipelinesPacked,
267 &pipelinesPackedParam.value);
268 CaptureGenProgramPipelines_pipelinesPacked(glState, isCallValid, n, pipelinesPacked,
269 &pipelinesPackedParam);
270 paramBuffer.addParam(std::move(pipelinesPackedParam));
271 }
272 else
273 {
274 ParamCapture pipelinesPackedParam("pipelinesPacked", ParamType::TProgramPipelineIDPointer);
275 InitParamValue(ParamType::TProgramPipelineIDPointer,
276 static_cast<ProgramPipelineID *>(nullptr), &pipelinesPackedParam.value);
277 paramBuffer.addParam(std::move(pipelinesPackedParam));
278 }
279
280 return CallCapture(angle::EntryPoint::GLGenProgramPipelines, std::move(paramBuffer));
281 }
282
CaptureGetBooleani_v(const State & glState,bool isCallValid,GLenum target,GLuint index,GLboolean * data)283 CallCapture CaptureGetBooleani_v(const State &glState,
284 bool isCallValid,
285 GLenum target,
286 GLuint index,
287 GLboolean *data)
288 {
289 ParamBuffer paramBuffer;
290
291 paramBuffer.addEnumParam("target", GLenumGroup::BufferTargetARB, ParamType::TGLenum, target);
292 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
293
294 if (isCallValid)
295 {
296 ParamCapture dataParam("data", ParamType::TGLbooleanPointer);
297 InitParamValue(ParamType::TGLbooleanPointer, data, &dataParam.value);
298 CaptureGetBooleani_v_data(glState, isCallValid, target, index, data, &dataParam);
299 paramBuffer.addParam(std::move(dataParam));
300 }
301 else
302 {
303 ParamCapture dataParam("data", ParamType::TGLbooleanPointer);
304 InitParamValue(ParamType::TGLbooleanPointer, static_cast<GLboolean *>(nullptr),
305 &dataParam.value);
306 paramBuffer.addParam(std::move(dataParam));
307 }
308
309 return CallCapture(angle::EntryPoint::GLGetBooleani_v, std::move(paramBuffer));
310 }
311
CaptureGetFramebufferParameteriv(const State & glState,bool isCallValid,GLenum target,GLenum pname,GLint * params)312 CallCapture CaptureGetFramebufferParameteriv(const State &glState,
313 bool isCallValid,
314 GLenum target,
315 GLenum pname,
316 GLint *params)
317 {
318 ParamBuffer paramBuffer;
319
320 paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
321 paramBuffer.addEnumParam("pname", GLenumGroup::FramebufferAttachmentParameterName,
322 ParamType::TGLenum, pname);
323
324 if (isCallValid)
325 {
326 ParamCapture paramsParam("params", ParamType::TGLintPointer);
327 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
328 CaptureGetFramebufferParameteriv_params(glState, isCallValid, target, pname, params,
329 ¶msParam);
330 paramBuffer.addParam(std::move(paramsParam));
331 }
332 else
333 {
334 ParamCapture paramsParam("params", ParamType::TGLintPointer);
335 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
336 paramBuffer.addParam(std::move(paramsParam));
337 }
338
339 return CallCapture(angle::EntryPoint::GLGetFramebufferParameteriv, std::move(paramBuffer));
340 }
341
CaptureGetMultisamplefv(const State & glState,bool isCallValid,GLenum pname,GLuint index,GLfloat * val)342 CallCapture CaptureGetMultisamplefv(const State &glState,
343 bool isCallValid,
344 GLenum pname,
345 GLuint index,
346 GLfloat *val)
347 {
348 ParamBuffer paramBuffer;
349
350 paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
351 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
352
353 if (isCallValid)
354 {
355 ParamCapture valParam("val", ParamType::TGLfloatPointer);
356 InitParamValue(ParamType::TGLfloatPointer, val, &valParam.value);
357 CaptureGetMultisamplefv_val(glState, isCallValid, pname, index, val, &valParam);
358 paramBuffer.addParam(std::move(valParam));
359 }
360 else
361 {
362 ParamCapture valParam("val", ParamType::TGLfloatPointer);
363 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
364 &valParam.value);
365 paramBuffer.addParam(std::move(valParam));
366 }
367
368 return CallCapture(angle::EntryPoint::GLGetMultisamplefv, std::move(paramBuffer));
369 }
370
CaptureGetProgramInterfaceiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,GLenum pname,GLint * params)371 CallCapture CaptureGetProgramInterfaceiv(const State &glState,
372 bool isCallValid,
373 ShaderProgramID programPacked,
374 GLenum programInterface,
375 GLenum pname,
376 GLint *params)
377 {
378 ParamBuffer paramBuffer;
379
380 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
381 paramBuffer.addEnumParam("programInterface", GLenumGroup::ProgramInterface, ParamType::TGLenum,
382 programInterface);
383 paramBuffer.addEnumParam("pname", GLenumGroup::ProgramInterfacePName, ParamType::TGLenum,
384 pname);
385
386 if (isCallValid)
387 {
388 ParamCapture paramsParam("params", ParamType::TGLintPointer);
389 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
390 CaptureGetProgramInterfaceiv_params(glState, isCallValid, programPacked, programInterface,
391 pname, params, ¶msParam);
392 paramBuffer.addParam(std::move(paramsParam));
393 }
394 else
395 {
396 ParamCapture paramsParam("params", ParamType::TGLintPointer);
397 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
398 paramBuffer.addParam(std::move(paramsParam));
399 }
400
401 return CallCapture(angle::EntryPoint::GLGetProgramInterfaceiv, std::move(paramBuffer));
402 }
403
CaptureGetProgramPipelineInfoLog(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLsizei bufSize,GLsizei * length,GLchar * infoLog)404 CallCapture CaptureGetProgramPipelineInfoLog(const State &glState,
405 bool isCallValid,
406 ProgramPipelineID pipelinePacked,
407 GLsizei bufSize,
408 GLsizei *length,
409 GLchar *infoLog)
410 {
411 ParamBuffer paramBuffer;
412
413 paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
414 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
415
416 if (isCallValid)
417 {
418 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
419 InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
420 CaptureGetProgramPipelineInfoLog_length(glState, isCallValid, pipelinePacked, bufSize,
421 length, infoLog, &lengthParam);
422 paramBuffer.addParam(std::move(lengthParam));
423 }
424 else
425 {
426 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
427 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
428 &lengthParam.value);
429 paramBuffer.addParam(std::move(lengthParam));
430 }
431
432 if (isCallValid)
433 {
434 ParamCapture infoLogParam("infoLog", ParamType::TGLcharPointer);
435 InitParamValue(ParamType::TGLcharPointer, infoLog, &infoLogParam.value);
436 CaptureGetProgramPipelineInfoLog_infoLog(glState, isCallValid, pipelinePacked, bufSize,
437 length, infoLog, &infoLogParam);
438 paramBuffer.addParam(std::move(infoLogParam));
439 }
440 else
441 {
442 ParamCapture infoLogParam("infoLog", ParamType::TGLcharPointer);
443 InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
444 &infoLogParam.value);
445 paramBuffer.addParam(std::move(infoLogParam));
446 }
447
448 return CallCapture(angle::EntryPoint::GLGetProgramPipelineInfoLog, std::move(paramBuffer));
449 }
450
CaptureGetProgramPipelineiv(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLenum pname,GLint * params)451 CallCapture CaptureGetProgramPipelineiv(const State &glState,
452 bool isCallValid,
453 ProgramPipelineID pipelinePacked,
454 GLenum pname,
455 GLint *params)
456 {
457 ParamBuffer paramBuffer;
458
459 paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
460 paramBuffer.addEnumParam("pname", GLenumGroup::PipelineParameterName, ParamType::TGLenum,
461 pname);
462
463 if (isCallValid)
464 {
465 ParamCapture paramsParam("params", ParamType::TGLintPointer);
466 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
467 CaptureGetProgramPipelineiv_params(glState, isCallValid, pipelinePacked, pname, params,
468 ¶msParam);
469 paramBuffer.addParam(std::move(paramsParam));
470 }
471 else
472 {
473 ParamCapture paramsParam("params", ParamType::TGLintPointer);
474 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
475 paramBuffer.addParam(std::move(paramsParam));
476 }
477
478 return CallCapture(angle::EntryPoint::GLGetProgramPipelineiv, std::move(paramBuffer));
479 }
480
CaptureGetProgramResourceIndex(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,const GLchar * name,GLuint returnValue)481 CallCapture CaptureGetProgramResourceIndex(const State &glState,
482 bool isCallValid,
483 ShaderProgramID programPacked,
484 GLenum programInterface,
485 const GLchar *name,
486 GLuint returnValue)
487 {
488 ParamBuffer paramBuffer;
489
490 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
491 paramBuffer.addEnumParam("programInterface", GLenumGroup::ProgramInterface, ParamType::TGLenum,
492 programInterface);
493
494 if (isCallValid)
495 {
496 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
497 InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
498 CaptureGetProgramResourceIndex_name(glState, isCallValid, programPacked, programInterface,
499 name, &nameParam);
500 paramBuffer.addParam(std::move(nameParam));
501 }
502 else
503 {
504 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
505 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
506 &nameParam.value);
507 paramBuffer.addParam(std::move(nameParam));
508 }
509
510 ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
511 InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
512 paramBuffer.addReturnValue(std::move(returnValueCapture));
513
514 return CallCapture(angle::EntryPoint::GLGetProgramResourceIndex, std::move(paramBuffer));
515 }
516
CaptureGetProgramResourceLocation(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,const GLchar * name,GLint returnValue)517 CallCapture CaptureGetProgramResourceLocation(const State &glState,
518 bool isCallValid,
519 ShaderProgramID programPacked,
520 GLenum programInterface,
521 const GLchar *name,
522 GLint returnValue)
523 {
524 ParamBuffer paramBuffer;
525
526 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
527 paramBuffer.addEnumParam("programInterface", GLenumGroup::ProgramInterface, ParamType::TGLenum,
528 programInterface);
529
530 if (isCallValid)
531 {
532 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
533 InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
534 CaptureGetProgramResourceLocation_name(glState, isCallValid, programPacked,
535 programInterface, name, &nameParam);
536 paramBuffer.addParam(std::move(nameParam));
537 }
538 else
539 {
540 ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
541 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
542 &nameParam.value);
543 paramBuffer.addParam(std::move(nameParam));
544 }
545
546 ParamCapture returnValueCapture("returnValue", ParamType::TGLint);
547 InitParamValue(ParamType::TGLint, returnValue, &returnValueCapture.value);
548 paramBuffer.addReturnValue(std::move(returnValueCapture));
549
550 return CallCapture(angle::EntryPoint::GLGetProgramResourceLocation, std::move(paramBuffer));
551 }
552
CaptureGetProgramResourceName(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,GLuint index,GLsizei bufSize,GLsizei * length,GLchar * name)553 CallCapture CaptureGetProgramResourceName(const State &glState,
554 bool isCallValid,
555 ShaderProgramID programPacked,
556 GLenum programInterface,
557 GLuint index,
558 GLsizei bufSize,
559 GLsizei *length,
560 GLchar *name)
561 {
562 ParamBuffer paramBuffer;
563
564 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
565 paramBuffer.addEnumParam("programInterface", GLenumGroup::ProgramInterface, ParamType::TGLenum,
566 programInterface);
567 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
568 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
569
570 if (isCallValid)
571 {
572 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
573 InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
574 CaptureGetProgramResourceName_length(glState, isCallValid, programPacked, programInterface,
575 index, bufSize, length, name, &lengthParam);
576 paramBuffer.addParam(std::move(lengthParam));
577 }
578 else
579 {
580 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
581 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
582 &lengthParam.value);
583 paramBuffer.addParam(std::move(lengthParam));
584 }
585
586 if (isCallValid)
587 {
588 ParamCapture nameParam("name", ParamType::TGLcharPointer);
589 InitParamValue(ParamType::TGLcharPointer, name, &nameParam.value);
590 CaptureGetProgramResourceName_name(glState, isCallValid, programPacked, programInterface,
591 index, bufSize, length, name, &nameParam);
592 paramBuffer.addParam(std::move(nameParam));
593 }
594 else
595 {
596 ParamCapture nameParam("name", ParamType::TGLcharPointer);
597 InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr), &nameParam.value);
598 paramBuffer.addParam(std::move(nameParam));
599 }
600
601 return CallCapture(angle::EntryPoint::GLGetProgramResourceName, std::move(paramBuffer));
602 }
603
CaptureGetProgramResourceiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,GLenum programInterface,GLuint index,GLsizei propCount,const GLenum * props,GLsizei bufSize,GLsizei * length,GLint * params)604 CallCapture CaptureGetProgramResourceiv(const State &glState,
605 bool isCallValid,
606 ShaderProgramID programPacked,
607 GLenum programInterface,
608 GLuint index,
609 GLsizei propCount,
610 const GLenum *props,
611 GLsizei bufSize,
612 GLsizei *length,
613 GLint *params)
614 {
615 ParamBuffer paramBuffer;
616
617 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
618 paramBuffer.addEnumParam("programInterface", GLenumGroup::ProgramInterface, ParamType::TGLenum,
619 programInterface);
620 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
621 paramBuffer.addValueParam("propCount", ParamType::TGLsizei, propCount);
622
623 if (isCallValid)
624 {
625 ParamCapture propsParam("props", ParamType::TGLenumConstPointer);
626 InitParamValue(ParamType::TGLenumConstPointer, props, &propsParam.value);
627 CaptureGetProgramResourceiv_props(glState, isCallValid, programPacked, programInterface,
628 index, propCount, props, bufSize, length, params,
629 &propsParam);
630 paramBuffer.addParam(std::move(propsParam));
631 }
632 else
633 {
634 ParamCapture propsParam("props", ParamType::TGLenumConstPointer);
635 InitParamValue(ParamType::TGLenumConstPointer, static_cast<const GLenum *>(nullptr),
636 &propsParam.value);
637 paramBuffer.addParam(std::move(propsParam));
638 }
639
640 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
641
642 if (isCallValid)
643 {
644 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
645 InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
646 CaptureGetProgramResourceiv_length(glState, isCallValid, programPacked, programInterface,
647 index, propCount, props, bufSize, length, params,
648 &lengthParam);
649 paramBuffer.addParam(std::move(lengthParam));
650 }
651 else
652 {
653 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
654 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
655 &lengthParam.value);
656 paramBuffer.addParam(std::move(lengthParam));
657 }
658
659 if (isCallValid)
660 {
661 ParamCapture paramsParam("params", ParamType::TGLintPointer);
662 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
663 CaptureGetProgramResourceiv_params(glState, isCallValid, programPacked, programInterface,
664 index, propCount, props, bufSize, length, params,
665 ¶msParam);
666 paramBuffer.addParam(std::move(paramsParam));
667 }
668 else
669 {
670 ParamCapture paramsParam("params", ParamType::TGLintPointer);
671 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
672 paramBuffer.addParam(std::move(paramsParam));
673 }
674
675 return CallCapture(angle::EntryPoint::GLGetProgramResourceiv, std::move(paramBuffer));
676 }
677
CaptureGetTexLevelParameterfv(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum pname,GLfloat * params)678 CallCapture CaptureGetTexLevelParameterfv(const State &glState,
679 bool isCallValid,
680 TextureTarget targetPacked,
681 GLint level,
682 GLenum pname,
683 GLfloat *params)
684 {
685 ParamBuffer paramBuffer;
686
687 paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
688 paramBuffer.addValueParam("level", ParamType::TGLint, level);
689 paramBuffer.addEnumParam("pname", GLenumGroup::GetTextureParameter, ParamType::TGLenum, pname);
690
691 if (isCallValid)
692 {
693 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
694 InitParamValue(ParamType::TGLfloatPointer, params, ¶msParam.value);
695 CaptureGetTexLevelParameterfv_params(glState, isCallValid, targetPacked, level, pname,
696 params, ¶msParam);
697 paramBuffer.addParam(std::move(paramsParam));
698 }
699 else
700 {
701 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
702 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
703 ¶msParam.value);
704 paramBuffer.addParam(std::move(paramsParam));
705 }
706
707 return CallCapture(angle::EntryPoint::GLGetTexLevelParameterfv, std::move(paramBuffer));
708 }
709
CaptureGetTexLevelParameteriv(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum pname,GLint * params)710 CallCapture CaptureGetTexLevelParameteriv(const State &glState,
711 bool isCallValid,
712 TextureTarget targetPacked,
713 GLint level,
714 GLenum pname,
715 GLint *params)
716 {
717 ParamBuffer paramBuffer;
718
719 paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
720 paramBuffer.addValueParam("level", ParamType::TGLint, level);
721 paramBuffer.addEnumParam("pname", GLenumGroup::GetTextureParameter, ParamType::TGLenum, pname);
722
723 if (isCallValid)
724 {
725 ParamCapture paramsParam("params", ParamType::TGLintPointer);
726 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
727 CaptureGetTexLevelParameteriv_params(glState, isCallValid, targetPacked, level, pname,
728 params, ¶msParam);
729 paramBuffer.addParam(std::move(paramsParam));
730 }
731 else
732 {
733 ParamCapture paramsParam("params", ParamType::TGLintPointer);
734 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
735 paramBuffer.addParam(std::move(paramsParam));
736 }
737
738 return CallCapture(angle::EntryPoint::GLGetTexLevelParameteriv, std::move(paramBuffer));
739 }
740
CaptureIsProgramPipeline(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLboolean returnValue)741 CallCapture CaptureIsProgramPipeline(const State &glState,
742 bool isCallValid,
743 ProgramPipelineID pipelinePacked,
744 GLboolean returnValue)
745 {
746 ParamBuffer paramBuffer;
747
748 paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
749
750 ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
751 InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
752 paramBuffer.addReturnValue(std::move(returnValueCapture));
753
754 return CallCapture(angle::EntryPoint::GLIsProgramPipeline, std::move(paramBuffer));
755 }
756
CaptureMemoryBarrier(const State & glState,bool isCallValid,GLbitfield barriers)757 CallCapture CaptureMemoryBarrier(const State &glState, bool isCallValid, GLbitfield barriers)
758 {
759 ParamBuffer paramBuffer;
760
761 paramBuffer.addEnumParam("barriers", GLenumGroup::MemoryBarrierMask, ParamType::TGLbitfield,
762 barriers);
763
764 return CallCapture(angle::EntryPoint::GLMemoryBarrier, std::move(paramBuffer));
765 }
766
CaptureMemoryBarrierByRegion(const State & glState,bool isCallValid,GLbitfield barriers)767 CallCapture CaptureMemoryBarrierByRegion(const State &glState,
768 bool isCallValid,
769 GLbitfield barriers)
770 {
771 ParamBuffer paramBuffer;
772
773 paramBuffer.addEnumParam("barriers", GLenumGroup::MemoryBarrierMask, ParamType::TGLbitfield,
774 barriers);
775
776 return CallCapture(angle::EntryPoint::GLMemoryBarrierByRegion, std::move(paramBuffer));
777 }
778
CaptureProgramUniform1f(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0)779 CallCapture CaptureProgramUniform1f(const State &glState,
780 bool isCallValid,
781 ShaderProgramID programPacked,
782 UniformLocation locationPacked,
783 GLfloat v0)
784 {
785 ParamBuffer paramBuffer;
786
787 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
788 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
789 paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
790
791 return CallCapture(angle::EntryPoint::GLProgramUniform1f, std::move(paramBuffer));
792 }
793
CaptureProgramUniform1fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)794 CallCapture CaptureProgramUniform1fv(const State &glState,
795 bool isCallValid,
796 ShaderProgramID programPacked,
797 UniformLocation locationPacked,
798 GLsizei count,
799 const GLfloat *value)
800 {
801 ParamBuffer paramBuffer;
802
803 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
804 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
805 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
806
807 if (isCallValid)
808 {
809 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
810 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
811 CaptureProgramUniform1fv_value(glState, isCallValid, programPacked, locationPacked, count,
812 value, &valueParam);
813 paramBuffer.addParam(std::move(valueParam));
814 }
815 else
816 {
817 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
818 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
819 &valueParam.value);
820 paramBuffer.addParam(std::move(valueParam));
821 }
822
823 return CallCapture(angle::EntryPoint::GLProgramUniform1fv, std::move(paramBuffer));
824 }
825
CaptureProgramUniform1i(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0)826 CallCapture CaptureProgramUniform1i(const State &glState,
827 bool isCallValid,
828 ShaderProgramID programPacked,
829 UniformLocation locationPacked,
830 GLint v0)
831 {
832 ParamBuffer paramBuffer;
833
834 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
835 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
836 paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
837
838 return CallCapture(angle::EntryPoint::GLProgramUniform1i, std::move(paramBuffer));
839 }
840
CaptureProgramUniform1iv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)841 CallCapture CaptureProgramUniform1iv(const State &glState,
842 bool isCallValid,
843 ShaderProgramID programPacked,
844 UniformLocation locationPacked,
845 GLsizei count,
846 const GLint *value)
847 {
848 ParamBuffer paramBuffer;
849
850 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
851 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
852 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
853
854 if (isCallValid)
855 {
856 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
857 InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
858 CaptureProgramUniform1iv_value(glState, isCallValid, programPacked, locationPacked, count,
859 value, &valueParam);
860 paramBuffer.addParam(std::move(valueParam));
861 }
862 else
863 {
864 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
865 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
866 &valueParam.value);
867 paramBuffer.addParam(std::move(valueParam));
868 }
869
870 return CallCapture(angle::EntryPoint::GLProgramUniform1iv, std::move(paramBuffer));
871 }
872
CaptureProgramUniform1ui(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0)873 CallCapture CaptureProgramUniform1ui(const State &glState,
874 bool isCallValid,
875 ShaderProgramID programPacked,
876 UniformLocation locationPacked,
877 GLuint v0)
878 {
879 ParamBuffer paramBuffer;
880
881 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
882 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
883 paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
884
885 return CallCapture(angle::EntryPoint::GLProgramUniform1ui, std::move(paramBuffer));
886 }
887
CaptureProgramUniform1uiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)888 CallCapture CaptureProgramUniform1uiv(const State &glState,
889 bool isCallValid,
890 ShaderProgramID programPacked,
891 UniformLocation locationPacked,
892 GLsizei count,
893 const GLuint *value)
894 {
895 ParamBuffer paramBuffer;
896
897 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
898 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
899 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
900
901 if (isCallValid)
902 {
903 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
904 InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
905 CaptureProgramUniform1uiv_value(glState, isCallValid, programPacked, locationPacked, count,
906 value, &valueParam);
907 paramBuffer.addParam(std::move(valueParam));
908 }
909 else
910 {
911 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
912 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
913 &valueParam.value);
914 paramBuffer.addParam(std::move(valueParam));
915 }
916
917 return CallCapture(angle::EntryPoint::GLProgramUniform1uiv, std::move(paramBuffer));
918 }
919
CaptureProgramUniform2f(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0,GLfloat v1)920 CallCapture CaptureProgramUniform2f(const State &glState,
921 bool isCallValid,
922 ShaderProgramID programPacked,
923 UniformLocation locationPacked,
924 GLfloat v0,
925 GLfloat v1)
926 {
927 ParamBuffer paramBuffer;
928
929 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
930 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
931 paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
932 paramBuffer.addValueParam("v1", ParamType::TGLfloat, v1);
933
934 return CallCapture(angle::EntryPoint::GLProgramUniform2f, std::move(paramBuffer));
935 }
936
CaptureProgramUniform2fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)937 CallCapture CaptureProgramUniform2fv(const State &glState,
938 bool isCallValid,
939 ShaderProgramID programPacked,
940 UniformLocation locationPacked,
941 GLsizei count,
942 const GLfloat *value)
943 {
944 ParamBuffer paramBuffer;
945
946 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
947 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
948 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
949
950 if (isCallValid)
951 {
952 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
953 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
954 CaptureProgramUniform2fv_value(glState, isCallValid, programPacked, locationPacked, count,
955 value, &valueParam);
956 paramBuffer.addParam(std::move(valueParam));
957 }
958 else
959 {
960 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
961 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
962 &valueParam.value);
963 paramBuffer.addParam(std::move(valueParam));
964 }
965
966 return CallCapture(angle::EntryPoint::GLProgramUniform2fv, std::move(paramBuffer));
967 }
968
CaptureProgramUniform2i(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0,GLint v1)969 CallCapture CaptureProgramUniform2i(const State &glState,
970 bool isCallValid,
971 ShaderProgramID programPacked,
972 UniformLocation locationPacked,
973 GLint v0,
974 GLint v1)
975 {
976 ParamBuffer paramBuffer;
977
978 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
979 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
980 paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
981 paramBuffer.addValueParam("v1", ParamType::TGLint, v1);
982
983 return CallCapture(angle::EntryPoint::GLProgramUniform2i, std::move(paramBuffer));
984 }
985
CaptureProgramUniform2iv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)986 CallCapture CaptureProgramUniform2iv(const State &glState,
987 bool isCallValid,
988 ShaderProgramID programPacked,
989 UniformLocation locationPacked,
990 GLsizei count,
991 const GLint *value)
992 {
993 ParamBuffer paramBuffer;
994
995 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
996 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
997 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
998
999 if (isCallValid)
1000 {
1001 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
1002 InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
1003 CaptureProgramUniform2iv_value(glState, isCallValid, programPacked, locationPacked, count,
1004 value, &valueParam);
1005 paramBuffer.addParam(std::move(valueParam));
1006 }
1007 else
1008 {
1009 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
1010 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1011 &valueParam.value);
1012 paramBuffer.addParam(std::move(valueParam));
1013 }
1014
1015 return CallCapture(angle::EntryPoint::GLProgramUniform2iv, std::move(paramBuffer));
1016 }
1017
CaptureProgramUniform2ui(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0,GLuint v1)1018 CallCapture CaptureProgramUniform2ui(const State &glState,
1019 bool isCallValid,
1020 ShaderProgramID programPacked,
1021 UniformLocation locationPacked,
1022 GLuint v0,
1023 GLuint v1)
1024 {
1025 ParamBuffer paramBuffer;
1026
1027 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1028 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1029 paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
1030 paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
1031
1032 return CallCapture(angle::EntryPoint::GLProgramUniform2ui, std::move(paramBuffer));
1033 }
1034
CaptureProgramUniform2uiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)1035 CallCapture CaptureProgramUniform2uiv(const State &glState,
1036 bool isCallValid,
1037 ShaderProgramID programPacked,
1038 UniformLocation locationPacked,
1039 GLsizei count,
1040 const GLuint *value)
1041 {
1042 ParamBuffer paramBuffer;
1043
1044 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1045 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1046 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1047
1048 if (isCallValid)
1049 {
1050 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1051 InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
1052 CaptureProgramUniform2uiv_value(glState, isCallValid, programPacked, locationPacked, count,
1053 value, &valueParam);
1054 paramBuffer.addParam(std::move(valueParam));
1055 }
1056 else
1057 {
1058 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1059 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
1060 &valueParam.value);
1061 paramBuffer.addParam(std::move(valueParam));
1062 }
1063
1064 return CallCapture(angle::EntryPoint::GLProgramUniform2uiv, std::move(paramBuffer));
1065 }
1066
CaptureProgramUniform3f(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0,GLfloat v1,GLfloat v2)1067 CallCapture CaptureProgramUniform3f(const State &glState,
1068 bool isCallValid,
1069 ShaderProgramID programPacked,
1070 UniformLocation locationPacked,
1071 GLfloat v0,
1072 GLfloat v1,
1073 GLfloat v2)
1074 {
1075 ParamBuffer paramBuffer;
1076
1077 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1078 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1079 paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
1080 paramBuffer.addValueParam("v1", ParamType::TGLfloat, v1);
1081 paramBuffer.addValueParam("v2", ParamType::TGLfloat, v2);
1082
1083 return CallCapture(angle::EntryPoint::GLProgramUniform3f, std::move(paramBuffer));
1084 }
1085
CaptureProgramUniform3fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)1086 CallCapture CaptureProgramUniform3fv(const State &glState,
1087 bool isCallValid,
1088 ShaderProgramID programPacked,
1089 UniformLocation locationPacked,
1090 GLsizei count,
1091 const GLfloat *value)
1092 {
1093 ParamBuffer paramBuffer;
1094
1095 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1096 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1097 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1098
1099 if (isCallValid)
1100 {
1101 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1102 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1103 CaptureProgramUniform3fv_value(glState, isCallValid, programPacked, locationPacked, count,
1104 value, &valueParam);
1105 paramBuffer.addParam(std::move(valueParam));
1106 }
1107 else
1108 {
1109 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1110 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1111 &valueParam.value);
1112 paramBuffer.addParam(std::move(valueParam));
1113 }
1114
1115 return CallCapture(angle::EntryPoint::GLProgramUniform3fv, std::move(paramBuffer));
1116 }
1117
CaptureProgramUniform3i(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0,GLint v1,GLint v2)1118 CallCapture CaptureProgramUniform3i(const State &glState,
1119 bool isCallValid,
1120 ShaderProgramID programPacked,
1121 UniformLocation locationPacked,
1122 GLint v0,
1123 GLint v1,
1124 GLint v2)
1125 {
1126 ParamBuffer paramBuffer;
1127
1128 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1129 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1130 paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
1131 paramBuffer.addValueParam("v1", ParamType::TGLint, v1);
1132 paramBuffer.addValueParam("v2", ParamType::TGLint, v2);
1133
1134 return CallCapture(angle::EntryPoint::GLProgramUniform3i, std::move(paramBuffer));
1135 }
1136
CaptureProgramUniform3iv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)1137 CallCapture CaptureProgramUniform3iv(const State &glState,
1138 bool isCallValid,
1139 ShaderProgramID programPacked,
1140 UniformLocation locationPacked,
1141 GLsizei count,
1142 const GLint *value)
1143 {
1144 ParamBuffer paramBuffer;
1145
1146 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1147 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1148 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1149
1150 if (isCallValid)
1151 {
1152 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
1153 InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
1154 CaptureProgramUniform3iv_value(glState, isCallValid, programPacked, locationPacked, count,
1155 value, &valueParam);
1156 paramBuffer.addParam(std::move(valueParam));
1157 }
1158 else
1159 {
1160 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
1161 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1162 &valueParam.value);
1163 paramBuffer.addParam(std::move(valueParam));
1164 }
1165
1166 return CallCapture(angle::EntryPoint::GLProgramUniform3iv, std::move(paramBuffer));
1167 }
1168
CaptureProgramUniform3ui(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0,GLuint v1,GLuint v2)1169 CallCapture CaptureProgramUniform3ui(const State &glState,
1170 bool isCallValid,
1171 ShaderProgramID programPacked,
1172 UniformLocation locationPacked,
1173 GLuint v0,
1174 GLuint v1,
1175 GLuint v2)
1176 {
1177 ParamBuffer paramBuffer;
1178
1179 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1180 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1181 paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
1182 paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
1183 paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);
1184
1185 return CallCapture(angle::EntryPoint::GLProgramUniform3ui, std::move(paramBuffer));
1186 }
1187
CaptureProgramUniform3uiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)1188 CallCapture CaptureProgramUniform3uiv(const State &glState,
1189 bool isCallValid,
1190 ShaderProgramID programPacked,
1191 UniformLocation locationPacked,
1192 GLsizei count,
1193 const GLuint *value)
1194 {
1195 ParamBuffer paramBuffer;
1196
1197 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1198 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1199 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1200
1201 if (isCallValid)
1202 {
1203 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1204 InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
1205 CaptureProgramUniform3uiv_value(glState, isCallValid, programPacked, locationPacked, count,
1206 value, &valueParam);
1207 paramBuffer.addParam(std::move(valueParam));
1208 }
1209 else
1210 {
1211 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1212 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
1213 &valueParam.value);
1214 paramBuffer.addParam(std::move(valueParam));
1215 }
1216
1217 return CallCapture(angle::EntryPoint::GLProgramUniform3uiv, std::move(paramBuffer));
1218 }
1219
CaptureProgramUniform4f(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLfloat v0,GLfloat v1,GLfloat v2,GLfloat v3)1220 CallCapture CaptureProgramUniform4f(const State &glState,
1221 bool isCallValid,
1222 ShaderProgramID programPacked,
1223 UniformLocation locationPacked,
1224 GLfloat v0,
1225 GLfloat v1,
1226 GLfloat v2,
1227 GLfloat v3)
1228 {
1229 ParamBuffer paramBuffer;
1230
1231 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1232 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1233 paramBuffer.addValueParam("v0", ParamType::TGLfloat, v0);
1234 paramBuffer.addValueParam("v1", ParamType::TGLfloat, v1);
1235 paramBuffer.addValueParam("v2", ParamType::TGLfloat, v2);
1236 paramBuffer.addValueParam("v3", ParamType::TGLfloat, v3);
1237
1238 return CallCapture(angle::EntryPoint::GLProgramUniform4f, std::move(paramBuffer));
1239 }
1240
CaptureProgramUniform4fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLfloat * value)1241 CallCapture CaptureProgramUniform4fv(const State &glState,
1242 bool isCallValid,
1243 ShaderProgramID programPacked,
1244 UniformLocation locationPacked,
1245 GLsizei count,
1246 const GLfloat *value)
1247 {
1248 ParamBuffer paramBuffer;
1249
1250 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1251 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1252 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1253
1254 if (isCallValid)
1255 {
1256 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1257 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1258 CaptureProgramUniform4fv_value(glState, isCallValid, programPacked, locationPacked, count,
1259 value, &valueParam);
1260 paramBuffer.addParam(std::move(valueParam));
1261 }
1262 else
1263 {
1264 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1265 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1266 &valueParam.value);
1267 paramBuffer.addParam(std::move(valueParam));
1268 }
1269
1270 return CallCapture(angle::EntryPoint::GLProgramUniform4fv, std::move(paramBuffer));
1271 }
1272
CaptureProgramUniform4i(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLint v0,GLint v1,GLint v2,GLint v3)1273 CallCapture CaptureProgramUniform4i(const State &glState,
1274 bool isCallValid,
1275 ShaderProgramID programPacked,
1276 UniformLocation locationPacked,
1277 GLint v0,
1278 GLint v1,
1279 GLint v2,
1280 GLint v3)
1281 {
1282 ParamBuffer paramBuffer;
1283
1284 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1285 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1286 paramBuffer.addValueParam("v0", ParamType::TGLint, v0);
1287 paramBuffer.addValueParam("v1", ParamType::TGLint, v1);
1288 paramBuffer.addValueParam("v2", ParamType::TGLint, v2);
1289 paramBuffer.addValueParam("v3", ParamType::TGLint, v3);
1290
1291 return CallCapture(angle::EntryPoint::GLProgramUniform4i, std::move(paramBuffer));
1292 }
1293
CaptureProgramUniform4iv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLint * value)1294 CallCapture CaptureProgramUniform4iv(const State &glState,
1295 bool isCallValid,
1296 ShaderProgramID programPacked,
1297 UniformLocation locationPacked,
1298 GLsizei count,
1299 const GLint *value)
1300 {
1301 ParamBuffer paramBuffer;
1302
1303 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1304 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1305 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1306
1307 if (isCallValid)
1308 {
1309 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
1310 InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
1311 CaptureProgramUniform4iv_value(glState, isCallValid, programPacked, locationPacked, count,
1312 value, &valueParam);
1313 paramBuffer.addParam(std::move(valueParam));
1314 }
1315 else
1316 {
1317 ParamCapture valueParam("value", ParamType::TGLintConstPointer);
1318 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1319 &valueParam.value);
1320 paramBuffer.addParam(std::move(valueParam));
1321 }
1322
1323 return CallCapture(angle::EntryPoint::GLProgramUniform4iv, std::move(paramBuffer));
1324 }
1325
CaptureProgramUniform4ui(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLuint v0,GLuint v1,GLuint v2,GLuint v3)1326 CallCapture CaptureProgramUniform4ui(const State &glState,
1327 bool isCallValid,
1328 ShaderProgramID programPacked,
1329 UniformLocation locationPacked,
1330 GLuint v0,
1331 GLuint v1,
1332 GLuint v2,
1333 GLuint v3)
1334 {
1335 ParamBuffer paramBuffer;
1336
1337 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1338 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1339 paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
1340 paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
1341 paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);
1342 paramBuffer.addValueParam("v3", ParamType::TGLuint, v3);
1343
1344 return CallCapture(angle::EntryPoint::GLProgramUniform4ui, std::move(paramBuffer));
1345 }
1346
CaptureProgramUniform4uiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,const GLuint * value)1347 CallCapture CaptureProgramUniform4uiv(const State &glState,
1348 bool isCallValid,
1349 ShaderProgramID programPacked,
1350 UniformLocation locationPacked,
1351 GLsizei count,
1352 const GLuint *value)
1353 {
1354 ParamBuffer paramBuffer;
1355
1356 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1357 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1358 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1359
1360 if (isCallValid)
1361 {
1362 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1363 InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
1364 CaptureProgramUniform4uiv_value(glState, isCallValid, programPacked, locationPacked, count,
1365 value, &valueParam);
1366 paramBuffer.addParam(std::move(valueParam));
1367 }
1368 else
1369 {
1370 ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
1371 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
1372 &valueParam.value);
1373 paramBuffer.addParam(std::move(valueParam));
1374 }
1375
1376 return CallCapture(angle::EntryPoint::GLProgramUniform4uiv, std::move(paramBuffer));
1377 }
1378
CaptureProgramUniformMatrix2fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1379 CallCapture CaptureProgramUniformMatrix2fv(const State &glState,
1380 bool isCallValid,
1381 ShaderProgramID programPacked,
1382 UniformLocation locationPacked,
1383 GLsizei count,
1384 GLboolean transpose,
1385 const GLfloat *value)
1386 {
1387 ParamBuffer paramBuffer;
1388
1389 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1390 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1391 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1392 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1393
1394 if (isCallValid)
1395 {
1396 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1397 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1398 CaptureProgramUniformMatrix2fv_value(glState, isCallValid, programPacked, locationPacked,
1399 count, transpose, value, &valueParam);
1400 paramBuffer.addParam(std::move(valueParam));
1401 }
1402 else
1403 {
1404 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1405 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1406 &valueParam.value);
1407 paramBuffer.addParam(std::move(valueParam));
1408 }
1409
1410 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2fv, std::move(paramBuffer));
1411 }
1412
CaptureProgramUniformMatrix2x3fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1413 CallCapture CaptureProgramUniformMatrix2x3fv(const State &glState,
1414 bool isCallValid,
1415 ShaderProgramID programPacked,
1416 UniformLocation locationPacked,
1417 GLsizei count,
1418 GLboolean transpose,
1419 const GLfloat *value)
1420 {
1421 ParamBuffer paramBuffer;
1422
1423 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1424 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1425 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1426 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1427
1428 if (isCallValid)
1429 {
1430 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1431 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1432 CaptureProgramUniformMatrix2x3fv_value(glState, isCallValid, programPacked, locationPacked,
1433 count, transpose, value, &valueParam);
1434 paramBuffer.addParam(std::move(valueParam));
1435 }
1436 else
1437 {
1438 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1439 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1440 &valueParam.value);
1441 paramBuffer.addParam(std::move(valueParam));
1442 }
1443
1444 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2x3fv, std::move(paramBuffer));
1445 }
1446
CaptureProgramUniformMatrix2x4fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1447 CallCapture CaptureProgramUniformMatrix2x4fv(const State &glState,
1448 bool isCallValid,
1449 ShaderProgramID programPacked,
1450 UniformLocation locationPacked,
1451 GLsizei count,
1452 GLboolean transpose,
1453 const GLfloat *value)
1454 {
1455 ParamBuffer paramBuffer;
1456
1457 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1458 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1459 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1460 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1461
1462 if (isCallValid)
1463 {
1464 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1465 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1466 CaptureProgramUniformMatrix2x4fv_value(glState, isCallValid, programPacked, locationPacked,
1467 count, transpose, value, &valueParam);
1468 paramBuffer.addParam(std::move(valueParam));
1469 }
1470 else
1471 {
1472 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1473 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1474 &valueParam.value);
1475 paramBuffer.addParam(std::move(valueParam));
1476 }
1477
1478 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix2x4fv, std::move(paramBuffer));
1479 }
1480
CaptureProgramUniformMatrix3fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1481 CallCapture CaptureProgramUniformMatrix3fv(const State &glState,
1482 bool isCallValid,
1483 ShaderProgramID programPacked,
1484 UniformLocation locationPacked,
1485 GLsizei count,
1486 GLboolean transpose,
1487 const GLfloat *value)
1488 {
1489 ParamBuffer paramBuffer;
1490
1491 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1492 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1493 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1494 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1495
1496 if (isCallValid)
1497 {
1498 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1499 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1500 CaptureProgramUniformMatrix3fv_value(glState, isCallValid, programPacked, locationPacked,
1501 count, transpose, value, &valueParam);
1502 paramBuffer.addParam(std::move(valueParam));
1503 }
1504 else
1505 {
1506 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1507 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1508 &valueParam.value);
1509 paramBuffer.addParam(std::move(valueParam));
1510 }
1511
1512 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3fv, std::move(paramBuffer));
1513 }
1514
CaptureProgramUniformMatrix3x2fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1515 CallCapture CaptureProgramUniformMatrix3x2fv(const State &glState,
1516 bool isCallValid,
1517 ShaderProgramID programPacked,
1518 UniformLocation locationPacked,
1519 GLsizei count,
1520 GLboolean transpose,
1521 const GLfloat *value)
1522 {
1523 ParamBuffer paramBuffer;
1524
1525 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1526 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1527 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1528 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1529
1530 if (isCallValid)
1531 {
1532 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1533 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1534 CaptureProgramUniformMatrix3x2fv_value(glState, isCallValid, programPacked, locationPacked,
1535 count, transpose, value, &valueParam);
1536 paramBuffer.addParam(std::move(valueParam));
1537 }
1538 else
1539 {
1540 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1541 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1542 &valueParam.value);
1543 paramBuffer.addParam(std::move(valueParam));
1544 }
1545
1546 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3x2fv, std::move(paramBuffer));
1547 }
1548
CaptureProgramUniformMatrix3x4fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1549 CallCapture CaptureProgramUniformMatrix3x4fv(const State &glState,
1550 bool isCallValid,
1551 ShaderProgramID programPacked,
1552 UniformLocation locationPacked,
1553 GLsizei count,
1554 GLboolean transpose,
1555 const GLfloat *value)
1556 {
1557 ParamBuffer paramBuffer;
1558
1559 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1560 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1561 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1562 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1563
1564 if (isCallValid)
1565 {
1566 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1567 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1568 CaptureProgramUniformMatrix3x4fv_value(glState, isCallValid, programPacked, locationPacked,
1569 count, transpose, value, &valueParam);
1570 paramBuffer.addParam(std::move(valueParam));
1571 }
1572 else
1573 {
1574 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1575 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1576 &valueParam.value);
1577 paramBuffer.addParam(std::move(valueParam));
1578 }
1579
1580 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix3x4fv, std::move(paramBuffer));
1581 }
1582
CaptureProgramUniformMatrix4fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1583 CallCapture CaptureProgramUniformMatrix4fv(const State &glState,
1584 bool isCallValid,
1585 ShaderProgramID programPacked,
1586 UniformLocation locationPacked,
1587 GLsizei count,
1588 GLboolean transpose,
1589 const GLfloat *value)
1590 {
1591 ParamBuffer paramBuffer;
1592
1593 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1594 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1595 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1596 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1597
1598 if (isCallValid)
1599 {
1600 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1601 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1602 CaptureProgramUniformMatrix4fv_value(glState, isCallValid, programPacked, locationPacked,
1603 count, transpose, value, &valueParam);
1604 paramBuffer.addParam(std::move(valueParam));
1605 }
1606 else
1607 {
1608 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1609 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1610 &valueParam.value);
1611 paramBuffer.addParam(std::move(valueParam));
1612 }
1613
1614 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4fv, std::move(paramBuffer));
1615 }
1616
CaptureProgramUniformMatrix4x2fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1617 CallCapture CaptureProgramUniformMatrix4x2fv(const State &glState,
1618 bool isCallValid,
1619 ShaderProgramID programPacked,
1620 UniformLocation locationPacked,
1621 GLsizei count,
1622 GLboolean transpose,
1623 const GLfloat *value)
1624 {
1625 ParamBuffer paramBuffer;
1626
1627 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1628 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1629 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1630 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1631
1632 if (isCallValid)
1633 {
1634 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1635 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1636 CaptureProgramUniformMatrix4x2fv_value(glState, isCallValid, programPacked, locationPacked,
1637 count, transpose, value, &valueParam);
1638 paramBuffer.addParam(std::move(valueParam));
1639 }
1640 else
1641 {
1642 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1643 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1644 &valueParam.value);
1645 paramBuffer.addParam(std::move(valueParam));
1646 }
1647
1648 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4x2fv, std::move(paramBuffer));
1649 }
1650
CaptureProgramUniformMatrix4x3fv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei count,GLboolean transpose,const GLfloat * value)1651 CallCapture CaptureProgramUniformMatrix4x3fv(const State &glState,
1652 bool isCallValid,
1653 ShaderProgramID programPacked,
1654 UniformLocation locationPacked,
1655 GLsizei count,
1656 GLboolean transpose,
1657 const GLfloat *value)
1658 {
1659 ParamBuffer paramBuffer;
1660
1661 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1662 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
1663 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
1664 paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);
1665
1666 if (isCallValid)
1667 {
1668 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1669 InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
1670 CaptureProgramUniformMatrix4x3fv_value(glState, isCallValid, programPacked, locationPacked,
1671 count, transpose, value, &valueParam);
1672 paramBuffer.addParam(std::move(valueParam));
1673 }
1674 else
1675 {
1676 ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
1677 InitParamValue(ParamType::TGLfloatConstPointer, static_cast<const GLfloat *>(nullptr),
1678 &valueParam.value);
1679 paramBuffer.addParam(std::move(valueParam));
1680 }
1681
1682 return CallCapture(angle::EntryPoint::GLProgramUniformMatrix4x3fv, std::move(paramBuffer));
1683 }
1684
CaptureSampleMaski(const State & glState,bool isCallValid,GLuint maskNumber,GLbitfield mask)1685 CallCapture CaptureSampleMaski(const State &glState,
1686 bool isCallValid,
1687 GLuint maskNumber,
1688 GLbitfield mask)
1689 {
1690 ParamBuffer paramBuffer;
1691
1692 paramBuffer.addValueParam("maskNumber", ParamType::TGLuint, maskNumber);
1693 paramBuffer.addEnumParam("mask", GLenumGroup::DefaultGroup, ParamType::TGLbitfield, mask);
1694
1695 return CallCapture(angle::EntryPoint::GLSampleMaski, std::move(paramBuffer));
1696 }
1697
CaptureTexStorage2DMultisample(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLboolean fixedsamplelocations)1698 CallCapture CaptureTexStorage2DMultisample(const State &glState,
1699 bool isCallValid,
1700 TextureType targetPacked,
1701 GLsizei samples,
1702 GLenum internalformat,
1703 GLsizei width,
1704 GLsizei height,
1705 GLboolean fixedsamplelocations)
1706 {
1707 ParamBuffer paramBuffer;
1708
1709 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1710 paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
1711 paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
1712 internalformat);
1713 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1714 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1715 paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);
1716
1717 return CallCapture(angle::EntryPoint::GLTexStorage2DMultisample, std::move(paramBuffer));
1718 }
1719
CaptureUseProgramStages(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked,GLbitfield stages,ShaderProgramID programPacked)1720 CallCapture CaptureUseProgramStages(const State &glState,
1721 bool isCallValid,
1722 ProgramPipelineID pipelinePacked,
1723 GLbitfield stages,
1724 ShaderProgramID programPacked)
1725 {
1726 ParamBuffer paramBuffer;
1727
1728 paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
1729 paramBuffer.addEnumParam("stages", GLenumGroup::UseProgramStageMask, ParamType::TGLbitfield,
1730 stages);
1731 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
1732
1733 return CallCapture(angle::EntryPoint::GLUseProgramStages, std::move(paramBuffer));
1734 }
1735
CaptureValidateProgramPipeline(const State & glState,bool isCallValid,ProgramPipelineID pipelinePacked)1736 CallCapture CaptureValidateProgramPipeline(const State &glState,
1737 bool isCallValid,
1738 ProgramPipelineID pipelinePacked)
1739 {
1740 ParamBuffer paramBuffer;
1741
1742 paramBuffer.addValueParam("pipelinePacked", ParamType::TProgramPipelineID, pipelinePacked);
1743
1744 return CallCapture(angle::EntryPoint::GLValidateProgramPipeline, std::move(paramBuffer));
1745 }
1746
CaptureVertexAttribBinding(const State & glState,bool isCallValid,GLuint attribindex,GLuint bindingindex)1747 CallCapture CaptureVertexAttribBinding(const State &glState,
1748 bool isCallValid,
1749 GLuint attribindex,
1750 GLuint bindingindex)
1751 {
1752 ParamBuffer paramBuffer;
1753
1754 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
1755 paramBuffer.addValueParam("bindingindex", ParamType::TGLuint, bindingindex);
1756
1757 return CallCapture(angle::EntryPoint::GLVertexAttribBinding, std::move(paramBuffer));
1758 }
1759
CaptureVertexAttribFormat(const State & glState,bool isCallValid,GLuint attribindex,GLint size,VertexAttribType typePacked,GLboolean normalized,GLuint relativeoffset)1760 CallCapture CaptureVertexAttribFormat(const State &glState,
1761 bool isCallValid,
1762 GLuint attribindex,
1763 GLint size,
1764 VertexAttribType typePacked,
1765 GLboolean normalized,
1766 GLuint relativeoffset)
1767 {
1768 ParamBuffer paramBuffer;
1769
1770 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
1771 paramBuffer.addValueParam("size", ParamType::TGLint, size);
1772 paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
1773 paramBuffer.addValueParam("normalized", ParamType::TGLboolean, normalized);
1774 paramBuffer.addValueParam("relativeoffset", ParamType::TGLuint, relativeoffset);
1775
1776 return CallCapture(angle::EntryPoint::GLVertexAttribFormat, std::move(paramBuffer));
1777 }
1778
CaptureVertexAttribIFormat(const State & glState,bool isCallValid,GLuint attribindex,GLint size,VertexAttribType typePacked,GLuint relativeoffset)1779 CallCapture CaptureVertexAttribIFormat(const State &glState,
1780 bool isCallValid,
1781 GLuint attribindex,
1782 GLint size,
1783 VertexAttribType typePacked,
1784 GLuint relativeoffset)
1785 {
1786 ParamBuffer paramBuffer;
1787
1788 paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
1789 paramBuffer.addValueParam("size", ParamType::TGLint, size);
1790 paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
1791 paramBuffer.addValueParam("relativeoffset", ParamType::TGLuint, relativeoffset);
1792
1793 return CallCapture(angle::EntryPoint::GLVertexAttribIFormat, std::move(paramBuffer));
1794 }
1795
CaptureVertexBindingDivisor(const State & glState,bool isCallValid,GLuint bindingindex,GLuint divisor)1796 CallCapture CaptureVertexBindingDivisor(const State &glState,
1797 bool isCallValid,
1798 GLuint bindingindex,
1799 GLuint divisor)
1800 {
1801 ParamBuffer paramBuffer;
1802
1803 paramBuffer.addValueParam("bindingindex", ParamType::TGLuint, bindingindex);
1804 paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
1805
1806 return CallCapture(angle::EntryPoint::GLVertexBindingDivisor, std::move(paramBuffer));
1807 }
1808
1809 } // namespace gl
1810