1
2group types "Types"
3	case float
4		version 310 es
5		desc "varying of type float"
6		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
7		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
8		values
9		{
10			input float in0		= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
11			output float out0	= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
12		}
13		vertex ""
14			#version 310 es
15			${VERTEX_DECLARATIONS}
16			out mediump float vtx_var;
17			void main()
18			{
19				vtx_var = in0;
20				${VERTEX_OUTPUT}
21			}
22		""
23		tessellation_control ""
24			#version 310 es
25			${TESSELLATION_CONTROL_DECLARATIONS}
26			in mediump float vtx_var[];
27			out mediump float tc_out[];
28			void main()
29			{
30				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
31				${TESSELLATION_CONTROL_OUTPUT}
32			}
33		""
34		tessellation_evaluation ""
35			#version 310 es
36			${TESSELLATION_EVALUATION_DECLARATIONS}
37			in mediump float tc_out[];
38			out mediump float te_out;
39			void main()
40			{
41				te_out = tc_out[2];
42				${TESSELLATION_EVALUATION_OUTPUT}
43			}
44		""
45		geometry ""
46			#version 310 es
47			${GEOMETRY_DECLARATIONS}
48			in mediump float te_out[];
49			out mediump float geo_out;
50			void main()
51			{
52				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
53				{
54					geo_out = te_out[ndx];
55					gl_Position = gl_in[ndx].gl_Position;
56					EmitVertex();
57				}
58			}
59		""
60		fragment ""
61			#version 310 es
62			precision mediump float;
63			${FRAGMENT_DECLARATIONS}
64			in mediump float geo_out;
65			void main()
66			{
67				out0 = geo_out;
68				${FRAGMENT_OUTPUT}
69			}
70		""
71	end
72
73	case vec2
74		version 310 es
75		desc "varying of type vec2"
76		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
77		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
78		values
79		{
80			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) ];
81			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) ];
82		}
83		vertex ""
84			#version 310 es
85			${VERTEX_DECLARATIONS}
86			out mediump vec2 vtx_var;
87			void main()
88			{
89				vtx_var = in0;
90				${VERTEX_OUTPUT}
91			}
92		""
93		tessellation_control ""
94			#version 310 es
95			${TESSELLATION_CONTROL_DECLARATIONS}
96			in mediump vec2 vtx_var[];
97			out mediump vec2 tc_out[];
98			void main()
99			{
100				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
101				${TESSELLATION_CONTROL_OUTPUT}
102			}
103		""
104		tessellation_evaluation ""
105			#version 310 es
106			${TESSELLATION_EVALUATION_DECLARATIONS}
107			in mediump vec2 tc_out[];
108			out mediump vec2 te_out;
109			void main()
110			{
111				te_out = tc_out[2];
112				${TESSELLATION_EVALUATION_OUTPUT}
113			}
114		""
115		geometry ""
116			#version 310 es
117			${GEOMETRY_DECLARATIONS}
118			in mediump vec2 te_out[];
119			out mediump vec2 geo_out;
120			void main()
121			{
122				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
123				{
124					geo_out = te_out[ndx];
125					gl_Position = gl_in[ndx].gl_Position;
126					EmitVertex();
127				}
128			}
129		""
130		fragment ""
131			#version 310 es
132			precision mediump float;
133			${FRAGMENT_DECLARATIONS}
134			in vec2 geo_out;
135			void main()
136			{
137				out0 = geo_out;
138				${FRAGMENT_OUTPUT}
139			}
140		""
141	end
142
143	case vec3
144		version 310 es
145		desc "varying of type vec3"
146		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
147		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
148		values
149		{
150			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) ];
151			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) ];
152		}
153		vertex ""
154			#version 310 es
155			${VERTEX_DECLARATIONS}
156			out mediump vec3 vtx_var;
157			void main()
158			{
159				vtx_var = in0;
160				${VERTEX_OUTPUT}
161			}
162		""
163		tessellation_control ""
164			#version 310 es
165			${TESSELLATION_CONTROL_DECLARATIONS}
166			in mediump vec3 vtx_var[];
167			out mediump vec3 tc_out[];
168			void main()
169			{
170				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
171				${TESSELLATION_CONTROL_OUTPUT}
172			}
173		""
174		tessellation_evaluation ""
175			#version 310 es
176			${TESSELLATION_EVALUATION_DECLARATIONS}
177			in mediump vec3 tc_out[];
178			out mediump vec3 te_out;
179			void main()
180			{
181				te_out = tc_out[2];
182				${TESSELLATION_EVALUATION_OUTPUT}
183			}
184		""
185		geometry ""
186			#version 310 es
187			${GEOMETRY_DECLARATIONS}
188			in mediump vec3 te_out[];
189			out mediump vec3 geo_out;
190			void main()
191			{
192				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
193				{
194					geo_out = te_out[ndx];
195					gl_Position = gl_in[ndx].gl_Position;
196					EmitVertex();
197				}
198			}
199		""
200		fragment ""
201			#version 310 es
202			precision mediump float;
203			${FRAGMENT_DECLARATIONS}
204			in vec3 geo_out;
205			void main()
206			{
207				out0 = geo_out;
208				${FRAGMENT_OUTPUT}
209			}
210		""
211	end
212
213	case vec4
214		version 310 es
215		desc "varying of type vec4"
216		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
217		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
218		values
219		{
220			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) ];
221			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) ];
222		}
223		vertex ""
224			#version 310 es
225			${VERTEX_DECLARATIONS}
226			out mediump vec4 vtx_var;
227			void main()
228			{
229				vtx_var = in0;
230				${VERTEX_OUTPUT}
231			}
232		""
233		tessellation_control ""
234			#version 310 es
235			${TESSELLATION_CONTROL_DECLARATIONS}
236			in mediump vec4 vtx_var[];
237			out mediump vec4 tc_out[];
238			void main()
239			{
240				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
241				${TESSELLATION_CONTROL_OUTPUT}
242			}
243		""
244		tessellation_evaluation ""
245			#version 310 es
246			${TESSELLATION_EVALUATION_DECLARATIONS}
247			in mediump vec4 tc_out[];
248			out mediump vec4 te_out;
249			void main()
250			{
251				te_out = tc_out[2];
252				${TESSELLATION_EVALUATION_OUTPUT}
253			}
254		""
255		geometry ""
256			#version 310 es
257			${GEOMETRY_DECLARATIONS}
258			in mediump vec4 te_out[];
259			out mediump vec4 geo_out;
260			void main()
261			{
262				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
263				{
264					geo_out = te_out[ndx];
265					gl_Position = gl_in[ndx].gl_Position;
266					EmitVertex();
267				}
268			}
269		""
270		fragment ""
271			#version 310 es
272			precision mediump float;
273			${FRAGMENT_DECLARATIONS}
274			in vec4 geo_out;
275			void main()
276			{
277				out0 = geo_out;
278				${FRAGMENT_OUTPUT}
279			}
280		""
281	end
282
283	case mat2
284		version 310 es
285		desc "varying of type mat2"
286		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
287		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
288		values
289		{
290			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) ];
291			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) ];
292		}
293		vertex ""
294			#version 310 es
295			${VERTEX_DECLARATIONS}
296			out mediump mat2 vtx_var;
297			void main()
298			{
299				vtx_var = in0;
300				${VERTEX_OUTPUT}
301			}
302		""
303		tessellation_control ""
304			#version 310 es
305			${TESSELLATION_CONTROL_DECLARATIONS}
306			in mediump mat2 vtx_var[];
307			out mediump mat2 tc_out[];
308			void main()
309			{
310				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
311				${TESSELLATION_CONTROL_OUTPUT}
312			}
313		""
314		tessellation_evaluation ""
315			#version 310 es
316			${TESSELLATION_EVALUATION_DECLARATIONS}
317			in mediump mat2 tc_out[];
318			out mediump mat2 te_out;
319			void main()
320			{
321				te_out = tc_out[2];
322				${TESSELLATION_EVALUATION_OUTPUT}
323			}
324		""
325		geometry ""
326			#version 310 es
327			${GEOMETRY_DECLARATIONS}
328			in mediump mat2 te_out[];
329			out mediump mat2 geo_out;
330			void main()
331			{
332				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
333				{
334					geo_out = te_out[ndx];
335					gl_Position = gl_in[ndx].gl_Position;
336					EmitVertex();
337				}
338			}
339		""
340		fragment ""
341			#version 310 es
342			precision mediump float;
343			${FRAGMENT_DECLARATIONS}
344			in mat2 geo_out;
345			void main()
346			{
347				out0 = geo_out;
348				${FRAGMENT_OUTPUT}
349			}
350		""
351	end
352
353	case mat2x3
354		version 310 es
355		desc "varying of type mat2x3"
356		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
357		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
358		values
359		{
360			input mat2x3 in0	= [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
361			output mat2x3 out0	= [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
362		}
363		vertex ""
364			#version 310 es
365			${VERTEX_DECLARATIONS}
366			out mediump mat2x3 vtx_var;
367			void main()
368			{
369				vtx_var = in0;
370				${VERTEX_OUTPUT}
371			}
372		""
373		tessellation_control ""
374			#version 310 es
375			${TESSELLATION_CONTROL_DECLARATIONS}
376			in mediump mat2x3 vtx_var[];
377			out mediump mat2x3 tc_out[];
378			void main()
379			{
380				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
381				${TESSELLATION_CONTROL_OUTPUT}
382			}
383		""
384		tessellation_evaluation ""
385			#version 310 es
386			${TESSELLATION_EVALUATION_DECLARATIONS}
387			in mediump mat2x3 tc_out[];
388			out mediump mat2x3 te_out;
389			void main()
390			{
391				te_out = tc_out[2];
392				${TESSELLATION_EVALUATION_OUTPUT}
393			}
394		""
395		geometry ""
396			#version 310 es
397			${GEOMETRY_DECLARATIONS}
398			in mediump mat2x3 te_out[];
399			out mediump mat2x3 geo_out;
400			void main()
401			{
402				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
403				{
404					geo_out = te_out[ndx];
405					gl_Position = gl_in[ndx].gl_Position;
406					EmitVertex();
407				}
408			}
409		""
410		fragment ""
411			#version 310 es
412			precision mediump float;
413			${FRAGMENT_DECLARATIONS}
414			in mat2x3 geo_out;
415			void main()
416			{
417				out0 = geo_out;
418				${FRAGMENT_OUTPUT}
419			}
420		""
421	end
422
423	case mat2x4
424		version 310 es
425		desc "varying of type mat2x4"
426		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
427		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
428		values
429		{
430			input mat2x4 in0	= [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
431			output mat2x4 out0	= [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
432		}
433		vertex ""
434			#version 310 es
435			${VERTEX_DECLARATIONS}
436			out mediump mat2x4 vtx_var;
437			void main()
438			{
439				vtx_var = in0;
440				${VERTEX_OUTPUT}
441			}
442		""
443		tessellation_control ""
444			#version 310 es
445			${TESSELLATION_CONTROL_DECLARATIONS}
446			in mediump mat2x4 vtx_var[];
447			out mediump mat2x4 tc_out[];
448			void main()
449			{
450				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
451				${TESSELLATION_CONTROL_OUTPUT}
452			}
453		""
454		tessellation_evaluation ""
455			#version 310 es
456			${TESSELLATION_EVALUATION_DECLARATIONS}
457			in mediump mat2x4 tc_out[];
458			out mediump mat2x4 te_out;
459			void main()
460			{
461				te_out = tc_out[2];
462				${TESSELLATION_EVALUATION_OUTPUT}
463			}
464		""
465		geometry ""
466			#version 310 es
467			${GEOMETRY_DECLARATIONS}
468			in mediump mat2x4 te_out[];
469			out mediump mat2x4 geo_out;
470			void main()
471			{
472				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
473				{
474					geo_out = te_out[ndx];
475					gl_Position = gl_in[ndx].gl_Position;
476					EmitVertex();
477				}
478			}
479		""
480		fragment ""
481			#version 310 es
482			precision mediump float;
483			${FRAGMENT_DECLARATIONS}
484			in mat2x4 geo_out;
485			void main()
486			{
487				out0 = geo_out;
488				${FRAGMENT_OUTPUT}
489			}
490		""
491	end
492
493	case mat3x2
494		version 310 es
495		desc "varying of type mat3x2"
496		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
497		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
498		values
499		{
500			input mat3x2 in0	= [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
501			output mat3x2 out0	= [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
502		}
503		vertex ""
504			#version 310 es
505			${VERTEX_DECLARATIONS}
506			out mediump mat3x2 vtx_var;
507			void main()
508			{
509				vtx_var = in0;
510				${VERTEX_OUTPUT}
511			}
512		""
513		tessellation_control ""
514			#version 310 es
515			${TESSELLATION_CONTROL_DECLARATIONS}
516			in mediump mat3x2 vtx_var[];
517			out mediump mat3x2 tc_out[];
518			void main()
519			{
520				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
521				${TESSELLATION_CONTROL_OUTPUT}
522			}
523		""
524		tessellation_evaluation ""
525			#version 310 es
526			${TESSELLATION_EVALUATION_DECLARATIONS}
527			in mediump mat3x2 tc_out[];
528			out mediump mat3x2 te_out;
529			void main()
530			{
531				te_out = tc_out[2];
532				${TESSELLATION_EVALUATION_OUTPUT}
533			}
534		""
535		geometry ""
536			#version 310 es
537			${GEOMETRY_DECLARATIONS}
538			in mediump mat3x2 te_out[];
539			out mediump mat3x2 geo_out;
540			void main()
541			{
542				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
543				{
544					geo_out = te_out[ndx];
545					gl_Position = gl_in[ndx].gl_Position;
546					EmitVertex();
547				}
548			}
549		""
550		fragment ""
551			#version 310 es
552			precision mediump float;
553			${FRAGMENT_DECLARATIONS}
554			in mat3x2 geo_out;
555			void main()
556			{
557				out0 = geo_out;
558				${FRAGMENT_OUTPUT}
559			}
560		""
561	end
562
563	case mat3
564		version 310 es
565		desc "varying of type mat3"
566		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
567		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
568		values
569		{
570			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) ];
571			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) ];
572		}
573		vertex ""
574			#version 310 es
575			${VERTEX_DECLARATIONS}
576			out mediump mat3 vtx_var;
577			void main()
578			{
579				vtx_var = in0;
580				${VERTEX_OUTPUT}
581			}
582		""
583		tessellation_control ""
584			#version 310 es
585			${TESSELLATION_CONTROL_DECLARATIONS}
586			in mediump mat3 vtx_var[];
587			out mediump mat3 tc_out[];
588			void main()
589			{
590				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
591				${TESSELLATION_CONTROL_OUTPUT}
592			}
593		""
594		tessellation_evaluation ""
595			#version 310 es
596			${TESSELLATION_EVALUATION_DECLARATIONS}
597			in mediump mat3 tc_out[];
598			out mediump mat3 te_out;
599			void main()
600			{
601				te_out = tc_out[2];
602				${TESSELLATION_EVALUATION_OUTPUT}
603			}
604		""
605		geometry ""
606			#version 310 es
607			${GEOMETRY_DECLARATIONS}
608			in mediump mat3 te_out[];
609			out mediump mat3 geo_out;
610			void main()
611			{
612				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
613				{
614					geo_out = te_out[ndx];
615					gl_Position = gl_in[ndx].gl_Position;
616					EmitVertex();
617				}
618			}
619		""
620		fragment ""
621			#version 310 es
622			precision mediump float;
623			${FRAGMENT_DECLARATIONS}
624			in mat3 geo_out;
625			void main()
626			{
627				out0 = geo_out;
628				${FRAGMENT_OUTPUT}
629			}
630		""
631	end
632
633	case mat3x4
634		version 310 es
635		desc "varying of type mat3x4"
636		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
637		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
638		values
639		{
640			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) ];
641			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) ];
642		}
643		vertex ""
644			#version 310 es
645			${VERTEX_DECLARATIONS}
646			out mediump mat3x4 vtx_var;
647			void main()
648			{
649				vtx_var = in0;
650				${VERTEX_OUTPUT}
651			}
652		""
653		tessellation_control ""
654			#version 310 es
655			${TESSELLATION_CONTROL_DECLARATIONS}
656			in mediump mat3x4 vtx_var[];
657			out mediump mat3x4 tc_out[];
658			void main()
659			{
660				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
661				${TESSELLATION_CONTROL_OUTPUT}
662			}
663		""
664		tessellation_evaluation ""
665			#version 310 es
666			${TESSELLATION_EVALUATION_DECLARATIONS}
667			in mediump mat3x4 tc_out[];
668			out mediump mat3x4 te_out;
669			void main()
670			{
671				te_out = tc_out[2];
672				${TESSELLATION_EVALUATION_OUTPUT}
673			}
674		""
675		geometry ""
676			#version 310 es
677			${GEOMETRY_DECLARATIONS}
678			in mediump mat3x4 te_out[];
679			out mediump mat3x4 geo_out;
680			void main()
681			{
682				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
683				{
684					geo_out = te_out[ndx];
685					gl_Position = gl_in[ndx].gl_Position;
686					EmitVertex();
687				}
688			}
689		""
690		fragment ""
691			#version 310 es
692			precision mediump float;
693			${FRAGMENT_DECLARATIONS}
694			in mat3x4 geo_out;
695			void main()
696			{
697				out0 = geo_out;
698				${FRAGMENT_OUTPUT}
699			}
700		""
701	end
702
703	case mat4x2
704		version 310 es
705		desc "varying of type mat4x2"
706		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
707		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
708		values
709		{
710			input mat4x2 in0	= [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
711			output mat4x2 out0	= [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
712		}
713		vertex ""
714			#version 310 es
715			${VERTEX_DECLARATIONS}
716			out mediump mat4x2 vtx_var;
717			void main()
718			{
719				vtx_var = in0;
720				${VERTEX_OUTPUT}
721			}
722		""
723		tessellation_control ""
724			#version 310 es
725			${TESSELLATION_CONTROL_DECLARATIONS}
726			in mediump mat4x2 vtx_var[];
727			out mediump mat4x2 tc_out[];
728			void main()
729			{
730				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
731				${TESSELLATION_CONTROL_OUTPUT}
732			}
733		""
734		tessellation_evaluation ""
735			#version 310 es
736			${TESSELLATION_EVALUATION_DECLARATIONS}
737			in mediump mat4x2 tc_out[];
738			out mediump mat4x2 te_out;
739			void main()
740			{
741				te_out = tc_out[2];
742				${TESSELLATION_EVALUATION_OUTPUT}
743			}
744		""
745		geometry ""
746			#version 310 es
747			${GEOMETRY_DECLARATIONS}
748			in mediump mat4x2 te_out[];
749			out mediump mat4x2 geo_out;
750			void main()
751			{
752				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
753				{
754					geo_out = te_out[ndx];
755					gl_Position = gl_in[ndx].gl_Position;
756					EmitVertex();
757				}
758			}
759		""
760		fragment ""
761			#version 310 es
762			precision mediump float;
763			${FRAGMENT_DECLARATIONS}
764			in mat4x2 geo_out;
765			void main()
766			{
767				out0 = geo_out;
768				${FRAGMENT_OUTPUT}
769			}
770		""
771	end
772
773	case mat4x3
774		version 310 es
775		desc "varying of type mat4x3"
776		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
777		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
778		values
779		{
780			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) ];
781			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) ];
782		}
783		vertex ""
784			#version 310 es
785			${VERTEX_DECLARATIONS}
786			out mediump mat4x3 vtx_var;
787			void main()
788			{
789				vtx_var = in0;
790				${VERTEX_OUTPUT}
791			}
792		""
793		tessellation_control ""
794			#version 310 es
795			${TESSELLATION_CONTROL_DECLARATIONS}
796			in mediump mat4x3 vtx_var[];
797			out mediump mat4x3 tc_out[];
798			void main()
799			{
800				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
801				${TESSELLATION_CONTROL_OUTPUT}
802			}
803		""
804		tessellation_evaluation ""
805			#version 310 es
806			${TESSELLATION_EVALUATION_DECLARATIONS}
807			in mediump mat4x3 tc_out[];
808			out mediump mat4x3 te_out;
809			void main()
810			{
811				te_out = tc_out[2];
812				${TESSELLATION_EVALUATION_OUTPUT}
813			}
814		""
815		geometry ""
816			#version 310 es
817			${GEOMETRY_DECLARATIONS}
818			in mediump mat4x3 te_out[];
819			out mediump mat4x3 geo_out;
820			void main()
821			{
822				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
823				{
824					geo_out = te_out[ndx];
825					gl_Position = gl_in[ndx].gl_Position;
826					EmitVertex();
827				}
828			}
829		""
830		fragment ""
831			#version 310 es
832			precision mediump float;
833			${FRAGMENT_DECLARATIONS}
834			in mat4x3 geo_out;
835			void main()
836			{
837				out0 = geo_out;
838				${FRAGMENT_OUTPUT}
839			}
840		""
841	end
842
843	case mat4
844		version 310 es
845		desc "varying of type mat4"
846		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
847		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
848		values
849		{
850			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) ];
851			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) ];
852		}
853		vertex ""
854			#version 310 es
855			${VERTEX_DECLARATIONS}
856			out mediump mat4 vtx_var;
857			void main()
858			{
859				vtx_var = in0;
860				${VERTEX_OUTPUT}
861			}
862		""
863		tessellation_control ""
864			#version 310 es
865			${TESSELLATION_CONTROL_DECLARATIONS}
866			in mediump mat4 vtx_var[];
867			out mediump mat4 tc_out[];
868			void main()
869			{
870				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
871				${TESSELLATION_CONTROL_OUTPUT}
872			}
873		""
874		tessellation_evaluation ""
875			#version 310 es
876			${TESSELLATION_EVALUATION_DECLARATIONS}
877			in mediump mat4 tc_out[];
878			out mediump mat4 te_out;
879			void main()
880			{
881				te_out = tc_out[2];
882				${TESSELLATION_EVALUATION_OUTPUT}
883			}
884		""
885		geometry ""
886			#version 310 es
887			${GEOMETRY_DECLARATIONS}
888			in mediump mat4 te_out[];
889			out mediump mat4 geo_out;
890			void main()
891			{
892				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
893				{
894					geo_out = te_out[ndx];
895					gl_Position = gl_in[ndx].gl_Position;
896					EmitVertex();
897				}
898			}
899		""
900		fragment ""
901			#version 310 es
902			precision mediump float;
903			${FRAGMENT_DECLARATIONS}
904			in mat4 geo_out;
905			void main()
906			{
907				out0 = geo_out;
908				${FRAGMENT_OUTPUT}
909			}
910		""
911	end
912
913	case int
914		version 310 es
915		desc "varying of type int"
916		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
917		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
918		values
919		{
920			input int in0		= [ -1 | -25 | 1 | 2 | 3 | 16 ];
921			output int out0		= [ -1 | -25 | 1 | 2 | 3 | 16 ];
922		}
923		vertex ""
924			#version 310 es
925			${VERTEX_DECLARATIONS}
926			flat out mediump int vtx_var;
927			void main()
928			{
929				${VERTEX_SETUP}
930				vtx_var = in0;
931				${VERTEX_OUTPUT}
932			}
933		""
934		tessellation_control ""
935			#version 310 es
936			${TESSELLATION_CONTROL_DECLARATIONS}
937			flat in mediump int vtx_var[];
938			flat out mediump int tc_out[];
939			void main()
940			{
941				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
942				${TESSELLATION_CONTROL_OUTPUT}
943			}
944		""
945		tessellation_evaluation ""
946			#version 310 es
947			${TESSELLATION_EVALUATION_DECLARATIONS}
948			flat in mediump int tc_out[];
949			flat out mediump int te_out;
950			void main()
951			{
952				te_out = tc_out[2];
953				${TESSELLATION_EVALUATION_OUTPUT}
954			}
955		""
956		geometry ""
957			#version 310 es
958			${GEOMETRY_DECLARATIONS}
959			flat in mediump int te_out[];
960			flat out mediump int geo_out;
961			void main()
962			{
963				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
964				{
965					geo_out = te_out[ndx];
966					gl_Position = gl_in[ndx].gl_Position;
967					EmitVertex();
968				}
969			}
970		""
971		fragment ""
972			#version 310 es
973			${FRAGMENT_DECLARATIONS}
974			flat in int geo_out;
975			void main()
976			{
977				out0 = geo_out;
978				${FRAGMENT_OUTPUT}
979			}
980		""
981	end
982
983	case ivec2
984		version 310 es
985		desc "varying of type ivec2"
986		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
987		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
988		values
989		{
990			input ivec2 in0		= [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
991			output ivec2 out0	= [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
992		}
993		vertex ""
994			#version 310 es
995			${VERTEX_DECLARATIONS}
996			flat out mediump ivec2 vtx_var;
997			void main()
998			{
999				${VERTEX_SETUP}
1000				vtx_var = in0;
1001				${VERTEX_OUTPUT}
1002			}
1003		""
1004		tessellation_control ""
1005			#version 310 es
1006			${TESSELLATION_CONTROL_DECLARATIONS}
1007			flat in mediump ivec2 vtx_var[];
1008			flat out mediump ivec2 tc_out[];
1009			void main()
1010			{
1011				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
1012				${TESSELLATION_CONTROL_OUTPUT}
1013			}
1014		""
1015		tessellation_evaluation ""
1016			#version 310 es
1017			${TESSELLATION_EVALUATION_DECLARATIONS}
1018			flat in mediump ivec2 tc_out[];
1019			flat out mediump ivec2 te_out;
1020			void main()
1021			{
1022				te_out = tc_out[2];
1023				${TESSELLATION_EVALUATION_OUTPUT}
1024			}
1025		""
1026		geometry ""
1027			#version 310 es
1028			${GEOMETRY_DECLARATIONS}
1029			flat in mediump ivec2 te_out[];
1030			flat out mediump ivec2 geo_out;
1031			void main()
1032			{
1033				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1034				{
1035					geo_out = te_out[ndx];
1036					gl_Position = gl_in[ndx].gl_Position;
1037					EmitVertex();
1038				}
1039			}
1040		""
1041		fragment ""
1042			#version 310 es
1043			${FRAGMENT_DECLARATIONS}
1044			flat in ivec2 geo_out;
1045			void main()
1046			{
1047				out0 = geo_out;
1048				${FRAGMENT_OUTPUT}
1049			}
1050		""
1051	end
1052
1053	case ivec3
1054		version 310 es
1055		desc "varying of type ivec3"
1056		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1057		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1058		values
1059		{
1060			input ivec3 in0		= [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1061			output ivec3 out0	= [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1062		}
1063		vertex ""
1064			#version 310 es
1065			${VERTEX_DECLARATIONS}
1066			flat out mediump ivec3 vtx_var;
1067			void main()
1068			{
1069				${VERTEX_SETUP}
1070				vtx_var = in0;
1071				${VERTEX_OUTPUT}
1072			}
1073		""
1074		tessellation_control ""
1075			#version 310 es
1076			${TESSELLATION_CONTROL_DECLARATIONS}
1077			flat in mediump ivec3 vtx_var[];
1078			flat out mediump ivec3 tc_out[];
1079			void main()
1080			{
1081				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
1082				${TESSELLATION_CONTROL_OUTPUT}
1083			}
1084		""
1085		tessellation_evaluation ""
1086			#version 310 es
1087			${TESSELLATION_EVALUATION_DECLARATIONS}
1088			flat in mediump ivec3 tc_out[];
1089			flat out mediump ivec3 te_out;
1090			void main()
1091			{
1092				te_out = tc_out[2];
1093				${TESSELLATION_EVALUATION_OUTPUT}
1094			}
1095		""
1096		geometry ""
1097			#version 310 es
1098			${GEOMETRY_DECLARATIONS}
1099			flat in mediump ivec3 te_out[];
1100			flat out mediump ivec3 geo_out;
1101			void main()
1102			{
1103				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1104				{
1105					geo_out = te_out[ndx];
1106					gl_Position = gl_in[ndx].gl_Position;
1107					EmitVertex();
1108				}
1109			}
1110		""
1111		fragment ""
1112			#version 310 es
1113			${FRAGMENT_DECLARATIONS}
1114			flat in ivec3 geo_out;
1115			void main()
1116			{
1117				out0 = geo_out;
1118				${FRAGMENT_OUTPUT}
1119			}
1120		""
1121	end
1122
1123	case ivec4
1124		version 310 es
1125		desc "varying of type ivec4"
1126		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1127		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1128		values
1129		{
1130			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) ];
1131			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) ];
1132		}
1133		vertex ""
1134			#version 310 es
1135			${VERTEX_DECLARATIONS}
1136			flat out mediump ivec4 vtx_var;
1137			void main()
1138			{
1139				${VERTEX_SETUP}
1140				vtx_var = in0;
1141				${VERTEX_OUTPUT}
1142			}
1143		""
1144		tessellation_control ""
1145			#version 310 es
1146			${TESSELLATION_CONTROL_DECLARATIONS}
1147			flat in mediump ivec4 vtx_var[];
1148			flat out mediump ivec4 tc_out[];
1149			void main()
1150			{
1151				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
1152				${TESSELLATION_CONTROL_OUTPUT}
1153			}
1154		""
1155		tessellation_evaluation ""
1156			#version 310 es
1157			${TESSELLATION_EVALUATION_DECLARATIONS}
1158			flat in mediump ivec4 tc_out[];
1159			flat out mediump ivec4 te_out;
1160			void main()
1161			{
1162				te_out = tc_out[2];
1163				${TESSELLATION_EVALUATION_OUTPUT}
1164			}
1165		""
1166		geometry ""
1167			#version 310 es
1168			${GEOMETRY_DECLARATIONS}
1169			flat in mediump ivec4 te_out[];
1170			flat out mediump ivec4 geo_out;
1171			void main()
1172			{
1173				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1174				{
1175					geo_out = te_out[ndx];
1176					gl_Position = gl_in[ndx].gl_Position;
1177					EmitVertex();
1178				}
1179			}
1180		""
1181		fragment ""
1182			#version 310 es
1183			${FRAGMENT_DECLARATIONS}
1184			flat in ivec4 geo_out;
1185			void main()
1186			{
1187				out0 = geo_out;
1188				${FRAGMENT_OUTPUT}
1189			}
1190		""
1191	end
1192
1193	case uint
1194		version 310 es
1195		desc "varying of type int"
1196		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1197		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1198		values
1199		{
1200			input uint in0			= [ 1 | 2 | 3 | 16 ];
1201			output uint out0		= [ 1 | 2 | 3 | 16 ];
1202		}
1203		vertex ""
1204			#version 310 es
1205			${VERTEX_DECLARATIONS}
1206			flat out mediump uint vtx_var;
1207			void main()
1208			{
1209				${VERTEX_SETUP}
1210				vtx_var = in0;
1211				${VERTEX_OUTPUT}
1212			}
1213		""
1214		tessellation_control ""
1215			#version 310 es
1216			${TESSELLATION_CONTROL_DECLARATIONS}
1217			flat in mediump uint vtx_var[];
1218			flat out mediump uint tc_out[];
1219			void main()
1220			{
1221				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
1222				${TESSELLATION_CONTROL_OUTPUT}
1223			}
1224		""
1225		tessellation_evaluation ""
1226			#version 310 es
1227			${TESSELLATION_EVALUATION_DECLARATIONS}
1228			flat in mediump uint tc_out[];
1229			flat out mediump uint te_out;
1230			void main()
1231			{
1232				te_out = tc_out[2];
1233				${TESSELLATION_EVALUATION_OUTPUT}
1234			}
1235		""
1236		geometry ""
1237			#version 310 es
1238			${GEOMETRY_DECLARATIONS}
1239			flat in mediump uint te_out[];
1240			flat out mediump uint geo_out;
1241			void main()
1242			{
1243				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1244				{
1245					geo_out = te_out[ndx];
1246					gl_Position = gl_in[ndx].gl_Position;
1247					EmitVertex();
1248				}
1249			}
1250		""
1251		fragment ""
1252			#version 310 es
1253			${FRAGMENT_DECLARATIONS}
1254			flat in uint geo_out;
1255			void main()
1256			{
1257				out0 = geo_out;
1258				${FRAGMENT_OUTPUT}
1259			}
1260		""
1261	end
1262
1263	case uvec2
1264		version 310 es
1265		desc "varying of type uvec2"
1266		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1267		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1268		values
1269		{
1270			input uvec2 in0		= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1271			output uvec2 out0	= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1272		}
1273		vertex ""
1274			#version 310 es
1275			${VERTEX_DECLARATIONS}
1276			flat out mediump uvec2 vtx_var;
1277			void main()
1278			{
1279				${VERTEX_SETUP}
1280				vtx_var = in0;
1281				${VERTEX_OUTPUT}
1282			}
1283		""
1284		tessellation_control ""
1285			#version 310 es
1286			${TESSELLATION_CONTROL_DECLARATIONS}
1287			flat in mediump uvec2 vtx_var[];
1288			flat out mediump uvec2 tc_out[];
1289			void main()
1290			{
1291				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
1292				${TESSELLATION_CONTROL_OUTPUT}
1293			}
1294		""
1295		tessellation_evaluation ""
1296			#version 310 es
1297			${TESSELLATION_EVALUATION_DECLARATIONS}
1298			flat in mediump uvec2 tc_out[];
1299			flat out mediump uvec2 te_out;
1300			void main()
1301			{
1302				te_out = tc_out[2];
1303				${TESSELLATION_EVALUATION_OUTPUT}
1304			}
1305		""
1306		geometry ""
1307			#version 310 es
1308			${GEOMETRY_DECLARATIONS}
1309			flat in mediump uvec2 te_out[];
1310			flat out mediump uvec2 geo_out;
1311			void main()
1312			{
1313				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1314				{
1315					geo_out = te_out[ndx];
1316					gl_Position = gl_in[ndx].gl_Position;
1317					EmitVertex();
1318				}
1319			}
1320		""
1321		fragment ""
1322			#version 310 es
1323			${FRAGMENT_DECLARATIONS}
1324			flat in uvec2 geo_out;
1325			void main()
1326			{
1327				out0 = geo_out;
1328				${FRAGMENT_OUTPUT}
1329			}
1330		""
1331	end
1332
1333	case uvec3
1334		version 310 es
1335		desc "varying of type uvec3"
1336		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1337		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1338		values
1339		{
1340			input uvec3 in0		= [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1341			output uvec3 out0	= [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1342		}
1343		vertex ""
1344			#version 310 es
1345			${VERTEX_DECLARATIONS}
1346			flat out mediump uvec3 vtx_var;
1347			void main()
1348			{
1349				${VERTEX_SETUP}
1350				vtx_var = in0;
1351				${VERTEX_OUTPUT}
1352			}
1353		""
1354		tessellation_control ""
1355			#version 310 es
1356			${TESSELLATION_CONTROL_DECLARATIONS}
1357			flat in mediump uvec3 vtx_var[];
1358			flat out mediump uvec3 tc_out[];
1359			void main()
1360			{
1361				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
1362				${TESSELLATION_CONTROL_OUTPUT}
1363			}
1364		""
1365		tessellation_evaluation ""
1366			#version 310 es
1367			${TESSELLATION_EVALUATION_DECLARATIONS}
1368			flat in mediump uvec3 tc_out[];
1369			flat out mediump uvec3 te_out;
1370			void main()
1371			{
1372				te_out = tc_out[2];
1373				${TESSELLATION_EVALUATION_OUTPUT}
1374			}
1375		""
1376		geometry ""
1377			#version 310 es
1378			${GEOMETRY_DECLARATIONS}
1379			flat in mediump uvec3 te_out[];
1380			flat out mediump uvec3 geo_out;
1381			void main()
1382			{
1383				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1384				{
1385					geo_out = te_out[ndx];
1386					gl_Position = gl_in[ndx].gl_Position;
1387					EmitVertex();
1388				}
1389			}
1390		""
1391		fragment ""
1392			#version 310 es
1393			${FRAGMENT_DECLARATIONS}
1394			flat in uvec3 geo_out;
1395			void main()
1396			{
1397				out0 = geo_out;
1398				${FRAGMENT_OUTPUT}
1399			}
1400		""
1401	end
1402
1403	case uvec4
1404		version 310 es
1405		desc "varying of type uvec4"
1406		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1407		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1408		values
1409		{
1410			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) ];
1411			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) ];
1412		}
1413		vertex ""
1414			#version 310 es
1415			${VERTEX_DECLARATIONS}
1416			flat out mediump uvec4 vtx_var;
1417			void main()
1418			{
1419				${VERTEX_SETUP}
1420				vtx_var = in0;
1421				${VERTEX_OUTPUT}
1422			}
1423		""
1424		tessellation_control ""
1425			#version 310 es
1426			${TESSELLATION_CONTROL_DECLARATIONS}
1427			flat in mediump uvec4 vtx_var[];
1428			flat out mediump uvec4 tc_out[];
1429			void main()
1430			{
1431				tc_out[gl_InvocationID] = vtx_var[gl_InvocationID];
1432				${TESSELLATION_CONTROL_OUTPUT}
1433			}
1434		""
1435		tessellation_evaluation ""
1436			#version 310 es
1437			${TESSELLATION_EVALUATION_DECLARATIONS}
1438			flat in mediump uvec4 tc_out[];
1439			flat out mediump uvec4 te_out;
1440			void main()
1441			{
1442				te_out = tc_out[2];
1443				${TESSELLATION_EVALUATION_OUTPUT}
1444			}
1445		""
1446		geometry ""
1447			#version 310 es
1448			${GEOMETRY_DECLARATIONS}
1449			flat in mediump uvec4 te_out[];
1450			flat out mediump uvec4 geo_out;
1451			void main()
1452			{
1453				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1454				{
1455					geo_out = te_out[ndx];
1456					gl_Position = gl_in[ndx].gl_Position;
1457					EmitVertex();
1458				}
1459			}
1460		""
1461		fragment ""
1462			#version 310 es
1463			${FRAGMENT_DECLARATIONS}
1464			flat in uvec4 geo_out;
1465			void main()
1466			{
1467				out0 = geo_out;
1468				${FRAGMENT_OUTPUT}
1469			}
1470		""
1471	end
1472
1473	case float_struct
1474		version 310 es
1475		desc "varying of struct type containing float"
1476		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1477		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1478		values
1479		{
1480			input float in0		= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1481			output float out0	= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1482		}
1483		vertex ""
1484			#version 310 es
1485			${VERTEX_DECLARATIONS}
1486			struct S { mediump float val; };
1487			out S vtx_var;
1488			void main()
1489			{
1490				${VERTEX_SETUP}
1491				vtx_var.val = in0;
1492				${VERTEX_OUTPUT}
1493			}
1494		""
1495		tessellation_control ""
1496			#version 310 es
1497			${TESSELLATION_CONTROL_DECLARATIONS}
1498			struct S { mediump float val; };
1499			in S vtx_var[];
1500			out S tc_out[];
1501			void main()
1502			{
1503				tc_out[gl_InvocationID].val = vtx_var[gl_InvocationID].val;
1504				${TESSELLATION_CONTROL_OUTPUT}
1505			}
1506		""
1507		tessellation_evaluation ""
1508			#version 310 es
1509			${TESSELLATION_EVALUATION_DECLARATIONS}
1510			struct S { mediump float val; };
1511			in S tc_out[];
1512			out S te_out;
1513			void main()
1514			{
1515				te_out.val = tc_out[2].val;
1516				${TESSELLATION_EVALUATION_OUTPUT}
1517			}
1518		""
1519		geometry ""
1520			#version 310 es
1521			${GEOMETRY_DECLARATIONS}
1522			struct S { mediump float val; };
1523			in S te_out[];
1524			out S geo_out;
1525			void main()
1526			{
1527				for (int ndx = 0; ndx < gl_in.length(); ++ndx)
1528				{
1529					geo_out.val = te_out[ndx].val;
1530					gl_Position = gl_in[ndx].gl_Position;
1531					EmitVertex();
1532				}
1533			}
1534		""
1535		fragment ""
1536			#version 310 es
1537			precision mediump float;
1538			${FRAGMENT_DECLARATIONS}
1539			struct S { mediump float val; };
1540			in S geo_out;
1541			void main()
1542			{
1543				out0 = geo_out.val;
1544				${FRAGMENT_OUTPUT}
1545			}
1546		""
1547	end
1548
1549	case float_array
1550		version 310 es
1551		desc "varying of float array type"
1552		require extension { "GL_OES_tessellation_shader" | "GL_EXT_tessellation_shader" } in { tessellation_control, tessellation_evaluation }
1553		require extension { "GL_OES_geometry_shader" | "GL_EXT_geometry_shader" } in { geometry }
1554		require extension { "GL_OES_shader_io_blocks" | "GL_EXT_shader_io_blocks" } in { vertex, fragment }
1555		values
1556		{
1557			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) ];
1558			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) ];
1559		}
1560		vertex ""
1561			#version 310 es
1562			${VERTEX_DECLARATIONS}
1563			out VtxOutBlockName { mediump float val[2]; } instanceName;
1564			void main()
1565			{
1566				${VERTEX_SETUP}
1567				instanceName.val[0] = in0.x;
1568				instanceName.val[1] = in0.y;
1569				${VERTEX_OUTPUT}
1570			}
1571		""
1572		tessellation_control ""
1573			#version 310 es
1574			${TESSELLATION_CONTROL_DECLARATIONS}
1575			in VtxOutBlockName { mediump float val[2]; } inInstanceName[];
1576			out TCOutBlockName { mediump float val[2]; } outInstanceName[];
1577			void main()
1578			{
1579				outInstanceName[gl_InvocationID].val[0] = inInstanceName[gl_InvocationID].val[0];
1580				outInstanceName[gl_InvocationID].val[1] = inInstanceName[gl_InvocationID].val[1];
1581				${TESSELLATION_CONTROL_OUTPUT}
1582			}
1583		""
1584		tessellation_evaluation ""
1585			#version 310 es
1586			${TESSELLATION_EVALUATION_DECLARATIONS}
1587			in TCOutBlockName { mediump float val[2]; } inInstanceName[];
1588			out TEOutBlockName { mediump float val[2]; } outInstanceName;
1589			void main()
1590			{
1591				outInstanceName.val[0] = inInstanceName[2].val[0];
1592				outInstanceName.val[1] = inInstanceName[2].val[1];
1593				${TESSELLATION_EVALUATION_OUTPUT}
1594			}
1595		""
1596		geometry ""
1597			#version 310 es
1598			${GEOMETRY_DECLARATIONS}
1599			in TEOutBlockName { mediump float val[2]; } inInstanceName[];
1600			out GeoOutBlockName { mediump float val[2]; } outInstanceName;
1601			void main()
1602			{
1603				outInstanceName.val[0] = inInstanceName[0].val[0];
1604				outInstanceName.val[1] = inInstanceName[0].val[1];
1605				gl_Position = gl_in[0].gl_Position;
1606				EmitVertex();
1607				outInstanceName.val[0] = inInstanceName[1].val[0];
1608				outInstanceName.val[1] = inInstanceName[1].val[1];
1609				gl_Position = gl_in[1].gl_Position;
1610				EmitVertex();
1611				outInstanceName.val[0] = inInstanceName[2].val[0];
1612				outInstanceName.val[1] = inInstanceName[2].val[1];
1613				gl_Position = gl_in[2].gl_Position;
1614				EmitVertex();
1615			}
1616		""
1617		fragment ""
1618			#version 310 es
1619			precision mediump float;
1620			${FRAGMENT_DECLARATIONS}
1621			in GeoOutBlockName { mediump float val[2]; } inInstanceName;
1622			void main()
1623			{
1624				out0 = vec2(inInstanceName.val[0], inInstanceName.val[1]);
1625				${FRAGMENT_OUTPUT}
1626			}
1627		""
1628	end
1629end
1630