Merge "Use de::ArrayBuffer, not raw arrays, in sglrReferenceContext."
[platform/upstream/VK-GL-CTS.git] / doc / testspecs / GLES31 / functional.geometry_shading.txt
1 -------------------------------------------------------------------------
2 drawElements Quality Program Test Specification
3 -----------------------------------------------
4
5 Copyright 2014 The Android Open Source Project
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11      http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 -------------------------------------------------------------------------
19     Geometry shader tests
20
21 Tests:
22  + dEQP-GLES31.functional.geometry_shading.*
23
24 Includes:
25  + Basic tests:
26      - gl_PointSize, gl_PrimitiveID, gl_PrimitiveIDIn built-ins
27      - Constant and varying emit counts
28      - All input primitive types
29      - All output privitive types (point, line_strip, triangle_strip)
30          - Different number of varyings
31  + Non-sufficient vertex emit counts, superfluous EndPrimitives()
32  + Layered rendering
33  + Negative tests for input types
34
35 Excludes:
36  + Geometry shader transform feedback
37  + (Negative) tests for vertex-geo-frag shader varying linkage.
38  + Primitive render order with geometry shader instancing
39
40 Description:
41
42 Geometry shader tests test geometry shader functionality by rendering
43 a scene using geometry shaders and comparing the resulting image to
44 the output of a reference renderer. Layered rendering render tests
45 draw scene to a texture which is then read back layer by layer. Contents
46 of each layer is then verified.
47
48 query.* test group contains various query tests. max_geometry_* cases
49 verify that the implementation limit queried via API is equal to the
50 corresponding GLSL constant. geometry_* and max_geometry_* cases test
51 geometry shader related limits and states. primitives_generated_* cases
52 verify GL_PRIMITIVES_GENERATED query result in various scenarios.
53 max_framebuffer_* and framebuffer_* test verify layered fbo limits, states
54 and incompleteness conditions.
55
56 basic.* tests test basic geometry shader usage: output_* cases emit
57 a constant number of vertices. output_vary_by_* cases emit a varying
58 number of vertices, depending on a shader varying, uniform or a texture
59 lookup. basic.point_size, basic.primitive_id_in[_restarted] and
60 basic.primitive_id cases test functionality of a corresponding built-in
61 variable. *_restarted variant verifies that primitive restart index has
62 no effect to the corresponding variable.
63
64 input.* tests verify geometry shader behavior with different input types
65 by drawing a separate triangle for each geometry shader input vertex.
66 input.triangle_strip_adjacency.* cases verify correct behavior of
67 TRIANGLE_ADJACENCY primitive with different vertex counts.
68
69 conversion.* tests verify functionality of geometry shaders with different
70 input and output primitive types.
71
72 emit.* tests test geometry shaders with different number of EmitVertex()
73 and EndPrimitive() calls, ranging from too few to superfluous. A geometry
74 shader invocation with name *_emit_N_end_M calls EmitVertex() N times and
75 EndPrimitive() M times.
76
77 varying.* tests verify the functionality of vertex shader -> geometry shader
78 varyigns and geometry shader -> fragment shader varyings.
79
80 layered.* tests geometry shader layered rendering targeting a cubemap, 3D,
81 2D array, and 2D multisample array texture. Tests render to the default layers,
82 only to one layer, each layer separately, or to each layer with different
83 contents and verify the contents of each layer. fragment_layer_* cases verify
84 the fragment shader built-in variable gl_Layer by outputting different color to
85 each layer. layer_provoking_vertex_* cases verify implementation dependent value
86 GL_LAYER_PROVOKING_VERTEX by rendering two triangles with one vertex having a
87 different gl_Layer value. The actual provoking vertex is then verified by
88 checking the layer contents.
89
90 instanced.* tests geometry shader instancing functionality.
91 geometry[_output_different]_N_invocations cases test basic geometry shader
92 instancing by rendering primitives in a circle formation. Each output primitive
93 on the circle is generated by a single geometry shader invocation and each
94 circle is generated by a single input primitive. invocation_per_layer and
95 multiple_layers_per_invocation cases test geometry shader instancing with
96 layered rendering. In invocation_per_layer cases, shader invocation writes only
97 to a single layer and in multiple_layers_per_invocation cases to two layers. In
98 invocation_output_vary_by_* cases, invocations emit a varying number of
99 vertices, depending on a shader varying, uniform or a texture lookup.
100 draw_N_instances_geometry_M_invocations cases test geometry instancing in with
101 instanced drawing. As in the geometry_N_invocations, a group of primitives is
102 drawn around each input primitive instance.
103
104 negative.* cases create a geometry shader accepting a certain input
105 primitive type and then try to use the shader when drawing with an incompatible
106 primitive type. GL_INVALID_OPERATION is expected.
107
108 vertex_transform_feedback.* cases test transform feedback relaxations introduced
109 in the extension. Tests include all new render primitive modes and
110 draw{arrays,elements}{e,indirect,instanced} draw functions.
111 capture_vertex_draw_elements_overflow_single_buffer case tests that a
112 buffer-overflowing primitive feedback result is not partially written to the
113 feedback buffer.