Merge "Use de::ArrayBuffer, not raw arrays, in sglrReferenceContext."
[platform/upstream/VK-GL-CTS.git] / doc / testspecs / GLES31 / functional.shaders.multisample_interpolation.txt
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     Multisample interpolation tests
20
21 Tests:
22  + dEQP-GLES31.functional.shaders.multisample_interpolation.*
23  + dEQP-GLES31.functional.state_query.multisample_interpolation.*
24
25 Includes:
26  + Sample qualifier
27  + interpolateAtSample
28  + interpolateAtCentroid
29  + interpolateAtOffset
30  + Rendering to the default framebuffer, multi- and single sample
31    textures and renderbuffers
32  + Implementation limit queries for
33     - MIN_FRAGMENT_INTERPOLATION_OFFSET
34         - MAX_FRAGMENT_INTERPOLATION_OFFSET
35         - FRAGMENT_INTERPOLATION_OFFSET_BITS
36
37 Excludes:
38  + interpolateAtSample() with non dynamically uniform sample index.
39  + Rendering to every supported render buffer sample count / format
40  + Rendering to every supported multisample texture sample count / format
41
42 Description:
43
44 sample_qualifier.* cases test sample qualifier by rendering a high frequency
45 test pattern with a sample-qualified varying. Using the same reasoning as in
46 sample shading test specification, the result image should contain numSamples +
47 1 different shades of gray, e.g. single sampled render target should contain two
48 shades (black and white) and 2x sampled three shades.
49
50 interpolate_at_sample.* cases test interpolateAtSample() function with different
51 inputs and render target configurations.
52
53 interpolate_at_sample.static_sample_number and
54 interpolate_at_sample.dynamic_sample_number cases sample a high frequency
55 function with at every sample position and average the result. static cases use
56 integer literals at which samples values are interpolated, in dynamic cases the
57 sample index "depends" (all samples are sampled anyway) on uniform values.
58
59 interpolate_at_sample.non_multisample_buffer cases test that using
60 interpolateAtSample() with a non-multisample render target with any sample index
61 will result in a value interpolated at the center of the pixel. Value is
62 verified by interpolating a varying containing screen-space location in pixels.
63
64 interpolate_at_sample.centroid_qualifier cases interpolate a centroid-qualified
65 varying with interpolateAtSample(). The tests render narrow triangles and
66 compare results of interpolateAtSample of two identical varyings, but with
67 different centroid-qualification. The centroid qualifier should not have any
68 effect on the values returned by interpolateAtSample().
69
70 interpolate_at_sample.at_sample_id cases test that sample index used by
71 interpolateAtSample is the same as in gl_SampleID. Tests compare value
72 per-sample qualified varying and the value returned by
73 interpolateAtSample(v_varying, gl_SampleID). Values should be equal.
74
75 interpolate_at_centroid.* cases test interpolateAtCentroid() function with
76 different inputs and render target configurations.
77
78 interpolate_at_centroid.consistency cases test that values returned by
79 interpolateAtCentroid are equal to the values of a centroid qualified varying.
80 Tests render multiple narrow triangles, assign the same value to a
81 centroid-qualified and non-centroid-qualified varying and then compares the
82 values of centroid-qualified varying and interpolateAtCentroid function return
83 value when given the non-centroid-qualified varying as an input.
84
85 interpolate_at_centroid.array_element cases test interpolateAtCentroid function
86 when given a varying array element as an input. Tests render multiple narrow
87 triangles, and the frament shader verifies that values returned by
88 interpolateAtCentroid() were interpolated within the primitive area.
89
90 interpolate_at_offset.* cases test interpolateAtOffset() function with different
91 inputs and render target configurations.
92
93 interpolate_at_offset.no_qualifiers, .centroid_qualifier, and .sample_qualifier
94 cases test interpolateAtOffset() function targeting a varying without
95 qualifiers, with centroid qualifier and with per-sample qualifier.
96 .array_element cases test interpolateAtOffset targeting an array element. Tests
97 render a quad and in the fragment shader use interpolateAtOffset to a
98 screen-space location (in pixels) varying. The fractional part of the returned
99 value should be equal to the interpolation offset.
100
101 interpolate_at_offset.at_sample_position cases test that using
102 interpolateAtOffset to interpolate a value at the sample location returns the
103 same value as a per-sample interpolated varying.