1*35238bceSAndroid Build Coastguard Worker------------------------------------------------------------------------- 2*35238bceSAndroid Build Coastguard WorkerdrawElements Quality Program Test Specification 3*35238bceSAndroid Build Coastguard Worker----------------------------------------------- 4*35238bceSAndroid Build Coastguard Worker 5*35238bceSAndroid Build Coastguard WorkerCopyright 2014 The Android Open Source Project 6*35238bceSAndroid Build Coastguard Worker 7*35238bceSAndroid Build Coastguard WorkerLicensed under the Apache License, Version 2.0 (the "License"); 8*35238bceSAndroid Build Coastguard Workeryou may not use this file except in compliance with the License. 9*35238bceSAndroid Build Coastguard WorkerYou may obtain a copy of the License at 10*35238bceSAndroid Build Coastguard Worker 11*35238bceSAndroid Build Coastguard Worker http://www.apache.org/licenses/LICENSE-2.0 12*35238bceSAndroid Build Coastguard Worker 13*35238bceSAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software 14*35238bceSAndroid Build Coastguard Workerdistributed under the License is distributed on an "AS IS" BASIS, 15*35238bceSAndroid Build Coastguard WorkerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16*35238bceSAndroid Build Coastguard WorkerSee the License for the specific language governing permissions and 17*35238bceSAndroid Build Coastguard Workerlimitations under the License. 18*35238bceSAndroid Build Coastguard Worker------------------------------------------------------------------------- 19*35238bceSAndroid Build Coastguard Worker Instanced rendering tests 20*35238bceSAndroid Build Coastguard Worker 21*35238bceSAndroid Build Coastguard WorkerTests: 22*35238bceSAndroid Build Coastguard Worker + dEQP-GLES3.functional.instanced.* 23*35238bceSAndroid Build Coastguard Worker 24*35238bceSAndroid Build Coastguard WorkerIncludes: 25*35238bceSAndroid Build Coastguard Worker + Draw using: 26*35238bceSAndroid Build Coastguard Worker - glDrawArraysInstanced() 27*35238bceSAndroid Build Coastguard Worker - glDrawElementsInstanced() 28*35238bceSAndroid Build Coastguard Worker + Do instancing using: 29*35238bceSAndroid Build Coastguard Worker - gl_InstanceID vertex shader input 30*35238bceSAndroid Build Coastguard Worker - glVertexAttribDivisor() 31*35238bceSAndroid Build Coastguard Worker - Mixture of the above 32*35238bceSAndroid Build Coastguard Worker + Instance counts 1, 2, 4, 20 33*35238bceSAndroid Build Coastguard Worker + Instanced attribute tests with different types 34*35238bceSAndroid Build Coastguard Worker 35*35238bceSAndroid Build Coastguard WorkerDescription: 36*35238bceSAndroid Build Coastguard Worker 37*35238bceSAndroid Build Coastguard WorkerFor each instance a rectangle-shaped grid of triangles is drawn. Instanced 38*35238bceSAndroid Build Coastguard Workervariables are rectangle offset and color components R, G and B. Offsets are 39*35238bceSAndroid Build Coastguard Workerchosen such that the rectangles are drawn next to each other. 40*35238bceSAndroid Build Coastguard Worker 41*35238bceSAndroid Build Coastguard WorkerIn the cases that test draw function, instancing method and instance count, the 42*35238bceSAndroid Build Coastguard Workerinstance variables are either calculated based on gl_InstanceID in the vertex 43*35238bceSAndroid Build Coastguard Workershader or given to the vertex shader as attributes instanced with 44*35238bceSAndroid Build Coastguard WorkerglVertexAttribDivisor(). In a mixed case different methods are used for 45*35238bceSAndroid Build Coastguard Workerdifferent variables. Instanced attributes are of type float, except for the 46*35238bceSAndroid Build Coastguard Workeroffset attribute, which is of type vec3. 47*35238bceSAndroid Build Coastguard Worker 48*35238bceSAndroid Build Coastguard WorkerIn the tests for instanced attribute types, only the vertex attribute divisor 49*35238bceSAndroid Build Coastguard Workermethod is used. The instanced attributes for color components R, G and B are 50*35238bceSAndroid Build Coastguard Workerall int, uint, float or corresponding vectors, or matrices. The instance offset 51*35238bceSAndroid Build Coastguard Workerattribute is of type vec3. In these cases, draw function and instance count are 52*35238bceSAndroid Build Coastguard Workerfixed to glDrawArraysInstanced() and 4, respectively. 53*35238bceSAndroid Build Coastguard Worker 54*35238bceSAndroid Build Coastguard WorkerIn all cases, the resulting image is compared against a reference image 55*35238bceSAndroid Build Coastguard Workerproduced by a reference renderer. 56