1e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 2e5c31af7Sopenharmony_ci * OpenGL Conformance Test Suite 3e5c31af7Sopenharmony_ci * ----------------------------- 4e5c31af7Sopenharmony_ci * 5e5c31af7Sopenharmony_ci * Copyright (c) 2017 The Khronos Group Inc. 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 8e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 9e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 10e5c31af7Sopenharmony_ci * 11e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 12e5c31af7Sopenharmony_ci * 13e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 14e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 15e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 17e5c31af7Sopenharmony_ci * limitations under the License. 18e5c31af7Sopenharmony_ci * 19e5c31af7Sopenharmony_ci */ /*! 20e5c31af7Sopenharmony_ci * \file gl4cLimitsTests.cpp 21e5c31af7Sopenharmony_ci * \brief Verifies all limits 22e5c31af7Sopenharmony_ci */ /*-------------------------------------------------------------------*/ 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ci#include "gl4cLimitsTests.hpp" 25e5c31af7Sopenharmony_ci#include "glcLimitTest.hpp" 26e5c31af7Sopenharmony_ci 27e5c31af7Sopenharmony_ciusing namespace glw; 28e5c31af7Sopenharmony_ci 29e5c31af7Sopenharmony_cinamespace gl4cts 30e5c31af7Sopenharmony_ci{ 31e5c31af7Sopenharmony_ci 32e5c31af7Sopenharmony_citemplate <typename Type> 33e5c31af7Sopenharmony_cistruct Limit 34e5c31af7Sopenharmony_ci{ 35e5c31af7Sopenharmony_ci const char* name; 36e5c31af7Sopenharmony_ci deUint32 token; 37e5c31af7Sopenharmony_ci Type boundry; 38e5c31af7Sopenharmony_ci bool isMaximum; // when true boundry is maximal acceptable value 39e5c31af7Sopenharmony_ci const char* builtin; 40e5c31af7Sopenharmony_ci}; 41e5c31af7Sopenharmony_ci 42e5c31af7Sopenharmony_ci/** Constructor. 43e5c31af7Sopenharmony_ci * 44e5c31af7Sopenharmony_ci * @param context Rendering context. 45e5c31af7Sopenharmony_ci **/ 46e5c31af7Sopenharmony_ciLimitsTests::LimitsTests(deqp::Context& context) : TestCaseGroup(context, "limits", "Verifies all limits") 47e5c31af7Sopenharmony_ci{ 48e5c31af7Sopenharmony_ci} 49e5c31af7Sopenharmony_ci 50e5c31af7Sopenharmony_civoid LimitsTests::init(void) 51e5c31af7Sopenharmony_ci{ 52e5c31af7Sopenharmony_ci const GLint minVertexUniformBlocks = 14; 53e5c31af7Sopenharmony_ci const GLint minVertexUniformComponents = 1024; 54e5c31af7Sopenharmony_ci 55e5c31af7Sopenharmony_ci const GLint minGeometryUniformBlocks = 14; 56e5c31af7Sopenharmony_ci const GLint minGeometryUniformComponents = 1024; 57e5c31af7Sopenharmony_ci 58e5c31af7Sopenharmony_ci const GLint minTessControlUniformBlocks = 14; 59e5c31af7Sopenharmony_ci const GLint minTessControlUniformComponents = 1024; 60e5c31af7Sopenharmony_ci 61e5c31af7Sopenharmony_ci const GLint minTessEvaluationUniformBlocks = 14; 62e5c31af7Sopenharmony_ci const GLint minTessEvaluationUniformComponents = 1024; 63e5c31af7Sopenharmony_ci 64e5c31af7Sopenharmony_ci const GLint minFragmentUniformBlocks = 14; 65e5c31af7Sopenharmony_ci const GLint minFragmentUniformComponents = 1024; 66e5c31af7Sopenharmony_ci 67e5c31af7Sopenharmony_ci const GLint minUniformBlockSize = 16384; 68e5c31af7Sopenharmony_ci 69e5c31af7Sopenharmony_ci const GLint cvuc = (minVertexUniformBlocks*minUniformBlockSize)/4 + minVertexUniformComponents; 70e5c31af7Sopenharmony_ci const GLint cguc = (minGeometryUniformBlocks*minUniformBlockSize)/4 + minGeometryUniformComponents; 71e5c31af7Sopenharmony_ci const GLint ctcuc = (minTessControlUniformBlocks*minUniformBlockSize)/4 + minTessControlUniformComponents; 72e5c31af7Sopenharmony_ci const GLint cteuc = (minTessEvaluationUniformBlocks*minUniformBlockSize)/4 + minTessEvaluationUniformComponents; 73e5c31af7Sopenharmony_ci const GLint cfuc = (minFragmentUniformBlocks*minUniformBlockSize)/4 + minFragmentUniformComponents; 74e5c31af7Sopenharmony_ci 75e5c31af7Sopenharmony_ci static const Limit<GLint> intLimits[] = 76e5c31af7Sopenharmony_ci { 77e5c31af7Sopenharmony_ci { "max_clip_distances", GL_MAX_CLIP_DISTANCES, 8, 0, "gl_MaxClipDistances" }, 78e5c31af7Sopenharmony_ci { "max_cull_distances", GL_MAX_CULL_DISTANCES, 8, 0, "gl_MaxCullDistances" }, 79e5c31af7Sopenharmony_ci { "max_combined_clip_and_cull_distances", GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES, 8, 0, "gl_MaxCombinedClipAndCullDistances" }, 80e5c31af7Sopenharmony_ci { "max_3d_texture_size", GL_MAX_3D_TEXTURE_SIZE, 2048, 0, "" }, 81e5c31af7Sopenharmony_ci { "max_texture_size", GL_MAX_TEXTURE_SIZE, 16384, 0, "" }, 82e5c31af7Sopenharmony_ci { "max_array_texture_layers", GL_MAX_ARRAY_TEXTURE_LAYERS, 2048, 0, "" }, 83e5c31af7Sopenharmony_ci { "max_cube_map_texture_size", GL_MAX_CUBE_MAP_TEXTURE_SIZE, 16384, 0, "" }, 84e5c31af7Sopenharmony_ci { "max_renderbuffer_size", GL_MAX_RENDERBUFFER_SIZE, 16384, 0, "" }, 85e5c31af7Sopenharmony_ci { "max_viewports", GL_MAX_VIEWPORTS, 16, 0, "gl_MaxViewports" }, 86e5c31af7Sopenharmony_ci { "max_elements_indices", GL_MAX_ELEMENTS_INDICES, 0, 0, "" }, // there is no minimum 87e5c31af7Sopenharmony_ci { "max_elements_vertices", GL_MAX_ELEMENTS_VERTICES, 0, 0, "" }, 88e5c31af7Sopenharmony_ci { "max_vertex_attrib_relative_offset", GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET, 2047, 0, "" }, 89e5c31af7Sopenharmony_ci { "max_vertex_attrib_bindings", GL_MAX_VERTEX_ATTRIB_BINDINGS, 16, 0, "" }, 90e5c31af7Sopenharmony_ci { "max_vertex_attrib_stride", GL_MAX_VERTEX_ATTRIB_STRIDE, 2048, 0, "" }, 91e5c31af7Sopenharmony_ci { "max_texture_buffer_size", GL_MAX_TEXTURE_BUFFER_SIZE, 65536, 0, "" }, 92e5c31af7Sopenharmony_ci { "max_rectangle_texture_size", GL_MAX_RECTANGLE_TEXTURE_SIZE, 16384, 0, "" }, 93e5c31af7Sopenharmony_ci { "min_map_buffer_alignment", GL_MIN_MAP_BUFFER_ALIGNMENT, 64, 0, "" }, 94e5c31af7Sopenharmony_ci { "max_vertex_attribs", GL_MAX_VERTEX_ATTRIBS, 16, 0, "gl_MaxVertexAttribs" }, 95e5c31af7Sopenharmony_ci { "max_vertex_uniform_components", GL_MAX_VERTEX_UNIFORM_COMPONENTS, 1024, 0, "gl_MaxVertexUniformComponents" }, 96e5c31af7Sopenharmony_ci { "max_vertex_uniform_vectors", GL_MAX_VERTEX_UNIFORM_VECTORS, 256, 0, "gl_MaxVertexUniformVectors" }, 97e5c31af7Sopenharmony_ci { "max_vertex_uniform_blocks", GL_MAX_VERTEX_UNIFORM_BLOCKS, 14, 0, "" }, 98e5c31af7Sopenharmony_ci { "max_vertex_output_components", GL_MAX_VERTEX_OUTPUT_COMPONENTS, 64, 0, "gl_MaxVertexOutputComponents" }, 99e5c31af7Sopenharmony_ci { "max_vertex_texture_image_units", GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 16, 0, "gl_MaxVertexTextureImageUnits" }, 100e5c31af7Sopenharmony_ci { "max_vertex_atomic_counter_buffers", GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS, 0, 0, "gl_MaxVertexAtomicCounterBuffers" }, 101e5c31af7Sopenharmony_ci { "max_vertex_atomic_counters", GL_MAX_VERTEX_ATOMIC_COUNTERS, 0, 0, "gl_MaxVertexAtomicCounters" }, 102e5c31af7Sopenharmony_ci { "max_vertex_shader_storage_blocks", GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, 0, 0, "" }, 103e5c31af7Sopenharmony_ci { "max_tess_gen_level", GL_MAX_TESS_GEN_LEVEL, 64, 0, "gl_MaxTessGenLevel" }, 104e5c31af7Sopenharmony_ci { "max_patch_vertices", GL_MAX_PATCH_VERTICES, 32, 0, "gl_MaxPatchVertices" }, 105e5c31af7Sopenharmony_ci { "max_tess_control_uniform_components", GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS, 1024, 0, "gl_MaxTessControlUniformComponents" }, 106e5c31af7Sopenharmony_ci { "max_tess_control_texture_image_units", GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS, 16, 0, "gl_MaxTessControlTextureImageUnits" }, 107e5c31af7Sopenharmony_ci { "max_tess_control_output_components", GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS, 128, 0, "gl_MaxTessControlOutputComponents" }, 108e5c31af7Sopenharmony_ci { "max_tess_patch_components", GL_MAX_TESS_PATCH_COMPONENTS, 120, 0, "gl_MaxTessPatchComponents" }, 109e5c31af7Sopenharmony_ci { "max_tess_control_total_output_components", GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS, 4096, 0, "gl_MaxTessControlTotalOutputComponents" }, 110e5c31af7Sopenharmony_ci { "max_tess_control_input_components", GL_MAX_TESS_CONTROL_INPUT_COMPONENTS, 128, 0, "gl_MaxTessControlInputComponents" }, 111e5c31af7Sopenharmony_ci { "max_tess_control_uniform_blocks", GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS, 14, 0, "" }, 112e5c31af7Sopenharmony_ci { "max_tess_control_atomic_counter_buffers", GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS, 0, 0, "gl_MaxTessControlAtomicCounterBuffers" }, 113e5c31af7Sopenharmony_ci { "max_tess_control_atomic_counters", GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS, 0, 0, "gl_MaxTessControlAtomicCounters" }, 114e5c31af7Sopenharmony_ci { "max_tess_control_shader_storage_blocks", GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS, 0, 0, "" }, 115e5c31af7Sopenharmony_ci { "max_tess_evaluation_uniform_components", GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS, 1024, 0, "gl_MaxTessEvaluationUniformComponents" }, 116e5c31af7Sopenharmony_ci { "max_tess_evaluation_texture_image_units", GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS, 16, 0, "gl_MaxTessEvaluationTextureImageUnits" }, 117e5c31af7Sopenharmony_ci { "max_tess_evaluation_output_components", GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS, 128, 0, "gl_MaxTessEvaluationOutputComponents" }, 118e5c31af7Sopenharmony_ci { "max_tess_evaluation_input_components", GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS, 128, 0, "gl_MaxTessEvaluationInputComponents" }, 119e5c31af7Sopenharmony_ci { "max_tess_evaluation_uniform_blocks", GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS, 14, 0, "" }, 120e5c31af7Sopenharmony_ci { "max_tess_evaluation_atomic_counter_buffers", GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS, 0, 0, "gl_MaxTessEvaluationAtomicCounterBuffers" }, 121e5c31af7Sopenharmony_ci { "max_tess_evaluation_atomic_counters", GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS, 0, 0, "gl_MaxTessEvaluationAtomicCounters" }, 122e5c31af7Sopenharmony_ci { "max_tess_evaluation_shader_storage_blocks", GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS, 0, 0, "" }, 123e5c31af7Sopenharmony_ci { "max_geometry_uniform_components", GL_MAX_GEOMETRY_UNIFORM_COMPONENTS, 1024, 0, "gl_MaxGeometryUniformComponents" }, 124e5c31af7Sopenharmony_ci { "max_geometry_uniform_blocks", GL_MAX_GEOMETRY_UNIFORM_BLOCKS, 14, 0, "" }, 125e5c31af7Sopenharmony_ci { "max_geometry_input_components", GL_MAX_GEOMETRY_INPUT_COMPONENTS, 64, 0, "gl_MaxGeometryInputComponents" }, 126e5c31af7Sopenharmony_ci { "max_geometry_output_components", GL_MAX_GEOMETRY_OUTPUT_COMPONENTS, 128, 0, "gl_MaxGeometryOutputComponents" }, 127e5c31af7Sopenharmony_ci { "max_geometry_output_vertices", GL_MAX_GEOMETRY_OUTPUT_VERTICES, 256, 0, "gl_MaxGeometryOutputVertices" }, 128e5c31af7Sopenharmony_ci { "max_geometry_total_output_components", GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, 1024, 0, "gl_MaxGeometryTotalOutputComponents" }, 129e5c31af7Sopenharmony_ci { "max_geometry_texture_image_units", GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, 16, 0, "gl_MaxGeometryTextureImageUnits" }, 130e5c31af7Sopenharmony_ci { "max_geometry_shader_invocations", GL_MAX_GEOMETRY_SHADER_INVOCATIONS, 32, 0, "" }, 131e5c31af7Sopenharmony_ci { "max_vertex_streams", GL_MAX_VERTEX_STREAMS, 4, 0, "" }, 132e5c31af7Sopenharmony_ci { "max_geometry_atomic_counter_buffers", GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS, 0, 0, "gl_MaxGeometryAtomicCounterBuffers" }, 133e5c31af7Sopenharmony_ci { "max_geometry_atomic_counters", GL_MAX_GEOMETRY_ATOMIC_COUNTERS, 0, 0, "gl_MaxGeometryAtomicCounters" }, 134e5c31af7Sopenharmony_ci { "max_geometry_shader_storage_blocks", GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS, 0, 0, "" }, 135e5c31af7Sopenharmony_ci { "max_fragment_uniform_components", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 1024, 0, "gl_MaxFragmentUniformComponents" }, 136e5c31af7Sopenharmony_ci { "max_fragment_uniform_vectors", GL_MAX_FRAGMENT_UNIFORM_VECTORS, 256, 0, "gl_MaxFragmentUniformVectors" }, 137e5c31af7Sopenharmony_ci { "max_fragment_uniform_blocks", GL_MAX_FRAGMENT_UNIFORM_BLOCKS, 14, 0, "" }, 138e5c31af7Sopenharmony_ci { "max_fragment_input_components", GL_MAX_FRAGMENT_INPUT_COMPONENTS, 128, 0, "gl_MaxFragmentInputComponents" }, 139e5c31af7Sopenharmony_ci { "max_texture_image_units", GL_MAX_TEXTURE_IMAGE_UNITS, 16, 0, "gl_MaxTextureImageUnits" }, 140e5c31af7Sopenharmony_ci { "min_program_texture_gather_offset", GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET, -8, 1, "" }, 141e5c31af7Sopenharmony_ci { "max_program_texture_gather_offset", GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET, 7, 0, "" }, 142e5c31af7Sopenharmony_ci { "max_fragment_atomic_counter_buffers", GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS, 1, 0, "gl_MaxFragmentAtomicCounterBuffers" }, 143e5c31af7Sopenharmony_ci { "max_fragment_atomic_counters", GL_MAX_FRAGMENT_ATOMIC_COUNTERS, 8, 0, "gl_MaxFragmentAtomicCounters" }, 144e5c31af7Sopenharmony_ci { "max_fragment_shader_storage_blocks", GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS, 8, 0, "" }, 145e5c31af7Sopenharmony_ci { "max_compute_work_group_invocations", GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, 1024, 0, "" }, 146e5c31af7Sopenharmony_ci { "max_compute_uniform_blocks", GL_MAX_COMPUTE_UNIFORM_BLOCKS, 14, 0, "" }, 147e5c31af7Sopenharmony_ci { "max_compute_texture_image_units", GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS, 16, 0, "gl_MaxComputeTextureImageUnits" }, 148e5c31af7Sopenharmony_ci { "max_compute_atomic_counter_buffers", GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS, 8, 0, "gl_MaxComputeAtomicCounterBuffers" }, 149e5c31af7Sopenharmony_ci { "max_compute_atomic_counters", GL_MAX_COMPUTE_ATOMIC_COUNTERS, 8, 0, "gl_MaxComputeAtomicCounters" }, 150e5c31af7Sopenharmony_ci { "max_compute_shared_memory_size", GL_MAX_COMPUTE_SHARED_MEMORY_SIZE, 32768, 0, "" }, 151e5c31af7Sopenharmony_ci { "max_compute_uniform_components", GL_MAX_COMPUTE_UNIFORM_COMPONENTS, 1024, 0, "gl_MaxComputeUniformComponents" }, 152e5c31af7Sopenharmony_ci { "max_compute_image_uniforms", GL_MAX_COMPUTE_IMAGE_UNIFORMS, 8, 0, "gl_MaxComputeImageUniforms" }, 153e5c31af7Sopenharmony_ci { "max_combined_compute_uniform_components", GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS, 0, 0, "" }, // minimum was not specified 154e5c31af7Sopenharmony_ci { "max_compute_shader_storage_blocks", GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS, 8, 0, "" }, 155e5c31af7Sopenharmony_ci { "min_program_texel_offset", GL_MIN_PROGRAM_TEXEL_OFFSET, -8, 1, "gl_MinProgramTexelOffset" }, 156e5c31af7Sopenharmony_ci { "max_program_texel_offset", GL_MAX_PROGRAM_TEXEL_OFFSET, 7, 0, "gl_MaxProgramTexelOffset" }, 157e5c31af7Sopenharmony_ci { "max_uniform_buffer_bindings", GL_MAX_UNIFORM_BUFFER_BINDINGS, 84, 0, "" }, 158e5c31af7Sopenharmony_ci { "max_uniform_block_size", GL_MAX_UNIFORM_BLOCK_SIZE, 16384, 0, "" }, 159e5c31af7Sopenharmony_ci { "max_combined_uniform_blocks", GL_MAX_COMBINED_UNIFORM_BLOCKS, 70, 0, "" }, 160e5c31af7Sopenharmony_ci { "max_varying_components", GL_MAX_VARYING_COMPONENTS, 60, 0, "gl_MaxVaryingComponents" }, 161e5c31af7Sopenharmony_ci { "max_varying_vectors", GL_MAX_VARYING_VECTORS, 15, 0, "gl_MaxVaryingVectors" }, 162e5c31af7Sopenharmony_ci { "max_combined_texture_image_units", GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 80, 0, "gl_MaxCombinedTextureImageUnits" }, 163e5c31af7Sopenharmony_ci { "max_subroutines", GL_MAX_SUBROUTINES, 256, 0, "" }, 164e5c31af7Sopenharmony_ci { "max_subroutine_uniform_locations", GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS, 1024, 0, "" }, 165e5c31af7Sopenharmony_ci { "max_uniform_locations", GL_MAX_UNIFORM_LOCATIONS, 1024, 0, "" }, 166e5c31af7Sopenharmony_ci { "max_atomic_counter_buffer_bindings", GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, 1, 0, "" }, 167e5c31af7Sopenharmony_ci { "max_atomic_counter_buffer_size", GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE, 32, 0, "gl_MaxAtomicCounterBufferSize" }, 168e5c31af7Sopenharmony_ci { "max_combined_atomic_counter_buffers", GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS, 1, 0, "gl_MaxCombinedAtomicCounterBuffers" }, 169e5c31af7Sopenharmony_ci { "max_combined_atomic_counters", GL_MAX_COMBINED_ATOMIC_COUNTERS, 8, 0, "gl_MaxCombinedAtomicCounters" }, 170e5c31af7Sopenharmony_ci { "max_shader_storage_buffer_bindings", GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, 8, 0, "" }, 171e5c31af7Sopenharmony_ci { "max_combined_shader_storage_blocks", GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, 8, 0, "" }, 172e5c31af7Sopenharmony_ci { "max_image_units", GL_MAX_IMAGE_UNITS, 8, 0, "gl_MaxImageUnits" }, 173e5c31af7Sopenharmony_ci { "max_combined_shader_output_resources", GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES, 8, 0, "gl_MaxCombinedShaderOutputResources" }, 174e5c31af7Sopenharmony_ci { "max_image_samples", GL_MAX_IMAGE_SAMPLES, 0, 0, "gl_MaxImageSamples" }, 175e5c31af7Sopenharmony_ci { "max_vertex_image_uniforms", GL_MAX_VERTEX_IMAGE_UNIFORMS, 0, 0, "gl_MaxVertexImageUniforms" }, 176e5c31af7Sopenharmony_ci { "max_tess_control_image_uniforms", GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS, 0, 0, "gl_MaxTessControlImageUniforms" }, 177e5c31af7Sopenharmony_ci { "max_tess_evaluation_image_uniforms", GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS, 0, 0, "gl_MaxTessEvaluationImageUniforms" }, 178e5c31af7Sopenharmony_ci { "max_geometry_image_uniforms", GL_MAX_GEOMETRY_IMAGE_UNIFORMS, 0, 0, "gl_MaxGeometryImageUniforms" }, 179e5c31af7Sopenharmony_ci { "max_fragment_image_uniforms", GL_MAX_FRAGMENT_IMAGE_UNIFORMS, 8, 0, "gl_MaxFragmentImageUniforms" }, 180e5c31af7Sopenharmony_ci { "max_combined_image_uniforms", GL_MAX_COMBINED_IMAGE_UNIFORMS, 8, 0, "gl_MaxCombinedImageUniforms" }, 181e5c31af7Sopenharmony_ci { "max_combined_vertex_uniform_components", GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, cvuc, 0, "" }, 182e5c31af7Sopenharmony_ci { "max_combined_geometry_uniform_components", GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS, cguc, 0, "" }, 183e5c31af7Sopenharmony_ci { "max_combined_tess_control_uniform_components", GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS, ctcuc, 0, "" }, 184e5c31af7Sopenharmony_ci { "max_combined_tess_evaluation_uniform_components", GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS, cteuc, 0, "" }, 185e5c31af7Sopenharmony_ci { "max_combined_fragment_uniform_components", GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, cfuc, 0, "" }, 186e5c31af7Sopenharmony_ci { "max_debug_message_length", GL_MAX_DEBUG_MESSAGE_LENGTH, 1, 0, "" }, 187e5c31af7Sopenharmony_ci { "max_debug_logged_messages", GL_MAX_DEBUG_LOGGED_MESSAGES, 1, 0, "" }, 188e5c31af7Sopenharmony_ci { "max_debug_group_stack_depth", GL_MAX_DEBUG_GROUP_STACK_DEPTH, 64, 0, "" }, 189e5c31af7Sopenharmony_ci { "max_label_length", GL_MAX_LABEL_LENGTH, 256, 0, "" }, 190e5c31af7Sopenharmony_ci { "max_framebuffer_width", GL_MAX_FRAMEBUFFER_WIDTH, 16384, 0, "" }, 191e5c31af7Sopenharmony_ci { "max_framebuffer_height", GL_MAX_FRAMEBUFFER_HEIGHT, 16384, 0, "" }, 192e5c31af7Sopenharmony_ci { "max_framebuffer_layers", GL_MAX_FRAMEBUFFER_LAYERS, 2048, 0, "" }, 193e5c31af7Sopenharmony_ci { "max_framebuffer_samples", GL_MAX_FRAMEBUFFER_SAMPLES, 4, 0, "" }, 194e5c31af7Sopenharmony_ci { "max_sample_mask_words", GL_MAX_SAMPLE_MASK_WORDS, 1, 0, "" }, 195e5c31af7Sopenharmony_ci { "max_samples", GL_MAX_SAMPLES, 4, 0, "gl_MaxSamples" }, 196e5c31af7Sopenharmony_ci { "max_color_texture_samples", GL_MAX_COLOR_TEXTURE_SAMPLES, 1, 0, "" }, 197e5c31af7Sopenharmony_ci { "max_depth_texture_samples", GL_MAX_DEPTH_TEXTURE_SAMPLES, 1, 0, "" }, 198e5c31af7Sopenharmony_ci { "max_integer_samples", GL_MAX_INTEGER_SAMPLES, 1, 0, "" }, 199e5c31af7Sopenharmony_ci { "max_draw_buffers", GL_MAX_DRAW_BUFFERS, 8, 0, "gl_MaxDrawBuffers" }, 200e5c31af7Sopenharmony_ci { "max_dual_source_draw_buffers", GL_MAX_DUAL_SOURCE_DRAW_BUFFERS, 1, 0, "" }, 201e5c31af7Sopenharmony_ci { "max_color_attachments", GL_MAX_COLOR_ATTACHMENTS, 8, 0, "" }, 202e5c31af7Sopenharmony_ci { "max_transform_feedback_interleaved_components", GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, 64, 0, "gl_MaxTransformFeedbackInterleavedComponents" }, 203e5c31af7Sopenharmony_ci { "max_transform_feedback_separate_attribs", GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, 4, 0, "" }, 204e5c31af7Sopenharmony_ci { "max_transform_feedback_separate_components", GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, 4, 0, "" }, 205e5c31af7Sopenharmony_ci { "max_transform_feedback_buffers", GL_MAX_TRANSFORM_FEEDBACK_BUFFERS, 4, 0, "gl_MaxTransformFeedbackBuffers" }, 206e5c31af7Sopenharmony_ci { "max_atomic_counter_bindings", GL_NONE, 4, 0, "gl_MaxAtomicCounterBindings" }, 207e5c31af7Sopenharmony_ci { "max_combined_image_units_and_fragment_outputs", GL_NONE, 4, 0, "gl_MaxCombinedImageUnitsAndFragmentOutputs" }, 208e5c31af7Sopenharmony_ci { "max_geometry_varying_components", GL_NONE, 4, 0, "gl_MaxGeometryVaryingComponents" } 209e5c31af7Sopenharmony_ci }; 210e5c31af7Sopenharmony_ci 211e5c31af7Sopenharmony_ci static const Limit<GLint64> int64Limits[] = 212e5c31af7Sopenharmony_ci { 213e5c31af7Sopenharmony_ci { "max_shader_storage_block_size", GL_MAX_SHADER_STORAGE_BLOCK_SIZE, 134217728, 0, "" }, 214e5c31af7Sopenharmony_ci { "max_element_index", GL_MAX_ELEMENT_INDEX, 4294967295LL, 0, "" }, 215e5c31af7Sopenharmony_ci }; 216e5c31af7Sopenharmony_ci 217e5c31af7Sopenharmony_ci static const Limit<GLuint64> uint64Limits[] = 218e5c31af7Sopenharmony_ci { 219e5c31af7Sopenharmony_ci { "max_server_wait_timeout", GL_MAX_SERVER_WAIT_TIMEOUT, 0, 0, "" }, 220e5c31af7Sopenharmony_ci }; 221e5c31af7Sopenharmony_ci 222e5c31af7Sopenharmony_ci static const Limit<GLfloat> floatLimits[] = 223e5c31af7Sopenharmony_ci { 224e5c31af7Sopenharmony_ci { "max_texture_lod_bias", GL_MAX_TEXTURE_LOD_BIAS, 2.0, 0, "" }, 225e5c31af7Sopenharmony_ci { "min_fragment_interpolation_offset", GL_MIN_FRAGMENT_INTERPOLATION_OFFSET, -0.5, 1, "" }, 226e5c31af7Sopenharmony_ci { "max_fragment_interpolation_offset", GL_MAX_FRAGMENT_INTERPOLATION_OFFSET, 0.5, 0, "" }, 227e5c31af7Sopenharmony_ci }; 228e5c31af7Sopenharmony_ci 229e5c31af7Sopenharmony_ci static const Limit<tcu::IVec3> ivec3Limits[] = 230e5c31af7Sopenharmony_ci { 231e5c31af7Sopenharmony_ci { "max_compute_work_group_count", GL_MAX_COMPUTE_WORK_GROUP_COUNT, tcu::IVec3(65535,65535,65535), 0, "gl_MaxComputeWorkGroupCount" }, 232e5c31af7Sopenharmony_ci { "max_compute_work_group_size", GL_MAX_COMPUTE_WORK_GROUP_SIZE, tcu::IVec3(1024, 1024, 64), 0, "gl_MaxComputeWorkGroupSize" }, 233e5c31af7Sopenharmony_ci}; 234e5c31af7Sopenharmony_ci 235e5c31af7Sopenharmony_ci for (int idx = 0; idx < DE_LENGTH_OF_ARRAY(intLimits); idx++) 236e5c31af7Sopenharmony_ci { 237e5c31af7Sopenharmony_ci const Limit<GLint>& limit = intLimits[idx]; 238e5c31af7Sopenharmony_ci addChild(new glcts::LimitCase<GLint>(m_context, limit.name, limit.token, limit.boundry, limit.isMaximum, "450", limit.builtin )); 239e5c31af7Sopenharmony_ci } 240e5c31af7Sopenharmony_ci 241e5c31af7Sopenharmony_ci for (int idx = 0; idx < DE_LENGTH_OF_ARRAY(int64Limits); idx++) 242e5c31af7Sopenharmony_ci { 243e5c31af7Sopenharmony_ci const Limit<GLint64>& limit = int64Limits[idx]; 244e5c31af7Sopenharmony_ci addChild(new glcts::LimitCase<GLint64>(m_context, limit.name, limit.token, limit.boundry, limit.isMaximum, "450", limit.builtin )); 245e5c31af7Sopenharmony_ci } 246e5c31af7Sopenharmony_ci 247e5c31af7Sopenharmony_ci for (int idx = 0; idx < DE_LENGTH_OF_ARRAY(uint64Limits); idx++) 248e5c31af7Sopenharmony_ci { 249e5c31af7Sopenharmony_ci const Limit<GLuint64>& limit = uint64Limits[idx]; 250e5c31af7Sopenharmony_ci addChild(new glcts::LimitCase<GLuint64>(m_context, limit.name, limit.token, limit.boundry, limit.isMaximum, "450", limit.builtin )); 251e5c31af7Sopenharmony_ci } 252e5c31af7Sopenharmony_ci 253e5c31af7Sopenharmony_ci for (int idx = 0; idx < DE_LENGTH_OF_ARRAY(floatLimits); idx++) 254e5c31af7Sopenharmony_ci { 255e5c31af7Sopenharmony_ci const Limit<GLfloat>& limit = floatLimits[idx]; 256e5c31af7Sopenharmony_ci addChild(new glcts::LimitCase<GLfloat>(m_context, limit.name, limit.token, limit.boundry, limit.isMaximum, "450", limit.builtin )); 257e5c31af7Sopenharmony_ci } 258e5c31af7Sopenharmony_ci 259e5c31af7Sopenharmony_ci for (int idx = 0; idx < DE_LENGTH_OF_ARRAY(ivec3Limits); idx++) 260e5c31af7Sopenharmony_ci { 261e5c31af7Sopenharmony_ci const Limit<tcu::IVec3>& limit = ivec3Limits[idx]; 262e5c31af7Sopenharmony_ci addChild(new glcts::LimitCase<tcu::IVec3>(m_context, limit.name, limit.token, limit.boundry, limit.isMaximum, "450", limit.builtin )); 263e5c31af7Sopenharmony_ci } 264e5c31af7Sopenharmony_ci} 265e5c31af7Sopenharmony_ci 266e5c31af7Sopenharmony_ci} /* glcts namespace */ 267