blob: 0a580549a6fa512982ee4673acd9a9cc66134677 [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 Yang01074432018-04-16 10:19:51 -0700332} // namespace gl
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500333
334namespace gl
335{
336
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700337bool ValidateAlphaFunc(Context *context, AlphaTestFunc func, GLfloat ref)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500338{
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700339 ANGLE_VALIDATE_IS_GLES1(context);
340 return ValidateAlphaFuncCommon(context, func);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500341}
342
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700343bool ValidateAlphaFuncx(Context *context, AlphaTestFunc func, GLfixed ref)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500344{
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700345 ANGLE_VALIDATE_IS_GLES1(context);
346 return ValidateAlphaFuncCommon(context, func);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500347}
348
349bool ValidateClearColorx(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
350{
351 UNIMPLEMENTED();
352 return true;
353}
354
355bool ValidateClearDepthx(Context *context, GLfixed depth)
356{
357 UNIMPLEMENTED();
358 return true;
359}
360
361bool ValidateClientActiveTexture(Context *context, GLenum texture)
362{
Lingfeng Yang96310cd2018-03-28 11:56:28 -0700363 ANGLE_VALIDATE_IS_GLES1(context);
Lingfeng Yang038dd532018-03-29 17:31:52 -0700364 return ValidateMultitextureUnit(context, texture);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500365}
366
Lingfeng Yang060088a2018-05-30 20:40:57 -0700367bool ValidateClipPlanef(Context *context, GLenum plane, const GLfloat *eqn)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500368{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700369 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500370}
371
372bool ValidateClipPlanex(Context *context, GLenum plane, const GLfixed *equation)
373{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700374 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500375}
376
377bool ValidateColor4f(Context *context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
378{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700379 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500380 return true;
381}
382
383bool ValidateColor4ub(Context *context, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
384{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700385 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500386 return true;
387}
388
389bool ValidateColor4x(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
390{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700391 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500392 return true;
393}
394
395bool ValidateColorPointer(Context *context,
396 GLint size,
397 GLenum type,
398 GLsizei stride,
399 const void *pointer)
400{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700401 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Color, size, type,
402 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500403}
404
405bool ValidateCullFace(Context *context, GLenum mode)
406{
407 UNIMPLEMENTED();
408 return true;
409}
410
411bool ValidateDepthRangex(Context *context, GLfixed n, GLfixed f)
412{
413 UNIMPLEMENTED();
414 return true;
415}
416
Lingfeng Yang01074432018-04-16 10:19:51 -0700417bool ValidateDisableClientState(Context *context, ClientVertexArrayType arrayType)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500418{
Lingfeng Yang01074432018-04-16 10:19:51 -0700419 return ValidateClientStateCommon(context, arrayType);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500420}
421
Lingfeng Yang01074432018-04-16 10:19:51 -0700422bool ValidateEnableClientState(Context *context, ClientVertexArrayType arrayType)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500423{
Lingfeng Yang01074432018-04-16 10:19:51 -0700424 return ValidateClientStateCommon(context, arrayType);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500425}
426
427bool ValidateFogf(Context *context, GLenum pname, GLfloat param)
428{
429 UNIMPLEMENTED();
430 return true;
431}
432
433bool ValidateFogfv(Context *context, GLenum pname, const GLfloat *params)
434{
435 UNIMPLEMENTED();
436 return true;
437}
438
439bool ValidateFogx(Context *context, GLenum pname, GLfixed param)
440{
441 UNIMPLEMENTED();
442 return true;
443}
444
445bool ValidateFogxv(Context *context, GLenum pname, const GLfixed *param)
446{
447 UNIMPLEMENTED();
448 return true;
449}
450
451bool ValidateFrustumf(Context *context,
452 GLfloat l,
453 GLfloat r,
454 GLfloat b,
455 GLfloat t,
456 GLfloat n,
457 GLfloat f)
458{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700459 ANGLE_VALIDATE_IS_GLES1(context);
460 if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
461 {
462 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
463 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500464 return true;
465}
466
467bool ValidateFrustumx(Context *context,
468 GLfixed l,
469 GLfixed r,
470 GLfixed b,
471 GLfixed t,
472 GLfixed n,
473 GLfixed f)
474{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700475 ANGLE_VALIDATE_IS_GLES1(context);
476 if (l == r || b == t || n == f || n <= 0 || f <= 0)
477 {
478 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
479 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500480 return true;
481}
482
483bool ValidateGetBufferParameteriv(Context *context, GLenum target, GLenum pname, GLint *params)
484{
485 UNIMPLEMENTED();
486 return true;
487}
488
489bool ValidateGetClipPlanef(Context *context, GLenum plane, GLfloat *equation)
490{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700491 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500492}
493
494bool ValidateGetClipPlanex(Context *context, GLenum plane, GLfixed *equation)
495{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700496 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500497}
498
499bool ValidateGetFixedv(Context *context, GLenum pname, GLfixed *params)
500{
501 UNIMPLEMENTED();
502 return true;
503}
504
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700505bool ValidateGetLightfv(Context *context, GLenum light, LightParameter pname, GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500506{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700507 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
508 return ValidateLightCommon(context, light, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500509}
510
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700511bool ValidateGetLightxv(Context *context, GLenum light, LightParameter pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500512{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700513 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
514 return ValidateLightCommon(context, light, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500515}
516
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700517bool ValidateGetMaterialfv(Context *context, GLenum face, MaterialParameter pname, GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500518{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700519 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
520 return ValidateMaterialCommon(context, face, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500521}
522
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700523bool ValidateGetMaterialxv(Context *context, GLenum face, MaterialParameter pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500524{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700525 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
526 return ValidateMaterialCommon(context, face, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500527}
528
529bool ValidateGetPointerv(Context *context, GLenum pname, void **params)
530{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700531 ANGLE_VALIDATE_IS_GLES1(context);
532 switch (pname)
533 {
534 case GL_VERTEX_ARRAY_POINTER:
535 case GL_NORMAL_ARRAY_POINTER:
536 case GL_COLOR_ARRAY_POINTER:
537 case GL_TEXTURE_COORD_ARRAY_POINTER:
538 case GL_POINT_SIZE_ARRAY_POINTER_OES:
539 return true;
540 default:
541 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidPointerQuery);
542 return false;
543 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500544}
545
546bool ValidateGetTexEnvfv(Context *context, GLenum target, GLenum pname, GLfloat *params)
547{
548 UNIMPLEMENTED();
549 return true;
550}
551
552bool ValidateGetTexEnviv(Context *context, GLenum target, GLenum pname, GLint *params)
553{
554 UNIMPLEMENTED();
555 return true;
556}
557
558bool ValidateGetTexEnvxv(Context *context, GLenum target, GLenum pname, GLfixed *params)
559{
560 UNIMPLEMENTED();
561 return true;
562}
563
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800564bool ValidateGetTexParameterxv(Context *context, TextureType target, GLenum pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500565{
566 UNIMPLEMENTED();
567 return true;
568}
569
570bool ValidateLightModelf(Context *context, GLenum pname, GLfloat param)
571{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700572 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500573}
574
575bool ValidateLightModelfv(Context *context, GLenum pname, const GLfloat *params)
576{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700577 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500578}
579
580bool ValidateLightModelx(Context *context, GLenum pname, GLfixed param)
581{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700582 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500583}
584
585bool ValidateLightModelxv(Context *context, GLenum pname, const GLfixed *param)
586{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700587 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500588}
589
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700590bool ValidateLightf(Context *context, GLenum light, LightParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500591{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700592 return ValidateLightSingleComponent(context, light, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500593}
594
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700595bool ValidateLightfv(Context *context, GLenum light, LightParameter pname, const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500596{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700597 return ValidateLightCommon(context, light, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500598}
599
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700600bool ValidateLightx(Context *context, GLenum light, LightParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500601{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700602 return ValidateLightSingleComponent(context, light, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500603}
604
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700605bool ValidateLightxv(Context *context, GLenum light, LightParameter pname, const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500606{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700607 GLfloat paramsf[4];
608 for (unsigned int i = 0; i < GetLightParameterCount(pname); i++)
609 {
610 paramsf[i] = FixedToFloat(params[i]);
611 }
612
613 return ValidateLightCommon(context, light, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500614}
615
616bool ValidateLineWidthx(Context *context, GLfixed width)
617{
618 UNIMPLEMENTED();
619 return true;
620}
621
622bool ValidateLoadIdentity(Context *context)
623{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700624 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500625 return true;
626}
627
628bool ValidateLoadMatrixf(Context *context, const GLfloat *m)
629{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700630 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500631 return true;
632}
633
634bool ValidateLoadMatrixx(Context *context, const GLfixed *m)
635{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700636 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500637 return true;
638}
639
640bool ValidateLogicOp(Context *context, GLenum opcode)
641{
642 UNIMPLEMENTED();
643 return true;
644}
645
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700646bool ValidateMaterialf(Context *context, GLenum face, MaterialParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500647{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700648 return ValidateMaterialSingleComponent(context, face, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500649}
650
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700651bool ValidateMaterialfv(Context *context,
652 GLenum face,
653 MaterialParameter pname,
654 const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500655{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700656 return ValidateMaterialCommon(context, face, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500657}
658
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700659bool ValidateMaterialx(Context *context, GLenum face, MaterialParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500660{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700661 return ValidateMaterialSingleComponent(context, face, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500662}
663
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700664bool ValidateMaterialxv(Context *context,
665 GLenum face,
666 MaterialParameter pname,
667 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500668{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700669 GLfloat paramsf[4];
670
671 for (unsigned int i = 0; i < GetMaterialParameterCount(pname); i++)
672 {
673 paramsf[i] = FixedToFloat(params[i]);
674 }
675
676 return ValidateMaterialCommon(context, face, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500677}
678
Lingfeng Yang00af4632018-04-02 12:42:24 -0700679bool ValidateMatrixMode(Context *context, MatrixType mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500680{
Lingfeng Yangd2488ab2018-04-04 09:25:48 -0700681 ANGLE_VALIDATE_IS_GLES1(context);
682 switch (mode)
683 {
684 case MatrixType::Projection:
685 case MatrixType::Modelview:
686 case MatrixType::Texture:
687 return true;
688 default:
689 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMatrixMode);
690 return false;
691 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500692}
693
694bool ValidateMultMatrixf(Context *context, const GLfloat *m)
695{
Lingfeng Yang568fc392018-04-09 07:57:23 -0700696 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500697 return true;
698}
699
700bool ValidateMultMatrixx(Context *context, const GLfixed *m)
701{
Lingfeng Yang568fc392018-04-09 07:57:23 -0700702 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500703 return true;
704}
705
706bool ValidateMultiTexCoord4f(Context *context,
707 GLenum target,
708 GLfloat s,
709 GLfloat t,
710 GLfloat r,
711 GLfloat q)
712{
Lingfeng Yang038dd532018-03-29 17:31:52 -0700713 ANGLE_VALIDATE_IS_GLES1(context);
714 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500715}
716
717bool ValidateMultiTexCoord4x(Context *context,
Lingfeng Yang038dd532018-03-29 17:31:52 -0700718 GLenum target,
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500719 GLfixed s,
720 GLfixed t,
721 GLfixed r,
722 GLfixed q)
723{
Lingfeng Yang038dd532018-03-29 17:31:52 -0700724 ANGLE_VALIDATE_IS_GLES1(context);
725 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500726}
727
728bool ValidateNormal3f(Context *context, GLfloat nx, GLfloat ny, GLfloat nz)
729{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -0700730 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500731 return true;
732}
733
734bool ValidateNormal3x(Context *context, GLfixed nx, GLfixed ny, GLfixed nz)
735{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -0700736 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500737 return true;
738}
739
740bool ValidateNormalPointer(Context *context, GLenum type, GLsizei stride, const void *pointer)
741{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700742 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Normal, 3, type,
743 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500744}
745
746bool ValidateOrthof(Context *context,
747 GLfloat l,
748 GLfloat r,
749 GLfloat b,
750 GLfloat t,
751 GLfloat n,
752 GLfloat f)
753{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700754 ANGLE_VALIDATE_IS_GLES1(context);
755 if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
756 {
757 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
758 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500759 return true;
760}
761
762bool ValidateOrthox(Context *context,
763 GLfixed l,
764 GLfixed r,
765 GLfixed b,
766 GLfixed t,
767 GLfixed n,
768 GLfixed f)
769{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700770 ANGLE_VALIDATE_IS_GLES1(context);
771 if (l == r || b == t || n == f || n <= 0 || f <= 0)
772 {
773 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
774 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500775 return true;
776}
777
778bool ValidatePointParameterf(Context *context, GLenum pname, GLfloat param)
779{
780 UNIMPLEMENTED();
781 return true;
782}
783
784bool ValidatePointParameterfv(Context *context, GLenum pname, const GLfloat *params)
785{
786 UNIMPLEMENTED();
787 return true;
788}
789
790bool ValidatePointParameterx(Context *context, GLenum pname, GLfixed param)
791{
792 UNIMPLEMENTED();
793 return true;
794}
795
796bool ValidatePointParameterxv(Context *context, GLenum pname, const GLfixed *params)
797{
798 UNIMPLEMENTED();
799 return true;
800}
801
802bool ValidatePointSize(Context *context, GLfloat size)
803{
804 UNIMPLEMENTED();
805 return true;
806}
807
808bool ValidatePointSizex(Context *context, GLfixed size)
809{
810 UNIMPLEMENTED();
811 return true;
812}
813
814bool ValidatePolygonOffsetx(Context *context, GLfixed factor, GLfixed units)
815{
816 UNIMPLEMENTED();
817 return true;
818}
819
820bool ValidatePopMatrix(Context *context)
821{
Lingfeng Yange547aac2018-04-05 09:39:20 -0700822 ANGLE_VALIDATE_IS_GLES1(context);
823 const auto &stack = context->getGLState().gles1().currentMatrixStack();
824 if (stack.size() == 1)
825 {
826 ANGLE_VALIDATION_ERR(context, StackUnderflow(), MatrixStackUnderflow);
827 return false;
828 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500829 return true;
830}
831
832bool ValidatePushMatrix(Context *context)
833{
Lingfeng Yange547aac2018-04-05 09:39:20 -0700834 ANGLE_VALIDATE_IS_GLES1(context);
835 const auto &stack = context->getGLState().gles1().currentMatrixStack();
836 if (stack.size() == stack.max_size())
837 {
838 ANGLE_VALIDATION_ERR(context, StackOverflow(), MatrixStackOverflow);
839 return false;
840 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500841 return true;
842}
843
844bool ValidateRotatef(Context *context, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
845{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700846 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500847 return true;
848}
849
850bool ValidateRotatex(Context *context, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
851{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700852 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500853 return true;
854}
855
856bool ValidateSampleCoveragex(Context *context, GLclampx value, GLboolean invert)
857{
858 UNIMPLEMENTED();
859 return true;
860}
861
862bool ValidateScalef(Context *context, GLfloat x, GLfloat y, GLfloat z)
863{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700864 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500865 return true;
866}
867
868bool ValidateScalex(Context *context, GLfixed x, GLfixed y, GLfixed z)
869{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700870 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500871 return true;
872}
873
Lingfeng Yanga0cfa872018-05-30 21:12:17 -0700874bool ValidateShadeModel(Context *context, ShadingModel mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500875{
Lingfeng Yanga0cfa872018-05-30 21:12:17 -0700876 ANGLE_VALIDATE_IS_GLES1(context);
877 switch (mode)
878 {
879 case ShadingModel::Flat:
880 case ShadingModel::Smooth:
881 return true;
882 default:
883 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidShadingModel);
884 return false;
885 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500886}
887
888bool ValidateTexCoordPointer(Context *context,
889 GLint size,
890 GLenum type,
891 GLsizei stride,
892 const void *pointer)
893{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700894 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::TextureCoord, size,
895 type, stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500896}
897
898bool ValidateTexEnvf(Context *context, GLenum target, GLenum pname, GLfloat param)
899{
900 UNIMPLEMENTED();
901 return true;
902}
903
904bool ValidateTexEnvfv(Context *context, GLenum target, GLenum pname, const GLfloat *params)
905{
906 UNIMPLEMENTED();
907 return true;
908}
909
910bool ValidateTexEnvi(Context *context, GLenum target, GLenum pname, GLint param)
911{
912 UNIMPLEMENTED();
913 return true;
914}
915
916bool ValidateTexEnviv(Context *context, GLenum target, GLenum pname, const GLint *params)
917{
918 UNIMPLEMENTED();
919 return true;
920}
921
922bool ValidateTexEnvx(Context *context, GLenum target, GLenum pname, GLfixed param)
923{
924 UNIMPLEMENTED();
925 return true;
926}
927
928bool ValidateTexEnvxv(Context *context, GLenum target, GLenum pname, const GLfixed *params)
929{
930 UNIMPLEMENTED();
931 return true;
932}
933
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800934bool ValidateTexParameterx(Context *context, TextureType target, GLenum pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500935{
936 UNIMPLEMENTED();
937 return true;
938}
939
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800940bool ValidateTexParameterxv(Context *context,
941 TextureType target,
942 GLenum pname,
943 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500944{
945 UNIMPLEMENTED();
946 return true;
947}
948
949bool ValidateTranslatef(Context *context, GLfloat x, GLfloat y, GLfloat z)
950{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700951 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500952 return true;
953}
954
955bool ValidateTranslatex(Context *context, GLfixed x, GLfixed y, GLfixed z)
956{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700957 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500958 return true;
959}
960
961bool ValidateVertexPointer(Context *context,
962 GLint size,
963 GLenum type,
964 GLsizei stride,
965 const void *pointer)
966{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700967 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Vertex, size, type,
968 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500969}
970
971bool ValidateDrawTexfOES(Context *context,
972 GLfloat x,
973 GLfloat y,
974 GLfloat z,
975 GLfloat width,
976 GLfloat height)
977{
978 UNIMPLEMENTED();
979 return true;
980}
981
982bool ValidateDrawTexfvOES(Context *context, const GLfloat *coords)
983{
984 UNIMPLEMENTED();
985 return true;
986}
987
988bool ValidateDrawTexiOES(Context *context, GLint x, GLint y, GLint z, GLint width, GLint height)
989{
990 UNIMPLEMENTED();
991 return true;
992}
993
994bool ValidateDrawTexivOES(Context *context, const GLint *coords)
995{
996 UNIMPLEMENTED();
997 return true;
998}
999
1000bool ValidateDrawTexsOES(Context *context,
1001 GLshort x,
1002 GLshort y,
1003 GLshort z,
1004 GLshort width,
1005 GLshort height)
1006{
1007 UNIMPLEMENTED();
1008 return true;
1009}
1010
1011bool ValidateDrawTexsvOES(Context *context, const GLshort *coords)
1012{
1013 UNIMPLEMENTED();
1014 return true;
1015}
1016
1017bool ValidateDrawTexxOES(Context *context,
1018 GLfixed x,
1019 GLfixed y,
1020 GLfixed z,
1021 GLfixed width,
1022 GLfixed height)
1023{
1024 UNIMPLEMENTED();
1025 return true;
1026}
1027
1028bool ValidateDrawTexxvOES(Context *context, const GLfixed *coords)
1029{
1030 UNIMPLEMENTED();
1031 return true;
1032}
1033
1034bool ValidateCurrentPaletteMatrixOES(Context *context, GLuint matrixpaletteindex)
1035{
1036 UNIMPLEMENTED();
1037 return true;
1038}
1039
1040bool ValidateLoadPaletteFromModelViewMatrixOES(Context *context)
1041{
1042 UNIMPLEMENTED();
1043 return true;
1044}
1045
1046bool ValidateMatrixIndexPointerOES(Context *context,
1047 GLint size,
1048 GLenum type,
1049 GLsizei stride,
1050 const void *pointer)
1051{
1052 UNIMPLEMENTED();
1053 return true;
1054}
1055
1056bool ValidateWeightPointerOES(Context *context,
1057 GLint size,
1058 GLenum type,
1059 GLsizei stride,
1060 const void *pointer)
1061{
1062 UNIMPLEMENTED();
1063 return true;
1064}
1065
1066bool ValidatePointSizePointerOES(Context *context, GLenum type, GLsizei stride, const void *pointer)
1067{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001068 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::PointSize, 1, type,
1069 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001070}
1071
1072bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent)
1073{
1074 UNIMPLEMENTED();
1075 return true;
1076}
Lingfeng Yanga0648782018-03-12 14:45:25 -07001077
1078bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers)
1079{
1080 UNIMPLEMENTED();
1081 return true;
1082}
1083
1084bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers)
1085{
1086 UNIMPLEMENTED();
1087 return true;
1088}
1089
1090bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers)
1091{
1092 UNIMPLEMENTED();
1093 return true;
1094}
1095
1096bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers)
1097{
1098 UNIMPLEMENTED();
1099 return true;
1100}
1101
1102bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer)
1103{
1104 UNIMPLEMENTED();
1105 return true;
1106}
1107
1108bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer)
1109{
1110 UNIMPLEMENTED();
1111 return true;
1112}
1113
1114bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target)
1115{
1116 UNIMPLEMENTED();
1117 return true;
1118}
1119
1120bool ValidateFramebufferRenderbufferOES(Context *context,
1121 GLenum target,
1122 GLenum attachment,
1123 GLenum rbtarget,
1124 GLuint renderbuffer)
1125{
1126 UNIMPLEMENTED();
1127 return true;
1128}
1129
1130bool ValidateFramebufferTexture2DOES(Context *context,
1131 GLenum target,
1132 GLenum attachment,
1133 TextureTarget textarget,
1134 GLuint texture,
1135 GLint level)
1136{
1137 UNIMPLEMENTED();
1138 return true;
1139}
1140
1141bool ValidateGenerateMipmapOES(Context *context, TextureType target)
1142{
1143 UNIMPLEMENTED();
1144 return true;
1145}
1146
1147bool ValidateGetFramebufferAttachmentParameterivOES(Context *context,
1148 GLenum target,
1149 GLenum attachment,
1150 GLenum pname,
1151 GLint *params)
1152{
1153 UNIMPLEMENTED();
1154 return true;
1155}
1156
1157bool ValidateGetRenderbufferParameterivOES(Context *context,
1158 GLenum target,
1159 GLenum pname,
1160 GLint *params)
1161{
1162 UNIMPLEMENTED();
1163 return true;
1164}
1165
1166bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer)
1167{
1168 UNIMPLEMENTED();
1169 return true;
1170}
1171
1172bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer)
1173{
1174 UNIMPLEMENTED();
1175 return true;
1176}
1177
1178bool ValidateRenderbufferStorageOES(Context *context,
1179 GLenum target,
1180 GLint internalformat,
1181 GLsizei width,
1182 GLsizei height)
1183{
1184 UNIMPLEMENTED();
1185 return true;
1186}
1187
1188// GL_OES_texture_cube_map
1189
1190bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params)
1191{
1192 UNIMPLEMENTED();
1193 return true;
1194}
1195
1196bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params)
1197{
1198 UNIMPLEMENTED();
1199 return true;
1200}
1201
1202bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params)
1203{
1204 UNIMPLEMENTED();
1205 return true;
1206}
1207
1208bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params)
1209{
1210 UNIMPLEMENTED();
1211 return true;
1212}
1213
1214bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1215{
1216 UNIMPLEMENTED();
1217 return true;
1218}
1219
1220bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1221{
1222 UNIMPLEMENTED();
1223 return true;
1224}
1225
1226bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param)
1227{
1228 UNIMPLEMENTED();
1229 return true;
1230}
1231
1232bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param)
1233{
1234 UNIMPLEMENTED();
1235 return true;
1236}
1237
1238bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param)
1239{
1240 UNIMPLEMENTED();
1241 return true;
1242}
Lingfeng Yang01074432018-04-16 10:19:51 -07001243
1244} // namespace gl