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_gles32_params.cpp:
7 // Pointer parameter capture functions for the OpenGL ES 3.2 entry points.
8
9 #include "libANGLE/capture/capture_gles_2_0_autogen.h"
10 #include "libANGLE/capture/capture_gles_3_2_autogen.h"
11
12 using namespace angle;
13
14 namespace gl
15 {
16
CaptureDebugMessageCallback_userParam(const State & glState,bool isCallValid,GLDEBUGPROC callback,const void * userParam,ParamCapture * userParamParam)17 void CaptureDebugMessageCallback_userParam(const State &glState,
18 bool isCallValid,
19 GLDEBUGPROC callback,
20 const void *userParam,
21 ParamCapture *userParamParam)
22 {
23 UNIMPLEMENTED();
24 }
25
CaptureDebugMessageControl_ids(const State & glState,bool isCallValid,GLenum source,GLenum type,GLenum severity,GLsizei count,const GLuint * ids,GLboolean enabled,ParamCapture * idsParam)26 void CaptureDebugMessageControl_ids(const State &glState,
27 bool isCallValid,
28 GLenum source,
29 GLenum type,
30 GLenum severity,
31 GLsizei count,
32 const GLuint *ids,
33 GLboolean enabled,
34 ParamCapture *idsParam)
35 {
36 UNIMPLEMENTED();
37 }
38
CaptureDebugMessageInsert_buf(const State & glState,bool isCallValid,GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar * buf,ParamCapture * bufParam)39 void CaptureDebugMessageInsert_buf(const State &glState,
40 bool isCallValid,
41 GLenum source,
42 GLenum type,
43 GLuint id,
44 GLenum severity,
45 GLsizei length,
46 const GLchar *buf,
47 ParamCapture *bufParam)
48 {
49 UNIMPLEMENTED();
50 }
51
CaptureDrawElementsBaseVertex_indices(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex,ParamCapture * indicesParam)52 void CaptureDrawElementsBaseVertex_indices(const State &glState,
53 bool isCallValid,
54 PrimitiveMode modePacked,
55 GLsizei count,
56 DrawElementsType typePacked,
57 const void *indices,
58 GLint basevertex,
59 ParamCapture *indicesParam)
60 {
61 CaptureDrawElements_indices(glState, isCallValid, modePacked, count, typePacked, indices,
62 indicesParam);
63 }
64
CaptureDrawElementsInstancedBaseVertex_indices(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLsizei count,DrawElementsType typePacked,const void * indices,GLsizei instancecount,GLint basevertex,ParamCapture * indicesParam)65 void CaptureDrawElementsInstancedBaseVertex_indices(const State &glState,
66 bool isCallValid,
67 PrimitiveMode modePacked,
68 GLsizei count,
69 DrawElementsType typePacked,
70 const void *indices,
71 GLsizei instancecount,
72 GLint basevertex,
73 ParamCapture *indicesParam)
74 {
75 UNIMPLEMENTED();
76 }
77
CaptureDrawRangeElementsBaseVertex_indices(const State & glState,bool isCallValid,PrimitiveMode modePacked,GLuint start,GLuint end,GLsizei count,DrawElementsType typePacked,const void * indices,GLint basevertex,ParamCapture * indicesParam)78 void CaptureDrawRangeElementsBaseVertex_indices(const State &glState,
79 bool isCallValid,
80 PrimitiveMode modePacked,
81 GLuint start,
82 GLuint end,
83 GLsizei count,
84 DrawElementsType typePacked,
85 const void *indices,
86 GLint basevertex,
87 ParamCapture *indicesParam)
88 {
89 UNIMPLEMENTED();
90 }
91
CaptureGetDebugMessageLog_sources(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,ParamCapture * sourcesParam)92 void CaptureGetDebugMessageLog_sources(const State &glState,
93 bool isCallValid,
94 GLuint count,
95 GLsizei bufSize,
96 GLenum *sources,
97 GLenum *types,
98 GLuint *ids,
99 GLenum *severities,
100 GLsizei *lengths,
101 GLchar *messageLog,
102 ParamCapture *sourcesParam)
103 {
104 UNIMPLEMENTED();
105 }
106
CaptureGetDebugMessageLog_types(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,ParamCapture * typesParam)107 void CaptureGetDebugMessageLog_types(const State &glState,
108 bool isCallValid,
109 GLuint count,
110 GLsizei bufSize,
111 GLenum *sources,
112 GLenum *types,
113 GLuint *ids,
114 GLenum *severities,
115 GLsizei *lengths,
116 GLchar *messageLog,
117 ParamCapture *typesParam)
118 {
119 UNIMPLEMENTED();
120 }
121
CaptureGetDebugMessageLog_ids(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,ParamCapture * idsParam)122 void CaptureGetDebugMessageLog_ids(const State &glState,
123 bool isCallValid,
124 GLuint count,
125 GLsizei bufSize,
126 GLenum *sources,
127 GLenum *types,
128 GLuint *ids,
129 GLenum *severities,
130 GLsizei *lengths,
131 GLchar *messageLog,
132 ParamCapture *idsParam)
133 {
134 UNIMPLEMENTED();
135 }
136
CaptureGetDebugMessageLog_severities(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,ParamCapture * severitiesParam)137 void CaptureGetDebugMessageLog_severities(const State &glState,
138 bool isCallValid,
139 GLuint count,
140 GLsizei bufSize,
141 GLenum *sources,
142 GLenum *types,
143 GLuint *ids,
144 GLenum *severities,
145 GLsizei *lengths,
146 GLchar *messageLog,
147 ParamCapture *severitiesParam)
148 {
149 UNIMPLEMENTED();
150 }
151
CaptureGetDebugMessageLog_lengths(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,ParamCapture * lengthsParam)152 void CaptureGetDebugMessageLog_lengths(const State &glState,
153 bool isCallValid,
154 GLuint count,
155 GLsizei bufSize,
156 GLenum *sources,
157 GLenum *types,
158 GLuint *ids,
159 GLenum *severities,
160 GLsizei *lengths,
161 GLchar *messageLog,
162 ParamCapture *lengthsParam)
163 {
164 UNIMPLEMENTED();
165 }
166
CaptureGetDebugMessageLog_messageLog(const State & glState,bool isCallValid,GLuint count,GLsizei bufSize,GLenum * sources,GLenum * types,GLuint * ids,GLenum * severities,GLsizei * lengths,GLchar * messageLog,ParamCapture * messageLogParam)167 void CaptureGetDebugMessageLog_messageLog(const State &glState,
168 bool isCallValid,
169 GLuint count,
170 GLsizei bufSize,
171 GLenum *sources,
172 GLenum *types,
173 GLuint *ids,
174 GLenum *severities,
175 GLsizei *lengths,
176 GLchar *messageLog,
177 ParamCapture *messageLogParam)
178 {
179 UNIMPLEMENTED();
180 }
181
CaptureGetObjectLabel_length(const State & glState,bool isCallValid,GLenum identifier,GLuint name,GLsizei bufSize,GLsizei * length,GLchar * label,ParamCapture * lengthParam)182 void CaptureGetObjectLabel_length(const State &glState,
183 bool isCallValid,
184 GLenum identifier,
185 GLuint name,
186 GLsizei bufSize,
187 GLsizei *length,
188 GLchar *label,
189 ParamCapture *lengthParam)
190 {
191 UNIMPLEMENTED();
192 }
193
CaptureGetObjectLabel_label(const State & glState,bool isCallValid,GLenum identifier,GLuint name,GLsizei bufSize,GLsizei * length,GLchar * label,ParamCapture * labelParam)194 void CaptureGetObjectLabel_label(const State &glState,
195 bool isCallValid,
196 GLenum identifier,
197 GLuint name,
198 GLsizei bufSize,
199 GLsizei *length,
200 GLchar *label,
201 ParamCapture *labelParam)
202 {
203 UNIMPLEMENTED();
204 }
205
CaptureGetObjectPtrLabel_ptr(const State & glState,bool isCallValid,const void * ptr,GLsizei bufSize,GLsizei * length,GLchar * label,ParamCapture * ptrParam)206 void CaptureGetObjectPtrLabel_ptr(const State &glState,
207 bool isCallValid,
208 const void *ptr,
209 GLsizei bufSize,
210 GLsizei *length,
211 GLchar *label,
212 ParamCapture *ptrParam)
213 {
214 UNIMPLEMENTED();
215 }
216
CaptureGetObjectPtrLabel_length(const State & glState,bool isCallValid,const void * ptr,GLsizei bufSize,GLsizei * length,GLchar * label,ParamCapture * lengthParam)217 void CaptureGetObjectPtrLabel_length(const State &glState,
218 bool isCallValid,
219 const void *ptr,
220 GLsizei bufSize,
221 GLsizei *length,
222 GLchar *label,
223 ParamCapture *lengthParam)
224 {
225 UNIMPLEMENTED();
226 }
227
CaptureGetObjectPtrLabel_label(const State & glState,bool isCallValid,const void * ptr,GLsizei bufSize,GLsizei * length,GLchar * label,ParamCapture * labelParam)228 void CaptureGetObjectPtrLabel_label(const State &glState,
229 bool isCallValid,
230 const void *ptr,
231 GLsizei bufSize,
232 GLsizei *length,
233 GLchar *label,
234 ParamCapture *labelParam)
235 {
236 UNIMPLEMENTED();
237 }
238
CaptureGetPointerv_params(const State & glState,bool isCallValid,GLenum pname,void ** params,ParamCapture * paramCapture)239 void CaptureGetPointerv_params(const State &glState,
240 bool isCallValid,
241 GLenum pname,
242 void **params,
243 ParamCapture *paramCapture)
244 {
245 paramCapture->readBufferSizeBytes = sizeof(void *);
246 }
247
CaptureGetSamplerParameterIiv_params(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,GLint * params,ParamCapture * paramsParam)248 void CaptureGetSamplerParameterIiv_params(const State &glState,
249 bool isCallValid,
250 SamplerID sampler,
251 GLenum pname,
252 GLint *params,
253 ParamCapture *paramsParam)
254 {
255 // page 458 https://www.khronos.org/registry/OpenGL/specs/es/3.2/es_spec_3.2.pdf
256 paramsParam->readBufferSizeBytes = sizeof(GLint) * 4;
257 }
258
CaptureGetSamplerParameterIuiv_params(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,GLuint * params,ParamCapture * paramsParam)259 void CaptureGetSamplerParameterIuiv_params(const State &glState,
260 bool isCallValid,
261 SamplerID sampler,
262 GLenum pname,
263 GLuint *params,
264 ParamCapture *paramsParam)
265 {
266 // page 458 https://www.khronos.org/registry/OpenGL/specs/es/3.2/es_spec_3.2.pdf
267 paramsParam->readBufferSizeBytes = sizeof(GLuint) * 4;
268 }
269
CaptureGetTexParameterIiv_params(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLint * params,ParamCapture * paramsParam)270 void CaptureGetTexParameterIiv_params(const State &glState,
271 bool isCallValid,
272 TextureType targetPacked,
273 GLenum pname,
274 GLint *params,
275 ParamCapture *paramsParam)
276 {
277 // page 192 https://www.khronos.org/registry/OpenGL/specs/es/3.2/es_spec_3.2.pdf
278 // TEXTURE_BORDER_COLOR: 4 floats, ints, uints
279 paramsParam->readBufferSizeBytes = sizeof(GLint) * 4;
280 }
281
CaptureGetTexParameterIuiv_params(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLuint * params,ParamCapture * paramsParam)282 void CaptureGetTexParameterIuiv_params(const State &glState,
283 bool isCallValid,
284 TextureType targetPacked,
285 GLenum pname,
286 GLuint *params,
287 ParamCapture *paramsParam)
288 {
289 // page 192 https://www.khronos.org/registry/OpenGL/specs/es/3.2/es_spec_3.2.pdf
290 // TEXTURE_BORDER_COLOR: 4 floats, ints, uints
291 paramsParam->readBufferSizeBytes = sizeof(GLuint) * 4;
292 }
293
CaptureGetnUniformfv_params(const State & glState,bool isCallValid,ShaderProgramID program,UniformLocation location,GLsizei bufSize,GLfloat * params,ParamCapture * paramsParam)294 void CaptureGetnUniformfv_params(const State &glState,
295 bool isCallValid,
296 ShaderProgramID program,
297 UniformLocation location,
298 GLsizei bufSize,
299 GLfloat *params,
300 ParamCapture *paramsParam)
301 {
302 UNIMPLEMENTED();
303 }
304
CaptureGetnUniformiv_params(const State & glState,bool isCallValid,ShaderProgramID program,UniformLocation location,GLsizei bufSize,GLint * params,ParamCapture * paramsParam)305 void CaptureGetnUniformiv_params(const State &glState,
306 bool isCallValid,
307 ShaderProgramID program,
308 UniformLocation location,
309 GLsizei bufSize,
310 GLint *params,
311 ParamCapture *paramsParam)
312 {
313 UNIMPLEMENTED();
314 }
315
CaptureGetnUniformuiv_params(const State & glState,bool isCallValid,ShaderProgramID program,UniformLocation location,GLsizei bufSize,GLuint * params,ParamCapture * paramsParam)316 void CaptureGetnUniformuiv_params(const State &glState,
317 bool isCallValid,
318 ShaderProgramID program,
319 UniformLocation location,
320 GLsizei bufSize,
321 GLuint *params,
322 ParamCapture *paramsParam)
323 {
324 UNIMPLEMENTED();
325 }
326
CaptureObjectLabel_label(const State & glState,bool isCallValid,GLenum identifier,GLuint name,GLsizei length,const GLchar * label,ParamCapture * labelParam)327 void CaptureObjectLabel_label(const State &glState,
328 bool isCallValid,
329 GLenum identifier,
330 GLuint name,
331 GLsizei length,
332 const GLchar *label,
333 ParamCapture *labelParam)
334 {
335 UNIMPLEMENTED();
336 }
337
CaptureObjectPtrLabel_ptr(const State & glState,bool isCallValid,const void * ptr,GLsizei length,const GLchar * label,ParamCapture * ptrParam)338 void CaptureObjectPtrLabel_ptr(const State &glState,
339 bool isCallValid,
340 const void *ptr,
341 GLsizei length,
342 const GLchar *label,
343 ParamCapture *ptrParam)
344 {
345 UNIMPLEMENTED();
346 }
347
CaptureObjectPtrLabel_label(const State & glState,bool isCallValid,const void * ptr,GLsizei length,const GLchar * label,ParamCapture * labelParam)348 void CaptureObjectPtrLabel_label(const State &glState,
349 bool isCallValid,
350 const void *ptr,
351 GLsizei length,
352 const GLchar *label,
353 ParamCapture *labelParam)
354 {
355 UNIMPLEMENTED();
356 }
357
CapturePushDebugGroup_message(const State & glState,bool isCallValid,GLenum source,GLuint id,GLsizei length,const GLchar * message,ParamCapture * messageParam)358 void CapturePushDebugGroup_message(const State &glState,
359 bool isCallValid,
360 GLenum source,
361 GLuint id,
362 GLsizei length,
363 const GLchar *message,
364 ParamCapture *messageParam)
365 {
366 UNIMPLEMENTED();
367 }
368
CaptureReadnPixels_data(const State & glState,bool isCallValid,GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,void * data,ParamCapture * dataParam)369 void CaptureReadnPixels_data(const State &glState,
370 bool isCallValid,
371 GLint x,
372 GLint y,
373 GLsizei width,
374 GLsizei height,
375 GLenum format,
376 GLenum type,
377 GLsizei bufSize,
378 void *data,
379 ParamCapture *dataParam)
380 {
381 UNIMPLEMENTED();
382 }
383
CaptureSamplerParameterIiv_param(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,const GLint * param,ParamCapture * paramParam)384 void CaptureSamplerParameterIiv_param(const State &glState,
385 bool isCallValid,
386 SamplerID sampler,
387 GLenum pname,
388 const GLint *param,
389 ParamCapture *paramParam)
390 {
391 CaptureTextureAndSamplerParameter_params<GLint>(pname, param, paramParam);
392 }
393
CaptureSamplerParameterIuiv_param(const State & glState,bool isCallValid,SamplerID sampler,GLenum pname,const GLuint * param,ParamCapture * paramParam)394 void CaptureSamplerParameterIuiv_param(const State &glState,
395 bool isCallValid,
396 SamplerID sampler,
397 GLenum pname,
398 const GLuint *param,
399 ParamCapture *paramParam)
400 {
401 CaptureTextureAndSamplerParameter_params<GLuint>(pname, param, paramParam);
402 }
403
CaptureTexParameterIiv_params(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLint * params,ParamCapture * paramParam)404 void CaptureTexParameterIiv_params(const State &glState,
405 bool isCallValid,
406 TextureType targetPacked,
407 GLenum pname,
408 const GLint *params,
409 ParamCapture *paramParam)
410 {
411 CaptureTextureAndSamplerParameter_params<GLint>(pname, params, paramParam);
412 }
413
CaptureTexParameterIuiv_params(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLuint * params,ParamCapture * paramParam)414 void CaptureTexParameterIuiv_params(const State &glState,
415 bool isCallValid,
416 TextureType targetPacked,
417 GLenum pname,
418 const GLuint *params,
419 ParamCapture *paramParam)
420 {
421 CaptureTextureAndSamplerParameter_params<GLuint>(pname, params, paramParam);
422 }
423
424 } // namespace gl
425