Merge "Use de::ArrayBuffer, not raw arrays, in sglrReferenceContext."
[platform/upstream/VK-GL-CTS.git] / doc / testspecs / GLES31 / functional.uniform_location.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     Explicit uniform location tests
20
21 Tests:
22  + dEQP-GLES31.functional.uniform_location.*
23
24 Includes:
25  + Location for all primitive types
26  + Location for (nested) structs and their members
27  + Location for (nested) arrays and all their elements
28  + Minimum and maximum location
29    - With all primitive types
30  + Linkage with locations defined in the vertex shader, fragment shader, both or neither
31    - Primitive types only
32  + Negative tests
33    - Duplicate location with various linkage and usage
34    - Overlapping structs and arrays with various linkage and usage
35
36 Excludes:
37  + Samplers with dimensionality other than two or less than four color channels
38  + Deeply nested structs/arrays
39
40 Description:
41
42 All cases create a shader with suitable uniforms, some of which have layout
43 qualifiers with a location specified. Locations of all uniforms in the shader
44 are verified to match the given ones with glGetUniformLocation. Generated
45 textures with a flat randomized color are bound to samplers. Other uniforms
46 are assigned similarly randomized values.
47 The shader contains hardcoded comparisons to these randomized values for each
48 uniform that is being checked. It outputs white if all of the assigned uniform
49 values match the hardcoded values. A quad is rendered and the output of the
50 shader is verified to be fully white.
51
52 All cases excluding negative and min/max use randomized locations between the
53 spec defined minimum and maximum values [0, 1024) for all uniforms.
54
55 Basic primitive type, array, nested array and min/max cases test with all basic
56 types. Tests are done in both vertex and fragment shaders but with trivial
57 linkage.
58
59 Min/max cases assign a single primitive either the largest valid location as
60 reported by the implementation or the smallest valid location (0) but are
61 otherwise identical to the basic primitive type cases.
62
63 Struct, nested struct and linkage cases are randomized.
64 These cases do not necessarily use every declared uniform.
65 These cases have declarations, locations specifiers and verification
66 randomly split between the vertex and fragment shaders on a per-uniform basis.
67 This includes leaving some locations unassigned.
68 All primitive types used in these tests are randomized.
69 Struct cases have a fixed number of members with a fixed nesting structure.
70
71 Negative cases are not generated and share no logic with the other cases,
72 instead expecting compile or link failures.