• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from egl.xml and egl_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_egl_autogen.cpp:
9 //   Capture functions for the OpenGL ES all entry points.
10 
11 #include "libANGLE/capture/capture_egl_autogen.h"
12 
13 #include "common/gl_enum_utils.h"
14 #include "libANGLE/Context.h"
15 #include "libANGLE/capture/FrameCapture.h"
16 #include "libANGLE/validationEGL.h"
17 
18 using namespace angle;
19 
20 namespace egl
21 {
CaptureChooseConfig(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,const AttributeMap & attrib_listPacked,EGLConfig * configs,EGLint config_size,EGLint * num_config,EGLBoolean returnValue)22 CallCapture CaptureChooseConfig(egl::Thread *thread,
23                                 bool isCallValid,
24                                 egl::Display *dpyPacked,
25                                 const AttributeMap &attrib_listPacked,
26                                 EGLConfig *configs,
27                                 EGLint config_size,
28                                 EGLint *num_config,
29                                 EGLBoolean returnValue)
30 {
31     ParamBuffer paramBuffer;
32 
33     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
34     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
35     paramBuffer.addValueParam("configs", ParamType::TEGLConfigPointer, configs);
36     paramBuffer.addValueParam("config_size", ParamType::TEGLint, config_size);
37     paramBuffer.addValueParam("num_config", ParamType::TEGLintPointer, num_config);
38 
39     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
40     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
41     paramBuffer.addReturnValue(std::move(returnValueCapture));
42 
43     return CallCapture(angle::EntryPoint::EGLChooseConfig, std::move(paramBuffer));
44 }
45 
CaptureCopyBuffers(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLNativePixmapType target,EGLBoolean returnValue)46 CallCapture CaptureCopyBuffers(egl::Thread *thread,
47                                bool isCallValid,
48                                egl::Display *dpyPacked,
49                                SurfaceID surfacePacked,
50                                EGLNativePixmapType target,
51                                EGLBoolean returnValue)
52 {
53     ParamBuffer paramBuffer;
54 
55     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
56     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
57     paramBuffer.addValueParam("target", ParamType::TEGLNativePixmapType, target);
58 
59     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
60     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
61     paramBuffer.addReturnValue(std::move(returnValueCapture));
62 
63     return CallCapture(angle::EntryPoint::EGLCopyBuffers, std::move(paramBuffer));
64 }
65 
CaptureCreateContext(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,gl::ContextID share_contextPacked,const AttributeMap & attrib_listPacked,EGLContext returnValue)66 CallCapture CaptureCreateContext(egl::Thread *thread,
67                                  bool isCallValid,
68                                  egl::Display *dpyPacked,
69                                  egl::Config *configPacked,
70                                  gl::ContextID share_contextPacked,
71                                  const AttributeMap &attrib_listPacked,
72                                  EGLContext returnValue)
73 {
74     ParamBuffer paramBuffer;
75 
76     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
77     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
78     paramBuffer.addValueParam("share_contextPacked", ParamType::TContextID, share_contextPacked);
79     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
80 
81     ParamCapture returnValueCapture("returnValue", ParamType::TEGLContext);
82     InitParamValue(ParamType::TEGLContext, returnValue, &returnValueCapture.value);
83     paramBuffer.addReturnValue(std::move(returnValueCapture));
84 
85     return CallCapture(angle::EntryPoint::EGLCreateContext, std::move(paramBuffer));
86 }
87 
CaptureCreatePbufferSurface(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,const AttributeMap & attrib_listPacked,EGLSurface returnValue)88 CallCapture CaptureCreatePbufferSurface(egl::Thread *thread,
89                                         bool isCallValid,
90                                         egl::Display *dpyPacked,
91                                         egl::Config *configPacked,
92                                         const AttributeMap &attrib_listPacked,
93                                         EGLSurface returnValue)
94 {
95     ParamBuffer paramBuffer;
96 
97     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
98     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
99     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
100 
101     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
102     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
103     paramBuffer.addReturnValue(std::move(returnValueCapture));
104 
105     return CallCapture(angle::EntryPoint::EGLCreatePbufferSurface, std::move(paramBuffer));
106 }
107 
CaptureCreatePixmapSurface(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,EGLNativePixmapType pixmap,const AttributeMap & attrib_listPacked,EGLSurface returnValue)108 CallCapture CaptureCreatePixmapSurface(egl::Thread *thread,
109                                        bool isCallValid,
110                                        egl::Display *dpyPacked,
111                                        egl::Config *configPacked,
112                                        EGLNativePixmapType pixmap,
113                                        const AttributeMap &attrib_listPacked,
114                                        EGLSurface returnValue)
115 {
116     ParamBuffer paramBuffer;
117 
118     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
119     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
120     paramBuffer.addValueParam("pixmap", ParamType::TEGLNativePixmapType, pixmap);
121     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
122 
123     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
124     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
125     paramBuffer.addReturnValue(std::move(returnValueCapture));
126 
127     return CallCapture(angle::EntryPoint::EGLCreatePixmapSurface, std::move(paramBuffer));
128 }
129 
CaptureCreateWindowSurface(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,EGLNativeWindowType win,const AttributeMap & attrib_listPacked,EGLSurface returnValue)130 CallCapture CaptureCreateWindowSurface(egl::Thread *thread,
131                                        bool isCallValid,
132                                        egl::Display *dpyPacked,
133                                        egl::Config *configPacked,
134                                        EGLNativeWindowType win,
135                                        const AttributeMap &attrib_listPacked,
136                                        EGLSurface returnValue)
137 {
138     ParamBuffer paramBuffer;
139 
140     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
141     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
142     paramBuffer.addValueParam("win", ParamType::TEGLNativeWindowType, win);
143     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
144 
145     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
146     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
147     paramBuffer.addReturnValue(std::move(returnValueCapture));
148 
149     return CallCapture(angle::EntryPoint::EGLCreateWindowSurface, std::move(paramBuffer));
150 }
151 
CaptureDestroyContext(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,gl::ContextID ctxPacked,EGLBoolean returnValue)152 CallCapture CaptureDestroyContext(egl::Thread *thread,
153                                   bool isCallValid,
154                                   egl::Display *dpyPacked,
155                                   gl::ContextID ctxPacked,
156                                   EGLBoolean returnValue)
157 {
158     ParamBuffer paramBuffer;
159 
160     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
161     paramBuffer.addValueParam("ctxPacked", ParamType::TContextID, ctxPacked);
162 
163     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
164     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
165     paramBuffer.addReturnValue(std::move(returnValueCapture));
166 
167     return CallCapture(angle::EntryPoint::EGLDestroyContext, std::move(paramBuffer));
168 }
169 
CaptureDestroySurface(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLBoolean returnValue)170 CallCapture CaptureDestroySurface(egl::Thread *thread,
171                                   bool isCallValid,
172                                   egl::Display *dpyPacked,
173                                   SurfaceID surfacePacked,
174                                   EGLBoolean returnValue)
175 {
176     ParamBuffer paramBuffer;
177 
178     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
179     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
180 
181     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
182     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
183     paramBuffer.addReturnValue(std::move(returnValueCapture));
184 
185     return CallCapture(angle::EntryPoint::EGLDestroySurface, std::move(paramBuffer));
186 }
187 
CaptureGetConfigAttrib(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,EGLint attribute,EGLint * value,EGLBoolean returnValue)188 CallCapture CaptureGetConfigAttrib(egl::Thread *thread,
189                                    bool isCallValid,
190                                    egl::Display *dpyPacked,
191                                    egl::Config *configPacked,
192                                    EGLint attribute,
193                                    EGLint *value,
194                                    EGLBoolean returnValue)
195 {
196     ParamBuffer paramBuffer;
197 
198     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
199     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
200     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
201     paramBuffer.addValueParam("value", ParamType::TEGLintPointer, value);
202 
203     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
204     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
205     paramBuffer.addReturnValue(std::move(returnValueCapture));
206 
207     return CallCapture(angle::EntryPoint::EGLGetConfigAttrib, std::move(paramBuffer));
208 }
209 
CaptureGetConfigs(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLConfig * configs,EGLint config_size,EGLint * num_config,EGLBoolean returnValue)210 CallCapture CaptureGetConfigs(egl::Thread *thread,
211                               bool isCallValid,
212                               egl::Display *dpyPacked,
213                               EGLConfig *configs,
214                               EGLint config_size,
215                               EGLint *num_config,
216                               EGLBoolean returnValue)
217 {
218     ParamBuffer paramBuffer;
219 
220     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
221     paramBuffer.addValueParam("configs", ParamType::TEGLConfigPointer, configs);
222     paramBuffer.addValueParam("config_size", ParamType::TEGLint, config_size);
223     paramBuffer.addValueParam("num_config", ParamType::TEGLintPointer, num_config);
224 
225     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
226     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
227     paramBuffer.addReturnValue(std::move(returnValueCapture));
228 
229     return CallCapture(angle::EntryPoint::EGLGetConfigs, std::move(paramBuffer));
230 }
231 
CaptureGetCurrentDisplay(egl::Thread * thread,bool isCallValid,EGLDisplay returnValue)232 CallCapture CaptureGetCurrentDisplay(egl::Thread *thread, bool isCallValid, EGLDisplay returnValue)
233 {
234     ParamBuffer paramBuffer;
235 
236     ParamCapture returnValueCapture("returnValue", ParamType::TEGLDisplay);
237     InitParamValue(ParamType::TEGLDisplay, returnValue, &returnValueCapture.value);
238     paramBuffer.addReturnValue(std::move(returnValueCapture));
239 
240     return CallCapture(angle::EntryPoint::EGLGetCurrentDisplay, std::move(paramBuffer));
241 }
242 
CaptureGetCurrentSurface(egl::Thread * thread,bool isCallValid,EGLint readdraw,EGLSurface returnValue)243 CallCapture CaptureGetCurrentSurface(egl::Thread *thread,
244                                      bool isCallValid,
245                                      EGLint readdraw,
246                                      EGLSurface returnValue)
247 {
248     ParamBuffer paramBuffer;
249 
250     paramBuffer.addValueParam("readdraw", ParamType::TEGLint, readdraw);
251 
252     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
253     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
254     paramBuffer.addReturnValue(std::move(returnValueCapture));
255 
256     return CallCapture(angle::EntryPoint::EGLGetCurrentSurface, std::move(paramBuffer));
257 }
258 
CaptureGetDisplay(egl::Thread * thread,bool isCallValid,EGLNativeDisplayType display_id,EGLDisplay returnValue)259 CallCapture CaptureGetDisplay(egl::Thread *thread,
260                               bool isCallValid,
261                               EGLNativeDisplayType display_id,
262                               EGLDisplay returnValue)
263 {
264     ParamBuffer paramBuffer;
265 
266     paramBuffer.addValueParam("display_id", ParamType::TEGLNativeDisplayType, display_id);
267 
268     ParamCapture returnValueCapture("returnValue", ParamType::TEGLDisplay);
269     InitParamValue(ParamType::TEGLDisplay, returnValue, &returnValueCapture.value);
270     paramBuffer.addReturnValue(std::move(returnValueCapture));
271 
272     return CallCapture(angle::EntryPoint::EGLGetDisplay, std::move(paramBuffer));
273 }
274 
CaptureGetError(egl::Thread * thread,bool isCallValid,EGLint returnValue)275 CallCapture CaptureGetError(egl::Thread *thread, bool isCallValid, EGLint returnValue)
276 {
277     ParamBuffer paramBuffer;
278 
279     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
280     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
281     paramBuffer.addReturnValue(std::move(returnValueCapture));
282 
283     return CallCapture(angle::EntryPoint::EGLGetError, std::move(paramBuffer));
284 }
285 
CaptureGetProcAddress(egl::Thread * thread,bool isCallValid,const char * procname,__eglMustCastToProperFunctionPointerType returnValue)286 CallCapture CaptureGetProcAddress(egl::Thread *thread,
287                                   bool isCallValid,
288                                   const char *procname,
289                                   __eglMustCastToProperFunctionPointerType returnValue)
290 {
291     ParamBuffer paramBuffer;
292 
293     return CallCapture(angle::EntryPoint::EGLGetProcAddress, std::move(paramBuffer));
294 }
295 
CaptureInitialize(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint * major,EGLint * minor,EGLBoolean returnValue)296 CallCapture CaptureInitialize(egl::Thread *thread,
297                               bool isCallValid,
298                               egl::Display *dpyPacked,
299                               EGLint *major,
300                               EGLint *minor,
301                               EGLBoolean returnValue)
302 {
303     ParamBuffer paramBuffer;
304 
305     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
306     paramBuffer.addValueParam("major", ParamType::TEGLintPointer, major);
307     paramBuffer.addValueParam("minor", ParamType::TEGLintPointer, minor);
308 
309     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
310     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
311     paramBuffer.addReturnValue(std::move(returnValueCapture));
312 
313     return CallCapture(angle::EntryPoint::EGLInitialize, std::move(paramBuffer));
314 }
315 
CaptureMakeCurrent(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID drawPacked,SurfaceID readPacked,gl::ContextID ctxPacked,EGLBoolean returnValue)316 CallCapture CaptureMakeCurrent(egl::Thread *thread,
317                                bool isCallValid,
318                                egl::Display *dpyPacked,
319                                SurfaceID drawPacked,
320                                SurfaceID readPacked,
321                                gl::ContextID ctxPacked,
322                                EGLBoolean returnValue)
323 {
324     ParamBuffer paramBuffer;
325 
326     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
327     paramBuffer.addValueParam("drawPacked", ParamType::TSurfaceID, drawPacked);
328     paramBuffer.addValueParam("readPacked", ParamType::TSurfaceID, readPacked);
329     paramBuffer.addValueParam("ctxPacked", ParamType::TContextID, ctxPacked);
330 
331     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
332     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
333     paramBuffer.addReturnValue(std::move(returnValueCapture));
334 
335     return CallCapture(angle::EntryPoint::EGLMakeCurrent, std::move(paramBuffer));
336 }
337 
CaptureQueryContext(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,gl::ContextID ctxPacked,EGLint attribute,EGLint * value,EGLBoolean returnValue)338 CallCapture CaptureQueryContext(egl::Thread *thread,
339                                 bool isCallValid,
340                                 egl::Display *dpyPacked,
341                                 gl::ContextID ctxPacked,
342                                 EGLint attribute,
343                                 EGLint *value,
344                                 EGLBoolean returnValue)
345 {
346     ParamBuffer paramBuffer;
347 
348     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
349     paramBuffer.addValueParam("ctxPacked", ParamType::TContextID, ctxPacked);
350     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
351     paramBuffer.addValueParam("value", ParamType::TEGLintPointer, value);
352 
353     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
354     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
355     paramBuffer.addReturnValue(std::move(returnValueCapture));
356 
357     return CallCapture(angle::EntryPoint::EGLQueryContext, std::move(paramBuffer));
358 }
359 
CaptureQueryString(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint name,const char * returnValue)360 CallCapture CaptureQueryString(egl::Thread *thread,
361                                bool isCallValid,
362                                egl::Display *dpyPacked,
363                                EGLint name,
364                                const char *returnValue)
365 {
366     ParamBuffer paramBuffer;
367 
368     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
369     paramBuffer.addValueParam("name", ParamType::TEGLint, name);
370 
371     ParamCapture returnValueCapture("returnValue", ParamType::TcharConstPointer);
372     InitParamValue(ParamType::TcharConstPointer, returnValue, &returnValueCapture.value);
373     paramBuffer.addReturnValue(std::move(returnValueCapture));
374 
375     return CallCapture(angle::EntryPoint::EGLQueryString, std::move(paramBuffer));
376 }
377 
CaptureQuerySurface(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint attribute,EGLint * value,EGLBoolean returnValue)378 CallCapture CaptureQuerySurface(egl::Thread *thread,
379                                 bool isCallValid,
380                                 egl::Display *dpyPacked,
381                                 SurfaceID surfacePacked,
382                                 EGLint attribute,
383                                 EGLint *value,
384                                 EGLBoolean returnValue)
385 {
386     ParamBuffer paramBuffer;
387 
388     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
389     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
390     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
391     paramBuffer.addValueParam("value", ParamType::TEGLintPointer, value);
392 
393     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
394     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
395     paramBuffer.addReturnValue(std::move(returnValueCapture));
396 
397     return CallCapture(angle::EntryPoint::EGLQuerySurface, std::move(paramBuffer));
398 }
399 
CaptureSwapBuffers(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLBoolean returnValue)400 CallCapture CaptureSwapBuffers(egl::Thread *thread,
401                                bool isCallValid,
402                                egl::Display *dpyPacked,
403                                SurfaceID surfacePacked,
404                                EGLBoolean returnValue)
405 {
406     ParamBuffer paramBuffer;
407 
408     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
409     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
410 
411     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
412     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
413     paramBuffer.addReturnValue(std::move(returnValueCapture));
414 
415     return CallCapture(angle::EntryPoint::EGLSwapBuffers, std::move(paramBuffer));
416 }
417 
CaptureTerminate(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLBoolean returnValue)418 CallCapture CaptureTerminate(egl::Thread *thread,
419                              bool isCallValid,
420                              egl::Display *dpyPacked,
421                              EGLBoolean returnValue)
422 {
423     ParamBuffer paramBuffer;
424 
425     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
426 
427     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
428     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
429     paramBuffer.addReturnValue(std::move(returnValueCapture));
430 
431     return CallCapture(angle::EntryPoint::EGLTerminate, std::move(paramBuffer));
432 }
433 
CaptureWaitGL(egl::Thread * thread,bool isCallValid,EGLBoolean returnValue)434 CallCapture CaptureWaitGL(egl::Thread *thread, bool isCallValid, EGLBoolean returnValue)
435 {
436     ParamBuffer paramBuffer;
437 
438     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
439     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
440     paramBuffer.addReturnValue(std::move(returnValueCapture));
441 
442     return CallCapture(angle::EntryPoint::EGLWaitGL, std::move(paramBuffer));
443 }
444 
CaptureWaitNative(egl::Thread * thread,bool isCallValid,EGLint engine,EGLBoolean returnValue)445 CallCapture CaptureWaitNative(egl::Thread *thread,
446                               bool isCallValid,
447                               EGLint engine,
448                               EGLBoolean returnValue)
449 {
450     ParamBuffer paramBuffer;
451 
452     paramBuffer.addValueParam("engine", ParamType::TEGLint, engine);
453 
454     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
455     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
456     paramBuffer.addReturnValue(std::move(returnValueCapture));
457 
458     return CallCapture(angle::EntryPoint::EGLWaitNative, std::move(paramBuffer));
459 }
460 
CaptureBindTexImage(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint buffer,EGLBoolean returnValue)461 CallCapture CaptureBindTexImage(egl::Thread *thread,
462                                 bool isCallValid,
463                                 egl::Display *dpyPacked,
464                                 SurfaceID surfacePacked,
465                                 EGLint buffer,
466                                 EGLBoolean returnValue)
467 {
468     ParamBuffer paramBuffer;
469 
470     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
471     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
472     paramBuffer.addValueParam("buffer", ParamType::TEGLint, buffer);
473 
474     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
475     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
476     paramBuffer.addReturnValue(std::move(returnValueCapture));
477 
478     return CallCapture(angle::EntryPoint::EGLBindTexImage, std::move(paramBuffer));
479 }
480 
CaptureReleaseTexImage(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint buffer,EGLBoolean returnValue)481 CallCapture CaptureReleaseTexImage(egl::Thread *thread,
482                                    bool isCallValid,
483                                    egl::Display *dpyPacked,
484                                    SurfaceID surfacePacked,
485                                    EGLint buffer,
486                                    EGLBoolean returnValue)
487 {
488     ParamBuffer paramBuffer;
489 
490     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
491     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
492     paramBuffer.addValueParam("buffer", ParamType::TEGLint, buffer);
493 
494     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
495     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
496     paramBuffer.addReturnValue(std::move(returnValueCapture));
497 
498     return CallCapture(angle::EntryPoint::EGLReleaseTexImage, std::move(paramBuffer));
499 }
500 
CaptureSurfaceAttrib(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint attribute,EGLint value,EGLBoolean returnValue)501 CallCapture CaptureSurfaceAttrib(egl::Thread *thread,
502                                  bool isCallValid,
503                                  egl::Display *dpyPacked,
504                                  SurfaceID surfacePacked,
505                                  EGLint attribute,
506                                  EGLint value,
507                                  EGLBoolean returnValue)
508 {
509     ParamBuffer paramBuffer;
510 
511     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
512     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
513     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
514     paramBuffer.addValueParam("value", ParamType::TEGLint, value);
515 
516     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
517     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
518     paramBuffer.addReturnValue(std::move(returnValueCapture));
519 
520     return CallCapture(angle::EntryPoint::EGLSurfaceAttrib, std::move(paramBuffer));
521 }
522 
CaptureSwapInterval(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint interval,EGLBoolean returnValue)523 CallCapture CaptureSwapInterval(egl::Thread *thread,
524                                 bool isCallValid,
525                                 egl::Display *dpyPacked,
526                                 EGLint interval,
527                                 EGLBoolean returnValue)
528 {
529     ParamBuffer paramBuffer;
530 
531     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
532     paramBuffer.addValueParam("interval", ParamType::TEGLint, interval);
533 
534     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
535     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
536     paramBuffer.addReturnValue(std::move(returnValueCapture));
537 
538     return CallCapture(angle::EntryPoint::EGLSwapInterval, std::move(paramBuffer));
539 }
540 
CaptureBindAPI(egl::Thread * thread,bool isCallValid,EGLenum api,EGLBoolean returnValue)541 CallCapture CaptureBindAPI(egl::Thread *thread,
542                            bool isCallValid,
543                            EGLenum api,
544                            EGLBoolean returnValue)
545 {
546     ParamBuffer paramBuffer;
547 
548     paramBuffer.addValueParam("api", ParamType::TEGLenum, api);
549 
550     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
551     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
552     paramBuffer.addReturnValue(std::move(returnValueCapture));
553 
554     return CallCapture(angle::EntryPoint::EGLBindAPI, std::move(paramBuffer));
555 }
556 
CaptureCreatePbufferFromClientBuffer(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLenum buftype,EGLClientBuffer buffer,egl::Config * configPacked,const AttributeMap & attrib_listPacked,EGLSurface returnValue)557 CallCapture CaptureCreatePbufferFromClientBuffer(egl::Thread *thread,
558                                                  bool isCallValid,
559                                                  egl::Display *dpyPacked,
560                                                  EGLenum buftype,
561                                                  EGLClientBuffer buffer,
562                                                  egl::Config *configPacked,
563                                                  const AttributeMap &attrib_listPacked,
564                                                  EGLSurface returnValue)
565 {
566     ParamBuffer paramBuffer;
567 
568     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
569     paramBuffer.addValueParam("buftype", ParamType::TEGLenum, buftype);
570     paramBuffer.addValueParam("buffer", ParamType::TEGLClientBuffer, buffer);
571     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
572     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
573 
574     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
575     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
576     paramBuffer.addReturnValue(std::move(returnValueCapture));
577 
578     return CallCapture(angle::EntryPoint::EGLCreatePbufferFromClientBuffer, std::move(paramBuffer));
579 }
580 
CaptureQueryAPI(egl::Thread * thread,bool isCallValid,EGLenum returnValue)581 CallCapture CaptureQueryAPI(egl::Thread *thread, bool isCallValid, EGLenum returnValue)
582 {
583     ParamBuffer paramBuffer;
584 
585     ParamCapture returnValueCapture("returnValue", ParamType::TEGLenum);
586     InitParamValue(ParamType::TEGLenum, returnValue, &returnValueCapture.value);
587     paramBuffer.addReturnValue(std::move(returnValueCapture));
588 
589     return CallCapture(angle::EntryPoint::EGLQueryAPI, std::move(paramBuffer));
590 }
591 
CaptureReleaseThread(egl::Thread * thread,bool isCallValid,EGLBoolean returnValue)592 CallCapture CaptureReleaseThread(egl::Thread *thread, bool isCallValid, EGLBoolean returnValue)
593 {
594     ParamBuffer paramBuffer;
595 
596     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
597     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
598     paramBuffer.addReturnValue(std::move(returnValueCapture));
599 
600     return CallCapture(angle::EntryPoint::EGLReleaseThread, std::move(paramBuffer));
601 }
602 
CaptureWaitClient(egl::Thread * thread,bool isCallValid,EGLBoolean returnValue)603 CallCapture CaptureWaitClient(egl::Thread *thread, bool isCallValid, EGLBoolean returnValue)
604 {
605     ParamBuffer paramBuffer;
606 
607     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
608     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
609     paramBuffer.addReturnValue(std::move(returnValueCapture));
610 
611     return CallCapture(angle::EntryPoint::EGLWaitClient, std::move(paramBuffer));
612 }
613 
CaptureGetCurrentContext(egl::Thread * thread,bool isCallValid,EGLContext returnValue)614 CallCapture CaptureGetCurrentContext(egl::Thread *thread, bool isCallValid, EGLContext returnValue)
615 {
616     ParamBuffer paramBuffer;
617 
618     ParamCapture returnValueCapture("returnValue", ParamType::TEGLContext);
619     InitParamValue(ParamType::TEGLContext, returnValue, &returnValueCapture.value);
620     paramBuffer.addReturnValue(std::move(returnValueCapture));
621 
622     return CallCapture(angle::EntryPoint::EGLGetCurrentContext, std::move(paramBuffer));
623 }
624 
CaptureClientWaitSync(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLint flags,EGLTime timeout,EGLint returnValue)625 CallCapture CaptureClientWaitSync(egl::Thread *thread,
626                                   bool isCallValid,
627                                   egl::Display *dpyPacked,
628                                   egl::SyncID syncPacked,
629                                   EGLint flags,
630                                   EGLTime timeout,
631                                   EGLint returnValue)
632 {
633     ParamBuffer paramBuffer;
634 
635     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
636     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
637     paramBuffer.addValueParam("flags", ParamType::TEGLint, flags);
638     paramBuffer.addValueParam("timeout", ParamType::TEGLTime, timeout);
639 
640     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
641     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
642     paramBuffer.addReturnValue(std::move(returnValueCapture));
643 
644     return CallCapture(angle::EntryPoint::EGLClientWaitSync, std::move(paramBuffer));
645 }
646 
CaptureCreateImage(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,gl::ContextID ctxPacked,EGLenum target,EGLClientBuffer buffer,const AttributeMap & attrib_listPacked,EGLImage returnValue)647 CallCapture CaptureCreateImage(egl::Thread *thread,
648                                bool isCallValid,
649                                egl::Display *dpyPacked,
650                                gl::ContextID ctxPacked,
651                                EGLenum target,
652                                EGLClientBuffer buffer,
653                                const AttributeMap &attrib_listPacked,
654                                EGLImage returnValue)
655 {
656     ParamBuffer paramBuffer;
657 
658     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
659     paramBuffer.addValueParam("ctxPacked", ParamType::TContextID, ctxPacked);
660     paramBuffer.addValueParam("target", ParamType::TEGLenum, target);
661     paramBuffer.addValueParam("buffer", ParamType::TEGLClientBuffer, buffer);
662     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
663 
664     ParamCapture returnValueCapture("returnValue", ParamType::TEGLImage);
665     InitParamValue(ParamType::TEGLImage, returnValue, &returnValueCapture.value);
666     paramBuffer.addReturnValue(std::move(returnValueCapture));
667 
668     return CallCapture(angle::EntryPoint::EGLCreateImage, std::move(paramBuffer));
669 }
670 
CaptureCreatePlatformPixmapSurface(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,void * native_pixmap,const AttributeMap & attrib_listPacked,EGLSurface returnValue)671 CallCapture CaptureCreatePlatformPixmapSurface(egl::Thread *thread,
672                                                bool isCallValid,
673                                                egl::Display *dpyPacked,
674                                                egl::Config *configPacked,
675                                                void *native_pixmap,
676                                                const AttributeMap &attrib_listPacked,
677                                                EGLSurface returnValue)
678 {
679     ParamBuffer paramBuffer;
680 
681     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
682     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
683     paramBuffer.addValueParam("native_pixmap", ParamType::TvoidPointer, native_pixmap);
684     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
685 
686     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
687     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
688     paramBuffer.addReturnValue(std::move(returnValueCapture));
689 
690     return CallCapture(angle::EntryPoint::EGLCreatePlatformPixmapSurface, std::move(paramBuffer));
691 }
692 
CaptureCreatePlatformWindowSurface(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,void * native_window,const AttributeMap & attrib_listPacked,EGLSurface returnValue)693 CallCapture CaptureCreatePlatformWindowSurface(egl::Thread *thread,
694                                                bool isCallValid,
695                                                egl::Display *dpyPacked,
696                                                egl::Config *configPacked,
697                                                void *native_window,
698                                                const AttributeMap &attrib_listPacked,
699                                                EGLSurface returnValue)
700 {
701     ParamBuffer paramBuffer;
702 
703     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
704     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
705     paramBuffer.addValueParam("native_window", ParamType::TvoidPointer, native_window);
706     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
707 
708     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
709     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
710     paramBuffer.addReturnValue(std::move(returnValueCapture));
711 
712     return CallCapture(angle::EntryPoint::EGLCreatePlatformWindowSurface, std::move(paramBuffer));
713 }
714 
CaptureCreateSync(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLenum type,const AttributeMap & attrib_listPacked,EGLSync returnValue)715 CallCapture CaptureCreateSync(egl::Thread *thread,
716                               bool isCallValid,
717                               egl::Display *dpyPacked,
718                               EGLenum type,
719                               const AttributeMap &attrib_listPacked,
720                               EGLSync returnValue)
721 {
722     ParamBuffer paramBuffer;
723 
724     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
725     paramBuffer.addValueParam("type", ParamType::TEGLenum, type);
726     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
727 
728     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSync);
729     InitParamValue(ParamType::TEGLSync, returnValue, &returnValueCapture.value);
730     paramBuffer.addReturnValue(std::move(returnValueCapture));
731 
732     return CallCapture(angle::EntryPoint::EGLCreateSync, std::move(paramBuffer));
733 }
734 
CaptureDestroyImage(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,ImageID imagePacked,EGLBoolean returnValue)735 CallCapture CaptureDestroyImage(egl::Thread *thread,
736                                 bool isCallValid,
737                                 egl::Display *dpyPacked,
738                                 ImageID imagePacked,
739                                 EGLBoolean returnValue)
740 {
741     ParamBuffer paramBuffer;
742 
743     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
744     paramBuffer.addValueParam("imagePacked", ParamType::TImageID, imagePacked);
745 
746     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
747     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
748     paramBuffer.addReturnValue(std::move(returnValueCapture));
749 
750     return CallCapture(angle::EntryPoint::EGLDestroyImage, std::move(paramBuffer));
751 }
752 
CaptureDestroySync(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLBoolean returnValue)753 CallCapture CaptureDestroySync(egl::Thread *thread,
754                                bool isCallValid,
755                                egl::Display *dpyPacked,
756                                egl::SyncID syncPacked,
757                                EGLBoolean returnValue)
758 {
759     ParamBuffer paramBuffer;
760 
761     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
762     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
763 
764     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
765     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
766     paramBuffer.addReturnValue(std::move(returnValueCapture));
767 
768     return CallCapture(angle::EntryPoint::EGLDestroySync, std::move(paramBuffer));
769 }
770 
CaptureGetPlatformDisplay(egl::Thread * thread,bool isCallValid,EGLenum platform,void * native_display,const AttributeMap & attrib_listPacked,EGLDisplay returnValue)771 CallCapture CaptureGetPlatformDisplay(egl::Thread *thread,
772                                       bool isCallValid,
773                                       EGLenum platform,
774                                       void *native_display,
775                                       const AttributeMap &attrib_listPacked,
776                                       EGLDisplay returnValue)
777 {
778     ParamBuffer paramBuffer;
779 
780     paramBuffer.addValueParam("platform", ParamType::TEGLenum, platform);
781     paramBuffer.addValueParam("native_display", ParamType::TvoidPointer, native_display);
782     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
783 
784     ParamCapture returnValueCapture("returnValue", ParamType::TEGLDisplay);
785     InitParamValue(ParamType::TEGLDisplay, returnValue, &returnValueCapture.value);
786     paramBuffer.addReturnValue(std::move(returnValueCapture));
787 
788     return CallCapture(angle::EntryPoint::EGLGetPlatformDisplay, std::move(paramBuffer));
789 }
790 
CaptureGetSyncAttrib(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLint attribute,EGLAttrib * value,EGLBoolean returnValue)791 CallCapture CaptureGetSyncAttrib(egl::Thread *thread,
792                                  bool isCallValid,
793                                  egl::Display *dpyPacked,
794                                  egl::SyncID syncPacked,
795                                  EGLint attribute,
796                                  EGLAttrib *value,
797                                  EGLBoolean returnValue)
798 {
799     ParamBuffer paramBuffer;
800 
801     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
802     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
803     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
804     paramBuffer.addValueParam("value", ParamType::TEGLAttribPointer, value);
805 
806     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
807     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
808     paramBuffer.addReturnValue(std::move(returnValueCapture));
809 
810     return CallCapture(angle::EntryPoint::EGLGetSyncAttrib, std::move(paramBuffer));
811 }
812 
CaptureWaitSync(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLint flags,EGLBoolean returnValue)813 CallCapture CaptureWaitSync(egl::Thread *thread,
814                             bool isCallValid,
815                             egl::Display *dpyPacked,
816                             egl::SyncID syncPacked,
817                             EGLint flags,
818                             EGLBoolean returnValue)
819 {
820     ParamBuffer paramBuffer;
821 
822     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
823     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
824     paramBuffer.addValueParam("flags", ParamType::TEGLint, flags);
825 
826     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
827     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
828     paramBuffer.addReturnValue(std::move(returnValueCapture));
829 
830     return CallCapture(angle::EntryPoint::EGLWaitSync, std::move(paramBuffer));
831 }
832 
CaptureSetBlobCacheFuncsANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLSetBlobFuncANDROID set,EGLGetBlobFuncANDROID get)833 CallCapture CaptureSetBlobCacheFuncsANDROID(egl::Thread *thread,
834                                             bool isCallValid,
835                                             egl::Display *dpyPacked,
836                                             EGLSetBlobFuncANDROID set,
837                                             EGLGetBlobFuncANDROID get)
838 {
839     ParamBuffer paramBuffer;
840 
841     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
842     paramBuffer.addValueParam("set", ParamType::TEGLSetBlobFuncANDROID, set);
843     paramBuffer.addValueParam("get", ParamType::TEGLGetBlobFuncANDROID, get);
844 
845     return CallCapture(angle::EntryPoint::EGLSetBlobCacheFuncsANDROID, std::move(paramBuffer));
846 }
847 
CaptureCreateNativeClientBufferANDROID(egl::Thread * thread,bool isCallValid,const AttributeMap & attrib_listPacked,EGLClientBuffer returnValue)848 CallCapture CaptureCreateNativeClientBufferANDROID(egl::Thread *thread,
849                                                    bool isCallValid,
850                                                    const AttributeMap &attrib_listPacked,
851                                                    EGLClientBuffer returnValue)
852 {
853     ParamBuffer paramBuffer;
854 
855     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
856 
857     ParamCapture returnValueCapture("returnValue", ParamType::TEGLClientBuffer);
858     InitParamValue(ParamType::TEGLClientBuffer, returnValue, &returnValueCapture.value);
859     paramBuffer.addReturnValue(std::move(returnValueCapture));
860 
861     return CallCapture(angle::EntryPoint::EGLCreateNativeClientBufferANDROID,
862                        std::move(paramBuffer));
863 }
864 
CaptureGetCompositorTimingSupportedANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,CompositorTiming namePacked,EGLBoolean returnValue)865 CallCapture CaptureGetCompositorTimingSupportedANDROID(egl::Thread *thread,
866                                                        bool isCallValid,
867                                                        egl::Display *dpyPacked,
868                                                        SurfaceID surfacePacked,
869                                                        CompositorTiming namePacked,
870                                                        EGLBoolean returnValue)
871 {
872     ParamBuffer paramBuffer;
873 
874     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
875     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
876     paramBuffer.addValueParam("namePacked", ParamType::TCompositorTiming, namePacked);
877 
878     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
879     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
880     paramBuffer.addReturnValue(std::move(returnValueCapture));
881 
882     return CallCapture(angle::EntryPoint::EGLGetCompositorTimingSupportedANDROID,
883                        std::move(paramBuffer));
884 }
885 
CaptureGetCompositorTimingANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint numTimestamps,const EGLint * names,EGLnsecsANDROID * values,EGLBoolean returnValue)886 CallCapture CaptureGetCompositorTimingANDROID(egl::Thread *thread,
887                                               bool isCallValid,
888                                               egl::Display *dpyPacked,
889                                               SurfaceID surfacePacked,
890                                               EGLint numTimestamps,
891                                               const EGLint *names,
892                                               EGLnsecsANDROID *values,
893                                               EGLBoolean returnValue)
894 {
895     ParamBuffer paramBuffer;
896 
897     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
898     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
899     paramBuffer.addValueParam("numTimestamps", ParamType::TEGLint, numTimestamps);
900     paramBuffer.addValueParam("names", ParamType::TEGLintConstPointer, names);
901     paramBuffer.addValueParam("values", ParamType::TEGLnsecsANDROIDPointer, values);
902 
903     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
904     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
905     paramBuffer.addReturnValue(std::move(returnValueCapture));
906 
907     return CallCapture(angle::EntryPoint::EGLGetCompositorTimingANDROID, std::move(paramBuffer));
908 }
909 
CaptureGetNextFrameIdANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLuint64KHR * frameId,EGLBoolean returnValue)910 CallCapture CaptureGetNextFrameIdANDROID(egl::Thread *thread,
911                                          bool isCallValid,
912                                          egl::Display *dpyPacked,
913                                          SurfaceID surfacePacked,
914                                          EGLuint64KHR *frameId,
915                                          EGLBoolean returnValue)
916 {
917     ParamBuffer paramBuffer;
918 
919     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
920     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
921     paramBuffer.addValueParam("frameId", ParamType::TEGLuint64KHRPointer, frameId);
922 
923     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
924     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
925     paramBuffer.addReturnValue(std::move(returnValueCapture));
926 
927     return CallCapture(angle::EntryPoint::EGLGetNextFrameIdANDROID, std::move(paramBuffer));
928 }
929 
CaptureGetFrameTimestampSupportedANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,Timestamp timestampPacked,EGLBoolean returnValue)930 CallCapture CaptureGetFrameTimestampSupportedANDROID(egl::Thread *thread,
931                                                      bool isCallValid,
932                                                      egl::Display *dpyPacked,
933                                                      SurfaceID surfacePacked,
934                                                      Timestamp timestampPacked,
935                                                      EGLBoolean returnValue)
936 {
937     ParamBuffer paramBuffer;
938 
939     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
940     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
941     paramBuffer.addValueParam("timestampPacked", ParamType::TTimestamp, timestampPacked);
942 
943     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
944     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
945     paramBuffer.addReturnValue(std::move(returnValueCapture));
946 
947     return CallCapture(angle::EntryPoint::EGLGetFrameTimestampSupportedANDROID,
948                        std::move(paramBuffer));
949 }
950 
CaptureGetFrameTimestampsANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLuint64KHR frameId,EGLint numTimestamps,const EGLint * timestamps,EGLnsecsANDROID * values,EGLBoolean returnValue)951 CallCapture CaptureGetFrameTimestampsANDROID(egl::Thread *thread,
952                                              bool isCallValid,
953                                              egl::Display *dpyPacked,
954                                              SurfaceID surfacePacked,
955                                              EGLuint64KHR frameId,
956                                              EGLint numTimestamps,
957                                              const EGLint *timestamps,
958                                              EGLnsecsANDROID *values,
959                                              EGLBoolean returnValue)
960 {
961     ParamBuffer paramBuffer;
962 
963     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
964     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
965     paramBuffer.addValueParam("frameId", ParamType::TEGLuint64KHR, frameId);
966     paramBuffer.addValueParam("numTimestamps", ParamType::TEGLint, numTimestamps);
967     paramBuffer.addValueParam("timestamps", ParamType::TEGLintConstPointer, timestamps);
968     paramBuffer.addValueParam("values", ParamType::TEGLnsecsANDROIDPointer, values);
969 
970     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
971     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
972     paramBuffer.addReturnValue(std::move(returnValueCapture));
973 
974     return CallCapture(angle::EntryPoint::EGLGetFrameTimestampsANDROID, std::move(paramBuffer));
975 }
976 
CaptureGetNativeClientBufferANDROID(egl::Thread * thread,bool isCallValid,const struct AHardwareBuffer * buffer,EGLClientBuffer returnValue)977 CallCapture CaptureGetNativeClientBufferANDROID(egl::Thread *thread,
978                                                 bool isCallValid,
979                                                 const struct AHardwareBuffer *buffer,
980                                                 EGLClientBuffer returnValue)
981 {
982     ParamBuffer paramBuffer;
983 
984     paramBuffer.addValueParam("buffer", ParamType::TAHardwareBufferConstPointer, buffer);
985 
986     ParamCapture returnValueCapture("returnValue", ParamType::TEGLClientBuffer);
987     InitParamValue(ParamType::TEGLClientBuffer, returnValue, &returnValueCapture.value);
988     paramBuffer.addReturnValue(std::move(returnValueCapture));
989 
990     return CallCapture(angle::EntryPoint::EGLGetNativeClientBufferANDROID, std::move(paramBuffer));
991 }
992 
CaptureDupNativeFenceFDANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLint returnValue)993 CallCapture CaptureDupNativeFenceFDANDROID(egl::Thread *thread,
994                                            bool isCallValid,
995                                            egl::Display *dpyPacked,
996                                            egl::SyncID syncPacked,
997                                            EGLint returnValue)
998 {
999     ParamBuffer paramBuffer;
1000 
1001     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1002     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
1003 
1004     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
1005     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
1006     paramBuffer.addReturnValue(std::move(returnValueCapture));
1007 
1008     return CallCapture(angle::EntryPoint::EGLDupNativeFenceFDANDROID, std::move(paramBuffer));
1009 }
1010 
CapturePresentationTimeANDROID(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLnsecsANDROID time,EGLBoolean returnValue)1011 CallCapture CapturePresentationTimeANDROID(egl::Thread *thread,
1012                                            bool isCallValid,
1013                                            egl::Display *dpyPacked,
1014                                            SurfaceID surfacePacked,
1015                                            EGLnsecsANDROID time,
1016                                            EGLBoolean returnValue)
1017 {
1018     ParamBuffer paramBuffer;
1019 
1020     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1021     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1022     paramBuffer.addValueParam("time", ParamType::TEGLnsecsANDROID, time);
1023 
1024     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1025     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1026     paramBuffer.addReturnValue(std::move(returnValueCapture));
1027 
1028     return CallCapture(angle::EntryPoint::EGLPresentationTimeANDROID, std::move(paramBuffer));
1029 }
1030 
CaptureCreateDeviceANGLE(egl::Thread * thread,bool isCallValid,EGLint device_type,void * native_device,const EGLAttrib * attrib_list,EGLDeviceEXT returnValue)1031 CallCapture CaptureCreateDeviceANGLE(egl::Thread *thread,
1032                                      bool isCallValid,
1033                                      EGLint device_type,
1034                                      void *native_device,
1035                                      const EGLAttrib *attrib_list,
1036                                      EGLDeviceEXT returnValue)
1037 {
1038     ParamBuffer paramBuffer;
1039 
1040     paramBuffer.addValueParam("device_type", ParamType::TEGLint, device_type);
1041     paramBuffer.addValueParam("native_device", ParamType::TvoidPointer, native_device);
1042     paramBuffer.addValueParam("attrib_list", ParamType::TEGLAttribConstPointer, attrib_list);
1043 
1044     ParamCapture returnValueCapture("returnValue", ParamType::TEGLDeviceEXT);
1045     InitParamValue(ParamType::TEGLDeviceEXT, returnValue, &returnValueCapture.value);
1046     paramBuffer.addReturnValue(std::move(returnValueCapture));
1047 
1048     return CallCapture(angle::EntryPoint::EGLCreateDeviceANGLE, std::move(paramBuffer));
1049 }
1050 
CaptureReleaseDeviceANGLE(egl::Thread * thread,bool isCallValid,egl::Device * devicePacked,EGLBoolean returnValue)1051 CallCapture CaptureReleaseDeviceANGLE(egl::Thread *thread,
1052                                       bool isCallValid,
1053                                       egl::Device *devicePacked,
1054                                       EGLBoolean returnValue)
1055 {
1056     ParamBuffer paramBuffer;
1057 
1058     paramBuffer.addValueParam("devicePacked", ParamType::Tegl_DevicePointer, devicePacked);
1059 
1060     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1061     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1062     paramBuffer.addReturnValue(std::move(returnValueCapture));
1063 
1064     return CallCapture(angle::EntryPoint::EGLReleaseDeviceANGLE, std::move(paramBuffer));
1065 }
1066 
CaptureAcquireExternalContextANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID drawAndReadPacked)1067 CallCapture CaptureAcquireExternalContextANGLE(egl::Thread *thread,
1068                                                bool isCallValid,
1069                                                egl::Display *dpyPacked,
1070                                                SurfaceID drawAndReadPacked)
1071 {
1072     ParamBuffer paramBuffer;
1073 
1074     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1075     paramBuffer.addValueParam("drawAndReadPacked", ParamType::TSurfaceID, drawAndReadPacked);
1076 
1077     return CallCapture(angle::EntryPoint::EGLAcquireExternalContextANGLE, std::move(paramBuffer));
1078 }
1079 
CaptureReleaseExternalContextANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked)1080 CallCapture CaptureReleaseExternalContextANGLE(egl::Thread *thread,
1081                                                bool isCallValid,
1082                                                egl::Display *dpyPacked)
1083 {
1084     ParamBuffer paramBuffer;
1085 
1086     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1087 
1088     return CallCapture(angle::EntryPoint::EGLReleaseExternalContextANGLE, std::move(paramBuffer));
1089 }
1090 
CaptureQueryStringiANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint name,EGLint index,const char * returnValue)1091 CallCapture CaptureQueryStringiANGLE(egl::Thread *thread,
1092                                      bool isCallValid,
1093                                      egl::Display *dpyPacked,
1094                                      EGLint name,
1095                                      EGLint index,
1096                                      const char *returnValue)
1097 {
1098     ParamBuffer paramBuffer;
1099 
1100     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1101     paramBuffer.addValueParam("name", ParamType::TEGLint, name);
1102     paramBuffer.addValueParam("index", ParamType::TEGLint, index);
1103 
1104     ParamCapture returnValueCapture("returnValue", ParamType::TcharConstPointer);
1105     InitParamValue(ParamType::TcharConstPointer, returnValue, &returnValueCapture.value);
1106     paramBuffer.addReturnValue(std::move(returnValueCapture));
1107 
1108     return CallCapture(angle::EntryPoint::EGLQueryStringiANGLE, std::move(paramBuffer));
1109 }
1110 
CaptureQueryDisplayAttribANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint attribute,EGLAttrib * value,EGLBoolean returnValue)1111 CallCapture CaptureQueryDisplayAttribANGLE(egl::Thread *thread,
1112                                            bool isCallValid,
1113                                            egl::Display *dpyPacked,
1114                                            EGLint attribute,
1115                                            EGLAttrib *value,
1116                                            EGLBoolean returnValue)
1117 {
1118     ParamBuffer paramBuffer;
1119 
1120     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1121     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
1122     paramBuffer.addValueParam("value", ParamType::TEGLAttribPointer, value);
1123 
1124     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1125     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1126     paramBuffer.addReturnValue(std::move(returnValueCapture));
1127 
1128     return CallCapture(angle::EntryPoint::EGLQueryDisplayAttribANGLE, std::move(paramBuffer));
1129 }
1130 
CaptureCopyMetalSharedEventANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,void * returnValue)1131 CallCapture CaptureCopyMetalSharedEventANGLE(egl::Thread *thread,
1132                                              bool isCallValid,
1133                                              egl::Display *dpyPacked,
1134                                              egl::SyncID syncPacked,
1135                                              void *returnValue)
1136 {
1137     ParamBuffer paramBuffer;
1138 
1139     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1140     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
1141 
1142     ParamCapture returnValueCapture("returnValue", ParamType::TvoidPointer);
1143     InitParamValue(ParamType::TvoidPointer, returnValue, &returnValueCapture.value);
1144     paramBuffer.addReturnValue(std::move(returnValueCapture));
1145 
1146     return CallCapture(angle::EntryPoint::EGLCopyMetalSharedEventANGLE, std::move(paramBuffer));
1147 }
1148 
CaptureReleaseHighPowerGPUANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,gl::ContextID ctxPacked)1149 CallCapture CaptureReleaseHighPowerGPUANGLE(egl::Thread *thread,
1150                                             bool isCallValid,
1151                                             egl::Display *dpyPacked,
1152                                             gl::ContextID ctxPacked)
1153 {
1154     ParamBuffer paramBuffer;
1155 
1156     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1157     paramBuffer.addValueParam("ctxPacked", ParamType::TContextID, ctxPacked);
1158 
1159     return CallCapture(angle::EntryPoint::EGLReleaseHighPowerGPUANGLE, std::move(paramBuffer));
1160 }
1161 
CaptureReacquireHighPowerGPUANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,gl::ContextID ctxPacked)1162 CallCapture CaptureReacquireHighPowerGPUANGLE(egl::Thread *thread,
1163                                               bool isCallValid,
1164                                               egl::Display *dpyPacked,
1165                                               gl::ContextID ctxPacked)
1166 {
1167     ParamBuffer paramBuffer;
1168 
1169     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1170     paramBuffer.addValueParam("ctxPacked", ParamType::TContextID, ctxPacked);
1171 
1172     return CallCapture(angle::EntryPoint::EGLReacquireHighPowerGPUANGLE, std::move(paramBuffer));
1173 }
1174 
CaptureHandleGPUSwitchANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked)1175 CallCapture CaptureHandleGPUSwitchANGLE(egl::Thread *thread,
1176                                         bool isCallValid,
1177                                         egl::Display *dpyPacked)
1178 {
1179     ParamBuffer paramBuffer;
1180 
1181     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1182 
1183     return CallCapture(angle::EntryPoint::EGLHandleGPUSwitchANGLE, std::move(paramBuffer));
1184 }
1185 
CaptureForceGPUSwitchANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint gpuIDHigh,EGLint gpuIDLow)1186 CallCapture CaptureForceGPUSwitchANGLE(egl::Thread *thread,
1187                                        bool isCallValid,
1188                                        egl::Display *dpyPacked,
1189                                        EGLint gpuIDHigh,
1190                                        EGLint gpuIDLow)
1191 {
1192     ParamBuffer paramBuffer;
1193 
1194     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1195     paramBuffer.addValueParam("gpuIDHigh", ParamType::TEGLint, gpuIDHigh);
1196     paramBuffer.addValueParam("gpuIDLow", ParamType::TEGLint, gpuIDLow);
1197 
1198     return CallCapture(angle::EntryPoint::EGLForceGPUSwitchANGLE, std::move(paramBuffer));
1199 }
1200 
CapturePrepareSwapBuffersANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLBoolean returnValue)1201 CallCapture CapturePrepareSwapBuffersANGLE(egl::Thread *thread,
1202                                            bool isCallValid,
1203                                            egl::Display *dpyPacked,
1204                                            SurfaceID surfacePacked,
1205                                            EGLBoolean returnValue)
1206 {
1207     ParamBuffer paramBuffer;
1208 
1209     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1210     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1211 
1212     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1213     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1214     paramBuffer.addReturnValue(std::move(returnValueCapture));
1215 
1216     return CallCapture(angle::EntryPoint::EGLPrepareSwapBuffersANGLE, std::move(paramBuffer));
1217 }
1218 
CaptureProgramCacheGetAttribANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLenum attrib,EGLint returnValue)1219 CallCapture CaptureProgramCacheGetAttribANGLE(egl::Thread *thread,
1220                                               bool isCallValid,
1221                                               egl::Display *dpyPacked,
1222                                               EGLenum attrib,
1223                                               EGLint returnValue)
1224 {
1225     ParamBuffer paramBuffer;
1226 
1227     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1228     paramBuffer.addValueParam("attrib", ParamType::TEGLenum, attrib);
1229 
1230     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
1231     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
1232     paramBuffer.addReturnValue(std::move(returnValueCapture));
1233 
1234     return CallCapture(angle::EntryPoint::EGLProgramCacheGetAttribANGLE, std::move(paramBuffer));
1235 }
1236 
CaptureProgramCacheQueryANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint index,void * key,EGLint * keysize,void * binary,EGLint * binarysize)1237 CallCapture CaptureProgramCacheQueryANGLE(egl::Thread *thread,
1238                                           bool isCallValid,
1239                                           egl::Display *dpyPacked,
1240                                           EGLint index,
1241                                           void *key,
1242                                           EGLint *keysize,
1243                                           void *binary,
1244                                           EGLint *binarysize)
1245 {
1246     ParamBuffer paramBuffer;
1247 
1248     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1249     paramBuffer.addValueParam("index", ParamType::TEGLint, index);
1250     paramBuffer.addValueParam("key", ParamType::TvoidPointer, key);
1251     paramBuffer.addValueParam("keysize", ParamType::TEGLintPointer, keysize);
1252     paramBuffer.addValueParam("binary", ParamType::TvoidPointer, binary);
1253     paramBuffer.addValueParam("binarysize", ParamType::TEGLintPointer, binarysize);
1254 
1255     return CallCapture(angle::EntryPoint::EGLProgramCacheQueryANGLE, std::move(paramBuffer));
1256 }
1257 
CaptureProgramCachePopulateANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,const void * key,EGLint keysize,const void * binary,EGLint binarysize)1258 CallCapture CaptureProgramCachePopulateANGLE(egl::Thread *thread,
1259                                              bool isCallValid,
1260                                              egl::Display *dpyPacked,
1261                                              const void *key,
1262                                              EGLint keysize,
1263                                              const void *binary,
1264                                              EGLint binarysize)
1265 {
1266     ParamBuffer paramBuffer;
1267 
1268     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1269     paramBuffer.addValueParam("key", ParamType::TvoidConstPointer, key);
1270     paramBuffer.addValueParam("keysize", ParamType::TEGLint, keysize);
1271     paramBuffer.addValueParam("binary", ParamType::TvoidConstPointer, binary);
1272     paramBuffer.addValueParam("binarysize", ParamType::TEGLint, binarysize);
1273 
1274     return CallCapture(angle::EntryPoint::EGLProgramCachePopulateANGLE, std::move(paramBuffer));
1275 }
1276 
CaptureProgramCacheResizeANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint limit,EGLint mode,EGLint returnValue)1277 CallCapture CaptureProgramCacheResizeANGLE(egl::Thread *thread,
1278                                            bool isCallValid,
1279                                            egl::Display *dpyPacked,
1280                                            EGLint limit,
1281                                            EGLint mode,
1282                                            EGLint returnValue)
1283 {
1284     ParamBuffer paramBuffer;
1285 
1286     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1287     paramBuffer.addValueParam("limit", ParamType::TEGLint, limit);
1288     paramBuffer.addValueParam("mode", ParamType::TEGLint, mode);
1289 
1290     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
1291     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
1292     paramBuffer.addReturnValue(std::move(returnValueCapture));
1293 
1294     return CallCapture(angle::EntryPoint::EGLProgramCacheResizeANGLE, std::move(paramBuffer));
1295 }
1296 
CaptureQuerySurfacePointerANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint attribute,void ** value,EGLBoolean returnValue)1297 CallCapture CaptureQuerySurfacePointerANGLE(egl::Thread *thread,
1298                                             bool isCallValid,
1299                                             egl::Display *dpyPacked,
1300                                             SurfaceID surfacePacked,
1301                                             EGLint attribute,
1302                                             void **value,
1303                                             EGLBoolean returnValue)
1304 {
1305     ParamBuffer paramBuffer;
1306 
1307     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1308     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1309     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
1310     paramBuffer.addValueParam("value", ParamType::TvoidPointerPointer, value);
1311 
1312     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1313     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1314     paramBuffer.addReturnValue(std::move(returnValueCapture));
1315 
1316     return CallCapture(angle::EntryPoint::EGLQuerySurfacePointerANGLE, std::move(paramBuffer));
1317 }
1318 
CaptureCreateStreamProducerD3DTextureANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,const AttributeMap & attrib_listPacked,EGLBoolean returnValue)1319 CallCapture CaptureCreateStreamProducerD3DTextureANGLE(egl::Thread *thread,
1320                                                        bool isCallValid,
1321                                                        egl::Display *dpyPacked,
1322                                                        egl::Stream *streamPacked,
1323                                                        const AttributeMap &attrib_listPacked,
1324                                                        EGLBoolean returnValue)
1325 {
1326     ParamBuffer paramBuffer;
1327 
1328     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1329     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
1330     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1331 
1332     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1333     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1334     paramBuffer.addReturnValue(std::move(returnValueCapture));
1335 
1336     return CallCapture(angle::EntryPoint::EGLCreateStreamProducerD3DTextureANGLE,
1337                        std::move(paramBuffer));
1338 }
1339 
CaptureStreamPostD3DTextureANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,void * texture,const AttributeMap & attrib_listPacked,EGLBoolean returnValue)1340 CallCapture CaptureStreamPostD3DTextureANGLE(egl::Thread *thread,
1341                                              bool isCallValid,
1342                                              egl::Display *dpyPacked,
1343                                              egl::Stream *streamPacked,
1344                                              void *texture,
1345                                              const AttributeMap &attrib_listPacked,
1346                                              EGLBoolean returnValue)
1347 {
1348     ParamBuffer paramBuffer;
1349 
1350     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1351     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
1352     paramBuffer.addValueParam("texture", ParamType::TvoidPointer, texture);
1353     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1354 
1355     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1356     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1357     paramBuffer.addReturnValue(std::move(returnValueCapture));
1358 
1359     return CallCapture(angle::EntryPoint::EGLStreamPostD3DTextureANGLE, std::move(paramBuffer));
1360 }
1361 
CaptureSwapBuffersWithFrameTokenANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLFrameTokenANGLE frametoken,EGLBoolean returnValue)1362 CallCapture CaptureSwapBuffersWithFrameTokenANGLE(egl::Thread *thread,
1363                                                   bool isCallValid,
1364                                                   egl::Display *dpyPacked,
1365                                                   SurfaceID surfacePacked,
1366                                                   EGLFrameTokenANGLE frametoken,
1367                                                   EGLBoolean returnValue)
1368 {
1369     ParamBuffer paramBuffer;
1370 
1371     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1372     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1373     paramBuffer.addValueParam("frametoken", ParamType::TEGLFrameTokenANGLE, frametoken);
1374 
1375     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1376     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1377     paramBuffer.addReturnValue(std::move(returnValueCapture));
1378 
1379     return CallCapture(angle::EntryPoint::EGLSwapBuffersWithFrameTokenANGLE,
1380                        std::move(paramBuffer));
1381 }
1382 
CaptureGetMscRateANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint * numerator,EGLint * denominator,EGLBoolean returnValue)1383 CallCapture CaptureGetMscRateANGLE(egl::Thread *thread,
1384                                    bool isCallValid,
1385                                    egl::Display *dpyPacked,
1386                                    SurfaceID surfacePacked,
1387                                    EGLint *numerator,
1388                                    EGLint *denominator,
1389                                    EGLBoolean returnValue)
1390 {
1391     ParamBuffer paramBuffer;
1392 
1393     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1394     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1395     paramBuffer.addValueParam("numerator", ParamType::TEGLintPointer, numerator);
1396     paramBuffer.addValueParam("denominator", ParamType::TEGLintPointer, denominator);
1397 
1398     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1399     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1400     paramBuffer.addReturnValue(std::move(returnValueCapture));
1401 
1402     return CallCapture(angle::EntryPoint::EGLGetMscRateANGLE, std::move(paramBuffer));
1403 }
1404 
CaptureExportVkImageANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,ImageID imagePacked,void * vk_image,void * vk_image_create_info,EGLBoolean returnValue)1405 CallCapture CaptureExportVkImageANGLE(egl::Thread *thread,
1406                                       bool isCallValid,
1407                                       egl::Display *dpyPacked,
1408                                       ImageID imagePacked,
1409                                       void *vk_image,
1410                                       void *vk_image_create_info,
1411                                       EGLBoolean returnValue)
1412 {
1413     ParamBuffer paramBuffer;
1414 
1415     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1416     paramBuffer.addValueParam("imagePacked", ParamType::TImageID, imagePacked);
1417     paramBuffer.addValueParam("vk_image", ParamType::TvoidPointer, vk_image);
1418     paramBuffer.addValueParam("vk_image_create_info", ParamType::TvoidPointer,
1419                               vk_image_create_info);
1420 
1421     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1422     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1423     paramBuffer.addReturnValue(std::move(returnValueCapture));
1424 
1425     return CallCapture(angle::EntryPoint::EGLExportVkImageANGLE, std::move(paramBuffer));
1426 }
1427 
CaptureWaitUntilWorkScheduledANGLE(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked)1428 CallCapture CaptureWaitUntilWorkScheduledANGLE(egl::Thread *thread,
1429                                                bool isCallValid,
1430                                                egl::Display *dpyPacked)
1431 {
1432     ParamBuffer paramBuffer;
1433 
1434     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1435 
1436     return CallCapture(angle::EntryPoint::EGLWaitUntilWorkScheduledANGLE, std::move(paramBuffer));
1437 }
1438 
CaptureGetSyncValuesCHROMIUM(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLuint64KHR * ust,EGLuint64KHR * msc,EGLuint64KHR * sbc,EGLBoolean returnValue)1439 CallCapture CaptureGetSyncValuesCHROMIUM(egl::Thread *thread,
1440                                          bool isCallValid,
1441                                          egl::Display *dpyPacked,
1442                                          SurfaceID surfacePacked,
1443                                          EGLuint64KHR *ust,
1444                                          EGLuint64KHR *msc,
1445                                          EGLuint64KHR *sbc,
1446                                          EGLBoolean returnValue)
1447 {
1448     ParamBuffer paramBuffer;
1449 
1450     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1451     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1452     paramBuffer.addValueParam("ust", ParamType::TEGLuint64KHRPointer, ust);
1453     paramBuffer.addValueParam("msc", ParamType::TEGLuint64KHRPointer, msc);
1454     paramBuffer.addValueParam("sbc", ParamType::TEGLuint64KHRPointer, sbc);
1455 
1456     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1457     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1458     paramBuffer.addReturnValue(std::move(returnValueCapture));
1459 
1460     return CallCapture(angle::EntryPoint::EGLGetSyncValuesCHROMIUM, std::move(paramBuffer));
1461 }
1462 
CaptureQueryDeviceAttribEXT(egl::Thread * thread,bool isCallValid,egl::Device * devicePacked,EGLint attribute,EGLAttrib * value,EGLBoolean returnValue)1463 CallCapture CaptureQueryDeviceAttribEXT(egl::Thread *thread,
1464                                         bool isCallValid,
1465                                         egl::Device *devicePacked,
1466                                         EGLint attribute,
1467                                         EGLAttrib *value,
1468                                         EGLBoolean returnValue)
1469 {
1470     ParamBuffer paramBuffer;
1471 
1472     paramBuffer.addValueParam("devicePacked", ParamType::Tegl_DevicePointer, devicePacked);
1473     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
1474     paramBuffer.addValueParam("value", ParamType::TEGLAttribPointer, value);
1475 
1476     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1477     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1478     paramBuffer.addReturnValue(std::move(returnValueCapture));
1479 
1480     return CallCapture(angle::EntryPoint::EGLQueryDeviceAttribEXT, std::move(paramBuffer));
1481 }
1482 
CaptureQueryDeviceStringEXT(egl::Thread * thread,bool isCallValid,egl::Device * devicePacked,EGLint name,const char * returnValue)1483 CallCapture CaptureQueryDeviceStringEXT(egl::Thread *thread,
1484                                         bool isCallValid,
1485                                         egl::Device *devicePacked,
1486                                         EGLint name,
1487                                         const char *returnValue)
1488 {
1489     ParamBuffer paramBuffer;
1490 
1491     paramBuffer.addValueParam("devicePacked", ParamType::Tegl_DevicePointer, devicePacked);
1492     paramBuffer.addValueParam("name", ParamType::TEGLint, name);
1493 
1494     ParamCapture returnValueCapture("returnValue", ParamType::TcharConstPointer);
1495     InitParamValue(ParamType::TcharConstPointer, returnValue, &returnValueCapture.value);
1496     paramBuffer.addReturnValue(std::move(returnValueCapture));
1497 
1498     return CallCapture(angle::EntryPoint::EGLQueryDeviceStringEXT, std::move(paramBuffer));
1499 }
1500 
CaptureQueryDisplayAttribEXT(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint attribute,EGLAttrib * value,EGLBoolean returnValue)1501 CallCapture CaptureQueryDisplayAttribEXT(egl::Thread *thread,
1502                                          bool isCallValid,
1503                                          egl::Display *dpyPacked,
1504                                          EGLint attribute,
1505                                          EGLAttrib *value,
1506                                          EGLBoolean returnValue)
1507 {
1508     ParamBuffer paramBuffer;
1509 
1510     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1511     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
1512     paramBuffer.addValueParam("value", ParamType::TEGLAttribPointer, value);
1513 
1514     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1515     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1516     paramBuffer.addReturnValue(std::move(returnValueCapture));
1517 
1518     return CallCapture(angle::EntryPoint::EGLQueryDisplayAttribEXT, std::move(paramBuffer));
1519 }
1520 
CaptureQueryDmaBufFormatsEXT(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint max_formats,EGLint * formats,EGLint * num_formats,EGLBoolean returnValue)1521 CallCapture CaptureQueryDmaBufFormatsEXT(egl::Thread *thread,
1522                                          bool isCallValid,
1523                                          egl::Display *dpyPacked,
1524                                          EGLint max_formats,
1525                                          EGLint *formats,
1526                                          EGLint *num_formats,
1527                                          EGLBoolean returnValue)
1528 {
1529     ParamBuffer paramBuffer;
1530 
1531     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1532     paramBuffer.addValueParam("max_formats", ParamType::TEGLint, max_formats);
1533     paramBuffer.addValueParam("formats", ParamType::TEGLintPointer, formats);
1534     paramBuffer.addValueParam("num_formats", ParamType::TEGLintPointer, num_formats);
1535 
1536     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1537     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1538     paramBuffer.addReturnValue(std::move(returnValueCapture));
1539 
1540     return CallCapture(angle::EntryPoint::EGLQueryDmaBufFormatsEXT, std::move(paramBuffer));
1541 }
1542 
CaptureQueryDmaBufModifiersEXT(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLint format,EGLint max_modifiers,EGLuint64KHR * modifiers,EGLBoolean * external_only,EGLint * num_modifiers,EGLBoolean returnValue)1543 CallCapture CaptureQueryDmaBufModifiersEXT(egl::Thread *thread,
1544                                            bool isCallValid,
1545                                            egl::Display *dpyPacked,
1546                                            EGLint format,
1547                                            EGLint max_modifiers,
1548                                            EGLuint64KHR *modifiers,
1549                                            EGLBoolean *external_only,
1550                                            EGLint *num_modifiers,
1551                                            EGLBoolean returnValue)
1552 {
1553     ParamBuffer paramBuffer;
1554 
1555     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1556     paramBuffer.addValueParam("format", ParamType::TEGLint, format);
1557     paramBuffer.addValueParam("max_modifiers", ParamType::TEGLint, max_modifiers);
1558     paramBuffer.addValueParam("modifiers", ParamType::TEGLuint64KHRPointer, modifiers);
1559     paramBuffer.addValueParam("external_only", ParamType::TEGLBooleanPointer, external_only);
1560     paramBuffer.addValueParam("num_modifiers", ParamType::TEGLintPointer, num_modifiers);
1561 
1562     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1563     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1564     paramBuffer.addReturnValue(std::move(returnValueCapture));
1565 
1566     return CallCapture(angle::EntryPoint::EGLQueryDmaBufModifiersEXT, std::move(paramBuffer));
1567 }
1568 
CaptureCreatePlatformPixmapSurfaceEXT(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,void * native_pixmap,const AttributeMap & attrib_listPacked,EGLSurface returnValue)1569 CallCapture CaptureCreatePlatformPixmapSurfaceEXT(egl::Thread *thread,
1570                                                   bool isCallValid,
1571                                                   egl::Display *dpyPacked,
1572                                                   egl::Config *configPacked,
1573                                                   void *native_pixmap,
1574                                                   const AttributeMap &attrib_listPacked,
1575                                                   EGLSurface returnValue)
1576 {
1577     ParamBuffer paramBuffer;
1578 
1579     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1580     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
1581     paramBuffer.addValueParam("native_pixmap", ParamType::TvoidPointer, native_pixmap);
1582     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1583 
1584     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
1585     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
1586     paramBuffer.addReturnValue(std::move(returnValueCapture));
1587 
1588     return CallCapture(angle::EntryPoint::EGLCreatePlatformPixmapSurfaceEXT,
1589                        std::move(paramBuffer));
1590 }
1591 
CaptureCreatePlatformWindowSurfaceEXT(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Config * configPacked,void * native_window,const AttributeMap & attrib_listPacked,EGLSurface returnValue)1592 CallCapture CaptureCreatePlatformWindowSurfaceEXT(egl::Thread *thread,
1593                                                   bool isCallValid,
1594                                                   egl::Display *dpyPacked,
1595                                                   egl::Config *configPacked,
1596                                                   void *native_window,
1597                                                   const AttributeMap &attrib_listPacked,
1598                                                   EGLSurface returnValue)
1599 {
1600     ParamBuffer paramBuffer;
1601 
1602     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1603     paramBuffer.addValueParam("configPacked", ParamType::Tegl_ConfigPointer, configPacked);
1604     paramBuffer.addValueParam("native_window", ParamType::TvoidPointer, native_window);
1605     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1606 
1607     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSurface);
1608     InitParamValue(ParamType::TEGLSurface, returnValue, &returnValueCapture.value);
1609     paramBuffer.addReturnValue(std::move(returnValueCapture));
1610 
1611     return CallCapture(angle::EntryPoint::EGLCreatePlatformWindowSurfaceEXT,
1612                        std::move(paramBuffer));
1613 }
1614 
CaptureGetPlatformDisplayEXT(egl::Thread * thread,bool isCallValid,EGLenum platform,void * native_display,const AttributeMap & attrib_listPacked,EGLDisplay returnValue)1615 CallCapture CaptureGetPlatformDisplayEXT(egl::Thread *thread,
1616                                          bool isCallValid,
1617                                          EGLenum platform,
1618                                          void *native_display,
1619                                          const AttributeMap &attrib_listPacked,
1620                                          EGLDisplay returnValue)
1621 {
1622     ParamBuffer paramBuffer;
1623 
1624     paramBuffer.addValueParam("platform", ParamType::TEGLenum, platform);
1625     paramBuffer.addValueParam("native_display", ParamType::TvoidPointer, native_display);
1626     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1627 
1628     ParamCapture returnValueCapture("returnValue", ParamType::TEGLDisplay);
1629     InitParamValue(ParamType::TEGLDisplay, returnValue, &returnValueCapture.value);
1630     paramBuffer.addReturnValue(std::move(returnValueCapture));
1631 
1632     return CallCapture(angle::EntryPoint::EGLGetPlatformDisplayEXT, std::move(paramBuffer));
1633 }
1634 
CaptureDebugMessageControlKHR(egl::Thread * thread,bool isCallValid,EGLDEBUGPROCKHR callback,const AttributeMap & attrib_listPacked,EGLint returnValue)1635 CallCapture CaptureDebugMessageControlKHR(egl::Thread *thread,
1636                                           bool isCallValid,
1637                                           EGLDEBUGPROCKHR callback,
1638                                           const AttributeMap &attrib_listPacked,
1639                                           EGLint returnValue)
1640 {
1641     ParamBuffer paramBuffer;
1642 
1643     paramBuffer.addValueParam("callback", ParamType::TEGLDEBUGPROCKHR, callback);
1644     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1645 
1646     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
1647     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
1648     paramBuffer.addReturnValue(std::move(returnValueCapture));
1649 
1650     return CallCapture(angle::EntryPoint::EGLDebugMessageControlKHR, std::move(paramBuffer));
1651 }
1652 
CaptureLabelObjectKHR(egl::Thread * thread,bool isCallValid,egl::Display * displayPacked,ObjectType objectTypePacked,EGLObjectKHR object,EGLLabelKHR label,EGLint returnValue)1653 CallCapture CaptureLabelObjectKHR(egl::Thread *thread,
1654                                   bool isCallValid,
1655                                   egl::Display *displayPacked,
1656                                   ObjectType objectTypePacked,
1657                                   EGLObjectKHR object,
1658                                   EGLLabelKHR label,
1659                                   EGLint returnValue)
1660 {
1661     ParamBuffer paramBuffer;
1662 
1663     paramBuffer.addValueParam("displayPacked", ParamType::Tegl_DisplayPointer, displayPacked);
1664     paramBuffer.addValueParam("objectTypePacked", ParamType::TObjectType, objectTypePacked);
1665     paramBuffer.addValueParam("object", ParamType::TEGLObjectKHR, object);
1666     paramBuffer.addValueParam("label", ParamType::TEGLLabelKHR, label);
1667 
1668     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
1669     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
1670     paramBuffer.addReturnValue(std::move(returnValueCapture));
1671 
1672     return CallCapture(angle::EntryPoint::EGLLabelObjectKHR, std::move(paramBuffer));
1673 }
1674 
CaptureQueryDebugKHR(egl::Thread * thread,bool isCallValid,EGLint attribute,EGLAttrib * value,EGLBoolean returnValue)1675 CallCapture CaptureQueryDebugKHR(egl::Thread *thread,
1676                                  bool isCallValid,
1677                                  EGLint attribute,
1678                                  EGLAttrib *value,
1679                                  EGLBoolean returnValue)
1680 {
1681     ParamBuffer paramBuffer;
1682 
1683     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
1684     paramBuffer.addValueParam("value", ParamType::TEGLAttribPointer, value);
1685 
1686     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1687     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1688     paramBuffer.addReturnValue(std::move(returnValueCapture));
1689 
1690     return CallCapture(angle::EntryPoint::EGLQueryDebugKHR, std::move(paramBuffer));
1691 }
1692 
CaptureClientWaitSyncKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLint flags,EGLTimeKHR timeout,EGLint returnValue)1693 CallCapture CaptureClientWaitSyncKHR(egl::Thread *thread,
1694                                      bool isCallValid,
1695                                      egl::Display *dpyPacked,
1696                                      egl::SyncID syncPacked,
1697                                      EGLint flags,
1698                                      EGLTimeKHR timeout,
1699                                      EGLint returnValue)
1700 {
1701     ParamBuffer paramBuffer;
1702 
1703     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1704     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
1705     paramBuffer.addValueParam("flags", ParamType::TEGLint, flags);
1706     paramBuffer.addValueParam("timeout", ParamType::TEGLTimeKHR, timeout);
1707 
1708     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
1709     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
1710     paramBuffer.addReturnValue(std::move(returnValueCapture));
1711 
1712     return CallCapture(angle::EntryPoint::EGLClientWaitSyncKHR, std::move(paramBuffer));
1713 }
1714 
CaptureCreateSyncKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,EGLenum type,const AttributeMap & attrib_listPacked,EGLSyncKHR returnValue)1715 CallCapture CaptureCreateSyncKHR(egl::Thread *thread,
1716                                  bool isCallValid,
1717                                  egl::Display *dpyPacked,
1718                                  EGLenum type,
1719                                  const AttributeMap &attrib_listPacked,
1720                                  EGLSyncKHR returnValue)
1721 {
1722     ParamBuffer paramBuffer;
1723 
1724     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1725     paramBuffer.addValueParam("type", ParamType::TEGLenum, type);
1726     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1727 
1728     ParamCapture returnValueCapture("returnValue", ParamType::TEGLSyncKHR);
1729     InitParamValue(ParamType::TEGLSyncKHR, returnValue, &returnValueCapture.value);
1730     paramBuffer.addReturnValue(std::move(returnValueCapture));
1731 
1732     return CallCapture(angle::EntryPoint::EGLCreateSyncKHR, std::move(paramBuffer));
1733 }
1734 
CaptureDestroySyncKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLBoolean returnValue)1735 CallCapture CaptureDestroySyncKHR(egl::Thread *thread,
1736                                   bool isCallValid,
1737                                   egl::Display *dpyPacked,
1738                                   egl::SyncID syncPacked,
1739                                   EGLBoolean returnValue)
1740 {
1741     ParamBuffer paramBuffer;
1742 
1743     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1744     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
1745 
1746     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1747     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1748     paramBuffer.addReturnValue(std::move(returnValueCapture));
1749 
1750     return CallCapture(angle::EntryPoint::EGLDestroySyncKHR, std::move(paramBuffer));
1751 }
1752 
CaptureGetSyncAttribKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLint attribute,EGLint * value,EGLBoolean returnValue)1753 CallCapture CaptureGetSyncAttribKHR(egl::Thread *thread,
1754                                     bool isCallValid,
1755                                     egl::Display *dpyPacked,
1756                                     egl::SyncID syncPacked,
1757                                     EGLint attribute,
1758                                     EGLint *value,
1759                                     EGLBoolean returnValue)
1760 {
1761     ParamBuffer paramBuffer;
1762 
1763     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1764     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
1765     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
1766     paramBuffer.addValueParam("value", ParamType::TEGLintPointer, value);
1767 
1768     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1769     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1770     paramBuffer.addReturnValue(std::move(returnValueCapture));
1771 
1772     return CallCapture(angle::EntryPoint::EGLGetSyncAttribKHR, std::move(paramBuffer));
1773 }
1774 
CaptureCreateImageKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,gl::ContextID ctxPacked,EGLenum target,EGLClientBuffer buffer,const AttributeMap & attrib_listPacked,EGLImageKHR returnValue)1775 CallCapture CaptureCreateImageKHR(egl::Thread *thread,
1776                                   bool isCallValid,
1777                                   egl::Display *dpyPacked,
1778                                   gl::ContextID ctxPacked,
1779                                   EGLenum target,
1780                                   EGLClientBuffer buffer,
1781                                   const AttributeMap &attrib_listPacked,
1782                                   EGLImageKHR returnValue)
1783 {
1784     ParamBuffer paramBuffer;
1785 
1786     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1787     paramBuffer.addValueParam("ctxPacked", ParamType::TContextID, ctxPacked);
1788     paramBuffer.addValueParam("target", ParamType::TEGLenum, target);
1789     paramBuffer.addValueParam("buffer", ParamType::TEGLClientBuffer, buffer);
1790     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1791 
1792     ParamCapture returnValueCapture("returnValue", ParamType::TEGLImageKHR);
1793     InitParamValue(ParamType::TEGLImageKHR, returnValue, &returnValueCapture.value);
1794     paramBuffer.addReturnValue(std::move(returnValueCapture));
1795 
1796     return CallCapture(angle::EntryPoint::EGLCreateImageKHR, std::move(paramBuffer));
1797 }
1798 
CaptureDestroyImageKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,ImageID imagePacked,EGLBoolean returnValue)1799 CallCapture CaptureDestroyImageKHR(egl::Thread *thread,
1800                                    bool isCallValid,
1801                                    egl::Display *dpyPacked,
1802                                    ImageID imagePacked,
1803                                    EGLBoolean returnValue)
1804 {
1805     ParamBuffer paramBuffer;
1806 
1807     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1808     paramBuffer.addValueParam("imagePacked", ParamType::TImageID, imagePacked);
1809 
1810     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1811     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1812     paramBuffer.addReturnValue(std::move(returnValueCapture));
1813 
1814     return CallCapture(angle::EntryPoint::EGLDestroyImageKHR, std::move(paramBuffer));
1815 }
1816 
CaptureLockSurfaceKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,const AttributeMap & attrib_listPacked,EGLBoolean returnValue)1817 CallCapture CaptureLockSurfaceKHR(egl::Thread *thread,
1818                                   bool isCallValid,
1819                                   egl::Display *dpyPacked,
1820                                   SurfaceID surfacePacked,
1821                                   const AttributeMap &attrib_listPacked,
1822                                   EGLBoolean returnValue)
1823 {
1824     ParamBuffer paramBuffer;
1825 
1826     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1827     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1828     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1829 
1830     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1831     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1832     paramBuffer.addReturnValue(std::move(returnValueCapture));
1833 
1834     return CallCapture(angle::EntryPoint::EGLLockSurfaceKHR, std::move(paramBuffer));
1835 }
1836 
CaptureQuerySurface64KHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint attribute,EGLAttribKHR * value,EGLBoolean returnValue)1837 CallCapture CaptureQuerySurface64KHR(egl::Thread *thread,
1838                                      bool isCallValid,
1839                                      egl::Display *dpyPacked,
1840                                      SurfaceID surfacePacked,
1841                                      EGLint attribute,
1842                                      EGLAttribKHR *value,
1843                                      EGLBoolean returnValue)
1844 {
1845     ParamBuffer paramBuffer;
1846 
1847     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1848     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1849     paramBuffer.addValueParam("attribute", ParamType::TEGLint, attribute);
1850     paramBuffer.addValueParam("value", ParamType::TEGLAttribKHRPointer, value);
1851 
1852     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1853     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1854     paramBuffer.addReturnValue(std::move(returnValueCapture));
1855 
1856     return CallCapture(angle::EntryPoint::EGLQuerySurface64KHR, std::move(paramBuffer));
1857 }
1858 
CaptureUnlockSurfaceKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLBoolean returnValue)1859 CallCapture CaptureUnlockSurfaceKHR(egl::Thread *thread,
1860                                     bool isCallValid,
1861                                     egl::Display *dpyPacked,
1862                                     SurfaceID surfacePacked,
1863                                     EGLBoolean returnValue)
1864 {
1865     ParamBuffer paramBuffer;
1866 
1867     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1868     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1869 
1870     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1871     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1872     paramBuffer.addReturnValue(std::move(returnValueCapture));
1873 
1874     return CallCapture(angle::EntryPoint::EGLUnlockSurfaceKHR, std::move(paramBuffer));
1875 }
1876 
CaptureSetDamageRegionKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint * rects,EGLint n_rects,EGLBoolean returnValue)1877 CallCapture CaptureSetDamageRegionKHR(egl::Thread *thread,
1878                                       bool isCallValid,
1879                                       egl::Display *dpyPacked,
1880                                       SurfaceID surfacePacked,
1881                                       EGLint *rects,
1882                                       EGLint n_rects,
1883                                       EGLBoolean returnValue)
1884 {
1885     ParamBuffer paramBuffer;
1886 
1887     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1888     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
1889     paramBuffer.addValueParam("rects", ParamType::TEGLintPointer, rects);
1890     paramBuffer.addValueParam("n_rects", ParamType::TEGLint, n_rects);
1891 
1892     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1893     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1894     paramBuffer.addReturnValue(std::move(returnValueCapture));
1895 
1896     return CallCapture(angle::EntryPoint::EGLSetDamageRegionKHR, std::move(paramBuffer));
1897 }
1898 
CaptureSignalSyncKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLenum mode,EGLBoolean returnValue)1899 CallCapture CaptureSignalSyncKHR(egl::Thread *thread,
1900                                  bool isCallValid,
1901                                  egl::Display *dpyPacked,
1902                                  egl::SyncID syncPacked,
1903                                  EGLenum mode,
1904                                  EGLBoolean returnValue)
1905 {
1906     ParamBuffer paramBuffer;
1907 
1908     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1909     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
1910     paramBuffer.addValueParam("mode", ParamType::TEGLenum, mode);
1911 
1912     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1913     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1914     paramBuffer.addReturnValue(std::move(returnValueCapture));
1915 
1916     return CallCapture(angle::EntryPoint::EGLSignalSyncKHR, std::move(paramBuffer));
1917 }
1918 
CaptureCreateStreamKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,const AttributeMap & attrib_listPacked,EGLStreamKHR returnValue)1919 CallCapture CaptureCreateStreamKHR(egl::Thread *thread,
1920                                    bool isCallValid,
1921                                    egl::Display *dpyPacked,
1922                                    const AttributeMap &attrib_listPacked,
1923                                    EGLStreamKHR returnValue)
1924 {
1925     ParamBuffer paramBuffer;
1926 
1927     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1928     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
1929 
1930     ParamCapture returnValueCapture("returnValue", ParamType::TEGLStreamKHR);
1931     InitParamValue(ParamType::TEGLStreamKHR, returnValue, &returnValueCapture.value);
1932     paramBuffer.addReturnValue(std::move(returnValueCapture));
1933 
1934     return CallCapture(angle::EntryPoint::EGLCreateStreamKHR, std::move(paramBuffer));
1935 }
1936 
CaptureDestroyStreamKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,EGLBoolean returnValue)1937 CallCapture CaptureDestroyStreamKHR(egl::Thread *thread,
1938                                     bool isCallValid,
1939                                     egl::Display *dpyPacked,
1940                                     egl::Stream *streamPacked,
1941                                     EGLBoolean returnValue)
1942 {
1943     ParamBuffer paramBuffer;
1944 
1945     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1946     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
1947 
1948     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1949     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1950     paramBuffer.addReturnValue(std::move(returnValueCapture));
1951 
1952     return CallCapture(angle::EntryPoint::EGLDestroyStreamKHR, std::move(paramBuffer));
1953 }
1954 
CaptureQueryStreamKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,EGLenum attribute,EGLint * value,EGLBoolean returnValue)1955 CallCapture CaptureQueryStreamKHR(egl::Thread *thread,
1956                                   bool isCallValid,
1957                                   egl::Display *dpyPacked,
1958                                   egl::Stream *streamPacked,
1959                                   EGLenum attribute,
1960                                   EGLint *value,
1961                                   EGLBoolean returnValue)
1962 {
1963     ParamBuffer paramBuffer;
1964 
1965     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1966     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
1967     paramBuffer.addValueParam("attribute", ParamType::TEGLenum, attribute);
1968     paramBuffer.addValueParam("value", ParamType::TEGLintPointer, value);
1969 
1970     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1971     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1972     paramBuffer.addReturnValue(std::move(returnValueCapture));
1973 
1974     return CallCapture(angle::EntryPoint::EGLQueryStreamKHR, std::move(paramBuffer));
1975 }
1976 
CaptureQueryStreamu64KHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,EGLenum attribute,EGLuint64KHR * value,EGLBoolean returnValue)1977 CallCapture CaptureQueryStreamu64KHR(egl::Thread *thread,
1978                                      bool isCallValid,
1979                                      egl::Display *dpyPacked,
1980                                      egl::Stream *streamPacked,
1981                                      EGLenum attribute,
1982                                      EGLuint64KHR *value,
1983                                      EGLBoolean returnValue)
1984 {
1985     ParamBuffer paramBuffer;
1986 
1987     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
1988     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
1989     paramBuffer.addValueParam("attribute", ParamType::TEGLenum, attribute);
1990     paramBuffer.addValueParam("value", ParamType::TEGLuint64KHRPointer, value);
1991 
1992     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
1993     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
1994     paramBuffer.addReturnValue(std::move(returnValueCapture));
1995 
1996     return CallCapture(angle::EntryPoint::EGLQueryStreamu64KHR, std::move(paramBuffer));
1997 }
1998 
CaptureStreamAttribKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,EGLenum attribute,EGLint value,EGLBoolean returnValue)1999 CallCapture CaptureStreamAttribKHR(egl::Thread *thread,
2000                                    bool isCallValid,
2001                                    egl::Display *dpyPacked,
2002                                    egl::Stream *streamPacked,
2003                                    EGLenum attribute,
2004                                    EGLint value,
2005                                    EGLBoolean returnValue)
2006 {
2007     ParamBuffer paramBuffer;
2008 
2009     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2010     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
2011     paramBuffer.addValueParam("attribute", ParamType::TEGLenum, attribute);
2012     paramBuffer.addValueParam("value", ParamType::TEGLint, value);
2013 
2014     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
2015     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
2016     paramBuffer.addReturnValue(std::move(returnValueCapture));
2017 
2018     return CallCapture(angle::EntryPoint::EGLStreamAttribKHR, std::move(paramBuffer));
2019 }
2020 
CaptureStreamConsumerAcquireKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,EGLBoolean returnValue)2021 CallCapture CaptureStreamConsumerAcquireKHR(egl::Thread *thread,
2022                                             bool isCallValid,
2023                                             egl::Display *dpyPacked,
2024                                             egl::Stream *streamPacked,
2025                                             EGLBoolean returnValue)
2026 {
2027     ParamBuffer paramBuffer;
2028 
2029     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2030     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
2031 
2032     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
2033     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
2034     paramBuffer.addReturnValue(std::move(returnValueCapture));
2035 
2036     return CallCapture(angle::EntryPoint::EGLStreamConsumerAcquireKHR, std::move(paramBuffer));
2037 }
2038 
CaptureStreamConsumerGLTextureExternalKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,EGLBoolean returnValue)2039 CallCapture CaptureStreamConsumerGLTextureExternalKHR(egl::Thread *thread,
2040                                                       bool isCallValid,
2041                                                       egl::Display *dpyPacked,
2042                                                       egl::Stream *streamPacked,
2043                                                       EGLBoolean returnValue)
2044 {
2045     ParamBuffer paramBuffer;
2046 
2047     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2048     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
2049 
2050     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
2051     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
2052     paramBuffer.addReturnValue(std::move(returnValueCapture));
2053 
2054     return CallCapture(angle::EntryPoint::EGLStreamConsumerGLTextureExternalKHR,
2055                        std::move(paramBuffer));
2056 }
2057 
CaptureStreamConsumerReleaseKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,EGLBoolean returnValue)2058 CallCapture CaptureStreamConsumerReleaseKHR(egl::Thread *thread,
2059                                             bool isCallValid,
2060                                             egl::Display *dpyPacked,
2061                                             egl::Stream *streamPacked,
2062                                             EGLBoolean returnValue)
2063 {
2064     ParamBuffer paramBuffer;
2065 
2066     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2067     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
2068 
2069     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
2070     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
2071     paramBuffer.addReturnValue(std::move(returnValueCapture));
2072 
2073     return CallCapture(angle::EntryPoint::EGLStreamConsumerReleaseKHR, std::move(paramBuffer));
2074 }
2075 
CaptureSwapBuffersWithDamageKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,const EGLint * rects,EGLint n_rects,EGLBoolean returnValue)2076 CallCapture CaptureSwapBuffersWithDamageKHR(egl::Thread *thread,
2077                                             bool isCallValid,
2078                                             egl::Display *dpyPacked,
2079                                             SurfaceID surfacePacked,
2080                                             const EGLint *rects,
2081                                             EGLint n_rects,
2082                                             EGLBoolean returnValue)
2083 {
2084     ParamBuffer paramBuffer;
2085 
2086     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2087     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
2088     paramBuffer.addValueParam("rects", ParamType::TEGLintConstPointer, rects);
2089     paramBuffer.addValueParam("n_rects", ParamType::TEGLint, n_rects);
2090 
2091     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
2092     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
2093     paramBuffer.addReturnValue(std::move(returnValueCapture));
2094 
2095     return CallCapture(angle::EntryPoint::EGLSwapBuffersWithDamageKHR, std::move(paramBuffer));
2096 }
2097 
CaptureWaitSyncKHR(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::SyncID syncPacked,EGLint flags,EGLint returnValue)2098 CallCapture CaptureWaitSyncKHR(egl::Thread *thread,
2099                                bool isCallValid,
2100                                egl::Display *dpyPacked,
2101                                egl::SyncID syncPacked,
2102                                EGLint flags,
2103                                EGLint returnValue)
2104 {
2105     ParamBuffer paramBuffer;
2106 
2107     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2108     paramBuffer.addValueParam("syncPacked", ParamType::Tegl_SyncID, syncPacked);
2109     paramBuffer.addValueParam("flags", ParamType::TEGLint, flags);
2110 
2111     ParamCapture returnValueCapture("returnValue", ParamType::TEGLint);
2112     InitParamValue(ParamType::TEGLint, returnValue, &returnValueCapture.value);
2113     paramBuffer.addReturnValue(std::move(returnValueCapture));
2114 
2115     return CallCapture(angle::EntryPoint::EGLWaitSyncKHR, std::move(paramBuffer));
2116 }
2117 
CapturePostSubBufferNV(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,SurfaceID surfacePacked,EGLint x,EGLint y,EGLint width,EGLint height,EGLBoolean returnValue)2118 CallCapture CapturePostSubBufferNV(egl::Thread *thread,
2119                                    bool isCallValid,
2120                                    egl::Display *dpyPacked,
2121                                    SurfaceID surfacePacked,
2122                                    EGLint x,
2123                                    EGLint y,
2124                                    EGLint width,
2125                                    EGLint height,
2126                                    EGLBoolean returnValue)
2127 {
2128     ParamBuffer paramBuffer;
2129 
2130     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2131     paramBuffer.addValueParam("surfacePacked", ParamType::TSurfaceID, surfacePacked);
2132     paramBuffer.addValueParam("x", ParamType::TEGLint, x);
2133     paramBuffer.addValueParam("y", ParamType::TEGLint, y);
2134     paramBuffer.addValueParam("width", ParamType::TEGLint, width);
2135     paramBuffer.addValueParam("height", ParamType::TEGLint, height);
2136 
2137     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
2138     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
2139     paramBuffer.addReturnValue(std::move(returnValueCapture));
2140 
2141     return CallCapture(angle::EntryPoint::EGLPostSubBufferNV, std::move(paramBuffer));
2142 }
2143 
CaptureStreamConsumerGLTextureExternalAttribsNV(egl::Thread * thread,bool isCallValid,egl::Display * dpyPacked,egl::Stream * streamPacked,const AttributeMap & attrib_listPacked,EGLBoolean returnValue)2144 CallCapture CaptureStreamConsumerGLTextureExternalAttribsNV(egl::Thread *thread,
2145                                                             bool isCallValid,
2146                                                             egl::Display *dpyPacked,
2147                                                             egl::Stream *streamPacked,
2148                                                             const AttributeMap &attrib_listPacked,
2149                                                             EGLBoolean returnValue)
2150 {
2151     ParamBuffer paramBuffer;
2152 
2153     paramBuffer.addValueParam("dpyPacked", ParamType::Tegl_DisplayPointer, dpyPacked);
2154     paramBuffer.addValueParam("streamPacked", ParamType::Tegl_StreamPointer, streamPacked);
2155     paramBuffer.addParam(CaptureAttributeMap(attrib_listPacked));
2156 
2157     ParamCapture returnValueCapture("returnValue", ParamType::TEGLBoolean);
2158     InitParamValue(ParamType::TEGLBoolean, returnValue, &returnValueCapture.value);
2159     paramBuffer.addReturnValue(std::move(returnValueCapture));
2160 
2161     return CallCapture(angle::EntryPoint::EGLStreamConsumerGLTextureExternalAttribsNV,
2162                        std::move(paramBuffer));
2163 }
2164 
2165 }  // namespace egl
2166