xref: /aosp_15_r20/external/deqp/modules/gles31/functional/es31fIntegerStateQueryTests.cpp (revision 35238bce31c2a825756842865a792f8cf7f89930)
1 /*-------------------------------------------------------------------------
2  * drawElements Quality Program OpenGL ES 3.1 Module
3  * -------------------------------------------------
4  *
5  * Copyright 2014 The Android Open Source Project
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  *//*!
20  * \file
21  * \brief Integer state query tests
22  *//*--------------------------------------------------------------------*/
23 
24 #include "es31fIntegerStateQueryTests.hpp"
25 #include "tcuTestLog.hpp"
26 #include "gluRenderContext.hpp"
27 #include "gluCallLogWrapper.hpp"
28 #include "gluContextInfo.hpp"
29 #include "gluObjectWrapper.hpp"
30 #include "gluShaderProgram.hpp"
31 #include "gluStrUtil.hpp"
32 #include "glwFunctions.hpp"
33 #include "glwEnums.hpp"
34 #include "glsStateQueryUtil.hpp"
35 #include "deRandom.hpp"
36 #include "deStringUtil.hpp"
37 
38 namespace deqp
39 {
40 namespace gles31
41 {
42 namespace Functional
43 {
44 namespace
45 {
46 
47 using namespace gls::StateQueryUtil;
48 
49 const int MAX_FRAG_ATOMIC_COUNTER_BUFFERS_GLES32 = 1;
50 const int MAX_FRAG_ATOMIC_COUNTERS_GLES32        = 8;
51 const int MAX_FRAG_SHADER_STORAGE_BLOCKS_GLES32  = 4;
52 
getVerifierSuffix(QueryType type)53 static const char *getVerifierSuffix(QueryType type)
54 {
55     switch (type)
56     {
57     case QUERY_BOOLEAN:
58         return "getboolean";
59     case QUERY_INTEGER:
60         return "getinteger";
61     case QUERY_INTEGER64:
62         return "getinteger64";
63     case QUERY_FLOAT:
64         return "getfloat";
65     default:
66         DE_ASSERT(false);
67         return DE_NULL;
68     }
69 }
70 
71 class MaxSamplesCase : public TestCase
72 {
73 public:
74     MaxSamplesCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
75                    QueryType verifierType);
76 
77 private:
78     IterateResult iterate(void);
79 
80     const glw::GLenum m_target;
81     const int m_minValue;
82     const QueryType m_verifierType;
83 };
84 
MaxSamplesCase(Context & context,const char * name,const char * desc,glw::GLenum target,int minValue,QueryType verifierType)85 MaxSamplesCase::MaxSamplesCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
86                                QueryType verifierType)
87     : TestCase(context, name, desc)
88     , m_target(target)
89     , m_minValue(minValue)
90     , m_verifierType(verifierType)
91 {
92 }
93 
iterate(void)94 MaxSamplesCase::IterateResult MaxSamplesCase::iterate(void)
95 {
96     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
97     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
98 
99     gl.enableLogging(true);
100     verifyStateIntegerMin(result, gl, m_target, m_minValue, m_verifierType);
101 
102     result.setTestContextResult(m_testCtx);
103     return STOP;
104 }
105 
106 class TexBindingCase : public TestCase
107 {
108 public:
109     TexBindingCase(Context &context, const char *name, const char *desc, glw::GLenum texTarget, glw::GLenum bindTarget,
110                    QueryType verifierType);
111 
112 private:
113     void init(void);
114     IterateResult iterate(void);
115 
116     const glw::GLenum m_texTarget;
117     const glw::GLenum m_bindTarget;
118     const QueryType m_verifierType;
119 };
120 
TexBindingCase(Context & context,const char * name,const char * desc,glw::GLenum texTarget,glw::GLenum bindTarget,QueryType verifierType)121 TexBindingCase::TexBindingCase(Context &context, const char *name, const char *desc, glw::GLenum texTarget,
122                                glw::GLenum bindTarget, QueryType verifierType)
123     : TestCase(context, name, desc)
124     , m_texTarget(texTarget)
125     , m_bindTarget(bindTarget)
126     , m_verifierType(verifierType)
127 {
128 }
129 
init(void)130 void TexBindingCase::init(void)
131 {
132     auto ctxType = m_context.getRenderContext().getType();
133     if (contextSupports(ctxType, glu::ApiType::es(3, 2)) || contextSupports(ctxType, glu::ApiType::core(4, 5)))
134         return;
135 
136     if (m_texTarget == GL_TEXTURE_2D_MULTISAMPLE_ARRAY &&
137         !m_context.getContextInfo().isExtensionSupported("GL_OES_texture_storage_multisample_2d_array"))
138         throw tcu::NotSupportedError("Test requires OES_texture_storage_multisample_2d_array extension");
139     if (m_texTarget == GL_TEXTURE_CUBE_MAP_ARRAY &&
140         !m_context.getContextInfo().isExtensionSupported("GL_EXT_texture_cube_map_array"))
141         throw tcu::NotSupportedError("Test requires GL_EXT_texture_cube_map_array extension");
142     if (m_texTarget == GL_TEXTURE_BUFFER && !m_context.getContextInfo().isExtensionSupported("GL_EXT_texture_buffer"))
143         throw tcu::NotSupportedError("Test requires GL_EXT_texture_buffer extension");
144 }
145 
iterate(void)146 TexBindingCase::IterateResult TexBindingCase::iterate(void)
147 {
148     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
149     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
150 
151     gl.enableLogging(true);
152 
153     // initial
154     {
155         const tcu::ScopedLogSection section(m_testCtx.getLog(), "initial", "Initial value");
156 
157         verifyStateInteger(result, gl, m_bindTarget, 0, m_verifierType);
158     }
159 
160     // bind
161     {
162         const tcu::ScopedLogSection section(m_testCtx.getLog(), "bind", "After bind");
163 
164         glw::GLuint texture;
165 
166         gl.glGenTextures(1, &texture);
167         gl.glBindTexture(m_texTarget, texture);
168         GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "bind texture");
169 
170         verifyStateInteger(result, gl, m_bindTarget, texture, m_verifierType);
171 
172         gl.glDeleteTextures(1, &texture);
173     }
174 
175     // after delete
176     {
177         const tcu::ScopedLogSection section(m_testCtx.getLog(), "bind", "After delete");
178 
179         verifyStateInteger(result, gl, m_bindTarget, 0, m_verifierType);
180     }
181 
182     result.setTestContextResult(m_testCtx);
183     return STOP;
184 }
185 
186 class MinimumValueCase : public TestCase
187 {
188 public:
189     MinimumValueCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
190                      QueryType verifierType);
191     MinimumValueCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
192                      QueryType verifierType, glu::ApiType minVersion);
193 
194 private:
195     IterateResult iterate(void);
196 
197     const glw::GLenum m_target;
198     const int m_minValue;
199     const QueryType m_verifierType;
200     const glu::ApiType m_minimumVersion;
201 };
202 
MinimumValueCase(Context & context,const char * name,const char * desc,glw::GLenum target,int minValue,QueryType verifierType)203 MinimumValueCase::MinimumValueCase(Context &context, const char *name, const char *desc, glw::GLenum target,
204                                    int minValue, QueryType verifierType)
205     : TestCase(context, name, desc)
206     , m_target(target)
207     , m_minValue(minValue)
208     , m_verifierType(verifierType)
209     , m_minimumVersion(glu::ApiType::es(3, 1))
210 {
211 }
212 
MinimumValueCase(Context & context,const char * name,const char * desc,glw::GLenum target,int minValue,QueryType verifierType,glu::ApiType minVersion)213 MinimumValueCase::MinimumValueCase(Context &context, const char *name, const char *desc, glw::GLenum target,
214                                    int minValue, QueryType verifierType, glu::ApiType minVersion)
215     : TestCase(context, name, desc)
216     , m_target(target)
217     , m_minValue(minValue)
218     , m_verifierType(verifierType)
219     , m_minimumVersion(minVersion)
220 {
221 }
222 
iterate(void)223 MinimumValueCase::IterateResult MinimumValueCase::iterate(void)
224 {
225     if (!contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5)))
226         TCU_CHECK_AND_THROW(NotSupportedError,
227                             contextSupports(m_context.getRenderContext().getType(), m_minimumVersion),
228                             "Test not supported in this context version.");
229 
230     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
231     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
232 
233     // \note: In GL ES 3.2, the following targets have different limits as in 3.1
234     const int value =
235         contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ?
236             (m_target == GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS ? MAX_FRAG_ATOMIC_COUNTER_BUFFERS_GLES32 // 1
237              :
238              m_target == GL_MAX_FRAGMENT_ATOMIC_COUNTERS ? MAX_FRAG_ATOMIC_COUNTERS_GLES32 // 8
239              :
240              m_target == GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS ? MAX_FRAG_SHADER_STORAGE_BLOCKS_GLES32 // 4
241                                                                  :
242                                                                  m_minValue) :
243             m_minValue;
244 
245     gl.enableLogging(true);
246     verifyStateIntegerMin(result, gl, m_target, value, m_verifierType);
247 
248     result.setTestContextResult(m_testCtx);
249     return STOP;
250 }
251 
252 class AlignmentCase : public TestCase
253 {
254 public:
255     AlignmentCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
256                   QueryType verifierType);
257     AlignmentCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
258                   QueryType verifierType, glu::ApiType minVersion);
259 
260 private:
261     IterateResult iterate(void);
262 
263     const glw::GLenum m_target;
264     const int m_minValue;
265     const QueryType m_verifierType;
266     const glu::ApiType m_minimumVersion;
267 };
268 
AlignmentCase(Context & context,const char * name,const char * desc,glw::GLenum target,int minValue,QueryType verifierType)269 AlignmentCase::AlignmentCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
270                              QueryType verifierType)
271     : TestCase(context, name, desc)
272     , m_target(target)
273     , m_minValue(minValue)
274     , m_verifierType(verifierType)
275     , m_minimumVersion(glu::ApiType::es(3, 1))
276 {
277 }
278 
AlignmentCase(Context & context,const char * name,const char * desc,glw::GLenum target,int minValue,QueryType verifierType,glu::ApiType minVersion)279 AlignmentCase::AlignmentCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
280                              QueryType verifierType, glu::ApiType minVersion)
281     : TestCase(context, name, desc)
282     , m_target(target)
283     , m_minValue(minValue)
284     , m_verifierType(verifierType)
285     , m_minimumVersion(minVersion)
286 {
287 }
288 
iterate(void)289 AlignmentCase::IterateResult AlignmentCase::iterate(void)
290 {
291     if (!contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5)))
292         TCU_CHECK_AND_THROW(NotSupportedError,
293                             contextSupports(m_context.getRenderContext().getType(), m_minimumVersion),
294                             "Test not supported in this context.");
295 
296     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
297     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
298 
299     gl.enableLogging(true);
300     verifyStateIntegerMax(result, gl, m_target, m_minValue, m_verifierType);
301 
302     result.setTestContextResult(m_testCtx);
303     return STOP;
304 }
305 
306 class BufferBindingCase : public TestCase
307 {
308 public:
309     BufferBindingCase(Context &context, const char *name, const char *desc, glw::GLenum queryTarget,
310                       glw::GLenum bindingPoint, QueryType verifierType);
311 
312 private:
313     IterateResult iterate(void);
314 
315     const glw::GLenum m_queryTarget;
316     const glw::GLenum m_bindingPoint;
317     const QueryType m_verifierType;
318 };
319 
BufferBindingCase(Context & context,const char * name,const char * desc,glw::GLenum queryTarget,glw::GLenum bindingPoint,QueryType verifierType)320 BufferBindingCase::BufferBindingCase(Context &context, const char *name, const char *desc, glw::GLenum queryTarget,
321                                      glw::GLenum bindingPoint, QueryType verifierType)
322     : TestCase(context, name, desc)
323     , m_queryTarget(queryTarget)
324     , m_bindingPoint(bindingPoint)
325     , m_verifierType(verifierType)
326 {
327 }
328 
iterate(void)329 BufferBindingCase::IterateResult BufferBindingCase::iterate(void)
330 {
331     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
332     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
333 
334     gl.enableLogging(true);
335 
336     {
337         const tcu::ScopedLogSection section(m_testCtx.getLog(), "Initial", "Initial value");
338 
339         verifyStateInteger(result, gl, m_queryTarget, 0, m_verifierType);
340     }
341 
342     {
343         const tcu::ScopedLogSection section(m_testCtx.getLog(), "AfterBinding", "After binding");
344         glu::Buffer buf(m_context.getRenderContext());
345 
346         gl.glBindBuffer(m_bindingPoint, *buf);
347         GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "setup");
348 
349         verifyStateInteger(result, gl, m_queryTarget, *buf, m_verifierType);
350     }
351 
352     {
353         const tcu::ScopedLogSection section(m_testCtx.getLog(), "AfterDelete", "After deleting");
354         glw::GLuint buf = 0;
355 
356         gl.glGenBuffers(1, &buf);
357         gl.glBindBuffer(m_bindingPoint, buf);
358         gl.glDeleteBuffers(1, &buf);
359         GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "setup");
360 
361         verifyStateInteger(result, gl, m_queryTarget, 0, m_verifierType);
362     }
363 
364     result.setTestContextResult(m_testCtx);
365     return STOP;
366 }
367 
368 class ProgramPipelineBindingCase : public TestCase
369 {
370 public:
371     ProgramPipelineBindingCase(Context &context, const char *name, const char *desc, QueryType verifierType);
372 
373 private:
374     IterateResult iterate(void);
375 
376     const QueryType m_verifierType;
377 };
378 
ProgramPipelineBindingCase(Context & context,const char * name,const char * desc,QueryType verifierType)379 ProgramPipelineBindingCase::ProgramPipelineBindingCase(Context &context, const char *name, const char *desc,
380                                                        QueryType verifierType)
381     : TestCase(context, name, desc)
382     , m_verifierType(verifierType)
383 {
384 }
385 
iterate(void)386 ProgramPipelineBindingCase::IterateResult ProgramPipelineBindingCase::iterate(void)
387 {
388     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
389     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
390 
391     gl.enableLogging(true);
392 
393     {
394         const tcu::ScopedLogSection section(m_testCtx.getLog(), "Initial", "Initial value");
395 
396         verifyStateInteger(result, gl, GL_PROGRAM_PIPELINE_BINDING, 0, m_verifierType);
397     }
398 
399     {
400         const tcu::ScopedLogSection section(m_testCtx.getLog(), "AfterBinding", "After binding");
401         glu::ProgramPipeline pipeline(m_context.getRenderContext());
402 
403         gl.glBindProgramPipeline(pipeline.getPipeline());
404         GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "setup");
405 
406         verifyStateInteger(result, gl, GL_PROGRAM_PIPELINE_BINDING, pipeline.getPipeline(), m_verifierType);
407     }
408 
409     {
410         const tcu::ScopedLogSection section(m_testCtx.getLog(), "AfterDelete", "After deleting");
411         glw::GLuint pipeline = 0;
412 
413         gl.glGenProgramPipelines(1, &pipeline);
414         gl.glBindProgramPipeline(pipeline);
415         gl.glDeleteProgramPipelines(1, &pipeline);
416         GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "setup");
417 
418         verifyStateInteger(result, gl, GL_PROGRAM_PIPELINE_BINDING, 0, m_verifierType);
419     }
420 
421     result.setTestContextResult(m_testCtx);
422     return STOP;
423 }
424 
425 class FramebufferMinimumValueCase : public TestCase
426 {
427 public:
428     FramebufferMinimumValueCase(Context &context, const char *name, const char *desc, glw::GLenum target, int minValue,
429                                 glw::GLenum tiedTo, QueryType verifierType);
430 
431 private:
432     IterateResult iterate(void);
433 
434     const glw::GLenum m_target;
435     const glw::GLenum m_tiedTo;
436     const int m_minValue;
437     const QueryType m_verifierType;
438 };
439 
FramebufferMinimumValueCase(Context & context,const char * name,const char * desc,glw::GLenum target,int minValue,glw::GLenum tiedTo,QueryType verifierType)440 FramebufferMinimumValueCase::FramebufferMinimumValueCase(Context &context, const char *name, const char *desc,
441                                                          glw::GLenum target, int minValue, glw::GLenum tiedTo,
442                                                          QueryType verifierType)
443     : TestCase(context, name, desc)
444     , m_target(target)
445     , m_tiedTo(tiedTo)
446     , m_minValue(minValue)
447     , m_verifierType(verifierType)
448 {
449 }
450 
iterate(void)451 FramebufferMinimumValueCase::IterateResult FramebufferMinimumValueCase::iterate(void)
452 {
453     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
454     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
455 
456     gl.enableLogging(true);
457 
458     {
459         const tcu::ScopedLogSection section(m_testCtx.getLog(), "Minimum",
460                                             "Specified minimum is " + de::toString(m_minValue));
461 
462         verifyStateIntegerMin(result, gl, m_target, m_minValue, m_verifierType);
463     }
464     {
465         const tcu::ScopedLogSection section(m_testCtx.getLog(), "Ties",
466                                             "The limit is tied to the value of " +
467                                                 de::toString(glu::getGettableStateStr(m_tiedTo)));
468         StateQueryMemoryWriteGuard<glw::GLint> tiedToValue;
469 
470         gl.glGetIntegerv(m_tiedTo, &tiedToValue);
471         GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "glGetIntegerv");
472 
473         if (tiedToValue.verifyValidity(result))
474             verifyStateIntegerMin(result, gl, m_target, tiedToValue, m_verifierType);
475     }
476 
477     result.setTestContextResult(m_testCtx);
478     return STOP;
479 }
480 
481 class LegacyVectorLimitCase : public TestCase
482 {
483 public:
484     LegacyVectorLimitCase(Context &context, const char *name, const char *desc, glw::GLenum legacyTarget,
485                           glw::GLenum componentTarget, QueryType verifierType);
486 
487 private:
488     IterateResult iterate(void);
489 
490     const glw::GLenum m_legacyTarget;
491     const glw::GLenum m_componentTarget;
492     const QueryType m_verifierType;
493 };
494 
LegacyVectorLimitCase(Context & context,const char * name,const char * desc,glw::GLenum legacyTarget,glw::GLenum componentTarget,QueryType verifierType)495 LegacyVectorLimitCase::LegacyVectorLimitCase(Context &context, const char *name, const char *desc,
496                                              glw::GLenum legacyTarget, glw::GLenum componentTarget,
497                                              QueryType verifierType)
498     : TestCase(context, name, desc)
499     , m_legacyTarget(legacyTarget)
500     , m_componentTarget(componentTarget)
501     , m_verifierType(verifierType)
502 {
503 }
504 
iterate(void)505 LegacyVectorLimitCase::IterateResult LegacyVectorLimitCase::iterate(void)
506 {
507     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
508     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
509 
510     gl.enableLogging(true);
511 
512     {
513         const tcu::ScopedLogSection section(m_testCtx.getLog(), "TiedTo",
514                                             de::toString(glu::getGettableStateStr(m_legacyTarget)) + " is " +
515                                                 de::toString(glu::getGettableStateStr(m_componentTarget)) +
516                                                 " divided by four");
517 
518         StateQueryMemoryWriteGuard<glw::GLint> value;
519         gl.glGetIntegerv(m_componentTarget, &value);
520         GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "glGetIntegerv");
521 
522         if (value.verifyValidity(result))
523             verifyStateInteger(result, gl, m_legacyTarget, ((int)value) / 4, m_verifierType);
524     }
525 
526     result.setTestContextResult(m_testCtx);
527     return STOP;
528 }
529 
530 class CombinedUniformComponentsCase : public TestCase
531 {
532 public:
533     CombinedUniformComponentsCase(Context &context, const char *name, const char *desc, glw::GLenum target,
534                                   QueryType verifierType);
535     CombinedUniformComponentsCase(Context &context, const char *name, const char *desc, glw::GLenum target,
536                                   QueryType verifierType, glu::ApiType minVersion);
537 
538 private:
539     IterateResult iterate(void);
540     const glw::GLenum m_target;
541     const QueryType m_verifierType;
542     const glu::ApiType m_minimumVersion;
543 };
544 
CombinedUniformComponentsCase(Context & context,const char * name,const char * desc,glw::GLenum target,QueryType verifierType)545 CombinedUniformComponentsCase::CombinedUniformComponentsCase(Context &context, const char *name, const char *desc,
546                                                              glw::GLenum target, QueryType verifierType)
547     : TestCase(context, name, desc)
548     , m_target(target)
549     , m_verifierType(verifierType)
550     , m_minimumVersion(glu::ApiType::es(3, 1))
551 {
552 }
553 
CombinedUniformComponentsCase(Context & context,const char * name,const char * desc,glw::GLenum target,QueryType verifierType,glu::ApiType minVersion)554 CombinedUniformComponentsCase::CombinedUniformComponentsCase(Context &context, const char *name, const char *desc,
555                                                              glw::GLenum target, QueryType verifierType,
556                                                              glu::ApiType minVersion)
557     : TestCase(context, name, desc)
558     , m_target(target)
559     , m_verifierType(verifierType)
560     , m_minimumVersion(minVersion)
561 {
562 }
563 
iterate(void)564 CombinedUniformComponentsCase::IterateResult CombinedUniformComponentsCase::iterate(void)
565 {
566     if (!contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5)))
567         TCU_CHECK_AND_THROW(NotSupportedError,
568                             contextSupports(m_context.getRenderContext().getType(), m_minimumVersion),
569                             "Test not supported in this context.");
570 
571     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
572     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
573 
574     const glw::GLenum maxUniformBlocksEnum =
575         (m_target == GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS)         ? GL_MAX_COMPUTE_UNIFORM_BLOCKS :
576         (m_target == GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS)    ? GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS :
577         (m_target == GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS) ? GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS :
578         (m_target == GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS)        ? GL_MAX_GEOMETRY_UNIFORM_BLOCKS :
579                                                                            -1;
580 
581     const glw::GLenum maxUniformComponentsEnum =
582         (m_target == GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS)         ? GL_MAX_COMPUTE_UNIFORM_COMPONENTS :
583         (m_target == GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS)    ? GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS :
584         (m_target == GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS) ? GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS :
585         (m_target == GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS)        ? GL_MAX_GEOMETRY_UNIFORM_COMPONENTS :
586                                                                            -1;
587 
588     gl.enableLogging(true);
589 
590     m_testCtx.getLog() << tcu::TestLog::Message
591                        << "The minimum value of MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS is MAX_COMPUTE_UNIFORM_BLOCKS "
592                           "x MAX_UNIFORM_BLOCK_SIZE / 4 + MAX_COMPUTE_UNIFORM_COMPONENTS"
593                        << tcu::TestLog::EndMessage;
594 
595     StateQueryMemoryWriteGuard<glw::GLint> maxUniformBlocks;
596     gl.glGetIntegerv(maxUniformBlocksEnum, &maxUniformBlocks);
597     GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "glGetIntegerv");
598 
599     StateQueryMemoryWriteGuard<glw::GLint> maxUniformBlockSize;
600     gl.glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &maxUniformBlockSize);
601     GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "glGetIntegerv");
602 
603     StateQueryMemoryWriteGuard<glw::GLint> maxUniformComponents;
604     gl.glGetIntegerv(maxUniformComponentsEnum, &maxUniformComponents);
605     GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "glGetIntegerv");
606 
607     if (maxUniformBlocks.verifyValidity(result) && maxUniformBlockSize.verifyValidity(result) &&
608         maxUniformComponents.verifyValidity(result))
609         verifyStateIntegerMin(result, gl, m_target,
610                               ((int)maxUniformBlocks) * ((int)maxUniformBlockSize) / 4 + (int)maxUniformComponents,
611                               m_verifierType);
612 
613     result.setTestContextResult(m_testCtx);
614     return STOP;
615 }
616 
617 class TextureGatherLimitCase : public TestCase
618 {
619 public:
620     TextureGatherLimitCase(Context &context, const char *name, const char *desc, bool isMaxCase,
621                            QueryType verifierType);
622 
623 private:
624     IterateResult iterate(void);
625 
626     const bool m_isMaxCase;
627     const QueryType m_verifierType;
628 };
629 
TextureGatherLimitCase(Context & context,const char * name,const char * desc,bool isMaxCase,QueryType verifierType)630 TextureGatherLimitCase::TextureGatherLimitCase(Context &context, const char *name, const char *desc, bool isMaxCase,
631                                                QueryType verifierType)
632     : TestCase(context, name, desc)
633     , m_isMaxCase(isMaxCase)
634     , m_verifierType(verifierType)
635 {
636 }
637 
iterate(void)638 TextureGatherLimitCase::IterateResult TextureGatherLimitCase::iterate(void)
639 {
640     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
641     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
642 
643     gl.enableLogging(true);
644 
645     if (m_isMaxCase)
646     {
647         // range [0, inf)
648         verifyStateIntegerMin(result, gl, GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET, 0, m_verifierType);
649     }
650     else
651     {
652         // range (-inf, 0]
653         verifyStateIntegerMax(result, gl, GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET, 0, m_verifierType);
654     }
655 
656     result.setTestContextResult(m_testCtx);
657     return STOP;
658 }
659 
660 class MaxUniformBufferBindingsCase : public TestCase
661 {
662 public:
663     MaxUniformBufferBindingsCase(Context &context, const char *name, const char *desc, QueryType verifierType);
664 
665 private:
666     IterateResult iterate(void);
667 
668     const QueryType m_verifierType;
669 };
670 
MaxUniformBufferBindingsCase(Context & context,const char * name,const char * desc,QueryType verifierType)671 MaxUniformBufferBindingsCase::MaxUniformBufferBindingsCase(Context &context, const char *name, const char *desc,
672                                                            QueryType verifierType)
673     : TestCase(context, name, desc)
674     , m_verifierType(verifierType)
675 {
676 }
677 
iterate(void)678 MaxUniformBufferBindingsCase::IterateResult MaxUniformBufferBindingsCase::iterate(void)
679 {
680     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
681     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
682     int minMax;
683 
684     gl.enableLogging(true);
685 
686     if (contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)))
687     {
688         minMax = 72;
689     }
690     else
691     {
692         if (m_context.getContextInfo().isExtensionSupported("GL_EXT_tessellation_shader"))
693         {
694             m_testCtx.getLog()
695                 << tcu::TestLog::Message
696                 << "GL_EXT_tessellation_shader increases the minimum value of GL_MAX_UNIFORM_BUFFER_BINDINGS to 72"
697                 << tcu::TestLog::EndMessage;
698             minMax = 72;
699         }
700         else if (m_context.getContextInfo().isExtensionSupported("GL_EXT_geometry_shader"))
701         {
702             m_testCtx.getLog()
703                 << tcu::TestLog::Message
704                 << "GL_EXT_geometry_shader increases the minimum value of GL_MAX_UNIFORM_BUFFER_BINDINGS to 48"
705                 << tcu::TestLog::EndMessage;
706             minMax = 48;
707         }
708         else
709         {
710             minMax = 36;
711         }
712     }
713 
714     // range [0, inf)
715     verifyStateIntegerMin(result, gl, GL_MAX_UNIFORM_BUFFER_BINDINGS, minMax, m_verifierType);
716 
717     result.setTestContextResult(m_testCtx);
718     return STOP;
719 }
720 
721 class MaxCombinedUniformBlocksCase : public TestCase
722 {
723 public:
724     MaxCombinedUniformBlocksCase(Context &context, const char *name, const char *desc, QueryType verifierType);
725 
726 private:
727     IterateResult iterate(void);
728 
729     const QueryType m_verifierType;
730 };
731 
MaxCombinedUniformBlocksCase(Context & context,const char * name,const char * desc,QueryType verifierType)732 MaxCombinedUniformBlocksCase::MaxCombinedUniformBlocksCase(Context &context, const char *name, const char *desc,
733                                                            QueryType verifierType)
734     : TestCase(context, name, desc)
735     , m_verifierType(verifierType)
736 {
737 }
738 
iterate(void)739 MaxCombinedUniformBlocksCase::IterateResult MaxCombinedUniformBlocksCase::iterate(void)
740 {
741     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
742     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
743     int minMax;
744 
745     gl.enableLogging(true);
746 
747     if (contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)))
748     {
749         minMax = 60;
750     }
751     else
752     {
753         if (m_context.getContextInfo().isExtensionSupported("GL_EXT_tessellation_shader"))
754         {
755             m_testCtx.getLog()
756                 << tcu::TestLog::Message
757                 << "GL_EXT_tessellation_shader increases the minimum value of GL_MAX_COMBINED_UNIFORM_BLOCKS to 60"
758                 << tcu::TestLog::EndMessage;
759             minMax = 60;
760         }
761         else if (m_context.getContextInfo().isExtensionSupported("GL_EXT_geometry_shader"))
762         {
763             m_testCtx.getLog()
764                 << tcu::TestLog::Message
765                 << "GL_EXT_geometry_shader increases the minimum value of GL_MAX_COMBINED_UNIFORM_BLOCKS to 36"
766                 << tcu::TestLog::EndMessage;
767             minMax = 36;
768         }
769         else
770         {
771             minMax = 24;
772         }
773     }
774 
775     // range [0, inf)
776     verifyStateIntegerMin(result, gl, GL_MAX_COMBINED_UNIFORM_BLOCKS, minMax, m_verifierType);
777 
778     result.setTestContextResult(m_testCtx);
779     return STOP;
780 }
781 
782 class MaxCombinedTexImageUnitsCase : public TestCase
783 {
784 public:
785     MaxCombinedTexImageUnitsCase(Context &context, const char *name, const char *desc, QueryType verifierType);
786 
787 private:
788     IterateResult iterate(void);
789 
790     const QueryType m_verifierType;
791 };
792 
MaxCombinedTexImageUnitsCase(Context & context,const char * name,const char * desc,QueryType verifierType)793 MaxCombinedTexImageUnitsCase::MaxCombinedTexImageUnitsCase(Context &context, const char *name, const char *desc,
794                                                            QueryType verifierType)
795     : TestCase(context, name, desc)
796     , m_verifierType(verifierType)
797 {
798 }
799 
iterate(void)800 MaxCombinedTexImageUnitsCase::IterateResult MaxCombinedTexImageUnitsCase::iterate(void)
801 {
802     glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
803     tcu::ResultCollector result(m_testCtx.getLog(), " // ERROR: ");
804     int minMax;
805 
806     gl.enableLogging(true);
807     if (contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)))
808     {
809         minMax = 96;
810     }
811     else
812     {
813         if (m_context.getContextInfo().isExtensionSupported("GL_EXT_tessellation_shader"))
814         {
815             m_testCtx.getLog()
816                 << tcu::TestLog::Message
817                 << "GL_EXT_tessellation_shader increases the minimum value of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS to 96"
818                 << tcu::TestLog::EndMessage;
819             minMax = 96;
820         }
821         else if (m_context.getContextInfo().isExtensionSupported("GL_EXT_geometry_shader"))
822         {
823             m_testCtx.getLog()
824                 << tcu::TestLog::Message
825                 << "GL_EXT_geometry_shader increases the minimum value of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS to 36"
826                 << tcu::TestLog::EndMessage;
827             minMax = 64;
828         }
829         else
830         {
831             minMax = 48;
832         }
833     }
834 
835     // range [0, inf)
836     verifyStateIntegerMin(result, gl, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, minMax, m_verifierType);
837 
838     result.setTestContextResult(m_testCtx);
839     return STOP;
840 }
841 
842 } // namespace
843 
IntegerStateQueryTests(Context & context)844 IntegerStateQueryTests::IntegerStateQueryTests(Context &context)
845     : TestCaseGroup(context, "integer", "Integer state query tests")
846 {
847 }
848 
~IntegerStateQueryTests(void)849 IntegerStateQueryTests::~IntegerStateQueryTests(void)
850 {
851 }
852 
init(void)853 void IntegerStateQueryTests::init(void)
854 {
855     // Verifiers
856     const QueryType verifiers[] = {QUERY_BOOLEAN, QUERY_INTEGER, QUERY_INTEGER64, QUERY_FLOAT};
857 
858 #define FOR_EACH_VERIFIER(X)                                                              \
859     for (int verifierNdx = 0; verifierNdx < DE_LENGTH_OF_ARRAY(verifiers); ++verifierNdx) \
860     {                                                                                     \
861         const char *verifierSuffix = getVerifierSuffix(verifiers[verifierNdx]);           \
862         const QueryType verifier   = verifiers[verifierNdx];                              \
863         this->addChild(X);                                                                \
864     }
865 
866     FOR_EACH_VERIFIER(
867         new MaxSamplesCase(m_context, (std::string() + "max_color_texture_samples_" + verifierSuffix).c_str(),
868                            "Test GL_MAX_COLOR_TEXTURE_SAMPLES", GL_MAX_COLOR_TEXTURE_SAMPLES, 1, verifier))
869     FOR_EACH_VERIFIER(
870         new MaxSamplesCase(m_context, (std::string() + "max_depth_texture_samples_" + verifierSuffix).c_str(),
871                            "Test GL_MAX_DEPTH_TEXTURE_SAMPLES", GL_MAX_DEPTH_TEXTURE_SAMPLES, 1, verifier))
872     FOR_EACH_VERIFIER(new MaxSamplesCase(m_context, (std::string() + "max_integer_samples_" + verifierSuffix).c_str(),
873                                          "Test GL_MAX_INTEGER_SAMPLES", GL_MAX_INTEGER_SAMPLES, 1, verifier))
874 
875     FOR_EACH_VERIFIER(new TexBindingCase(
876         m_context, (std::string() + "texture_binding_2d_multisample_" + verifierSuffix).c_str(),
877         "Test TEXTURE_BINDING_2D_MULTISAMPLE", GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_BINDING_2D_MULTISAMPLE, verifier))
878     FOR_EACH_VERIFIER(new TexBindingCase(
879         m_context, (std::string() + "texture_binding_2d_multisample_array_" + verifierSuffix).c_str(),
880         "Test TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY", GL_TEXTURE_2D_MULTISAMPLE_ARRAY,
881         GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY, verifier))
882     FOR_EACH_VERIFIER(new TexBindingCase(
883         m_context, (std::string() + "texture_binding_cube_map_array_" + verifierSuffix).c_str(),
884         "Test TEXTURE_BINDING_CUBE_MAP_ARRAY", GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BINDING_CUBE_MAP_ARRAY, verifier))
885     FOR_EACH_VERIFIER(
886         new TexBindingCase(m_context, (std::string() + "texture_binding_buffer_" + verifierSuffix).c_str(),
887                            "Test TEXTURE_BINDING_BUFFER", GL_TEXTURE_BUFFER, GL_TEXTURE_BINDING_BUFFER, verifier))
888 
889     FOR_EACH_VERIFIER(new MinimumValueCase(
890         m_context, (std::string() + "max_vertex_attrib_relative_offset_" + verifierSuffix).c_str(),
891         "Test MAX_VERTEX_ATTRIB_RELATIVE_OFFSET", GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET, 2047, verifier))
892     FOR_EACH_VERIFIER(
893         new MinimumValueCase(m_context, (std::string() + "max_vertex_attrib_bindings_" + verifierSuffix).c_str(),
894                              "Test MAX_VERTEX_ATTRIB_BINDINGS", GL_MAX_VERTEX_ATTRIB_BINDINGS, 16, verifier))
895     FOR_EACH_VERIFIER(
896         new MinimumValueCase(m_context, (std::string() + "max_vertex_attrib_stride_" + verifierSuffix).c_str(),
897                              "Test MAX_VERTEX_ATTRIB_STRIDE", GL_MAX_VERTEX_ATTRIB_STRIDE, 2048, verifier))
898     FOR_EACH_VERIFIER(new MinimumValueCase(m_context,
899                                            (std::string() + "max_sample_mask_words_" + verifierSuffix).c_str(),
900                                            "Test MAX_SAMPLE_MASK_WORDS", GL_MAX_SAMPLE_MASK_WORDS, 1, verifier))
901 
902     FOR_EACH_VERIFIER(new AlignmentCase(
903         m_context, (std::string() + "shader_storage_buffer_offset_alignment_" + verifierSuffix).c_str(),
904         "Test SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT", GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT, 256, verifier))
905 
906     FOR_EACH_VERIFIER(new BufferBindingCase(
907         m_context, (std::string() + "draw_indirect_buffer_binding_" + verifierSuffix).c_str(),
908         "Test DRAW_INDIRECT_BUFFER_BINDING", GL_DRAW_INDIRECT_BUFFER_BINDING, GL_DRAW_INDIRECT_BUFFER, verifier))
909     FOR_EACH_VERIFIER(new BufferBindingCase(
910         m_context, (std::string() + "atomic_counter_buffer_binding_" + verifierSuffix).c_str(),
911         "Test ATOMIC_COUNTER_BUFFER_BINDING", GL_ATOMIC_COUNTER_BUFFER_BINDING, GL_ATOMIC_COUNTER_BUFFER, verifier))
912     FOR_EACH_VERIFIER(new BufferBindingCase(
913         m_context, (std::string() + "shader_storage_buffer_binding_" + verifierSuffix).c_str(),
914         "Test SHADER_STORAGE_BUFFER_BINDING", GL_SHADER_STORAGE_BUFFER_BINDING, GL_SHADER_STORAGE_BUFFER, verifier))
915     FOR_EACH_VERIFIER(
916         new BufferBindingCase(m_context, (std::string() + "dispatch_indirect_buffer_binding_" + verifierSuffix).c_str(),
917                               "Test DISPATCH_INDIRECT_BUFFER_BINDING", GL_DISPATCH_INDIRECT_BUFFER_BINDING,
918                               GL_DISPATCH_INDIRECT_BUFFER, verifier))
919 
920     FOR_EACH_VERIFIER(new FramebufferMinimumValueCase(
921         m_context, (std::string() + "max_framebuffer_width_" + verifierSuffix).c_str(), "Test MAX_FRAMEBUFFER_WIDTH",
922         GL_MAX_FRAMEBUFFER_WIDTH, 2048, GL_MAX_TEXTURE_SIZE, verifier))
923     FOR_EACH_VERIFIER(new FramebufferMinimumValueCase(
924         m_context, (std::string() + "max_framebuffer_height_" + verifierSuffix).c_str(), "Test MAX_FRAMEBUFFER_HEIGHT",
925         GL_MAX_FRAMEBUFFER_HEIGHT, 2048, GL_MAX_TEXTURE_SIZE, verifier))
926     FOR_EACH_VERIFIER(new FramebufferMinimumValueCase(
927         m_context, (std::string() + "max_framebuffer_samples_" + verifierSuffix).c_str(),
928         "Test MAX_FRAMEBUFFER_SAMPLES", GL_MAX_FRAMEBUFFER_SAMPLES, 4, GL_MAX_SAMPLES, verifier))
929 
930     FOR_EACH_VERIFIER(new ProgramPipelineBindingCase(
931         m_context, (std::string() + "program_pipeline_binding_" + verifierSuffix).c_str(),
932         "Test PROGRAM_PIPELINE_BINDING", verifier))
933 
934     // vertex
935     FOR_EACH_VERIFIER(new MinimumValueCase(
936         m_context, (std::string() + "max_vertex_atomic_counter_buffers_" + verifierSuffix).c_str(),
937         "Test MAX_VERTEX_ATOMIC_COUNTER_BUFFERS", GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS, 0, verifier))
938     FOR_EACH_VERIFIER(
939         new MinimumValueCase(m_context, (std::string() + "max_vertex_atomic_counters_" + verifierSuffix).c_str(),
940                              "Test MAX_VERTEX_ATOMIC_COUNTERS", GL_MAX_VERTEX_ATOMIC_COUNTERS, 0, verifier))
941     FOR_EACH_VERIFIER(new MinimumValueCase(m_context,
942                                            (std::string() + "max_vertex_image_uniforms_" + verifierSuffix).c_str(),
943                                            "Test MAX_VERTEX_IMAGE_UNIFORMS", GL_MAX_VERTEX_IMAGE_UNIFORMS, 0, verifier))
944     FOR_EACH_VERIFIER(
945         new MinimumValueCase(m_context, (std::string() + "max_vertex_shader_storage_blocks_" + verifierSuffix).c_str(),
946                              "Test MAX_VERTEX_SHADER_STORAGE_BLOCKS", GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, 0, verifier))
947     FOR_EACH_VERIFIER(
948         new MinimumValueCase(m_context, (std::string() + "max_vertex_uniform_components_" + verifierSuffix).c_str(),
949                              "Test MAX_VERTEX_UNIFORM_COMPONENTS", GL_MAX_VERTEX_UNIFORM_COMPONENTS, 1024, verifier))
950 
951     // fragment
952     FOR_EACH_VERIFIER(new MinimumValueCase(
953         m_context, (std::string() + "max_fragment_atomic_counter_buffers_" + verifierSuffix).c_str(),
954         "Test MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS", GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS, 0, verifier))
955     FOR_EACH_VERIFIER(
956         new MinimumValueCase(m_context, (std::string() + "max_fragment_atomic_counters_" + verifierSuffix).c_str(),
957                              "Test MAX_FRAGMENT_ATOMIC_COUNTERS", GL_MAX_FRAGMENT_ATOMIC_COUNTERS, 0, verifier))
958     FOR_EACH_VERIFIER(
959         new MinimumValueCase(m_context, (std::string() + "max_fragment_image_uniforms_" + verifierSuffix).c_str(),
960                              "Test MAX_FRAGMENT_IMAGE_UNIFORMS", GL_MAX_FRAGMENT_IMAGE_UNIFORMS, 0, verifier))
961     FOR_EACH_VERIFIER(new MinimumValueCase(
962         m_context, (std::string() + "max_fragment_shader_storage_blocks_" + verifierSuffix).c_str(),
963         "Test MAX_FRAGMENT_SHADER_STORAGE_BLOCKS", GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS, 0, verifier))
964     FOR_EACH_VERIFIER(new MinimumValueCase(
965         m_context, (std::string() + "max_fragment_uniform_components_" + verifierSuffix).c_str(),
966         "Test MAX_FRAGMENT_UNIFORM_COMPONENTS", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 1024, verifier))
967 
968     // compute
969     FOR_EACH_VERIFIER(new MinimumValueCase(
970         m_context, (std::string() + "max_compute_work_group_invocations_" + verifierSuffix).c_str(),
971         "Test MAX_COMPUTE_WORK_GROUP_INVOCATIONS", GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, 128, verifier))
972     FOR_EACH_VERIFIER(
973         new MinimumValueCase(m_context, (std::string() + "max_compute_uniform_blocks_" + verifierSuffix).c_str(),
974                              "Test MAX_COMPUTE_UNIFORM_BLOCKS", GL_MAX_COMPUTE_UNIFORM_BLOCKS, 12, verifier))
975     FOR_EACH_VERIFIER(
976         new MinimumValueCase(m_context, (std::string() + "max_compute_texture_image_units_" + verifierSuffix).c_str(),
977                              "Test MAX_COMPUTE_TEXTURE_IMAGE_UNITS", GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS, 16, verifier))
978     FOR_EACH_VERIFIER(
979         new MinimumValueCase(m_context, (std::string() + "max_compute_shared_memory_size_" + verifierSuffix).c_str(),
980                              "Test MAX_COMPUTE_SHARED_MEMORY_SIZE", GL_MAX_COMPUTE_SHARED_MEMORY_SIZE, 16384, verifier))
981     FOR_EACH_VERIFIER(
982         new MinimumValueCase(m_context, (std::string() + "max_compute_uniform_components_" + verifierSuffix).c_str(),
983                              "Test MAX_COMPUTE_UNIFORM_COMPONENTS", GL_MAX_COMPUTE_UNIFORM_COMPONENTS, 1024, verifier))
984     FOR_EACH_VERIFIER(new MinimumValueCase(
985         m_context, (std::string() + "max_compute_atomic_counter_buffers_" + verifierSuffix).c_str(),
986         "Test MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS", GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS, 1, verifier))
987     FOR_EACH_VERIFIER(
988         new MinimumValueCase(m_context, (std::string() + "max_compute_atomic_counters_" + verifierSuffix).c_str(),
989                              "Test MAX_COMPUTE_ATOMIC_COUNTERS", GL_MAX_COMPUTE_ATOMIC_COUNTERS, 8, verifier))
990     FOR_EACH_VERIFIER(
991         new MinimumValueCase(m_context, (std::string() + "max_compute_image_uniforms_" + verifierSuffix).c_str(),
992                              "Test MAX_COMPUTE_IMAGE_UNIFORMS", GL_MAX_COMPUTE_IMAGE_UNIFORMS, 4, verifier))
993     FOR_EACH_VERIFIER(new MinimumValueCase(
994         m_context, (std::string() + "max_compute_shader_storage_blocks_" + verifierSuffix).c_str(),
995         "Test MAX_COMPUTE_SHADER_STORAGE_BLOCKS", GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS, 4, verifier))
996 
997     FOR_EACH_VERIFIER(new MinimumValueCase(m_context,
998                                            (std::string() + "max_uniform_locations_" + verifierSuffix).c_str(),
999                                            "Test MAX_UNIFORM_LOCATIONS", GL_MAX_UNIFORM_LOCATIONS, 1024, verifier))
1000     FOR_EACH_VERIFIER(new MinimumValueCase(
1001         m_context, (std::string() + "max_atomic_counter_buffer_bindings_" + verifierSuffix).c_str(),
1002         "Test MAX_ATOMIC_COUNTER_BUFFER_BINDINGS", GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, 1, verifier))
1003     FOR_EACH_VERIFIER(
1004         new MinimumValueCase(m_context, (std::string() + "max_atomic_counter_buffer_size_" + verifierSuffix).c_str(),
1005                              "Test MAX_ATOMIC_COUNTER_BUFFER_SIZE", GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE, 32, verifier))
1006     FOR_EACH_VERIFIER(new MinimumValueCase(
1007         m_context, (std::string() + "max_combined_atomic_counter_buffers_" + verifierSuffix).c_str(),
1008         "Test MAX_COMBINED_ATOMIC_COUNTER_BUFFERS", GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS, 1, verifier))
1009     FOR_EACH_VERIFIER(
1010         new MinimumValueCase(m_context, (std::string() + "max_combined_atomic_counters_" + verifierSuffix).c_str(),
1011                              "Test MAX_COMBINED_ATOMIC_COUNTERS", GL_MAX_COMBINED_ATOMIC_COUNTERS, 8, verifier))
1012     FOR_EACH_VERIFIER(new MinimumValueCase(m_context, (std::string() + "max_image_units_" + verifierSuffix).c_str(),
1013                                            "Test MAX_IMAGE_UNITS", GL_MAX_IMAGE_UNITS, 4, verifier))
1014     FOR_EACH_VERIFIER(
1015         new MinimumValueCase(m_context, (std::string() + "max_combined_image_uniforms_" + verifierSuffix).c_str(),
1016                              "Test MAX_COMBINED_IMAGE_UNIFORMS", GL_MAX_COMBINED_IMAGE_UNIFORMS, 4, verifier))
1017     FOR_EACH_VERIFIER(new MinimumValueCase(
1018         m_context, (std::string() + "max_shader_storage_buffer_bindings_" + verifierSuffix).c_str(),
1019         "Test MAX_SHADER_STORAGE_BUFFER_BINDINGS", GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, 4, verifier))
1020     FOR_EACH_VERIFIER(
1021         new MinimumValueCase(m_context, (std::string() + "max_shader_storage_block_size_" + verifierSuffix).c_str(),
1022                              "Test MAX_SHADER_STORAGE_BLOCK_SIZE", GL_MAX_SHADER_STORAGE_BLOCK_SIZE, 1 << 27, verifier))
1023     FOR_EACH_VERIFIER(new MinimumValueCase(
1024         m_context, (std::string() + "max_combined_shader_storage_blocks_" + verifierSuffix).c_str(),
1025         "Test MAX_COMBINED_SHADER_STORAGE_BLOCKS", GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, 4, verifier))
1026     FOR_EACH_VERIFIER(new MinimumValueCase(
1027         m_context, (std::string() + "max_combined_shader_output_resources_" + verifierSuffix).c_str(),
1028         "Test MAX_COMBINED_SHADER_OUTPUT_RESOURCES", GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES, 4, verifier))
1029 
1030     FOR_EACH_VERIFIER(new MaxUniformBufferBindingsCase(
1031         m_context, (std::string() + "max_uniform_buffer_bindings_" + verifierSuffix).c_str(),
1032         "Test MAX_UNIFORM_BUFFER_BINDINGS", verifier))
1033     FOR_EACH_VERIFIER(new MaxCombinedUniformBlocksCase(
1034         m_context, (std::string() + "max_combined_uniform_blocks_" + verifierSuffix).c_str(),
1035         "Test MAX_COMBINED_UNIFORM_BLOCKS", verifier))
1036     FOR_EACH_VERIFIER(new MaxCombinedTexImageUnitsCase(
1037         m_context, (std::string() + "max_combined_texture_image_units_" + verifierSuffix).c_str(),
1038         "Test MAX_COMBINED_TEXTURE_IMAGE_UNITS", verifier))
1039     FOR_EACH_VERIFIER(new CombinedUniformComponentsCase(
1040         m_context, (std::string() + "max_combined_compute_uniform_components_" + verifierSuffix).c_str(),
1041         "Test MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS", GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS, verifier))
1042 
1043     FOR_EACH_VERIFIER(new LegacyVectorLimitCase(
1044         m_context, (std::string() + "max_vertex_uniform_vectors_" + verifierSuffix).c_str(),
1045         "Test MAX_VERTEX_UNIFORM_VECTORS", GL_MAX_VERTEX_UNIFORM_VECTORS, GL_MAX_VERTEX_UNIFORM_COMPONENTS, verifier))
1046     FOR_EACH_VERIFIER(
1047         new LegacyVectorLimitCase(m_context, (std::string() + "max_fragment_uniform_vectors_" + verifierSuffix).c_str(),
1048                                   "Test MAX_FRAGMENT_UNIFORM_VECTORS", GL_MAX_FRAGMENT_UNIFORM_VECTORS,
1049                                   GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, verifier))
1050 
1051     FOR_EACH_VERIFIER(new TextureGatherLimitCase(
1052         m_context, (std::string() + "min_program_texture_gather_offset_" + verifierSuffix).c_str(),
1053         "Test MIN_PROGRAM_TEXTURE_GATHER_OFFSET", false, verifier))
1054     FOR_EACH_VERIFIER(new TextureGatherLimitCase(
1055         m_context, (std::string() + "max_program_texture_gather_offset_" + verifierSuffix).c_str(),
1056         "Test MAX_PROGRAM_TEXTURE_GATHER_OFFSET", true, verifier))
1057 
1058     // GL ES 3.2 tests
1059     FOR_EACH_VERIFIER(new MinimumValueCase(
1060         m_context, (std::string() + "max_framebuffer_layers_" + verifierSuffix).c_str(), "Test MAX_FRAMEBUFFER_LAYERS",
1061         GL_MAX_FRAMEBUFFER_LAYERS, 256, verifier, glu::ApiType::es(3, 2)))
1062     FOR_EACH_VERIFIER(new MinimumValueCase(
1063         m_context, (std::string() + "fragment_interpolation_offset_bits_" + verifierSuffix).c_str(),
1064         "Test FRAGMENT_INTERPOLATION_OFFSET_BITS", GL_FRAGMENT_INTERPOLATION_OFFSET_BITS, 4, verifier,
1065         glu::ApiType::es(3, 2)))
1066     FOR_EACH_VERIFIER(new MinimumValueCase(
1067         m_context, (std::string() + "max_texture_buffer_size_" + verifierSuffix).c_str(),
1068         "Test MAX_TEXTURE_BUFFER_SIZE", GL_MAX_TEXTURE_BUFFER_SIZE, 65536, verifier, glu::ApiType::es(3, 2)))
1069     FOR_EACH_VERIFIER(new AlignmentCase(m_context,
1070                                         (std::string() + "texture_buffer_offset_alignment_" + verifierSuffix).c_str(),
1071                                         "Test TEXTURE_BUFFER_OFFSET_ALIGNMENT", GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT, 256,
1072                                         verifier, glu::ApiType::es(3, 2)))
1073 
1074     FOR_EACH_VERIFIER(new MinimumValueCase(m_context, (std::string() + "max_tess_gen_level_" + verifierSuffix).c_str(),
1075                                            "Test MAX_TESS_GEN_LEVEL", GL_MAX_TESS_GEN_LEVEL, 64, verifier,
1076                                            glu::ApiType::es(3, 2)))
1077     FOR_EACH_VERIFIER(new MinimumValueCase(m_context, (std::string() + "max_patch_vertices_" + verifierSuffix).c_str(),
1078                                            "Test MAX_PATCH_VERTICES", GL_MAX_PATCH_VERTICES, 32, verifier,
1079                                            glu::ApiType::es(3, 2)))
1080     FOR_EACH_VERIFIER(new MinimumValueCase(
1081         m_context, (std::string() + "max_tess_patch_components_" + verifierSuffix).c_str(),
1082         "Test MAX_TESS_PATCH_COMPONENTS", GL_MAX_TESS_PATCH_COMPONENTS, 120, verifier, glu::ApiType::es(3, 2)))
1083 
1084     // tess control
1085     FOR_EACH_VERIFIER(new MinimumValueCase(
1086         m_context, (std::string() + "max_tess_control_uniform_components_" + verifierSuffix).c_str(),
1087         "Test MAX_TESS_CONTROL_UNIFORM_COMPONENTS", GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS, 1024, verifier,
1088         glu::ApiType::es(3, 2)))
1089     FOR_EACH_VERIFIER(new MinimumValueCase(
1090         m_context, (std::string() + "max_tess_control_texture_image_units_" + verifierSuffix).c_str(),
1091         "Test MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS", GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS, 16, verifier,
1092         glu::ApiType::es(3, 2)))
1093     FOR_EACH_VERIFIER(new MinimumValueCase(
1094         m_context, (std::string() + "max_tess_control_output_components_" + verifierSuffix).c_str(),
1095         "Test MAX_TESS_CONTROL_OUTPUT_COMPONENTS", GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS, 64, verifier,
1096         glu::ApiType::es(3, 2)))
1097     FOR_EACH_VERIFIER(new MinimumValueCase(
1098         m_context, (std::string() + "max_tess_control_total_output_components_" + verifierSuffix).c_str(),
1099         "Test MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS", GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS, 2048, verifier,
1100         glu::ApiType::es(3, 2)))
1101     FOR_EACH_VERIFIER(
1102         new MinimumValueCase(m_context, (std::string() + "max_tess_control_input_components_" + verifierSuffix).c_str(),
1103                              "Test MAX_TESS_CONTROL_INPUT_COMPONENTS", GL_MAX_TESS_CONTROL_INPUT_COMPONENTS, 64,
1104                              verifier, glu::ApiType::es(3, 2)))
1105     FOR_EACH_VERIFIER(
1106         new MinimumValueCase(m_context, (std::string() + "max_tess_control_uniform_blocks_" + verifierSuffix).c_str(),
1107                              "Test MAX_TESS_CONTROL_UNIFORM_BLOCKS", GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS, 12, verifier,
1108                              glu::ApiType::es(3, 2)))
1109     FOR_EACH_VERIFIER(new MinimumValueCase(
1110         m_context, (std::string() + "max_tess_control_atomic_counter_buffers_" + verifierSuffix).c_str(),
1111         "Test MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS", GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS, 0, verifier,
1112         glu::ApiType::es(3, 2)))
1113     FOR_EACH_VERIFIER(
1114         new MinimumValueCase(m_context, (std::string() + "max_tess_control_atomic_counters_" + verifierSuffix).c_str(),
1115                              "Test MAX_TESS_CONTROL_ATOMIC_COUNTERS", GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS, 0, verifier,
1116                              glu::ApiType::es(3, 2)))
1117     FOR_EACH_VERIFIER(new MinimumValueCase(
1118         m_context, (std::string() + "max_tess_control_shader_storage_blocks_" + verifierSuffix).c_str(),
1119         "Test MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS", GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS, 0, verifier,
1120         glu::ApiType::es(3, 2)))
1121 
1122     // tess evaluation
1123     FOR_EACH_VERIFIER(new MinimumValueCase(
1124         m_context, (std::string() + "max_tess_evaluation_uniform_components_" + verifierSuffix).c_str(),
1125         "Test MAX_TESS_EVALUATION_UNIFORM_COMPONENTS", GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS, 1024, verifier,
1126         glu::ApiType::es(3, 2)))
1127     FOR_EACH_VERIFIER(new MinimumValueCase(
1128         m_context, (std::string() + "max_tess_evaluation_texture_image_units_" + verifierSuffix).c_str(),
1129         "Test MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS", GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS, 16, verifier,
1130         glu::ApiType::es(3, 2)))
1131     FOR_EACH_VERIFIER(new MinimumValueCase(
1132         m_context, (std::string() + "max_tess_evaluation_output_components_" + verifierSuffix).c_str(),
1133         "Test MAX_TESS_EVALUATION_OUTPUT_COMPONENTS", GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS, 64, verifier,
1134         glu::ApiType::es(3, 2)))
1135     FOR_EACH_VERIFIER(new MinimumValueCase(
1136         m_context, (std::string() + "max_tess_evaluation_input_components_" + verifierSuffix).c_str(),
1137         "Test MAX_TESS_EVALUATION_INPUT_COMPONENTS", GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS, 64, verifier,
1138         glu::ApiType::es(3, 2)))
1139     FOR_EACH_VERIFIER(new MinimumValueCase(
1140         m_context, (std::string() + "max_tess_evaluation_uniform_blocks_" + verifierSuffix).c_str(),
1141         "Test MAX_TESS_EVALUATION_UNIFORM_BLOCKS", GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS, 12, verifier,
1142         glu::ApiType::es(3, 2)))
1143     FOR_EACH_VERIFIER(new MinimumValueCase(
1144         m_context, (std::string() + "max_tess_evaluation_atomic_counter_buffers_" + verifierSuffix).c_str(),
1145         "Test MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS", GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS, 0, verifier,
1146         glu::ApiType::es(3, 2)))
1147     FOR_EACH_VERIFIER(new MinimumValueCase(
1148         m_context, (std::string() + "max_tess_evaluation_atomic_counters_" + verifierSuffix).c_str(),
1149         "Test MAX_TESS_EVALUATION_ATOMIC_COUNTERS", GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS, 0, verifier,
1150         glu::ApiType::es(3, 2)))
1151     FOR_EACH_VERIFIER(new MinimumValueCase(
1152         m_context, (std::string() + "max_tess_evaluation_shader_storage_blocks_" + verifierSuffix).c_str(),
1153         "Test MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS", GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS, 0, verifier,
1154         glu::ApiType::es(3, 2)))
1155 
1156     // geometry
1157     FOR_EACH_VERIFIER(
1158         new MinimumValueCase(m_context, (std::string() + "max_geometry_uniform_components_" + verifierSuffix).c_str(),
1159                              "Test MAX_GEOMETRY_UNIFORM_COMPONENTS", GL_MAX_GEOMETRY_UNIFORM_COMPONENTS, 1024, verifier,
1160                              glu::ApiType::es(3, 2)))
1161     FOR_EACH_VERIFIER(new MinimumValueCase(
1162         m_context, (std::string() + "max_geometry_uniform_blocks_" + verifierSuffix).c_str(),
1163         "Test MAX_GEOMETRY_UNIFORM_BLOCKS", GL_MAX_GEOMETRY_UNIFORM_BLOCKS, 12, verifier, glu::ApiType::es(3, 2)))
1164     FOR_EACH_VERIFIER(new MinimumValueCase(
1165         m_context, (std::string() + "max_geometry_input_components_" + verifierSuffix).c_str(),
1166         "Test MAX_GEOMETRY_INPUT_COMPONENTS", GL_MAX_GEOMETRY_INPUT_COMPONENTS, 64, verifier, glu::ApiType::es(3, 2)))
1167     FOR_EACH_VERIFIER(new MinimumValueCase(
1168         m_context, (std::string() + "max_geometry_output_components_" + verifierSuffix).c_str(),
1169         "Test MAX_GEOMETRY_OUTPUT_COMPONENTS", GL_MAX_GEOMETRY_OUTPUT_COMPONENTS, 64, verifier, glu::ApiType::es(3, 2)))
1170     FOR_EACH_VERIFIER(new MinimumValueCase(
1171         m_context, (std::string() + "max_geometry_output_vertices_" + verifierSuffix).c_str(),
1172         "Test MAX_GEOMETRY_OUTPUT_VERTICES", GL_MAX_GEOMETRY_OUTPUT_VERTICES, 256, verifier, glu::ApiType::es(3, 2)))
1173     FOR_EACH_VERIFIER(new MinimumValueCase(
1174         m_context, (std::string() + "max_geometry_total_output_components_" + verifierSuffix).c_str(),
1175         "Test MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS", GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, 1024, verifier,
1176         glu::ApiType::es(3, 2)))
1177     FOR_EACH_VERIFIER(
1178         new MinimumValueCase(m_context, (std::string() + "max_geometry_texture_image_units_" + verifierSuffix).c_str(),
1179                              "Test MAX_GEOMETRY_TEXTURE_IMAGE_UNITS", GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, 16, verifier,
1180                              glu::ApiType::es(3, 2)))
1181     FOR_EACH_VERIFIER(
1182         new MinimumValueCase(m_context, (std::string() + "max_geometry_shader_invocations_" + verifierSuffix).c_str(),
1183                              "Test MAX_GEOMETRY_SHADER_INVOCATIONS", GL_MAX_GEOMETRY_SHADER_INVOCATIONS, 32, verifier,
1184                              glu::ApiType::es(3, 2)))
1185     FOR_EACH_VERIFIER(new MinimumValueCase(
1186         m_context, (std::string() + "max_geometry_atomic_counter_buffers_" + verifierSuffix).c_str(),
1187         "Test MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS", GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS, 0, verifier,
1188         glu::ApiType::es(3, 2)))
1189     FOR_EACH_VERIFIER(new MinimumValueCase(
1190         m_context, (std::string() + "max_geometry_atomic_counters_" + verifierSuffix).c_str(),
1191         "Test MAX_GEOMETRY_ATOMIC_COUNTERS", GL_MAX_GEOMETRY_ATOMIC_COUNTERS, 0, verifier, glu::ApiType::es(3, 2)))
1192     FOR_EACH_VERIFIER(new MinimumValueCase(
1193         m_context, (std::string() + "max_geometry_shader_storage_blocks_" + verifierSuffix).c_str(),
1194         "Test MAX_GEOMETRY_SHADER_STORAGE_BLOCKS", GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS, 0, verifier,
1195         glu::ApiType::es(3, 2)))
1196 
1197     FOR_EACH_VERIFIER(
1198         new MinimumValueCase(m_context, (std::string() + "max_tess_control_image_uniforms_" + verifierSuffix).c_str(),
1199                              "Test MAX_TESS_CONTROL_IMAGE_UNIFORMS", GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS, 0, verifier,
1200                              glu::ApiType::es(3, 2)))
1201     FOR_EACH_VERIFIER(new MinimumValueCase(
1202         m_context, (std::string() + "max_tess_evaluation_image_uniforms_" + verifierSuffix).c_str(),
1203         "Test MAX_TESS_EVALUATION_IMAGE_UNIFORMS", GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS, 0, verifier,
1204         glu::ApiType::es(3, 2)))
1205     FOR_EACH_VERIFIER(new MinimumValueCase(
1206         m_context, (std::string() + "max_geometry_image_uniforms_" + verifierSuffix).c_str(),
1207         "Test MAX_GEOMETRY_IMAGE_UNIFORMS", GL_MAX_GEOMETRY_IMAGE_UNIFORMS, 0, verifier, glu::ApiType::es(3, 2)))
1208 
1209     FOR_EACH_VERIFIER(new MinimumValueCase(
1210         m_context, (std::string() + "debug_logged_messages_" + verifierSuffix).c_str(), "Test DEBUG_LOGGED_MESSAGES",
1211         GL_DEBUG_LOGGED_MESSAGES, 0, verifier, glu::ApiType::es(3, 2)))
1212     FOR_EACH_VERIFIER(
1213         new MinimumValueCase(m_context, (std::string() + "debug_next_logged_message_length_" + verifierSuffix).c_str(),
1214                              "Test DEBUG_NEXT_LOGGED_MESSAGE_LENGTH", GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH, 0, verifier,
1215                              glu::ApiType::es(3, 2)))
1216     FOR_EACH_VERIFIER(new MinimumValueCase(
1217         m_context, (std::string() + "debug_group_stack_depth_" + verifierSuffix).c_str(),
1218         "Test DEBUG_GROUP_STACK_DEPTH", GL_DEBUG_GROUP_STACK_DEPTH, 0, verifier, glu::ApiType::es(3, 2)))
1219     FOR_EACH_VERIFIER(new MinimumValueCase(
1220         m_context, (std::string() + "max_debug_message_length_" + verifierSuffix).c_str(),
1221         "Test MAX_DEBUG_MESSAGE_LENGTH", GL_MAX_DEBUG_MESSAGE_LENGTH, 1, verifier, glu::ApiType::es(3, 2)))
1222     FOR_EACH_VERIFIER(new MinimumValueCase(
1223         m_context, (std::string() + "max_debug_logged_messages_" + verifierSuffix).c_str(),
1224         "Test MAX_DEBUG_LOGGED_MESSAGES", GL_MAX_DEBUG_LOGGED_MESSAGES, 1, verifier, glu::ApiType::es(3, 2)))
1225     FOR_EACH_VERIFIER(new MinimumValueCase(
1226         m_context, (std::string() + "max_debug_group_stack_depth_" + verifierSuffix).c_str(),
1227         "Test MAX_DEBUG_GROUP_STACK_DEPTH", GL_MAX_DEBUG_GROUP_STACK_DEPTH, 64, verifier, glu::ApiType::es(3, 2)))
1228     FOR_EACH_VERIFIER(new MinimumValueCase(m_context, (std::string() + "max_label_length_" + verifierSuffix).c_str(),
1229                                            "Test MAX_LABEL_LENGTH", GL_MAX_LABEL_LENGTH, 256, verifier,
1230                                            glu::ApiType::es(3, 2)))
1231 
1232     FOR_EACH_VERIFIER(new MinimumValueCase(
1233         m_context, (std::string() + "texture_buffer_binding_" + verifierSuffix).c_str(), "Test TEXTURE_BUFFER_BINDING",
1234         GL_TEXTURE_BUFFER_BINDING, 0, verifier, glu::ApiType::es(3, 2)))
1235 
1236     FOR_EACH_VERIFIER(new CombinedUniformComponentsCase(
1237         m_context, (std::string() + "max_combined_tess_control_uniform_components_" + verifierSuffix).c_str(),
1238         "Test MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS", GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS, verifier,
1239         glu::ApiType::es(3, 2)))
1240     FOR_EACH_VERIFIER(new CombinedUniformComponentsCase(
1241         m_context, (std::string() + "max_combined_tess_evaluation_uniform_components_" + verifierSuffix).c_str(),
1242         "Test MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS", GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS,
1243         verifier, glu::ApiType::es(3, 2)))
1244     FOR_EACH_VERIFIER(new CombinedUniformComponentsCase(
1245         m_context, (std::string() + "max_combined_geometry_uniform_components_" + verifierSuffix).c_str(),
1246         "Test MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS", GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS, verifier,
1247         glu::ApiType::es(3, 2)))
1248 
1249 #undef FOR_EACH_VERIFIER
1250 }
1251 
1252 } // namespace Functional
1253 } // namespace gles31
1254 } // namespace deqp
1255