xref: /aosp_15_r20/external/deqp/doc/testspecs/GL3/functional.conditional_render.txt (revision 35238bce31c2a825756842865a792f8cf7f89930)
1*35238bceSAndroid Build Coastguard Worker-------------------------------------------------------------------------
2*35238bceSAndroid Build Coastguard WorkerdrawElements Quality Program Test Specification
3*35238bceSAndroid Build Coastguard Worker-----------------------------------------------
4*35238bceSAndroid Build Coastguard Worker
5*35238bceSAndroid Build Coastguard WorkerCopyright 2014 The Android Open Source Project
6*35238bceSAndroid Build Coastguard Worker
7*35238bceSAndroid Build Coastguard WorkerLicensed under the Apache License, Version 2.0 (the "License");
8*35238bceSAndroid Build Coastguard Workeryou may not use this file except in compliance with the License.
9*35238bceSAndroid Build Coastguard WorkerYou may obtain a copy of the License at
10*35238bceSAndroid Build Coastguard Worker
11*35238bceSAndroid Build Coastguard Worker     http://www.apache.org/licenses/LICENSE-2.0
12*35238bceSAndroid Build Coastguard Worker
13*35238bceSAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software
14*35238bceSAndroid Build Coastguard Workerdistributed under the License is distributed on an "AS IS" BASIS,
15*35238bceSAndroid Build Coastguard WorkerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16*35238bceSAndroid Build Coastguard WorkerSee the License for the specific language governing permissions and
17*35238bceSAndroid Build Coastguard Workerlimitations under the License.
18*35238bceSAndroid Build Coastguard Worker-------------------------------------------------------------------------
19*35238bceSAndroid Build Coastguard Worker    GL 3 conditional render
20*35238bceSAndroid Build Coastguard Worker
21*35238bceSAndroid Build Coastguard WorkerTests:
22*35238bceSAndroid Build Coastguard Worker + dEQP-GL3.functional.conditional_render.*
23*35238bceSAndroid Build Coastguard Worker
24*35238bceSAndroid Build Coastguard WorkerIncludes:
25*35238bceSAndroid Build Coastguard Worker + All valid rendering commands included/excluded by query
26*35238bceSAndroid Build Coastguard Worker   - DrawArrays
27*35238bceSAndroid Build Coastguard Worker   - DrawArraysInstanced
28*35238bceSAndroid Build Coastguard Worker   - MultiDrawArrays
29*35238bceSAndroid Build Coastguard Worker
30*35238bceSAndroid Build Coastguard Worker   - DrawElements
31*35238bceSAndroid Build Coastguard Worker   - DrawElementsInstanced
32*35238bceSAndroid Build Coastguard Worker   - DrawElementsInstancedBaseVertex
33*35238bceSAndroid Build Coastguard Worker   - DrawElementsBaseVertex
34*35238bceSAndroid Build Coastguard Worker   - DrawRangeElements
35*35238bceSAndroid Build Coastguard Worker   - DrawRangeElementsBaseVertex
36*35238bceSAndroid Build Coastguard Worker   - MultiDrawElements
37*35238bceSAndroid Build Coastguard Worker   - MultiDrawElementsBaseVertex
38*35238bceSAndroid Build Coastguard Worker   - Clear
39*35238bceSAndroid Build Coastguard Worker   - ClearBuffer*
40*35238bceSAndroid Build Coastguard Worker + All depth comparison modes
41*35238bceSAndroid Build Coastguard Worker + Framebuffer swap between query & render
42*35238bceSAndroid Build Coastguard Worker   - Excluding BY_REGION query modes
43*35238bceSAndroid Build Coastguard Worker + All modes
44*35238bceSAndroid Build Coastguard Worker   - QUERY_(BY_REGION_)(NO_)WAIT
45*35238bceSAndroid Build Coastguard Worker + Dependent queries
46*35238bceSAndroid Build Coastguard Worker
47*35238bceSAndroid Build Coastguard WorkerExcludes:
48*35238bceSAndroid Build Coastguard Worker + Immediate mode rendering
49*35238bceSAndroid Build Coastguard Worker + Primitives other than triangles
50*35238bceSAndroid Build Coastguard Worker + Negative tests
51*35238bceSAndroid Build Coastguard Worker + Tests for NO_WAIT and BY_REGION modes are very limited
52*35238bceSAndroid Build Coastguard Worker
53*35238bceSAndroid Build Coastguard WorkerDescription:
54*35238bceSAndroid Build Coastguard Worker
55*35238bceSAndroid Build Coastguard WorkerConditional rendering is tested with various depth function/primitive
56*35238bceSAndroid Build Coastguard Workeroverlap conditions. Each query test renders a scene with one conditional
57*35238bceSAndroid Build Coastguard Workerrender call and verifies the result against the same scene with the
58*35238bceSAndroid Build Coastguard Workerpreviously GL controlled conditional render call controlled by the test.
59*35238bceSAndroid Build Coastguard Worker
60*35238bceSAndroid Build Coastguard WorkerDraw calls (excluding clears) are tested with the same method, with the
61*35238bceSAndroid Build Coastguard Workerconditional call indicated by the test name. The occlusion query used in
62*35238bceSAndroid Build Coastguard Workerthese tests is trivially true/false.
63*35238bceSAndroid Build Coastguard Worker
64*35238bceSAndroid Build Coastguard WorkerClears are tested by rendering some geometry for an occlusion query and then
65*35238bceSAndroid Build Coastguard Workerconditionally clearing the framebuffer. The verification used depends on the
66*35238bceSAndroid Build Coastguard Workerexpected result of the occlusion query. If the query is expected to pass, the
67*35238bceSAndroid Build Coastguard Workerframebuffer is verified to contain only the color it was cleared to.
68*35238bceSAndroid Build Coastguard WorkerOtherwise the contents of the framebuffer are verified to match its contents
69*35238bceSAndroid Build Coastguard Workerbefore the conditional clear.
70*35238bceSAndroid Build Coastguard Worker
71*35238bceSAndroid Build Coastguard WorkerDepth/stencil clear tests unconditionally clear the color buffer after
72*35238bceSAndroid Build Coastguard Workerrendering the occlusion geometry. After the conditional depth/stencil clear
73*35238bceSAndroid Build Coastguard Workera full framebuffer triangle is rendered with depth/stencil tests setup
74*35238bceSAndroid Build Coastguard Workerto pass if the clear took place. The resulting framebuffer is read out and
75*35238bceSAndroid Build Coastguard Workercompared to the color of the intermediate clear or the filling triangle as
76*35238bceSAndroid Build Coastguard Workerappropriate for the expected occlusion query result.
77*35238bceSAndroid Build Coastguard Worker
78*35238bceSAndroid Build Coastguard WorkerAll clear tests use non-default framebuffers, all others use the default.
79*35238bceSAndroid Build Coastguard Worker
80*35238bceSAndroid Build Coastguard WorkerFramebuffer swap cases use a trivial occlusion query but change the bound
81*35238bceSAndroid Build Coastguard Worker(read & write) FBO between the occludion query and the conditional rendering.
82*35238bceSAndroid Build Coastguard WorkerThe occlusion query is performed with the default framebuffer.
83*35238bceSAndroid Build Coastguard Worker
84*35238bceSAndroid Build Coastguard WorkerWait mode test render geometry that is not dependent on the result of the
85*35238bceSAndroid Build Coastguard Workerocclusion queries. These tests thus only test for false positive occlusion
86*35238bceSAndroid Build Coastguard Workerquery results.
87*35238bceSAndroid Build Coastguard Worker
88*35238bceSAndroid Build Coastguard WorkerDependent queries render a number of primitives where each conditionally
89*35238bceSAndroid Build Coastguard Workerrendered primitive (excluding the first) is also used for an occlusion query
90*35238bceSAndroid Build Coastguard Workerthat controls the rendering of the next primitive, which in turn is used for
91*35238bceSAndroid Build Coastguard Workerthe next occlusion query and so on. In some of these test one primitive in
92*35238bceSAndroid Build Coastguard Workerthis chain is placed in an occluded location, starting a cascade of failing
93*35238bceSAndroid Build Coastguard Workerocclusion queries.
94