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    GL_EXT_primitive_bounding_box extension tests
20e5c31af7Sopenharmony_ci
21e5c31af7Sopenharmony_ciTests:
22e5c31af7Sopenharmony_ci + dEQP-GLES31.functional.primitive_bounding_box.*
23e5c31af7Sopenharmony_ci
24e5c31af7Sopenharmony_ciIncludes:
25e5c31af7Sopenharmony_ci + State query tests
26e5c31af7Sopenharmony_ci + Primitive render tests
27e5c31af7Sopenharmony_ci   - All basic primitives: triangles, (wide) lines, (wide) points
28e5c31af7Sopenharmony_ci   - Set bounding box with gl_BoundingBoxEXT and PrimitiveBoundingBoxEXT
29e5c31af7Sopenharmony_ci   - Rendering with and without tessellation and/or geometry stages
30e5c31af7Sopenharmony_ci   - Rendering with correct, too large, and too small bounding boxes
31e5c31af7Sopenharmony_ci + Depth render tests
32e5c31af7Sopenharmony_ci   - Render pattern and hint the final depth range with bounding box
33e5c31af7Sopenharmony_ci   - Test with built-in depth and user defined (gl_FragDepth) depth
34e5c31af7Sopenharmony_ci + Blit tests
35e5c31af7Sopenharmony_ci   - Blit should not be affected by the bounding box
36e5c31af7Sopenharmony_ci + Clear tests
37e5c31af7Sopenharmony_ci   - Clears should not be affected by the bounding box
38e5c31af7Sopenharmony_ci
39e5c31af7Sopenharmony_ciExcludes:
40e5c31af7Sopenharmony_ci + Special floating point values (NaN, Inf, etc.)
41e5c31af7Sopenharmony_ci + Rendering with separate shader pipelines
42e5c31af7Sopenharmony_ci + Rendering discardable geometry with fragment shaders that have
43e5c31af7Sopenharmony_ci   side-effects (memory writes)
44e5c31af7Sopenharmony_ci + Rendering discardable geometry with active transform feedback
45e5c31af7Sopenharmony_ci
46e5c31af7Sopenharmony_ciDescription:
47e5c31af7Sopenharmony_ci
48e5c31af7Sopenharmony_cistate_query.* cases test the global PRIMITIVE_BOUNDING_BOX_EXT state.
49e5c31af7Sopenharmony_ciTests set the state to certain values and then query the state using
50e5c31af7Sopenharmony_cidifferent methods.
51e5c31af7Sopenharmony_ci
52e5c31af7Sopenharmony_citriangles.*, (wide_)lines.*, (wide_)points.* cases set the primitive
53e5c31af7Sopenharmony_cibounding box and render a test pattern. Rendering results within the
54e5c31af7Sopenharmony_cibounding box are then verified.
55e5c31af7Sopenharmony_ci
56e5c31af7Sopenharmony_ci"global_state.*" cases set the bounding box of the whole test pattern
57e5c31af7Sopenharmony_ciusing the PRIMITIVE_BOUNDING_BOX_EXT state. "tessellation_set_per_draw.*"
58e5c31af7Sopenharmony_cicases set the bounding box of the whole test pattern using
59e5c31af7Sopenharmony_cigl_BoundingBoxEXT output variable. "tessellation_set_per_draw.*" cases
60e5c31af7Sopenharmony_ciset the bounding box for each (tessellation input) primitive separately.
61e5c31af7Sopenharmony_ci
62e5c31af7Sopenharmony_ci"*_bbox_equal" cases set the bounding box to tightly cover the primitive
63e5c31af7Sopenharmony_cior the whole pattern. In "*_bbox_larger" cases, the bounding box is set
64e5c31af7Sopenharmony_cito be larger than the rendered pattern/primitive and in "*_bbox_smaller"
65e5c31af7Sopenharmony_cicases, the bounding box is set to cover only a subset of the pattern.
66e5c31af7Sopenharmony_ciIn these subset cases, only the area covered by the bounding box is
67e5c31af7Sopenharmony_civerified.
68e5c31af7Sopenharmony_ci
69e5c31af7Sopenharmony_citriangles.* cases render a grid with yellow and green cells. Cells are
70e5c31af7Sopenharmony_ciin random order. Result image verification is done by simply checking
71e5c31af7Sopenharmony_cithat the viewport does not contain any background-colored pixels within
72e5c31af7Sopenharmony_cithe pattern area.
73e5c31af7Sopenharmony_ci
74e5c31af7Sopenharmony_ci(wide_)points.* cases render a pattern of green and blue points.
75e5c31af7Sopenharmony_ciVerification checks that no points within the bounding box area are
76e5c31af7Sopenharmony_cimissing and have the correct size. Size test is intended to prevent
77e5c31af7Sopenharmony_cipartially rendered points from passing the test.
78e5c31af7Sopenharmony_ci
79e5c31af7Sopenharmony_ci(wide_)lines.* cases render a pattern of green and blue lines.
80e5c31af7Sopenharmony_ciVerification checks the number and the width of separate lines within
81e5c31af7Sopenharmony_cibounding box area. Number-of-lines check prevents accepting rendering
82e5c31af7Sopenharmony_ciresults with missing lines and the line width check prevents accepting
83e5c31af7Sopenharmony_cipartially rendered lines.
84e5c31af7Sopenharmony_ci
85e5c31af7Sopenharmony_cidepth.* cases render multiple layers with varying depth values while
86e5c31af7Sopenharmony_cihint the resulting depth range with primitive bounding box. In
87e5c31af7Sopenharmony_ci"builtin_depth.*" cases, depth is set by the rasterizer. In
88e5c31af7Sopenharmony_ci"user_defined_depth.*" cases, depth is set in the fragment shader using
89e5c31af7Sopenharmony_cigl_FragDepth. Verification checks that only the topmost layer is visible.
90e5c31af7Sopenharmony_ci
91e5c31af7Sopenharmony_ciblit_fbo.* cases do framebuffer blits with different bounding box values.
92e5c31af7Sopenharmony_ciBounding box values should not affect blitting.
93e5c31af7Sopenharmony_ci
94e5c31af7Sopenharmony_ciclear.* cases do full and scissored framebuffer clears. Since clears are
95e5c31af7Sopenharmony_cinot affected by the bounding box, verification is done by simply comparing
96e5c31af7Sopenharmony_cirendering result with bounding box set to cover full viewport and rendering
97e5c31af7Sopenharmony_ciresult with bounding box set to arbitrary values. In *_with_triangles cases,
98e5c31af7Sopenharmony_cisome geometry is rendered between clears with properly set bounding box.
99e5c31af7Sopenharmony_ci
100e5c31af7Sopenharmony_cicall_order.* cases render a scene with different relative order of
101e5c31af7Sopenharmony_ciglViewport and glPrimitiveBoundingBox. Tests verify that the bounding box
102e5c31af7Sopenharmony_cifor a draw command is calculated from the current state when draw command
103e5c31af7Sopenharmony_ciis issued (i.e. changing call order of state setting functions does not
104e5c31af7Sopenharmony_cichange ther result).
105