1-------------------------------------------------------------------------
2drawElements Quality Program Test Specification
3-----------------------------------------------
4
5Copyright 2014 The Android Open Source Project
6
7Licensed under the Apache License, Version 2.0 (the "License");
8you may not use this file except in compliance with the License.
9You may obtain a copy of the License at
10
11     http://www.apache.org/licenses/LICENSE-2.0
12
13Unless required by applicable law or agreed to in writing, software
14distributed under the License is distributed on an "AS IS" BASIS,
15WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16See the License for the specific language governing permissions and
17limitations under the License.
18-------------------------------------------------------------------------
19    Framebuffer completeness tests.
20
21Tests:
22 + dEQP-GLES3.functional.fbo.completeness.renderable.*
23 + dEQP-GLES3.functional.fbo.completeness.attachment_combinations.*
24 + dEQP-GLES3.functional.fbo.completeness.size.zero
25 + dEQP-GLES3.functional.fbo.completeness.size.distinct
26 + dEQP-GLES3.functional.fbo.completeness.size.layer.*
27 + dEQP-GLES3.functional.fbo.completeness.size.samples.*
28
29Includes:
30 + glCheckFramebufferStatus return value check
31 + Single attachments with all standard (and many extension) formats
32 + All combinations of color, depth and stencil attachments
33 + Zero-sized attachment
34 + Differently sized attachments
35 + Multilayer attachments
36 + Compatibility of multisample attachments
37
38Excludes:
39 + Trying FBO operations on in/complete FBOs.
40 + Completeness status changes after the FBO is modified.
41
42Description:
43
44These tests check that the implementation reports framebuffer completeness
45status correctly. Most test cases create a single framebuffer object, create
46some renderbuffers and/or textures and attach them to the FBO, and then call
47glCheckFramebufferStatus on it. The returned value is compared against a set
48of legal return values that is calculated from the arguments given to image
49creation and attachment functions. The test passes if the return value is
50found in this set. Some test cases may also expect image creation to fail
51before it can be attached.
52
53For each test case, the test log shows the configurations of the created
54images and attachments, the set of expected status values and the actual
55returned status value.
56
57
58The "renderable.*" test cases iterate through all the texture formats and
59attachment points and attach a single texture or renderbuffer with that format
60at that attachment point.
61
62The purpose of these tests is to check that the implementation's notion of
63color/depth/stencil-renderability adheres to the GLES specification and
64extensions. Both renderability and non-renderability of unexpected formats are
65reported as test failures.
66
67
68The "attachment_combination.*" test cases attach some textures and/or
69renderbuffers with suitable formats to none, some or all of the framebuffer's
70attachment points. The expected status values are as follows:
71
72* If there are no attachments, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
73  must be returned.
74
75* If there is both a depth and a stencil attachment and one is a texture and
76  the other is a renderbuffer, GL_FRAMEBUFFER_UNSUPPORTED must be returned.
77
78* Otherwise, GL_FRAMEBUFFER_COMPLETE must be returned.
79
80Note that GLES3 requires the depth and stencil attachments to be the same
81image. When a test case has both a depth and a stencil attachment and either
82both are textures or both are renderbuffers, the same image is used for both
83attachments.
84
85
86The "size.*" test cases check that attachment sizes are treated correctly.
87
88The "size.zero" test case creates a framebuffer object with a single
89zero-sized renderbuffer attachment. The glCheckFramebufferStatus call is
90expected to return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT. Note that creating
91and attaching the zero-sized renderbuffer is still expected to succeed.
92
93The "size.distinct" test case creates a framebuffer object with two
94attachments with different sizes. The glCheckFramebufferStatus call is
95expected to return GL_FRAMEBUFFER_COMPLETE.
96
97
98The "layer.*" test cases create various layered textures (two-dimensional
99array textures or 3D textures) and attach them to framebuffer objects with
100glFramebufferTextureLayer. The framebuffer status is expected to be
101GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT when the attached layer number is
102greater than or equal to the number of layers in the texture.
103
104
105The "samples.*" test cases attach textures and/or renderbuffers with various
106numbers of samples. The framebuffer status is expected to be
107GL_FRAMEBUFFER_COMPLETE when the attachments have the same number of samples
108(taking textures to have zero samples), or
109GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE otherwise.
110
111Because implementations are allowed to allocate more samples than
112requested, a framebuffer object whose attachments have requested a
113different, but non-zero, number of samples, is allowed to check either
114as complete or incomplete.
115
116If a test case requests more samples than the implementation supports,
117the case is reported as "not supported".
118