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 Stencil test 20 21Tests: 22 + dEQP-GLES2.functional.stencil.* 23 24Includes: 25 + Stencil buffer clears 26 + Stencil update with GL_REPLACE in stencil fail, depth fail and depth pass 27 + All stencil update modes in stencil fail 28 + All stencil comparison modes 29 + Masked stencil comparison 30 + Out-of-range stencil clear values 31 + Out-of-range stencil update values 32 33Excludes: 34 + Stencil compare or update with points and lines 35 + Exhaustive testing of all possible stencil test states 36 37Description: 38 39The viewport is divided into NxN cells, where each cell is assigned a target 40stencil value, choosen uniformly from available values. In addition there are 41two cells that target out-of-range stencil values. The amount of cells is scaled 42based on available stencil bits. For example with 8b there are 6x6 cells. 43 44Test cases choose input parameters for operations based on target stencil value 45for each cell. The parametrized operations are then executed and finally stencil 46buffer contents are visualized by rendering full-screen quads with different 47colors that pass only where stencil value equals one of the target values. 48 49The rendered image is compared against reference image. The reference is 50computed using a simplified model of the GL rendering pipe. 51