1e5c31af7Sopenharmony_ci-------------------------------------------------------------------------
2e5c31af7Sopenharmony_cidrawElements Quality Program Test Specification
3e5c31af7Sopenharmony_ci-----------------------------------------------
4e5c31af7Sopenharmony_ci
5e5c31af7Sopenharmony_ciCopyright 2014 The Android Open Source Project
6e5c31af7Sopenharmony_ci
7e5c31af7Sopenharmony_ciLicensed under the Apache License, Version 2.0 (the "License");
8e5c31af7Sopenharmony_ciyou may not use this file except in compliance with the License.
9e5c31af7Sopenharmony_ciYou may obtain a copy of the License at
10e5c31af7Sopenharmony_ci
11e5c31af7Sopenharmony_ci     http://www.apache.org/licenses/LICENSE-2.0
12e5c31af7Sopenharmony_ci
13e5c31af7Sopenharmony_ciUnless required by applicable law or agreed to in writing, software
14e5c31af7Sopenharmony_cidistributed under the License is distributed on an "AS IS" BASIS,
15e5c31af7Sopenharmony_ciWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16e5c31af7Sopenharmony_ciSee the License for the specific language governing permissions and
17e5c31af7Sopenharmony_cilimitations under the License.
18e5c31af7Sopenharmony_ci-------------------------------------------------------------------------
19e5c31af7Sopenharmony_ci    Indirect drawing tests
20e5c31af7Sopenharmony_ci
21e5c31af7Sopenharmony_ciTests:
22e5c31af7Sopenharmony_ci + dEQP-GLES31.functional.draw_indirect.*
23e5c31af7Sopenharmony_ci
24e5c31af7Sopenharmony_ciIncludes:
25e5c31af7Sopenharmony_ci + Draw all basic primitives
26e5c31af7Sopenharmony_ci   - Points, triangles, triangle strips, triangle fans, lines, line
27e5c31af7Sopenharmony_ci     strips, line loops
28e5c31af7Sopenharmony_ci + DrawArraysIndirect firstVertex
29e5c31af7Sopenharmony_ci + DrawElementsIndirect index array tests
30e5c31af7Sopenharmony_ci + DrawElementsIndirect baseVertex
31e5c31af7Sopenharmony_ci   - Test positive and negative baseVertex values
32e5c31af7Sopenharmony_ci + Instanced draw with a high instance count
33e5c31af7Sopenharmony_ci + Negative tests
34e5c31af7Sopenharmony_ci    - Bad alignment
35e5c31af7Sopenharmony_ci	- Source data beyond the end of the buffer
36e5c31af7Sopenharmony_ci	- Use of client side attribute arrays
37e5c31af7Sopenharmony_ci
38e5c31af7Sopenharmony_ciExcludes:
39e5c31af7Sopenharmony_ci
40e5c31af7Sopenharmony_ciDescription:
41e5c31af7Sopenharmony_ci
42e5c31af7Sopenharmony_ciPrimitive drawing cases draw a group of primitives with random generated
43e5c31af7Sopenharmony_civertex attributes and compare the output to a reference image generated
44e5c31af7Sopenharmony_ciby a simple reference rasterizer. Each primitive is tested using a single
45e5c31af7Sopenharmony_ci(generated) attribute array, multiple attribute arrays, instanced
46e5c31af7Sopenharmony_ciattribute array (instance divisor > 0) and with a non-array current
47e5c31af7Sopenharmony_ciattribute.
48e5c31af7Sopenharmony_ci
49e5c31af7Sopenharmony_ciDrawArraysIndirect firstVertex cases draw random triangles using
50e5c31af7Sopenharmony_ciglDrawElementIndirect with firstVertex > 0 and compare results to a
51e5c31af7Sopenharmony_cigenerated reference image.
52e5c31af7Sopenharmony_ci
53e5c31af7Sopenharmony_ciDrawElementsIndirect index array cases draw random triangles using
54e5c31af7Sopenharmony_ciglDrawElementIndirect with index types of unsigned byte, short and int
55e5c31af7Sopenharmony_ciwith both firstIndex = 0 and firstIndex = 1 and compare results to
56e5c31af7Sopenharmony_cigenerated reference images.
57e5c31af7Sopenharmony_ci
58e5c31af7Sopenharmony_ciDrawElementsIndirect baseVertex cases draw random triangles with index
59e5c31af7Sopenharmony_citypes of unsigned byte, short and int using both positive and negative
60e5c31af7Sopenharmony_cibaseVertex values and compare results to generated reference images.
61e5c31af7Sopenharmony_ci
62e5c31af7Sopenharmony_ciInstanced draw cases draw a grid by instancing a single tile. The result
63e5c31af7Sopenharmony_ciis verified by simply searching for background colored (black) pixels in
64e5c31af7Sopenharmony_cithe result image. Resulting image should not contain any background
65e5c31af7Sopenharmony_cicolored pixels.
66e5c31af7Sopenharmony_ci
67e5c31af7Sopenharmony_ciNegative cases test try to issue a bad indirect draw command expecting an
68e5c31af7Sopenharmony_ciINVALID_OPERATION. Bad commands tested are commands with bad alignment,
69e5c31af7Sopenharmony_cicommands only partially in the DRAW_INDIRECT_BUFFER buffer, and commands
70e5c31af7Sopenharmony_cinot even partially in the DRAW_INDIRECT_BUFFER buffer.
71