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    Geometry shader tests
20e5c31af7Sopenharmony_ci
21e5c31af7Sopenharmony_ciTests:
22e5c31af7Sopenharmony_ci + dEQP-GLES31.functional.geometry_shading.*
23e5c31af7Sopenharmony_ci
24e5c31af7Sopenharmony_ciIncludes:
25e5c31af7Sopenharmony_ci + Basic tests:
26e5c31af7Sopenharmony_ci     - gl_PointSize, gl_PrimitiveID, gl_PrimitiveIDIn built-ins
27e5c31af7Sopenharmony_ci     - Constant and varying emit counts
28e5c31af7Sopenharmony_ci     - All input primitive types
29e5c31af7Sopenharmony_ci     - All output privitive types (point, line_strip, triangle_strip)
30e5c31af7Sopenharmony_ci	 - Different number of varyings
31e5c31af7Sopenharmony_ci + Non-sufficient vertex emit counts, superfluous EndPrimitives()
32e5c31af7Sopenharmony_ci + Layered rendering
33e5c31af7Sopenharmony_ci + Negative tests for input types
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ciExcludes:
36e5c31af7Sopenharmony_ci + Geometry shader transform feedback
37e5c31af7Sopenharmony_ci + (Negative) tests for vertex-geo-frag shader varying linkage.
38e5c31af7Sopenharmony_ci + Primitive render order with geometry shader instancing
39e5c31af7Sopenharmony_ci
40e5c31af7Sopenharmony_ciDescription:
41e5c31af7Sopenharmony_ci
42e5c31af7Sopenharmony_ciGeometry shader tests test geometry shader functionality by rendering
43e5c31af7Sopenharmony_cia scene using geometry shaders and comparing the resulting image to
44e5c31af7Sopenharmony_cithe output of a reference renderer. Layered rendering render tests
45e5c31af7Sopenharmony_cidraw scene to a texture which is then read back layer by layer. Contents
46e5c31af7Sopenharmony_ciof each layer is then verified.
47e5c31af7Sopenharmony_ci
48e5c31af7Sopenharmony_ciquery.* test group contains various query tests. max_geometry_* cases
49e5c31af7Sopenharmony_civerify that the implementation limit queried via API is equal to the
50e5c31af7Sopenharmony_cicorresponding GLSL constant. geometry_* and max_geometry_* cases test
51e5c31af7Sopenharmony_cigeometry shader related limits and states. primitives_generated_* cases
52e5c31af7Sopenharmony_civerify GL_PRIMITIVES_GENERATED query result in various scenarios.
53e5c31af7Sopenharmony_cimax_framebuffer_* and framebuffer_* test verify layered fbo limits, states
54e5c31af7Sopenharmony_ciand incompleteness conditions.
55e5c31af7Sopenharmony_ci
56e5c31af7Sopenharmony_cibasic.* tests test basic geometry shader usage: output_* cases emit
57e5c31af7Sopenharmony_cia constant number of vertices. output_vary_by_* cases emit a varying
58e5c31af7Sopenharmony_cinumber of vertices, depending on a shader varying, uniform or a texture
59e5c31af7Sopenharmony_cilookup. basic.point_size, basic.primitive_id_in[_restarted] and
60e5c31af7Sopenharmony_cibasic.primitive_id cases test functionality of a corresponding built-in
61e5c31af7Sopenharmony_civariable. *_restarted variant verifies that primitive restart index has
62e5c31af7Sopenharmony_cino effect to the corresponding variable.
63e5c31af7Sopenharmony_ci
64e5c31af7Sopenharmony_ciinput.* tests verify geometry shader behavior with different input types
65e5c31af7Sopenharmony_ciby drawing a separate triangle for each geometry shader input vertex.
66e5c31af7Sopenharmony_ciinput.triangle_strip_adjacency.* cases verify correct behavior of
67e5c31af7Sopenharmony_ciTRIANGLE_ADJACENCY primitive with different vertex counts.
68e5c31af7Sopenharmony_ci
69e5c31af7Sopenharmony_ciconversion.* tests verify functionality of geometry shaders with different
70e5c31af7Sopenharmony_ciinput and output primitive types.
71e5c31af7Sopenharmony_ci
72e5c31af7Sopenharmony_ciemit.* tests test geometry shaders with different number of EmitVertex()
73e5c31af7Sopenharmony_ciand EndPrimitive() calls, ranging from too few to superfluous. A geometry
74e5c31af7Sopenharmony_cishader invocation with name *_emit_N_end_M calls EmitVertex() N times and
75e5c31af7Sopenharmony_ciEndPrimitive() M times.
76e5c31af7Sopenharmony_ci
77e5c31af7Sopenharmony_civarying.* tests verify the functionality of vertex shader -> geometry shader
78e5c31af7Sopenharmony_civaryigns and geometry shader -> fragment shader varyings.
79e5c31af7Sopenharmony_ci
80e5c31af7Sopenharmony_cilayered.* tests geometry shader layered rendering targeting a cubemap, 3D,
81e5c31af7Sopenharmony_ci2D array, and 2D multisample array texture. Tests render to the default layers,
82e5c31af7Sopenharmony_cionly to one layer, each layer separately, or to each layer with different
83e5c31af7Sopenharmony_cicontents and verify the contents of each layer. fragment_layer_* cases verify
84e5c31af7Sopenharmony_cithe fragment shader built-in variable gl_Layer by outputting different color to
85e5c31af7Sopenharmony_cieach layer. layer_provoking_vertex_* cases verify implementation dependent value
86e5c31af7Sopenharmony_ciGL_LAYER_PROVOKING_VERTEX by rendering two triangles with one vertex having a
87e5c31af7Sopenharmony_cidifferent gl_Layer value. The actual provoking vertex is then verified by
88e5c31af7Sopenharmony_cichecking the layer contents.
89e5c31af7Sopenharmony_ci
90e5c31af7Sopenharmony_ciinstanced.* tests geometry shader instancing functionality.
91e5c31af7Sopenharmony_cigeometry[_output_different]_N_invocations cases test basic geometry shader
92e5c31af7Sopenharmony_ciinstancing by rendering primitives in a circle formation. Each output primitive
93e5c31af7Sopenharmony_cion the circle is generated by a single geometry shader invocation and each
94e5c31af7Sopenharmony_cicircle is generated by a single input primitive. invocation_per_layer and
95e5c31af7Sopenharmony_cimultiple_layers_per_invocation cases test geometry shader instancing with
96e5c31af7Sopenharmony_cilayered rendering. In invocation_per_layer cases, shader invocation writes only
97e5c31af7Sopenharmony_cito a single layer and in multiple_layers_per_invocation cases to two layers. In
98e5c31af7Sopenharmony_ciinvocation_output_vary_by_* cases, invocations emit a varying number of
99e5c31af7Sopenharmony_civertices, depending on a shader varying, uniform or a texture lookup.
100e5c31af7Sopenharmony_cidraw_N_instances_geometry_M_invocations cases test geometry instancing in with
101e5c31af7Sopenharmony_ciinstanced drawing. As in the geometry_N_invocations, a group of primitives is
102e5c31af7Sopenharmony_cidrawn around each input primitive instance.
103e5c31af7Sopenharmony_ci
104e5c31af7Sopenharmony_cinegative.* cases create a geometry shader accepting a certain input
105e5c31af7Sopenharmony_ciprimitive type and then try to use the shader when drawing with an incompatible
106e5c31af7Sopenharmony_ciprimitive type. GL_INVALID_OPERATION is expected.
107e5c31af7Sopenharmony_ci
108e5c31af7Sopenharmony_civertex_transform_feedback.* cases test transform feedback relaxations introduced
109e5c31af7Sopenharmony_ciin the extension. Tests include all new render primitive modes and
110e5c31af7Sopenharmony_cidraw{arrays,elements}{e,indirect,instanced} draw functions.
111e5c31af7Sopenharmony_cicapture_vertex_draw_elements_overflow_single_buffer case tests that a
112e5c31af7Sopenharmony_cibuffer-overflowing primitive feedback result is not partially written to the
113e5c31af7Sopenharmony_cifeedback buffer.
114