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