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 Single vertex attribute vertex array tests 20 21Tests: 22 + dEQP-GLES2.functional.vertex_arrays.single_attribute.* 23 24Includes: 25 + Rendering with different strides from buffer and user pointer. 26 + Attribute normalization with different types and component counts. 27 + Passing attributes to vec2, vec3 and vec4. 28 + Using buffers with different usage. 29 + Buffer attributes with different offsets. 30 31Excludes: 32 + Buffer data modifications 33 + Stride less than types own size 34 + Robustness with nan or inf 35 + Index buffers or glDrawElements 36 + Different first values for glDrawArrays 37 38Description: 39 40Testcases generate data that defines quads in testcase specifig format. 41This takes account stride, offsets and other parameters. Input types must 42have two or more components to form distinct coordinates. First two components 43are coordinates and six subsequent attributes form two triangles which define a 44quad. Third and fourth component are same for each vertex in quad. 45This data is uploaded to buffer or used from user pointer while rendering. 46Rendering uses simple shader that takes first two components and adds 47first to third component and second to fourth component if more than 48two components are used. First and third component are used as x coordinate 49and second and fourth as y. These values are also scaled to range from -1.0 to 1.0. 50Test renders only once and result is checked against reference implementations result. 51 52Stride tests render different input type and component count combinations from buffer 53and user pointer. Stride testcases test npot and pot strides and types real size as stride. 54Data is passed to shader as vec4. 55 56Normalization is tested with different input types and component counts. User 57pointers are used as source for data and vec4 is used in shaders. 58 59Output type tests pass different input types to different vector types in shader. 60Also different input type and output type component counts are tested. Data is used 61from user pointer. 62 63Usage testcases test buffers with different usage parameters with different strides 64and different sized types. The data is used as vec2 in shaders. 65