• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // capture_gles3_params.cpp:
7 //   Pointer parameter capture functions for the OpenGL ES 3.0 entry points.
8 
9 #include "libANGLE/capture_gles_2_0_autogen.h"
10 #include "libANGLE/capture_gles_3_0_autogen.h"
11 
12 using namespace angle;
13 
14 namespace gl
15 {
CaptureClearBufferfv_value(const State & glState,bool isCallValid,GLenum buffer,GLint drawbuffer,const GLfloat * value,ParamCapture * paramCapture)16 void CaptureClearBufferfv_value(const State &glState,
17                                 bool isCallValid,
18                                 GLenum buffer,
19                                 GLint drawbuffer,
20                                 const GLfloat *value,
21                                 ParamCapture *paramCapture)
22 {
23     UNIMPLEMENTED();
24 }
25 
CaptureClearBufferiv_value(const State & glState,bool isCallValid,GLenum buffer,GLint drawbuffer,const GLint * value,ParamCapture * paramCapture)26 void CaptureClearBufferiv_value(const State &glState,
27                                 bool isCallValid,
28                                 GLenum buffer,
29                                 GLint drawbuffer,
30                                 const GLint *value,
31                                 ParamCapture *paramCapture)
32 {
33     UNIMPLEMENTED();
34 }
35 
CaptureClearBufferuiv_value(const State & glState,bool isCallValid,GLenum buffer,GLint drawbuffer,const GLuint * value,ParamCapture * paramCapture)36 void CaptureClearBufferuiv_value(const State &glState,
37                                  bool isCallValid,
38                                  GLenum buffer,
39                                  GLint drawbuffer,
40                                  const GLuint *value,
41                                  ParamCapture *paramCapture)
42 {
43     UNIMPLEMENTED();
44 }
45 
CaptureCompressedTexImage3D_data(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLsizei imageSize,const void * data,ParamCapture * paramCapture)46 void CaptureCompressedTexImage3D_data(const State &glState,
47                                       bool isCallValid,
48                                       TextureTarget targetPacked,
49                                       GLint level,
50                                       GLenum internalformat,
51                                       GLsizei width,
52                                       GLsizei height,
53                                       GLsizei depth,
54                                       GLint border,
55                                       GLsizei imageSize,
56                                       const void *data,
57                                       ParamCapture *paramCapture)
58 {
59     if (glState.getTargetBuffer(gl::BufferBinding::PixelUnpack))
60     {
61         return;
62     }
63 
64     if (!data)
65     {
66         return;
67     }
68 
69     CaptureMemory(data, imageSize, paramCapture);
70 }
71 
CaptureCompressedTexSubImage3D_data(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,const void * data,ParamCapture * paramCapture)72 void CaptureCompressedTexSubImage3D_data(const State &glState,
73                                          bool isCallValid,
74                                          TextureTarget targetPacked,
75                                          GLint level,
76                                          GLint xoffset,
77                                          GLint yoffset,
78                                          GLint zoffset,
79                                          GLsizei width,
80                                          GLsizei height,
81                                          GLsizei depth,
82                                          GLenum format,
83                                          GLsizei imageSize,
84                                          const void *data,
85                                          ParamCapture *paramCapture)
86 {
87     CaptureCompressedTexImage3D_data(glState, isCallValid, targetPacked, level, 0, width, height,
88                                      depth, 0, imageSize, data, paramCapture);
89 }
90 
CaptureDeleteQueries_idsPacked(const State & glState,bool isCallValid,GLsizei n,const QueryID * ids,ParamCapture * paramCapture)91 void CaptureDeleteQueries_idsPacked(const State &glState,
92                                     bool isCallValid,
93                                     GLsizei n,
94                                     const QueryID *ids,
95                                     ParamCapture *paramCapture)
96 {
97     CaptureMemory(ids, sizeof(QueryID) * n, paramCapture);
98 }
99 
CaptureDeleteSamplers_samplersPacked(const State & glState,bool isCallValid,GLsizei count,const SamplerID * samplers,ParamCapture * paramCapture)100 void CaptureDeleteSamplers_samplersPacked(const State &glState,
101                                           bool isCallValid,
102                                           GLsizei count,
103                                           const SamplerID *samplers,
104                                           ParamCapture *paramCapture)
105 {
106     CaptureMemory(samplers, sizeof(SamplerID) * count, paramCapture);
107 }
108 
CaptureDeleteTransformFeedbacks_idsPacked(const State & glState,bool isCallValid,GLsizei n,const TransformFeedbackID * ids,ParamCapture * paramCapture)109 void CaptureDeleteTransformFeedbacks_idsPacked(const State &glState,
110                                                bool isCallValid,
111                                                GLsizei n,
112                                                const TransformFeedbackID *ids,
113                                                ParamCapture *paramCapture)
114 {
115     CaptureMemory(ids, sizeof(TransformFeedbackID) * n, paramCapture);
116 }
117 
CaptureDeleteVertexArrays_arraysPacked(const State & glState,bool isCallValid,GLsizei n,const VertexArrayID * arrays,ParamCapture * paramCapture)118 void CaptureDeleteVertexArrays_arraysPacked(const State &glState,
119                                             bool isCallValid,
120                                             GLsizei n,
121                                             const VertexArrayID *arrays,
122                                             ParamCapture *paramCapture)
123 {
124     CaptureMemory(arrays, sizeof(VertexArrayID) * n, paramCapture);
125 }
126 
CaptureDrawBuffers_bufs(const State & glState,bool isCallValid,GLsizei n,const GLenum * bufs,ParamCapture * paramCapture)127 void CaptureDrawBuffers_bufs(const State &glState,
128                              bool isCallValid,
129                              GLsizei n,
130                              const GLenum *bufs,
131                              ParamCapture *paramCapture)
132 {
133     CaptureMemory(bufs, sizeof(GLenum) * n, paramCapture);
134 }
135 
CaptureDrawElementsInstanced_indices(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount,ParamCapture * paramCapture)136 void CaptureDrawElementsInstanced_indices(const State &glState,
137                                           bool isCallValid,
138                                           PrimitiveMode modePacked,
139                                           GLsizei count,
140                                           DrawElementsType typePacked,
141                                           const void *indices,
142                                           GLsizei instancecount,
143                                           ParamCapture *paramCapture)
144 {
145     CaptureDrawElements_indices(glState, isCallValid, modePacked, count, typePacked, indices,
146                                 paramCapture);
147 }
148 
CaptureDrawRangeElements_indices(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLuint start,GLuint end,GLsizei count,DrawElementsType typePacked,const void * indices,ParamCapture * paramCapture)149 void CaptureDrawRangeElements_indices(const State &glState,
150                                       bool isCallValid,
151                                       PrimitiveMode modePacked,
152                                       GLuint start,
153                                       GLuint end,
154                                       GLsizei count,
155                                       DrawElementsType typePacked,
156                                       const void *indices,
157                                       ParamCapture *paramCapture)
158 {
159     CaptureDrawElements_indices(glState, isCallValid, modePacked, count, typePacked, indices,
160                                 paramCapture);
161 }
162 
CaptureGenQueries_idsPacked(const State & glState,bool isCallValid,GLsizei n,QueryID * ids,ParamCapture * paramCapture)163 void CaptureGenQueries_idsPacked(const State &glState,
164                                  bool isCallValid,
165                                  GLsizei n,
166                                  QueryID *ids,
167                                  ParamCapture *paramCapture)
168 {
169     CaptureGenHandles(n, ids, paramCapture);
170 }
171 
CaptureGenSamplers_samplersPacked(const State & glState,bool isCallValid,GLsizei count,SamplerID * samplers,ParamCapture * paramCapture)172 void CaptureGenSamplers_samplersPacked(const State &glState,
173                                        bool isCallValid,
174                                        GLsizei count,
175                                        SamplerID *samplers,
176                                        ParamCapture *paramCapture)
177 {
178     CaptureGenHandles(count, samplers, paramCapture);
179 }
180 
CaptureGenTransformFeedbacks_idsPacked(const State & glState,bool isCallValid,GLsizei n,TransformFeedbackID * ids,ParamCapture * paramCapture)181 void CaptureGenTransformFeedbacks_idsPacked(const State &glState,
182                                             bool isCallValid,
183                                             GLsizei n,
184                                             TransformFeedbackID *ids,
185                                             ParamCapture *paramCapture)
186 {
187     CaptureGenHandles(n, ids, paramCapture);
188 }
189 
CaptureGenVertexArrays_arraysPacked(const State & glState,bool isCallValid,GLsizei n,VertexArrayID * arrays,ParamCapture * paramCapture)190 void CaptureGenVertexArrays_arraysPacked(const State &glState,
191                                          bool isCallValid,
192                                          GLsizei n,
193                                          VertexArrayID *arrays,
194                                          ParamCapture *paramCapture)
195 {
196     CaptureGenHandles(n, arrays, paramCapture);
197 }
198 
CaptureGetActiveUniformBlockName_length(const State & glState,bool isCallValid,ShaderProgramID program,GLuint uniformBlockIndex,GLsizei bufSize,GLsizei * length,GLchar * uniformBlockName,ParamCapture * paramCapture)199 void CaptureGetActiveUniformBlockName_length(const State &glState,
200                                              bool isCallValid,
201                                              ShaderProgramID program,
202                                              GLuint uniformBlockIndex,
203                                              GLsizei bufSize,
204                                              GLsizei *length,
205                                              GLchar *uniformBlockName,
206                                              ParamCapture *paramCapture)
207 {
208     UNIMPLEMENTED();
209 }
210 
CaptureGetActiveUniformBlockName_uniformBlockName(const State & glState,bool isCallValid,ShaderProgramID program,GLuint uniformBlockIndex,GLsizei bufSize,GLsizei * length,GLchar * uniformBlockName,ParamCapture * paramCapture)211 void CaptureGetActiveUniformBlockName_uniformBlockName(const State &glState,
212                                                        bool isCallValid,
213                                                        ShaderProgramID program,
214                                                        GLuint uniformBlockIndex,
215                                                        GLsizei bufSize,
216                                                        GLsizei *length,
217                                                        GLchar *uniformBlockName,
218                                                        ParamCapture *paramCapture)
219 {
220     UNIMPLEMENTED();
221 }
222 
CaptureGetActiveUniformBlockiv_params(const State & glState,bool isCallValid,ShaderProgramID program,GLuint uniformBlockIndex,GLenum pname,GLint * params,ParamCapture * paramCapture)223 void CaptureGetActiveUniformBlockiv_params(const State &glState,
224                                            bool isCallValid,
225                                            ShaderProgramID program,
226                                            GLuint uniformBlockIndex,
227                                            GLenum pname,
228                                            GLint *params,
229                                            ParamCapture *paramCapture)
230 {
231     UNIMPLEMENTED();
232 }
233 
CaptureGetActiveUniformsiv_uniformIndices(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei uniformCount,const GLuint * uniformIndices,GLenum pname,GLint * params,ParamCapture * paramCapture)234 void CaptureGetActiveUniformsiv_uniformIndices(const State &glState,
235                                                bool isCallValid,
236                                                ShaderProgramID program,
237                                                GLsizei uniformCount,
238                                                const GLuint *uniformIndices,
239                                                GLenum pname,
240                                                GLint *params,
241                                                ParamCapture *paramCapture)
242 {
243     UNIMPLEMENTED();
244 }
245 
CaptureGetActiveUniformsiv_params(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei uniformCount,const GLuint * uniformIndices,GLenum pname,GLint * params,ParamCapture * paramCapture)246 void CaptureGetActiveUniformsiv_params(const State &glState,
247                                        bool isCallValid,
248                                        ShaderProgramID program,
249                                        GLsizei uniformCount,
250                                        const GLuint *uniformIndices,
251                                        GLenum pname,
252                                        GLint *params,
253                                        ParamCapture *paramCapture)
254 {
255     UNIMPLEMENTED();
256 }
257 
CaptureGetBufferParameteri64v_params(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,GLint64 * params,ParamCapture * paramCapture)258 void CaptureGetBufferParameteri64v_params(const State &glState,
259                                           bool isCallValid,
260                                           BufferBinding targetPacked,
261                                           GLenum pname,
262                                           GLint64 *params,
263                                           ParamCapture *paramCapture)
264 {
265     UNIMPLEMENTED();
266 }
267 
CaptureGetBufferPointerv_params(const State & glState,bool isCallValid,BufferBinding targetPacked,GLenum pname,void ** params,ParamCapture * paramCapture)268 void CaptureGetBufferPointerv_params(const State &glState,
269                                      bool isCallValid,
270                                      BufferBinding targetPacked,
271                                      GLenum pname,
272                                      void **params,
273                                      ParamCapture *paramCapture)
274 {
275     UNIMPLEMENTED();
276 }
277 
CaptureGetFragDataLocation_name(const State & glState,bool isCallValid,ShaderProgramID program,const GLchar * name,ParamCapture * paramCapture)278 void CaptureGetFragDataLocation_name(const State &glState,
279                                      bool isCallValid,
280                                      ShaderProgramID program,
281                                      const GLchar *name,
282                                      ParamCapture *paramCapture)
283 {
284     UNIMPLEMENTED();
285 }
286 
CaptureGetInteger64i_v_data(const State & glState,bool isCallValid,GLenum target,GLuint index,GLint64 * data,ParamCapture * paramCapture)287 void CaptureGetInteger64i_v_data(const State &glState,
288                                  bool isCallValid,
289                                  GLenum target,
290                                  GLuint index,
291                                  GLint64 *data,
292                                  ParamCapture *paramCapture)
293 {
294     UNIMPLEMENTED();
295 }
296 
CaptureGetInteger64v_data(const State & glState,bool isCallValid,GLenum pname,GLint64 * data,ParamCapture * paramCapture)297 void CaptureGetInteger64v_data(const State &glState,
298                                bool isCallValid,
299                                GLenum pname,
300                                GLint64 *data,
301                                ParamCapture *paramCapture)
302 {
303     UNIMPLEMENTED();
304 }
305 
CaptureGetIntegeri_v_data(const State & glState,bool isCallValid,GLenum target,GLuint index,GLint * data,ParamCapture * paramCapture)306 void CaptureGetIntegeri_v_data(const State &glState,
307                                bool isCallValid,
308                                GLenum target,
309                                GLuint index,
310                                GLint *data,
311                                ParamCapture *paramCapture)
312 {
313     UNIMPLEMENTED();
314 }
315 
CaptureGetInternalformativ_params(const State & glState,bool isCallValid,GLenum target,GLenum internalformat,GLenum pname,GLsizei bufSize,GLint * params,ParamCapture * paramCapture)316 void CaptureGetInternalformativ_params(const State &glState,
317                                        bool isCallValid,
318                                        GLenum target,
319                                        GLenum internalformat,
320                                        GLenum pname,
321                                        GLsizei bufSize,
322                                        GLint *params,
323                                        ParamCapture *paramCapture)
324 {
325     // From the OpenGL ES 3.0 spec:
326     //
327     // The information retrieved will be written to memory addressed by the pointer specified in
328     // params.
329     //
330     // No more than bufSize integers will be written to this memory.
331     //
332     // If pname is GL_NUM_SAMPLE_COUNTS, the number of sample counts that would be returned by
333     // querying GL_SAMPLES will be returned in params.
334     //
335     // If pname is GL_SAMPLES, the sample counts supported for internalformat and target are written
336     // into params in descending numeric order. Only positive values are returned.
337     //
338     // Querying GL_SAMPLES with bufSize of one will return just the maximum supported number of
339     // samples for this format.
340 
341     if (bufSize == 0)
342         return;
343 
344     if (params)
345     {
346         // For GL_NUM_SAMPLE_COUNTS, only one value is returned
347         // For GL_SAMPLES, two values will be returned, unless bufSize limits it to one
348         uint32_t paramCount = (pname == GL_SAMPLES && bufSize > 1) ? 2 : 1;
349 
350         paramCapture->readBufferSizeBytes = sizeof(GLint) * paramCount;
351     }
352 }
353 
CaptureGetProgramBinary_length(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei bufSize,GLsizei * length,GLenum * binaryFormat,void * binary,ParamCapture * paramCapture)354 void CaptureGetProgramBinary_length(const State &glState,
355                                     bool isCallValid,
356                                     ShaderProgramID program,
357                                     GLsizei bufSize,
358                                     GLsizei *length,
359                                     GLenum *binaryFormat,
360                                     void *binary,
361                                     ParamCapture *paramCapture)
362 {
363     if (length)
364     {
365         paramCapture->readBufferSizeBytes = sizeof(GLsizei);
366     }
367 }
368 
CaptureGetProgramBinary_binaryFormat(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei bufSize,GLsizei * length,GLenum * binaryFormat,void * binary,ParamCapture * paramCapture)369 void CaptureGetProgramBinary_binaryFormat(const State &glState,
370                                           bool isCallValid,
371                                           ShaderProgramID program,
372                                           GLsizei bufSize,
373                                           GLsizei *length,
374                                           GLenum *binaryFormat,
375                                           void *binary,
376                                           ParamCapture *paramCapture)
377 {
378     paramCapture->readBufferSizeBytes = sizeof(GLenum);
379 }
380 
CaptureGetProgramBinary_binary(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei bufSize,GLsizei * length,GLenum * binaryFormat,void * binary,ParamCapture * paramCapture)381 void CaptureGetProgramBinary_binary(const State &glState,
382                                     bool isCallValid,
383                                     ShaderProgramID program,
384                                     GLsizei bufSize,
385                                     GLsizei *length,
386                                     GLenum *binaryFormat,
387                                     void *binary,
388                                     ParamCapture *paramCapture)
389 {
390     // If we have length, then actual binarySize was written there
391     // Otherwise, we don't know how many bytes were written
392     if (!length)
393     {
394         UNIMPLEMENTED();
395         return;
396     }
397 
398     GLsizei binarySize = *length;
399     if (binarySize > bufSize)
400     {
401         // This is a GL error, but clamp it anyway
402         binarySize = bufSize;
403     }
404 
405     paramCapture->readBufferSizeBytes = binarySize;
406 }
407 
CaptureGetQueryObjectuiv_params(const State & glState,bool isCallValid,QueryID id,GLenum pname,GLuint * params,ParamCapture * paramCapture)408 void CaptureGetQueryObjectuiv_params(const State &glState,
409                                      bool isCallValid,
410                                      QueryID id,
411                                      GLenum pname,
412                                      GLuint *params,
413                                      ParamCapture *paramCapture)
414 {
415     // This only returns one value
416     paramCapture->readBufferSizeBytes = sizeof(GLint);
417 }
418 
CaptureGetQueryiv_params(const State & glState,bool isCallValid,QueryType targetPacked,GLenum pname,GLint * params,ParamCapture * paramCapture)419 void CaptureGetQueryiv_params(const State &glState,
420                               bool isCallValid,
421                               QueryType targetPacked,
422                               GLenum pname,
423                               GLint *params,
424                               ParamCapture *paramCapture)
425 {
426     UNIMPLEMENTED();
427 }
428 
CaptureGetSamplerParameterfv_params(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,GLfloat * params,ParamCapture * paramCapture)429 void CaptureGetSamplerParameterfv_params(const State &glState,
430                                          bool isCallValid,
431                                          SamplerID sampler,
432                                          GLenum pname,
433                                          GLfloat *params,
434                                          ParamCapture *paramCapture)
435 {
436     UNIMPLEMENTED();
437 }
438 
CaptureGetSamplerParameteriv_params(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,GLint * params,ParamCapture * paramCapture)439 void CaptureGetSamplerParameteriv_params(const State &glState,
440                                          bool isCallValid,
441                                          SamplerID sampler,
442                                          GLenum pname,
443                                          GLint *params,
444                                          ParamCapture *paramCapture)
445 {
446     UNIMPLEMENTED();
447 }
448 
CaptureGetSynciv_length(const State & glState,bool isCallValid,GLsync sync,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * values,ParamCapture * paramCapture)449 void CaptureGetSynciv_length(const State &glState,
450                              bool isCallValid,
451                              GLsync sync,
452                              GLenum pname,
453                              GLsizei bufSize,
454                              GLsizei *length,
455                              GLint *values,
456                              ParamCapture *paramCapture)
457 {
458     if (length)
459     {
460         paramCapture->readBufferSizeBytes = sizeof(GLsizei);
461     }
462 }
463 
CaptureGetSynciv_values(const State & glState,bool isCallValid,GLsync sync,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * values,ParamCapture * paramCapture)464 void CaptureGetSynciv_values(const State &glState,
465                              bool isCallValid,
466                              GLsync sync,
467                              GLenum pname,
468                              GLsizei bufSize,
469                              GLsizei *length,
470                              GLint *values,
471                              ParamCapture *paramCapture)
472 {
473     // Spec: On success, GetSynciv replaces up to bufSize integers in values with the corresponding
474     // property values of the object being queried. The actual number of integers replaced is
475     // returned in *length.If length is NULL, no length is returned.
476     if (bufSize == 0)
477         return;
478 
479     if (values)
480     {
481         paramCapture->readBufferSizeBytes = sizeof(GLint) * bufSize;
482     }
483 }
484 
CaptureGetTransformFeedbackVarying_length(const State & glState,bool isCallValid,ShaderProgramID program,GLuint index,GLsizei bufSize,GLsizei * length,GLsizei * size,GLenum * type,GLchar * name,ParamCapture * paramCapture)485 void CaptureGetTransformFeedbackVarying_length(const State &glState,
486                                                bool isCallValid,
487                                                ShaderProgramID program,
488                                                GLuint index,
489                                                GLsizei bufSize,
490                                                GLsizei *length,
491                                                GLsizei *size,
492                                                GLenum *type,
493                                                GLchar *name,
494                                                ParamCapture *paramCapture)
495 {
496     UNIMPLEMENTED();
497 }
498 
CaptureGetTransformFeedbackVarying_size(const State & glState,bool isCallValid,ShaderProgramID program,GLuint index,GLsizei bufSize,GLsizei * length,GLsizei * size,GLenum * type,GLchar * name,ParamCapture * paramCapture)499 void CaptureGetTransformFeedbackVarying_size(const State &glState,
500                                              bool isCallValid,
501                                              ShaderProgramID program,
502                                              GLuint index,
503                                              GLsizei bufSize,
504                                              GLsizei *length,
505                                              GLsizei *size,
506                                              GLenum *type,
507                                              GLchar *name,
508                                              ParamCapture *paramCapture)
509 {
510     UNIMPLEMENTED();
511 }
512 
CaptureGetTransformFeedbackVarying_type(const State & glState,bool isCallValid,ShaderProgramID program,GLuint index,GLsizei bufSize,GLsizei * length,GLsizei * size,GLenum * type,GLchar * name,ParamCapture * paramCapture)513 void CaptureGetTransformFeedbackVarying_type(const State &glState,
514                                              bool isCallValid,
515                                              ShaderProgramID program,
516                                              GLuint index,
517                                              GLsizei bufSize,
518                                              GLsizei *length,
519                                              GLsizei *size,
520                                              GLenum *type,
521                                              GLchar *name,
522                                              ParamCapture *paramCapture)
523 {
524     UNIMPLEMENTED();
525 }
526 
CaptureGetTransformFeedbackVarying_name(const State & glState,bool isCallValid,ShaderProgramID program,GLuint index,GLsizei bufSize,GLsizei * length,GLsizei * size,GLenum * type,GLchar * name,ParamCapture * paramCapture)527 void CaptureGetTransformFeedbackVarying_name(const State &glState,
528                                              bool isCallValid,
529                                              ShaderProgramID program,
530                                              GLuint index,
531                                              GLsizei bufSize,
532                                              GLsizei *length,
533                                              GLsizei *size,
534                                              GLenum *type,
535                                              GLchar *name,
536                                              ParamCapture *paramCapture)
537 {
538     UNIMPLEMENTED();
539 }
540 
CaptureGetUniformBlockIndex_uniformBlockName(const State & glState,bool isCallValid,ShaderProgramID program,const GLchar * uniformBlockName,ParamCapture * paramCapture)541 void CaptureGetUniformBlockIndex_uniformBlockName(const State &glState,
542                                                   bool isCallValid,
543                                                   ShaderProgramID program,
544                                                   const GLchar *uniformBlockName,
545                                                   ParamCapture *paramCapture)
546 {
547     CaptureString(uniformBlockName, paramCapture);
548 }
549 
CaptureGetUniformIndices_uniformNames(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei uniformCount,const GLchar * const * uniformNames,GLuint * uniformIndices,ParamCapture * paramCapture)550 void CaptureGetUniformIndices_uniformNames(const State &glState,
551                                            bool isCallValid,
552                                            ShaderProgramID program,
553                                            GLsizei uniformCount,
554                                            const GLchar *const *uniformNames,
555                                            GLuint *uniformIndices,
556                                            ParamCapture *paramCapture)
557 {
558     UNIMPLEMENTED();
559 }
560 
CaptureGetUniformIndices_uniformIndices(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei uniformCount,const GLchar * const * uniformNames,GLuint * uniformIndices,ParamCapture * paramCapture)561 void CaptureGetUniformIndices_uniformIndices(const State &glState,
562                                              bool isCallValid,
563                                              ShaderProgramID program,
564                                              GLsizei uniformCount,
565                                              const GLchar *const *uniformNames,
566                                              GLuint *uniformIndices,
567                                              ParamCapture *paramCapture)
568 {
569     UNIMPLEMENTED();
570 }
571 
CaptureGetUniformuiv_params(const State & glState,bool isCallValid,ShaderProgramID program,UniformLocation location,GLuint * params,ParamCapture * paramCapture)572 void CaptureGetUniformuiv_params(const State &glState,
573                                  bool isCallValid,
574                                  ShaderProgramID program,
575                                  UniformLocation location,
576                                  GLuint *params,
577                                  ParamCapture *paramCapture)
578 {
579     UNIMPLEMENTED();
580 }
581 
CaptureGetVertexAttribIiv_params(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLint * params,ParamCapture * paramCapture)582 void CaptureGetVertexAttribIiv_params(const State &glState,
583                                       bool isCallValid,
584                                       GLuint index,
585                                       GLenum pname,
586                                       GLint *params,
587                                       ParamCapture *paramCapture)
588 {
589     UNIMPLEMENTED();
590 }
591 
CaptureGetVertexAttribIuiv_params(const State & glState,bool isCallValid,GLuint index,GLenum pname,GLuint * params,ParamCapture * paramCapture)592 void CaptureGetVertexAttribIuiv_params(const State &glState,
593                                        bool isCallValid,
594                                        GLuint index,
595                                        GLenum pname,
596                                        GLuint *params,
597                                        ParamCapture *paramCapture)
598 {
599     UNIMPLEMENTED();
600 }
601 
CaptureInvalidateFramebuffer_attachments(const State & glState,bool isCallValid,GLenum target,GLsizei numAttachments,const GLenum * attachments,ParamCapture * paramCapture)602 void CaptureInvalidateFramebuffer_attachments(const State &glState,
603                                               bool isCallValid,
604                                               GLenum target,
605                                               GLsizei numAttachments,
606                                               const GLenum *attachments,
607                                               ParamCapture *paramCapture)
608 {
609     CaptureMemory(attachments, sizeof(GLenum) * numAttachments, paramCapture);
610     paramCapture->value.voidConstPointerVal = paramCapture->data[0].data();
611 }
612 
CaptureInvalidateSubFramebuffer_attachments(const State & glState,bool isCallValid,GLenum target,GLsizei numAttachments,const GLenum * attachments,GLint x,GLint y,GLsizei width,GLsizei height,ParamCapture * paramCapture)613 void CaptureInvalidateSubFramebuffer_attachments(const State &glState,
614                                                  bool isCallValid,
615                                                  GLenum target,
616                                                  GLsizei numAttachments,
617                                                  const GLenum *attachments,
618                                                  GLint x,
619                                                  GLint y,
620                                                  GLsizei width,
621                                                  GLsizei height,
622                                                  ParamCapture *paramCapture)
623 {
624     UNIMPLEMENTED();
625 }
626 
CaptureProgramBinary_binary(const State & glState,bool isCallValid,ShaderProgramID program,GLenum binaryFormat,const void * binary,GLsizei length,ParamCapture * paramCapture)627 void CaptureProgramBinary_binary(const State &glState,
628                                  bool isCallValid,
629                                  ShaderProgramID program,
630                                  GLenum binaryFormat,
631                                  const void *binary,
632                                  GLsizei length,
633                                  ParamCapture *paramCapture)
634 {
635     UNIMPLEMENTED();
636 }
637 
CaptureSamplerParameterfv_param(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,const GLfloat * param,ParamCapture * paramCapture)638 void CaptureSamplerParameterfv_param(const State &glState,
639                                      bool isCallValid,
640                                      SamplerID sampler,
641                                      GLenum pname,
642                                      const GLfloat *param,
643                                      ParamCapture *paramCapture)
644 {
645     UNIMPLEMENTED();
646 }
647 
CaptureSamplerParameteriv_param(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,const GLint * param,ParamCapture * paramCapture)648 void CaptureSamplerParameteriv_param(const State &glState,
649                                      bool isCallValid,
650                                      SamplerID sampler,
651                                      GLenum pname,
652                                      const GLint *param,
653                                      ParamCapture *paramCapture)
654 {
655     UNIMPLEMENTED();
656 }
657 
CaptureTexImage3D_pixels(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,const void * pixels,ParamCapture * paramCapture)658 void CaptureTexImage3D_pixels(const State &glState,
659                               bool isCallValid,
660                               TextureTarget targetPacked,
661                               GLint level,
662                               GLint internalformat,
663                               GLsizei width,
664                               GLsizei height,
665                               GLsizei depth,
666                               GLint border,
667                               GLenum format,
668                               GLenum type,
669                               const void *pixels,
670                               ParamCapture *paramCapture)
671 {
672     if (glState.getTargetBuffer(gl::BufferBinding::PixelUnpack))
673     {
674         return;
675     }
676 
677     if (!pixels)
678     {
679         return;
680     }
681 
682     const gl::InternalFormat &internalFormatInfo = gl::GetInternalFormatInfo(format, type);
683     const gl::PixelUnpackState &unpack           = glState.getUnpackState();
684 
685     const Extents size(width, height, depth);
686 
687     GLuint endByte = 0;
688     bool unpackSize =
689         internalFormatInfo.computePackUnpackEndByte(type, size, unpack, true, &endByte);
690     ASSERT(unpackSize);
691 
692     CaptureMemory(pixels, static_cast<size_t>(endByte), paramCapture);
693 }
694 
CaptureTexSubImage3D_pixels(const State & glState,bool isCallValid,TextureTarget targetPacked,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const void * pixels,ParamCapture * paramCapture)695 void CaptureTexSubImage3D_pixels(const State &glState,
696                                  bool isCallValid,
697                                  TextureTarget targetPacked,
698                                  GLint level,
699                                  GLint xoffset,
700                                  GLint yoffset,
701                                  GLint zoffset,
702                                  GLsizei width,
703                                  GLsizei height,
704                                  GLsizei depth,
705                                  GLenum format,
706                                  GLenum type,
707                                  const void *pixels,
708                                  ParamCapture *paramCapture)
709 {
710     CaptureTexImage3D_pixels(glState, isCallValid, targetPacked, level, 0, width, height, depth, 0,
711                              format, type, pixels, paramCapture);
712 }
713 
CaptureTransformFeedbackVaryings_varyings(const State & glState,bool isCallValid,ShaderProgramID program,GLsizei count,const GLchar * const * varyings,GLenum bufferMode,ParamCapture * paramCapture)714 void CaptureTransformFeedbackVaryings_varyings(const State &glState,
715                                                bool isCallValid,
716                                                ShaderProgramID program,
717                                                GLsizei count,
718                                                const GLchar *const *varyings,
719                                                GLenum bufferMode,
720                                                ParamCapture *paramCapture)
721 {
722     for (GLsizei index = 0; index < count; ++index)
723     {
724         CaptureString(varyings[index], paramCapture);
725     }
726 }
727 
CaptureUniform1uiv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,const GLuint * value,ParamCapture * paramCapture)728 void CaptureUniform1uiv_value(const State &glState,
729                               bool isCallValid,
730                               UniformLocation location,
731                               GLsizei count,
732                               const GLuint *value,
733                               ParamCapture *paramCapture)
734 {
735     UNIMPLEMENTED();
736 }
737 
CaptureUniform2uiv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,const GLuint * value,ParamCapture * paramCapture)738 void CaptureUniform2uiv_value(const State &glState,
739                               bool isCallValid,
740                               UniformLocation location,
741                               GLsizei count,
742                               const GLuint *value,
743                               ParamCapture *paramCapture)
744 {
745     UNIMPLEMENTED();
746 }
747 
CaptureUniform3uiv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,const GLuint * value,ParamCapture * paramCapture)748 void CaptureUniform3uiv_value(const State &glState,
749                               bool isCallValid,
750                               UniformLocation location,
751                               GLsizei count,
752                               const GLuint *value,
753                               ParamCapture *paramCapture)
754 {
755     UNIMPLEMENTED();
756 }
757 
CaptureUniform4uiv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,const GLuint * value,ParamCapture * paramCapture)758 void CaptureUniform4uiv_value(const State &glState,
759                               bool isCallValid,
760                               UniformLocation location,
761                               GLsizei count,
762                               const GLuint *value,
763                               ParamCapture *paramCapture)
764 {
765     UNIMPLEMENTED();
766 }
767 
CaptureUniformMatrix2x3fv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,GLboolean transpose,const GLfloat * value,ParamCapture * paramCapture)768 void CaptureUniformMatrix2x3fv_value(const State &glState,
769                                      bool isCallValid,
770                                      UniformLocation location,
771                                      GLsizei count,
772                                      GLboolean transpose,
773                                      const GLfloat *value,
774                                      ParamCapture *paramCapture)
775 {
776     UNIMPLEMENTED();
777 }
778 
CaptureUniformMatrix2x4fv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,GLboolean transpose,const GLfloat * value,ParamCapture * paramCapture)779 void CaptureUniformMatrix2x4fv_value(const State &glState,
780                                      bool isCallValid,
781                                      UniformLocation location,
782                                      GLsizei count,
783                                      GLboolean transpose,
784                                      const GLfloat *value,
785                                      ParamCapture *paramCapture)
786 {
787     UNIMPLEMENTED();
788 }
789 
CaptureUniformMatrix3x2fv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,GLboolean transpose,const GLfloat * value,ParamCapture * paramCapture)790 void CaptureUniformMatrix3x2fv_value(const State &glState,
791                                      bool isCallValid,
792                                      UniformLocation location,
793                                      GLsizei count,
794                                      GLboolean transpose,
795                                      const GLfloat *value,
796                                      ParamCapture *paramCapture)
797 {
798     UNIMPLEMENTED();
799 }
800 
CaptureUniformMatrix3x4fv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,GLboolean transpose,const GLfloat * value,ParamCapture * paramCapture)801 void CaptureUniformMatrix3x4fv_value(const State &glState,
802                                      bool isCallValid,
803                                      UniformLocation location,
804                                      GLsizei count,
805                                      GLboolean transpose,
806                                      const GLfloat *value,
807                                      ParamCapture *paramCapture)
808 {
809     UNIMPLEMENTED();
810 }
811 
CaptureUniformMatrix4x2fv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,GLboolean transpose,const GLfloat * value,ParamCapture * paramCapture)812 void CaptureUniformMatrix4x2fv_value(const State &glState,
813                                      bool isCallValid,
814                                      UniformLocation location,
815                                      GLsizei count,
816                                      GLboolean transpose,
817                                      const GLfloat *value,
818                                      ParamCapture *paramCapture)
819 {
820     UNIMPLEMENTED();
821 }
822 
CaptureUniformMatrix4x3fv_value(const State & glState,bool isCallValid,UniformLocation location,GLsizei count,GLboolean transpose,const GLfloat * value,ParamCapture * paramCapture)823 void CaptureUniformMatrix4x3fv_value(const State &glState,
824                                      bool isCallValid,
825                                      UniformLocation location,
826                                      GLsizei count,
827                                      GLboolean transpose,
828                                      const GLfloat *value,
829                                      ParamCapture *paramCapture)
830 {
831     UNIMPLEMENTED();
832 }
833 
CaptureVertexAttribI4iv_v(const State & glState,bool isCallValid,GLuint index,const GLint * v,ParamCapture * paramCapture)834 void CaptureVertexAttribI4iv_v(const State &glState,
835                                bool isCallValid,
836                                GLuint index,
837                                const GLint *v,
838                                ParamCapture *paramCapture)
839 {
840     UNIMPLEMENTED();
841 }
842 
CaptureVertexAttribI4uiv_v(const State & glState,bool isCallValid,GLuint index,const GLuint * v,ParamCapture * paramCapture)843 void CaptureVertexAttribI4uiv_v(const State &glState,
844                                 bool isCallValid,
845                                 GLuint index,
846                                 const GLuint *v,
847                                 ParamCapture *paramCapture)
848 {
849     UNIMPLEMENTED();
850 }
851 
CaptureVertexAttribIPointer_pointer(const State & glState,bool isCallValid,GLuint index,GLint size,VertexAttribType typePacked,GLsizei stride,const void * pointer,ParamCapture * paramCapture)852 void CaptureVertexAttribIPointer_pointer(const State &glState,
853                                          bool isCallValid,
854                                          GLuint index,
855                                          GLint size,
856                                          VertexAttribType typePacked,
857                                          GLsizei stride,
858                                          const void *pointer,
859                                          ParamCapture *paramCapture)
860 {
861     CaptureVertexAttribPointer_pointer(glState, isCallValid, index, size, typePacked, false, stride,
862                                        pointer, paramCapture);
863 }
864 
865 }  // namespace gl
866