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 Instanced rendering tests 20 21Tests: 22 + dEQP-GLES3.functional.instanced.* 23 24Includes: 25 + Draw using: 26 - glDrawArraysInstanced() 27 - glDrawElementsInstanced() 28 + Do instancing using: 29 - gl_InstanceID vertex shader input 30 - glVertexAttribDivisor() 31 - Mixture of the above 32 + Instance counts 1, 2, 4, 20 33 + Instanced attribute tests with different types 34 35Description: 36 37For each instance a rectangle-shaped grid of triangles is drawn. Instanced 38variables are rectangle offset and color components R, G and B. Offsets are 39chosen such that the rectangles are drawn next to each other. 40 41In the cases that test draw function, instancing method and instance count, the 42instance variables are either calculated based on gl_InstanceID in the vertex 43shader or given to the vertex shader as attributes instanced with 44glVertexAttribDivisor(). In a mixed case different methods are used for 45different variables. Instanced attributes are of type float, except for the 46offset attribute, which is of type vec3. 47 48In the tests for instanced attribute types, only the vertex attribute divisor 49method is used. The instanced attributes for color components R, G and B are 50all int, uint, float or corresponding vectors, or matrices. The instance offset 51attribute is of type vec3. In these cases, draw function and instance count are 52fixed to glDrawArraysInstanced() and 4, respectively. 53 54In all cases, the resulting image is compared against a reference image 55produced by a reference renderer. 56