• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 // validationES32.cpp: Validation functions for OpenGL ES 3.2 entry point parameters
8 
9 #include "libANGLE/validationES32_autogen.h"
10 
11 #include "libANGLE/Context.h"
12 #include "libANGLE/ErrorStrings.h"
13 #include "libANGLE/Framebuffer.h"
14 #include "libANGLE/VertexArray.h"
15 #include "libANGLE/validationES.h"
16 #include "libANGLE/validationES2.h"
17 #include "libANGLE/validationES3.h"
18 #include "libANGLE/validationES31.h"
19 #include "libANGLE/validationES31_autogen.h"
20 #include "libANGLE/validationES3_autogen.h"
21 
22 #include "common/utilities.h"
23 
24 using namespace angle;
25 
26 namespace gl
27 {
28 using namespace err;
29 
30 namespace
31 {
32 // ANGLE_shader_pixel_local_storage: INVALID_OPERATION is generated by Enablei*(), Disablei*() if
33 // <cap> is not one of: BLEND, SCISSOR_TEST, SCISSOR_TEST_EXCLUSIVE_NV.
IsIndexedCapBannedWithActivePLS(GLenum cap)34 static bool IsIndexedCapBannedWithActivePLS(GLenum cap)
35 {
36     switch (cap)
37     {
38         case GL_BLEND:
39         case GL_SCISSOR_TEST:
40         case GL_SCISSOR_TEST_EXCLUSIVE_NV:
41             return false;
42         default:
43             return true;
44     }
45 }
46 }  // anonymous namespace
47 
ValidateBlendBarrier(const Context * context,angle::EntryPoint entryPoint)48 bool ValidateBlendBarrier(const Context *context, angle::EntryPoint entryPoint)
49 {
50     return true;
51 }
52 
ValidateBlendEquationSeparatei(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLuint buf,GLenum modeRGB,GLenum modeAlpha)53 bool ValidateBlendEquationSeparatei(const PrivateState &state,
54                                     ErrorSet *errors,
55                                     angle::EntryPoint entryPoint,
56                                     GLuint buf,
57                                     GLenum modeRGB,
58                                     GLenum modeAlpha)
59 {
60     if (!ValidateDrawBufferIndexIfActivePLS(state, errors, entryPoint, buf, "buf"))
61     {
62         return false;
63     }
64 
65     if (buf >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
66     {
67         errors->validationError(entryPoint, GL_INVALID_VALUE, kExceedsMaxDrawBuffers);
68         return false;
69     }
70 
71     if (!ValidateBlendEquationSeparate(state, errors, entryPoint, modeRGB, modeAlpha))
72     {
73         // error already generated
74         return false;
75     }
76 
77     return true;
78 }
79 
ValidateBlendEquationi(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLuint buf,GLenum mode)80 bool ValidateBlendEquationi(const PrivateState &state,
81                             ErrorSet *errors,
82                             angle::EntryPoint entryPoint,
83                             GLuint buf,
84                             GLenum mode)
85 {
86     if (!ValidateDrawBufferIndexIfActivePLS(state, errors, entryPoint, buf, "buf"))
87     {
88         return false;
89     }
90 
91     if (buf >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
92     {
93         errors->validationError(entryPoint, GL_INVALID_VALUE, kExceedsMaxDrawBuffers);
94         return false;
95     }
96 
97     if (!ValidateBlendEquation(state, errors, entryPoint, mode))
98     {
99         // error already generated
100         return false;
101     }
102 
103     return true;
104 }
105 
ValidateBlendFuncSeparatei(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLuint buf,GLenum srcRGB,GLenum dstRGB,GLenum srcAlpha,GLenum dstAlpha)106 bool ValidateBlendFuncSeparatei(const PrivateState &state,
107                                 ErrorSet *errors,
108                                 angle::EntryPoint entryPoint,
109                                 GLuint buf,
110                                 GLenum srcRGB,
111                                 GLenum dstRGB,
112                                 GLenum srcAlpha,
113                                 GLenum dstAlpha)
114 {
115     if (!ValidateDrawBufferIndexIfActivePLS(state, errors, entryPoint, buf, "buf"))
116     {
117         return false;
118     }
119 
120     if (buf >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
121     {
122         errors->validationError(entryPoint, GL_INVALID_VALUE, kExceedsMaxDrawBuffers);
123         return false;
124     }
125 
126     if (!ValidateBlendFuncSeparate(state, errors, entryPoint, srcRGB, dstRGB, srcAlpha, dstAlpha))
127     {
128         // error already generated
129         return false;
130     }
131 
132     return true;
133 }
134 
ValidateBlendFunci(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLuint buf,GLenum src,GLenum dst)135 bool ValidateBlendFunci(const PrivateState &state,
136                         ErrorSet *errors,
137                         angle::EntryPoint entryPoint,
138                         GLuint buf,
139                         GLenum src,
140                         GLenum dst)
141 {
142     if (!ValidateDrawBufferIndexIfActivePLS(state, errors, entryPoint, buf, "buf"))
143     {
144         return false;
145     }
146 
147     if (buf >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
148     {
149         errors->validationError(entryPoint, GL_INVALID_VALUE, kExceedsMaxDrawBuffers);
150         return false;
151     }
152 
153     if (!ValidateBlendFunc(state, errors, entryPoint, src, dst))
154     {
155         // error already generated
156         return false;
157     }
158 
159     return true;
160 }
161 
ValidateColorMaski(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLuint buf,GLboolean r,GLboolean g,GLboolean b,GLboolean a)162 bool ValidateColorMaski(const PrivateState &state,
163                         ErrorSet *errors,
164                         angle::EntryPoint entryPoint,
165                         GLuint buf,
166                         GLboolean r,
167                         GLboolean g,
168                         GLboolean b,
169                         GLboolean a)
170 {
171     if (!ValidateDrawBufferIndexIfActivePLS(state, errors, entryPoint, buf, "buf"))
172     {
173         return false;
174     }
175 
176     if (buf >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
177     {
178         errors->validationError(entryPoint, GL_INVALID_VALUE, kIndexExceedsMaxDrawBuffer);
179         return false;
180     }
181 
182     return true;
183 }
184 
ValidateCopyImageSubData(const Context * context,angle::EntryPoint entryPoint,GLuint srcName,GLenum srcTarget,GLint srcLevel,GLint srcX,GLint srcY,GLint srcZ,GLuint dstName,GLenum dstTarget,GLint dstLevel,GLint dstX,GLint dstY,GLint dstZ,GLsizei srcWidth,GLsizei srcHeight,GLsizei srcDepth)185 bool ValidateCopyImageSubData(const Context *context,
186                               angle::EntryPoint entryPoint,
187                               GLuint srcName,
188                               GLenum srcTarget,
189                               GLint srcLevel,
190                               GLint srcX,
191                               GLint srcY,
192                               GLint srcZ,
193                               GLuint dstName,
194                               GLenum dstTarget,
195                               GLint dstLevel,
196                               GLint dstX,
197                               GLint dstY,
198                               GLint dstZ,
199                               GLsizei srcWidth,
200                               GLsizei srcHeight,
201                               GLsizei srcDepth)
202 {
203     if (context->getClientVersion() < ES_3_2)
204     {
205         ANGLE_VALIDATION_ERROR(GL_INVALID_OPERATION, kES32Required);
206         return false;
207     }
208 
209     return ValidateCopyImageSubDataBase(context, entryPoint, srcName, srcTarget, srcLevel, srcX,
210                                         srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ,
211                                         srcWidth, srcHeight, srcDepth);
212 }
213 
ValidateDebugMessageCallback(const Context * context,angle::EntryPoint entryPoint,GLDEBUGPROC callback,const void * userParam)214 bool ValidateDebugMessageCallback(const Context *context,
215                                   angle::EntryPoint entryPoint,
216                                   GLDEBUGPROC callback,
217                                   const void *userParam)
218 {
219     return true;
220 }
221 
ValidateDebugMessageControl(const Context * context,angle::EntryPoint entryPoint,GLenum source,GLenum type,GLenum severity,GLsizei count,const GLuint * ids,GLboolean enabled)222 bool ValidateDebugMessageControl(const Context *context,
223                                  angle::EntryPoint entryPoint,
224                                  GLenum source,
225                                  GLenum type,
226                                  GLenum severity,
227                                  GLsizei count,
228                                  const GLuint *ids,
229                                  GLboolean enabled)
230 {
231     return true;
232 }
233 
ValidateDebugMessageInsert(const Context * context,angle::EntryPoint entryPoint,GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar * buf)234 bool ValidateDebugMessageInsert(const Context *context,
235                                 angle::EntryPoint entryPoint,
236                                 GLenum source,
237                                 GLenum type,
238                                 GLuint id,
239                                 GLenum severity,
240                                 GLsizei length,
241                                 const GLchar *buf)
242 {
243     return true;
244 }
245 
ValidateDisablei(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLenum target,GLuint index)246 bool ValidateDisablei(const PrivateState &state,
247                       ErrorSet *errors,
248                       angle::EntryPoint entryPoint,
249                       GLenum target,
250                       GLuint index)
251 {
252     int numPLSPlanes = state.getPixelLocalStorageActivePlanes();
253     if (numPLSPlanes != 0)
254     {
255         if (IsIndexedCapBannedWithActivePLS(target))
256         {
257             errors->validationErrorF(entryPoint, GL_INVALID_OPERATION, kPLSCapNotAllowed, target);
258             return false;
259         }
260         if (target == GL_BLEND &&
261             !ValidateDrawBufferIndexIfActivePLS(state, errors, entryPoint, index, "index"))
262         {
263             return false;
264         }
265     }
266 
267     switch (target)
268     {
269         case GL_BLEND:
270             if (index >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
271             {
272                 errors->validationError(entryPoint, GL_INVALID_VALUE, kIndexExceedsMaxDrawBuffer);
273                 return false;
274             }
275             break;
276         default:
277             errors->validationErrorF(entryPoint, GL_INVALID_ENUM, kEnumNotSupported, target);
278             return false;
279     }
280     return true;
281 }
282 
ValidateDrawElementsBaseVertex(const Context * context,angle::EntryPoint entryPoint,PrimitiveMode mode,GLsizei count,DrawElementsType type,const void * indices,GLint basevertex)283 bool ValidateDrawElementsBaseVertex(const Context *context,
284                                     angle::EntryPoint entryPoint,
285                                     PrimitiveMode mode,
286                                     GLsizei count,
287                                     DrawElementsType type,
288                                     const void *indices,
289                                     GLint basevertex)
290 {
291     return ValidateDrawElementsCommon(context, entryPoint, mode, count, type, indices, 1);
292 }
293 
ValidateDrawElementsInstancedBaseVertex(const Context * context,angle::EntryPoint entryPoint,PrimitiveMode mode,GLsizei count,DrawElementsType type,const void * indices,GLsizei instancecount,GLint basevertex)294 bool ValidateDrawElementsInstancedBaseVertex(const Context *context,
295                                              angle::EntryPoint entryPoint,
296                                              PrimitiveMode mode,
297                                              GLsizei count,
298                                              DrawElementsType type,
299                                              const void *indices,
300                                              GLsizei instancecount,
301                                              GLint basevertex)
302 {
303     return ValidateDrawElementsInstancedBase(context, entryPoint, mode, count, type, indices,
304                                              instancecount);
305 }
306 
ValidateDrawRangeElementsBaseVertex(const Context * context,angle::EntryPoint entryPoint,PrimitiveMode mode,GLuint start,GLuint end,GLsizei count,DrawElementsType type,const void * indices,GLint basevertex)307 bool ValidateDrawRangeElementsBaseVertex(const Context *context,
308                                          angle::EntryPoint entryPoint,
309                                          PrimitiveMode mode,
310                                          GLuint start,
311                                          GLuint end,
312                                          GLsizei count,
313                                          DrawElementsType type,
314                                          const void *indices,
315                                          GLint basevertex)
316 {
317     if (end < start)
318     {
319         ANGLE_VALIDATION_ERROR(GL_INVALID_VALUE, kInvalidElementRange);
320         return false;
321     }
322 
323     if (!ValidateDrawElementsCommon(context, entryPoint, mode, count, type, indices, 1))
324     {
325         return false;
326     }
327 
328     // Skip range checks for no-op calls.
329     if (count <= 0)
330     {
331         return true;
332     }
333 
334     return true;
335 }
336 
ValidateEnablei(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLenum target,GLuint index)337 bool ValidateEnablei(const PrivateState &state,
338                      ErrorSet *errors,
339                      angle::EntryPoint entryPoint,
340                      GLenum target,
341                      GLuint index)
342 {
343     int numPLSPlanes = state.getPixelLocalStorageActivePlanes();
344     if (numPLSPlanes != 0)
345     {
346         if (IsIndexedCapBannedWithActivePLS(target))
347         {
348             errors->validationErrorF(entryPoint, GL_INVALID_OPERATION, kPLSCapNotAllowed, target);
349             return false;
350         }
351         if (target == GL_BLEND &&
352             !ValidateDrawBufferIndexIfActivePLS(state, errors, entryPoint, index, "index"))
353         {
354             return false;
355         }
356     }
357 
358     switch (target)
359     {
360         case GL_BLEND:
361             if (index >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
362             {
363                 errors->validationError(entryPoint, GL_INVALID_VALUE, kIndexExceedsMaxDrawBuffer);
364                 return false;
365             }
366             break;
367         default:
368             errors->validationErrorF(entryPoint, GL_INVALID_ENUM, kEnumNotSupported, target);
369             return false;
370     }
371     return true;
372 }
373 
ValidateFramebufferTexture(const Context * context,angle::EntryPoint entryPoint,GLenum target,GLenum attachment,TextureID texture,GLint level)374 bool ValidateFramebufferTexture(const Context *context,
375                                 angle::EntryPoint entryPoint,
376                                 GLenum target,
377                                 GLenum attachment,
378                                 TextureID texture,
379                                 GLint level)
380 {
381     return true;
382 }
383 
ValidateGetDebugMessageLog(const Context * context,angle::EntryPoint entryPoint,GLuint count,GLsizei bufSize,const GLenum * sources,const GLenum * types,const GLuint * ids,const GLenum * severities,const GLsizei * lengths,const GLchar * messageLog)384 bool ValidateGetDebugMessageLog(const Context *context,
385                                 angle::EntryPoint entryPoint,
386                                 GLuint count,
387                                 GLsizei bufSize,
388                                 const GLenum *sources,
389                                 const GLenum *types,
390                                 const GLuint *ids,
391                                 const GLenum *severities,
392                                 const GLsizei *lengths,
393                                 const GLchar *messageLog)
394 {
395     return true;
396 }
397 
ValidateGetGraphicsResetStatus(const Context * context,angle::EntryPoint entryPoint)398 bool ValidateGetGraphicsResetStatus(const Context *context, angle::EntryPoint entryPoint)
399 {
400     return true;
401 }
402 
ValidateGetObjectLabel(const Context * context,angle::EntryPoint entryPoint,GLenum identifier,GLuint name,GLsizei bufSize,const GLsizei * length,const GLchar * label)403 bool ValidateGetObjectLabel(const Context *context,
404                             angle::EntryPoint entryPoint,
405                             GLenum identifier,
406                             GLuint name,
407                             GLsizei bufSize,
408                             const GLsizei *length,
409                             const GLchar *label)
410 {
411     return true;
412 }
413 
ValidateGetObjectPtrLabel(const Context * context,angle::EntryPoint entryPoint,const void * ptr,GLsizei bufSize,const GLsizei * length,const GLchar * label)414 bool ValidateGetObjectPtrLabel(const Context *context,
415                                angle::EntryPoint entryPoint,
416                                const void *ptr,
417                                GLsizei bufSize,
418                                const GLsizei *length,
419                                const GLchar *label)
420 {
421     return true;
422 }
423 
ValidateGetPointerv(const Context * context,angle::EntryPoint entryPoint,GLenum pname,void * const * params)424 bool ValidateGetPointerv(const Context *context,
425                          angle::EntryPoint entryPoint,
426                          GLenum pname,
427                          void *const *params)
428 {
429     Version clientVersion = context->getClientVersion();
430 
431     if ((clientVersion == ES_1_0) || (clientVersion == ES_1_1))
432     {
433         switch (pname)
434         {
435             case GL_VERTEX_ARRAY_POINTER:
436             case GL_NORMAL_ARRAY_POINTER:
437             case GL_COLOR_ARRAY_POINTER:
438             case GL_TEXTURE_COORD_ARRAY_POINTER:
439             case GL_POINT_SIZE_ARRAY_POINTER_OES:
440                 return true;
441             default:
442                 ANGLE_VALIDATION_ERROR(GL_INVALID_ENUM, kInvalidPointerQuery);
443                 return false;
444         }
445     }
446     else if (clientVersion == ES_3_2)
447     {
448         switch (pname)
449         {
450             case GL_DEBUG_CALLBACK_FUNCTION:
451             case GL_DEBUG_CALLBACK_USER_PARAM:
452                 return true;
453             default:
454                 ANGLE_VALIDATION_ERROR(GL_INVALID_ENUM, kInvalidPointerQuery);
455                 return false;
456         }
457     }
458     else
459     {
460         ANGLE_VALIDATION_ERROR(GL_INVALID_OPERATION, kES1or32Required);
461         return false;
462     }
463 }
464 
ValidateGetSamplerParameterIiv(const Context * context,angle::EntryPoint entryPoint,SamplerID sampler,GLenum pname,const GLint * params)465 bool ValidateGetSamplerParameterIiv(const Context *context,
466                                     angle::EntryPoint entryPoint,
467                                     SamplerID sampler,
468                                     GLenum pname,
469                                     const GLint *params)
470 {
471     return true;
472 }
473 
ValidateGetSamplerParameterIuiv(const Context * context,angle::EntryPoint entryPoint,SamplerID sampler,GLenum pname,const GLuint * params)474 bool ValidateGetSamplerParameterIuiv(const Context *context,
475                                      angle::EntryPoint entryPoint,
476                                      SamplerID sampler,
477                                      GLenum pname,
478                                      const GLuint *params)
479 {
480     return true;
481 }
482 
ValidateGetTexParameterIiv(const Context * context,angle::EntryPoint entryPoint,TextureType targetPacked,GLenum pname,const GLint * params)483 bool ValidateGetTexParameterIiv(const Context *context,
484                                 angle::EntryPoint entryPoint,
485                                 TextureType targetPacked,
486                                 GLenum pname,
487                                 const GLint *params)
488 {
489     return true;
490 }
491 
ValidateGetTexParameterIuiv(const Context * context,angle::EntryPoint entryPoint,TextureType targetPacked,GLenum pname,const GLuint * params)492 bool ValidateGetTexParameterIuiv(const Context *context,
493                                  angle::EntryPoint entryPoint,
494                                  TextureType targetPacked,
495                                  GLenum pname,
496                                  const GLuint *params)
497 {
498     return true;
499 }
500 
ValidateGetnUniformfv(const Context * context,angle::EntryPoint entryPoint,ShaderProgramID program,UniformLocation location,GLsizei bufSize,const GLfloat * params)501 bool ValidateGetnUniformfv(const Context *context,
502                            angle::EntryPoint entryPoint,
503                            ShaderProgramID program,
504                            UniformLocation location,
505                            GLsizei bufSize,
506                            const GLfloat *params)
507 {
508     return ValidateSizedGetUniform(context, entryPoint, program, location, bufSize, nullptr);
509 }
510 
ValidateGetnUniformiv(const Context * context,angle::EntryPoint entryPoint,ShaderProgramID program,UniformLocation location,GLsizei bufSize,const GLint * params)511 bool ValidateGetnUniformiv(const Context *context,
512                            angle::EntryPoint entryPoint,
513                            ShaderProgramID program,
514                            UniformLocation location,
515                            GLsizei bufSize,
516                            const GLint *params)
517 {
518     return ValidateSizedGetUniform(context, entryPoint, program, location, bufSize, nullptr);
519 }
520 
ValidateGetnUniformuiv(const Context * context,angle::EntryPoint entryPoint,ShaderProgramID program,UniformLocation location,GLsizei bufSize,const GLuint * params)521 bool ValidateGetnUniformuiv(const Context *context,
522                             angle::EntryPoint entryPoint,
523                             ShaderProgramID program,
524                             UniformLocation location,
525                             GLsizei bufSize,
526                             const GLuint *params)
527 {
528     return ValidateSizedGetUniform(context, entryPoint, program, location, bufSize, nullptr);
529 }
530 
ValidateIsEnabledi(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLenum target,GLuint index)531 bool ValidateIsEnabledi(const PrivateState &state,
532                         ErrorSet *errors,
533                         angle::EntryPoint entryPoint,
534                         GLenum target,
535                         GLuint index)
536 {
537     switch (target)
538     {
539         case GL_BLEND:
540             if (index >= static_cast<GLuint>(state.getCaps().maxDrawBuffers))
541             {
542                 errors->validationError(entryPoint, GL_INVALID_VALUE, kIndexExceedsMaxDrawBuffer);
543                 return false;
544             }
545             break;
546         default:
547             errors->validationErrorF(entryPoint, GL_INVALID_ENUM, kEnumNotSupported, target);
548             return false;
549     }
550     return true;
551 }
552 
ValidateMinSampleShading(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLfloat value)553 bool ValidateMinSampleShading(const PrivateState &state,
554                               ErrorSet *errors,
555                               angle::EntryPoint entryPoint,
556                               GLfloat value)
557 {
558     return true;
559 }
560 
ValidateObjectLabel(const Context * context,angle::EntryPoint entryPoint,GLenum identifier,GLuint name,GLsizei length,const GLchar * label)561 bool ValidateObjectLabel(const Context *context,
562                          angle::EntryPoint entryPoint,
563                          GLenum identifier,
564                          GLuint name,
565                          GLsizei length,
566                          const GLchar *label)
567 {
568     return true;
569 }
570 
ValidateObjectPtrLabel(const Context * context,angle::EntryPoint entryPoint,const void * ptr,GLsizei length,const GLchar * label)571 bool ValidateObjectPtrLabel(const Context *context,
572                             angle::EntryPoint entryPoint,
573                             const void *ptr,
574                             GLsizei length,
575                             const GLchar *label)
576 {
577     return true;
578 }
579 
ValidatePatchParameteri(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLenum pname,GLint value)580 bool ValidatePatchParameteri(const PrivateState &state,
581                              ErrorSet *errors,
582                              angle::EntryPoint entryPoint,
583                              GLenum pname,
584                              GLint value)
585 {
586     return true;
587 }
588 
ValidatePopDebugGroup(const Context * context,angle::EntryPoint entryPoint)589 bool ValidatePopDebugGroup(const Context *context, angle::EntryPoint entryPoint)
590 {
591     return ValidatePopDebugGroupBase(context, entryPoint);
592 }
593 
ValidatePrimitiveBoundingBox(const PrivateState & state,ErrorSet * errors,angle::EntryPoint entryPoint,GLfloat minX,GLfloat minY,GLfloat minZ,GLfloat minW,GLfloat maxX,GLfloat maxY,GLfloat maxZ,GLfloat maxW)594 bool ValidatePrimitiveBoundingBox(const PrivateState &state,
595                                   ErrorSet *errors,
596                                   angle::EntryPoint entryPoint,
597                                   GLfloat minX,
598                                   GLfloat minY,
599                                   GLfloat minZ,
600                                   GLfloat minW,
601                                   GLfloat maxX,
602                                   GLfloat maxY,
603                                   GLfloat maxZ,
604                                   GLfloat maxW)
605 {
606     return true;
607 }
608 
ValidatePushDebugGroup(const Context * context,angle::EntryPoint entryPoint,GLenum source,GLuint id,GLsizei length,const GLchar * message)609 bool ValidatePushDebugGroup(const Context *context,
610                             angle::EntryPoint entryPoint,
611                             GLenum source,
612                             GLuint id,
613                             GLsizei length,
614                             const GLchar *message)
615 {
616     return ValidatePushDebugGroupBase(context, entryPoint, source, id, length, message);
617 }
618 
ValidateReadnPixels(const Context * context,angle::EntryPoint entryPoint,GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,const void * data)619 bool ValidateReadnPixels(const Context *context,
620                          angle::EntryPoint entryPoint,
621                          GLint x,
622                          GLint y,
623                          GLsizei width,
624                          GLsizei height,
625                          GLenum format,
626                          GLenum type,
627                          GLsizei bufSize,
628                          const void *data)
629 {
630     return true;
631 }
632 
ValidateSamplerParameterIiv(const Context * context,angle::EntryPoint entryPoint,SamplerID sampler,GLenum pname,const GLint * param)633 bool ValidateSamplerParameterIiv(const Context *context,
634                                  angle::EntryPoint entryPoint,
635                                  SamplerID sampler,
636                                  GLenum pname,
637                                  const GLint *param)
638 {
639     return true;
640 }
641 
ValidateSamplerParameterIuiv(const Context * context,angle::EntryPoint entryPoint,SamplerID sampler,GLenum pname,const GLuint * param)642 bool ValidateSamplerParameterIuiv(const Context *context,
643                                   angle::EntryPoint entryPoint,
644                                   SamplerID sampler,
645                                   GLenum pname,
646                                   const GLuint *param)
647 {
648     return true;
649 }
650 
ValidateTexBuffer(const Context * context,angle::EntryPoint entryPoint,TextureType target,GLenum internalformat,BufferID buffer)651 bool ValidateTexBuffer(const Context *context,
652                        angle::EntryPoint entryPoint,
653                        TextureType target,
654                        GLenum internalformat,
655                        BufferID buffer)
656 {
657     if (context->getClientVersion() < ES_3_2)
658     {
659         ANGLE_VALIDATION_ERROR(GL_INVALID_OPERATION, kES32Required);
660         return false;
661     }
662 
663     return ValidateTexBufferBase(context, entryPoint, target, internalformat, buffer);
664 }
665 
ValidateTexBufferRange(const Context * context,angle::EntryPoint entryPoint,TextureType target,GLenum internalformat,BufferID buffer,GLintptr offset,GLsizeiptr size)666 bool ValidateTexBufferRange(const Context *context,
667                             angle::EntryPoint entryPoint,
668                             TextureType target,
669                             GLenum internalformat,
670                             BufferID buffer,
671                             GLintptr offset,
672                             GLsizeiptr size)
673 {
674     if (context->getClientVersion() < ES_3_2)
675     {
676         ANGLE_VALIDATION_ERROR(GL_INVALID_OPERATION, kES32Required);
677         return false;
678     }
679 
680     return ValidateTexBufferRangeBase(context, entryPoint, target, internalformat, buffer, offset,
681                                       size);
682 }
683 
ValidateTexParameterIiv(const Context * context,angle::EntryPoint entryPoint,TextureType targetPacked,GLenum pname,const GLint * params)684 bool ValidateTexParameterIiv(const Context *context,
685                              angle::EntryPoint entryPoint,
686                              TextureType targetPacked,
687                              GLenum pname,
688                              const GLint *params)
689 {
690     return true;
691 }
692 
ValidateTexParameterIuiv(const Context * context,angle::EntryPoint entryPoint,TextureType targetPacked,GLenum pname,const GLuint * params)693 bool ValidateTexParameterIuiv(const Context *context,
694                               angle::EntryPoint entryPoint,
695                               TextureType targetPacked,
696                               GLenum pname,
697                               const GLuint *params)
698 {
699     return true;
700 }
701 
ValidateTexStorage3DMultisample(const Context * context,angle::EntryPoint entryPoint,TextureType targetPacked,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedsamplelocations)702 bool ValidateTexStorage3DMultisample(const Context *context,
703                                      angle::EntryPoint entryPoint,
704                                      TextureType targetPacked,
705                                      GLsizei samples,
706                                      GLenum internalformat,
707                                      GLsizei width,
708                                      GLsizei height,
709                                      GLsizei depth,
710                                      GLboolean fixedsamplelocations)
711 {
712     return true;
713 }
714 
715 }  // namespace gl
716