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    Rasterizer discard tests
20e5c31af7Sopenharmony_ci
21e5c31af7Sopenharmony_ciTests:
22e5c31af7Sopenharmony_ci + dEQP-GLES3.functional.rasterizer_discard.*
23e5c31af7Sopenharmony_ci
24e5c31af7Sopenharmony_ciIncludes:
25e5c31af7Sopenharmony_ci + Correct discarding of following operations are tested:
26e5c31af7Sopenharmony_ci	- All primitive draw modes
27e5c31af7Sopenharmony_ci	- Color clears & writes
28e5c31af7Sopenharmony_ci	- Depth clears & writes
29e5c31af7Sopenharmony_ci	- Stencil clears & writes
30e5c31af7Sopenharmony_ci + Following test cases are created:
31e5c31af7Sopenharmony_ci	- Discard test for default framebuffer
32e5c31af7Sopenharmony_ci	- Discard test for default framebuffer with scissor test enabled
33e5c31af7Sopenharmony_ci	- Discard test for a framebuffer object
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ciExcludes:
36e5c31af7Sopenharmony_ci
37e5c31af7Sopenharmony_ciDescription:
38e5c31af7Sopenharmony_ci
39e5c31af7Sopenharmony_ciRasterizer discard functionality is tested by first clearing color, depth
40e5c31af7Sopenharmony_ciand stencil buffers to initial values. Next, rasterizer discarding is
41e5c31af7Sopenharmony_cienabled, and an operation is performed. Rasterizer discarding is disabled
42e5c31af7Sopenharmony_ciafterwards. For depth and stencil clears, series of primitives are drawn
43e5c31af7Sopenharmony_cito make sure that the buffer clear operations were ignored.
44e5c31af7Sopenharmony_ci
45e5c31af7Sopenharmony_ciFinally, framebuffer pixels are read. If red color is present or blue
46e5c31af7Sopenharmony_cicolor is not present, the performed operation was not discarded according
47e5c31af7Sopenharmony_cito specification and the test fails.
48e5c31af7Sopenharmony_ci
49e5c31af7Sopenharmony_ciThis procedure is performed for both the default framebuffer and an FBO
50e5c31af7Sopenharmony_ciwith color, depth and stencil attachments. Additionally, default
51e5c31af7Sopenharmony_ciframebuffer discards are tested with scissor test enabled.
52