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_2_autogen.cpp:
9 // Capture functions for the OpenGL ES 3.2 entry points.
10
11 #include "libANGLE/capture/capture_gles_3_2_autogen.h"
12
13 #include "common/gl_enum_utils.h"
14 #include "libANGLE/Context.h"
15 #include "libANGLE/capture/FrameCapture.h"
16 #include "libANGLE/validationES32.h"
17
18 using namespace angle;
19
20 namespace gl
21 {
CaptureBlendBarrier(const State & glState,bool isCallValid)22 CallCapture CaptureBlendBarrier(const State &glState, bool isCallValid)
23 {
24 ParamBuffer paramBuffer;
25
26 return CallCapture(angle::EntryPoint::GLBlendBarrier, std::move(paramBuffer));
27 }
28
CaptureBlendEquationSeparatei(const State & glState,bool isCallValid,GLuint buf,GLenum modeRGB,GLenum modeAlpha)29 CallCapture CaptureBlendEquationSeparatei(const State &glState,
30 bool isCallValid,
31 GLuint buf,
32 GLenum modeRGB,
33 GLenum modeAlpha)
34 {
35 ParamBuffer paramBuffer;
36
37 paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
38 paramBuffer.addEnumParam("modeRGB", GLESEnum::BlendEquationModeEXT, ParamType::TGLenum,
39 modeRGB);
40 paramBuffer.addEnumParam("modeAlpha", GLESEnum::BlendEquationModeEXT, ParamType::TGLenum,
41 modeAlpha);
42
43 return CallCapture(angle::EntryPoint::GLBlendEquationSeparatei, std::move(paramBuffer));
44 }
45
CaptureBlendEquationi(const State & glState,bool isCallValid,GLuint buf,GLenum mode)46 CallCapture CaptureBlendEquationi(const State &glState, bool isCallValid, GLuint buf, GLenum mode)
47 {
48 ParamBuffer paramBuffer;
49
50 paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
51 paramBuffer.addEnumParam("mode", GLESEnum::BlendEquationModeEXT, ParamType::TGLenum, mode);
52
53 return CallCapture(angle::EntryPoint::GLBlendEquationi, std::move(paramBuffer));
54 }
55
CaptureBlendFuncSeparatei(const State & glState,bool isCallValid,GLuint buf,GLenum srcRGB,GLenum dstRGB,GLenum srcAlpha,GLenum dstAlpha)56 CallCapture CaptureBlendFuncSeparatei(const State &glState,
57 bool isCallValid,
58 GLuint buf,
59 GLenum srcRGB,
60 GLenum dstRGB,
61 GLenum srcAlpha,
62 GLenum dstAlpha)
63 {
64 ParamBuffer paramBuffer;
65
66 paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
67 paramBuffer.addEnumParam("srcRGB", GLESEnum::BlendingFactor, ParamType::TGLenum, srcRGB);
68 paramBuffer.addEnumParam("dstRGB", GLESEnum::BlendingFactor, ParamType::TGLenum, dstRGB);
69 paramBuffer.addEnumParam("srcAlpha", GLESEnum::BlendingFactor, ParamType::TGLenum, srcAlpha);
70 paramBuffer.addEnumParam("dstAlpha", GLESEnum::BlendingFactor, ParamType::TGLenum, dstAlpha);
71
72 return CallCapture(angle::EntryPoint::GLBlendFuncSeparatei, std::move(paramBuffer));
73 }
74
CaptureBlendFunci(const State & glState,bool isCallValid,GLuint buf,GLenum src,GLenum dst)75 CallCapture CaptureBlendFunci(const State &glState,
76 bool isCallValid,
77 GLuint buf,
78 GLenum src,
79 GLenum dst)
80 {
81 ParamBuffer paramBuffer;
82
83 paramBuffer.addValueParam("buf", ParamType::TGLuint, buf);
84 paramBuffer.addEnumParam("src", GLESEnum::BlendingFactor, ParamType::TGLenum, src);
85 paramBuffer.addEnumParam("dst", GLESEnum::BlendingFactor, ParamType::TGLenum, dst);
86
87 return CallCapture(angle::EntryPoint::GLBlendFunci, std::move(paramBuffer));
88 }
89
CaptureColorMaski(const State & glState,bool isCallValid,GLuint index,GLboolean r,GLboolean g,GLboolean b,GLboolean a)90 CallCapture CaptureColorMaski(const State &glState,
91 bool isCallValid,
92 GLuint index,
93 GLboolean r,
94 GLboolean g,
95 GLboolean b,
96 GLboolean a)
97 {
98 ParamBuffer paramBuffer;
99
100 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
101 paramBuffer.addValueParam("r", ParamType::TGLboolean, r);
102 paramBuffer.addValueParam("g", ParamType::TGLboolean, g);
103 paramBuffer.addValueParam("b", ParamType::TGLboolean, b);
104 paramBuffer.addValueParam("a", ParamType::TGLboolean, a);
105
106 return CallCapture(angle::EntryPoint::GLColorMaski, std::move(paramBuffer));
107 }
108
CaptureCopyImageSubData(const State & glState,bool isCallValid,GLuint srcName,GLenum srcTarget,GLint srcLevel,GLint srcX,GLint srcY,GLint srcZ,GLuint dstName,GLenum dstTarget,GLint dstLevel,GLint dstX,GLint dstY,GLint dstZ,GLsizei srcWidth,GLsizei srcHeight,GLsizei srcDepth)109 CallCapture CaptureCopyImageSubData(const State &glState,
110 bool isCallValid,
111 GLuint srcName,
112 GLenum srcTarget,
113 GLint srcLevel,
114 GLint srcX,
115 GLint srcY,
116 GLint srcZ,
117 GLuint dstName,
118 GLenum dstTarget,
119 GLint dstLevel,
120 GLint dstX,
121 GLint dstY,
122 GLint dstZ,
123 GLsizei srcWidth,
124 GLsizei srcHeight,
125 GLsizei srcDepth)
126 {
127 ParamBuffer paramBuffer;
128
129 paramBuffer.addValueParam("srcName", ParamType::TGLuint, srcName);
130 paramBuffer.addEnumParam("srcTarget", GLESEnum::CopyImageSubDataTarget, ParamType::TGLenum,
131 srcTarget);
132 paramBuffer.addValueParam("srcLevel", ParamType::TGLint, srcLevel);
133 paramBuffer.addValueParam("srcX", ParamType::TGLint, srcX);
134 paramBuffer.addValueParam("srcY", ParamType::TGLint, srcY);
135 paramBuffer.addValueParam("srcZ", ParamType::TGLint, srcZ);
136 paramBuffer.addValueParam("dstName", ParamType::TGLuint, dstName);
137 paramBuffer.addEnumParam("dstTarget", GLESEnum::CopyImageSubDataTarget, ParamType::TGLenum,
138 dstTarget);
139 paramBuffer.addValueParam("dstLevel", ParamType::TGLint, dstLevel);
140 paramBuffer.addValueParam("dstX", ParamType::TGLint, dstX);
141 paramBuffer.addValueParam("dstY", ParamType::TGLint, dstY);
142 paramBuffer.addValueParam("dstZ", ParamType::TGLint, dstZ);
143 paramBuffer.addValueParam("srcWidth", ParamType::TGLsizei, srcWidth);
144 paramBuffer.addValueParam("srcHeight", ParamType::TGLsizei, srcHeight);
145 paramBuffer.addValueParam("srcDepth", ParamType::TGLsizei, srcDepth);
146
147 return CallCapture(angle::EntryPoint::GLCopyImageSubData, std::move(paramBuffer));
148 }
149
CaptureDebugMessageCallback(const State & glState,bool isCallValid,GLDEBUGPROC callback,const void * userParam)150 CallCapture CaptureDebugMessageCallback(const State &glState,
151 bool isCallValid,
152 GLDEBUGPROC callback,
153 const void *userParam)
154 {
155 ParamBuffer paramBuffer;
156
157 paramBuffer.addValueParam("callback", ParamType::TGLDEBUGPROC, callback);
158
159 if (isCallValid)
160 {
161 ParamCapture userParamParam("userParam", ParamType::TvoidConstPointer);
162 InitParamValue(ParamType::TvoidConstPointer, userParam, &userParamParam.value);
163 CaptureDebugMessageCallback_userParam(glState, isCallValid, callback, userParam,
164 &userParamParam);
165 paramBuffer.addParam(std::move(userParamParam));
166 }
167 else
168 {
169 ParamCapture userParamParam("userParam", ParamType::TvoidConstPointer);
170 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
171 &userParamParam.value);
172 paramBuffer.addParam(std::move(userParamParam));
173 }
174
175 return CallCapture(angle::EntryPoint::GLDebugMessageCallback, std::move(paramBuffer));
176 }
177
CaptureDebugMessageControl(const State & glState,bool isCallValid,GLenum source,GLenum type,GLenum severity,GLsizei count,const GLuint * ids,GLboolean enabled)178 CallCapture CaptureDebugMessageControl(const State &glState,
179 bool isCallValid,
180 GLenum source,
181 GLenum type,
182 GLenum severity,
183 GLsizei count,
184 const GLuint *ids,
185 GLboolean enabled)
186 {
187 ParamBuffer paramBuffer;
188
189 paramBuffer.addEnumParam("source", GLESEnum::DebugSource, ParamType::TGLenum, source);
190 paramBuffer.addEnumParam("type", GLESEnum::DebugType, ParamType::TGLenum, type);
191 paramBuffer.addEnumParam("severity", GLESEnum::DebugSeverity, ParamType::TGLenum, severity);
192 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
193
194 if (isCallValid)
195 {
196 ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
197 InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
198 CaptureDebugMessageControl_ids(glState, isCallValid, source, type, severity, count, ids,
199 enabled, &idsParam);
200 paramBuffer.addParam(std::move(idsParam));
201 }
202 else
203 {
204 ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
205 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
206 &idsParam.value);
207 paramBuffer.addParam(std::move(idsParam));
208 }
209
210 paramBuffer.addValueParam("enabled", ParamType::TGLboolean, enabled);
211
212 return CallCapture(angle::EntryPoint::GLDebugMessageControl, std::move(paramBuffer));
213 }
214
CaptureDebugMessageInsert(const State & glState,bool isCallValid,GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar * buf)215 CallCapture CaptureDebugMessageInsert(const State &glState,
216 bool isCallValid,
217 GLenum source,
218 GLenum type,
219 GLuint id,
220 GLenum severity,
221 GLsizei length,
222 const GLchar *buf)
223 {
224 ParamBuffer paramBuffer;
225
226 paramBuffer.addEnumParam("source", GLESEnum::DebugSource, ParamType::TGLenum, source);
227 paramBuffer.addEnumParam("type", GLESEnum::DebugType, ParamType::TGLenum, type);
228 paramBuffer.addValueParam("id", ParamType::TGLuint, id);
229 paramBuffer.addEnumParam("severity", GLESEnum::DebugSeverity, ParamType::TGLenum, severity);
230 paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
231
232 if (isCallValid)
233 {
234 ParamCapture bufParam("buf", ParamType::TGLcharConstPointer);
235 InitParamValue(ParamType::TGLcharConstPointer, buf, &bufParam.value);
236 CaptureDebugMessageInsert_buf(glState, isCallValid, source, type, id, severity, length, buf,
237 &bufParam);
238 paramBuffer.addParam(std::move(bufParam));
239 }
240 else
241 {
242 ParamCapture bufParam("buf", ParamType::TGLcharConstPointer);
243 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
244 &bufParam.value);
245 paramBuffer.addParam(std::move(bufParam));
246 }
247
248 return CallCapture(angle::EntryPoint::GLDebugMessageInsert, std::move(paramBuffer));
249 }
250
CaptureDisablei(const State & glState,bool isCallValid,GLenum target,GLuint index)251 CallCapture CaptureDisablei(const State &glState, bool isCallValid, GLenum target, GLuint index)
252 {
253 ParamBuffer paramBuffer;
254
255 paramBuffer.addEnumParam("target", GLESEnum::EnableCap, ParamType::TGLenum, target);
256 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
257
258 return CallCapture(angle::EntryPoint::GLDisablei, std::move(paramBuffer));
259 }
260
CaptureDrawElementsBaseVertex(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex)261 CallCapture CaptureDrawElementsBaseVertex(const State &glState,
262 bool isCallValid,
263 PrimitiveMode modePacked,
264 GLsizei count,
265 DrawElementsType typePacked,
266 const void *indices,
267 GLint basevertex)
268 {
269 ParamBuffer paramBuffer;
270
271 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
272 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
273 paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
274
275 if (isCallValid)
276 {
277 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
278 InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
279 CaptureDrawElementsBaseVertex_indices(glState, isCallValid, modePacked, count, typePacked,
280 indices, basevertex, &indicesParam);
281 paramBuffer.addParam(std::move(indicesParam));
282 }
283 else
284 {
285 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
286 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
287 &indicesParam.value);
288 paramBuffer.addParam(std::move(indicesParam));
289 }
290
291 paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
292
293 return CallCapture(angle::EntryPoint::GLDrawElementsBaseVertex, std::move(paramBuffer));
294 }
295
CaptureDrawElementsInstancedBaseVertex(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount,GLint basevertex)296 CallCapture CaptureDrawElementsInstancedBaseVertex(const State &glState,
297 bool isCallValid,
298 PrimitiveMode modePacked,
299 GLsizei count,
300 DrawElementsType typePacked,
301 const void *indices,
302 GLsizei instancecount,
303 GLint basevertex)
304 {
305 ParamBuffer paramBuffer;
306
307 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
308 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
309 paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
310
311 if (isCallValid)
312 {
313 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
314 InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
315 CaptureDrawElementsInstancedBaseVertex_indices(glState, isCallValid, modePacked, count,
316 typePacked, indices, instancecount,
317 basevertex, &indicesParam);
318 paramBuffer.addParam(std::move(indicesParam));
319 }
320 else
321 {
322 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
323 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
324 &indicesParam.value);
325 paramBuffer.addParam(std::move(indicesParam));
326 }
327
328 paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);
329 paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
330
331 return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseVertex,
332 std::move(paramBuffer));
333 }
334
CaptureDrawRangeElementsBaseVertex(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLuint start,GLuint end,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex)335 CallCapture CaptureDrawRangeElementsBaseVertex(const State &glState,
336 bool isCallValid,
337 PrimitiveMode modePacked,
338 GLuint start,
339 GLuint end,
340 GLsizei count,
341 DrawElementsType typePacked,
342 const void *indices,
343 GLint basevertex)
344 {
345 ParamBuffer paramBuffer;
346
347 paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
348 paramBuffer.addValueParam("start", ParamType::TGLuint, start);
349 paramBuffer.addValueParam("end", ParamType::TGLuint, end);
350 paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
351 paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);
352
353 if (isCallValid)
354 {
355 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
356 InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
357 CaptureDrawRangeElementsBaseVertex_indices(glState, isCallValid, modePacked, start, end,
358 count, typePacked, indices, basevertex,
359 &indicesParam);
360 paramBuffer.addParam(std::move(indicesParam));
361 }
362 else
363 {
364 ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
365 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
366 &indicesParam.value);
367 paramBuffer.addParam(std::move(indicesParam));
368 }
369
370 paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex);
371
372 return CallCapture(angle::EntryPoint::GLDrawRangeElementsBaseVertex, std::move(paramBuffer));
373 }
374
CaptureEnablei(const State & glState,bool isCallValid,GLenum target,GLuint index)375 CallCapture CaptureEnablei(const State &glState, bool isCallValid, GLenum target, GLuint index)
376 {
377 ParamBuffer paramBuffer;
378
379 paramBuffer.addEnumParam("target", GLESEnum::EnableCap, ParamType::TGLenum, target);
380 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
381
382 return CallCapture(angle::EntryPoint::GLEnablei, std::move(paramBuffer));
383 }
384
CaptureFramebufferTexture(const State & glState,bool isCallValid,GLenum target,GLenum attachment,TextureID texturePacked,GLint level)385 CallCapture CaptureFramebufferTexture(const State &glState,
386 bool isCallValid,
387 GLenum target,
388 GLenum attachment,
389 TextureID texturePacked,
390 GLint level)
391 {
392 ParamBuffer paramBuffer;
393
394 paramBuffer.addEnumParam("target", GLESEnum::FramebufferTarget, ParamType::TGLenum, target);
395 paramBuffer.addEnumParam("attachment", GLESEnum::FramebufferAttachment, ParamType::TGLenum,
396 attachment);
397 paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
398 paramBuffer.addValueParam("level", ParamType::TGLint, level);
399
400 return CallCapture(angle::EntryPoint::GLFramebufferTexture, std::move(paramBuffer));
401 }
402
CaptureGetDebugMessageLog(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,GLuint returnValue)403 CallCapture CaptureGetDebugMessageLog(const State &glState,
404 bool isCallValid,
405 GLuint count,
406 GLsizei bufSize,
407 GLenum *sources,
408 GLenum *types,
409 GLuint *ids,
410 GLenum *severities,
411 GLsizei *lengths,
412 GLchar *messageLog,
413 GLuint returnValue)
414 {
415 ParamBuffer paramBuffer;
416
417 paramBuffer.addValueParam("count", ParamType::TGLuint, count);
418 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
419
420 if (isCallValid)
421 {
422 ParamCapture sourcesParam("sources", ParamType::TGLenumPointer);
423 InitParamValue(ParamType::TGLenumPointer, sources, &sourcesParam.value);
424 CaptureGetDebugMessageLog_sources(glState, isCallValid, count, bufSize, sources, types, ids,
425 severities, lengths, messageLog, &sourcesParam);
426 paramBuffer.addParam(std::move(sourcesParam));
427 }
428 else
429 {
430 ParamCapture sourcesParam("sources", ParamType::TGLenumPointer);
431 InitParamValue(ParamType::TGLenumPointer, static_cast<GLenum *>(nullptr),
432 &sourcesParam.value);
433 paramBuffer.addParam(std::move(sourcesParam));
434 }
435
436 if (isCallValid)
437 {
438 ParamCapture typesParam("types", ParamType::TGLenumPointer);
439 InitParamValue(ParamType::TGLenumPointer, types, &typesParam.value);
440 CaptureGetDebugMessageLog_types(glState, isCallValid, count, bufSize, sources, types, ids,
441 severities, lengths, messageLog, &typesParam);
442 paramBuffer.addParam(std::move(typesParam));
443 }
444 else
445 {
446 ParamCapture typesParam("types", ParamType::TGLenumPointer);
447 InitParamValue(ParamType::TGLenumPointer, static_cast<GLenum *>(nullptr),
448 &typesParam.value);
449 paramBuffer.addParam(std::move(typesParam));
450 }
451
452 if (isCallValid)
453 {
454 ParamCapture idsParam("ids", ParamType::TGLuintPointer);
455 InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
456 CaptureGetDebugMessageLog_ids(glState, isCallValid, count, bufSize, sources, types, ids,
457 severities, lengths, messageLog, &idsParam);
458 paramBuffer.addParam(std::move(idsParam));
459 }
460 else
461 {
462 ParamCapture idsParam("ids", ParamType::TGLuintPointer);
463 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr), &idsParam.value);
464 paramBuffer.addParam(std::move(idsParam));
465 }
466
467 if (isCallValid)
468 {
469 ParamCapture severitiesParam("severities", ParamType::TGLenumPointer);
470 InitParamValue(ParamType::TGLenumPointer, severities, &severitiesParam.value);
471 CaptureGetDebugMessageLog_severities(glState, isCallValid, count, bufSize, sources, types,
472 ids, severities, lengths, messageLog,
473 &severitiesParam);
474 paramBuffer.addParam(std::move(severitiesParam));
475 }
476 else
477 {
478 ParamCapture severitiesParam("severities", ParamType::TGLenumPointer);
479 InitParamValue(ParamType::TGLenumPointer, static_cast<GLenum *>(nullptr),
480 &severitiesParam.value);
481 paramBuffer.addParam(std::move(severitiesParam));
482 }
483
484 if (isCallValid)
485 {
486 ParamCapture lengthsParam("lengths", ParamType::TGLsizeiPointer);
487 InitParamValue(ParamType::TGLsizeiPointer, lengths, &lengthsParam.value);
488 CaptureGetDebugMessageLog_lengths(glState, isCallValid, count, bufSize, sources, types, ids,
489 severities, lengths, messageLog, &lengthsParam);
490 paramBuffer.addParam(std::move(lengthsParam));
491 }
492 else
493 {
494 ParamCapture lengthsParam("lengths", ParamType::TGLsizeiPointer);
495 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
496 &lengthsParam.value);
497 paramBuffer.addParam(std::move(lengthsParam));
498 }
499
500 if (isCallValid)
501 {
502 ParamCapture messageLogParam("messageLog", ParamType::TGLcharPointer);
503 InitParamValue(ParamType::TGLcharPointer, messageLog, &messageLogParam.value);
504 CaptureGetDebugMessageLog_messageLog(glState, isCallValid, count, bufSize, sources, types,
505 ids, severities, lengths, messageLog,
506 &messageLogParam);
507 paramBuffer.addParam(std::move(messageLogParam));
508 }
509 else
510 {
511 ParamCapture messageLogParam("messageLog", ParamType::TGLcharPointer);
512 InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
513 &messageLogParam.value);
514 paramBuffer.addParam(std::move(messageLogParam));
515 }
516
517 ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
518 InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
519 paramBuffer.addReturnValue(std::move(returnValueCapture));
520
521 return CallCapture(angle::EntryPoint::GLGetDebugMessageLog, std::move(paramBuffer));
522 }
523
CaptureGetGraphicsResetStatus(const State & glState,bool isCallValid,GLenum returnValue)524 CallCapture CaptureGetGraphicsResetStatus(const State &glState,
525 bool isCallValid,
526 GLenum returnValue)
527 {
528 ParamBuffer paramBuffer;
529
530 ParamCapture returnValueCapture("returnValue", ParamType::TGLenum);
531 InitParamValue(ParamType::TGLenum, returnValue, &returnValueCapture.value);
532 paramBuffer.addReturnValue(std::move(returnValueCapture));
533
534 return CallCapture(angle::EntryPoint::GLGetGraphicsResetStatus, std::move(paramBuffer));
535 }
536
CaptureGetObjectLabel(const State & glState,bool isCallValid,GLenum identifier,GLuint name,GLsizei bufSize,GLsizei * length,GLchar * label)537 CallCapture CaptureGetObjectLabel(const State &glState,
538 bool isCallValid,
539 GLenum identifier,
540 GLuint name,
541 GLsizei bufSize,
542 GLsizei *length,
543 GLchar *label)
544 {
545 ParamBuffer paramBuffer;
546
547 paramBuffer.addEnumParam("identifier", GLESEnum::ObjectIdentifier, ParamType::TGLenum,
548 identifier);
549 paramBuffer.addValueParam("name", ParamType::TGLuint, name);
550 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
551
552 if (isCallValid)
553 {
554 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
555 InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
556 CaptureGetObjectLabel_length(glState, isCallValid, identifier, name, bufSize, length, label,
557 &lengthParam);
558 paramBuffer.addParam(std::move(lengthParam));
559 }
560 else
561 {
562 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
563 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
564 &lengthParam.value);
565 paramBuffer.addParam(std::move(lengthParam));
566 }
567
568 if (isCallValid)
569 {
570 ParamCapture labelParam("label", ParamType::TGLcharPointer);
571 InitParamValue(ParamType::TGLcharPointer, label, &labelParam.value);
572 CaptureGetObjectLabel_label(glState, isCallValid, identifier, name, bufSize, length, label,
573 &labelParam);
574 paramBuffer.addParam(std::move(labelParam));
575 }
576 else
577 {
578 ParamCapture labelParam("label", ParamType::TGLcharPointer);
579 InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
580 &labelParam.value);
581 paramBuffer.addParam(std::move(labelParam));
582 }
583
584 return CallCapture(angle::EntryPoint::GLGetObjectLabel, std::move(paramBuffer));
585 }
586
CaptureGetObjectPtrLabel(const State & glState,bool isCallValid,const void * ptr,GLsizei bufSize,GLsizei * length,GLchar * label)587 CallCapture CaptureGetObjectPtrLabel(const State &glState,
588 bool isCallValid,
589 const void *ptr,
590 GLsizei bufSize,
591 GLsizei *length,
592 GLchar *label)
593 {
594 ParamBuffer paramBuffer;
595
596 if (isCallValid)
597 {
598 ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
599 InitParamValue(ParamType::TvoidConstPointer, ptr, &ptrParam.value);
600 CaptureGetObjectPtrLabel_ptr(glState, isCallValid, ptr, bufSize, length, label, &ptrParam);
601 paramBuffer.addParam(std::move(ptrParam));
602 }
603 else
604 {
605 ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
606 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
607 &ptrParam.value);
608 paramBuffer.addParam(std::move(ptrParam));
609 }
610
611 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
612
613 if (isCallValid)
614 {
615 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
616 InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
617 CaptureGetObjectPtrLabel_length(glState, isCallValid, ptr, bufSize, length, label,
618 &lengthParam);
619 paramBuffer.addParam(std::move(lengthParam));
620 }
621 else
622 {
623 ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
624 InitParamValue(ParamType::TGLsizeiPointer, static_cast<GLsizei *>(nullptr),
625 &lengthParam.value);
626 paramBuffer.addParam(std::move(lengthParam));
627 }
628
629 if (isCallValid)
630 {
631 ParamCapture labelParam("label", ParamType::TGLcharPointer);
632 InitParamValue(ParamType::TGLcharPointer, label, &labelParam.value);
633 CaptureGetObjectPtrLabel_label(glState, isCallValid, ptr, bufSize, length, label,
634 &labelParam);
635 paramBuffer.addParam(std::move(labelParam));
636 }
637 else
638 {
639 ParamCapture labelParam("label", ParamType::TGLcharPointer);
640 InitParamValue(ParamType::TGLcharPointer, static_cast<GLchar *>(nullptr),
641 &labelParam.value);
642 paramBuffer.addParam(std::move(labelParam));
643 }
644
645 return CallCapture(angle::EntryPoint::GLGetObjectPtrLabel, std::move(paramBuffer));
646 }
647
CaptureGetPointerv(const State & glState,bool isCallValid,GLenum pname,void ** params)648 CallCapture CaptureGetPointerv(const State &glState, bool isCallValid, GLenum pname, void **params)
649 {
650 ParamBuffer paramBuffer;
651
652 paramBuffer.addEnumParam("pname", GLESEnum::GetPointervPName, ParamType::TGLenum, pname);
653
654 if (isCallValid)
655 {
656 ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
657 InitParamValue(ParamType::TvoidPointerPointer, params, ¶msParam.value);
658 CaptureGetPointerv_params(glState, isCallValid, pname, params, ¶msParam);
659 paramBuffer.addParam(std::move(paramsParam));
660 }
661 else
662 {
663 ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
664 InitParamValue(ParamType::TvoidPointerPointer, static_cast<void **>(nullptr),
665 ¶msParam.value);
666 paramBuffer.addParam(std::move(paramsParam));
667 }
668
669 return CallCapture(angle::EntryPoint::GLGetPointerv, std::move(paramBuffer));
670 }
671
CaptureGetSamplerParameterIiv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLint * params)672 CallCapture CaptureGetSamplerParameterIiv(const State &glState,
673 bool isCallValid,
674 SamplerID samplerPacked,
675 GLenum pname,
676 GLint *params)
677 {
678 ParamBuffer paramBuffer;
679
680 paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
681 paramBuffer.addEnumParam("pname", GLESEnum::SamplerParameterI, ParamType::TGLenum, pname);
682
683 if (isCallValid)
684 {
685 ParamCapture paramsParam("params", ParamType::TGLintPointer);
686 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
687 CaptureGetSamplerParameterIiv_params(glState, isCallValid, samplerPacked, pname, params,
688 ¶msParam);
689 paramBuffer.addParam(std::move(paramsParam));
690 }
691 else
692 {
693 ParamCapture paramsParam("params", ParamType::TGLintPointer);
694 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
695 paramBuffer.addParam(std::move(paramsParam));
696 }
697
698 return CallCapture(angle::EntryPoint::GLGetSamplerParameterIiv, std::move(paramBuffer));
699 }
700
CaptureGetSamplerParameterIuiv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,GLuint * params)701 CallCapture CaptureGetSamplerParameterIuiv(const State &glState,
702 bool isCallValid,
703 SamplerID samplerPacked,
704 GLenum pname,
705 GLuint *params)
706 {
707 ParamBuffer paramBuffer;
708
709 paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
710 paramBuffer.addEnumParam("pname", GLESEnum::SamplerParameterI, ParamType::TGLenum, pname);
711
712 if (isCallValid)
713 {
714 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
715 InitParamValue(ParamType::TGLuintPointer, params, ¶msParam.value);
716 CaptureGetSamplerParameterIuiv_params(glState, isCallValid, samplerPacked, pname, params,
717 ¶msParam);
718 paramBuffer.addParam(std::move(paramsParam));
719 }
720 else
721 {
722 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
723 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
724 ¶msParam.value);
725 paramBuffer.addParam(std::move(paramsParam));
726 }
727
728 return CallCapture(angle::EntryPoint::GLGetSamplerParameterIuiv, std::move(paramBuffer));
729 }
730
CaptureGetTexParameterIiv(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLint * params)731 CallCapture CaptureGetTexParameterIiv(const State &glState,
732 bool isCallValid,
733 TextureType targetPacked,
734 GLenum pname,
735 GLint *params)
736 {
737 ParamBuffer paramBuffer;
738
739 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
740 paramBuffer.addEnumParam("pname", GLESEnum::GetTextureParameter, ParamType::TGLenum, pname);
741
742 if (isCallValid)
743 {
744 ParamCapture paramsParam("params", ParamType::TGLintPointer);
745 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
746 CaptureGetTexParameterIiv_params(glState, isCallValid, targetPacked, pname, params,
747 ¶msParam);
748 paramBuffer.addParam(std::move(paramsParam));
749 }
750 else
751 {
752 ParamCapture paramsParam("params", ParamType::TGLintPointer);
753 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
754 paramBuffer.addParam(std::move(paramsParam));
755 }
756
757 return CallCapture(angle::EntryPoint::GLGetTexParameterIiv, std::move(paramBuffer));
758 }
759
CaptureGetTexParameterIuiv(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLuint * params)760 CallCapture CaptureGetTexParameterIuiv(const State &glState,
761 bool isCallValid,
762 TextureType targetPacked,
763 GLenum pname,
764 GLuint *params)
765 {
766 ParamBuffer paramBuffer;
767
768 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
769 paramBuffer.addEnumParam("pname", GLESEnum::GetTextureParameter, ParamType::TGLenum, pname);
770
771 if (isCallValid)
772 {
773 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
774 InitParamValue(ParamType::TGLuintPointer, params, ¶msParam.value);
775 CaptureGetTexParameterIuiv_params(glState, isCallValid, targetPacked, pname, params,
776 ¶msParam);
777 paramBuffer.addParam(std::move(paramsParam));
778 }
779 else
780 {
781 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
782 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
783 ¶msParam.value);
784 paramBuffer.addParam(std::move(paramsParam));
785 }
786
787 return CallCapture(angle::EntryPoint::GLGetTexParameterIuiv, std::move(paramBuffer));
788 }
789
CaptureGetnUniformfv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLfloat * params)790 CallCapture CaptureGetnUniformfv(const State &glState,
791 bool isCallValid,
792 ShaderProgramID programPacked,
793 UniformLocation locationPacked,
794 GLsizei bufSize,
795 GLfloat *params)
796 {
797 ParamBuffer paramBuffer;
798
799 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
800 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
801 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
802
803 if (isCallValid)
804 {
805 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
806 InitParamValue(ParamType::TGLfloatPointer, params, ¶msParam.value);
807 CaptureGetnUniformfv_params(glState, isCallValid, programPacked, locationPacked, bufSize,
808 params, ¶msParam);
809 paramBuffer.addParam(std::move(paramsParam));
810 }
811 else
812 {
813 ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
814 InitParamValue(ParamType::TGLfloatPointer, static_cast<GLfloat *>(nullptr),
815 ¶msParam.value);
816 paramBuffer.addParam(std::move(paramsParam));
817 }
818
819 return CallCapture(angle::EntryPoint::GLGetnUniformfv, std::move(paramBuffer));
820 }
821
CaptureGetnUniformiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLint * params)822 CallCapture CaptureGetnUniformiv(const State &glState,
823 bool isCallValid,
824 ShaderProgramID programPacked,
825 UniformLocation locationPacked,
826 GLsizei bufSize,
827 GLint *params)
828 {
829 ParamBuffer paramBuffer;
830
831 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
832 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
833 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
834
835 if (isCallValid)
836 {
837 ParamCapture paramsParam("params", ParamType::TGLintPointer);
838 InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
839 CaptureGetnUniformiv_params(glState, isCallValid, programPacked, locationPacked, bufSize,
840 params, ¶msParam);
841 paramBuffer.addParam(std::move(paramsParam));
842 }
843 else
844 {
845 ParamCapture paramsParam("params", ParamType::TGLintPointer);
846 InitParamValue(ParamType::TGLintPointer, static_cast<GLint *>(nullptr), ¶msParam.value);
847 paramBuffer.addParam(std::move(paramsParam));
848 }
849
850 return CallCapture(angle::EntryPoint::GLGetnUniformiv, std::move(paramBuffer));
851 }
852
CaptureGetnUniformuiv(const State & glState,bool isCallValid,ShaderProgramID programPacked,UniformLocation locationPacked,GLsizei bufSize,GLuint * params)853 CallCapture CaptureGetnUniformuiv(const State &glState,
854 bool isCallValid,
855 ShaderProgramID programPacked,
856 UniformLocation locationPacked,
857 GLsizei bufSize,
858 GLuint *params)
859 {
860 ParamBuffer paramBuffer;
861
862 paramBuffer.addValueParam("programPacked", ParamType::TShaderProgramID, programPacked);
863 paramBuffer.addValueParam("locationPacked", ParamType::TUniformLocation, locationPacked);
864 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
865
866 if (isCallValid)
867 {
868 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
869 InitParamValue(ParamType::TGLuintPointer, params, ¶msParam.value);
870 CaptureGetnUniformuiv_params(glState, isCallValid, programPacked, locationPacked, bufSize,
871 params, ¶msParam);
872 paramBuffer.addParam(std::move(paramsParam));
873 }
874 else
875 {
876 ParamCapture paramsParam("params", ParamType::TGLuintPointer);
877 InitParamValue(ParamType::TGLuintPointer, static_cast<GLuint *>(nullptr),
878 ¶msParam.value);
879 paramBuffer.addParam(std::move(paramsParam));
880 }
881
882 return CallCapture(angle::EntryPoint::GLGetnUniformuiv, std::move(paramBuffer));
883 }
884
CaptureIsEnabledi(const State & glState,bool isCallValid,GLenum target,GLuint index,GLboolean returnValue)885 CallCapture CaptureIsEnabledi(const State &glState,
886 bool isCallValid,
887 GLenum target,
888 GLuint index,
889 GLboolean returnValue)
890 {
891 ParamBuffer paramBuffer;
892
893 paramBuffer.addEnumParam("target", GLESEnum::EnableCap, ParamType::TGLenum, target);
894 paramBuffer.addValueParam("index", ParamType::TGLuint, index);
895
896 ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
897 InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
898 paramBuffer.addReturnValue(std::move(returnValueCapture));
899
900 return CallCapture(angle::EntryPoint::GLIsEnabledi, std::move(paramBuffer));
901 }
902
CaptureMinSampleShading(const State & glState,bool isCallValid,GLfloat value)903 CallCapture CaptureMinSampleShading(const State &glState, bool isCallValid, GLfloat value)
904 {
905 ParamBuffer paramBuffer;
906
907 paramBuffer.addValueParam("value", ParamType::TGLfloat, value);
908
909 return CallCapture(angle::EntryPoint::GLMinSampleShading, std::move(paramBuffer));
910 }
911
CaptureObjectLabel(const State & glState,bool isCallValid,GLenum identifier,GLuint name,GLsizei length,const GLchar * label)912 CallCapture CaptureObjectLabel(const State &glState,
913 bool isCallValid,
914 GLenum identifier,
915 GLuint name,
916 GLsizei length,
917 const GLchar *label)
918 {
919 ParamBuffer paramBuffer;
920
921 paramBuffer.addEnumParam("identifier", GLESEnum::ObjectIdentifier, ParamType::TGLenum,
922 identifier);
923 paramBuffer.addValueParam("name", ParamType::TGLuint, name);
924 paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
925
926 if (isCallValid)
927 {
928 ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
929 InitParamValue(ParamType::TGLcharConstPointer, label, &labelParam.value);
930 CaptureObjectLabel_label(glState, isCallValid, identifier, name, length, label,
931 &labelParam);
932 paramBuffer.addParam(std::move(labelParam));
933 }
934 else
935 {
936 ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
937 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
938 &labelParam.value);
939 paramBuffer.addParam(std::move(labelParam));
940 }
941
942 return CallCapture(angle::EntryPoint::GLObjectLabel, std::move(paramBuffer));
943 }
944
CaptureObjectPtrLabel(const State & glState,bool isCallValid,const void * ptr,GLsizei length,const GLchar * label)945 CallCapture CaptureObjectPtrLabel(const State &glState,
946 bool isCallValid,
947 const void *ptr,
948 GLsizei length,
949 const GLchar *label)
950 {
951 ParamBuffer paramBuffer;
952
953 if (isCallValid)
954 {
955 ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
956 InitParamValue(ParamType::TvoidConstPointer, ptr, &ptrParam.value);
957 CaptureObjectPtrLabel_ptr(glState, isCallValid, ptr, length, label, &ptrParam);
958 paramBuffer.addParam(std::move(ptrParam));
959 }
960 else
961 {
962 ParamCapture ptrParam("ptr", ParamType::TvoidConstPointer);
963 InitParamValue(ParamType::TvoidConstPointer, static_cast<const void *>(nullptr),
964 &ptrParam.value);
965 paramBuffer.addParam(std::move(ptrParam));
966 }
967
968 paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
969
970 if (isCallValid)
971 {
972 ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
973 InitParamValue(ParamType::TGLcharConstPointer, label, &labelParam.value);
974 CaptureObjectPtrLabel_label(glState, isCallValid, ptr, length, label, &labelParam);
975 paramBuffer.addParam(std::move(labelParam));
976 }
977 else
978 {
979 ParamCapture labelParam("label", ParamType::TGLcharConstPointer);
980 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
981 &labelParam.value);
982 paramBuffer.addParam(std::move(labelParam));
983 }
984
985 return CallCapture(angle::EntryPoint::GLObjectPtrLabel, std::move(paramBuffer));
986 }
987
CapturePatchParameteri(const State & glState,bool isCallValid,GLenum pname,GLint value)988 CallCapture CapturePatchParameteri(const State &glState,
989 bool isCallValid,
990 GLenum pname,
991 GLint value)
992 {
993 ParamBuffer paramBuffer;
994
995 paramBuffer.addEnumParam("pname", GLESEnum::PatchParameterName, ParamType::TGLenum, pname);
996 paramBuffer.addValueParam("value", ParamType::TGLint, value);
997
998 return CallCapture(angle::EntryPoint::GLPatchParameteri, std::move(paramBuffer));
999 }
1000
CapturePopDebugGroup(const State & glState,bool isCallValid)1001 CallCapture CapturePopDebugGroup(const State &glState, bool isCallValid)
1002 {
1003 ParamBuffer paramBuffer;
1004
1005 return CallCapture(angle::EntryPoint::GLPopDebugGroup, std::move(paramBuffer));
1006 }
1007
CapturePrimitiveBoundingBox(const State & glState,bool isCallValid,GLfloat minX,GLfloat minY,GLfloat minZ,GLfloat minW,GLfloat maxX,GLfloat maxY,GLfloat maxZ,GLfloat maxW)1008 CallCapture CapturePrimitiveBoundingBox(const State &glState,
1009 bool isCallValid,
1010 GLfloat minX,
1011 GLfloat minY,
1012 GLfloat minZ,
1013 GLfloat minW,
1014 GLfloat maxX,
1015 GLfloat maxY,
1016 GLfloat maxZ,
1017 GLfloat maxW)
1018 {
1019 ParamBuffer paramBuffer;
1020
1021 paramBuffer.addValueParam("minX", ParamType::TGLfloat, minX);
1022 paramBuffer.addValueParam("minY", ParamType::TGLfloat, minY);
1023 paramBuffer.addValueParam("minZ", ParamType::TGLfloat, minZ);
1024 paramBuffer.addValueParam("minW", ParamType::TGLfloat, minW);
1025 paramBuffer.addValueParam("maxX", ParamType::TGLfloat, maxX);
1026 paramBuffer.addValueParam("maxY", ParamType::TGLfloat, maxY);
1027 paramBuffer.addValueParam("maxZ", ParamType::TGLfloat, maxZ);
1028 paramBuffer.addValueParam("maxW", ParamType::TGLfloat, maxW);
1029
1030 return CallCapture(angle::EntryPoint::GLPrimitiveBoundingBox, std::move(paramBuffer));
1031 }
1032
CapturePushDebugGroup(const State & glState,bool isCallValid,GLenum source,GLuint id,GLsizei length,const GLchar * message)1033 CallCapture CapturePushDebugGroup(const State &glState,
1034 bool isCallValid,
1035 GLenum source,
1036 GLuint id,
1037 GLsizei length,
1038 const GLchar *message)
1039 {
1040 ParamBuffer paramBuffer;
1041
1042 paramBuffer.addEnumParam("source", GLESEnum::DebugSource, ParamType::TGLenum, source);
1043 paramBuffer.addValueParam("id", ParamType::TGLuint, id);
1044 paramBuffer.addValueParam("length", ParamType::TGLsizei, length);
1045
1046 if (isCallValid)
1047 {
1048 ParamCapture messageParam("message", ParamType::TGLcharConstPointer);
1049 InitParamValue(ParamType::TGLcharConstPointer, message, &messageParam.value);
1050 CapturePushDebugGroup_message(glState, isCallValid, source, id, length, message,
1051 &messageParam);
1052 paramBuffer.addParam(std::move(messageParam));
1053 }
1054 else
1055 {
1056 ParamCapture messageParam("message", ParamType::TGLcharConstPointer);
1057 InitParamValue(ParamType::TGLcharConstPointer, static_cast<const GLchar *>(nullptr),
1058 &messageParam.value);
1059 paramBuffer.addParam(std::move(messageParam));
1060 }
1061
1062 return CallCapture(angle::EntryPoint::GLPushDebugGroup, std::move(paramBuffer));
1063 }
1064
CaptureReadnPixels(const State & glState,bool isCallValid,GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,void * data)1065 CallCapture CaptureReadnPixels(const State &glState,
1066 bool isCallValid,
1067 GLint x,
1068 GLint y,
1069 GLsizei width,
1070 GLsizei height,
1071 GLenum format,
1072 GLenum type,
1073 GLsizei bufSize,
1074 void *data)
1075 {
1076 ParamBuffer paramBuffer;
1077
1078 paramBuffer.addValueParam("x", ParamType::TGLint, x);
1079 paramBuffer.addValueParam("y", ParamType::TGLint, y);
1080 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1081 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1082 paramBuffer.addEnumParam("format", GLESEnum::PixelFormat, ParamType::TGLenum, format);
1083 paramBuffer.addEnumParam("type", GLESEnum::PixelType, ParamType::TGLenum, type);
1084 paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
1085
1086 if (isCallValid)
1087 {
1088 ParamCapture dataParam("data", ParamType::TvoidPointer);
1089 InitParamValue(ParamType::TvoidPointer, data, &dataParam.value);
1090 CaptureReadnPixels_data(glState, isCallValid, x, y, width, height, format, type, bufSize,
1091 data, &dataParam);
1092 paramBuffer.addParam(std::move(dataParam));
1093 }
1094 else
1095 {
1096 ParamCapture dataParam("data", ParamType::TvoidPointer);
1097 InitParamValue(ParamType::TvoidPointer, static_cast<void *>(nullptr), &dataParam.value);
1098 paramBuffer.addParam(std::move(dataParam));
1099 }
1100
1101 return CallCapture(angle::EntryPoint::GLReadnPixels, std::move(paramBuffer));
1102 }
1103
CaptureSamplerParameterIiv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLint * param)1104 CallCapture CaptureSamplerParameterIiv(const State &glState,
1105 bool isCallValid,
1106 SamplerID samplerPacked,
1107 GLenum pname,
1108 const GLint *param)
1109 {
1110 ParamBuffer paramBuffer;
1111
1112 paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
1113 paramBuffer.addEnumParam("pname", GLESEnum::SamplerParameterI, ParamType::TGLenum, pname);
1114
1115 if (isCallValid)
1116 {
1117 ParamCapture paramParam("param", ParamType::TGLintConstPointer);
1118 InitParamValue(ParamType::TGLintConstPointer, param, ¶mParam.value);
1119 CaptureSamplerParameterIiv_param(glState, isCallValid, samplerPacked, pname, param,
1120 ¶mParam);
1121 paramBuffer.addParam(std::move(paramParam));
1122 }
1123 else
1124 {
1125 ParamCapture paramParam("param", ParamType::TGLintConstPointer);
1126 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1127 ¶mParam.value);
1128 paramBuffer.addParam(std::move(paramParam));
1129 }
1130
1131 return CallCapture(angle::EntryPoint::GLSamplerParameterIiv, std::move(paramBuffer));
1132 }
1133
CaptureSamplerParameterIuiv(const State & glState,bool isCallValid,SamplerID samplerPacked,GLenum pname,const GLuint * param)1134 CallCapture CaptureSamplerParameterIuiv(const State &glState,
1135 bool isCallValid,
1136 SamplerID samplerPacked,
1137 GLenum pname,
1138 const GLuint *param)
1139 {
1140 ParamBuffer paramBuffer;
1141
1142 paramBuffer.addValueParam("samplerPacked", ParamType::TSamplerID, samplerPacked);
1143 paramBuffer.addEnumParam("pname", GLESEnum::SamplerParameterI, ParamType::TGLenum, pname);
1144
1145 if (isCallValid)
1146 {
1147 ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
1148 InitParamValue(ParamType::TGLuintConstPointer, param, ¶mParam.value);
1149 CaptureSamplerParameterIuiv_param(glState, isCallValid, samplerPacked, pname, param,
1150 ¶mParam);
1151 paramBuffer.addParam(std::move(paramParam));
1152 }
1153 else
1154 {
1155 ParamCapture paramParam("param", ParamType::TGLuintConstPointer);
1156 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
1157 ¶mParam.value);
1158 paramBuffer.addParam(std::move(paramParam));
1159 }
1160
1161 return CallCapture(angle::EntryPoint::GLSamplerParameterIuiv, std::move(paramBuffer));
1162 }
1163
CaptureTexBuffer(const State & glState,bool isCallValid,TextureType targetPacked,GLenum internalformat,BufferID bufferPacked)1164 CallCapture CaptureTexBuffer(const State &glState,
1165 bool isCallValid,
1166 TextureType targetPacked,
1167 GLenum internalformat,
1168 BufferID bufferPacked)
1169 {
1170 ParamBuffer paramBuffer;
1171
1172 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1173 paramBuffer.addEnumParam("internalformat", GLESEnum::SizedInternalFormat, ParamType::TGLenum,
1174 internalformat);
1175 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
1176
1177 return CallCapture(angle::EntryPoint::GLTexBuffer, std::move(paramBuffer));
1178 }
1179
CaptureTexBufferRange(const State & glState,bool isCallValid,TextureType targetPacked,GLenum internalformat,BufferID bufferPacked,GLintptr offset,GLsizeiptr size)1180 CallCapture CaptureTexBufferRange(const State &glState,
1181 bool isCallValid,
1182 TextureType targetPacked,
1183 GLenum internalformat,
1184 BufferID bufferPacked,
1185 GLintptr offset,
1186 GLsizeiptr size)
1187 {
1188 ParamBuffer paramBuffer;
1189
1190 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1191 paramBuffer.addEnumParam("internalformat", GLESEnum::SizedInternalFormat, ParamType::TGLenum,
1192 internalformat);
1193 paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
1194 paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
1195 paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
1196
1197 return CallCapture(angle::EntryPoint::GLTexBufferRange, std::move(paramBuffer));
1198 }
1199
CaptureTexParameterIiv(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLint * params)1200 CallCapture CaptureTexParameterIiv(const State &glState,
1201 bool isCallValid,
1202 TextureType targetPacked,
1203 GLenum pname,
1204 const GLint *params)
1205 {
1206 ParamBuffer paramBuffer;
1207
1208 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1209 paramBuffer.addEnumParam("pname", GLESEnum::TextureParameterName, ParamType::TGLenum, pname);
1210
1211 if (isCallValid)
1212 {
1213 ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
1214 InitParamValue(ParamType::TGLintConstPointer, params, ¶msParam.value);
1215 CaptureTexParameterIiv_params(glState, isCallValid, targetPacked, pname, params,
1216 ¶msParam);
1217 paramBuffer.addParam(std::move(paramsParam));
1218 }
1219 else
1220 {
1221 ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
1222 InitParamValue(ParamType::TGLintConstPointer, static_cast<const GLint *>(nullptr),
1223 ¶msParam.value);
1224 paramBuffer.addParam(std::move(paramsParam));
1225 }
1226
1227 return CallCapture(angle::EntryPoint::GLTexParameterIiv, std::move(paramBuffer));
1228 }
1229
CaptureTexParameterIuiv(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLuint * params)1230 CallCapture CaptureTexParameterIuiv(const State &glState,
1231 bool isCallValid,
1232 TextureType targetPacked,
1233 GLenum pname,
1234 const GLuint *params)
1235 {
1236 ParamBuffer paramBuffer;
1237
1238 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1239 paramBuffer.addEnumParam("pname", GLESEnum::TextureParameterName, ParamType::TGLenum, pname);
1240
1241 if (isCallValid)
1242 {
1243 ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
1244 InitParamValue(ParamType::TGLuintConstPointer, params, ¶msParam.value);
1245 CaptureTexParameterIuiv_params(glState, isCallValid, targetPacked, pname, params,
1246 ¶msParam);
1247 paramBuffer.addParam(std::move(paramsParam));
1248 }
1249 else
1250 {
1251 ParamCapture paramsParam("params", ParamType::TGLuintConstPointer);
1252 InitParamValue(ParamType::TGLuintConstPointer, static_cast<const GLuint *>(nullptr),
1253 ¶msParam.value);
1254 paramBuffer.addParam(std::move(paramsParam));
1255 }
1256
1257 return CallCapture(angle::EntryPoint::GLTexParameterIuiv, std::move(paramBuffer));
1258 }
1259
CaptureTexStorage3DMultisample(const State & glState,bool isCallValid,TextureType targetPacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedsamplelocations)1260 CallCapture CaptureTexStorage3DMultisample(const State &glState,
1261 bool isCallValid,
1262 TextureType targetPacked,
1263 GLsizei samples,
1264 GLenum internalformat,
1265 GLsizei width,
1266 GLsizei height,
1267 GLsizei depth,
1268 GLboolean fixedsamplelocations)
1269 {
1270 ParamBuffer paramBuffer;
1271
1272 paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
1273 paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
1274 paramBuffer.addEnumParam("internalformat", GLESEnum::SizedInternalFormat, ParamType::TGLenum,
1275 internalformat);
1276 paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
1277 paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
1278 paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
1279 paramBuffer.addValueParam("fixedsamplelocations", ParamType::TGLboolean, fixedsamplelocations);
1280
1281 return CallCapture(angle::EntryPoint::GLTexStorage3DMultisample, std::move(paramBuffer));
1282 }
1283
1284 } // namespace gl
1285