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 Depth test 20 21 Tests: 22 + dEQP-GLES2.functional.depth.* 23 24 Includes: 25 + Depth buffer update when rendering triangles with GL_ALWAYS 26 + Depth test when rendering triangles 27 + All depth comparison functions 28 29 Excludes: 30 + Lines and points 31 + Depth mask 32 + glPolygonOffset() 33 + Overlapping primitives in single draw call 34 + Interaction with stencil test 35 36 Description: 37 38 Each test case renders 4 pairs of quads, arranged in a 2x2 grid. First 39 quad is rendered with GL_ALWAYS depth test mode, while the second uses 40 the depth test mode stated in test case name. First pair of quads have 41 exactly same z, in the second pair z1 < z2 and in the third pair z2 < z1. 42 In the fourth pair z1 = 0 and z2 is interpolated between -1.0 and 1.0, 43 e.g. the quads are intersecting. 44 45 The first quad in each pair is red, while the second one is green. 46 The resulting image depends on the depth test mode used when rendering 47 the second quads. 48 49 Test results are verified by comparing the rendered image against a 50 reference image. The reference is rendered using a simplified model 51 of the GL rendering pipe. 52