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