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 Indirect drawing tests 20*35238bceSAndroid Build Coastguard Worker 21*35238bceSAndroid Build Coastguard WorkerTests: 22*35238bceSAndroid Build Coastguard Worker + dEQP-GLES31.functional.draw_indirect.* 23*35238bceSAndroid Build Coastguard Worker 24*35238bceSAndroid Build Coastguard WorkerIncludes: 25*35238bceSAndroid Build Coastguard Worker + Draw all basic primitives 26*35238bceSAndroid Build Coastguard Worker - Points, triangles, triangle strips, triangle fans, lines, line 27*35238bceSAndroid Build Coastguard Worker strips, line loops 28*35238bceSAndroid Build Coastguard Worker + DrawArraysIndirect firstVertex 29*35238bceSAndroid Build Coastguard Worker + DrawElementsIndirect index array tests 30*35238bceSAndroid Build Coastguard Worker + DrawElementsIndirect baseVertex 31*35238bceSAndroid Build Coastguard Worker - Test positive and negative baseVertex values 32*35238bceSAndroid Build Coastguard Worker + Instanced draw with a high instance count 33*35238bceSAndroid Build Coastguard Worker + Negative tests 34*35238bceSAndroid Build Coastguard Worker - Bad alignment 35*35238bceSAndroid Build Coastguard Worker - Source data beyond the end of the buffer 36*35238bceSAndroid Build Coastguard Worker - Use of client side attribute arrays 37*35238bceSAndroid Build Coastguard Worker 38*35238bceSAndroid Build Coastguard WorkerExcludes: 39*35238bceSAndroid Build Coastguard Worker 40*35238bceSAndroid Build Coastguard WorkerDescription: 41*35238bceSAndroid Build Coastguard Worker 42*35238bceSAndroid Build Coastguard WorkerPrimitive drawing cases draw a group of primitives with random generated 43*35238bceSAndroid Build Coastguard Workervertex attributes and compare the output to a reference image generated 44*35238bceSAndroid Build Coastguard Workerby a simple reference rasterizer. Each primitive is tested using a single 45*35238bceSAndroid Build Coastguard Worker(generated) attribute array, multiple attribute arrays, instanced 46*35238bceSAndroid Build Coastguard Workerattribute array (instance divisor > 0) and with a non-array current 47*35238bceSAndroid Build Coastguard Workerattribute. 48*35238bceSAndroid Build Coastguard Worker 49*35238bceSAndroid Build Coastguard WorkerDrawArraysIndirect firstVertex cases draw random triangles using 50*35238bceSAndroid Build Coastguard WorkerglDrawElementIndirect with firstVertex > 0 and compare results to a 51*35238bceSAndroid Build Coastguard Workergenerated reference image. 52*35238bceSAndroid Build Coastguard Worker 53*35238bceSAndroid Build Coastguard WorkerDrawElementsIndirect index array cases draw random triangles using 54*35238bceSAndroid Build Coastguard WorkerglDrawElementIndirect with index types of unsigned byte, short and int 55*35238bceSAndroid Build Coastguard Workerwith both firstIndex = 0 and firstIndex = 1 and compare results to 56*35238bceSAndroid Build Coastguard Workergenerated reference images. 57*35238bceSAndroid Build Coastguard Worker 58*35238bceSAndroid Build Coastguard WorkerDrawElementsIndirect baseVertex cases draw random triangles with index 59*35238bceSAndroid Build Coastguard Workertypes of unsigned byte, short and int using both positive and negative 60*35238bceSAndroid Build Coastguard WorkerbaseVertex values and compare results to generated reference images. 61*35238bceSAndroid Build Coastguard Worker 62*35238bceSAndroid Build Coastguard WorkerInstanced draw cases draw a grid by instancing a single tile. The result 63*35238bceSAndroid Build Coastguard Workeris verified by simply searching for background colored (black) pixels in 64*35238bceSAndroid Build Coastguard Workerthe result image. Resulting image should not contain any background 65*35238bceSAndroid Build Coastguard Workercolored pixels. 66*35238bceSAndroid Build Coastguard Worker 67*35238bceSAndroid Build Coastguard WorkerNegative cases test try to issue a bad indirect draw command expecting an 68*35238bceSAndroid Build Coastguard WorkerINVALID_OPERATION. Bad commands tested are commands with bad alignment, 69*35238bceSAndroid Build Coastguard Workercommands only partially in the DRAW_INDIRECT_BUFFER buffer, and commands 70*35238bceSAndroid Build Coastguard Workernot even partially in the DRAW_INDIRECT_BUFFER buffer. 71