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