• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    Object lifetime tests.
20
21Tests:
22 + dEQP-GLES2.functional.lifetime.*
23
24Includes:
25 + All OpenGL ES 2.0 object types
26   - Buffers
27   - Textures
28   - Renderbuffers
29   - Framebuffers
30   - Shaders
31   - Programs
32 + Object existence tests based on Is* queries
33   - After calling Gen* or Create*
34   - After calling Gen* or Create*, then Delete*
35   - After calling Gen*, then Bind*
36   - After calling Gen*, then Bind*, then Delete*
37   - After calling Bind* without preceding Gen*
38   - After calling CreateProgram, then UseProgram, then DeleteProgram
39 + Tests for deleting an object that is attached to a container
40   - Is* queries for the name of the deleted object
41   - Reading from the container
42   - Writing to the container
43
44Excludes:
45 + Deleting an object that is currently bound in another context
46
47Description:
48
49These tests check that creation and deletion of objects adheres to the
50OpenGL ES 2.0 specification. The tests check the existence of objects as
51reported by the Is* family of GL functions, the state of bindings as
52reported in various state variables, and the behavior of containers with
53deleted objects.
54
55NOTE: Because these tests try to delete objects that are directly or
56indirectly attached to the current context, a faulty OpenGL ES
57implementation may reclaim and later reallocate memory that is still
58being referenced. This may result in unpredictable errors at some later
59time. Use of external memory debugging tools may be required to
60accurately identify these errors.
61
62The "gen.*" test cases call the object type's Gen* or Create* function
63to allocate a new name, and then check whether the name is used, i.e.
64whether a new object was created for the name (as reported by the result
65of the corresponding Is* function). In OpenGL ES 2.0, the Gen* functions
66must never create an object, and the Create* functions must always
67create an object.
68
69The "delete.*" test cases call an object type's Gen* or Create* function
70followed by the Delete* function. They then check that the generated
71name is no longer in use.
72
73The "bind.*" test cases call an object type's Gen* function followed by
74its Bind* function. They then check that the name is in use.
75
76The "delete_bound.*" test cases call an object type's Gen* function
77followed by its Bind* function and Delete* function. They then check
78that the name is no longer in use and that the binding has been removed.
79
80The "bind_no_gen.*" test cases call the object type's Bind* function for
81a random name that has not been produced by the Gen* function. They then
82check whether the function call succeeded. In OpenGL ES 2.0, all Bind*
83calls must succeed even for names not produced by the Gen* function.
84
85The "delete_used.program" test case creates a new program object (along
86with associated shader objects) and makes it the current program with
87the glUseProgram function. The program object is then deleted. The test
88checks that the name of the program remains in use and is flagged for
89deletion. Then the program is made non-current and the test checks that
90the name becomes unused.
91
92The "attach.*" family of test cases create a container object (a
93framebuffer or a program) and attach another object (a texture,
94renderbuffer or shader) to it. The attached object is then deleted.
95
96In the "attach.deleted_name.*" test cases, the container is queried for
97its attachment, and the existence of the deleted attachment object is
98checked. In OpenGL ES 2.0, shader objects must exist even after deletion
99if they are attached to a program. The names of other types of
100attachment objects must become unused, even though their state still
101remains referenced by the container.
102
103In the "attach.deleted_input.*" test cases, the container is read from
104(by reading a framebuffer's pixel contents or using a program for
105drawing) before the attachment is deleted, and then after deleting the
106attachment and creating a new object of the attachment type. If the
107results differ, the new object erroneously affected the container's
108state.
109
110In the "attach.deleted_output.*" test cases, the container is written to
111(by drawing to a framebuffer) after deleting the attachment and creating
112a new object of the attachment type. If the writing affected the new
113object state, it erroneously shared state with the deleted attachment.
114