xref: /aosp_15_r20/external/deqp/data/gles31/shaders/es32/arrays.test (revision 35238bce31c2a825756842865a792f8cf7f89930)
1# -------------------------------------------------
2# drawElements Quality Program OpenGL ES 3.2 Module
3# -------------------------------------------------
4#
5# Copyright 2016 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
20group invalid "Invalid constructions"
21
22    case constructor_c_style1
23        version 320 es
24        expect compile_fail
25
26        both ""
27            #version 320 es
28            precision mediump float;
29            ${DECLARATIONS}
30
31            void main ()
32            {
33                float a[];
34                a = float[3] { 1.0, 2.0, 3.0 };
35
36                ${POSITION_FRAG_COLOR} = vec4(1.0);
37            }
38        ""
39    end
40
41    case constructor_c_style2
42        version 320 es
43        expect compile_fail
44
45        both ""
46            #version 320 es
47            precision mediump float;
48            ${DECLARATIONS}
49
50            void main ()
51            {
52                float a[5] = { 1.0, 2.0, 3.0 };
53
54                ${POSITION_FRAG_COLOR} = vec4(1.0);
55            }
56        ""
57    end
58
59    case constructor_c_style3
60        version 320 es
61        expect compile_fail
62
63        both ""
64            #version 320 es
65            precision mediump float;
66            ${DECLARATIONS}
67
68            void main ()
69            {
70                float a[] = float[3] { 1.0, 2.0, 3.0 };
71
72                ${POSITION_FRAG_COLOR} = vec4(1.0);
73            }
74        ""
75    end
76
77    case constructor_c_style4
78        version 320 es
79        expect compile_fail
80
81        both ""
82            #version 320 es
83            precision mediump float;
84            ${DECLARATIONS}
85
86            void main ()
87            {
88                float a[3] = { 1.0, 2.0, 3.0 };
89
90                ${POSITION_FRAG_COLOR} = vec4(1.0);
91            }
92        ""
93    end
94
95end # invalid
96