1e5c31af7Sopenharmony_ci------------------------------------------------------------------------- 2e5c31af7Sopenharmony_cidrawElements Quality Program Test Specification 3e5c31af7Sopenharmony_ci----------------------------------------------- 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ciCopyright 2014 The Android Open Source Project 6e5c31af7Sopenharmony_ci 7e5c31af7Sopenharmony_ciLicensed under the Apache License, Version 2.0 (the "License"); 8e5c31af7Sopenharmony_ciyou may not use this file except in compliance with the License. 9e5c31af7Sopenharmony_ciYou may obtain a copy of the License at 10e5c31af7Sopenharmony_ci 11e5c31af7Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 12e5c31af7Sopenharmony_ci 13e5c31af7Sopenharmony_ciUnless required by applicable law or agreed to in writing, software 14e5c31af7Sopenharmony_cidistributed under the License is distributed on an "AS IS" BASIS, 15e5c31af7Sopenharmony_ciWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16e5c31af7Sopenharmony_ciSee the License for the specific language governing permissions and 17e5c31af7Sopenharmony_cilimitations under the License. 18e5c31af7Sopenharmony_ci------------------------------------------------------------------------- 19e5c31af7Sopenharmony_ci gl_FragDepth tests 20e5c31af7Sopenharmony_ci 21e5c31af7Sopenharmony_ciTests: 22e5c31af7Sopenharmony_ci + dEQP-GLES3.functional.shaders.fragdepth.* 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ciIncludes: 25e5c31af7Sopenharmony_ci + gl_FragDepth usage in following scenarios: 26e5c31af7Sopenharmony_ci - Unconditional write 27e5c31af7Sopenharmony_ci - Conditional write 28e5c31af7Sopenharmony_ci - Write in loop 29e5c31af7Sopenharmony_ci - Write in user-defined function 30e5c31af7Sopenharmony_ci - Discard before and after write 31e5c31af7Sopenharmony_ci + Depth comparison with gl_FragDepth write 32e5c31af7Sopenharmony_ci + gl_FragDepth use when rendering triangles 33e5c31af7Sopenharmony_ci 34e5c31af7Sopenharmony_ciExcludes: 35e5c31af7Sopenharmony_ci + Depth value conversion accuracy tests 36e5c31af7Sopenharmony_ci + gl_FragDepth use when rendering points and lines 37e5c31af7Sopenharmony_ci 38e5c31af7Sopenharmony_ciDescription: 39e5c31af7Sopenharmony_ci 40e5c31af7Sopenharmony_ciFor comparison cases depth buffer is first initialized by rendering 41e5c31af7Sopenharmony_citwo adjecent quads. Left one will fill depth buffer with constant value, 42e5c31af7Sopenharmony_ciwhile right quad fills with value that is interpolated in range 0..1. 43e5c31af7Sopenharmony_ciColor buffer is filled with blue color. 44e5c31af7Sopenharmony_ciSingle quad with a selected shader and depth comparison mode is rendered. 45e5c31af7Sopenharmony_ciWhere depth test passes, green value will be written to color buffer. 46e5c31af7Sopenharmony_ci 47e5c31af7Sopenharmony_ciFor depth write-only cases the selected shader is used to initialize 48e5c31af7Sopenharmony_cithe depth buffer by rendering a simple quad. After that depth buffer 49e5c31af7Sopenharmony_ciis visualized by rendering multiple viewport-sized quads with a different 50e5c31af7Sopenharmony_cicolors and depth values in such manner that each depth range slice 51e5c31af7Sopenharmony_ciwill end up showing in color buffer with a distinct color. 52e5c31af7Sopenharmony_ci 53e5c31af7Sopenharmony_ciIn both test types rendered image is compared against a reference image 54e5c31af7Sopenharmony_ciproduced by a reference renderer. 55