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 GLSL discard statement 20 21 Tests: 22 + dEQP-GLES2.functional.shaders.discard.* 23 24 Includes: 25 + Unconditional discard 26 + Conditional discard with compile-time false condition 27 + Conditional discard based on uniform value 28 + Conditional discard based on varying value 29 + Conditional discard based on texture lookup result 30 + Discard in main() 31 + Discard in user-defined function 32 + Discard inside static for loop 33 + Discard inside uniform for loop 34 + Discard inside static loop in user-defined function 35 36 Excludes: 37 + Effects on depth buffer values 38 + Discard when rendering lines and points 39 40 Description: 41 42 Two triangles forming a quad is rendered with a fragment shader that 43 exercises the GLSL discard statement. A reference image is rendered 44 using a simple C function that implements the same discard condition. 45 Results are checked by reading the pixels and comparing image against 46 the reference. 47