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_gles1_params.cpp:
7 // Pointer parameter capture functions for the OpenGL ES 1.0 entry points.
8
9 #include "libANGLE/capture/capture_gles_1_0_autogen.h"
10 #include "libANGLE/queryutils.h"
11
12 using namespace angle;
13
14 namespace gl
15 {
16
CaptureClipPlanef_eqn(const State & glState,bool isCallValid,GLenum p,const GLfloat * eqn,ParamCapture * paramCapture)17 void CaptureClipPlanef_eqn(const State &glState,
18 bool isCallValid,
19 GLenum p,
20 const GLfloat *eqn,
21 ParamCapture *paramCapture)
22 {
23 CaptureMemory(eqn, 4 * sizeof(GLfloat), paramCapture);
24 }
25
CaptureClipPlanex_equation(const State & glState,bool isCallValid,GLenum plane,const GLfixed * equation,ParamCapture * paramCapture)26 void CaptureClipPlanex_equation(const State &glState,
27 bool isCallValid,
28 GLenum plane,
29 const GLfixed *equation,
30 ParamCapture *paramCapture)
31 {
32 UNIMPLEMENTED();
33 }
34
CaptureColorPointer_pointer(const State & glState,bool isCallValid,GLint size,VertexAttribType typePacked,GLsizei stride,const void * pointer,ParamCapture * paramCapture)35 void CaptureColorPointer_pointer(const State &glState,
36 bool isCallValid,
37 GLint size,
38 VertexAttribType typePacked,
39 GLsizei stride,
40 const void *pointer,
41 ParamCapture *paramCapture)
42 {
43 CaptureVertexPointerGLES1(glState, ClientVertexArrayType::Color, pointer, paramCapture);
44 }
45
CaptureFogfv_params(const State & glState,bool isCallValid,GLenum pname,const GLfloat * params,ParamCapture * paramCapture)46 void CaptureFogfv_params(const State &glState,
47 bool isCallValid,
48 GLenum pname,
49 const GLfloat *params,
50 ParamCapture *paramCapture)
51 {
52 int count = (pname == GL_FOG_COLOR) ? 4 : 1;
53 CaptureMemory(params, count * sizeof(GLfloat), paramCapture);
54 }
55
CaptureFogxv_param(const State & glState,bool isCallValid,GLenum pname,const GLfixed * param,ParamCapture * paramCapture)56 void CaptureFogxv_param(const State &glState,
57 bool isCallValid,
58 GLenum pname,
59 const GLfixed *param,
60 ParamCapture *paramCapture)
61 {
62 UNIMPLEMENTED();
63 }
64
CaptureGetClipPlanef_equation(const State & glState,bool isCallValid,GLenum plane,GLfloat * equation,ParamCapture * paramCapture)65 void CaptureGetClipPlanef_equation(const State &glState,
66 bool isCallValid,
67 GLenum plane,
68 GLfloat *equation,
69 ParamCapture *paramCapture)
70 {
71 CaptureMemory(equation, 4 * sizeof(GLfloat), paramCapture);
72 }
73
CaptureGetClipPlanex_equation(const State & glState,bool isCallValid,GLenum plane,GLfixed * equation,ParamCapture * paramCapture)74 void CaptureGetClipPlanex_equation(const State &glState,
75 bool isCallValid,
76 GLenum plane,
77 GLfixed *equation,
78 ParamCapture *paramCapture)
79 {
80 UNIMPLEMENTED();
81 }
82
CaptureGetFixedv_params(const State & glState,bool isCallValid,GLenum pname,GLfixed * params,ParamCapture * paramCapture)83 void CaptureGetFixedv_params(const State &glState,
84 bool isCallValid,
85 GLenum pname,
86 GLfixed *params,
87 ParamCapture *paramCapture)
88 {
89 CaptureGetParameter(glState, pname, sizeof(GLfixed), paramCapture);
90 }
91
CaptureGetLightfv_params(const State & glState,bool isCallValid,GLenum light,LightParameter pnamePacked,GLfloat * params,ParamCapture * paramCapture)92 void CaptureGetLightfv_params(const State &glState,
93 bool isCallValid,
94 GLenum light,
95 LightParameter pnamePacked,
96 GLfloat *params,
97 ParamCapture *paramCapture)
98 {
99 int count = GetLightParameterCount(pnamePacked);
100 CaptureMemory(params, count * sizeof(GLfloat), paramCapture);
101 }
102
CaptureGetLightxv_params(const State & glState,bool isCallValid,GLenum light,LightParameter pnamePacked,GLfixed * params,ParamCapture * paramCapture)103 void CaptureGetLightxv_params(const State &glState,
104 bool isCallValid,
105 GLenum light,
106 LightParameter pnamePacked,
107 GLfixed *params,
108 ParamCapture *paramCapture)
109 {
110 UNIMPLEMENTED();
111 }
112
CaptureGetMaterialfv_params(const State & glState,bool isCallValid,GLenum face,MaterialParameter pnamePacked,GLfloat * params,ParamCapture * paramCapture)113 void CaptureGetMaterialfv_params(const State &glState,
114 bool isCallValid,
115 GLenum face,
116 MaterialParameter pnamePacked,
117 GLfloat *params,
118 ParamCapture *paramCapture)
119 {
120 unsigned int size = GetMaterialParameterCount(pnamePacked);
121 CaptureMemory(params, sizeof(GLfloat) * size, paramCapture);
122 }
123
CaptureGetMaterialxv_params(const State & glState,bool isCallValid,GLenum face,MaterialParameter pnamePacked,GLfixed * params,ParamCapture * paramCapture)124 void CaptureGetMaterialxv_params(const State &glState,
125 bool isCallValid,
126 GLenum face,
127 MaterialParameter pnamePacked,
128 GLfixed *params,
129 ParamCapture *paramCapture)
130 {
131 UNIMPLEMENTED();
132 }
133
CaptureGetTexEnvfv_params(const State & glState,bool isCallValid,TextureEnvTarget targetPacked,TextureEnvParameter pnamePacked,GLfloat * params,ParamCapture * paramCapture)134 void CaptureGetTexEnvfv_params(const State &glState,
135 bool isCallValid,
136 TextureEnvTarget targetPacked,
137 TextureEnvParameter pnamePacked,
138 GLfloat *params,
139 ParamCapture *paramCapture)
140 {
141 int count = GetTextureEnvParameterCount(pnamePacked);
142 CaptureMemory(params, count * sizeof(GLfloat), paramCapture);
143 }
144
CaptureGetTexEnviv_params(const State & glState,bool isCallValid,TextureEnvTarget targetPacked,TextureEnvParameter pnamePacked,GLint * params,ParamCapture * paramCapture)145 void CaptureGetTexEnviv_params(const State &glState,
146 bool isCallValid,
147 TextureEnvTarget targetPacked,
148 TextureEnvParameter pnamePacked,
149 GLint *params,
150 ParamCapture *paramCapture)
151 {
152 UNIMPLEMENTED();
153 }
154
CaptureGetTexEnvxv_params(const State & glState,bool isCallValid,TextureEnvTarget targetPacked,TextureEnvParameter pnamePacked,GLfixed * params,ParamCapture * paramCapture)155 void CaptureGetTexEnvxv_params(const State &glState,
156 bool isCallValid,
157 TextureEnvTarget targetPacked,
158 TextureEnvParameter pnamePacked,
159 GLfixed *params,
160 ParamCapture *paramCapture)
161 {
162 UNIMPLEMENTED();
163 }
164
CaptureGetTexParameterxv_params(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,GLfixed * params,ParamCapture * paramCapture)165 void CaptureGetTexParameterxv_params(const State &glState,
166 bool isCallValid,
167 TextureType targetPacked,
168 GLenum pname,
169 GLfixed *params,
170 ParamCapture *paramCapture)
171 {
172 unsigned int size = GetTexParameterCount(pname);
173 CaptureMemory(params, sizeof(GLfloat) * size, paramCapture);
174 }
175
CaptureLightModelfv_params(const State & glState,bool isCallValid,GLenum pname,const GLfloat * params,ParamCapture * paramCapture)176 void CaptureLightModelfv_params(const State &glState,
177 bool isCallValid,
178 GLenum pname,
179 const GLfloat *params,
180 ParamCapture *paramCapture)
181 {
182 unsigned int size = GetLightModelParameterCount(pname);
183 CaptureMemory(params, sizeof(GLfloat) * size, paramCapture);
184 }
185
CaptureLightModelxv_param(const State & glState,bool isCallValid,GLenum pname,const GLfixed * param,ParamCapture * paramCapture)186 void CaptureLightModelxv_param(const State &glState,
187 bool isCallValid,
188 GLenum pname,
189 const GLfixed *param,
190 ParamCapture *paramCapture)
191 {
192 unsigned int size = GetLightModelParameterCount(pname);
193 CaptureMemory(param, sizeof(GLfixed) * size, paramCapture);
194 }
195
CaptureLightfv_params(const State & glState,bool isCallValid,GLenum light,LightParameter pnamePacked,const GLfloat * params,ParamCapture * paramCapture)196 void CaptureLightfv_params(const State &glState,
197 bool isCallValid,
198 GLenum light,
199 LightParameter pnamePacked,
200 const GLfloat *params,
201 ParamCapture *paramCapture)
202 {
203 unsigned int size = GetLightParameterCount(pnamePacked);
204 CaptureMemory(params, sizeof(GLfloat) * size, paramCapture);
205 }
206
CaptureLightxv_params(const State & glState,bool isCallValid,GLenum light,LightParameter pnamePacked,const GLfixed * params,ParamCapture * paramCapture)207 void CaptureLightxv_params(const State &glState,
208 bool isCallValid,
209 GLenum light,
210 LightParameter pnamePacked,
211 const GLfixed *params,
212 ParamCapture *paramCapture)
213 {
214 unsigned int size = GetLightParameterCount(pnamePacked);
215 CaptureMemory(params, sizeof(GLfixed) * size, paramCapture);
216 }
217
CaptureLoadMatrixf_m(const State & glState,bool isCallValid,const GLfloat * m,ParamCapture * paramCapture)218 void CaptureLoadMatrixf_m(const State &glState,
219 bool isCallValid,
220 const GLfloat *m,
221 ParamCapture *paramCapture)
222 {
223 CaptureMemory(m, sizeof(GLfloat) * 16, paramCapture);
224 }
225
CaptureLoadMatrixx_m(const State & glState,bool isCallValid,const GLfixed * m,ParamCapture * paramCapture)226 void CaptureLoadMatrixx_m(const State &glState,
227 bool isCallValid,
228 const GLfixed *m,
229 ParamCapture *paramCapture)
230 {
231 UNIMPLEMENTED();
232 }
233
CaptureMaterialfv_params(const State & glState,bool isCallValid,GLenum face,MaterialParameter pnamePacked,const GLfloat * params,ParamCapture * paramCapture)234 void CaptureMaterialfv_params(const State &glState,
235 bool isCallValid,
236 GLenum face,
237 MaterialParameter pnamePacked,
238 const GLfloat *params,
239 ParamCapture *paramCapture)
240 {
241 unsigned int size = GetMaterialParameterCount(pnamePacked);
242 CaptureMemory(params, sizeof(GLfloat) * size, paramCapture);
243 }
244
CaptureMaterialxv_param(const State & glState,bool isCallValid,GLenum face,MaterialParameter pnamePacked,const GLfixed * param,ParamCapture * paramCapture)245 void CaptureMaterialxv_param(const State &glState,
246 bool isCallValid,
247 GLenum face,
248 MaterialParameter pnamePacked,
249 const GLfixed *param,
250 ParamCapture *paramCapture)
251 {
252 unsigned int size = GetMaterialParameterCount(pnamePacked);
253 CaptureMemory(param, sizeof(GLfixed) * size, paramCapture);
254 }
255
CaptureMultMatrixf_m(const State & glState,bool isCallValid,const GLfloat * m,ParamCapture * paramCapture)256 void CaptureMultMatrixf_m(const State &glState,
257 bool isCallValid,
258 const GLfloat *m,
259 ParamCapture *paramCapture)
260 {
261 CaptureMemory(m, sizeof(GLfloat) * 16, paramCapture);
262 }
263
CaptureMultMatrixx_m(const State & glState,bool isCallValid,const GLfixed * m,ParamCapture * paramCapture)264 void CaptureMultMatrixx_m(const State &glState,
265 bool isCallValid,
266 const GLfixed *m,
267 ParamCapture *paramCapture)
268 {
269 UNIMPLEMENTED();
270 }
271
CaptureNormalPointer_pointer(const State & glState,bool isCallValid,VertexAttribType typePacked,GLsizei stride,const void * pointer,ParamCapture * paramCapture)272 void CaptureNormalPointer_pointer(const State &glState,
273 bool isCallValid,
274 VertexAttribType typePacked,
275 GLsizei stride,
276 const void *pointer,
277 ParamCapture *paramCapture)
278 {
279 CaptureVertexPointerGLES1(glState, ClientVertexArrayType::Normal, pointer, paramCapture);
280 }
281
CapturePointParameterfv_params(const State & glState,bool isCallValid,PointParameter pnamePacked,const GLfloat * params,ParamCapture * paramCapture)282 void CapturePointParameterfv_params(const State &glState,
283 bool isCallValid,
284 PointParameter pnamePacked,
285 const GLfloat *params,
286 ParamCapture *paramCapture)
287 {
288 CaptureMemory(params, sizeof(GLfloat), paramCapture);
289 }
290
CapturePointParameterxv_params(const State & glState,bool isCallValid,PointParameter pnamePacked,const GLfixed * params,ParamCapture * paramCapture)291 void CapturePointParameterxv_params(const State &glState,
292 bool isCallValid,
293 PointParameter pnamePacked,
294 const GLfixed *params,
295 ParamCapture *paramCapture)
296 {
297 UNIMPLEMENTED();
298 }
299
CaptureTexCoordPointer_pointer(const State & glState,bool isCallValid,GLint size,VertexAttribType typePacked,GLsizei stride,const void * pointer,ParamCapture * paramCapture)300 void CaptureTexCoordPointer_pointer(const State &glState,
301 bool isCallValid,
302 GLint size,
303 VertexAttribType typePacked,
304 GLsizei stride,
305 const void *pointer,
306 ParamCapture *paramCapture)
307 {
308 CaptureVertexPointerGLES1(glState, ClientVertexArrayType::TextureCoord, pointer, paramCapture);
309 }
310
CaptureTexEnvfv_params(const State & glState,bool isCallValid,TextureEnvTarget targetPacked,TextureEnvParameter pnamePacked,const GLfloat * params,ParamCapture * paramCapture)311 void CaptureTexEnvfv_params(const State &glState,
312 bool isCallValid,
313 TextureEnvTarget targetPacked,
314 TextureEnvParameter pnamePacked,
315 const GLfloat *params,
316 ParamCapture *paramCapture)
317 {
318 int count = GetTextureEnvParameterCount(pnamePacked);
319 CaptureMemory(params, count * sizeof(GLfloat), paramCapture);
320 }
321
CaptureTexEnviv_params(const State & glState,bool isCallValid,TextureEnvTarget targetPacked,TextureEnvParameter pnamePacked,const GLint * params,ParamCapture * paramCapture)322 void CaptureTexEnviv_params(const State &glState,
323 bool isCallValid,
324 TextureEnvTarget targetPacked,
325 TextureEnvParameter pnamePacked,
326 const GLint *params,
327 ParamCapture *paramCapture)
328 {
329 UNIMPLEMENTED();
330 }
331
CaptureTexEnvxv_params(const State & glState,bool isCallValid,TextureEnvTarget targetPacked,TextureEnvParameter pnamePacked,const GLfixed * params,ParamCapture * paramCapture)332 void CaptureTexEnvxv_params(const State &glState,
333 bool isCallValid,
334 TextureEnvTarget targetPacked,
335 TextureEnvParameter pnamePacked,
336 const GLfixed *params,
337 ParamCapture *paramCapture)
338 {
339 CaptureMemory(params, sizeof(GLfixed), paramCapture);
340 }
341
CaptureTexParameterxv_params(const State & glState,bool isCallValid,TextureType targetPacked,GLenum pname,const GLfixed * params,ParamCapture * paramCapture)342 void CaptureTexParameterxv_params(const State &glState,
343 bool isCallValid,
344 TextureType targetPacked,
345 GLenum pname,
346 const GLfixed *params,
347 ParamCapture *paramCapture)
348 {
349 unsigned int size = GetTexParameterCount(pname);
350 CaptureMemory(params, sizeof(GLfloat) * size, paramCapture);
351 }
352
CaptureVertexPointer_pointer(const State & glState,bool isCallValid,GLint size,VertexAttribType typePacked,GLsizei stride,const void * pointer,ParamCapture * paramCapture)353 void CaptureVertexPointer_pointer(const State &glState,
354 bool isCallValid,
355 GLint size,
356 VertexAttribType typePacked,
357 GLsizei stride,
358 const void *pointer,
359 ParamCapture *paramCapture)
360 {
361 CaptureVertexPointerGLES1(glState, ClientVertexArrayType::Vertex, pointer, paramCapture);
362 }
363
364 } // namespace gl
365