Merge gerrit/vulkan-cts-1.0.0 into gerrit/vulkan-cts-1.0.1
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / data / vulkan / glsl / es310 / linkage.test
1
2 # Varying tests
3 group varying "Varying linkage"
4
5         # Linking rules
6         group rules "Varying linking rules"
7                 # declared in vertex shader, no reference in frag shader
8                 case vertex_declare
9                         version 310 es
10                         desc "varying declared in vertex shader, no reference in fragment shader"
11                         vertex ""
12                                 #version 310 es
13                                 ${VERTEX_DECLARATIONS}
14                                 layout(location = 0) out mediump float var;
15                                 void main()
16                                 {
17                                         ${VERTEX_OUTPUT}
18                                 }
19                         ""
20                         fragment ""
21                                 #version 310 es
22                                 ${FRAGMENT_DECLARATIONS}
23                                 void main()
24                                 {
25                                         ${FRAG_COLOR} = vec4(1.0);
26                                 }
27                         ""
28                 end
29
30                 # declared in vertex shader, declared in frag shader
31                 case both_declare
32                         version 310 es
33                         desc "varying declared in both vertex and fragment shader, but not used"
34                         vertex ""
35                                 #version 310 es
36                                 ${VERTEX_DECLARATIONS}
37                                 layout(location = 0) out mediump float var;
38                                 void main()
39                                 {
40                                         ${VERTEX_OUTPUT}
41                                 }
42                         ""
43                         fragment ""
44                                 #version 310 es
45                                 layout(location = 0) in mediump float var;
46                                 ${FRAGMENT_DECLARATIONS}
47                                 void main()
48                                 {
49                                         ${FRAG_COLOR} = vec4(1.0);
50                                 }
51                         ""
52                 end
53
54                 # declared in vertex shader, static use in frag shader
55                 case vertex_declare_fragment_use
56                         version 310 es
57                         desc "varying declared in both shaders, statically used in fragment shader"
58                         values { uniform bool u_false = false; }
59                         vertex ""
60                                 #version 310 es
61                                 ${VERTEX_DECLARATIONS}
62                                 layout(location = 0) out mediump float var;
63                                 void main()
64                                 {
65                                         ${VERTEX_OUTPUT}
66                                 }
67                         ""
68                         fragment ""
69                                 #version 310 es
70                                 layout(location = 0) in mediump float var;
71                                 ${FRAGMENT_DECLARATIONS}
72                                 void main()
73                                 {
74                                         if (u_false)
75                                                 ${FRAG_COLOR} = vec4(var);
76                                         else
77                                                 ${FRAG_COLOR} = vec4(1.0);
78                                 }
79                         ""
80                 end
81
82                 # static use in vertex shader, no reference in fragment shader
83                 case vertex_use_fragment_declare
84                         version 310 es
85                         desc "varying declared and statically used in vertex shader, no reference in fragment shader"
86                         values { uniform bool u_false = false; }
87                         vertex ""
88                                 #version 310 es
89                                 ${VERTEX_DECLARATIONS}
90                                 layout(location = 0) out mediump float var;
91                                 void main()
92                                 {
93                                         if (u_false)
94                                                 var = 1.0;
95                                         ${VERTEX_OUTPUT}
96                                 }
97                         ""
98                         fragment ""
99                                 #version 310 es
100                                 ${FRAGMENT_DECLARATIONS}
101                                 void main()
102                                 {
103                                         ${FRAG_COLOR} = vec4(1.0);
104                                 }
105                         ""
106                 end
107
108                 # static use in vertex shader, declared in fragment shader
109                 case vertex_use_declare_fragment
110                         version 310 es
111                         desc "varying declared and statically used in vertex shader, only declared in fragment shader"
112                         values { uniform bool u_false = false; }
113                         vertex ""
114                                 #version 310 es
115                                 ${VERTEX_DECLARATIONS}
116                                 layout(location = 0) out mediump float var;
117                                 void main()
118                                 {
119                                         if (u_false)
120                                                 var = 1.0;
121                                         ${VERTEX_OUTPUT}
122                                 }
123                         ""
124                         fragment ""
125                                 #version 310 es
126                                 layout(location = 0) in mediump float var;
127                                 ${FRAGMENT_DECLARATIONS}
128                                 void main()
129                                 {
130                                         ${FRAG_COLOR} = vec4(1.0);
131                                 }
132                         ""
133                 end
134
135                 # static use in vertex shader, used in fragment shader
136                 case vertex_use_fragment_use
137                         version 310 es
138                         desc "varying statically used in both vertex and fragment shader"
139                         values { uniform bool u_false = false; }
140                         vertex ""
141                                 #version 310 es
142                                 ${VERTEX_DECLARATIONS}
143                                 layout(location = 0) out mediump float var;
144                                 void main()
145                                 {
146                                         if (u_false)
147                                                 var = 1.0;
148                                         ${VERTEX_OUTPUT}
149                                 }
150                         ""
151                         fragment ""
152                                 #version 310 es
153                                 ${FRAGMENT_DECLARATIONS}
154                                 layout(location = 0) in mediump float var;
155                                 void main()
156                                 {
157                                         if (u_false)
158                                                 ${FRAG_COLOR} = vec4(var);
159                                         else
160                                                 ${FRAG_COLOR} = vec4(1.0);
161                                 }
162                         ""
163                 end
164
165                 # differing precision tests
166                 case differing_precision_1
167                         version 310 es
168                         desc "varying declared as highp in vertex shader, but mediump in fragment shader"
169                         values
170                         {
171                                 input float in0         = [ -1.25 | -25.55 | 1.0 | 2.25 | 3.4 | 16.0 ];
172                                 output float out0       = [ -1.25 | -25.55 | 1.0 | 2.25 | 3.4 | 16.0 ];
173                         }
174
175                         vertex ""
176                                 #version 310 es
177                                 ${VERTEX_DECLARATIONS}
178                                 layout(location = 0) out highp float var;
179                                 void main()
180                                 {
181                                         var = in0;
182                                         ${VERTEX_OUTPUT}
183                                 }
184                         ""
185                         fragment ""
186                                 #version 310 es
187                                 precision mediump float;
188                                 ${FRAGMENT_DECLARATIONS}
189                                 layout(location = 0) in mediump float var;
190                                 void main()
191                                 {
192                                         out0 = var;
193                                         ${FRAGMENT_OUTPUT}
194                                 }
195                         ""
196                 end
197
198                 # differing precision tests
199                 case differing_precision_2
200                         version 310 es
201                         desc "varying declared as highp in vertex shader, but lowp in fragment shader"
202                         values
203                         {
204                                 input float in0         = [ -1.25 | -25.56 | 1.0 | 2.25 | 3.4 | 16.0 ];
205                                 output float out0       = [ -1.25 | -25.56 | 1.0 | 2.25 | 3.4 | 16.0 ];
206                         }
207
208                         vertex ""
209                                 #version 310 es
210                                 ${VERTEX_DECLARATIONS}
211                                 layout(location = 0) out highp vec2 var;
212                                 void main()
213                                 {
214                                         var = vec2(in0, 2.0*in0);
215                                         ${VERTEX_OUTPUT}
216                                 }
217                         ""
218                         fragment ""
219                                 #version 310 es
220                                 precision mediump float;
221                                 ${FRAGMENT_DECLARATIONS}
222                                 layout(location = 0) in lowp vec2 var;
223                                 void main()
224                                 {
225                                         out0 = var.y - var.x;
226                                         ${FRAGMENT_OUTPUT}
227                                 }
228                         ""
229                 end
230
231                 # differing precision tests
232                 case differing_precision_3
233                         version 310 es
234                         desc "varying declared as lowp in vertex shader, but mediump in fragment shader"
235                         values
236                         {
237                                 input float in0         = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
238                                 output float out0       = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
239                         }
240
241                         vertex ""
242                                 #version 310 es
243                                 ${VERTEX_DECLARATIONS}
244                                 layout(location = 0) out lowp vec4 var;
245                                 void main()
246                                 {
247                                         var = vec4(in0, 2.0*in0, -in0, -in0);
248                                         ${VERTEX_OUTPUT}
249                                 }
250                         ""
251                         fragment ""
252                                 #version 310 es
253                                 precision mediump float;
254                                 ${FRAGMENT_DECLARATIONS}
255                                 layout(location = 0) in mediump vec4 var;
256                                 void main()
257                                 {
258                                         out0 = var.x + var.y + var.z + var.w;
259                                         ${FRAGMENT_OUTPUT}
260                                 }
261                         ""
262                 end
263
264                 # different interpolation
265                 case differing_interpolation_2
266                         version 310 es
267                         desc "varying interpolation different (smooth vs. centroid)"
268                         values
269                         {
270                                 input float in0         = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
271                                 output float out0       = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
272                         }
273
274                         vertex ""
275                                 #version 310 es
276                                 ${VERTEX_DECLARATIONS}
277                                 layout(location = 0) smooth out mediump float var;
278                                 void main()
279                                 {
280                                         var = in0;
281                                         ${VERTEX_OUTPUT}
282                                 }
283                         ""
284                         fragment ""
285                                 #version 310 es
286                                 precision mediump float;
287                                 ${FRAGMENT_DECLARATIONS}
288                                 layout(location = 0) centroid in mediump float var;
289                                 void main()
290                                 {
291                                         out0 = var;
292                                         ${FRAGMENT_OUTPUT}
293                                 }
294                         ""
295                 end
296
297                 # differing name (linking is done by location only in SPIR-V)
298                 case differing_name_1
299                         version 310 es
300                         desc "varying declared with matching location but different name"
301                         values
302                         {
303                                 input float in0         = [ 2.0 | 5.0 | -3.0 | 4.0 ];
304                                 input float in1         = [ 4.0 | 1.0 | -0.5 | 2.0 ];
305                                 output float out0       = [ -2.0 | 4.0 | -2.5 | 2.0 ];
306                         }
307
308                         vertex ""
309                                 #version 310 es
310                                 ${VERTEX_DECLARATIONS}
311                                 layout(location = 0) out highp float vtxVarB;
312                                 layout(location = 2) out highp float vtxVarA;
313                                 void main()
314                                 {
315                                         vtxVarA = in0;
316                                         vtxVarB = in1;
317                                         ${VERTEX_OUTPUT}
318                                 }
319                         ""
320                         fragment ""
321                                 #version 310 es
322                                 precision mediump float;
323                                 ${FRAGMENT_DECLARATIONS}
324                                 layout(location = 2) in highp float fragVarA;
325                                 layout(location = 0) in highp float fragVarB;
326                                 void main()
327                                 {
328                                         out0 = fragVarA - fragVarB;
329                                         ${FRAGMENT_OUTPUT}
330                                 }
331                         ""
332                 end
333
334                 # differing name (linking is done by location only in SPIR-V)
335                 case differing_name_2
336                         version 310 es
337                         desc "varying declared with matching location but different name"
338                         values
339                         {
340                                 input float in0         = [ 2.0 | 5.0 | -3.0 | 4.0 ];
341                                 input float in1         = [ 4.0 | 1.0 | -0.5 | 2.0 ];
342                                 output float out0       = [ -2.0 | 4.0 | -2.5 | 2.0 ];
343                         }
344
345                         vertex ""
346                                 #version 310 es
347                                 ${VERTEX_DECLARATIONS}
348                                 layout(location = 0) out highp float varA;
349                                 layout(location = 2) out highp float varB;
350                                 void main()
351                                 {
352                                         varA = in0;
353                                         varB = in1;
354                                         ${VERTEX_OUTPUT}
355                                 }
356                         ""
357                         fragment ""
358                                 #version 310 es
359                                 precision mediump float;
360                                 ${FRAGMENT_DECLARATIONS}
361                                 layout(location = 2) in highp float varA;
362                                 layout(location = 0) in highp float varB;
363                                 void main()
364                                 {
365                                         out0 = varB - varA;
366                                         ${FRAGMENT_OUTPUT}
367                                 }
368                         ""
369                 end
370         end
371
372         group basic_types "Basic varying types"
373                 case float
374                         version 310 es
375                         desc "varying of type float"
376                         values
377                         {
378                                 input float in0         = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
379                                 output float out0       = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
380                         }
381                         vertex ""
382                                 #version 310 es
383                                 ${VERTEX_DECLARATIONS}
384                                 layout(location = 0) out mediump float var;
385                                 void main()
386                                 {
387                                         var = in0;
388                                         ${VERTEX_OUTPUT}
389                                 }
390                         ""
391                         fragment ""
392                                 #version 310 es
393                                 precision mediump float;
394                                 ${FRAGMENT_DECLARATIONS}
395                                 layout(location = 0) in float var;
396                                 void main()
397                                 {
398                                         out0 = var;
399                                         ${FRAGMENT_OUTPUT}
400                                 }
401                         ""
402                 end
403
404                 case vec2
405                         version 310 es
406                         desc "varying of type vec2"
407                         values
408                         {
409                                 input vec2 in0          = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
410                                 output vec2 out0        = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
411                         }
412                         vertex ""
413                                 #version 310 es
414                                 ${VERTEX_DECLARATIONS}
415                                 layout(location = 0) out mediump vec2 var;
416                                 void main()
417                                 {
418                                         var = in0;
419                                         ${VERTEX_OUTPUT}
420                                 }
421                         ""
422                         fragment ""
423                                 #version 310 es
424                                 precision mediump float;
425                                 ${FRAGMENT_DECLARATIONS}
426                                 layout(location = 0) in vec2 var;
427                                 void main()
428                                 {
429                                         out0 = var;
430                                         ${FRAGMENT_OUTPUT}
431                                 }
432                         ""
433                 end
434
435                 case vec3
436                         version 310 es
437                         desc "varying of type vec3"
438                         values
439                         {
440                                 input vec3 in0          = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
441                                 output vec3 out0        = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
442                         }
443                         vertex ""
444                                 #version 310 es
445                                 ${VERTEX_DECLARATIONS}
446                                 layout(location = 0) out mediump vec3 var;
447                                 void main()
448                                 {
449                                         var = in0;
450                                         ${VERTEX_OUTPUT}
451                                 }
452                         ""
453                         fragment ""
454                                 #version 310 es
455                                 precision mediump float;
456                                 ${FRAGMENT_DECLARATIONS}
457                                 layout(location = 0) in vec3 var;
458                                 void main()
459                                 {
460                                         out0 = var;
461                                         ${FRAGMENT_OUTPUT}
462                                 }
463                         ""
464                 end
465
466                 case vec4
467                         version 310 es
468                         desc "varying of type vec4"
469                         values
470                         {
471                                 input vec4 in0          = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
472                                 output vec4 out0        = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
473                         }
474                         vertex ""
475                                 #version 310 es
476                                 ${VERTEX_DECLARATIONS}
477                                 layout(location = 0) out mediump vec4 var;
478                                 void main()
479                                 {
480                                         var = in0;
481                                         ${VERTEX_OUTPUT}
482                                 }
483                         ""
484                         fragment ""
485                                 #version 310 es
486                                 precision mediump float;
487                                 ${FRAGMENT_DECLARATIONS}
488                                 layout(location = 0) in vec4 var;
489                                 void main()
490                                 {
491                                         out0 = var;
492                                         ${FRAGMENT_OUTPUT}
493                                 }
494                         ""
495                 end
496
497                 case mat2
498                         version 310 es
499                         desc "varying of type mat2"
500                         values
501                         {
502                                 input mat2 in0          = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
503                                 output mat2 out0        = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
504                         }
505                         vertex ""
506                                 #version 310 es
507                                 ${VERTEX_DECLARATIONS}
508                                 layout(location = 0) out mediump mat2 var;
509                                 void main()
510                                 {
511                                         var = in0;
512                                         ${VERTEX_OUTPUT}
513                                 }
514                         ""
515                         fragment ""
516                                 #version 310 es
517                                 precision mediump float;
518                                 ${FRAGMENT_DECLARATIONS}
519                                 layout(location = 0) in mat2 var;
520                                 void main()
521                                 {
522                                         out0 = var;
523                                         ${FRAGMENT_OUTPUT}
524                                 }
525                         ""
526                 end
527
528                 case mat2x3
529                         version 310 es
530                         desc "varying of type mat2x3"
531                         values
532                         {
533                                 input mat2x3 in0        = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
534                                 output mat2x3 out0      = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
535                         }
536                         vertex ""
537                                 #version 310 es
538                                 ${VERTEX_DECLARATIONS}
539                                 layout(location = 0) out mediump mat2x3 var;
540                                 void main()
541                                 {
542                                         var = in0;
543                                         ${VERTEX_OUTPUT}
544                                 }
545                         ""
546                         fragment ""
547                                 #version 310 es
548                                 precision mediump float;
549                                 ${FRAGMENT_DECLARATIONS}
550                                 layout(location = 0) in mat2x3 var;
551                                 void main()
552                                 {
553                                         out0 = var;
554                                         ${FRAGMENT_OUTPUT}
555                                 }
556                         ""
557                 end
558
559                 case mat2x4
560                         version 310 es
561                         desc "varying of type mat2x4"
562                         values
563                         {
564                                 input mat2x4 in0        = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
565                                 output mat2x4 out0      = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
566                         }
567                         vertex ""
568                                 #version 310 es
569                                 ${VERTEX_DECLARATIONS}
570                                 layout(location = 0) out mediump mat2x4 var;
571                                 void main()
572                                 {
573                                         var = in0;
574                                         ${VERTEX_OUTPUT}
575                                 }
576                         ""
577                         fragment ""
578                                 #version 310 es
579                                 precision mediump float;
580                                 ${FRAGMENT_DECLARATIONS}
581                                 layout(location = 0) in mat2x4 var;
582                                 void main()
583                                 {
584                                         out0 = var;
585                                         ${FRAGMENT_OUTPUT}
586                                 }
587                         ""
588                 end
589
590                 case mat3x2
591                         version 310 es
592                         desc "varying of type mat3x2"
593                         values
594                         {
595                                 input mat3x2 in0        = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
596                                 output mat3x2 out0      = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
597                         }
598                         vertex ""
599                                 #version 310 es
600                                 ${VERTEX_DECLARATIONS}
601                                 layout(location = 0) out mediump mat3x2 var;
602                                 void main()
603                                 {
604                                         var = in0;
605                                         ${VERTEX_OUTPUT}
606                                 }
607                         ""
608                         fragment ""
609                                 #version 310 es
610                                 precision mediump float;
611                                 ${FRAGMENT_DECLARATIONS}
612                                 layout(location = 0) in mat3x2 var;
613                                 void main()
614                                 {
615                                         out0 = var;
616                                         ${FRAGMENT_OUTPUT}
617                                 }
618                         ""
619                 end
620
621                 case mat3
622                         version 310 es
623                         desc "varying of type mat3"
624                         values
625                         {
626                                 input mat3 in0          = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
627                                 output mat3 out0        = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
628                         }
629                         vertex ""
630                                 #version 310 es
631                                 ${VERTEX_DECLARATIONS}
632                                 layout(location = 0) out mediump mat3 var;
633                                 void main()
634                                 {
635                                         var = in0;
636                                         ${VERTEX_OUTPUT}
637                                 }
638                         ""
639                         fragment ""
640                                 #version 310 es
641                                 precision mediump float;
642                                 ${FRAGMENT_DECLARATIONS}
643                                 layout(location = 0) in mat3 var;
644                                 void main()
645                                 {
646                                         out0 = var;
647                                         ${FRAGMENT_OUTPUT}
648                                 }
649                         ""
650                 end
651
652                 case mat3x4
653                         version 310 es
654                         desc "varying of type mat3x4"
655                         values
656                         {
657                                 input mat3x4 in0        = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
658                                 output mat3x4 out0      = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
659                         }
660                         vertex ""
661                                 #version 310 es
662                                 ${VERTEX_DECLARATIONS}
663                                 layout(location = 0) out mediump mat3x4 var;
664                                 void main()
665                                 {
666                                         var = in0;
667                                         ${VERTEX_OUTPUT}
668                                 }
669                         ""
670                         fragment ""
671                                 #version 310 es
672                                 precision mediump float;
673                                 ${FRAGMENT_DECLARATIONS}
674                                 layout(location = 0) in mat3x4 var;
675                                 void main()
676                                 {
677                                         out0 = var;
678                                         ${FRAGMENT_OUTPUT}
679                                 }
680                         ""
681                 end
682
683                 case mat4x2
684                         version 310 es
685                         desc "varying of type mat4x2"
686                         values
687                         {
688                                 input mat4x2 in0        = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
689                                 output mat4x2 out0      = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
690                         }
691                         vertex ""
692                                 #version 310 es
693                                 ${VERTEX_DECLARATIONS}
694                                 layout(location = 0) out mediump mat4x2 var;
695                                 void main()
696                                 {
697                                         var = in0;
698                                         ${VERTEX_OUTPUT}
699                                 }
700                         ""
701                         fragment ""
702                                 #version 310 es
703                                 precision mediump float;
704                                 ${FRAGMENT_DECLARATIONS}
705                                 layout(location = 0) in mat4x2 var;
706                                 void main()
707                                 {
708                                         out0 = var;
709                                         ${FRAGMENT_OUTPUT}
710                                 }
711                         ""
712                 end
713
714                 case mat4x3
715                         version 310 es
716                         desc "varying of type mat4x3"
717                         values
718                         {
719                                 input mat4x3 in0        = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
720                                 output mat4x3 out0      = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
721                         }
722                         vertex ""
723                                 #version 310 es
724                                 ${VERTEX_DECLARATIONS}
725                                 layout(location = 0) out mediump mat4x3 var;
726                                 void main()
727                                 {
728                                         var = in0;
729                                         ${VERTEX_OUTPUT}
730                                 }
731                         ""
732                         fragment ""
733                                 #version 310 es
734                                 precision mediump float;
735                                 ${FRAGMENT_DECLARATIONS}
736                                 layout(location = 0) in mat4x3 var;
737                                 void main()
738                                 {
739                                         out0 = var;
740                                         ${FRAGMENT_OUTPUT}
741                                 }
742                         ""
743                 end
744
745                 case mat4
746                         version 310 es
747                         desc "varying of type mat4"
748                         values
749                         {
750                                 input mat4 in0          = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
751                                 output mat4 out0        = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
752                         }
753                         vertex ""
754                                 #version 310 es
755                                 ${VERTEX_DECLARATIONS}
756                                 layout(location = 0) out mediump mat4 var;
757                                 void main()
758                                 {
759                                         var = in0;
760                                         ${VERTEX_OUTPUT}
761                                 }
762                         ""
763                         fragment ""
764                                 #version 310 es
765                                 precision mediump float;
766                                 ${FRAGMENT_DECLARATIONS}
767                                 layout(location = 0) in mat4 var;
768                                 void main()
769                                 {
770                                         out0 = var;
771                                         ${FRAGMENT_OUTPUT}
772                                 }
773                         ""
774                 end
775
776                 case int
777                         version 310 es
778                         desc "varying of type int"
779                         values
780                         {
781                                 input int in0           = [ -1 | -25 | 1 | 2 | 3 | 16 ];
782                                 output int out0         = [ -1 | -25 | 1 | 2 | 3 | 16 ];
783                         }
784                         vertex ""
785                                 #version 310 es
786                                 ${VERTEX_DECLARATIONS}
787                                 layout(location = 0) flat out mediump int var;
788                                 void main()
789                                 {
790                                         ${VERTEX_SETUP}
791                                         var = in0;
792                                         ${VERTEX_OUTPUT}
793                                 }
794                         ""
795                         fragment ""
796                                 #version 310 es
797                                 ${FRAGMENT_DECLARATIONS}
798                                 layout(location = 0) flat in int var;
799                                 void main()
800                                 {
801                                         out0 = var;
802                                         ${FRAGMENT_OUTPUT}
803                                 }
804                         ""
805                 end
806
807                 case ivec2
808                         version 310 es
809                         desc "varying of type ivec2"
810                         values
811                         {
812                                 input ivec2 in0         = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
813                                 output ivec2 out0       = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
814                         }
815                         vertex ""
816                                 #version 310 es
817                                 ${VERTEX_DECLARATIONS}
818                                 layout(location = 0) flat out mediump ivec2 var;
819                                 void main()
820                                 {
821                                         ${VERTEX_SETUP}
822                                         var = in0;
823                                         ${VERTEX_OUTPUT}
824                                 }
825                         ""
826                         fragment ""
827                                 #version 310 es
828                                 ${FRAGMENT_DECLARATIONS}
829                                 layout(location = 0) flat in ivec2 var;
830                                 void main()
831                                 {
832                                         out0 = var;
833                                         ${FRAGMENT_OUTPUT}
834                                 }
835                         ""
836                 end
837
838                 case ivec3
839                         version 310 es
840                         desc "varying of type ivec3"
841                         values
842                         {
843                                 input ivec3 in0         = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
844                                 output ivec3 out0       = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
845                         }
846                         vertex ""
847                                 #version 310 es
848                                 ${VERTEX_DECLARATIONS}
849                                 layout(location = 0) flat out mediump ivec3 var;
850                                 void main()
851                                 {
852                                         ${VERTEX_SETUP}
853                                         var = in0;
854                                         ${VERTEX_OUTPUT}
855                                 }
856                         ""
857                         fragment ""
858                                 #version 310 es
859                                 ${FRAGMENT_DECLARATIONS}
860                                 layout(location = 0) flat in ivec3 var;
861                                 void main()
862                                 {
863                                         out0 = var;
864                                         ${FRAGMENT_OUTPUT}
865                                 }
866                         ""
867                 end
868
869                 case ivec4
870                         version 310 es
871                         desc "varying of type ivec4"
872                         values
873                         {
874                                 input ivec4 in0         = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
875                                 output ivec4 out0       = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
876                         }
877                         vertex ""
878                                 #version 310 es
879                                 ${VERTEX_DECLARATIONS}
880                                 layout(location = 0) flat out mediump ivec4 var;
881                                 void main()
882                                 {
883                                         ${VERTEX_SETUP}
884                                         var = in0;
885                                         ${VERTEX_OUTPUT}
886                                 }
887                         ""
888                         fragment ""
889                                 #version 310 es
890                                 ${FRAGMENT_DECLARATIONS}
891                                 layout(location = 0) flat in ivec4 var;
892                                 void main()
893                                 {
894                                         out0 = var;
895                                         ${FRAGMENT_OUTPUT}
896                                 }
897                         ""
898                 end
899
900                 case uint
901                         version 310 es
902                         desc "varying of type int"
903                         values
904                         {
905                                 input uint in0                  = [ 1 | 2 | 3 | 16 ];
906                                 output uint out0                = [ 1 | 2 | 3 | 16 ];
907                         }
908                         vertex ""
909                                 #version 310 es
910                                 ${VERTEX_DECLARATIONS}
911                                 layout(location = 0) flat out mediump uint var;
912                                 void main()
913                                 {
914                                         ${VERTEX_SETUP}
915                                         var = in0;
916                                         ${VERTEX_OUTPUT}
917                                 }
918                         ""
919                         fragment ""
920                                 #version 310 es
921                                 ${FRAGMENT_DECLARATIONS}
922                                 layout(location = 0) flat in uint var;
923                                 void main()
924                                 {
925                                         out0 = var;
926                                         ${FRAGMENT_OUTPUT}
927                                 }
928                         ""
929                 end
930
931                 case uvec2
932                         version 310 es
933                         desc "varying of type uvec2"
934                         values
935                         {
936                                 input uvec2 in0         = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
937                                 output uvec2 out0       = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
938                         }
939                         vertex ""
940                                 #version 310 es
941                                 ${VERTEX_DECLARATIONS}
942                                 layout(location = 0) flat out mediump uvec2 var;
943                                 void main()
944                                 {
945                                         ${VERTEX_SETUP}
946                                         var = in0;
947                                         ${VERTEX_OUTPUT}
948                                 }
949                         ""
950                         fragment ""
951                                 #version 310 es
952                                 ${FRAGMENT_DECLARATIONS}
953                                 layout(location = 0) flat in uvec2 var;
954                                 void main()
955                                 {
956                                         out0 = var;
957                                         ${FRAGMENT_OUTPUT}
958                                 }
959                         ""
960                 end
961
962                 case uvec3
963                         version 310 es
964                         desc "varying of type uvec3"
965                         values
966                         {
967                                 input uvec3 in0         = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
968                                 output uvec3 out0       = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
969                         }
970                         vertex ""
971                                 #version 310 es
972                                 ${VERTEX_DECLARATIONS}
973                                 layout(location = 0) flat out mediump uvec3 var;
974                                 void main()
975                                 {
976                                         ${VERTEX_SETUP}
977                                         var = in0;
978                                         ${VERTEX_OUTPUT}
979                                 }
980                         ""
981                         fragment ""
982                                 #version 310 es
983                                 ${FRAGMENT_DECLARATIONS}
984                                 layout(location = 0) flat in uvec3 var;
985                                 void main()
986                                 {
987                                         out0 = var;
988                                         ${FRAGMENT_OUTPUT}
989                                 }
990                         ""
991                 end
992
993                 case uvec4
994                         version 310 es
995                         desc "varying of type uvec4"
996                         values
997                         {
998                                 input uvec4 in0         = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
999                                 output uvec4 out0       = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
1000                         }
1001                         vertex ""
1002                                 #version 310 es
1003                                 ${VERTEX_DECLARATIONS}
1004                                 layout(location = 0) flat out mediump uvec4 var;
1005                                 void main()
1006                                 {
1007                                         ${VERTEX_SETUP}
1008                                         var = in0;
1009                                         ${VERTEX_OUTPUT}
1010                                 }
1011                         ""
1012                         fragment ""
1013                                 #version 310 es
1014                                 ${FRAGMENT_DECLARATIONS}
1015                                 layout(location = 0) flat in uvec4 var;
1016                                 void main()
1017                                 {
1018                                         out0 = var;
1019                                         ${FRAGMENT_OUTPUT}
1020                                 }
1021                         ""
1022                 end
1023         end
1024
1025         group struct "Structure varyings"
1026                 case float
1027                         version 310 es
1028                         desc "varying of type float inside struct"
1029                         values
1030                         {
1031                                 input float in0         = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1032                                 output float out0       = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1033                         }
1034                         vertex ""
1035                                 #version 310 es
1036                                 ${VERTEX_DECLARATIONS}
1037                                 struct S { mediump float a; };
1038                                 layout(location = 0) out S var;
1039                                 void main()
1040                                 {
1041                                         var.a = in0;
1042                                         ${VERTEX_OUTPUT}
1043                                 }
1044                         ""
1045                         fragment ""
1046                                 #version 310 es
1047                                 precision mediump float;
1048                                 ${FRAGMENT_DECLARATIONS}
1049                                 struct S { mediump float a; };
1050                                 layout(location = 0) in S var;
1051                                 void main()
1052                                 {
1053                                         out0 = var.a;
1054                                         ${FRAGMENT_OUTPUT}
1055                                 }
1056                         ""
1057                 end
1058
1059                 case vec2
1060                         version 310 es
1061                         desc "varying of type vec2 inside struct"
1062                         values
1063                         {
1064                                 input vec2 in0          = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
1065                                 output vec2 out0        = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
1066                         }
1067                         vertex ""
1068                                 #version 310 es
1069                                 ${VERTEX_DECLARATIONS}
1070                                 struct S { mediump vec2 a; };
1071                                 layout(location = 0) out S var;
1072                                 void main()
1073                                 {
1074                                         var.a = in0;
1075                                         ${VERTEX_OUTPUT}
1076                                 }
1077                         ""
1078                         fragment ""
1079                                 #version 310 es
1080                                 precision mediump float;
1081                                 ${FRAGMENT_DECLARATIONS}
1082                                 struct S { mediump vec2 a; };
1083                                 layout(location = 0) in S var;
1084                                 void main()
1085                                 {
1086                                         out0 = var.a;
1087                                         ${FRAGMENT_OUTPUT}
1088                                 }
1089                         ""
1090                 end
1091
1092                 case vec3
1093                         version 310 es
1094                         desc "varying of type vec3 inside struct"
1095                         values
1096                         {
1097                                 input vec3 in0          = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1098                                 output vec3 out0        = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1099                         }
1100                         vertex ""
1101                                 #version 310 es
1102                                 ${VERTEX_DECLARATIONS}
1103                                 struct S { mediump vec3 a; };
1104                                 layout(location = 0) out S var;
1105                                 void main()
1106                                 {
1107                                         var.a = in0;
1108                                         ${VERTEX_OUTPUT}
1109                                 }
1110                         ""
1111                         fragment ""
1112                                 #version 310 es
1113                                 precision mediump float;
1114                                 ${FRAGMENT_DECLARATIONS}
1115                                 struct S { mediump vec3 a; };
1116                                 layout(location = 0) in S var;
1117                                 void main()
1118                                 {
1119                                         out0 = var.a;
1120                                         ${FRAGMENT_OUTPUT}
1121                                 }
1122                         ""
1123                 end
1124
1125                 case vec4
1126                         version 310 es
1127                         desc "varying of type vec4 inside struct"
1128                         values
1129                         {
1130                                 input vec4 in0          = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1131                                 output vec4 out0        = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1132                         }
1133                         vertex ""
1134                                 #version 310 es
1135                                 ${VERTEX_DECLARATIONS}
1136                                 struct S { mediump vec4 a; };
1137                                 layout(location = 0) out S var;
1138                                 void main()
1139                                 {
1140                                         var.a = in0;
1141                                         ${VERTEX_OUTPUT}
1142                                 }
1143                         ""
1144                         fragment ""
1145                                 #version 310 es
1146                                 precision mediump float;
1147                                 ${FRAGMENT_DECLARATIONS}
1148                                 struct S { mediump vec4 a; };
1149                                 layout(location = 0) in S var;
1150                                 void main()
1151                                 {
1152                                         out0 = var.a;
1153                                         ${FRAGMENT_OUTPUT}
1154                                 }
1155                         ""
1156                 end
1157
1158                 case mat2
1159                         version 310 es
1160                         desc "varying of type mat2 inside struct"
1161                         values
1162                         {
1163                                 input mat2 in0          = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
1164                                 output mat2 out0        = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
1165                         }
1166                         vertex ""
1167                                 #version 310 es
1168                                 ${VERTEX_DECLARATIONS}
1169                                 struct S { mediump mat2 a; };
1170                                 layout(location = 0) out S var;
1171                                 void main()
1172                                 {
1173                                         var.a = in0;
1174                                         ${VERTEX_OUTPUT}
1175                                 }
1176                         ""
1177                         fragment ""
1178                                 #version 310 es
1179                                 precision mediump float;
1180                                 ${FRAGMENT_DECLARATIONS}
1181                                 struct S { mediump mat2 a; };
1182                                 layout(location = 0) in S var;
1183                                 void main()
1184                                 {
1185                                         out0 = var.a;
1186                                         ${FRAGMENT_OUTPUT}
1187                                 }
1188                         ""
1189                 end
1190
1191                 case mat2x3
1192                         version 310 es
1193                         desc "varying of type mat2x3 inside struct"
1194                         values
1195                         {
1196                                 input mat2x3 in0        = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1197                                 output mat2x3 out0      = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1198                         }
1199                         vertex ""
1200                                 #version 310 es
1201                                 ${VERTEX_DECLARATIONS}
1202                                 struct S { mediump mat2x3 a; };
1203                                 layout(location = 0) out S var;
1204                                 void main()
1205                                 {
1206                                         var.a = in0;
1207                                         ${VERTEX_OUTPUT}
1208                                 }
1209                         ""
1210                         fragment ""
1211                                 #version 310 es
1212                                 precision mediump float;
1213                                 ${FRAGMENT_DECLARATIONS}
1214                                 struct S { mediump mat2x3 a; };
1215                                 layout(location = 0) in S var;
1216                                 void main()
1217                                 {
1218                                         out0 = var.a;
1219                                         ${FRAGMENT_OUTPUT}
1220                                 }
1221                         ""
1222                 end
1223
1224                 case mat2x4
1225                         version 310 es
1226                         desc "varying of type mat2x4 inside struct"
1227                         values
1228                         {
1229                                 input mat2x4 in0        = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1230                                 output mat2x4 out0      = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1231                         }
1232                         vertex ""
1233                                 #version 310 es
1234                                 ${VERTEX_DECLARATIONS}
1235                                 struct S { mediump mat2x4 a; };
1236                                 layout(location = 0) out S var;
1237                                 void main()
1238                                 {
1239                                         var.a = in0;
1240                                         ${VERTEX_OUTPUT}
1241                                 }
1242                         ""
1243                         fragment ""
1244                                 #version 310 es
1245                                 precision mediump float;
1246                                 ${FRAGMENT_DECLARATIONS}
1247                                 struct S { mediump mat2x4 a; };
1248                                 layout(location = 0) in S var;
1249                                 void main()
1250                                 {
1251                                         out0 = var.a;
1252                                         ${FRAGMENT_OUTPUT}
1253                                 }
1254                         ""
1255                 end
1256
1257                 case mat3x2
1258                         version 310 es
1259                         desc "varying of type mat3x2 inside struct"
1260                         values
1261                         {
1262                                 input mat3x2 in0        = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1263                                 output mat3x2 out0      = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1264                         }
1265                         vertex ""
1266                                 #version 310 es
1267                                 ${VERTEX_DECLARATIONS}
1268                                 struct S { mediump mat3x2 a; };
1269                                 layout(location = 0) out S var;
1270                                 void main()
1271                                 {
1272                                         var.a = in0;
1273                                         ${VERTEX_OUTPUT}
1274                                 }
1275                         ""
1276                         fragment ""
1277                                 #version 310 es
1278                                 precision mediump float;
1279                                 ${FRAGMENT_DECLARATIONS}
1280                                 struct S { mediump mat3x2 a; };
1281                                 layout(location = 0) in S var;
1282                                 void main()
1283                                 {
1284                                         out0 = var.a;
1285                                         ${FRAGMENT_OUTPUT}
1286                                 }
1287                         ""
1288                 end
1289
1290                 case mat3
1291                         version 310 es
1292                         desc "varying of type mat3 inside struct"
1293                         values
1294                         {
1295                                 input mat3 in0          = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
1296                                 output mat3 out0        = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
1297                         }
1298                         vertex ""
1299                                 #version 310 es
1300                                 ${VERTEX_DECLARATIONS}
1301                                 struct S { mediump mat3 a; };
1302                                 layout(location = 0) out S var;
1303                                 void main()
1304                                 {
1305                                         var.a = in0;
1306                                         ${VERTEX_OUTPUT}
1307                                 }
1308                         ""
1309                         fragment ""
1310                                 #version 310 es
1311                                 precision mediump float;
1312                                 ${FRAGMENT_DECLARATIONS}
1313                                 struct S { mediump mat3 a; };
1314                                 layout(location = 0) in S var;
1315                                 void main()
1316                                 {
1317                                         out0 = var.a;
1318                                         ${FRAGMENT_OUTPUT}
1319                                 }
1320                         ""
1321                 end
1322
1323                 case mat3x4
1324                         version 310 es
1325                         desc "varying of type mat3x4 inside struct"
1326                         values
1327                         {
1328                                 input mat3x4 in0        = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1329                                 output mat3x4 out0      = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1330                         }
1331                         vertex ""
1332                                 #version 310 es
1333                                 ${VERTEX_DECLARATIONS}
1334                                 struct S { mediump mat3x4 a; };
1335                                 layout(location = 0) out S var;
1336                                 void main()
1337                                 {
1338                                         var.a = in0;
1339                                         ${VERTEX_OUTPUT}
1340                                 }
1341                         ""
1342                         fragment ""
1343                                 #version 310 es
1344                                 precision mediump float;
1345                                 ${FRAGMENT_DECLARATIONS}
1346                                 struct S { mediump mat3x4 a; };
1347                                 layout(location = 0) in S var;
1348                                 void main()
1349                                 {
1350                                         out0 = var.a;
1351                                         ${FRAGMENT_OUTPUT}
1352                                 }
1353                         ""
1354                 end
1355
1356                 case mat4x2
1357                         version 310 es
1358                         desc "varying of type mat4x2 inside struct"
1359                         values
1360                         {
1361                                 input mat4x2 in0        = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1362                                 output mat4x2 out0      = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1363                         }
1364                         vertex ""
1365                                 #version 310 es
1366                                 ${VERTEX_DECLARATIONS}
1367                                 struct S { mediump mat4x2 a; };
1368                                 layout(location = 0) out S var;
1369                                 void main()
1370                                 {
1371                                         var.a = in0;
1372                                         ${VERTEX_OUTPUT}
1373                                 }
1374                         ""
1375                         fragment ""
1376                                 #version 310 es
1377                                 precision mediump float;
1378                                 ${FRAGMENT_DECLARATIONS}
1379                                 struct S { mediump mat4x2 a; };
1380                                 layout(location = 0) in S var;
1381                                 void main()
1382                                 {
1383                                         out0 = var.a;
1384                                         ${FRAGMENT_OUTPUT}
1385                                 }
1386                         ""
1387                 end
1388
1389                 case mat4x3
1390                         version 310 es
1391                         desc "varying of type mat4x3 inside struct"
1392                         values
1393                         {
1394                                 input mat4x3 in0        = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1395                                 output mat4x3 out0      = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1396                         }
1397                         vertex ""
1398                                 #version 310 es
1399                                 ${VERTEX_DECLARATIONS}
1400                                 struct S { mediump mat4x3 a; };
1401                                 layout(location = 0) out S var;
1402                                 void main()
1403                                 {
1404                                         var.a = in0;
1405                                         ${VERTEX_OUTPUT}
1406                                 }
1407                         ""
1408                         fragment ""
1409                                 #version 310 es
1410                                 precision mediump float;
1411                                 ${FRAGMENT_DECLARATIONS}
1412                                 struct S { mediump mat4x3 a; };
1413                                 layout(location = 0) in S var;
1414                                 void main()
1415                                 {
1416                                         out0 = var.a;
1417                                         ${FRAGMENT_OUTPUT}
1418                                 }
1419                         ""
1420                 end
1421
1422                 case mat4
1423                         version 310 es
1424                         desc "varying of type mat4 inside struct"
1425                         values
1426                         {
1427                                 input mat4 in0          = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
1428                                 output mat4 out0        = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
1429                         }
1430                         vertex ""
1431                                 #version 310 es
1432                                 ${VERTEX_DECLARATIONS}
1433                                 struct S { mediump mat4 a; };
1434                                 layout(location = 0) out S var;
1435                                 void main()
1436                                 {
1437                                         var.a = in0;
1438                                         ${VERTEX_OUTPUT}
1439                                 }
1440                         ""
1441                         fragment ""
1442                                 #version 310 es
1443                                 precision mediump float;
1444                                 ${FRAGMENT_DECLARATIONS}
1445                                 struct S { mediump mat4 a; };
1446                                 layout(location = 0) in S var;
1447                                 void main()
1448                                 {
1449                                         out0 = var.a;
1450                                         ${FRAGMENT_OUTPUT}
1451                                 }
1452                         ""
1453                 end
1454
1455                 case int
1456                         version 310 es
1457                         desc "varying of type int inside struct"
1458                         values
1459                         {
1460                                 input int in0           = [ -1 | -25 | 1 | 2 | 3 | 16 ];
1461                                 output int out0         = [ -1 | -25 | 1 | 2 | 3 | 16 ];
1462                         }
1463                         vertex ""
1464                                 #version 310 es
1465                                 ${VERTEX_DECLARATIONS}
1466                                 struct S { mediump int a; };
1467                                 layout(location = 0) flat out S var;
1468                                 void main()
1469                                 {
1470                                         ${VERTEX_SETUP}
1471                                         var.a = in0;
1472                                         ${VERTEX_OUTPUT}
1473                                 }
1474                         ""
1475                         fragment ""
1476                                 #version 310 es
1477                                 ${FRAGMENT_DECLARATIONS}
1478                                 struct S { mediump int a; };
1479                                 layout(location = 0) flat in S var;
1480                                 void main()
1481                                 {
1482                                         out0 = var.a;
1483                                         ${FRAGMENT_OUTPUT}
1484                                 }
1485                         ""
1486                 end
1487
1488                 case ivec2
1489                         version 310 es
1490                         desc "varying of type ivec2 inside struct"
1491                         values
1492                         {
1493                                 input ivec2 in0         = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
1494                                 output ivec2 out0       = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
1495                         }
1496                         vertex ""
1497                                 #version 310 es
1498                                 ${VERTEX_DECLARATIONS}
1499                                 struct S { mediump ivec2 a; };
1500                                 layout(location = 0) flat out S var;
1501                                 void main()
1502                                 {
1503                                         ${VERTEX_SETUP}
1504                                         var.a = in0;
1505                                         ${VERTEX_OUTPUT}
1506                                 }
1507                         ""
1508                         fragment ""
1509                                 #version 310 es
1510                                 ${FRAGMENT_DECLARATIONS}
1511                                 struct S { mediump ivec2 a; };
1512                                 layout(location = 0) flat in S var;
1513                                 void main()
1514                                 {
1515                                         out0 = var.a;
1516                                         ${FRAGMENT_OUTPUT}
1517                                 }
1518                         ""
1519                 end
1520
1521                 case ivec3
1522                         version 310 es
1523                         desc "varying of type ivec3 inside struct"
1524                         values
1525                         {
1526                                 input ivec3 in0         = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1527                                 output ivec3 out0       = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1528                         }
1529                         vertex ""
1530                                 #version 310 es
1531                                 ${VERTEX_DECLARATIONS}
1532                                 struct S { mediump ivec3 a; };
1533                                 layout(location = 0) flat out S var;
1534                                 void main()
1535                                 {
1536                                         ${VERTEX_SETUP}
1537                                         var.a = in0;
1538                                         ${VERTEX_OUTPUT}
1539                                 }
1540                         ""
1541                         fragment ""
1542                                 #version 310 es
1543                                 ${FRAGMENT_DECLARATIONS}
1544                                 struct S { mediump ivec3 a; };
1545                                 layout(location = 0) flat in S var;
1546                                 void main()
1547                                 {
1548                                         out0 = var.a;
1549                                         ${FRAGMENT_OUTPUT}
1550                                 }
1551                         ""
1552                 end
1553
1554                 case ivec4
1555                         version 310 es
1556                         desc "varying of type ivec4 inside struct"
1557                         values
1558                         {
1559                                 input ivec4 in0         = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
1560                                 output ivec4 out0       = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
1561                         }
1562                         vertex ""
1563                                 #version 310 es
1564                                 ${VERTEX_DECLARATIONS}
1565                                 struct S { mediump ivec4 a; };
1566                                 layout(location = 0) flat out S var;
1567                                 void main()
1568                                 {
1569                                         ${VERTEX_SETUP}
1570                                         var.a = in0;
1571                                         ${VERTEX_OUTPUT}
1572                                 }
1573                         ""
1574                         fragment ""
1575                                 #version 310 es
1576                                 ${FRAGMENT_DECLARATIONS}
1577                                 struct S { mediump ivec4 a; };
1578                                 layout(location = 0) flat in S var;
1579                                 void main()
1580                                 {
1581                                         out0 = var.a;
1582                                         ${FRAGMENT_OUTPUT}
1583                                 }
1584                         ""
1585                 end
1586
1587                 case uint
1588                         version 310 es
1589                         desc "varying of type uint in struct"
1590                         values
1591                         {
1592                                 input uint in0                  = [ 1 | 2 | 3 | 16 ];
1593                                 output uint out0                = [ 1 | 2 | 3 | 16 ];
1594                         }
1595                         vertex ""
1596                                 #version 310 es
1597                                 ${VERTEX_DECLARATIONS}
1598                                 struct S { mediump uint a; };
1599                                 layout(location = 0) flat out S var;
1600                                 void main()
1601                                 {
1602                                         ${VERTEX_SETUP}
1603                                         var.a = in0;
1604                                         ${VERTEX_OUTPUT}
1605                                 }
1606                         ""
1607                         fragment ""
1608                                 #version 310 es
1609                                 ${FRAGMENT_DECLARATIONS}
1610                                 struct S { mediump uint a; };
1611                                 layout(location = 0) flat in S var;
1612                                 void main()
1613                                 {
1614                                         out0 = var.a;
1615                                         ${FRAGMENT_OUTPUT}
1616                                 }
1617                         ""
1618                 end
1619
1620                 case uvec2
1621                         version 310 es
1622                         desc "varying of type uvec2 inside struct"
1623                         values
1624                         {
1625                                 input uvec2 in0         = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1626                                 output uvec2 out0       = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1627                         }
1628                         vertex ""
1629                                 #version 310 es
1630                                 ${VERTEX_DECLARATIONS}
1631                                 struct S { mediump uvec2 a; };
1632                                 layout(location = 0) flat out S var;
1633                                 void main()
1634                                 {
1635                                         ${VERTEX_SETUP}
1636                                         var.a = in0;
1637                                         ${VERTEX_OUTPUT}
1638                                 }
1639                         ""
1640                         fragment ""
1641                                 #version 310 es
1642                                 ${FRAGMENT_DECLARATIONS}
1643                                 struct S { mediump uvec2 a; };
1644                                 layout(location = 0) flat in S var;
1645                                 void main()
1646                                 {
1647                                         out0 = var.a;
1648                                         ${FRAGMENT_OUTPUT}
1649                                 }
1650                         ""
1651                 end
1652
1653                 case uvec3
1654                         version 310 es
1655                         desc "varying of type uvec3 inside struct"
1656                         values
1657                         {
1658                                 input uvec3 in0         = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1659                                 output uvec3 out0       = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1660                         }
1661                         vertex ""
1662                                 #version 310 es
1663                                 ${VERTEX_DECLARATIONS}
1664                                 struct S { mediump uvec3 a; };
1665                                 layout(location = 0) flat out S var;
1666                                 void main()
1667                                 {
1668                                         ${VERTEX_SETUP}
1669                                         var.a = in0;
1670                                         ${VERTEX_OUTPUT}
1671                                 }
1672                         ""
1673                         fragment ""
1674                                 #version 310 es
1675                                 ${FRAGMENT_DECLARATIONS}
1676                                 struct S { mediump uvec3 a; };
1677                                 layout(location = 0) flat in S var;
1678                                 void main()
1679                                 {
1680                                         out0 = var.a;
1681                                         ${FRAGMENT_OUTPUT}
1682                                 }
1683                         ""
1684                 end
1685
1686                 case uvec4
1687                         version 310 es
1688                         desc "varying of type uvec4 inside struct"
1689                         values
1690                         {
1691                                 input uvec4 in0         = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
1692                                 output uvec4 out0       = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
1693                         }
1694                         vertex ""
1695                                 #version 310 es
1696                                 ${VERTEX_DECLARATIONS}
1697                                 struct S { mediump uvec4 a; };
1698                                 layout(location = 0) flat out S var;
1699                                 void main()
1700                                 {
1701                                         ${VERTEX_SETUP}
1702                                         var.a = in0;
1703                                         ${VERTEX_OUTPUT}
1704                                 }
1705                         ""
1706                         fragment ""
1707                                 #version 310 es
1708                                 ${FRAGMENT_DECLARATIONS}
1709                                 struct S { mediump uvec4 a; };
1710                                 layout(location = 0) flat in S var;
1711                                 void main()
1712                                 {
1713                                         out0 = var.a;
1714                                         ${FRAGMENT_OUTPUT}
1715                                 }
1716                         ""
1717                 end
1718
1719                 case float_vec3
1720                         version 310 es
1721                         desc "varyings of type float and vec3 inside struct"
1722                         values
1723                         {
1724                                 input float in0         = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1725                                 output float out0       = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1726                                 input vec3 in1          = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1727                                 output vec3 out1        = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1728                         }
1729                         vertex ""
1730                                 #version 310 es
1731                                 ${VERTEX_DECLARATIONS}
1732                                 struct S { mediump float a; highp vec3 b; };
1733                                 layout(location = 0) out S var;
1734                                 void main()
1735                                 {
1736                                         var.a = in0;
1737                                         var.b = in1;
1738                                         ${VERTEX_OUTPUT}
1739                                 }
1740                         ""
1741                         fragment ""
1742                                 #version 310 es
1743                                 precision mediump float;
1744                                 ${FRAGMENT_DECLARATIONS}
1745                                 struct S { mediump float a; highp vec3 b; };
1746                                 layout(location = 0) in S var;
1747                                 void main()
1748                                 {
1749                                         out0 = var.a;
1750                                         out1 = var.b;
1751                                         ${FRAGMENT_OUTPUT}
1752                                 }
1753                         ""
1754                 end
1755
1756                 case float_uvec2_vec3
1757                         version 310 es
1758                         desc "varyings of type float and vec3 inside struct"
1759                         values
1760                         {
1761                                 input float in0         = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1762                                 output float out0       = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1763                                 input uvec2 in1         = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) | uvec2(8, 7) ];
1764                                 output uvec2 out1       = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) | uvec2(8, 7) ];
1765                                 input vec3 in2          = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1766                                 output vec3 out2        = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1767                         }
1768                         vertex ""
1769                                 #version 310 es
1770                                 ${VERTEX_DECLARATIONS}
1771                                 struct S { mediump float a; highp uvec2 b; highp vec3 c; };
1772                                 layout(location = 0) flat out S var;
1773                                 void main()
1774                                 {
1775                                         ${VERTEX_SETUP}
1776                                         var.a = in0;
1777                                         var.b = in1;
1778                                         var.c = in2;
1779                                         ${VERTEX_OUTPUT}
1780                                 }
1781                         ""
1782                         fragment ""
1783                                 #version 310 es
1784                                 precision mediump float;
1785                                 ${FRAGMENT_DECLARATIONS}
1786                                 struct S { mediump float a; highp uvec2 b; highp vec3 c; };
1787                                 layout(location = 0) flat in S var;
1788                                 void main()
1789                                 {
1790                                         out0 = var.a;
1791                                         out1 = var.b;
1792                                         out2 = var.c;
1793                                         ${FRAGMENT_OUTPUT}
1794                                 }
1795                         ""
1796                 end
1797         end
1798
1799         group interpolation "Varying interpolation modes"
1800                 case smooth
1801                         version 310 es
1802                         desc "varying of type vec4"
1803                         values
1804                         {
1805                                 input vec4 in0          = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1806                                 output vec4 out0        = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1807                         }
1808                         vertex ""
1809                                 #version 310 es
1810                                 ${VERTEX_DECLARATIONS}
1811                                 layout(location = 0) smooth out mediump vec4 var;
1812                                 void main()
1813                                 {
1814                                         var = in0;
1815                                         ${VERTEX_OUTPUT}
1816                                 }
1817                         ""
1818                         fragment ""
1819                                 #version 310 es
1820                                 precision mediump float;
1821                                 ${FRAGMENT_DECLARATIONS}
1822                                 layout(location = 0) smooth in vec4 var;
1823                                 void main()
1824                                 {
1825                                         out0 = var;
1826                                         ${FRAGMENT_OUTPUT}
1827                                 }
1828                         ""
1829                 end
1830
1831                 case centroid
1832                         version 310 es
1833                         desc "varying of type vec4"
1834                         values
1835                         {
1836                                 input vec4 in0          = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1837                                 output vec4 out0        = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1838                         }
1839                         vertex ""
1840                                 #version 310 es
1841                                 ${VERTEX_DECLARATIONS}
1842                                 layout(location = 0) centroid out mediump vec4 var;
1843                                 void main()
1844                                 {
1845                                         var = in0;
1846                                         ${VERTEX_OUTPUT}
1847                                 }
1848                         ""
1849                         fragment ""
1850                                 #version 310 es
1851                                 precision mediump float;
1852                                 ${FRAGMENT_DECLARATIONS}
1853                                 layout(location = 0) centroid in vec4 var;
1854                                 void main()
1855                                 {
1856                                         out0 = var;
1857                                         ${FRAGMENT_OUTPUT}
1858                                 }
1859                         ""
1860                 end
1861
1862                 case flat
1863                         version 310 es
1864                         desc "varying of type vec4"
1865                         values
1866                         {
1867                                 input vec4 in0          = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1868                                 output vec4 out0        = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1869                         }
1870                         vertex ""
1871                                 #version 310 es
1872                                 ${VERTEX_DECLARATIONS}
1873                                 layout(location = 0) flat out mediump vec4 var;
1874                                 void main()
1875                                 {
1876                                         var = in0;
1877                                         ${VERTEX_OUTPUT}
1878                                 }
1879                         ""
1880                         fragment ""
1881                                 #version 310 es
1882                                 precision mediump float;
1883                                 ${FRAGMENT_DECLARATIONS}
1884                                 layout(location = 0) flat in vec4 var;
1885                                 void main()
1886                                 {
1887                                         out0 = var;
1888                                         ${FRAGMENT_OUTPUT}
1889                                 }
1890                         ""
1891                 end
1892         end
1893
1894         group usage "Varying usage in shaders"
1895                 case readback_1
1896                         version 310 es
1897                         desc "read back (an already written) varying in the vertex shader"
1898                         values
1899                         {
1900                                 input float in0         = [ 1.0 | 0.0 | -2.0 | 10.0 ];
1901                                 output float out0       = [ 3.0 | 0.0 | -6.0 | 30.0 ];
1902                         }
1903                         vertex ""
1904                                 #version 310 es
1905                                 precision mediump float;
1906                                 ${VERTEX_DECLARATIONS}
1907                                 layout(location = 0) out float var1;
1908                                 layout(location = 1) out float var2;
1909
1910                                 void main()
1911                                 {
1912                                         var1 = in0;
1913                                         var2 = var1 + in0;
1914                                         ${VERTEX_OUTPUT}
1915                                 }
1916                         ""
1917                         fragment ""
1918                                 #version 310 es
1919                                 precision mediump float;
1920                                 ${FRAGMENT_DECLARATIONS}
1921                                 layout(location = 0) in float var1;
1922                                 layout(location = 1) in float var2;
1923
1924                                 void main()
1925                                 {
1926                                         out0 = var1 + var2;
1927                                         ${FRAGMENT_OUTPUT}
1928                                 }
1929                         ""
1930                 end
1931         end
1932 end