blob: 64638eb6234507ced5a491063d6f765eac2bc036 [file] [log] [blame]
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001//
2// Copyright (c) 2018 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
7// validationES1.cpp: Validation functions for OpenGL ES 1.0 entry point parameters
8
9#include "libANGLE/validationES1.h"
10
11#include "common/debug.h"
Lingfeng Yang13b708f2018-03-21 12:14:10 -070012#include "libANGLE/Context.h"
13#include "libANGLE/ErrorStrings.h"
Lingfeng Yangd0febe72018-05-17 22:36:52 -070014#include "libANGLE/GLES1State.h"
15#include "libANGLE/queryutils.h"
Lingfeng Yang038dd532018-03-29 17:31:52 -070016#include "libANGLE/validationES.h"
Lingfeng Yang13b708f2018-03-21 12:14:10 -070017
18#define ANGLE_VALIDATE_IS_GLES1(context) \
19 if (context->getClientMajorVersion() > 1) \
20 { \
21 ANGLE_VALIDATION_ERR(context, InvalidOperation(), GLES1Only); \
22 return false; \
23 }
24
Lingfeng Yang01074432018-04-16 10:19:51 -070025namespace gl
Lingfeng Yang13b708f2018-03-21 12:14:10 -070026{
27
Lingfeng Yangabb09f12018-04-16 10:43:53 -070028bool ValidateAlphaFuncCommon(Context *context, AlphaTestFunc func)
Lingfeng Yang13b708f2018-03-21 12:14:10 -070029{
30 switch (func)
31 {
Lingfeng Yangabb09f12018-04-16 10:43:53 -070032 case AlphaTestFunc::AlwaysPass:
33 case AlphaTestFunc::Equal:
34 case AlphaTestFunc::Gequal:
35 case AlphaTestFunc::Greater:
36 case AlphaTestFunc::Lequal:
37 case AlphaTestFunc::Less:
38 case AlphaTestFunc::Never:
39 case AlphaTestFunc::NotEqual:
Lingfeng Yang13b708f2018-03-21 12:14:10 -070040 return true;
41 default:
Lingfeng Yang01074432018-04-16 10:19:51 -070042 ANGLE_VALIDATION_ERR(context, InvalidEnum(), EnumNotSupported);
Lingfeng Yang13b708f2018-03-21 12:14:10 -070043 return false;
44 }
45}
46
Lingfeng Yangabb09f12018-04-16 10:43:53 -070047bool ValidateClientStateCommon(Context *context, ClientVertexArrayType arrayType)
Lingfeng Yang01074432018-04-16 10:19:51 -070048{
49 ANGLE_VALIDATE_IS_GLES1(context);
50 switch (arrayType)
51 {
Lingfeng Yangabb09f12018-04-16 10:43:53 -070052 case ClientVertexArrayType::Vertex:
53 case ClientVertexArrayType::Normal:
54 case ClientVertexArrayType::Color:
55 case ClientVertexArrayType::TextureCoord:
Lingfeng Yang01074432018-04-16 10:19:51 -070056 return true;
Lingfeng Yangabb09f12018-04-16 10:43:53 -070057 case ClientVertexArrayType::PointSize:
Lingfeng Yang01074432018-04-16 10:19:51 -070058 if (!context->getExtensions().pointSizeArray)
59 {
60 ANGLE_VALIDATION_ERR(context, InvalidEnum(), PointSizeArrayExtensionNotEnabled);
61 return false;
62 }
63 return true;
64 default:
65 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidClientState);
66 return false;
67 }
68}
69
Lingfeng Yangabb09f12018-04-16 10:43:53 -070070bool ValidateBuiltinVertexAttributeCommon(Context *context,
71 ClientVertexArrayType arrayType,
72 GLint size,
73 GLenum type,
74 GLsizei stride,
75 const void *pointer)
76{
77 ANGLE_VALIDATE_IS_GLES1(context);
78
79 if (stride < 0)
80 {
81 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidVertexPointerStride);
82 return false;
83 }
84
85 int minSize = 1;
86 int maxSize = 4;
87
88 switch (arrayType)
89 {
90 case ClientVertexArrayType::Vertex:
91 case ClientVertexArrayType::TextureCoord:
92 minSize = 2;
93 maxSize = 4;
94 break;
95 case ClientVertexArrayType::Normal:
96 minSize = 3;
97 maxSize = 3;
98 break;
99 case ClientVertexArrayType::Color:
100 minSize = 4;
101 maxSize = 4;
102 break;
103 case ClientVertexArrayType::PointSize:
104 if (!context->getExtensions().pointSizeArray)
105 {
106 ANGLE_VALIDATION_ERR(context, InvalidEnum(), PointSizeArrayExtensionNotEnabled);
107 return false;
108 }
109
110 minSize = 1;
111 maxSize = 1;
112 break;
113 default:
114 UNREACHABLE();
115 return false;
116 }
117
118 if (size < minSize || size > maxSize)
119 {
120 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidVertexPointerSize);
121 return false;
122 }
123
124 switch (type)
125 {
126 case GL_BYTE:
127 if (arrayType == ClientVertexArrayType::PointSize)
128 {
129 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType);
130 return false;
131 }
132 break;
133 case GL_SHORT:
134 if (arrayType == ClientVertexArrayType::PointSize ||
135 arrayType == ClientVertexArrayType::Color)
136 {
137 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType);
138 return false;
139 }
140 break;
141 case GL_FIXED:
142 case GL_FLOAT:
143 break;
144 default:
145 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType);
146 return false;
147 }
148
149 return true;
150}
151
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700152bool ValidateLightCaps(Context *context, GLenum light)
153{
154 if (light < GL_LIGHT0 || light >= GL_LIGHT0 + context->getCaps().maxLights)
155 {
156 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLight);
157 return false;
158 }
159
160 return true;
161}
162
163bool ValidateLightCommon(Context *context,
164 GLenum light,
165 LightParameter pname,
166 const GLfloat *params)
167{
168
169 ANGLE_VALIDATE_IS_GLES1(context);
170
171 if (!ValidateLightCaps(context, light))
172 {
173 return false;
174 }
175
176 switch (pname)
177 {
178 case LightParameter::Ambient:
179 case LightParameter::Diffuse:
180 case LightParameter::Specular:
181 case LightParameter::Position:
182 case LightParameter::SpotDirection:
183 return true;
184 case LightParameter::SpotExponent:
185 if (params[0] < 0.0f || params[0] > 128.0f)
186 {
187 ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange);
188 return false;
189 }
190 return true;
191 case LightParameter::SpotCutoff:
192 if (params[0] == 180.0f)
193 {
194 return true;
195 }
196 if (params[0] < 0.0f || params[0] > 90.0f)
197 {
198 ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange);
199 return false;
200 }
201 return true;
202 case LightParameter::ConstantAttenuation:
203 case LightParameter::LinearAttenuation:
204 case LightParameter::QuadraticAttenuation:
205 if (params[0] < 0.0f)
206 {
207 ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange);
208 return false;
209 }
210 return true;
211 default:
212 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightParameter);
213 return false;
214 }
215}
216
217bool ValidateLightSingleComponent(Context *context,
218 GLenum light,
219 LightParameter pname,
220 GLfloat param)
221{
222 if (!ValidateLightCommon(context, light, pname, &param))
223 {
224 return false;
225 }
226
227 if (GetLightParameterCount(pname) > 1)
228 {
229 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightParameter);
230 return false;
231 }
232
233 return true;
234}
235
236bool ValidateMaterialCommon(Context *context,
237 GLenum face,
238 MaterialParameter pname,
239 const GLfloat *params)
240{
241 ANGLE_VALIDATE_IS_GLES1(context);
242
243 if (face != GL_FRONT_AND_BACK)
244 {
245 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialFace);
246 return false;
247 }
248
249 switch (pname)
250 {
251 case MaterialParameter::Ambient:
252 case MaterialParameter::Diffuse:
253 case MaterialParameter::Specular:
254 case MaterialParameter::Emission:
255 return true;
256 case MaterialParameter::Shininess:
257 if (params[0] < 0.0f || params[0] > 128.0f)
258 {
259 ANGLE_VALIDATION_ERR(context, InvalidValue(), MaterialParameterOutOfRange);
260 return false;
261 }
262 return true;
263 default:
264 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialParameter);
265 return false;
266 }
267}
268
269bool ValidateMaterialSingleComponent(Context *context,
270 GLenum face,
271 MaterialParameter pname,
272 GLfloat param)
273{
274 if (!ValidateMaterialCommon(context, face, pname, &param))
275 {
276 return false;
277 }
278
279 if (GetMaterialParameterCount(pname) > 1)
280 {
281 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialParameter);
282 return false;
283 }
284
285 return true;
286}
287
288bool ValidateLightModelCommon(Context *context, GLenum pname)
289{
290 ANGLE_VALIDATE_IS_GLES1(context);
291 switch (pname)
292 {
293 case GL_LIGHT_MODEL_AMBIENT:
294 case GL_LIGHT_MODEL_TWO_SIDE:
295 return true;
296 default:
297 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightModelParameter);
298 return false;
299 }
300}
301
302bool ValidateLightModelSingleComponent(Context *context, GLenum pname)
303{
304 if (!ValidateLightModelCommon(context, pname))
305 {
306 return false;
307 }
308
309 switch (pname)
310 {
311 case GL_LIGHT_MODEL_TWO_SIDE:
312 return true;
313 default:
314 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightModelParameter);
315 return false;
316 }
317}
318
Lingfeng Yang060088a2018-05-30 20:40:57 -0700319bool ValidateClipPlaneCommon(Context *context, GLenum plane)
320{
321 ANGLE_VALIDATE_IS_GLES1(context);
322
323 if (plane < GL_CLIP_PLANE0 || plane >= GL_CLIP_PLANE0 + context->getCaps().maxClipPlanes)
324 {
325 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidClipPlane);
326 return false;
327 }
328
329 return true;
330}
331
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700332bool ValidateFogCommon(Context *context, GLenum pname, const GLfloat *params)
333{
334 ANGLE_VALIDATE_IS_GLES1(context);
335
336 switch (pname)
337 {
338 case GL_FOG_MODE:
339 {
340 GLenum modeParam = static_cast<GLenum>(params[0]);
341 switch (modeParam)
342 {
343 case GL_EXP:
344 case GL_EXP2:
345 case GL_LINEAR:
346 return true;
347 default:
348 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidFogMode);
349 return false;
350 }
351 }
352 break;
353 case GL_FOG_START:
354 case GL_FOG_END:
355 case GL_FOG_COLOR:
356 break;
357 case GL_FOG_DENSITY:
358 if (params[0] < 0.0f)
359 {
360 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidFogDensity);
361 return false;
362 }
363 break;
364 default:
365 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidFogParameter);
366 return false;
367 }
368 return true;
369}
370
Lingfeng Yang01074432018-04-16 10:19:51 -0700371} // namespace gl
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500372
373namespace gl
374{
375
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700376bool ValidateAlphaFunc(Context *context, AlphaTestFunc func, GLfloat ref)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500377{
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700378 ANGLE_VALIDATE_IS_GLES1(context);
379 return ValidateAlphaFuncCommon(context, func);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500380}
381
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700382bool ValidateAlphaFuncx(Context *context, AlphaTestFunc func, GLfixed ref)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500383{
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700384 ANGLE_VALIDATE_IS_GLES1(context);
385 return ValidateAlphaFuncCommon(context, func);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500386}
387
388bool ValidateClearColorx(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
389{
390 UNIMPLEMENTED();
391 return true;
392}
393
394bool ValidateClearDepthx(Context *context, GLfixed depth)
395{
396 UNIMPLEMENTED();
397 return true;
398}
399
400bool ValidateClientActiveTexture(Context *context, GLenum texture)
401{
Lingfeng Yang96310cd2018-03-28 11:56:28 -0700402 ANGLE_VALIDATE_IS_GLES1(context);
Lingfeng Yang038dd532018-03-29 17:31:52 -0700403 return ValidateMultitextureUnit(context, texture);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500404}
405
Lingfeng Yang060088a2018-05-30 20:40:57 -0700406bool ValidateClipPlanef(Context *context, GLenum plane, const GLfloat *eqn)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500407{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700408 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500409}
410
411bool ValidateClipPlanex(Context *context, GLenum plane, const GLfixed *equation)
412{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700413 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500414}
415
416bool ValidateColor4f(Context *context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
417{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700418 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500419 return true;
420}
421
422bool ValidateColor4ub(Context *context, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
423{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700424 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500425 return true;
426}
427
428bool ValidateColor4x(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
429{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700430 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500431 return true;
432}
433
434bool ValidateColorPointer(Context *context,
435 GLint size,
436 GLenum type,
437 GLsizei stride,
438 const void *pointer)
439{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700440 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Color, size, type,
441 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500442}
443
444bool ValidateCullFace(Context *context, GLenum mode)
445{
446 UNIMPLEMENTED();
447 return true;
448}
449
450bool ValidateDepthRangex(Context *context, GLfixed n, GLfixed f)
451{
452 UNIMPLEMENTED();
453 return true;
454}
455
Lingfeng Yang01074432018-04-16 10:19:51 -0700456bool ValidateDisableClientState(Context *context, ClientVertexArrayType arrayType)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500457{
Lingfeng Yang01074432018-04-16 10:19:51 -0700458 return ValidateClientStateCommon(context, arrayType);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500459}
460
Lingfeng Yang01074432018-04-16 10:19:51 -0700461bool ValidateEnableClientState(Context *context, ClientVertexArrayType arrayType)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500462{
Lingfeng Yang01074432018-04-16 10:19:51 -0700463 return ValidateClientStateCommon(context, arrayType);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500464}
465
466bool ValidateFogf(Context *context, GLenum pname, GLfloat param)
467{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700468 return ValidateFogCommon(context, pname, &param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500469}
470
471bool ValidateFogfv(Context *context, GLenum pname, const GLfloat *params)
472{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700473 return ValidateFogCommon(context, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500474}
475
476bool ValidateFogx(Context *context, GLenum pname, GLfixed param)
477{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700478 GLfloat asFloat = FixedToFloat(param);
479 return ValidateFogCommon(context, pname, &asFloat);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500480}
481
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700482bool ValidateFogxv(Context *context, GLenum pname, const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500483{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700484 unsigned int paramCount = GetFogParameterCount(pname);
485 GLfloat paramsf[4] = {};
486
487 for (unsigned int i = 0; i < paramCount; i++)
488 {
489 paramsf[i] = FixedToFloat(params[i]);
490 }
491
492 return ValidateFogCommon(context, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500493}
494
495bool ValidateFrustumf(Context *context,
496 GLfloat l,
497 GLfloat r,
498 GLfloat b,
499 GLfloat t,
500 GLfloat n,
501 GLfloat f)
502{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700503 ANGLE_VALIDATE_IS_GLES1(context);
504 if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
505 {
506 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
507 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500508 return true;
509}
510
511bool ValidateFrustumx(Context *context,
512 GLfixed l,
513 GLfixed r,
514 GLfixed b,
515 GLfixed t,
516 GLfixed n,
517 GLfixed f)
518{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700519 ANGLE_VALIDATE_IS_GLES1(context);
520 if (l == r || b == t || n == f || n <= 0 || f <= 0)
521 {
522 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
523 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500524 return true;
525}
526
527bool ValidateGetBufferParameteriv(Context *context, GLenum target, GLenum pname, GLint *params)
528{
529 UNIMPLEMENTED();
530 return true;
531}
532
533bool ValidateGetClipPlanef(Context *context, GLenum plane, GLfloat *equation)
534{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700535 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500536}
537
538bool ValidateGetClipPlanex(Context *context, GLenum plane, GLfixed *equation)
539{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700540 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500541}
542
543bool ValidateGetFixedv(Context *context, GLenum pname, GLfixed *params)
544{
545 UNIMPLEMENTED();
546 return true;
547}
548
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700549bool ValidateGetLightfv(Context *context, GLenum light, LightParameter pname, GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500550{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700551 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
552 return ValidateLightCommon(context, light, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500553}
554
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700555bool ValidateGetLightxv(Context *context, GLenum light, LightParameter pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500556{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700557 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
558 return ValidateLightCommon(context, light, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500559}
560
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700561bool ValidateGetMaterialfv(Context *context, GLenum face, MaterialParameter pname, GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500562{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700563 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
564 return ValidateMaterialCommon(context, face, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500565}
566
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700567bool ValidateGetMaterialxv(Context *context, GLenum face, MaterialParameter pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500568{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700569 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
570 return ValidateMaterialCommon(context, face, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500571}
572
573bool ValidateGetPointerv(Context *context, GLenum pname, void **params)
574{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700575 ANGLE_VALIDATE_IS_GLES1(context);
576 switch (pname)
577 {
578 case GL_VERTEX_ARRAY_POINTER:
579 case GL_NORMAL_ARRAY_POINTER:
580 case GL_COLOR_ARRAY_POINTER:
581 case GL_TEXTURE_COORD_ARRAY_POINTER:
582 case GL_POINT_SIZE_ARRAY_POINTER_OES:
583 return true;
584 default:
585 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidPointerQuery);
586 return false;
587 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500588}
589
Lingfeng Yang74be2962018-06-07 09:13:38 -0700590bool ValidateGetTexEnvfv(Context *context,
591 TextureEnvTarget target,
592 TextureEnvParameter pname,
593 GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500594{
595 UNIMPLEMENTED();
596 return true;
597}
598
Lingfeng Yang74be2962018-06-07 09:13:38 -0700599bool ValidateGetTexEnviv(Context *context,
600 TextureEnvTarget target,
601 TextureEnvParameter pname,
602 GLint *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500603{
604 UNIMPLEMENTED();
605 return true;
606}
607
Lingfeng Yang74be2962018-06-07 09:13:38 -0700608bool ValidateGetTexEnvxv(Context *context,
609 TextureEnvTarget target,
610 TextureEnvParameter pname,
611 GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500612{
613 UNIMPLEMENTED();
614 return true;
615}
616
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800617bool ValidateGetTexParameterxv(Context *context, TextureType target, GLenum pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500618{
619 UNIMPLEMENTED();
620 return true;
621}
622
623bool ValidateLightModelf(Context *context, GLenum pname, GLfloat param)
624{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700625 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500626}
627
628bool ValidateLightModelfv(Context *context, GLenum pname, const GLfloat *params)
629{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700630 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500631}
632
633bool ValidateLightModelx(Context *context, GLenum pname, GLfixed param)
634{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700635 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500636}
637
638bool ValidateLightModelxv(Context *context, GLenum pname, const GLfixed *param)
639{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700640 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500641}
642
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700643bool ValidateLightf(Context *context, GLenum light, LightParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500644{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700645 return ValidateLightSingleComponent(context, light, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500646}
647
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700648bool ValidateLightfv(Context *context, GLenum light, LightParameter pname, const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500649{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700650 return ValidateLightCommon(context, light, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500651}
652
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700653bool ValidateLightx(Context *context, GLenum light, LightParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500654{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700655 return ValidateLightSingleComponent(context, light, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500656}
657
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700658bool ValidateLightxv(Context *context, GLenum light, LightParameter pname, const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500659{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700660 GLfloat paramsf[4];
661 for (unsigned int i = 0; i < GetLightParameterCount(pname); i++)
662 {
663 paramsf[i] = FixedToFloat(params[i]);
664 }
665
666 return ValidateLightCommon(context, light, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500667}
668
669bool ValidateLineWidthx(Context *context, GLfixed width)
670{
671 UNIMPLEMENTED();
672 return true;
673}
674
675bool ValidateLoadIdentity(Context *context)
676{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700677 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500678 return true;
679}
680
681bool ValidateLoadMatrixf(Context *context, const GLfloat *m)
682{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700683 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500684 return true;
685}
686
687bool ValidateLoadMatrixx(Context *context, const GLfixed *m)
688{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700689 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500690 return true;
691}
692
693bool ValidateLogicOp(Context *context, GLenum opcode)
694{
695 UNIMPLEMENTED();
696 return true;
697}
698
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700699bool ValidateMaterialf(Context *context, GLenum face, MaterialParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500700{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700701 return ValidateMaterialSingleComponent(context, face, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500702}
703
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700704bool ValidateMaterialfv(Context *context,
705 GLenum face,
706 MaterialParameter pname,
707 const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500708{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700709 return ValidateMaterialCommon(context, face, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500710}
711
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700712bool ValidateMaterialx(Context *context, GLenum face, MaterialParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500713{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700714 return ValidateMaterialSingleComponent(context, face, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500715}
716
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700717bool ValidateMaterialxv(Context *context,
718 GLenum face,
719 MaterialParameter pname,
720 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500721{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700722 GLfloat paramsf[4];
723
724 for (unsigned int i = 0; i < GetMaterialParameterCount(pname); i++)
725 {
726 paramsf[i] = FixedToFloat(params[i]);
727 }
728
729 return ValidateMaterialCommon(context, face, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500730}
731
Lingfeng Yang00af4632018-04-02 12:42:24 -0700732bool ValidateMatrixMode(Context *context, MatrixType mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500733{
Lingfeng Yangd2488ab2018-04-04 09:25:48 -0700734 ANGLE_VALIDATE_IS_GLES1(context);
735 switch (mode)
736 {
737 case MatrixType::Projection:
738 case MatrixType::Modelview:
739 case MatrixType::Texture:
740 return true;
741 default:
742 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMatrixMode);
743 return false;
744 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500745}
746
747bool ValidateMultMatrixf(Context *context, const GLfloat *m)
748{
Lingfeng Yang568fc392018-04-09 07:57:23 -0700749 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500750 return true;
751}
752
753bool ValidateMultMatrixx(Context *context, const GLfixed *m)
754{
Lingfeng Yang568fc392018-04-09 07:57:23 -0700755 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500756 return true;
757}
758
759bool ValidateMultiTexCoord4f(Context *context,
760 GLenum target,
761 GLfloat s,
762 GLfloat t,
763 GLfloat r,
764 GLfloat q)
765{
Lingfeng Yang038dd532018-03-29 17:31:52 -0700766 ANGLE_VALIDATE_IS_GLES1(context);
767 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500768}
769
770bool ValidateMultiTexCoord4x(Context *context,
Lingfeng Yang038dd532018-03-29 17:31:52 -0700771 GLenum target,
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500772 GLfixed s,
773 GLfixed t,
774 GLfixed r,
775 GLfixed q)
776{
Lingfeng Yang038dd532018-03-29 17:31:52 -0700777 ANGLE_VALIDATE_IS_GLES1(context);
778 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500779}
780
781bool ValidateNormal3f(Context *context, GLfloat nx, GLfloat ny, GLfloat nz)
782{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -0700783 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500784 return true;
785}
786
787bool ValidateNormal3x(Context *context, GLfixed nx, GLfixed ny, GLfixed nz)
788{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -0700789 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500790 return true;
791}
792
793bool ValidateNormalPointer(Context *context, GLenum type, GLsizei stride, const void *pointer)
794{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700795 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Normal, 3, type,
796 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500797}
798
799bool ValidateOrthof(Context *context,
800 GLfloat l,
801 GLfloat r,
802 GLfloat b,
803 GLfloat t,
804 GLfloat n,
805 GLfloat f)
806{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700807 ANGLE_VALIDATE_IS_GLES1(context);
808 if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
809 {
810 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
811 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500812 return true;
813}
814
815bool ValidateOrthox(Context *context,
816 GLfixed l,
817 GLfixed r,
818 GLfixed b,
819 GLfixed t,
820 GLfixed n,
821 GLfixed f)
822{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700823 ANGLE_VALIDATE_IS_GLES1(context);
824 if (l == r || b == t || n == f || n <= 0 || f <= 0)
825 {
826 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
827 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500828 return true;
829}
830
831bool ValidatePointParameterf(Context *context, GLenum pname, GLfloat param)
832{
833 UNIMPLEMENTED();
834 return true;
835}
836
837bool ValidatePointParameterfv(Context *context, GLenum pname, const GLfloat *params)
838{
839 UNIMPLEMENTED();
840 return true;
841}
842
843bool ValidatePointParameterx(Context *context, GLenum pname, GLfixed param)
844{
845 UNIMPLEMENTED();
846 return true;
847}
848
849bool ValidatePointParameterxv(Context *context, GLenum pname, const GLfixed *params)
850{
851 UNIMPLEMENTED();
852 return true;
853}
854
855bool ValidatePointSize(Context *context, GLfloat size)
856{
857 UNIMPLEMENTED();
858 return true;
859}
860
861bool ValidatePointSizex(Context *context, GLfixed size)
862{
863 UNIMPLEMENTED();
864 return true;
865}
866
867bool ValidatePolygonOffsetx(Context *context, GLfixed factor, GLfixed units)
868{
869 UNIMPLEMENTED();
870 return true;
871}
872
873bool ValidatePopMatrix(Context *context)
874{
Lingfeng Yange547aac2018-04-05 09:39:20 -0700875 ANGLE_VALIDATE_IS_GLES1(context);
876 const auto &stack = context->getGLState().gles1().currentMatrixStack();
877 if (stack.size() == 1)
878 {
879 ANGLE_VALIDATION_ERR(context, StackUnderflow(), MatrixStackUnderflow);
880 return false;
881 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500882 return true;
883}
884
885bool ValidatePushMatrix(Context *context)
886{
Lingfeng Yange547aac2018-04-05 09:39:20 -0700887 ANGLE_VALIDATE_IS_GLES1(context);
888 const auto &stack = context->getGLState().gles1().currentMatrixStack();
889 if (stack.size() == stack.max_size())
890 {
891 ANGLE_VALIDATION_ERR(context, StackOverflow(), MatrixStackOverflow);
892 return false;
893 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500894 return true;
895}
896
897bool ValidateRotatef(Context *context, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
898{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700899 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500900 return true;
901}
902
903bool ValidateRotatex(Context *context, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
904{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700905 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500906 return true;
907}
908
909bool ValidateSampleCoveragex(Context *context, GLclampx value, GLboolean invert)
910{
911 UNIMPLEMENTED();
912 return true;
913}
914
915bool ValidateScalef(Context *context, GLfloat x, GLfloat y, GLfloat z)
916{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700917 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500918 return true;
919}
920
921bool ValidateScalex(Context *context, GLfixed x, GLfixed y, GLfixed z)
922{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700923 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500924 return true;
925}
926
Lingfeng Yanga0cfa872018-05-30 21:12:17 -0700927bool ValidateShadeModel(Context *context, ShadingModel mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500928{
Lingfeng Yanga0cfa872018-05-30 21:12:17 -0700929 ANGLE_VALIDATE_IS_GLES1(context);
930 switch (mode)
931 {
932 case ShadingModel::Flat:
933 case ShadingModel::Smooth:
934 return true;
935 default:
936 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidShadingModel);
937 return false;
938 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500939}
940
941bool ValidateTexCoordPointer(Context *context,
942 GLint size,
943 GLenum type,
944 GLsizei stride,
945 const void *pointer)
946{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700947 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::TextureCoord, size,
948 type, stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500949}
950
Lingfeng Yang74be2962018-06-07 09:13:38 -0700951bool ValidateTexEnvf(Context *context,
952 TextureEnvTarget target,
953 TextureEnvParameter pname,
954 GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500955{
956 UNIMPLEMENTED();
957 return true;
958}
959
Lingfeng Yang74be2962018-06-07 09:13:38 -0700960bool ValidateTexEnvfv(Context *context,
961 TextureEnvTarget target,
962 TextureEnvParameter pname,
963 const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500964{
965 UNIMPLEMENTED();
966 return true;
967}
968
Lingfeng Yang74be2962018-06-07 09:13:38 -0700969bool ValidateTexEnvi(Context *context,
970 TextureEnvTarget target,
971 TextureEnvParameter pname,
972 GLint param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500973{
974 UNIMPLEMENTED();
975 return true;
976}
977
Lingfeng Yang74be2962018-06-07 09:13:38 -0700978bool ValidateTexEnviv(Context *context,
979 TextureEnvTarget target,
980 TextureEnvParameter pname,
981 const GLint *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500982{
983 UNIMPLEMENTED();
984 return true;
985}
986
Lingfeng Yang74be2962018-06-07 09:13:38 -0700987bool ValidateTexEnvx(Context *context,
988 TextureEnvTarget target,
989 TextureEnvParameter pname,
990 GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500991{
992 UNIMPLEMENTED();
993 return true;
994}
995
Lingfeng Yang74be2962018-06-07 09:13:38 -0700996bool ValidateTexEnvxv(Context *context,
997 TextureEnvTarget target,
998 TextureEnvParameter pname,
999 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001000{
1001 UNIMPLEMENTED();
1002 return true;
1003}
1004
Corentin Wallezf0e89be2017-11-08 14:00:32 -08001005bool ValidateTexParameterx(Context *context, TextureType target, GLenum pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001006{
1007 UNIMPLEMENTED();
1008 return true;
1009}
1010
Corentin Wallezf0e89be2017-11-08 14:00:32 -08001011bool ValidateTexParameterxv(Context *context,
1012 TextureType target,
1013 GLenum pname,
1014 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001015{
1016 UNIMPLEMENTED();
1017 return true;
1018}
1019
1020bool ValidateTranslatef(Context *context, GLfloat x, GLfloat y, GLfloat z)
1021{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001022 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001023 return true;
1024}
1025
1026bool ValidateTranslatex(Context *context, GLfixed x, GLfixed y, GLfixed z)
1027{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001028 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001029 return true;
1030}
1031
1032bool ValidateVertexPointer(Context *context,
1033 GLint size,
1034 GLenum type,
1035 GLsizei stride,
1036 const void *pointer)
1037{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001038 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Vertex, size, type,
1039 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001040}
1041
1042bool ValidateDrawTexfOES(Context *context,
1043 GLfloat x,
1044 GLfloat y,
1045 GLfloat z,
1046 GLfloat width,
1047 GLfloat height)
1048{
1049 UNIMPLEMENTED();
1050 return true;
1051}
1052
1053bool ValidateDrawTexfvOES(Context *context, const GLfloat *coords)
1054{
1055 UNIMPLEMENTED();
1056 return true;
1057}
1058
1059bool ValidateDrawTexiOES(Context *context, GLint x, GLint y, GLint z, GLint width, GLint height)
1060{
1061 UNIMPLEMENTED();
1062 return true;
1063}
1064
1065bool ValidateDrawTexivOES(Context *context, const GLint *coords)
1066{
1067 UNIMPLEMENTED();
1068 return true;
1069}
1070
1071bool ValidateDrawTexsOES(Context *context,
1072 GLshort x,
1073 GLshort y,
1074 GLshort z,
1075 GLshort width,
1076 GLshort height)
1077{
1078 UNIMPLEMENTED();
1079 return true;
1080}
1081
1082bool ValidateDrawTexsvOES(Context *context, const GLshort *coords)
1083{
1084 UNIMPLEMENTED();
1085 return true;
1086}
1087
1088bool ValidateDrawTexxOES(Context *context,
1089 GLfixed x,
1090 GLfixed y,
1091 GLfixed z,
1092 GLfixed width,
1093 GLfixed height)
1094{
1095 UNIMPLEMENTED();
1096 return true;
1097}
1098
1099bool ValidateDrawTexxvOES(Context *context, const GLfixed *coords)
1100{
1101 UNIMPLEMENTED();
1102 return true;
1103}
1104
1105bool ValidateCurrentPaletteMatrixOES(Context *context, GLuint matrixpaletteindex)
1106{
1107 UNIMPLEMENTED();
1108 return true;
1109}
1110
1111bool ValidateLoadPaletteFromModelViewMatrixOES(Context *context)
1112{
1113 UNIMPLEMENTED();
1114 return true;
1115}
1116
1117bool ValidateMatrixIndexPointerOES(Context *context,
1118 GLint size,
1119 GLenum type,
1120 GLsizei stride,
1121 const void *pointer)
1122{
1123 UNIMPLEMENTED();
1124 return true;
1125}
1126
1127bool ValidateWeightPointerOES(Context *context,
1128 GLint size,
1129 GLenum type,
1130 GLsizei stride,
1131 const void *pointer)
1132{
1133 UNIMPLEMENTED();
1134 return true;
1135}
1136
1137bool ValidatePointSizePointerOES(Context *context, GLenum type, GLsizei stride, const void *pointer)
1138{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001139 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::PointSize, 1, type,
1140 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001141}
1142
1143bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent)
1144{
1145 UNIMPLEMENTED();
1146 return true;
1147}
Lingfeng Yanga0648782018-03-12 14:45:25 -07001148
1149bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers)
1150{
1151 UNIMPLEMENTED();
1152 return true;
1153}
1154
1155bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers)
1156{
1157 UNIMPLEMENTED();
1158 return true;
1159}
1160
1161bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers)
1162{
1163 UNIMPLEMENTED();
1164 return true;
1165}
1166
1167bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers)
1168{
1169 UNIMPLEMENTED();
1170 return true;
1171}
1172
1173bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer)
1174{
1175 UNIMPLEMENTED();
1176 return true;
1177}
1178
1179bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer)
1180{
1181 UNIMPLEMENTED();
1182 return true;
1183}
1184
1185bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target)
1186{
1187 UNIMPLEMENTED();
1188 return true;
1189}
1190
1191bool ValidateFramebufferRenderbufferOES(Context *context,
1192 GLenum target,
1193 GLenum attachment,
1194 GLenum rbtarget,
1195 GLuint renderbuffer)
1196{
1197 UNIMPLEMENTED();
1198 return true;
1199}
1200
1201bool ValidateFramebufferTexture2DOES(Context *context,
1202 GLenum target,
1203 GLenum attachment,
1204 TextureTarget textarget,
1205 GLuint texture,
1206 GLint level)
1207{
1208 UNIMPLEMENTED();
1209 return true;
1210}
1211
1212bool ValidateGenerateMipmapOES(Context *context, TextureType target)
1213{
1214 UNIMPLEMENTED();
1215 return true;
1216}
1217
1218bool ValidateGetFramebufferAttachmentParameterivOES(Context *context,
1219 GLenum target,
1220 GLenum attachment,
1221 GLenum pname,
1222 GLint *params)
1223{
1224 UNIMPLEMENTED();
1225 return true;
1226}
1227
1228bool ValidateGetRenderbufferParameterivOES(Context *context,
1229 GLenum target,
1230 GLenum pname,
1231 GLint *params)
1232{
1233 UNIMPLEMENTED();
1234 return true;
1235}
1236
1237bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer)
1238{
1239 UNIMPLEMENTED();
1240 return true;
1241}
1242
1243bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer)
1244{
1245 UNIMPLEMENTED();
1246 return true;
1247}
1248
1249bool ValidateRenderbufferStorageOES(Context *context,
1250 GLenum target,
1251 GLint internalformat,
1252 GLsizei width,
1253 GLsizei height)
1254{
1255 UNIMPLEMENTED();
1256 return true;
1257}
1258
1259// GL_OES_texture_cube_map
1260
1261bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params)
1262{
1263 UNIMPLEMENTED();
1264 return true;
1265}
1266
1267bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params)
1268{
1269 UNIMPLEMENTED();
1270 return true;
1271}
1272
1273bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params)
1274{
1275 UNIMPLEMENTED();
1276 return true;
1277}
1278
1279bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params)
1280{
1281 UNIMPLEMENTED();
1282 return true;
1283}
1284
1285bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1286{
1287 UNIMPLEMENTED();
1288 return true;
1289}
1290
1291bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1292{
1293 UNIMPLEMENTED();
1294 return true;
1295}
1296
1297bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param)
1298{
1299 UNIMPLEMENTED();
1300 return true;
1301}
1302
1303bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param)
1304{
1305 UNIMPLEMENTED();
1306 return true;
1307}
1308
1309bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param)
1310{
1311 UNIMPLEMENTED();
1312 return true;
1313}
Lingfeng Yang01074432018-04-16 10:19:51 -07001314
1315} // namespace gl