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