xref: /aosp_15_r20/external/deqp/doc/testspecs/GLES2/functional.fbo.completeness.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    Framebuffer completeness tests.
20*35238bceSAndroid Build Coastguard Worker
21*35238bceSAndroid Build Coastguard WorkerTests:
22*35238bceSAndroid Build Coastguard Worker + dEQP-GLES2.functional.fbo.completeness.renderable.*
23*35238bceSAndroid Build Coastguard Worker + dEQP-GLES2.functional.fbo.completeness.attachment_combinations.*
24*35238bceSAndroid Build Coastguard Worker + dEQP-GLES2.functional.fbo.completeness.attachment_combinations.exists_supported
25*35238bceSAndroid Build Coastguard Worker + dEQP-GLES2.functional.fbo.completeness.size.zero
26*35238bceSAndroid Build Coastguard Worker + dEQP-GLES2.functional.fbo.completeness.size.distinct
27*35238bceSAndroid Build Coastguard Worker
28*35238bceSAndroid Build Coastguard WorkerIncludes:
29*35238bceSAndroid Build Coastguard Worker + glCheckFramebufferStatus return value check
30*35238bceSAndroid Build Coastguard Worker + Single attachments with all standard (and many extension) formats
31*35238bceSAndroid Build Coastguard Worker + All combinations of color0, depth and stencil attachments
32*35238bceSAndroid Build Coastguard Worker   - And other color attachments if GL_NV_fbo_color_attachments is exposed
33*35238bceSAndroid Build Coastguard Worker + Existence of a supported combination of formats
34*35238bceSAndroid Build Coastguard Worker + Zero-sized attachment
35*35238bceSAndroid Build Coastguard Worker + Differently sized attachments
36*35238bceSAndroid Build Coastguard Worker
37*35238bceSAndroid Build Coastguard WorkerExcludes:
38*35238bceSAndroid Build Coastguard Worker + Trying FBO operations on in/complete FBOs.
39*35238bceSAndroid Build Coastguard Worker + Completeness status changes after the FBO is modified.
40*35238bceSAndroid Build Coastguard Worker
41*35238bceSAndroid Build Coastguard WorkerDescription:
42*35238bceSAndroid Build Coastguard Worker
43*35238bceSAndroid Build Coastguard WorkerThese tests check that the implementation reports framebuffer completeness
44*35238bceSAndroid Build Coastguard Workerstatus correctly. Most test cases create a single framebuffer object, create
45*35238bceSAndroid Build Coastguard Workersome renderbuffers and/or textures and attach them to the FBO, and then call
46*35238bceSAndroid Build Coastguard WorkerglCheckFramebufferStatus on it. The returned value is compared against a set
47*35238bceSAndroid Build Coastguard Workerof legal return values that is calculated from the arguments given to image
48*35238bceSAndroid Build Coastguard Workercreation and attachment functions. The test passes if the return value is
49*35238bceSAndroid Build Coastguard Workerfound in this set. Some test cases may also expect image creation to fail
50*35238bceSAndroid Build Coastguard Workerbefore it can be attached.
51*35238bceSAndroid Build Coastguard Worker
52*35238bceSAndroid Build Coastguard WorkerFor each test case, the test log shows the configurations of the created
53*35238bceSAndroid Build Coastguard Workerimages and attachments, the set of expected status values and the actual
54*35238bceSAndroid Build Coastguard Workerreturned status value.
55*35238bceSAndroid Build Coastguard Worker
56*35238bceSAndroid Build Coastguard Worker
57*35238bceSAndroid Build Coastguard WorkerThe "renderable.*" test cases iterate through all the texture formats and
58*35238bceSAndroid Build Coastguard Workerattachment points and attach a single texture or renderbuffer with that format
59*35238bceSAndroid Build Coastguard Workerat that attachment point.
60*35238bceSAndroid Build Coastguard Worker
61*35238bceSAndroid Build Coastguard WorkerThe purpose of these tests is to check that the implementation's notion of
62*35238bceSAndroid Build Coastguard Workercolor/depth/stencil-renderability adheres to the GLES specification and
63*35238bceSAndroid Build Coastguard Workerextensions. Both renderability and non-renderability of unexpected formats are
64*35238bceSAndroid Build Coastguard Workerreported as test failures.
65*35238bceSAndroid Build Coastguard Worker
66*35238bceSAndroid Build Coastguard WorkerNote that the GLES2 spec allows implementations to return
67*35238bceSAndroid Build Coastguard WorkerGL_FRAMEBUFFER_UNSUPPORTED for practically any framebuffer configurations. See
68*35238bceSAndroid Build Coastguard Worker"attachment_combinations.exists_supported" for a test that ensures that at
69*35238bceSAndroid Build Coastguard Workerleast one combination of attachment formats is supported.
70*35238bceSAndroid Build Coastguard Worker
71*35238bceSAndroid Build Coastguard WorkerAlso note that the GLES2 spec is notoriously ambiguous regarding the
72*35238bceSAndroid Build Coastguard Workerrenderability of unsized formats that correspond to renderable sized formats.
73*35238bceSAndroid Build Coastguard WorkerSee Khronos bug 7333 <https://cvs.khronos.org/bugzilla/show_bug.cgi?id=7333>
74*35238bceSAndroid Build Coastguard Workerfor details. This test expects the following behavior:
75*35238bceSAndroid Build Coastguard Worker
76*35238bceSAndroid Build Coastguard Worker* The type/unsized-format combinations corresponding to the color-renderable
77*35238bceSAndroid Build Coastguard Worker  sized formats in table 4.5 are expected to be color-renderable. (Consensus
78*35238bceSAndroid Build Coastguard Worker  in bug 7333.)
79*35238bceSAndroid Build Coastguard Worker
80*35238bceSAndroid Build Coastguard Worker* If OES_rgb8_rgba8 is exposed, the combinations ubyte/RGB and ubyte/RGBA are
81*35238bceSAndroid Build Coastguard Worker  expected to be color-renderable. (Consensus in bug 7333.)
82*35238bceSAndroid Build Coastguard Worker
83*35238bceSAndroid Build Coastguard Worker* If extensions state explicitly the renderability of a format, the
84*35238bceSAndroid Build Coastguard Worker  implementation is expected to adhere to that.
85*35238bceSAndroid Build Coastguard Worker
86*35238bceSAndroid Build Coastguard Worker* If an extension makes another sized format renderable, and there is no text
87*35238bceSAndroid Build Coastguard Worker  about the renderability of the corresponding type/unsized-format
88*35238bceSAndroid Build Coastguard Worker  combination, then it is allowed but not required to be renderable.
89*35238bceSAndroid Build Coastguard Worker
90*35238bceSAndroid Build Coastguard Worker* If a type/unsized-format combination is not specified to be renderable and
91*35238bceSAndroid Build Coastguard Worker  does not correspond to a renderable sized format, then it is expected to be
92*35238bceSAndroid Build Coastguard Worker  unrenderable.
93*35238bceSAndroid Build Coastguard Worker
94*35238bceSAndroid Build Coastguard Worker
95*35238bceSAndroid Build Coastguard WorkerThe "attachment_combination.*" test cases attach some textures and/or
96*35238bceSAndroid Build Coastguard Workerrenderbuffers with suitable formats to none, some or all of the framebuffer's
97*35238bceSAndroid Build Coastguard Workerattachment points. The expected status values are as follows:
98*35238bceSAndroid Build Coastguard Worker
99*35238bceSAndroid Build Coastguard Worker* If there are no attachments, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
100*35238bceSAndroid Build Coastguard Worker  must be returned.
101*35238bceSAndroid Build Coastguard Worker
102*35238bceSAndroid Build Coastguard Worker* Otherwise, GL_FRAMEBUFFER_COMPLETE or GL_FRAMEBUFFER_UNSUPPORTED must be
103*35238bceSAndroid Build Coastguard Worker  returned.
104*35238bceSAndroid Build Coastguard Worker
105*35238bceSAndroid Build Coastguard WorkerIf the implementation declares support for GL_NV_fbo_color_attachments, all
106*35238bceSAndroid Build Coastguard Workercolor attachments are used in the tests.
107*35238bceSAndroid Build Coastguard Worker
108*35238bceSAndroid Build Coastguard WorkerSome tests may return the status "NotSupported" because the implementation
109*35238bceSAndroid Build Coastguard Workerdoes support a depth- or stencil-renderable texture format.
110*35238bceSAndroid Build Coastguard Worker
111*35238bceSAndroid Build Coastguard WorkerNote that GLES2, unlike GLES3, allows the depth and stencil attachments to be
112*35238bceSAndroid Build Coastguard Workerdistinct images, and in fact requires them to be, since without extensions
113*35238bceSAndroid Build Coastguard Workerthere is no format that is both depth- and stencil-renderable. When a test
114*35238bceSAndroid Build Coastguard Workercase has both a depth and a stencil attachment, they are always distinct
115*35238bceSAndroid Build Coastguard Workerimages.
116*35238bceSAndroid Build Coastguard Worker
117*35238bceSAndroid Build Coastguard WorkerThe test case "attachment_combinations.exists_supported" iterates through all
118*35238bceSAndroid Build Coastguard Workerstandard GLES2 renderable formats and attempts to find at least one
119*35238bceSAndroid Build Coastguard Workercombination of attachments and formats such that the framebuffer checks as
120*35238bceSAndroid Build Coastguard Workercomplete. The test fails if no such combination is found.
121*35238bceSAndroid Build Coastguard Worker
122*35238bceSAndroid Build Coastguard Worker
123*35238bceSAndroid Build Coastguard WorkerThe "size.*" test cases check that attachment sizes are treated correctly.
124*35238bceSAndroid Build Coastguard Worker
125*35238bceSAndroid Build Coastguard WorkerThe "size.zero" test case creates a framebuffer object with a single
126*35238bceSAndroid Build Coastguard Workerzero-sized renderbuffer attachment. The glCheckFramebufferStatus call is
127*35238bceSAndroid Build Coastguard Workerexpected to return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT. Note that creating
128*35238bceSAndroid Build Coastguard Workerand attaching the zero-sized renderbuffer is still expected to succeed.
129*35238bceSAndroid Build Coastguard Worker
130*35238bceSAndroid Build Coastguard WorkerThe "size.distinct" test case creates a framebuffer object with two
131*35238bceSAndroid Build Coastguard Workerattachments with different sizes. The glCheckFramebufferStatus call is
132*35238bceSAndroid Build Coastguard Workerexpected to return GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS.
133