blob: 8183715e542c3b009f5c3c33c8f78f285f1557a3 [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
590bool ValidateGetTexEnvfv(Context *context, GLenum target, GLenum pname, GLfloat *params)
591{
592 UNIMPLEMENTED();
593 return true;
594}
595
596bool ValidateGetTexEnviv(Context *context, GLenum target, GLenum pname, GLint *params)
597{
598 UNIMPLEMENTED();
599 return true;
600}
601
602bool ValidateGetTexEnvxv(Context *context, GLenum target, GLenum pname, GLfixed *params)
603{
604 UNIMPLEMENTED();
605 return true;
606}
607
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800608bool ValidateGetTexParameterxv(Context *context, TextureType target, GLenum pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500609{
610 UNIMPLEMENTED();
611 return true;
612}
613
614bool ValidateLightModelf(Context *context, GLenum pname, GLfloat param)
615{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700616 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500617}
618
619bool ValidateLightModelfv(Context *context, GLenum pname, const GLfloat *params)
620{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700621 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500622}
623
624bool ValidateLightModelx(Context *context, GLenum pname, GLfixed param)
625{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700626 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500627}
628
629bool ValidateLightModelxv(Context *context, GLenum pname, const GLfixed *param)
630{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700631 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500632}
633
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700634bool ValidateLightf(Context *context, GLenum light, LightParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500635{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700636 return ValidateLightSingleComponent(context, light, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500637}
638
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700639bool ValidateLightfv(Context *context, GLenum light, LightParameter pname, const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500640{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700641 return ValidateLightCommon(context, light, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500642}
643
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700644bool ValidateLightx(Context *context, GLenum light, LightParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500645{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700646 return ValidateLightSingleComponent(context, light, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500647}
648
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700649bool ValidateLightxv(Context *context, GLenum light, LightParameter pname, const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500650{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700651 GLfloat paramsf[4];
652 for (unsigned int i = 0; i < GetLightParameterCount(pname); i++)
653 {
654 paramsf[i] = FixedToFloat(params[i]);
655 }
656
657 return ValidateLightCommon(context, light, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500658}
659
660bool ValidateLineWidthx(Context *context, GLfixed width)
661{
662 UNIMPLEMENTED();
663 return true;
664}
665
666bool ValidateLoadIdentity(Context *context)
667{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700668 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500669 return true;
670}
671
672bool ValidateLoadMatrixf(Context *context, const GLfloat *m)
673{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700674 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500675 return true;
676}
677
678bool ValidateLoadMatrixx(Context *context, const GLfixed *m)
679{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700680 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500681 return true;
682}
683
684bool ValidateLogicOp(Context *context, GLenum opcode)
685{
686 UNIMPLEMENTED();
687 return true;
688}
689
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700690bool ValidateMaterialf(Context *context, GLenum face, MaterialParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500691{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700692 return ValidateMaterialSingleComponent(context, face, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500693}
694
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700695bool ValidateMaterialfv(Context *context,
696 GLenum face,
697 MaterialParameter pname,
698 const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500699{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700700 return ValidateMaterialCommon(context, face, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500701}
702
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700703bool ValidateMaterialx(Context *context, GLenum face, MaterialParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500704{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700705 return ValidateMaterialSingleComponent(context, face, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500706}
707
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700708bool ValidateMaterialxv(Context *context,
709 GLenum face,
710 MaterialParameter pname,
711 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500712{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700713 GLfloat paramsf[4];
714
715 for (unsigned int i = 0; i < GetMaterialParameterCount(pname); i++)
716 {
717 paramsf[i] = FixedToFloat(params[i]);
718 }
719
720 return ValidateMaterialCommon(context, face, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500721}
722
Lingfeng Yang00af4632018-04-02 12:42:24 -0700723bool ValidateMatrixMode(Context *context, MatrixType mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500724{
Lingfeng Yangd2488ab2018-04-04 09:25:48 -0700725 ANGLE_VALIDATE_IS_GLES1(context);
726 switch (mode)
727 {
728 case MatrixType::Projection:
729 case MatrixType::Modelview:
730 case MatrixType::Texture:
731 return true;
732 default:
733 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMatrixMode);
734 return false;
735 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500736}
737
738bool ValidateMultMatrixf(Context *context, const GLfloat *m)
739{
Lingfeng Yang568fc392018-04-09 07:57:23 -0700740 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500741 return true;
742}
743
744bool ValidateMultMatrixx(Context *context, const GLfixed *m)
745{
Lingfeng Yang568fc392018-04-09 07:57:23 -0700746 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500747 return true;
748}
749
750bool ValidateMultiTexCoord4f(Context *context,
751 GLenum target,
752 GLfloat s,
753 GLfloat t,
754 GLfloat r,
755 GLfloat q)
756{
Lingfeng Yang038dd532018-03-29 17:31:52 -0700757 ANGLE_VALIDATE_IS_GLES1(context);
758 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500759}
760
761bool ValidateMultiTexCoord4x(Context *context,
Lingfeng Yang038dd532018-03-29 17:31:52 -0700762 GLenum target,
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500763 GLfixed s,
764 GLfixed t,
765 GLfixed r,
766 GLfixed q)
767{
Lingfeng Yang038dd532018-03-29 17:31:52 -0700768 ANGLE_VALIDATE_IS_GLES1(context);
769 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500770}
771
772bool ValidateNormal3f(Context *context, GLfloat nx, GLfloat ny, GLfloat nz)
773{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -0700774 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500775 return true;
776}
777
778bool ValidateNormal3x(Context *context, GLfixed nx, GLfixed ny, GLfixed nz)
779{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -0700780 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500781 return true;
782}
783
784bool ValidateNormalPointer(Context *context, GLenum type, GLsizei stride, const void *pointer)
785{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700786 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Normal, 3, type,
787 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500788}
789
790bool ValidateOrthof(Context *context,
791 GLfloat l,
792 GLfloat r,
793 GLfloat b,
794 GLfloat t,
795 GLfloat n,
796 GLfloat f)
797{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700798 ANGLE_VALIDATE_IS_GLES1(context);
799 if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
800 {
801 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
802 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500803 return true;
804}
805
806bool ValidateOrthox(Context *context,
807 GLfixed l,
808 GLfixed r,
809 GLfixed b,
810 GLfixed t,
811 GLfixed n,
812 GLfixed f)
813{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700814 ANGLE_VALIDATE_IS_GLES1(context);
815 if (l == r || b == t || n == f || n <= 0 || f <= 0)
816 {
817 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
818 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500819 return true;
820}
821
822bool ValidatePointParameterf(Context *context, GLenum pname, GLfloat param)
823{
824 UNIMPLEMENTED();
825 return true;
826}
827
828bool ValidatePointParameterfv(Context *context, GLenum pname, const GLfloat *params)
829{
830 UNIMPLEMENTED();
831 return true;
832}
833
834bool ValidatePointParameterx(Context *context, GLenum pname, GLfixed param)
835{
836 UNIMPLEMENTED();
837 return true;
838}
839
840bool ValidatePointParameterxv(Context *context, GLenum pname, const GLfixed *params)
841{
842 UNIMPLEMENTED();
843 return true;
844}
845
846bool ValidatePointSize(Context *context, GLfloat size)
847{
848 UNIMPLEMENTED();
849 return true;
850}
851
852bool ValidatePointSizex(Context *context, GLfixed size)
853{
854 UNIMPLEMENTED();
855 return true;
856}
857
858bool ValidatePolygonOffsetx(Context *context, GLfixed factor, GLfixed units)
859{
860 UNIMPLEMENTED();
861 return true;
862}
863
864bool ValidatePopMatrix(Context *context)
865{
Lingfeng Yange547aac2018-04-05 09:39:20 -0700866 ANGLE_VALIDATE_IS_GLES1(context);
867 const auto &stack = context->getGLState().gles1().currentMatrixStack();
868 if (stack.size() == 1)
869 {
870 ANGLE_VALIDATION_ERR(context, StackUnderflow(), MatrixStackUnderflow);
871 return false;
872 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500873 return true;
874}
875
876bool ValidatePushMatrix(Context *context)
877{
Lingfeng Yange547aac2018-04-05 09:39:20 -0700878 ANGLE_VALIDATE_IS_GLES1(context);
879 const auto &stack = context->getGLState().gles1().currentMatrixStack();
880 if (stack.size() == stack.max_size())
881 {
882 ANGLE_VALIDATION_ERR(context, StackOverflow(), MatrixStackOverflow);
883 return false;
884 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500885 return true;
886}
887
888bool ValidateRotatef(Context *context, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
889{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700890 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500891 return true;
892}
893
894bool ValidateRotatex(Context *context, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
895{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700896 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500897 return true;
898}
899
900bool ValidateSampleCoveragex(Context *context, GLclampx value, GLboolean invert)
901{
902 UNIMPLEMENTED();
903 return true;
904}
905
906bool ValidateScalef(Context *context, GLfloat x, GLfloat y, GLfloat z)
907{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700908 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500909 return true;
910}
911
912bool ValidateScalex(Context *context, GLfixed x, GLfixed y, GLfixed z)
913{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700914 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500915 return true;
916}
917
Lingfeng Yanga0cfa872018-05-30 21:12:17 -0700918bool ValidateShadeModel(Context *context, ShadingModel mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500919{
Lingfeng Yanga0cfa872018-05-30 21:12:17 -0700920 ANGLE_VALIDATE_IS_GLES1(context);
921 switch (mode)
922 {
923 case ShadingModel::Flat:
924 case ShadingModel::Smooth:
925 return true;
926 default:
927 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidShadingModel);
928 return false;
929 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500930}
931
932bool ValidateTexCoordPointer(Context *context,
933 GLint size,
934 GLenum type,
935 GLsizei stride,
936 const void *pointer)
937{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700938 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::TextureCoord, size,
939 type, stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500940}
941
942bool ValidateTexEnvf(Context *context, GLenum target, GLenum pname, GLfloat param)
943{
944 UNIMPLEMENTED();
945 return true;
946}
947
948bool ValidateTexEnvfv(Context *context, GLenum target, GLenum pname, const GLfloat *params)
949{
950 UNIMPLEMENTED();
951 return true;
952}
953
954bool ValidateTexEnvi(Context *context, GLenum target, GLenum pname, GLint param)
955{
956 UNIMPLEMENTED();
957 return true;
958}
959
960bool ValidateTexEnviv(Context *context, GLenum target, GLenum pname, const GLint *params)
961{
962 UNIMPLEMENTED();
963 return true;
964}
965
966bool ValidateTexEnvx(Context *context, GLenum target, GLenum pname, GLfixed param)
967{
968 UNIMPLEMENTED();
969 return true;
970}
971
972bool ValidateTexEnvxv(Context *context, GLenum target, GLenum pname, const GLfixed *params)
973{
974 UNIMPLEMENTED();
975 return true;
976}
977
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800978bool ValidateTexParameterx(Context *context, TextureType target, GLenum pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500979{
980 UNIMPLEMENTED();
981 return true;
982}
983
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800984bool ValidateTexParameterxv(Context *context,
985 TextureType target,
986 GLenum pname,
987 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500988{
989 UNIMPLEMENTED();
990 return true;
991}
992
993bool ValidateTranslatef(Context *context, GLfloat x, GLfloat y, GLfloat z)
994{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700995 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500996 return true;
997}
998
999bool ValidateTranslatex(Context *context, GLfixed x, GLfixed y, GLfixed z)
1000{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001001 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001002 return true;
1003}
1004
1005bool ValidateVertexPointer(Context *context,
1006 GLint size,
1007 GLenum type,
1008 GLsizei stride,
1009 const void *pointer)
1010{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001011 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Vertex, size, type,
1012 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001013}
1014
1015bool ValidateDrawTexfOES(Context *context,
1016 GLfloat x,
1017 GLfloat y,
1018 GLfloat z,
1019 GLfloat width,
1020 GLfloat height)
1021{
1022 UNIMPLEMENTED();
1023 return true;
1024}
1025
1026bool ValidateDrawTexfvOES(Context *context, const GLfloat *coords)
1027{
1028 UNIMPLEMENTED();
1029 return true;
1030}
1031
1032bool ValidateDrawTexiOES(Context *context, GLint x, GLint y, GLint z, GLint width, GLint height)
1033{
1034 UNIMPLEMENTED();
1035 return true;
1036}
1037
1038bool ValidateDrawTexivOES(Context *context, const GLint *coords)
1039{
1040 UNIMPLEMENTED();
1041 return true;
1042}
1043
1044bool ValidateDrawTexsOES(Context *context,
1045 GLshort x,
1046 GLshort y,
1047 GLshort z,
1048 GLshort width,
1049 GLshort height)
1050{
1051 UNIMPLEMENTED();
1052 return true;
1053}
1054
1055bool ValidateDrawTexsvOES(Context *context, const GLshort *coords)
1056{
1057 UNIMPLEMENTED();
1058 return true;
1059}
1060
1061bool ValidateDrawTexxOES(Context *context,
1062 GLfixed x,
1063 GLfixed y,
1064 GLfixed z,
1065 GLfixed width,
1066 GLfixed height)
1067{
1068 UNIMPLEMENTED();
1069 return true;
1070}
1071
1072bool ValidateDrawTexxvOES(Context *context, const GLfixed *coords)
1073{
1074 UNIMPLEMENTED();
1075 return true;
1076}
1077
1078bool ValidateCurrentPaletteMatrixOES(Context *context, GLuint matrixpaletteindex)
1079{
1080 UNIMPLEMENTED();
1081 return true;
1082}
1083
1084bool ValidateLoadPaletteFromModelViewMatrixOES(Context *context)
1085{
1086 UNIMPLEMENTED();
1087 return true;
1088}
1089
1090bool ValidateMatrixIndexPointerOES(Context *context,
1091 GLint size,
1092 GLenum type,
1093 GLsizei stride,
1094 const void *pointer)
1095{
1096 UNIMPLEMENTED();
1097 return true;
1098}
1099
1100bool ValidateWeightPointerOES(Context *context,
1101 GLint size,
1102 GLenum type,
1103 GLsizei stride,
1104 const void *pointer)
1105{
1106 UNIMPLEMENTED();
1107 return true;
1108}
1109
1110bool ValidatePointSizePointerOES(Context *context, GLenum type, GLsizei stride, const void *pointer)
1111{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001112 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::PointSize, 1, type,
1113 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001114}
1115
1116bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent)
1117{
1118 UNIMPLEMENTED();
1119 return true;
1120}
Lingfeng Yanga0648782018-03-12 14:45:25 -07001121
1122bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers)
1123{
1124 UNIMPLEMENTED();
1125 return true;
1126}
1127
1128bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers)
1129{
1130 UNIMPLEMENTED();
1131 return true;
1132}
1133
1134bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers)
1135{
1136 UNIMPLEMENTED();
1137 return true;
1138}
1139
1140bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers)
1141{
1142 UNIMPLEMENTED();
1143 return true;
1144}
1145
1146bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer)
1147{
1148 UNIMPLEMENTED();
1149 return true;
1150}
1151
1152bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer)
1153{
1154 UNIMPLEMENTED();
1155 return true;
1156}
1157
1158bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target)
1159{
1160 UNIMPLEMENTED();
1161 return true;
1162}
1163
1164bool ValidateFramebufferRenderbufferOES(Context *context,
1165 GLenum target,
1166 GLenum attachment,
1167 GLenum rbtarget,
1168 GLuint renderbuffer)
1169{
1170 UNIMPLEMENTED();
1171 return true;
1172}
1173
1174bool ValidateFramebufferTexture2DOES(Context *context,
1175 GLenum target,
1176 GLenum attachment,
1177 TextureTarget textarget,
1178 GLuint texture,
1179 GLint level)
1180{
1181 UNIMPLEMENTED();
1182 return true;
1183}
1184
1185bool ValidateGenerateMipmapOES(Context *context, TextureType target)
1186{
1187 UNIMPLEMENTED();
1188 return true;
1189}
1190
1191bool ValidateGetFramebufferAttachmentParameterivOES(Context *context,
1192 GLenum target,
1193 GLenum attachment,
1194 GLenum pname,
1195 GLint *params)
1196{
1197 UNIMPLEMENTED();
1198 return true;
1199}
1200
1201bool ValidateGetRenderbufferParameterivOES(Context *context,
1202 GLenum target,
1203 GLenum pname,
1204 GLint *params)
1205{
1206 UNIMPLEMENTED();
1207 return true;
1208}
1209
1210bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer)
1211{
1212 UNIMPLEMENTED();
1213 return true;
1214}
1215
1216bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer)
1217{
1218 UNIMPLEMENTED();
1219 return true;
1220}
1221
1222bool ValidateRenderbufferStorageOES(Context *context,
1223 GLenum target,
1224 GLint internalformat,
1225 GLsizei width,
1226 GLsizei height)
1227{
1228 UNIMPLEMENTED();
1229 return true;
1230}
1231
1232// GL_OES_texture_cube_map
1233
1234bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params)
1235{
1236 UNIMPLEMENTED();
1237 return true;
1238}
1239
1240bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params)
1241{
1242 UNIMPLEMENTED();
1243 return true;
1244}
1245
1246bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params)
1247{
1248 UNIMPLEMENTED();
1249 return true;
1250}
1251
1252bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params)
1253{
1254 UNIMPLEMENTED();
1255 return true;
1256}
1257
1258bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1259{
1260 UNIMPLEMENTED();
1261 return true;
1262}
1263
1264bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1265{
1266 UNIMPLEMENTED();
1267 return true;
1268}
1269
1270bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param)
1271{
1272 UNIMPLEMENTED();
1273 return true;
1274}
1275
1276bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param)
1277{
1278 UNIMPLEMENTED();
1279 return true;
1280}
1281
1282bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param)
1283{
1284 UNIMPLEMENTED();
1285 return true;
1286}
Lingfeng Yang01074432018-04-16 10:19:51 -07001287
1288} // namespace gl