blob: f79cb36df2fab1b8008178a8b5f9596432f71f6c [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
Jamie Madill778bf092018-11-14 09:54:36 -05009#include "libANGLE/validationES1_autogen.h"
Geoff Lang2aaa7b42018-01-12 17:17:27 -050010
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"
Lingfeng Yang45b5a872018-06-07 11:33:25 -070015#include "libANGLE/queryconversions.h"
Lingfeng Yangd0febe72018-05-17 22:36:52 -070016#include "libANGLE/queryutils.h"
Lingfeng Yang038dd532018-03-29 17:31:52 -070017#include "libANGLE/validationES.h"
Lingfeng Yang13b708f2018-03-21 12:14:10 -070018
19#define ANGLE_VALIDATE_IS_GLES1(context) \
20 if (context->getClientMajorVersion() > 1) \
21 { \
22 ANGLE_VALIDATION_ERR(context, InvalidOperation(), GLES1Only); \
23 return false; \
24 }
25
Lingfeng Yang01074432018-04-16 10:19:51 -070026namespace gl
Lingfeng Yang13b708f2018-03-21 12:14:10 -070027{
28
Lingfeng Yangabb09f12018-04-16 10:43:53 -070029bool ValidateAlphaFuncCommon(Context *context, AlphaTestFunc func)
Lingfeng Yang13b708f2018-03-21 12:14:10 -070030{
31 switch (func)
32 {
Lingfeng Yangabb09f12018-04-16 10:43:53 -070033 case AlphaTestFunc::AlwaysPass:
34 case AlphaTestFunc::Equal:
35 case AlphaTestFunc::Gequal:
36 case AlphaTestFunc::Greater:
37 case AlphaTestFunc::Lequal:
38 case AlphaTestFunc::Less:
39 case AlphaTestFunc::Never:
40 case AlphaTestFunc::NotEqual:
Lingfeng Yang13b708f2018-03-21 12:14:10 -070041 return true;
42 default:
Lingfeng Yang01074432018-04-16 10:19:51 -070043 ANGLE_VALIDATION_ERR(context, InvalidEnum(), EnumNotSupported);
Lingfeng Yang13b708f2018-03-21 12:14:10 -070044 return false;
45 }
46}
47
Lingfeng Yangabb09f12018-04-16 10:43:53 -070048bool ValidateClientStateCommon(Context *context, ClientVertexArrayType arrayType)
Lingfeng Yang01074432018-04-16 10:19:51 -070049{
50 ANGLE_VALIDATE_IS_GLES1(context);
51 switch (arrayType)
52 {
Lingfeng Yangabb09f12018-04-16 10:43:53 -070053 case ClientVertexArrayType::Vertex:
54 case ClientVertexArrayType::Normal:
55 case ClientVertexArrayType::Color:
56 case ClientVertexArrayType::TextureCoord:
Lingfeng Yang01074432018-04-16 10:19:51 -070057 return true;
Lingfeng Yangabb09f12018-04-16 10:43:53 -070058 case ClientVertexArrayType::PointSize:
Lingfeng Yang01074432018-04-16 10:19:51 -070059 if (!context->getExtensions().pointSizeArray)
60 {
61 ANGLE_VALIDATION_ERR(context, InvalidEnum(), PointSizeArrayExtensionNotEnabled);
62 return false;
63 }
64 return true;
65 default:
66 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidClientState);
67 return false;
68 }
69}
70
Lingfeng Yangabb09f12018-04-16 10:43:53 -070071bool ValidateBuiltinVertexAttributeCommon(Context *context,
72 ClientVertexArrayType arrayType,
73 GLint size,
74 GLenum type,
75 GLsizei stride,
76 const void *pointer)
77{
78 ANGLE_VALIDATE_IS_GLES1(context);
79
80 if (stride < 0)
81 {
82 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidVertexPointerStride);
83 return false;
84 }
85
86 int minSize = 1;
87 int maxSize = 4;
88
89 switch (arrayType)
90 {
91 case ClientVertexArrayType::Vertex:
92 case ClientVertexArrayType::TextureCoord:
93 minSize = 2;
94 maxSize = 4;
95 break;
96 case ClientVertexArrayType::Normal:
97 minSize = 3;
98 maxSize = 3;
99 break;
100 case ClientVertexArrayType::Color:
101 minSize = 4;
102 maxSize = 4;
103 break;
104 case ClientVertexArrayType::PointSize:
105 if (!context->getExtensions().pointSizeArray)
106 {
107 ANGLE_VALIDATION_ERR(context, InvalidEnum(), PointSizeArrayExtensionNotEnabled);
108 return false;
109 }
110
111 minSize = 1;
112 maxSize = 1;
113 break;
114 default:
115 UNREACHABLE();
116 return false;
117 }
118
119 if (size < minSize || size > maxSize)
120 {
121 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidVertexPointerSize);
122 return false;
123 }
124
125 switch (type)
126 {
127 case GL_BYTE:
128 if (arrayType == ClientVertexArrayType::PointSize)
129 {
130 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType);
131 return false;
132 }
133 break;
134 case GL_SHORT:
135 if (arrayType == ClientVertexArrayType::PointSize ||
136 arrayType == ClientVertexArrayType::Color)
137 {
138 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType);
139 return false;
140 }
141 break;
142 case GL_FIXED:
143 case GL_FLOAT:
144 break;
145 default:
146 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType);
147 return false;
148 }
149
150 return true;
151}
152
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700153bool ValidateLightCaps(Context *context, GLenum light)
154{
155 if (light < GL_LIGHT0 || light >= GL_LIGHT0 + context->getCaps().maxLights)
156 {
157 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLight);
158 return false;
159 }
160
161 return true;
162}
163
164bool ValidateLightCommon(Context *context,
165 GLenum light,
166 LightParameter pname,
167 const GLfloat *params)
168{
169
170 ANGLE_VALIDATE_IS_GLES1(context);
171
172 if (!ValidateLightCaps(context, light))
173 {
174 return false;
175 }
176
177 switch (pname)
178 {
179 case LightParameter::Ambient:
180 case LightParameter::Diffuse:
181 case LightParameter::Specular:
182 case LightParameter::Position:
183 case LightParameter::SpotDirection:
184 return true;
185 case LightParameter::SpotExponent:
186 if (params[0] < 0.0f || params[0] > 128.0f)
187 {
188 ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange);
189 return false;
190 }
191 return true;
192 case LightParameter::SpotCutoff:
193 if (params[0] == 180.0f)
194 {
195 return true;
196 }
197 if (params[0] < 0.0f || params[0] > 90.0f)
198 {
199 ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange);
200 return false;
201 }
202 return true;
203 case LightParameter::ConstantAttenuation:
204 case LightParameter::LinearAttenuation:
205 case LightParameter::QuadraticAttenuation:
206 if (params[0] < 0.0f)
207 {
208 ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange);
209 return false;
210 }
211 return true;
212 default:
213 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightParameter);
214 return false;
215 }
216}
217
218bool ValidateLightSingleComponent(Context *context,
219 GLenum light,
220 LightParameter pname,
221 GLfloat param)
222{
223 if (!ValidateLightCommon(context, light, pname, &param))
224 {
225 return false;
226 }
227
228 if (GetLightParameterCount(pname) > 1)
229 {
230 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightParameter);
231 return false;
232 }
233
234 return true;
235}
236
237bool ValidateMaterialCommon(Context *context,
238 GLenum face,
239 MaterialParameter pname,
240 const GLfloat *params)
241{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700242 switch (pname)
243 {
244 case MaterialParameter::Ambient:
245 case MaterialParameter::Diffuse:
246 case MaterialParameter::Specular:
247 case MaterialParameter::Emission:
248 return true;
249 case MaterialParameter::Shininess:
250 if (params[0] < 0.0f || params[0] > 128.0f)
251 {
252 ANGLE_VALIDATION_ERR(context, InvalidValue(), MaterialParameterOutOfRange);
253 return false;
254 }
255 return true;
256 default:
257 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialParameter);
258 return false;
259 }
260}
261
Lingfeng Yang6e5bf362018-08-15 09:53:17 -0700262bool ValidateMaterialSetting(Context *context,
263 GLenum face,
264 MaterialParameter pname,
265 const GLfloat *params)
266{
267 ANGLE_VALIDATE_IS_GLES1(context);
268
269 if (face != GL_FRONT_AND_BACK)
270 {
271 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialFace);
272 return false;
273 }
274
275 return ValidateMaterialCommon(context, face, pname, params);
276}
277
278bool ValidateMaterialQuery(Context *context, GLenum face, MaterialParameter pname)
279{
280 ANGLE_VALIDATE_IS_GLES1(context);
281
282 if (face != GL_FRONT && face != GL_BACK)
283 {
284 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialFace);
285 return false;
286 }
287
288 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
289
290 return ValidateMaterialCommon(context, face, pname, dummyParams);
291}
292
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700293bool ValidateMaterialSingleComponent(Context *context,
294 GLenum face,
295 MaterialParameter pname,
296 GLfloat param)
297{
Lingfeng Yang6e5bf362018-08-15 09:53:17 -0700298 if (!ValidateMaterialSetting(context, face, pname, &param))
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700299 {
300 return false;
301 }
302
303 if (GetMaterialParameterCount(pname) > 1)
304 {
305 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialParameter);
306 return false;
307 }
308
309 return true;
310}
311
312bool ValidateLightModelCommon(Context *context, GLenum pname)
313{
314 ANGLE_VALIDATE_IS_GLES1(context);
315 switch (pname)
316 {
317 case GL_LIGHT_MODEL_AMBIENT:
318 case GL_LIGHT_MODEL_TWO_SIDE:
319 return true;
320 default:
321 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightModelParameter);
322 return false;
323 }
324}
325
326bool ValidateLightModelSingleComponent(Context *context, GLenum pname)
327{
328 if (!ValidateLightModelCommon(context, pname))
329 {
330 return false;
331 }
332
333 switch (pname)
334 {
335 case GL_LIGHT_MODEL_TWO_SIDE:
336 return true;
337 default:
338 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightModelParameter);
339 return false;
340 }
341}
342
Lingfeng Yang060088a2018-05-30 20:40:57 -0700343bool ValidateClipPlaneCommon(Context *context, GLenum plane)
344{
345 ANGLE_VALIDATE_IS_GLES1(context);
346
347 if (plane < GL_CLIP_PLANE0 || plane >= GL_CLIP_PLANE0 + context->getCaps().maxClipPlanes)
348 {
349 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidClipPlane);
350 return false;
351 }
352
353 return true;
354}
355
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700356bool ValidateFogCommon(Context *context, GLenum pname, const GLfloat *params)
357{
358 ANGLE_VALIDATE_IS_GLES1(context);
359
360 switch (pname)
361 {
362 case GL_FOG_MODE:
363 {
364 GLenum modeParam = static_cast<GLenum>(params[0]);
365 switch (modeParam)
366 {
367 case GL_EXP:
368 case GL_EXP2:
369 case GL_LINEAR:
370 return true;
371 default:
372 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidFogMode);
373 return false;
374 }
375 }
376 break;
377 case GL_FOG_START:
378 case GL_FOG_END:
379 case GL_FOG_COLOR:
380 break;
381 case GL_FOG_DENSITY:
382 if (params[0] < 0.0f)
383 {
384 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidFogDensity);
385 return false;
386 }
387 break;
388 default:
389 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidFogParameter);
390 return false;
391 }
392 return true;
393}
394
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700395bool ValidateTexEnvCommon(Context *context,
396 TextureEnvTarget target,
397 TextureEnvParameter pname,
398 const GLfloat *params)
399{
400 ANGLE_VALIDATE_IS_GLES1(context);
401
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700402 switch (target)
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700403 {
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700404 case TextureEnvTarget::Env:
405 switch (pname)
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700406 {
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700407 case TextureEnvParameter::Mode:
408 {
409 TextureEnvMode mode = FromGLenum<TextureEnvMode>(ConvertToGLenum(params[0]));
410 switch (mode)
Lingfeng Yang4004ae02018-06-13 09:29:00 -0700411 {
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700412 case TextureEnvMode::Add:
413 case TextureEnvMode::Blend:
414 case TextureEnvMode::Combine:
415 case TextureEnvMode::Decal:
416 case TextureEnvMode::Modulate:
417 case TextureEnvMode::Replace:
418 break;
419 default:
420 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidTextureEnvMode);
421 return false;
422 }
423 break;
424 }
425 case TextureEnvParameter::CombineRgb:
426 case TextureEnvParameter::CombineAlpha:
427 {
428 TextureCombine combine = FromGLenum<TextureCombine>(ConvertToGLenum(params[0]));
429 switch (combine)
430 {
431 case TextureCombine::Add:
432 case TextureCombine::AddSigned:
433 case TextureCombine::Interpolate:
434 case TextureCombine::Modulate:
435 case TextureCombine::Replace:
436 case TextureCombine::Subtract:
437 break;
438 case TextureCombine::Dot3Rgb:
439 case TextureCombine::Dot3Rgba:
440 if (pname == TextureEnvParameter::CombineAlpha)
441 {
442 ANGLE_VALIDATION_ERR(context, InvalidValue(),
443 InvalidTextureCombine);
444 return false;
445 }
446 break;
447 default:
448 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidTextureCombine);
449 return false;
450 }
451 break;
452 }
453 case TextureEnvParameter::Src0Rgb:
454 case TextureEnvParameter::Src1Rgb:
455 case TextureEnvParameter::Src2Rgb:
456 case TextureEnvParameter::Src0Alpha:
457 case TextureEnvParameter::Src1Alpha:
458 case TextureEnvParameter::Src2Alpha:
459 {
460 TextureSrc combine = FromGLenum<TextureSrc>(ConvertToGLenum(params[0]));
461 switch (combine)
462 {
463 case TextureSrc::Constant:
464 case TextureSrc::Previous:
465 case TextureSrc::PrimaryColor:
466 case TextureSrc::Texture:
467 break;
468 default:
469 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidTextureCombineSrc);
470 return false;
471 }
472 break;
473 }
474 case TextureEnvParameter::Op0Rgb:
475 case TextureEnvParameter::Op1Rgb:
476 case TextureEnvParameter::Op2Rgb:
477 case TextureEnvParameter::Op0Alpha:
478 case TextureEnvParameter::Op1Alpha:
479 case TextureEnvParameter::Op2Alpha:
480 {
481 TextureOp operand = FromGLenum<TextureOp>(ConvertToGLenum(params[0]));
482 switch (operand)
483 {
484 case TextureOp::SrcAlpha:
485 case TextureOp::OneMinusSrcAlpha:
486 break;
487 case TextureOp::SrcColor:
488 case TextureOp::OneMinusSrcColor:
489 if (pname == TextureEnvParameter::Op0Alpha ||
490 pname == TextureEnvParameter::Op1Alpha ||
491 pname == TextureEnvParameter::Op2Alpha)
492 {
493 ANGLE_VALIDATION_ERR(context, InvalidValue(),
494 InvalidTextureCombine);
495 return false;
496 }
497 break;
498 default:
499 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidTextureCombineOp);
500 return false;
501 }
502 break;
503 }
504 case TextureEnvParameter::RgbScale:
505 case TextureEnvParameter::AlphaScale:
506 if (params[0] != 1.0f && params[0] != 2.0f && params[0] != 4.0f)
507 {
508 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidTextureEnvScale);
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700509 return false;
510 }
511 break;
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700512 case TextureEnvParameter::Color:
513 break;
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700514 default:
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700515 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidTextureEnvParameter);
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700516 return false;
517 }
518 break;
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700519 case TextureEnvTarget::PointSprite:
520 if (!context->getExtensions().pointSprite)
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700521 {
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700522 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidTextureEnvTarget);
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700523 return false;
524 }
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700525 switch (pname)
526 {
527 case TextureEnvParameter::PointCoordReplace:
528 break;
529 default:
530 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidTextureEnvParameter);
531 return false;
532 }
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700533 break;
534 default:
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700535 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidTextureEnvTarget);
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700536 return false;
537 }
538 return true;
539}
540
541bool ValidateGetTexEnvCommon(Context *context, TextureEnvTarget target, TextureEnvParameter pname)
542{
543 GLfloat dummy[4] = {};
544 switch (pname)
545 {
546 case TextureEnvParameter::Mode:
547 ConvertPackedEnum(TextureEnvMode::Add, dummy);
548 break;
549 case TextureEnvParameter::CombineRgb:
550 case TextureEnvParameter::CombineAlpha:
551 ConvertPackedEnum(TextureCombine::Add, dummy);
552 break;
553 case TextureEnvParameter::Src0Rgb:
554 case TextureEnvParameter::Src1Rgb:
555 case TextureEnvParameter::Src2Rgb:
556 case TextureEnvParameter::Src0Alpha:
557 case TextureEnvParameter::Src1Alpha:
558 case TextureEnvParameter::Src2Alpha:
559 ConvertPackedEnum(TextureSrc::Constant, dummy);
560 break;
561 case TextureEnvParameter::Op0Rgb:
562 case TextureEnvParameter::Op1Rgb:
563 case TextureEnvParameter::Op2Rgb:
564 case TextureEnvParameter::Op0Alpha:
565 case TextureEnvParameter::Op1Alpha:
566 case TextureEnvParameter::Op2Alpha:
567 ConvertPackedEnum(TextureOp::SrcAlpha, dummy);
568 break;
569 case TextureEnvParameter::RgbScale:
570 case TextureEnvParameter::AlphaScale:
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700571 case TextureEnvParameter::PointCoordReplace:
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700572 dummy[0] = 1.0f;
573 break;
574 default:
575 break;
576 }
577
578 return ValidateTexEnvCommon(context, target, pname, dummy);
579}
580
Lingfeng Yang9c4c0922018-06-13 09:29:00 -0700581bool ValidatePointParameterCommon(Context *context, PointParameter pname, const GLfloat *params)
582{
583 ANGLE_VALIDATE_IS_GLES1(context);
584
585 switch (pname)
586 {
587 case PointParameter::PointSizeMin:
588 case PointParameter::PointSizeMax:
589 case PointParameter::PointFadeThresholdSize:
590 case PointParameter::PointDistanceAttenuation:
591 for (unsigned int i = 0; i < GetPointParameterCount(pname); i++)
592 {
593 if (params[i] < 0.0f)
594 {
595 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidPointParameterValue);
596 return false;
597 }
598 }
599 break;
600 default:
601 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidPointParameter);
602 return false;
603 }
604
605 return true;
606}
607
608bool ValidatePointSizeCommon(Context *context, GLfloat size)
609{
610 ANGLE_VALIDATE_IS_GLES1(context);
611
612 if (size <= 0.0f)
613 {
614 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidPointSizeValue);
615 return false;
616 }
617
618 return true;
619}
620
Lingfeng Yang0df813c2018-07-12 12:52:06 -0700621bool ValidateDrawTexCommon(Context *context, float width, float height)
622{
623 ANGLE_VALIDATE_IS_GLES1(context);
624
625 if (width <= 0.0f || height <= 0.0f)
626 {
627 ANGLE_VALIDATION_ERR(context, InvalidValue(), NonPositiveDrawTextureDimension);
628 return false;
629 }
630
631 return true;
632}
633
Lingfeng Yang01074432018-04-16 10:19:51 -0700634} // namespace gl
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500635
636namespace gl
637{
638
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700639bool ValidateAlphaFunc(Context *context, AlphaTestFunc func, GLfloat ref)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500640{
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700641 ANGLE_VALIDATE_IS_GLES1(context);
642 return ValidateAlphaFuncCommon(context, func);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500643}
644
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700645bool ValidateAlphaFuncx(Context *context, AlphaTestFunc func, GLfixed ref)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500646{
Lingfeng Yang13b708f2018-03-21 12:14:10 -0700647 ANGLE_VALIDATE_IS_GLES1(context);
648 return ValidateAlphaFuncCommon(context, func);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500649}
650
651bool ValidateClearColorx(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
652{
653 UNIMPLEMENTED();
654 return true;
655}
656
657bool ValidateClearDepthx(Context *context, GLfixed depth)
658{
659 UNIMPLEMENTED();
660 return true;
661}
662
663bool ValidateClientActiveTexture(Context *context, GLenum texture)
664{
Lingfeng Yang96310cd2018-03-28 11:56:28 -0700665 ANGLE_VALIDATE_IS_GLES1(context);
Lingfeng Yang038dd532018-03-29 17:31:52 -0700666 return ValidateMultitextureUnit(context, texture);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500667}
668
Lingfeng Yang060088a2018-05-30 20:40:57 -0700669bool ValidateClipPlanef(Context *context, GLenum plane, const GLfloat *eqn)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500670{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700671 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500672}
673
674bool ValidateClipPlanex(Context *context, GLenum plane, const GLfixed *equation)
675{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700676 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500677}
678
679bool ValidateColor4f(Context *context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
680{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700681 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500682 return true;
683}
684
685bool ValidateColor4ub(Context *context, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
686{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700687 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500688 return true;
689}
690
691bool ValidateColor4x(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
692{
Lingfeng Yanga43994c2018-03-29 07:21:41 -0700693 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500694 return true;
695}
696
697bool ValidateColorPointer(Context *context,
698 GLint size,
699 GLenum type,
700 GLsizei stride,
701 const void *pointer)
702{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700703 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Color, size, type,
704 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500705}
706
707bool ValidateCullFace(Context *context, GLenum mode)
708{
709 UNIMPLEMENTED();
710 return true;
711}
712
713bool ValidateDepthRangex(Context *context, GLfixed n, GLfixed f)
714{
715 UNIMPLEMENTED();
716 return true;
717}
718
Lingfeng Yang01074432018-04-16 10:19:51 -0700719bool ValidateDisableClientState(Context *context, ClientVertexArrayType arrayType)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500720{
Lingfeng Yang01074432018-04-16 10:19:51 -0700721 return ValidateClientStateCommon(context, arrayType);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500722}
723
Lingfeng Yang01074432018-04-16 10:19:51 -0700724bool ValidateEnableClientState(Context *context, ClientVertexArrayType arrayType)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500725{
Lingfeng Yang01074432018-04-16 10:19:51 -0700726 return ValidateClientStateCommon(context, arrayType);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500727}
728
729bool ValidateFogf(Context *context, GLenum pname, GLfloat param)
730{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700731 return ValidateFogCommon(context, pname, &param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500732}
733
734bool ValidateFogfv(Context *context, GLenum pname, const GLfloat *params)
735{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700736 return ValidateFogCommon(context, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500737}
738
739bool ValidateFogx(Context *context, GLenum pname, GLfixed param)
740{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700741 GLfloat asFloat = FixedToFloat(param);
742 return ValidateFogCommon(context, pname, &asFloat);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500743}
744
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700745bool ValidateFogxv(Context *context, GLenum pname, const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500746{
Lingfeng Yang7ba3f422018-06-01 09:43:04 -0700747 unsigned int paramCount = GetFogParameterCount(pname);
748 GLfloat paramsf[4] = {};
749
750 for (unsigned int i = 0; i < paramCount; i++)
751 {
752 paramsf[i] = FixedToFloat(params[i]);
753 }
754
755 return ValidateFogCommon(context, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500756}
757
758bool ValidateFrustumf(Context *context,
759 GLfloat l,
760 GLfloat r,
761 GLfloat b,
762 GLfloat t,
763 GLfloat n,
764 GLfloat f)
765{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700766 ANGLE_VALIDATE_IS_GLES1(context);
767 if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
768 {
769 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
770 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500771 return true;
772}
773
774bool ValidateFrustumx(Context *context,
775 GLfixed l,
776 GLfixed r,
777 GLfixed b,
778 GLfixed t,
779 GLfixed n,
780 GLfixed f)
781{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -0700782 ANGLE_VALIDATE_IS_GLES1(context);
783 if (l == r || b == t || n == f || n <= 0 || f <= 0)
784 {
785 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
786 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500787 return true;
788}
789
790bool ValidateGetBufferParameteriv(Context *context, GLenum target, GLenum pname, GLint *params)
791{
792 UNIMPLEMENTED();
793 return true;
794}
795
796bool ValidateGetClipPlanef(Context *context, GLenum plane, GLfloat *equation)
797{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700798 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500799}
800
801bool ValidateGetClipPlanex(Context *context, GLenum plane, GLfixed *equation)
802{
Lingfeng Yang060088a2018-05-30 20:40:57 -0700803 return ValidateClipPlaneCommon(context, plane);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500804}
805
806bool ValidateGetFixedv(Context *context, GLenum pname, GLfixed *params)
807{
808 UNIMPLEMENTED();
809 return true;
810}
811
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700812bool ValidateGetLightfv(Context *context, GLenum light, LightParameter pname, GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500813{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700814 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
815 return ValidateLightCommon(context, light, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500816}
817
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700818bool ValidateGetLightxv(Context *context, GLenum light, LightParameter pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500819{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700820 GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f};
821 return ValidateLightCommon(context, light, pname, dummyParams);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500822}
823
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700824bool ValidateGetMaterialfv(Context *context, GLenum face, MaterialParameter pname, GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500825{
Lingfeng Yang6e5bf362018-08-15 09:53:17 -0700826 return ValidateMaterialQuery(context, face, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500827}
828
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700829bool ValidateGetMaterialxv(Context *context, GLenum face, MaterialParameter pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500830{
Lingfeng Yang6e5bf362018-08-15 09:53:17 -0700831 return ValidateMaterialQuery(context, face, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500832}
833
834bool ValidateGetPointerv(Context *context, GLenum pname, void **params)
835{
Lingfeng Yangabb09f12018-04-16 10:43:53 -0700836 ANGLE_VALIDATE_IS_GLES1(context);
837 switch (pname)
838 {
839 case GL_VERTEX_ARRAY_POINTER:
840 case GL_NORMAL_ARRAY_POINTER:
841 case GL_COLOR_ARRAY_POINTER:
842 case GL_TEXTURE_COORD_ARRAY_POINTER:
843 case GL_POINT_SIZE_ARRAY_POINTER_OES:
844 return true;
845 default:
846 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidPointerQuery);
847 return false;
848 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500849}
850
Lingfeng Yang74be2962018-06-07 09:13:38 -0700851bool ValidateGetTexEnvfv(Context *context,
852 TextureEnvTarget target,
853 TextureEnvParameter pname,
854 GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500855{
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700856 return ValidateGetTexEnvCommon(context, target, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500857}
858
Lingfeng Yang74be2962018-06-07 09:13:38 -0700859bool ValidateGetTexEnviv(Context *context,
860 TextureEnvTarget target,
861 TextureEnvParameter pname,
862 GLint *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500863{
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700864 return ValidateGetTexEnvCommon(context, target, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500865}
866
Lingfeng Yang74be2962018-06-07 09:13:38 -0700867bool ValidateGetTexEnvxv(Context *context,
868 TextureEnvTarget target,
869 TextureEnvParameter pname,
870 GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500871{
Lingfeng Yang45b5a872018-06-07 11:33:25 -0700872 return ValidateGetTexEnvCommon(context, target, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500873}
874
Corentin Wallezf0e89be2017-11-08 14:00:32 -0800875bool ValidateGetTexParameterxv(Context *context, TextureType target, GLenum pname, GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500876{
Lingfeng Yangf97641c2018-06-21 19:22:45 -0700877 ANGLE_VALIDATE_IS_GLES1(context);
878
879 if (!ValidateGetTexParameterBase(context, target, pname, nullptr))
880 {
881 return false;
882 }
883
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500884 return true;
885}
886
887bool ValidateLightModelf(Context *context, GLenum pname, GLfloat param)
888{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700889 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500890}
891
892bool ValidateLightModelfv(Context *context, GLenum pname, const GLfloat *params)
893{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700894 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500895}
896
897bool ValidateLightModelx(Context *context, GLenum pname, GLfixed param)
898{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700899 return ValidateLightModelSingleComponent(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500900}
901
902bool ValidateLightModelxv(Context *context, GLenum pname, const GLfixed *param)
903{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700904 return ValidateLightModelCommon(context, pname);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500905}
906
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700907bool ValidateLightf(Context *context, GLenum light, LightParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500908{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700909 return ValidateLightSingleComponent(context, light, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500910}
911
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700912bool ValidateLightfv(Context *context, GLenum light, LightParameter pname, const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500913{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700914 return ValidateLightCommon(context, light, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500915}
916
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700917bool ValidateLightx(Context *context, GLenum light, LightParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500918{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700919 return ValidateLightSingleComponent(context, light, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500920}
921
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700922bool ValidateLightxv(Context *context, GLenum light, LightParameter pname, const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500923{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700924 GLfloat paramsf[4];
925 for (unsigned int i = 0; i < GetLightParameterCount(pname); i++)
926 {
927 paramsf[i] = FixedToFloat(params[i]);
928 }
929
930 return ValidateLightCommon(context, light, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500931}
932
933bool ValidateLineWidthx(Context *context, GLfixed width)
934{
935 UNIMPLEMENTED();
936 return true;
937}
938
939bool ValidateLoadIdentity(Context *context)
940{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700941 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500942 return true;
943}
944
945bool ValidateLoadMatrixf(Context *context, const GLfloat *m)
946{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700947 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500948 return true;
949}
950
951bool ValidateLoadMatrixx(Context *context, const GLfixed *m)
952{
Lingfeng Yang3a41af62018-04-09 07:28:56 -0700953 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500954 return true;
955}
956
Lingfeng Yang6e5bf362018-08-15 09:53:17 -0700957bool ValidateLogicOp(Context *context, LogicalOperation opcode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500958{
Lingfeng Yang6e5bf362018-08-15 09:53:17 -0700959 ANGLE_VALIDATE_IS_GLES1(context);
960 switch (opcode)
961 {
962 case LogicalOperation::And:
963 case LogicalOperation::AndInverted:
964 case LogicalOperation::AndReverse:
965 case LogicalOperation::Clear:
966 case LogicalOperation::Copy:
967 case LogicalOperation::CopyInverted:
968 case LogicalOperation::Equiv:
969 case LogicalOperation::Invert:
970 case LogicalOperation::Nand:
971 case LogicalOperation::Noop:
972 case LogicalOperation::Nor:
973 case LogicalOperation::Or:
974 case LogicalOperation::OrInverted:
975 case LogicalOperation::OrReverse:
976 case LogicalOperation::Set:
977 case LogicalOperation::Xor:
978 return true;
979 default:
980 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLogicOp);
981 return false;
982 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500983}
984
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700985bool ValidateMaterialf(Context *context, GLenum face, MaterialParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500986{
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700987 return ValidateMaterialSingleComponent(context, face, pname, param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500988}
989
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700990bool ValidateMaterialfv(Context *context,
991 GLenum face,
992 MaterialParameter pname,
993 const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500994{
Lingfeng Yang6e5bf362018-08-15 09:53:17 -0700995 return ValidateMaterialSetting(context, face, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500996}
997
Lingfeng Yangd0febe72018-05-17 22:36:52 -0700998bool ValidateMaterialx(Context *context, GLenum face, MaterialParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -0500999{
Lingfeng Yangd0febe72018-05-17 22:36:52 -07001000 return ValidateMaterialSingleComponent(context, face, pname, FixedToFloat(param));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001001}
1002
Lingfeng Yangd0febe72018-05-17 22:36:52 -07001003bool ValidateMaterialxv(Context *context,
1004 GLenum face,
1005 MaterialParameter pname,
1006 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001007{
Lingfeng Yangd0febe72018-05-17 22:36:52 -07001008 GLfloat paramsf[4];
1009
1010 for (unsigned int i = 0; i < GetMaterialParameterCount(pname); i++)
1011 {
1012 paramsf[i] = FixedToFloat(params[i]);
1013 }
1014
Lingfeng Yang6e5bf362018-08-15 09:53:17 -07001015 return ValidateMaterialSetting(context, face, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001016}
1017
Lingfeng Yang00af4632018-04-02 12:42:24 -07001018bool ValidateMatrixMode(Context *context, MatrixType mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001019{
Lingfeng Yangd2488ab2018-04-04 09:25:48 -07001020 ANGLE_VALIDATE_IS_GLES1(context);
1021 switch (mode)
1022 {
1023 case MatrixType::Projection:
1024 case MatrixType::Modelview:
1025 case MatrixType::Texture:
1026 return true;
1027 default:
1028 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMatrixMode);
1029 return false;
1030 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001031}
1032
1033bool ValidateMultMatrixf(Context *context, const GLfloat *m)
1034{
Lingfeng Yang568fc392018-04-09 07:57:23 -07001035 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001036 return true;
1037}
1038
1039bool ValidateMultMatrixx(Context *context, const GLfixed *m)
1040{
Lingfeng Yang568fc392018-04-09 07:57:23 -07001041 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001042 return true;
1043}
1044
1045bool ValidateMultiTexCoord4f(Context *context,
1046 GLenum target,
1047 GLfloat s,
1048 GLfloat t,
1049 GLfloat r,
1050 GLfloat q)
1051{
Lingfeng Yang038dd532018-03-29 17:31:52 -07001052 ANGLE_VALIDATE_IS_GLES1(context);
1053 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001054}
1055
1056bool ValidateMultiTexCoord4x(Context *context,
Lingfeng Yang038dd532018-03-29 17:31:52 -07001057 GLenum target,
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001058 GLfixed s,
1059 GLfixed t,
1060 GLfixed r,
1061 GLfixed q)
1062{
Lingfeng Yang038dd532018-03-29 17:31:52 -07001063 ANGLE_VALIDATE_IS_GLES1(context);
1064 return ValidateMultitextureUnit(context, target);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001065}
1066
1067bool ValidateNormal3f(Context *context, GLfloat nx, GLfloat ny, GLfloat nz)
1068{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -07001069 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001070 return true;
1071}
1072
1073bool ValidateNormal3x(Context *context, GLfixed nx, GLfixed ny, GLfixed nz)
1074{
Lingfeng Yang5a7e61b2018-03-29 16:50:32 -07001075 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001076 return true;
1077}
1078
1079bool ValidateNormalPointer(Context *context, GLenum type, GLsizei stride, const void *pointer)
1080{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001081 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Normal, 3, type,
1082 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001083}
1084
1085bool ValidateOrthof(Context *context,
1086 GLfloat l,
1087 GLfloat r,
1088 GLfloat b,
1089 GLfloat t,
1090 GLfloat n,
1091 GLfloat f)
1092{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001093 ANGLE_VALIDATE_IS_GLES1(context);
1094 if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
1095 {
1096 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
1097 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001098 return true;
1099}
1100
1101bool ValidateOrthox(Context *context,
1102 GLfixed l,
1103 GLfixed r,
1104 GLfixed b,
1105 GLfixed t,
1106 GLfixed n,
1107 GLfixed f)
1108{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001109 ANGLE_VALIDATE_IS_GLES1(context);
1110 if (l == r || b == t || n == f || n <= 0 || f <= 0)
1111 {
1112 ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
1113 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001114 return true;
1115}
1116
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001117bool ValidatePointParameterf(Context *context, PointParameter pname, GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001118{
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001119 unsigned int paramCount = GetPointParameterCount(pname);
1120 if (paramCount != 1)
1121 {
1122 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidPointParameter);
1123 return false;
1124 }
1125
1126 return ValidatePointParameterCommon(context, pname, &param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001127}
1128
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001129bool ValidatePointParameterfv(Context *context, PointParameter pname, const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001130{
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001131 return ValidatePointParameterCommon(context, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001132}
1133
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001134bool ValidatePointParameterx(Context *context, PointParameter pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001135{
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001136 unsigned int paramCount = GetPointParameterCount(pname);
1137 if (paramCount != 1)
1138 {
1139 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidPointParameter);
1140 return false;
1141 }
1142
1143 GLfloat paramf = FixedToFloat(param);
1144 return ValidatePointParameterCommon(context, pname, &paramf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001145}
1146
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001147bool ValidatePointParameterxv(Context *context, PointParameter pname, const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001148{
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001149 GLfloat paramsf[4] = {};
1150 for (unsigned int i = 0; i < GetPointParameterCount(pname); i++)
1151 {
1152 paramsf[i] = FixedToFloat(params[i]);
1153 }
1154 return ValidatePointParameterCommon(context, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001155}
1156
1157bool ValidatePointSize(Context *context, GLfloat size)
1158{
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001159 return ValidatePointSizeCommon(context, size);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001160}
1161
1162bool ValidatePointSizex(Context *context, GLfixed size)
1163{
Lingfeng Yang9c4c0922018-06-13 09:29:00 -07001164 return ValidatePointSizeCommon(context, FixedToFloat(size));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001165}
1166
1167bool ValidatePolygonOffsetx(Context *context, GLfixed factor, GLfixed units)
1168{
1169 UNIMPLEMENTED();
1170 return true;
1171}
1172
1173bool ValidatePopMatrix(Context *context)
1174{
Lingfeng Yange547aac2018-04-05 09:39:20 -07001175 ANGLE_VALIDATE_IS_GLES1(context);
1176 const auto &stack = context->getGLState().gles1().currentMatrixStack();
1177 if (stack.size() == 1)
1178 {
1179 ANGLE_VALIDATION_ERR(context, StackUnderflow(), MatrixStackUnderflow);
1180 return false;
1181 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001182 return true;
1183}
1184
1185bool ValidatePushMatrix(Context *context)
1186{
Lingfeng Yange547aac2018-04-05 09:39:20 -07001187 ANGLE_VALIDATE_IS_GLES1(context);
1188 const auto &stack = context->getGLState().gles1().currentMatrixStack();
1189 if (stack.size() == stack.max_size())
1190 {
1191 ANGLE_VALIDATION_ERR(context, StackOverflow(), MatrixStackOverflow);
1192 return false;
1193 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001194 return true;
1195}
1196
1197bool ValidateRotatef(Context *context, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
1198{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001199 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001200 return true;
1201}
1202
1203bool ValidateRotatex(Context *context, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
1204{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001205 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001206 return true;
1207}
1208
1209bool ValidateSampleCoveragex(Context *context, GLclampx value, GLboolean invert)
1210{
1211 UNIMPLEMENTED();
1212 return true;
1213}
1214
1215bool ValidateScalef(Context *context, GLfloat x, GLfloat y, GLfloat z)
1216{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001217 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001218 return true;
1219}
1220
1221bool ValidateScalex(Context *context, GLfixed x, GLfixed y, GLfixed z)
1222{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001223 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001224 return true;
1225}
1226
Lingfeng Yanga0cfa872018-05-30 21:12:17 -07001227bool ValidateShadeModel(Context *context, ShadingModel mode)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001228{
Lingfeng Yanga0cfa872018-05-30 21:12:17 -07001229 ANGLE_VALIDATE_IS_GLES1(context);
1230 switch (mode)
1231 {
1232 case ShadingModel::Flat:
1233 case ShadingModel::Smooth:
1234 return true;
1235 default:
1236 ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidShadingModel);
1237 return false;
1238 }
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001239}
1240
1241bool ValidateTexCoordPointer(Context *context,
1242 GLint size,
1243 GLenum type,
1244 GLsizei stride,
1245 const void *pointer)
1246{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001247 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::TextureCoord, size,
1248 type, stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001249}
1250
Lingfeng Yang74be2962018-06-07 09:13:38 -07001251bool ValidateTexEnvf(Context *context,
1252 TextureEnvTarget target,
1253 TextureEnvParameter pname,
1254 GLfloat param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001255{
Lingfeng Yang45b5a872018-06-07 11:33:25 -07001256 return ValidateTexEnvCommon(context, target, pname, &param);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001257}
1258
Lingfeng Yang74be2962018-06-07 09:13:38 -07001259bool ValidateTexEnvfv(Context *context,
1260 TextureEnvTarget target,
1261 TextureEnvParameter pname,
1262 const GLfloat *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001263{
Lingfeng Yang45b5a872018-06-07 11:33:25 -07001264 return ValidateTexEnvCommon(context, target, pname, params);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001265}
1266
Lingfeng Yang74be2962018-06-07 09:13:38 -07001267bool ValidateTexEnvi(Context *context,
1268 TextureEnvTarget target,
1269 TextureEnvParameter pname,
1270 GLint param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001271{
Lingfeng Yang45b5a872018-06-07 11:33:25 -07001272 GLfloat paramf = static_cast<GLfloat>(param);
1273 return ValidateTexEnvCommon(context, target, pname, &paramf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001274}
1275
Lingfeng Yang74be2962018-06-07 09:13:38 -07001276bool ValidateTexEnviv(Context *context,
1277 TextureEnvTarget target,
1278 TextureEnvParameter pname,
1279 const GLint *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001280{
Lingfeng Yang45b5a872018-06-07 11:33:25 -07001281 GLfloat paramsf[4];
1282 for (unsigned int i = 0; i < GetTextureEnvParameterCount(pname); i++)
1283 {
1284 paramsf[i] = static_cast<GLfloat>(params[i]);
1285 }
1286 return ValidateTexEnvCommon(context, target, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001287}
1288
Lingfeng Yang74be2962018-06-07 09:13:38 -07001289bool ValidateTexEnvx(Context *context,
1290 TextureEnvTarget target,
1291 TextureEnvParameter pname,
1292 GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001293{
Lingfeng Yang45b5a872018-06-07 11:33:25 -07001294 GLfloat paramf = static_cast<GLfloat>(param);
1295 return ValidateTexEnvCommon(context, target, pname, &paramf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001296}
1297
Lingfeng Yang74be2962018-06-07 09:13:38 -07001298bool ValidateTexEnvxv(Context *context,
1299 TextureEnvTarget target,
1300 TextureEnvParameter pname,
1301 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001302{
Lingfeng Yang45b5a872018-06-07 11:33:25 -07001303 GLfloat paramsf[4];
1304 for (unsigned int i = 0; i < GetTextureEnvParameterCount(pname); i++)
1305 {
1306 paramsf[i] = static_cast<GLfloat>(params[i]);
1307 }
1308 return ValidateTexEnvCommon(context, target, pname, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001309}
1310
Corentin Wallezf0e89be2017-11-08 14:00:32 -08001311bool ValidateTexParameterx(Context *context, TextureType target, GLenum pname, GLfixed param)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001312{
Lingfeng Yangf97641c2018-06-21 19:22:45 -07001313 ANGLE_VALIDATE_IS_GLES1(context);
1314 GLfloat paramf = FixedToFloat(param);
Till Rathmannb8543632018-10-02 19:46:14 +02001315 return ValidateTexParameterBase(context, target, pname, -1, false, &paramf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001316}
1317
Corentin Wallezf0e89be2017-11-08 14:00:32 -08001318bool ValidateTexParameterxv(Context *context,
1319 TextureType target,
1320 GLenum pname,
1321 const GLfixed *params)
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001322{
Lingfeng Yangf97641c2018-06-21 19:22:45 -07001323 ANGLE_VALIDATE_IS_GLES1(context);
1324 GLfloat paramsf[4] = {};
1325 for (unsigned int i = 0; i < GetTexParameterCount(pname); i++)
1326 {
1327 paramsf[i] = FixedToFloat(params[i]);
1328 }
Till Rathmannb8543632018-10-02 19:46:14 +02001329 return ValidateTexParameterBase(context, target, pname, -1, true, paramsf);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001330}
1331
1332bool ValidateTranslatef(Context *context, GLfloat x, GLfloat y, GLfloat z)
1333{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001334 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001335 return true;
1336}
1337
1338bool ValidateTranslatex(Context *context, GLfixed x, GLfixed y, GLfixed z)
1339{
Lingfeng Yangbb5ce5c2018-04-09 08:08:46 -07001340 ANGLE_VALIDATE_IS_GLES1(context);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001341 return true;
1342}
1343
1344bool ValidateVertexPointer(Context *context,
1345 GLint size,
1346 GLenum type,
1347 GLsizei stride,
1348 const void *pointer)
1349{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001350 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Vertex, size, type,
1351 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001352}
1353
1354bool ValidateDrawTexfOES(Context *context,
1355 GLfloat x,
1356 GLfloat y,
1357 GLfloat z,
1358 GLfloat width,
1359 GLfloat height)
1360{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001361 return ValidateDrawTexCommon(context, width, height);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001362}
1363
1364bool ValidateDrawTexfvOES(Context *context, const GLfloat *coords)
1365{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001366 return ValidateDrawTexCommon(context, coords[3], coords[4]);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001367}
1368
1369bool ValidateDrawTexiOES(Context *context, GLint x, GLint y, GLint z, GLint width, GLint height)
1370{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001371 return ValidateDrawTexCommon(context, static_cast<GLfloat>(width),
1372 static_cast<GLfloat>(height));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001373}
1374
1375bool ValidateDrawTexivOES(Context *context, const GLint *coords)
1376{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001377 return ValidateDrawTexCommon(context, static_cast<GLfloat>(coords[3]),
1378 static_cast<GLfloat>(coords[4]));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001379}
1380
1381bool ValidateDrawTexsOES(Context *context,
1382 GLshort x,
1383 GLshort y,
1384 GLshort z,
1385 GLshort width,
1386 GLshort height)
1387{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001388 return ValidateDrawTexCommon(context, static_cast<GLfloat>(width),
1389 static_cast<GLfloat>(height));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001390}
1391
1392bool ValidateDrawTexsvOES(Context *context, const GLshort *coords)
1393{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001394 return ValidateDrawTexCommon(context, static_cast<GLfloat>(coords[3]),
1395 static_cast<GLfloat>(coords[4]));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001396}
1397
1398bool ValidateDrawTexxOES(Context *context,
1399 GLfixed x,
1400 GLfixed y,
1401 GLfixed z,
1402 GLfixed width,
1403 GLfixed height)
1404{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001405 return ValidateDrawTexCommon(context, FixedToFloat(width), FixedToFloat(height));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001406}
1407
1408bool ValidateDrawTexxvOES(Context *context, const GLfixed *coords)
1409{
Lingfeng Yang0df813c2018-07-12 12:52:06 -07001410 return ValidateDrawTexCommon(context, FixedToFloat(coords[3]), FixedToFloat(coords[4]));
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001411}
1412
1413bool ValidateCurrentPaletteMatrixOES(Context *context, GLuint matrixpaletteindex)
1414{
1415 UNIMPLEMENTED();
1416 return true;
1417}
1418
1419bool ValidateLoadPaletteFromModelViewMatrixOES(Context *context)
1420{
1421 UNIMPLEMENTED();
1422 return true;
1423}
1424
1425bool ValidateMatrixIndexPointerOES(Context *context,
1426 GLint size,
1427 GLenum type,
1428 GLsizei stride,
1429 const void *pointer)
1430{
1431 UNIMPLEMENTED();
1432 return true;
1433}
1434
1435bool ValidateWeightPointerOES(Context *context,
1436 GLint size,
1437 GLenum type,
1438 GLsizei stride,
1439 const void *pointer)
1440{
1441 UNIMPLEMENTED();
1442 return true;
1443}
1444
1445bool ValidatePointSizePointerOES(Context *context, GLenum type, GLsizei stride, const void *pointer)
1446{
Lingfeng Yangabb09f12018-04-16 10:43:53 -07001447 return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::PointSize, 1, type,
1448 stride, pointer);
Geoff Lang2aaa7b42018-01-12 17:17:27 -05001449}
1450
1451bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent)
1452{
1453 UNIMPLEMENTED();
1454 return true;
1455}
Lingfeng Yanga0648782018-03-12 14:45:25 -07001456
1457bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers)
1458{
1459 UNIMPLEMENTED();
1460 return true;
1461}
1462
1463bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers)
1464{
1465 UNIMPLEMENTED();
1466 return true;
1467}
1468
1469bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers)
1470{
1471 UNIMPLEMENTED();
1472 return true;
1473}
1474
1475bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers)
1476{
1477 UNIMPLEMENTED();
1478 return true;
1479}
1480
1481bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer)
1482{
1483 UNIMPLEMENTED();
1484 return true;
1485}
1486
1487bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer)
1488{
1489 UNIMPLEMENTED();
1490 return true;
1491}
1492
1493bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target)
1494{
1495 UNIMPLEMENTED();
1496 return true;
1497}
1498
1499bool ValidateFramebufferRenderbufferOES(Context *context,
1500 GLenum target,
1501 GLenum attachment,
1502 GLenum rbtarget,
1503 GLuint renderbuffer)
1504{
1505 UNIMPLEMENTED();
1506 return true;
1507}
1508
1509bool ValidateFramebufferTexture2DOES(Context *context,
1510 GLenum target,
1511 GLenum attachment,
1512 TextureTarget textarget,
1513 GLuint texture,
1514 GLint level)
1515{
1516 UNIMPLEMENTED();
1517 return true;
1518}
1519
1520bool ValidateGenerateMipmapOES(Context *context, TextureType target)
1521{
1522 UNIMPLEMENTED();
1523 return true;
1524}
1525
1526bool ValidateGetFramebufferAttachmentParameterivOES(Context *context,
1527 GLenum target,
1528 GLenum attachment,
1529 GLenum pname,
1530 GLint *params)
1531{
1532 UNIMPLEMENTED();
1533 return true;
1534}
1535
1536bool ValidateGetRenderbufferParameterivOES(Context *context,
1537 GLenum target,
1538 GLenum pname,
1539 GLint *params)
1540{
1541 UNIMPLEMENTED();
1542 return true;
1543}
1544
1545bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer)
1546{
1547 UNIMPLEMENTED();
1548 return true;
1549}
1550
1551bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer)
1552{
1553 UNIMPLEMENTED();
1554 return true;
1555}
1556
1557bool ValidateRenderbufferStorageOES(Context *context,
1558 GLenum target,
Jamie Madill778bf092018-11-14 09:54:36 -05001559 GLenum internalformat,
Lingfeng Yanga0648782018-03-12 14:45:25 -07001560 GLsizei width,
1561 GLsizei height)
1562{
1563 UNIMPLEMENTED();
1564 return true;
1565}
1566
1567// GL_OES_texture_cube_map
1568
1569bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params)
1570{
1571 UNIMPLEMENTED();
1572 return true;
1573}
1574
1575bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params)
1576{
1577 UNIMPLEMENTED();
1578 return true;
1579}
1580
1581bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params)
1582{
1583 UNIMPLEMENTED();
1584 return true;
1585}
1586
1587bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params)
1588{
1589 UNIMPLEMENTED();
1590 return true;
1591}
1592
1593bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1594{
1595 UNIMPLEMENTED();
1596 return true;
1597}
1598
1599bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
1600{
1601 UNIMPLEMENTED();
1602 return true;
1603}
1604
1605bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param)
1606{
1607 UNIMPLEMENTED();
1608 return true;
1609}
1610
1611bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param)
1612{
1613 UNIMPLEMENTED();
1614 return true;
1615}
1616
1617bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param)
1618{
1619 UNIMPLEMENTED();
1620 return true;
1621}
Lingfeng Yang01074432018-04-16 10:19:51 -07001622
1623} // namespace gl