1 #ifndef _ESEXTCTEXTURECUBEMAPARRAYSAMPLING_HPP
2 #define _ESEXTCTEXTURECUBEMAPARRAYSAMPLING_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2014-2016 The Khronos Group Inc.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */ /*!
22  * \file
23  * \brief
24  */ /*-------------------------------------------------------------------*/
25 
26 /*!
27  * \file  esextcTextureCubeMapArraySampling.hpp
28  * \brief Texture Cube Map Array Sampling (Test 1)
29  */ /*-------------------------------------------------------------------*/
30 
31 #include "../esextcTestCaseBase.hpp"
32 
33 #include <string>
34 
35 namespace glcts
36 {
37 
38 /** Implementation of (Test 1) for texture_cube_map_array extension. Test description follows:
39  *
40  *  Make sure sampling cube-map array textures works correctly.
41  *
42  *  Category: Functionality tests,
43  *            Optional dependency on EXT_geometry_shader;
44  *            Optional dependency on EXT_tessellation_shader;
45  *            Optional dependency on OES_texture_stencil8;
46  *
47  *  Priority: Must-have.
48  *
49  *  Verify that both mutable and immutable cube-map array textures initialized
50  *  with:
51  *
52  *  * a color-renderable internalformat (GL_RGBA8);
53  *  * a depth-renderable internalformat (GL_DEPTH_COMPONENT32F);
54  *  * GL_RGBA32I internalformat;
55  *  * GL_RGBA32UI internalformat;
56  *  * GL_STENCIL_INDEX8 internalformat;
57  *  * GL_COMPRESSED_RGBA8_ETC2_EAC internalformat;
58  *
59  *  can be correctly sampled from:
60  *
61  *  * a compute shader.
62  *  * a fragment shader;
63  *  * a geometry shader;                (if supported)
64  *  * a tessellation control shader;    (if supported)
65  *  * a tessellation evaluation shader; (if supported)
66  *  * a vertex shader.
67  *
68  *  For depth textures, the test should verify results reported by
69  *  samplerCubeArray and samplerCubeArrayShadow samplers are valid.
70  *
71  *  Use the following texture sampling GLSL functions:
72  *
73  *  * texture();
74  *  * textureLod()  (lod argument set to 0 and n_total_texture_mipmaps-1;
75  *                   in the former case we expect base mip-map data to be
76  *                   used, in the latter it should be the last mip-map that
77  *                   is used as texel data source)
78  *  * textureGrad() (dPdx, dPdy should be calculated as distance to "right"
79  *                   and "top" "neighbours". Set of neighbours should
80  *                   ensure sampling of base and last mipmap level);
81  *  * textureGather();
82  *
83  *  The following samplers should be used: (whichever applies for texture
84  *  considered)
85  *
86  *  * isamplerCubeArray;
87  *  *  samplerCubeArray;
88  *  *  samplerCubeArrayShadow;
89  *  * usamplerCubeArray;
90  *
91  *  The following cube-map array texture resolutions should be used for the
92  *  purpose of the test:
93  *
94  *  * not compressed formats
95  *         [width x height x depth]
96  *      1)   64   x   64   x  18;
97  *      2)  117   x  117   x   6;
98  *      3)  256   x  256   x   6;
99  *      4)  173   x  173   x  12;
100  *  * compressed formats
101  *         [width x height x depth]
102  *      1)    8   x    8   x  12
103  *      2)   13   x   13   x  12;
104  *
105  *  In case of color data, for m-th mip-map level of n-th face at i-th layer,
106  *  the mip-map should be filled with the following color:
107  *
108  *          ((m+1)/n_mipmaps, (n+1)/6, (i+1)/n_layers, 1.0 / 4.0)
109  *
110  *  For signed/unsigned integer data, remove the denominator from all channels.
111  *
112  *  For compressed formats, each component should be equal:
113  *
114  *          (m * n_layers * 6) + (i * 6) + n
115  *
116  *  In case of depth data, for m-th mip-map level of n-th face at i-th layer,
117  *  the mip-map should be filled with the following depth:
118  *
119  *           (m+1 + n+1 + i+1) / (n_mipmaps + 6 + n_layers)
120  *
121  *  In case of stencil data, for m-th mip-map level of n-th face at i-th layer,
122  *  the mip-map should be filled with the following stencil index value:
123  *
124  *        (m+1 + n+1 + i+1) / (n_mipmaps + 6 + n_layers) * 255
125  *
126  *  The test should use the maximum allowed amount of mip-maps, equal to:
127  *
128  *              (floor(log2(max(width, height))) + 1;
129  *
130  *  In each iteration, make sure that type of the uniform (as reported by
131  *  glGetActiveUniform() and glGetProgramResourceiv() ) used for the test
132  *  iteration is valid.
133  **/
134 class TextureCubeMapArraySamplingTest : public TestCaseBase
135 {
136 public:
137     /* Public methods */
138     TextureCubeMapArraySamplingTest(Context &context, const ExtParameters &extParams, const char *name,
139                                     const char *description);
140 
~TextureCubeMapArraySamplingTest(void)141     virtual ~TextureCubeMapArraySamplingTest(void)
142     {
143     }
144 
145     virtual IterateResult iterate(void);
146 
147 private:
148     /* Enums */
149     /** Identifies vertex attribute
150      *
151      **/
152     enum attributeId
153     {
154         Position,
155         TextureCoordinates,
156         TextureCoordinatesForGather,
157         Lod,
158         GradX,
159         GradY,
160         RefZ,
161     };
162 
163     /** Identifies type of sampler
164      *
165      **/
166     enum samplerType
167     {
168         Float = 0,
169         Int,
170         UInt,
171         Depth,
172         Stencil
173     };
174 
175     /** Identifies type of sampling function
176      *
177      **/
178     enum samplingFunction
179     {
180         Texture = 0,
181         TextureLod,
182         TextureGrad,
183         TextureGather,
184     };
185 
186     /** Identifies shader stage
187      *
188      **/
189     enum shaderType
190     {
191         Compute = 0,
192         Fragment,
193         Geometry,
194         Tesselation_Control,
195         Tesselation_Evaluation,
196         Vertex
197     };
198 
199     /* Structures */
200     /** Defines vertex attribute
201      *
202      **/
203     struct attributeDefinition
204     {
205         const glw::GLchar *name;
206         const glw::GLchar *type;
207         attributeId attribute_id;
208         int binding;
209     };
210 
211     /** Provide set of "getComponents" routines
212      *
213      **/
214     struct componentProvider
215     {
216         void (*getColorFloatComponents)(glw::GLuint pixel_index, glw::GLint cube_face, glw::GLint layer_index,
217                                         glw::GLint n_layers, glw::GLint n_mipmap_levels, glw::GLfloat *out_components);
218 
219         void (*getColorUByteComponents)(glw::GLuint pixel_index, glw::GLint cube_face, glw::GLint layer_index,
220                                         glw::GLint n_layers, glw::GLint n_mipmap_levels, glw::GLubyte *out_components);
221 
222         void (*getColorUintComponents)(glw::GLuint pixel_index, glw::GLint cube_face, glw::GLint layer_index,
223                                        glw::GLint n_layers, glw::GLint n_mipmap_levels, glw::GLuint *out_components);
224 
225         void (*getColorIntComponents)(glw::GLuint pixel_index, glw::GLint cube_face, glw::GLint layer_index,
226                                       glw::GLint n_layers, glw::GLint n_mipmap_levels, glw::GLint *out_components);
227 
228         void (*getDepthComponents)(glw::GLuint pixel_index, glw::GLint cube_face, glw::GLint layer_index,
229                                    glw::GLint n_layers, glw::GLint n_mipmap_levels, glw::GLfloat *out_components);
230 
231         void (*getStencilComponents)(glw::GLuint pixel_index, glw::GLint cube_face, glw::GLint layer_index,
232                                      glw::GLint n_layers, glw::GLint n_mipmap_levels, glw::GLuint *out_components);
233 
234         void (*getCompressedComponents)(glw::GLuint pixel_index, glw::GLint cube_face, glw::GLint layer_index,
235                                         glw::GLint n_layers, glw::GLint n_mipmap_levels, glw::GLubyte *out_components);
236     };
237 
238     /** Defines a GL "format"
239      *
240      **/
241     struct formatInfo
242     {
243         formatInfo(glw::GLenum internal_format, glw::GLenum format, glw::GLenum type, bool is_compressed);
244 
245         glw::GLenum m_internal_format;
246         glw::GLenum m_format;
247         glw::GLenum m_type;
248         bool m_is_compressed;
249     };
250 
251     /** Defines type of sampler, source and destination GL formats
252      *
253      **/
254     struct formatDefinition
255     {
256         formatDefinition(glw::GLenum internal_format, glw::GLenum format, glw::GLenum type, bool is_compressed,
257                          samplerType sampler_type, const glw::GLchar *name);
258 
259         formatDefinition(glw::GLenum src_internal_format, glw::GLenum src_format, glw::GLenum src_type,
260                          bool src_is_compressed, glw::GLenum dst_internal_format, glw::GLenum dst_format,
261                          glw::GLenum dst_type, samplerType sampler_type, const glw::GLchar *name);
262 
263         formatInfo m_source;
264         formatInfo m_destination;
265         samplerType m_sampler_type;
266         const glw::GLchar *m_name;
267     };
268 
269     /** Defines cube map texture resolution
270      *
271      **/
272     struct resolutionDefinition
273     {
274         resolutionDefinition(glw::GLuint width, glw::GLuint height, glw::GLuint depth);
275 
276         glw::GLuint m_width;
277         glw::GLuint m_height;
278         glw::GLuint m_depth;
279     };
280 
281     /** Defines sampling function
282      *
283      **/
284     struct samplingFunctionDefinition
285     {
286         samplingFunctionDefinition(samplingFunction function, const glw::GLchar *name);
287 
288         samplingFunction m_function;
289         const glw::GLchar *m_name;
290     };
291 
292     /** Defines sampling shader stage and type of primitive used by draw call
293      *
294      **/
295     struct shaderConfiguration
296     {
297         shaderConfiguration(shaderType type, glw::GLenum primitive_type, const glw::GLchar *name);
298 
299         shaderType m_type;
300         glw::GLenum m_primitive_type;
301         const glw::GLchar *m_name;
302     };
303 
304     /* Typedefs */
305     typedef std::vector<formatDefinition> formatsVectorType;
306     typedef std::vector<bool> mutablitiesVectorType;
307     typedef std::vector<resolutionDefinition> resolutionsVectorType;
308     typedef std::vector<samplingFunctionDefinition> samplingFunctionsVectorType;
309     typedef std::vector<shaderConfiguration> shadersVectorType;
310 
311     /* Classes */
312 
313     /** Defines vertex buffer
314      *
315      **/
316     class bufferDefinition
317     {
318     public:
319         bufferDefinition();
320         ~bufferDefinition();
321 
322         void init(const glw::Functions &gl, glw::GLsizeiptr buffer_size, glw::GLvoid *buffer_data);
323 
324         void bind(glw::GLenum target) const;
325         void bind(glw::GLenum target, glw::GLuint index) const;
326 
327         static const glw::GLuint m_invalid_buffer_object_id;
328 
329     private:
330         const glw::Functions *m_gl;
331         glw::GLuint m_buffer_object_id;
332     };
333 
334     /** Defines a collection of vertex buffers for specific texture resolution
335      *
336      **/
337     class bufferCollection
338     {
339     public:
340         void init(const glw::Functions &gl, const formatDefinition &format, const resolutionDefinition &resolution);
341 
342         bufferDefinition postion;
343         bufferDefinition texture_coordinate;
344         bufferDefinition texture_coordinate_for_gather;
345         bufferDefinition lod;
346         bufferDefinition grad_x;
347         bufferDefinition grad_y;
348         bufferDefinition refZ;
349     };
350 
351     /** Wrapper for texture object id
352      *
353      **/
354     class textureDefinition
355     {
356     public:
357         textureDefinition();
358         ~textureDefinition();
359 
360         void init(const glw::Functions &gl);
361 
362         void bind(glw::GLenum binding_point) const;
363 
364         glw::GLuint getTextureId() const;
365 
366         void setupImage(glw::GLuint image_unit, glw::GLenum internal_format);
367         void setupSampler(glw::GLuint texture_unit, const glw::GLchar *sampler_name, glw::GLuint program_id,
368                           bool is_shadow);
369 
370         static const glw::GLuint m_invalid_uniform_location;
371         static const glw::GLuint m_invalid_texture_object_id;
372 
373     private:
374         const glw::Functions *m_gl;
375         glw::GLuint m_texture_object_id;
376     };
377 
378     /** Wrapper for shader object id
379      *
380      **/
381     class shaderDefinition
382     {
383     public:
384         shaderDefinition();
385         ~shaderDefinition();
386 
387         void init(const glw::Functions &gl, glw::GLenum shader_stage, const std::string &source,
388                   class TextureCubeMapArraySamplingTest *test);
389 
390         bool compile();
391 
392         void attach(glw::GLuint program_object_id) const;
393 
394         glw::GLuint getShaderId() const;
395         static const glw::GLuint m_invalid_shader_object_id;
396 
397         const std::string &getSource() const;
398 
399     private:
400         const glw::Functions *m_gl;
401         glw::GLenum m_shader_stage;
402         std::string m_source;
403         glw::GLuint m_shader_object_id;
404     };
405 
406     /** Defines a collection of shaders for specific sampling routine
407      *
408      **/
409     class shaderCollectionForSamplingRoutine
410     {
411     public:
shaderCollectionForSamplingRoutine()412         shaderCollectionForSamplingRoutine() : m_sampling_function(Texture)
413         {
414         }
415 
~shaderCollectionForSamplingRoutine()416         ~shaderCollectionForSamplingRoutine()
417         {
418         }
419 
420         void init(const glw::Functions &gl, const formatDefinition &format, const samplingFunction &sampling_function,
421                   TextureCubeMapArraySamplingTest &test);
422 
423         shaderDefinition pass_through_vertex_shader;
424         shaderDefinition pass_through_tesselation_control_shader;
425 
426         shaderDefinition sampling_compute_shader;
427         shaderDefinition sampling_fragment_shader;
428         shaderDefinition sampling_geometry_shader;
429         shaderDefinition sampling_tesselation_control_shader;
430         shaderDefinition sampling_tesselation_evaluation_shader;
431         shaderDefinition sampling_vertex_shader;
432 
433         samplingFunction m_sampling_function;
434     };
435 
436     /** Defines a complete set of shaders for one format and sampling routine
437      *
438      **/
439     struct shaderGroup
440     {
441         void init();
442 
443         const shaderDefinition *pass_through_fragment_shader;
444         const shaderDefinition *pass_through_tesselation_control_shader;
445         const shaderDefinition *pass_through_tesselation_evaluation_shader;
446         const shaderDefinition *pass_through_vertex_shader;
447         const shaderDefinition *sampling_compute_shader;
448         const shaderDefinition *sampling_fragment_shader;
449         const shaderDefinition *sampling_geometry_shader;
450         const shaderDefinition *sampling_tesselation_control_shader;
451         const shaderDefinition *sampling_tesselation_evaluation_shader;
452         const shaderDefinition *sampling_vertex_shader;
453     };
454 
455     /** Defines a collection of shaders for one format
456      *
457      **/
458     class shaderCollectionForTextureFormat
459     {
460     public:
shaderCollectionForTextureFormat()461         shaderCollectionForTextureFormat()
462         {
463         }
464 
~shaderCollectionForTextureFormat()465         ~shaderCollectionForTextureFormat()
466         {
467         }
468 
469         void init(const glw::Functions &gl, const formatDefinition &format,
470                   const samplingFunctionsVectorType &sampling_routines, TextureCubeMapArraySamplingTest &test);
471 
472         void getShaderGroup(samplingFunction function, shaderGroup &shader_group) const;
473 
474     private:
475         shaderDefinition pass_through_fragment_shader;
476         shaderDefinition pass_through_tesselation_control_shader;
477         shaderDefinition pass_through_tesselation_evaluation_shader;
478 
479         typedef std::vector<shaderCollectionForSamplingRoutine> shaderCollectionForSamplingFunctionVectorType;
480         shaderCollectionForSamplingFunctionVectorType per_sampling_routine;
481     };
482 
483     /** Wrapper for program object id
484      *
485      **/
486     class programDefinition
487     {
488     public:
489         programDefinition();
490         ~programDefinition();
491 
492         void init(const glw::Functions &gl, const shaderGroup &shader_group, shaderType shader_type, bool isContextES);
493 
494         bool link();
495 
496         glw::GLuint getProgramId() const;
497         static const glw::GLuint m_invalid_program_object_id;
498 
499         const shaderDefinition *getShader(shaderType shader_type) const;
500 
501     private:
502         const shaderDefinition *compute_shader;
503         const shaderDefinition *geometry_shader;
504         const shaderDefinition *fragment_shader;
505         const shaderDefinition *tesselation_control_shader;
506         const shaderDefinition *tesselation_evaluation_shader;
507         const shaderDefinition *vertex_shader;
508 
509         glw::GLuint m_program_object_id;
510 
511     private:
512         const glw::Functions *m_gl;
513     };
514 
515     /** Collection of programs for one sampling routine
516      *
517      **/
518     class programCollectionForFunction
519     {
520     public:
521         void init(const glw::Functions &gl, const shaderGroup &shader_group, TextureCubeMapArraySamplingTest &test,
522                   bool isContextES);
523 
524         const programDefinition *getProgram(shaderType shader_type) const;
525 
526     private:
527         programDefinition program_with_sampling_compute_shader;
528         programDefinition program_with_sampling_fragment_shader;
529         programDefinition program_with_sampling_geometry_shader;
530         programDefinition program_with_sampling_tesselation_control_shader;
531         programDefinition program_with_sampling_tesselation_evaluation_shader;
532         programDefinition program_with_sampling_vertex_shader;
533     };
534 
535     /** Program collection for one format
536      *
537      **/
538     class programCollectionForFormat
539     {
540     public:
541         void init(const glw::Functions &gl, const shaderCollectionForTextureFormat &shader_collection,
542                   TextureCubeMapArraySamplingTest &test, bool isContextES);
543 
544         const programCollectionForFunction *getPrograms(samplingFunction function) const;
545 
546     private:
547         programCollectionForFunction m_programs_for_texture;
548         programCollectionForFunction m_programs_for_textureLod;
549         programCollectionForFunction m_programs_for_textureGrad;
550         programCollectionForFunction m_programs_for_textureGather;
551     };
552 
553     /** Wrapper for vertex array object id
554      *
555      **/
556     class vertexArrayObjectDefinition
557     {
558     public:
559         vertexArrayObjectDefinition();
560         ~vertexArrayObjectDefinition();
561 
562         void init(const glw::Functions &gl, const formatDefinition &format, const samplingFunction &sampling_function,
563                   const bufferCollection &buffers, glw::GLuint program_id);
564 
565     private:
566         void setupAttribute(const attributeDefinition &attribute, const bufferCollection &buffers,
567                             glw::GLuint program_id);
568 
569         static const glw::GLuint m_invalid_attribute_location;
570         static const glw::GLuint m_invalid_vertex_array_object_id;
571 
572         const glw::Functions *m_gl;
573         glw::GLuint m_vertex_array_object_id;
574     };
575 
576     /* Methods */
577     glw::GLuint checkUniformAndResourceApi(glw::GLuint program_id, const glw::GLchar *sampler_name,
578                                            samplerType sampler_type);
579 
580     void compile(shaderDefinition &info);
581 
582     void dispatch(glw::GLuint program_id, glw::GLuint width, glw::GLuint height);
583 
584     void draw(glw::GLuint program_id, glw::GLenum m_primitive_type, glw::GLuint n_vertices, glw::GLenum format);
585 
586     static void getAttributes(samplerType sampler_type, const attributeDefinition *&out_attribute_definitions,
587                               glw::GLuint &out_n_attributes);
588 
589     static void getAttributes(samplingFunction sampling_function, const attributeDefinition *&out_attribute_definitions,
590                               glw::GLuint &out_n_attributes);
591 
592     void getColorType(samplerType sampler_type, const glw::GLchar *&out_color_type,
593                       const glw::GLchar *&out_interpolation_type, const glw::GLchar *&out_sampler_type,
594                       glw::GLuint &out_n_components, bool &out_is_shadow);
595 
596     void getColorType(samplerType sampler_type, const glw::GLchar *&out_color_type,
597                       const glw::GLchar *&out_interpolation_type, const glw::GLchar *&out_sampler_type,
598                       const glw::GLchar *&out_image_type, const glw::GLchar *&out_image_format,
599                       glw::GLuint &out_n_components, bool &out_is_shadow);
600 
601     void getPassThroughFragmentShaderCode(samplerType sampler_type, std::string &out_fragment_shader_code);
602 
603     void getPassThroughTesselationControlShaderCode(const samplerType &sampler_type,
604                                                     const samplingFunction &sampling_function,
605                                                     std::string &out_tesselation_control_shader_code);
606 
607     void getPassThroughTesselationEvaluationShaderCode(samplerType sampler_type,
608                                                        std::string &out_tesselation_evaluation_shader_code);
609 
610     void getPassThroughVertexShaderCode(const samplerType &sampler_type, const samplingFunction &sampling_function,
611                                         std::string &out_vertex_shader_code);
612 
613     void getSamplingComputeShaderCode(const samplerType &sampler_type, const samplingFunction &sampling_function,
614                                       std::string &out_vertex_shader_code);
615 
616     void getSamplingFragmentShaderCode(const samplerType &sampler_type, const samplingFunction &sampling_function,
617                                        std::string &out_fragment_shader_code);
618 
619     void getSamplingFunctionCall(samplingFunction sampling_function, const glw::GLchar *color_type,
620                                  glw::GLuint n_components, const glw::GLchar *attribute_name_prefix,
621                                  const glw::GLchar *attribute_index, const glw::GLchar *color_variable_name,
622                                  const glw::GLchar *color_variable_index, const glw::GLchar *sampler_name,
623                                  std::string &out_code);
624 
625     void getSamplingGeometryShaderCode(const samplerType &sampler_type, const samplingFunction &sampling_function,
626                                        std::string &out_geometry_shader_code);
627 
628     void getSamplingTesselationControlShaderCode(const samplerType &sampler_type,
629                                                  const samplingFunction &sampling_function,
630                                                  std::string &out_tesselation_control_shader_code);
631 
632     void getSamplingTesselationEvaluationShaderCode(const samplerType &sampler_type,
633                                                     const samplingFunction &sampling_function,
634                                                     std::string &out_tesselation_evaluation_shader_code);
635 
636     void getSamplingVertexShaderCode(const samplerType &sampler_type, const samplingFunction &sampling_function,
637                                      std::string &out_vertex_shader_code);
638 
639     void getShadowSamplingFunctionCall(samplingFunction sampling_function, const glw::GLchar *color_type,
640                                        glw::GLuint n_components, const glw::GLchar *attribute_name_prefix,
641                                        const glw::GLchar *attribute_index, const glw::GLchar *color_variable_name,
642                                        const glw::GLchar *color_variable_index, const glw::GLchar *sampler_name,
643                                        std::string &out_code);
644 
645     static bool isSamplerSupportedByFunction(const samplerType sampler_type, const samplingFunction sampling_function);
646 
647     void link(programDefinition &info);
648 
649     void logCompilationLog(const shaderDefinition &info);
650 
651     void logLinkingLog(const programDefinition &info);
652 
653     void logProgram(const programDefinition &info);
654 
655     void prepareCompresedTexture(const textureDefinition &texture, const formatDefinition &format,
656                                  const resolutionDefinition &resolution, bool mutability);
657 
658     void prepareTexture(const textureDefinition &texture, const formatDefinition &format,
659                         const resolutionDefinition &resolution, bool mutability);
660 
661     void setupSharedStorageBuffer(const attributeDefinition &attribute, const bufferCollection &buffers,
662                                   glw::GLuint program_id);
663 
664     void setupSharedStorageBuffers(const formatDefinition &format, const samplingFunction &sampling_function,
665                                    const bufferCollection &buffers, glw::GLuint program_id);
666 
667     void testFormats(formatsVectorType &formats, resolutionsVectorType &resolutions);
668 
669     void testTexture(const formatDefinition &format, bool mutability, const resolutionDefinition &resolution,
670                      textureDefinition &texture, programCollectionForFormat &program_collection);
671 
672     bool verifyResult(const formatDefinition &format, const resolutionDefinition &resolution,
673                       const samplingFunction sampling_function, unsigned char *data);
674 
675     bool verifyResultHelper(const formatDefinition &format, const resolutionDefinition &resolution,
676                             const componentProvider &component_provider, unsigned char *data);
677 
678     /* Fields */
679     formatsVectorType m_formats;
680     formatsVectorType m_compressed_formats;
681     samplingFunctionsVectorType m_functions;
682     mutablitiesVectorType m_mutabilities;
683     resolutionsVectorType m_resolutions;
684     resolutionsVectorType m_compressed_resolutions;
685     shadersVectorType m_shaders;
686 
687     glw::GLuint m_framebuffer_object_id;
688 
689     /* Static variables */
690     static const glw::GLuint m_get_type_api_status_program_resource;
691     static const glw::GLuint m_get_type_api_status_uniform;
692 
693     /* Fields */
694     glw::GLuint compiled_shaders;
695     glw::GLuint invalid_shaders;
696     glw::GLuint linked_programs;
697     glw::GLuint invalid_programs;
698     glw::GLuint tested_cases;
699     glw::GLuint failed_cases;
700     glw::GLuint invalid_type_cases;
701 
702     /* Static variables */
703     static const glw::GLchar *const attribute_grad_x;
704     static const glw::GLchar *const attribute_grad_y;
705     static const glw::GLchar *const attribute_lod;
706     static const glw::GLchar *const attribute_refZ;
707     static const glw::GLchar *const attribute_texture_coordinate;
708     static const glw::GLchar *const compute_shader_body;
709     static const glw::GLchar *const compute_shader_layout_binding;
710     static const glw::GLchar *const compute_shader_buffer;
711     static const glw::GLchar *const compute_shader_color;
712     static const glw::GLchar *const compute_shader_image_store;
713     static const glw::GLchar *const compute_shader_layout;
714     static const glw::GLchar *const compute_shader_param;
715     static const glw::GLchar *const fragment_shader_input;
716     static const glw::GLchar *const fragment_shader_output;
717     static const glw::GLchar *const fragment_shader_pass_through_body_code;
718     static const glw::GLchar *const fragment_shader_sampling_body_code;
719     static const glw::GLchar *const geometry_shader_emit_vertex_code;
720     static const glw::GLchar *const geometry_shader_extension;
721     static const glw::GLchar *const geometry_shader_layout;
722     static const glw::GLchar *const geometry_shader_sampling_body_code;
723     static const glw::GLchar *const image_float;
724     static const glw::GLchar *const image_int;
725     static const glw::GLchar *const image_name;
726     static const glw::GLchar *const image_uint;
727     static const glw::GLchar *const interpolation_flat;
728     static const glw::GLchar *const sampler_depth;
729     static const glw::GLchar *const sampler_float;
730     static const glw::GLchar *const sampler_int;
731     static const glw::GLchar *const sampler_name;
732     static const glw::GLchar *const sampler_uint;
733     static const glw::GLchar *const shader_code_preamble;
734     static const glw::GLchar *const shader_precision;
735     static const glw::GLchar *const shader_input;
736     static const glw::GLchar *const shader_layout;
737     static const glw::GLchar *const shader_output;
738     static const glw::GLchar *const shader_uniform;
739     static const glw::GLchar *const shader_writeonly;
740     static const glw::GLchar *const tesselation_control_shader_layout;
741     static const glw::GLchar *const tesselation_control_shader_sampling_body_code;
742     static const glw::GLchar *const tesselation_control_shader_output;
743     static const glw::GLchar *const tesselation_evaluation_shader_input;
744     static const glw::GLchar *const tesselation_evaluation_shader_layout;
745     static const glw::GLchar *const tesselation_evaluation_shader_pass_through_body_code;
746     static const glw::GLchar *const tesselation_evaluation_shader_sampling_body_code;
747     static const glw::GLchar *const tesselation_shader_extension;
748     static const glw::GLchar *const texture_func;
749     static const glw::GLchar *const textureGather_func;
750     static const glw::GLchar *const textureGrad_func;
751     static const glw::GLchar *const textureLod_func;
752     static const glw::GLchar *const type_float;
753     static const glw::GLchar *const type_ivec4;
754     static const glw::GLchar *const type_uint;
755     static const glw::GLchar *const type_uvec4;
756     static const glw::GLchar *const type_vec3;
757     static const glw::GLchar *const type_vec4;
758     static const glw::GLchar *const vertex_shader_body_code;
759     static const glw::GLchar *const vertex_shader_input;
760     static const glw::GLchar *const vertex_shader_output;
761     static const glw::GLchar *const vertex_shader_position;
762 };
763 
764 } // namespace glcts
765 
766 #endif // _ESEXTCTEXTURECUBEMAPARRAYSAMPLING_HPP
767