xref: /aosp_15_r20/external/deqp/doc/testspecs/GLES3/functional.shaders.fragdepth.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_FragDepth tests
20*35238bceSAndroid Build Coastguard Worker
21*35238bceSAndroid Build Coastguard WorkerTests:
22*35238bceSAndroid Build Coastguard Worker + dEQP-GLES3.functional.shaders.fragdepth.*
23*35238bceSAndroid Build Coastguard Worker
24*35238bceSAndroid Build Coastguard WorkerIncludes:
25*35238bceSAndroid Build Coastguard Worker + gl_FragDepth usage in following scenarios:
26*35238bceSAndroid Build Coastguard Worker   - Unconditional write
27*35238bceSAndroid Build Coastguard Worker   - Conditional write
28*35238bceSAndroid Build Coastguard Worker   - Write in loop
29*35238bceSAndroid Build Coastguard Worker   - Write in user-defined function
30*35238bceSAndroid Build Coastguard Worker   - Discard before and after write
31*35238bceSAndroid Build Coastguard Worker + Depth comparison with gl_FragDepth write
32*35238bceSAndroid Build Coastguard Worker + gl_FragDepth use when rendering triangles
33*35238bceSAndroid Build Coastguard Worker
34*35238bceSAndroid Build Coastguard WorkerExcludes:
35*35238bceSAndroid Build Coastguard Worker + Depth value conversion accuracy tests
36*35238bceSAndroid Build Coastguard Worker + gl_FragDepth use when rendering points and lines
37*35238bceSAndroid Build Coastguard Worker
38*35238bceSAndroid Build Coastguard WorkerDescription:
39*35238bceSAndroid Build Coastguard Worker
40*35238bceSAndroid Build Coastguard WorkerFor comparison cases depth buffer is first initialized by rendering
41*35238bceSAndroid Build Coastguard Workertwo adjecent quads. Left one will fill depth buffer with constant value,
42*35238bceSAndroid Build Coastguard Workerwhile right quad fills with value that is interpolated in range 0..1.
43*35238bceSAndroid Build Coastguard WorkerColor buffer is filled with blue color.
44*35238bceSAndroid Build Coastguard WorkerSingle quad with a selected shader and depth comparison mode is rendered.
45*35238bceSAndroid Build Coastguard WorkerWhere depth test passes, green value will be written to color buffer.
46*35238bceSAndroid Build Coastguard Worker
47*35238bceSAndroid Build Coastguard WorkerFor depth write-only cases the selected shader is used to initialize
48*35238bceSAndroid Build Coastguard Workerthe depth buffer by rendering a simple quad. After that depth buffer
49*35238bceSAndroid Build Coastguard Workeris visualized by rendering multiple viewport-sized quads with a different
50*35238bceSAndroid Build Coastguard Workercolors and depth values in such manner that each depth range slice
51*35238bceSAndroid Build Coastguard Workerwill end up showing in color buffer with a distinct color.
52*35238bceSAndroid Build Coastguard Worker
53*35238bceSAndroid Build Coastguard WorkerIn both test types rendered image is compared against a reference image
54*35238bceSAndroid Build Coastguard Workerproduced by a reference renderer.
55