Home | History | Annotate | Download | only in GLES31
      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     Sample shading tests
     20 
     21 Tests:
     22  + dEQP-GLES31.functional.sample_shading
     23 
     24 Includes:
     25  + Visual verification of OES_sample_shading
     26     - per sample color
     27 	- per sample discard
     28  + State queries
     29 
     30 Excludes:
     31  + Rendering to every supported render buffer sample count / format
     32  + Rendering to every supported multisample texture sample count / format
     33 
     34 Description:
     35 
     36 state_query.* tests verify that the state returned by different query functions
     37 is valid. state_query.min_sample_shading_value_clamping test verifies
     38 MIN_SAMPLE_SHADING state is clamped when it is specified with glMinSampleShading
     39 function.
     40 
     41 min_sample_shading.* tests render a high frequency pattern with different
     42 MIN_SAMPLE_SHADING values. *_color cases render pattern by rendering black or
     43 white in the fragment shader depending on the pattern function sign. *_discard
     44 cases render pattern by the clearing image to black, outputting white in the
     45 fragment shader, and discarding the fragment if function sign is negative. Each
     46 test iteration sets MIN_SAMPLE_SHADING_VALUE to guarantee a certain number of
     47 individual samples and draws the pattern.
     48 
     49 Averaging N uniformly random binary values (pattern output function) and
     50 averaging them will result in a discrete normal-like distribution. The number of
     51 samples N can now be calculated from the distribution with: the number of
     52 distinct points with non-zero probability - 1. A sufficiently high frequency
     53 function is assumed to have similar effect to the uniform random. Hence, if the
     54 number of different shades in the result image is less or equal to the
     55 guaranteed sample count, the pixels did not contain the guaranteed amount of
     56 independent samples, i.e. result image is invalid.
     57 
     58 Since the tests analyze the resolved multisample image when rendering to the
     59 default framebuffer or to a renderbuffer, implementations that do not resolve
     60 multisample buffers with a box filter (simple average) may result in false
     61 positives. False positive may occur if distinct pixels with identical filter
     62 sample coverage ratios can be mapped to distinct values. Tests rendering to a
     63 multisample texture do not use an implementation defined multisample resolution
     64 and thus do not produce false positives.
     65