1# WARNING: This file is auto-generated. Do NOT modify it manually, but rather
2# modify the generating script file. Otherwise changes will be lost!
3
4group variables "Order of qualification in variable declarations."
5
6	group valid "Valid orderings."
7
8		case invariant_storage_precision
9			expect pass
10			values {}
11
12			vertex ""
13				precision mediump float;
14				attribute highp vec4 dEQP_Position;
15
16				invariant varying lowp float x0;
17
18				 uniform mediump float x1;
19
20				 attribute mediump float x2;
21
22				void main()
23				{
24					x0 = 1.0;
25					gl_Position = dEQP_Position;
26				}
27			""
28
29			fragment ""
30				precision mediump float;
31
32				invariant varying lowp float x0;
33
34				 uniform mediump float x1;
35
36				void main()
37				{
38					float result = x0 + x1;
39					gl_FragColor = vec4(result, result, result, 1.0);
40				}
41			""
42		end
43		case storage_precision
44			expect pass
45			values {}
46
47			vertex ""
48				precision mediump float;
49				attribute highp vec4 dEQP_Position;
50
51				varying lowp float x0;
52
53				uniform mediump float x1;
54
55				attribute mediump float x2;
56
57				void main()
58				{
59					x0 = 1.0;
60					gl_Position = dEQP_Position;
61				}
62			""
63
64			fragment ""
65				precision mediump float;
66
67				varying lowp float x0;
68
69				uniform mediump float x1;
70
71				void main()
72				{
73					float result = x0 + x1;
74					gl_FragColor = vec4(result, result, result, 1.0);
75				}
76			""
77		end
78		case invariant_storage
79			expect pass
80			values {}
81
82			vertex ""
83				precision mediump float;
84				attribute highp vec4 dEQP_Position;
85
86				invariant varying float x0;
87
88				 uniform float x1;
89
90				 attribute float x2;
91
92				void main()
93				{
94					x0 = 1.0;
95					gl_Position = dEQP_Position;
96				}
97			""
98
99			fragment ""
100				precision mediump float;
101
102				invariant varying float x0;
103
104				 uniform float x1;
105
106				void main()
107				{
108					float result = x0 + x1;
109					gl_FragColor = vec4(result, result, result, 1.0);
110				}
111			""
112		end
113
114	end # valid
115	group invalid "Invalid orderings."
116
117		case invariant_precision_storage
118			expect compile_fail
119			values {}
120
121			vertex ""
122				precision mediump float;
123				attribute highp vec4 dEQP_Position;
124
125				invariant lowp varying float x0;
126
127				 mediump uniform float x1;
128
129				 mediump attribute float x2;
130
131				void main()
132				{
133					x0 = 1.0;
134					gl_Position = dEQP_Position;
135				}
136			""
137
138			fragment ""
139				precision mediump float;
140
141				invariant lowp varying float x0;
142
143				 mediump uniform float x1;
144
145				void main()
146				{
147					float result = x0 + x1;
148					gl_FragColor = vec4(result, result, result, 1.0);
149				}
150			""
151		end
152		case storage_invariant_precision
153			expect compile_fail
154			values {}
155
156			vertex ""
157				precision mediump float;
158				attribute highp vec4 dEQP_Position;
159
160				varying invariant lowp float x0;
161
162				uniform mediump float x1;
163
164				attribute mediump float x2;
165
166				void main()
167				{
168					x0 = 1.0;
169					gl_Position = dEQP_Position;
170				}
171			""
172
173			fragment ""
174				precision mediump float;
175
176				varying invariant lowp float x0;
177
178				uniform mediump float x1;
179
180				void main()
181				{
182					float result = x0 + x1;
183					gl_FragColor = vec4(result, result, result, 1.0);
184				}
185			""
186		end
187		case storage_precision_invariant
188			expect compile_fail
189			values {}
190
191			vertex ""
192				precision mediump float;
193				attribute highp vec4 dEQP_Position;
194
195				varying lowp invariant float x0;
196
197				uniform mediump float x1;
198
199				attribute mediump float x2;
200
201				void main()
202				{
203					x0 = 1.0;
204					gl_Position = dEQP_Position;
205				}
206			""
207
208			fragment ""
209				precision mediump float;
210
211				varying lowp invariant float x0;
212
213				uniform mediump float x1;
214
215				void main()
216				{
217					float result = x0 + x1;
218					gl_FragColor = vec4(result, result, result, 1.0);
219				}
220			""
221		end
222		case precision_invariant_storage
223			expect compile_fail
224			values {}
225
226			vertex ""
227				precision mediump float;
228				attribute highp vec4 dEQP_Position;
229
230				lowp invariant varying float x0;
231
232				mediump uniform float x1;
233
234				mediump attribute float x2;
235
236				void main()
237				{
238					x0 = 1.0;
239					gl_Position = dEQP_Position;
240				}
241			""
242
243			fragment ""
244				precision mediump float;
245
246				lowp invariant varying float x0;
247
248				mediump uniform float x1;
249
250				void main()
251				{
252					float result = x0 + x1;
253					gl_FragColor = vec4(result, result, result, 1.0);
254				}
255			""
256		end
257		case precision_storage_invariant
258			expect compile_fail
259			values {}
260
261			vertex ""
262				precision mediump float;
263				attribute highp vec4 dEQP_Position;
264
265				lowp varying invariant float x0;
266
267				mediump uniform float x1;
268
269				mediump attribute float x2;
270
271				void main()
272				{
273					x0 = 1.0;
274					gl_Position = dEQP_Position;
275				}
276			""
277
278			fragment ""
279				precision mediump float;
280
281				lowp varying invariant float x0;
282
283				mediump uniform float x1;
284
285				void main()
286				{
287					float result = x0 + x1;
288					gl_FragColor = vec4(result, result, result, 1.0);
289				}
290			""
291		end
292		case precision_storage
293			expect compile_fail
294			values {}
295
296			vertex ""
297				precision mediump float;
298				attribute highp vec4 dEQP_Position;
299
300				lowp varying float x0;
301
302				mediump uniform float x1;
303
304				mediump attribute float x2;
305
306				void main()
307				{
308					x0 = 1.0;
309					gl_Position = dEQP_Position;
310				}
311			""
312
313			fragment ""
314				precision mediump float;
315
316				lowp varying float x0;
317
318				mediump uniform float x1;
319
320				void main()
321				{
322					float result = x0 + x1;
323					gl_FragColor = vec4(result, result, result, 1.0);
324				}
325			""
326		end
327		case storage_invariant
328			expect compile_fail
329			values {}
330
331			vertex ""
332				precision mediump float;
333				attribute highp vec4 dEQP_Position;
334
335				varying invariant float x0;
336
337				uniform float x1;
338
339				attribute float x2;
340
341				void main()
342				{
343					x0 = 1.0;
344					gl_Position = dEQP_Position;
345				}
346			""
347
348			fragment ""
349				precision mediump float;
350
351				varying invariant float x0;
352
353				uniform float x1;
354
355				void main()
356				{
357					float result = x0 + x1;
358					gl_FragColor = vec4(result, result, result, 1.0);
359				}
360			""
361		end
362
363	end # invalid
364
365end # variables
366group parameters "Order of qualification in function parameters."
367
368	group valid "Valid orderings."
369
370		case storage_parameter_precision
371			expect pass
372			values {}
373
374			both ""
375				precision mediump float;
376				${DECLARATIONS}
377
378				float foo0 (const in lowp float x)
379				{
380					return x + 1.0;
381				}
382
383				void foo1 ( out mediump float x)
384				{
385					x = 1.0;
386				}
387
388				float foo2 ( inout mediump float x)
389				{
390					return x + 1.0;
391				}
392
393				void main()
394				{
395					${SETUP}
396					float result;
397					foo1(result);
398					float x0 = foo0(1.0);
399					foo2(result);
400					${OUTPUT}
401				}
402			""
403		end
404		case storage_parameter
405			expect pass
406			values {}
407
408			both ""
409				precision mediump float;
410				${DECLARATIONS}
411
412				float foo0 (const in float x)
413				{
414					return x + 1.0;
415				}
416
417				void foo1 ( out float x)
418				{
419					x = 1.0;
420				}
421
422				float foo2 ( inout float x)
423				{
424					return x + 1.0;
425				}
426
427				void main()
428				{
429					${SETUP}
430					float result;
431					foo1(result);
432					float x0 = foo0(1.0);
433					foo2(result);
434					${OUTPUT}
435				}
436			""
437		end
438		case storage_precision
439			expect pass
440			values {}
441
442			both ""
443				precision mediump float;
444				${DECLARATIONS}
445
446				float foo0 (const lowp float x)
447				{
448					return x + 1.0;
449				}
450
451				void foo1 ( mediump float x)
452				{
453					x = 1.0;
454				}
455
456				float foo2 ( mediump float x)
457				{
458					return x + 1.0;
459				}
460
461				void main()
462				{
463					${SETUP}
464					float result;
465					foo1(result);
466					float x0 = foo0(1.0);
467					foo2(result);
468					${OUTPUT}
469				}
470			""
471		end
472		case parameter_precision
473			expect pass
474			values {}
475
476			both ""
477				precision mediump float;
478				${DECLARATIONS}
479
480				float foo0 (in lowp float x)
481				{
482					return x + 1.0;
483				}
484
485				void foo1 (out mediump float x)
486				{
487					x = 1.0;
488				}
489
490				float foo2 (inout mediump float x)
491				{
492					return x + 1.0;
493				}
494
495				void main()
496				{
497					${SETUP}
498					float result;
499					foo1(result);
500					float x0 = foo0(1.0);
501					foo2(result);
502					${OUTPUT}
503				}
504			""
505		end
506
507	end # valid
508	group invalid "Invalid orderings."
509
510		case storage_precision_parameter
511			expect compile_fail
512			values {}
513
514			both ""
515				precision mediump float;
516				${DECLARATIONS}
517
518				float foo0 (const lowp in float x)
519				{
520					return x + 1.0;
521				}
522
523				void foo1 ( mediump out float x)
524				{
525					x = 1.0;
526				}
527
528				float foo2 ( mediump inout float x)
529				{
530					return x + 1.0;
531				}
532
533				void main()
534				{
535					${SETUP}
536					float result;
537					foo1(result);
538					float x0 = foo0(1.0);
539					foo2(result);
540					${OUTPUT}
541				}
542			""
543		end
544		case parameter_storage_precision
545			expect compile_fail
546			values {}
547
548			both ""
549				precision mediump float;
550				${DECLARATIONS}
551
552				float foo0 (in const lowp float x)
553				{
554					return x + 1.0;
555				}
556
557				void foo1 (out mediump float x)
558				{
559					x = 1.0;
560				}
561
562				float foo2 (inout mediump float x)
563				{
564					return x + 1.0;
565				}
566
567				void main()
568				{
569					${SETUP}
570					float result;
571					foo1(result);
572					float x0 = foo0(1.0);
573					foo2(result);
574					${OUTPUT}
575				}
576			""
577		end
578		case parameter_precision_storage
579			expect compile_fail
580			values {}
581
582			both ""
583				precision mediump float;
584				${DECLARATIONS}
585
586				float foo0 (in lowp const float x)
587				{
588					return x + 1.0;
589				}
590
591				void foo1 (out mediump float x)
592				{
593					x = 1.0;
594				}
595
596				float foo2 (inout mediump float x)
597				{
598					return x + 1.0;
599				}
600
601				void main()
602				{
603					${SETUP}
604					float result;
605					foo1(result);
606					float x0 = foo0(1.0);
607					foo2(result);
608					${OUTPUT}
609				}
610			""
611		end
612		case precision_storage_parameter
613			expect compile_fail
614			values {}
615
616			both ""
617				precision mediump float;
618				${DECLARATIONS}
619
620				float foo0 (lowp const in float x)
621				{
622					return x + 1.0;
623				}
624
625				void foo1 (mediump out float x)
626				{
627					x = 1.0;
628				}
629
630				float foo2 (mediump inout float x)
631				{
632					return x + 1.0;
633				}
634
635				void main()
636				{
637					${SETUP}
638					float result;
639					foo1(result);
640					float x0 = foo0(1.0);
641					foo2(result);
642					${OUTPUT}
643				}
644			""
645		end
646		case precision_parameter_storage
647			expect compile_fail
648			values {}
649
650			both ""
651				precision mediump float;
652				${DECLARATIONS}
653
654				float foo0 (lowp in const float x)
655				{
656					return x + 1.0;
657				}
658
659				void foo1 (mediump out float x)
660				{
661					x = 1.0;
662				}
663
664				float foo2 (mediump inout float x)
665				{
666					return x + 1.0;
667				}
668
669				void main()
670				{
671					${SETUP}
672					float result;
673					foo1(result);
674					float x0 = foo0(1.0);
675					foo2(result);
676					${OUTPUT}
677				}
678			""
679		end
680		case parameter_storage
681			expect compile_fail
682			values {}
683
684			both ""
685				precision mediump float;
686				${DECLARATIONS}
687
688				float foo0 (in const float x)
689				{
690					return x + 1.0;
691				}
692
693				void foo1 (out float x)
694				{
695					x = 1.0;
696				}
697
698				float foo2 (inout float x)
699				{
700					return x + 1.0;
701				}
702
703				void main()
704				{
705					${SETUP}
706					float result;
707					foo1(result);
708					float x0 = foo0(1.0);
709					foo2(result);
710					${OUTPUT}
711				}
712			""
713		end
714		case precision_storage
715			expect compile_fail
716			values {}
717
718			both ""
719				precision mediump float;
720				${DECLARATIONS}
721
722				float foo0 (lowp const float x)
723				{
724					return x + 1.0;
725				}
726
727				void foo1 (mediump float x)
728				{
729					x = 1.0;
730				}
731
732				float foo2 (mediump float x)
733				{
734					return x + 1.0;
735				}
736
737				void main()
738				{
739					${SETUP}
740					float result;
741					foo1(result);
742					float x0 = foo0(1.0);
743					foo2(result);
744					${OUTPUT}
745				}
746			""
747		end
748		case precision_parameter
749			expect compile_fail
750			values {}
751
752			both ""
753				precision mediump float;
754				${DECLARATIONS}
755
756				float foo0 (lowp in float x)
757				{
758					return x + 1.0;
759				}
760
761				void foo1 (mediump out float x)
762				{
763					x = 1.0;
764				}
765
766				float foo2 (mediump inout float x)
767				{
768					return x + 1.0;
769				}
770
771				void main()
772				{
773					${SETUP}
774					float result;
775					foo1(result);
776					float x0 = foo0(1.0);
777					foo2(result);
778					${OUTPUT}
779				}
780			""
781		end
782
783	end # invalid
784
785end # parameters
786