1------------------------------------------------------------------------- 2drawElements Quality Program Test Specification 3----------------------------------------------- 4 5Copyright 2014 The Android Open Source Project 6 7Licensed under the Apache License, Version 2.0 (the "License"); 8you may not use this file except in compliance with the License. 9You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13Unless required by applicable law or agreed to in writing, software 14distributed under the License is distributed on an "AS IS" BASIS, 15WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16See the License for the specific language governing permissions and 17limitations under the License. 18------------------------------------------------------------------------- 19 Program interface query 20 21Tests: 22 + dEQP-GLES31.functional.program_interface_query.* 23 24Includes: 25 + Basic queries for every property of every program interface 26 + Basic tests for resource list contents for every program interface 27 + Attempts to query data to too small buffers 28 29Excludes: 30 + Exact layout validation for data layout related queries (offset, 31 stride) 32 + Consistency validation for location queries (as in no two different 33 variables with the same location) 34 35Description: 36 37buffer_limited_query.* cases test that queries function properly when 38given a return value buffer that is too short to contain all queried 39data. resource_name_query case tests GetProgramResourceName function 40with different character output buffer sizes and resource_query case 41tests GetProgramResourceiv with different property value output buffer 42sizes. 43 44Program interface query tests are structured as follows. Each program 45interface has its own test group at the 46functional.program_interface_query.* level. Each program interface test 47group contains a test group for each supported property, for example 48"uniform.location.*". Additionally, each program interface contains test 49group "resource_list" which contains tests for resource list generation. 50In addition, some program interfaces contain "random" test group which 51contains randomly (fixed seed) generated tests. 52 53Each program interface query test, a program corresponding to the case's 54full name is generated. For example, 55"uniform.name_length.default_block.var_struct" would mean a NAME_LENGTH 56query for a member variable of a uniform struct in the default block. 57Cases without explicit mention of the shader type in its full name 58generate compute shaders. The generated program is compiled and linked 59and then the specified property is queried and verified. For the 60randomly generated cases, all supported properties of the interface are 61queried and verified. 62 63uniform.* and buffer_variable.* cases test GL_UNIFORM and 64GL_BUFFER_VARIABLE program interfaces, respectively. Test groups 65array_size, array_stride, atomic_counter_buffer_index, block_index, 66location, matrix_row_major, matrix_stride, name_length, offset, 67referenced_by_shader, and type test properties ARRAY_SIZE, ARRAY_STRIDE, 68ATOMIC_COUNTER_BUFFER_INDEX, BLOCK_INDEX, LOCATION, IS_ROW_MAJOR, 69MATRIX_STRIDE, NAME_LENGTH, OFFSET, REFERENCED_BY_*_SHADER, and TYPE 70properties, respectively. Additionally, the buffer_variable.* test group 71contains tests for TOP_LEVEL_ARRAY_SIZE (top_level_array_size.*) and 72TOP_LEVEL_ARRAY_STRIDE (top_level_array_stride.*) properties. 73 74uniform_block.* and shader_storage_block.* cases test GL_UNIFORM_BLOCK 75and GL_SHADER_STORAGE_BLOCK program interfaces, respectively. Test 76groups active_variables, buffer_binding, buffer_data_size, name_length, 77and referenced_by test properties ACTIVE_VARIABLES, BUFFER_BINDING, 78BUFFER_DATA_SIZE, NAME_LENGTH, and REFERENCED_BY_*_SHADER properties, 79respectively. 80 81atomic_counter_buffer.* cases test GL_ATOMIC_COUNTER_BUFFER program 82interface. Test cases active_variables, buffer_binding, 83buffer_data_size, and referenced_by_* test ACTIVE_VARIABLES, 84BUFFER_BINDING, BUFFER_DATA_SIZE, and REFERENCED_BY_*_SHADER properties, 85respectively. 86 87program_input.* and program_output.* cases test PROGRAM_INPUT and 88PROGRAM_OUTPUT program interfaces, respectively. Test groups array_size, 89location, name_length, referenced_by, and type test ARRAY_SIZE, 90LOCATION, NAME_LENGTH, REFERENCED_BY_*_SHADER and TYPE properties, 91respectively. Each test group contains separate tests for different 92program configurations such as compute program, vertex-fragment program, 93or separable shader programs. 94 95transform_feedback_varying.* cases test TRANSFORM_FEEDBACK_VARYING 96program interface. Test groups array_size, name_length, and type test 97ARRAY_SIZE, NAME_LENGTH, and TYPE properties. Each test group contains 98separate tests for a complete vertex-fragment program and for separable 99program containing only a vertex shader. Test query properties of 100various types of user-defined output variables and a built-in output 101gl_Position. 102