• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1case float_input
2	version 310 es
3	values
4	{
5		input float in0		= [ 1.123 | 0.75 | -512.0 | -72.13 | 199.91 | -1.123 | -0.75 | 512.0 | -72.13 | -199.91 ];
6		output float out0	= [ 1.123 | 0.75 | -512.0 | -72.13 | 199.91 | -1.123 | -0.75 | 512.0 | -72.13 | -199.91 ];
7	}
8
9	both ""
10		#version 310 es
11		precision highp float;
12		${DECLARATIONS}
13		void main()
14		{
15			out0 = in0;
16			${OUTPUT}
17		}
18	""
19end
20
21case float_uniform
22	version 310 es
23	values
24	{
25		uniform float uni0	= [ 1.123 | 0.75 | -512.0 | -72.13 | 199.91 ];
26		output float out0	= [ 1.123 | 0.75 | -512.0 | -72.13 | 199.91 ];
27	}
28
29	both ""
30		#version 310 es
31		precision highp float;
32		${DECLARATIONS}
33		void main()
34		{
35			out0 = uni0;
36			${OUTPUT}
37		}
38	""
39end
40
41case float_0
42	version 310 es
43	values { output float out0 = 1.123; }
44	both ""
45		#version 310 es
46		precision highp float;
47		${DECLARATIONS}
48		void main()
49		{
50			out0 = +1.123;
51			${OUTPUT}
52		}
53	""
54end
55
56case float_1
57	version 310 es
58	values { output float out0 = -1.123; }
59	both ""
60		#version 310 es
61		precision highp float;
62		${DECLARATIONS}
63		void main()
64		{
65			out0 = -1.123;
66			${OUTPUT}
67		}
68	""
69end
70
71case float_2
72	version 310 es
73	values { output float out0 = 123.0; }
74	both ""
75		#version 310 es
76		precision highp float;
77		${DECLARATIONS}
78		void main()
79		{
80			out0 = 123.;
81			${OUTPUT}
82		}
83	""
84end
85
86case float_3
87	version 310 es
88	values { output float out0 = 0.123; }
89	both ""
90		#version 310 es
91		precision highp float;
92		${DECLARATIONS}
93		void main()
94		{
95			out0 = .123;
96			${OUTPUT}
97		}
98	""
99end
100
101case float_4
102	version 310 es
103	values { output float out0 = 123.0; }
104	both ""
105		#version 310 es
106		precision highp float;
107		${DECLARATIONS}
108		void main()
109		{
110			out0 = 1.23e+2;
111			${OUTPUT}
112		}
113	""
114end
115
116case float_5
117	version 310 es
118	values { output float out0 = -123.0; }
119	both ""
120		#version 310 es
121		precision highp float;
122		${DECLARATIONS}
123		void main()
124		{
125			out0 = -1.23E+2;
126			${OUTPUT}
127		}
128	""
129end
130
131case float_6
132	version 310 es
133	values { output float out0 = -123.0; }
134	both ""
135		#version 310 es
136		precision highp float;
137		${DECLARATIONS}
138		void main()
139		{
140			out0 = -1.23e2;
141			${OUTPUT}
142		}
143	""
144end
145
146case float_7
147	version 310 es
148	values { output float out0 = 0.123; }
149	both ""
150		#version 310 es
151		precision highp float;
152		${DECLARATIONS}
153		void main()
154		{
155			out0 = 1.23e-1;
156			${OUTPUT}
157		}
158	""
159end
160
161case float_8
162	version 310 es
163	values { output float out0 = 1000.0; }
164	both ""
165		#version 310 es
166		precision highp float;
167		${DECLARATIONS}
168		void main()
169		{
170			out0 = 1e3;
171			${OUTPUT}
172		}
173	""
174end
175
176case float_f_suffix_0
177	version 310 es
178	values { output float out0 = 1.0; }
179	both ""
180		#version 310 es
181		precision highp float;
182		${DECLARATIONS}
183		void main ()
184		{
185			${SETUP}
186			float value = 1.0f;
187			out0 = value;
188			${OUTPUT}
189		}
190	""
191end
192
193case float_f_suffix_1
194	version 310 es
195	values { output float out0 = 1.0; }
196	both ""
197		#version 310 es
198		precision highp float;
199		${DECLARATIONS}
200		void main ()
201		{
202			${SETUP}
203			float value = 1.0F;
204			out0 = value;
205			${OUTPUT}
206		}
207	""
208end
209
210case int_0
211	version 310 es
212	values { output int out0 = 123; }
213	both ""
214		#version 310 es
215		precision highp float;
216		${DECLARATIONS}
217		void main()
218		{
219			out0 = 123;
220			${OUTPUT}
221		}
222	""
223end
224
225case int_1
226	version 310 es
227	values { output int out0 = -321; }
228	both ""
229		#version 310 es
230		precision highp float;
231		${DECLARATIONS}
232		void main()
233		{
234			out0 = -321;
235			${OUTPUT}
236		}
237	""
238end
239
240case int_2
241	version 310 es
242	values { output int out0 = 123; }
243	both ""
244		#version 310 es
245		precision highp float;
246		${DECLARATIONS}
247		void main()
248		{
249			out0 = 0x7B;
250			${OUTPUT}
251		}
252	""
253end
254
255case int_3
256	version 310 es
257	values { output int out0 = 123; }
258	both ""
259		#version 310 es
260		precision highp float;
261		${DECLARATIONS}
262		void main()
263		{
264			out0 = 0X7b;
265			${OUTPUT}
266		}
267	""
268end
269
270case int_4
271	version 310 es
272	values { output int out0 = 123; }
273	both ""
274		#version 310 es
275		precision highp float;
276		${DECLARATIONS}
277		void main()
278		{
279			out0 = 0173;
280			${OUTPUT}
281		}
282	""
283end
284
285case bool_0
286	version 310 es
287	values { output bool out0 = true; }
288	both ""
289		#version 310 es
290		precision highp float;
291		${DECLARATIONS}
292		void main()
293		{
294			out0 = true;
295			${OUTPUT}
296		}
297	""
298end
299
300case bool_1
301	version 310 es
302	values { output bool out0 = false; }
303	both ""
304		#version 310 es
305		precision highp float;
306		${DECLARATIONS}
307		void main()
308		{
309			out0 = false;
310			${OUTPUT}
311		}
312	""
313end
314
315case const_float_global
316	 version 310 es
317	 values { output float out0 = 1000.0; }
318
319	 both ""
320			#version 310 es
321			precision highp float;
322			${DECLARATIONS}
323			const float theConstant = 1000.0;
324			void main()
325			{
326				out0 = theConstant;
327				${OUTPUT}
328			}
329	 ""
330end
331
332case const_float_main
333	 version 310 es
334	 values { output float out0 = -1000.0; }
335
336	 both ""
337			#version 310 es
338			precision highp float;
339			${DECLARATIONS}
340			void main()
341			{
342					const float theConstant = -1000.0;
343				out0 = theConstant;
344				${OUTPUT}
345			}
346	 ""
347end
348
349case const_float_function
350	 version 310 es
351	 values { output float out0 = -0.012; }
352
353	 both ""
354			#version 310 es
355			precision highp float;
356			${DECLARATIONS}
357			float func()
358			{
359					const float theConstant = -0.012;
360				return theConstant;
361			}
362			void main()
363			{
364				out0 = func();
365				${OUTPUT}
366			}
367	 ""
368end
369
370case const_float_scope
371	 version 310 es
372	 values { output float out0 = 1.0; }
373
374	 both ""
375			#version 310 es
376			precision highp float;
377			${DECLARATIONS}
378			void main()
379			{
380				{
381					 const float theConstant = 1.0;
382					 out0 = theConstant;
383				}
384				${OUTPUT}
385			}
386	 ""
387end
388
389case const_float_scope_shawdowing_1
390	 version 310 es
391	 values { output float out0 = 1.0; }
392
393	 both ""
394			#version 310 es
395			precision highp float;
396			${DECLARATIONS}
397			void main()
398			{
399				const float theConstant = 100.0;
400				{
401					 const float theConstant = 1.0;
402					 out0 = theConstant;
403				}
404				${OUTPUT}
405			}
406	 ""
407end
408
409case const_float_scope_shawdowing_2
410	 version 310 es
411	 values { output float out0 = 1.0; }
412
413	 both ""
414			#version 310 es
415			precision highp float;
416			${DECLARATIONS}
417			const float theConstant = 100.0;
418			void main()
419			{
420				{
421					 const float theConstant = 1.0;
422					 out0 = theConstant;
423				}
424				${OUTPUT}
425			}
426	 ""
427end
428
429case const_float_scope_shawdowing_3
430	 version 310 es
431	 values { output float out0 = 1.0; }
432
433	 both ""
434			#version 310 es
435			precision highp float;
436			${DECLARATIONS}
437			const float theConstant = 100.0;
438			void main()
439			{
440				const float theConstant = -100.0;
441				{
442					 const float theConstant = 1.0;
443					 out0 = theConstant;
444				}
445				${OUTPUT}
446			}
447	 ""
448end
449
450case const_float_scope_shawdowing_4
451	 version 310 es
452	 values { output float out0 = 2.0; }
453
454	 both ""
455			#version 310 es
456			precision highp float;
457			${DECLARATIONS}
458			const float theConstant = 100.0;
459			float func()
460			{
461				const float theConstant = 2.0;
462				return theConstant;
463			}
464			void main()
465			{
466				const float theConstant = -100.0;
467				{
468					 const float theConstant = 1.0;
469					 out0 = func();
470				}
471				${OUTPUT}
472			}
473	 ""
474end
475
476case const_float_operations_with_const
477	 version 310 es
478	 values { output float out0 = 21.0; }
479
480	 both ""
481			#version 310 es
482			precision highp float;
483			${DECLARATIONS}
484			const float theGlobalConstant = 10.0;
485			float func()
486			{
487				const float theConstant = 2.0;
488				return theConstant;
489			}
490			void main()
491			{
492				const float theConstant = -100.0;
493				{
494					 const float theConstant = 1.0;
495					 out0 = func() * theGlobalConstant + theConstant;
496				}
497				${OUTPUT}
498			}
499	 ""
500end
501
502case const_float_assignment_1
503	 version 310 es
504	 values { output float out0 = 10.0; }
505
506	 both ""
507			#version 310 es
508			precision highp float;
509			${DECLARATIONS}
510			void main()
511			{
512				const float theConstant1 = 10.0;
513				const float theConstant2 = theConstant1;
514				out0 = theConstant2;
515				${OUTPUT}
516			}
517	 ""
518end
519
520case const_float_assignment_2
521	 version 310 es
522	 values { output float out0 = 10.0; }
523
524	 both ""
525			#version 310 es
526			precision highp float;
527			${DECLARATIONS}
528			void main()
529			{
530				const float theConstant1 = 10.0;
531				{
532					const float theConstant2 = theConstant1;
533					out0 = theConstant2;
534				}
535				${OUTPUT}
536			}
537	 ""
538end
539
540case const_float_assignment_3
541	 version 310 es
542	 values { output float out0 = 10.0; }
543
544	 both ""
545			#version 310 es
546			precision highp float;
547			${DECLARATIONS}
548			const float theConstant1 = 10.0;
549			void main()
550			{
551				const float theConstant2 = theConstant1;
552				out0 = theConstant2;
553				${OUTPUT}
554			}
555	 ""
556end
557
558case const_float_assignment_4
559	 version 310 es
560	 values { output float out0 = 10.0; }
561
562	 both ""
563			#version 310 es
564			precision highp float;
565			${DECLARATIONS}
566			const float theConstant1 = 10.0;
567			float func()
568			{
569				const float theConstant2 = theConstant1;
570				return theConstant2;
571			}
572			void main()
573			{
574				out0 = func();
575				${OUTPUT}
576			}
577	 ""
578end
579
580case const_float_from_int
581	 version 310 es
582	 values { output float out0 = 10.0; }
583
584	 both ""
585			#version 310 es
586			precision highp float;
587			${DECLARATIONS}
588			const float theConstant = float(10);
589			void main()
590			{
591				out0 = theConstant;
592				${OUTPUT}
593			}
594	 ""
595end
596
597case const_float_from_vec2
598	 version 310 es
599	 values { output float out0 = 10.0; }
600
601	 both ""
602			#version 310 es
603			precision highp float;
604			${DECLARATIONS}
605			const float theConstant = vec2(1.0, 10.0).y;
606			void main()
607			{
608				out0 = theConstant;
609				${OUTPUT}
610			}
611	 ""
612end
613
614case const_float_from_vec3
615	 version 310 es
616	 values { output float out0 = 10.0; }
617
618	 both ""
619			#version 310 es
620			precision highp float;
621			${DECLARATIONS}
622			const float theConstant = vec3(1.0, 10.0, 20.0).y;
623			void main()
624			{
625				out0 = theConstant;
626				${OUTPUT}
627			}
628	 ""
629end
630
631case const_float_from_vec4
632	 version 310 es
633	 values { output float out0 = 10.0; }
634
635	 both ""
636			#version 310 es
637			precision highp float;
638			${DECLARATIONS}
639			const float theConstant = vec4(1.0, 10.0, 20.0, -10.0).y;
640			void main()
641			{
642				out0 = theConstant;
643				${OUTPUT}
644			}
645	 ""
646end
647
648case int_decimal
649	version 310 es
650	values { output int out0 = 7; }
651	both ""
652		#version 310 es
653		${DECLARATIONS}
654		void main ()
655		{
656			${SETUP}
657			int value = 7;
658			out0 = value;
659			${OUTPUT}
660		}
661	""
662end
663
664case int_octal
665	version 310 es
666	values { output int out0 = 15; }
667	both ""
668		#version 310 es
669		${DECLARATIONS}
670		void main ()
671		{
672			${SETUP}
673			int value = 017;
674			out0 = value;
675			${OUTPUT}
676		}
677	""
678end
679
680case int_hexadecimal_0
681	version 310 es
682	values { output int out0 = 47; }
683	both ""
684		#version 310 es
685		${DECLARATIONS}
686		void main ()
687		{
688			${SETUP}
689			int value = 0x2f;
690			out0 = value;
691			${OUTPUT}
692		}
693	""
694end
695
696case int_hexadecimal_1
697	version 310 es
698	values { output int out0 = 47; }
699	both ""
700		#version 310 es
701		${DECLARATIONS}
702		void main ()
703		{
704			${SETUP}
705			int value = 0X2f;
706			out0 = value;
707			${OUTPUT}
708		}
709	""
710end
711
712case uint_decimal_0
713	version 310 es
714	values { output uint out0 = 7; }
715	both ""
716		#version 310 es
717		${DECLARATIONS}
718		void main ()
719		{
720			${SETUP}
721			uint value = 7u;
722			out0 = value;
723			${OUTPUT}
724		}
725	""
726end
727
728case uint_decimal_1
729	version 310 es
730	values { output uint out0 = 7; }
731	both ""
732		#version 310 es
733		${DECLARATIONS}
734		void main ()
735		{
736			${SETUP}
737			uint value = 7U;
738			out0 = value;
739			${OUTPUT}
740		}
741	""
742end
743
744case uint_decimal_2
745	version 310 es
746	values { output uint out0 = 0; }
747	both ""
748		#version 310 es
749		${DECLARATIONS}
750		void main ()
751		{
752			${SETUP}
753			uint value = 0u;
754			out0 = value;
755			${OUTPUT}
756		}
757	""
758end
759
760case uint_decimal_3
761	version 310 es
762	values { output uint out0 = 0; }
763	both ""
764		#version 310 es
765		${DECLARATIONS}
766		void main ()
767		{
768			${SETUP}
769			uint value = 0U;
770			out0 = value;
771			${OUTPUT}
772		}
773	""
774end
775
776case uint_octal_0
777	version 310 es
778	values { output uint out0 = 15; }
779	both ""
780		#version 310 es
781		${DECLARATIONS}
782		void main ()
783		{
784			${SETUP}
785			uint value = 017u;
786			out0 = value;
787			${OUTPUT}
788		}
789	""
790end
791
792case uint_octal_1
793	version 310 es
794	values { output uint out0 = 15; }
795	both ""
796		#version 310 es
797		${DECLARATIONS}
798		void main ()
799		{
800			${SETUP}
801			uint value = 017U;
802			out0 = value;
803			${OUTPUT}
804		}
805	""
806end
807
808case uint_hexadecimal_0
809	version 310 es
810	values { output uint out0 = 47; }
811	both ""
812		#version 310 es
813		${DECLARATIONS}
814		void main ()
815		{
816			${SETUP}
817			uint value = 0x2fU;
818			out0 = value;
819			${OUTPUT}
820		}
821	""
822end
823
824case uint_hexadecimal_1
825	version 310 es
826	values { output uint out0 = 47; }
827	both ""
828		#version 310 es
829		${DECLARATIONS}
830		void main ()
831		{
832			${SETUP}
833			uint value = 0X2fu;
834			out0 = value;
835			${OUTPUT}
836		}
837	""
838end
839