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 gl_FragDepth tests 20 21Tests: 22 + dEQP-GLES3.functional.shaders.fragdepth.* 23 24Includes: 25 + gl_FragDepth usage in following scenarios: 26 - Unconditional write 27 - Conditional write 28 - Write in loop 29 - Write in user-defined function 30 - Discard before and after write 31 + Depth comparison with gl_FragDepth write 32 + gl_FragDepth use when rendering triangles 33 34Excludes: 35 + Depth value conversion accuracy tests 36 + gl_FragDepth use when rendering points and lines 37 38Description: 39 40For comparison cases depth buffer is first initialized by rendering 41two adjecent quads. Left one will fill depth buffer with constant value, 42while right quad fills with value that is interpolated in range 0..1. 43Color buffer is filled with blue color. 44Single quad with a selected shader and depth comparison mode is rendered. 45Where depth test passes, green value will be written to color buffer. 46 47For depth write-only cases the selected shader is used to initialize 48the depth buffer by rendering a simple quad. After that depth buffer 49is visualized by rendering multiple viewport-sized quads with a different 50colors and depth values in such manner that each depth range slice 51will end up showing in color buffer with a distinct color. 52 53In both test types rendered image is compared against a reference image 54produced by a reference renderer. 55