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