Home | History | Annotate | Download | only in shaders
      1 case float_input
      2 	version 300 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 300 es
     11 		precision highp float;
     12 		${DECLARATIONS}
     13 		void main()
     14 		{
     15 			out0 = in0;
     16 			${OUTPUT}
     17 		}
     18 	""
     19 end
     20 
     21 case float_uniform
     22 	version 300 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 300 es
     31 		precision highp float;
     32 		${DECLARATIONS}
     33 		uniform float uni0;
     34 		void main()
     35 		{
     36 			out0 = uni0;
     37 			${OUTPUT}
     38 		}
     39 	""
     40 end
     41 
     42 case float_0
     43 	version 300 es
     44 	values { output float out0 = 1.123; }
     45 	both ""
     46 		#version 300 es
     47 		precision highp float;
     48 		${DECLARATIONS}
     49 		void main()
     50 		{
     51 			out0 = +1.123;
     52 			${OUTPUT}
     53 		}
     54 	""
     55 end
     56 
     57 case float_1
     58 	version 300 es
     59 	values { output float out0 = -1.123; }
     60 	both ""
     61 		#version 300 es
     62 		precision highp float;
     63 		${DECLARATIONS}
     64 		void main()
     65 		{
     66 			out0 = -1.123;
     67 			${OUTPUT}
     68 		}
     69 	""
     70 end
     71 
     72 case float_2
     73 	version 300 es
     74 	values { output float out0 = 123.0; }
     75 	both ""
     76 		#version 300 es
     77 		precision highp float;
     78 		${DECLARATIONS}
     79 		void main()
     80 		{
     81 			out0 = 123.;
     82 			${OUTPUT}
     83 		}
     84 	""
     85 end
     86 
     87 case float_3
     88 	version 300 es
     89 	values { output float out0 = 0.123; }
     90 	both ""
     91 		#version 300 es
     92 		precision highp float;
     93 		${DECLARATIONS}
     94 		void main()
     95 		{
     96 			out0 = .123;
     97 			${OUTPUT}
     98 		}
     99 	""
    100 end
    101 
    102 case float_4
    103 	version 300 es
    104 	values { output float out0 = 123.0; }
    105 	both ""
    106 		#version 300 es
    107 		precision highp float;
    108 		${DECLARATIONS}
    109 		void main()
    110 		{
    111 			out0 = 1.23e+2;
    112 			${OUTPUT}
    113 		}
    114 	""
    115 end
    116 
    117 case float_5
    118 	version 300 es
    119 	values { output float out0 = -123.0; }
    120 	both ""
    121 		#version 300 es
    122 		precision highp float;
    123 		${DECLARATIONS}
    124 		void main()
    125 		{
    126 			out0 = -1.23E+2;
    127 			${OUTPUT}
    128 		}
    129 	""
    130 end
    131 
    132 case float_6
    133 	version 300 es
    134 	values { output float out0 = -123.0; }
    135 	both ""
    136 		#version 300 es
    137 		precision highp float;
    138 		${DECLARATIONS}
    139 		void main()
    140 		{
    141 			out0 = -1.23e2;
    142 			${OUTPUT}
    143 		}
    144 	""
    145 end
    146 
    147 case float_7
    148 	version 300 es
    149 	values { output float out0 = 0.123; }
    150 	both ""
    151 		#version 300 es
    152 		precision highp float;
    153 		${DECLARATIONS}
    154 		void main()
    155 		{
    156 			out0 = 1.23e-1;
    157 			${OUTPUT}
    158 		}
    159 	""
    160 end
    161 
    162 case float_8
    163 	version 300 es
    164 	values { output float out0 = 1000.0; }
    165 	both ""
    166 		#version 300 es
    167 		precision highp float;
    168 		${DECLARATIONS}
    169 		void main()
    170 		{
    171 			out0 = 1e3;
    172 			${OUTPUT}
    173 		}
    174 	""
    175 end
    176 
    177 case float_f_suffix_0
    178 	version 300 es
    179 	values { output float out0 = 1.0; }
    180 	both ""
    181 		#version 300 es
    182 		precision mediump float;
    183 		${DECLARATIONS}
    184 		void main ()
    185 		{
    186 			${SETUP}
    187 			float value = 1.0f;
    188 			out0 = value;
    189 			${OUTPUT}
    190 		}
    191 	""
    192 end
    193 
    194 case float_f_suffix_1
    195 	version 300 es
    196 	values { output float out0 = 1.0; }
    197 	both ""
    198 		#version 300 es
    199 		precision mediump float;
    200 		${DECLARATIONS}
    201 		void main ()
    202 		{
    203 			${SETUP}
    204 			float value = 1.0F;
    205 			out0 = value;
    206 			${OUTPUT}
    207 		}
    208 	""
    209 end
    210 
    211 case int_0
    212 	version 300 es
    213 	values { output int out0 = 123; }
    214 	both ""
    215 		#version 300 es
    216 		precision highp float;
    217 		${DECLARATIONS}
    218 		void main()
    219 		{
    220 			out0 = 123;
    221 			${OUTPUT}
    222 		}
    223 	""
    224 end
    225 
    226 case int_1
    227 	version 300 es
    228 	values { output int out0 = -321; }
    229 	both ""
    230 		#version 300 es
    231 		precision highp float;
    232 		${DECLARATIONS}
    233 		void main()
    234 		{
    235 			out0 = -321;
    236 			${OUTPUT}
    237 		}
    238 	""
    239 end
    240 
    241 case int_2
    242 	version 300 es
    243 	values { output int out0 = 123; }
    244 	both ""
    245 		#version 300 es
    246 		precision highp float;
    247 		${DECLARATIONS}
    248 		void main()
    249 		{
    250 			out0 = 0x7B;
    251 			${OUTPUT}
    252 		}
    253 	""
    254 end
    255 
    256 case int_3
    257 	version 300 es
    258 	values { output int out0 = 123; }
    259 	both ""
    260 		#version 300 es
    261 		precision highp float;
    262 		${DECLARATIONS}
    263 		void main()
    264 		{
    265 			out0 = 0X7b;
    266 			${OUTPUT}
    267 		}
    268 	""
    269 end
    270 
    271 case int_4
    272 	version 300 es
    273 	values { output int out0 = 123; }
    274 	both ""
    275 		#version 300 es
    276 		precision highp float;
    277 		${DECLARATIONS}
    278 		void main()
    279 		{
    280 			out0 = 0173;
    281 			${OUTPUT}
    282 		}
    283 	""
    284 end
    285 
    286 case bool_0
    287 	version 300 es
    288 	values { output bool out0 = true; }
    289 	both ""
    290 		#version 300 es
    291 		precision highp float;
    292 		${DECLARATIONS}
    293 		void main()
    294 		{
    295 			out0 = true;
    296 			${OUTPUT}
    297 		}
    298 	""
    299 end
    300 
    301 case bool_1
    302 	version 300 es
    303 	values { output bool out0 = false; }
    304 	both ""
    305 		#version 300 es
    306 		precision highp float;
    307 		${DECLARATIONS}
    308 		void main()
    309 		{
    310 			out0 = false;
    311 			${OUTPUT}
    312 		}
    313 	""
    314 end
    315 
    316 case const_float_global
    317 	 version 300 es
    318 	 values { output float out0 = 1000.0; }
    319 
    320 	 both ""
    321 			#version 300 es
    322 			precision mediump float;
    323 			${DECLARATIONS}
    324 			const float theConstant = 1000.0;
    325 			void main()
    326 			{
    327 				out0 = theConstant;
    328 				${OUTPUT}
    329 			}
    330 	 ""
    331 end
    332 
    333 case const_float_main
    334 	 version 300 es
    335 	 values { output float out0 = -1000.0; }
    336 
    337 	 both ""
    338 			#version 300 es
    339 			precision mediump float;
    340 			${DECLARATIONS}
    341 			void main()
    342 			{
    343 					const float theConstant = -1000.0;
    344 				out0 = theConstant;
    345 				${OUTPUT}
    346 			}
    347 	 ""
    348 end
    349 
    350 case const_float_function
    351 	 version 300 es
    352 	 values { output float out0 = -0.012; }
    353 
    354 	 both ""
    355 			#version 300 es
    356 			precision mediump float;
    357 			${DECLARATIONS}
    358 			float func()
    359 			{
    360 					const float theConstant = -0.012;
    361 				return theConstant;
    362 			}
    363 			void main()
    364 			{
    365 				out0 = func();
    366 				${OUTPUT}
    367 			}
    368 	 ""
    369 end
    370 
    371 case const_float_scope
    372 	 version 300 es
    373 	 values { output float out0 = 1.0; }
    374 
    375 	 both ""
    376 			#version 300 es
    377 			precision mediump float;
    378 			${DECLARATIONS}
    379 			void main()
    380 			{
    381 				{
    382 					 const float theConstant = 1.0;
    383 					 out0 = theConstant;
    384 				}
    385 				${OUTPUT}
    386 			}
    387 	 ""
    388 end
    389 
    390 case const_float_scope_shawdowing_1
    391 	 version 300 es
    392 	 values { output float out0 = 1.0; }
    393 
    394 	 both ""
    395 			#version 300 es
    396 			precision mediump float;
    397 			${DECLARATIONS}
    398 			void main()
    399 			{
    400 				const float theConstant = 100.0;
    401 				{
    402 					 const float theConstant = 1.0;
    403 					 out0 = theConstant;
    404 				}
    405 				${OUTPUT}
    406 			}
    407 	 ""
    408 end
    409 
    410 case const_float_scope_shawdowing_2
    411 	 version 300 es
    412 	 values { output float out0 = 1.0; }
    413 
    414 	 both ""
    415 			#version 300 es
    416 			precision mediump float;
    417 			${DECLARATIONS}
    418 			const float theConstant = 100.0;
    419 			void main()
    420 			{
    421 				{
    422 					 const float theConstant = 1.0;
    423 					 out0 = theConstant;
    424 				}
    425 				${OUTPUT}
    426 			}
    427 	 ""
    428 end
    429 
    430 case const_float_scope_shawdowing_3
    431 	 version 300 es
    432 	 values { output float out0 = 1.0; }
    433 
    434 	 both ""
    435 			#version 300 es
    436 			precision mediump float;
    437 			${DECLARATIONS}
    438 			const float theConstant = 100.0;
    439 			void main()
    440 			{
    441 				const float theConstant = -100.0;
    442 				{
    443 					 const float theConstant = 1.0;
    444 					 out0 = theConstant;
    445 				}
    446 				${OUTPUT}
    447 			}
    448 	 ""
    449 end
    450 
    451 case const_float_scope_shawdowing_4
    452 	 version 300 es
    453 	 values { output float out0 = 2.0; }
    454 
    455 	 both ""
    456 			#version 300 es
    457 			precision mediump float;
    458 			${DECLARATIONS}
    459 			const float theConstant = 100.0;
    460 			float func()
    461 			{
    462 				const float theConstant = 2.0;
    463 				return theConstant;
    464 			}
    465 			void main()
    466 			{
    467 				const float theConstant = -100.0;
    468 				{
    469 					 const float theConstant = 1.0;
    470 					 out0 = func();
    471 				}
    472 				${OUTPUT}
    473 			}
    474 	 ""
    475 end
    476 
    477 case const_float_operations_with_const
    478 	 version 300 es
    479 	 values { output float out0 = 21.0; }
    480 
    481 	 both ""
    482 			#version 300 es
    483 			precision mediump float;
    484 			${DECLARATIONS}
    485 			const float theGlobalConstant = 10.0;
    486 			float func()
    487 			{
    488 				const float theConstant = 2.0;
    489 				return theConstant;
    490 			}
    491 			void main()
    492 			{
    493 				const float theConstant = -100.0;
    494 				{
    495 					 const float theConstant = 1.0;
    496 					 out0 = func() * theGlobalConstant + theConstant;
    497 				}
    498 				${OUTPUT}
    499 			}
    500 	 ""
    501 end
    502 
    503 case const_float_assignment_1
    504 	 version 300 es
    505 	 values { output float out0 = 10.0; }
    506 
    507 	 both ""
    508 			#version 300 es
    509 			precision mediump float;
    510 			${DECLARATIONS}
    511 			void main()
    512 			{
    513 				const float theConstant1 = 10.0;
    514 				const float theConstant2 = theConstant1;
    515 				out0 = theConstant2;
    516 				${OUTPUT}
    517 			}
    518 	 ""
    519 end
    520 
    521 case const_float_assignment_2
    522 	 version 300 es
    523 	 values { output float out0 = 10.0; }
    524 
    525 	 both ""
    526 			#version 300 es
    527 			precision mediump float;
    528 			${DECLARATIONS}
    529 			void main()
    530 			{
    531 				const float theConstant1 = 10.0;
    532 				{
    533 					const float theConstant2 = theConstant1;
    534 					out0 = theConstant2;
    535 				}
    536 				${OUTPUT}
    537 			}
    538 	 ""
    539 end
    540 
    541 case const_float_assignment_3
    542 	 version 300 es
    543 	 values { output float out0 = 10.0; }
    544 
    545 	 both ""
    546 			#version 300 es
    547 			precision mediump float;
    548 			${DECLARATIONS}
    549 			const float theConstant1 = 10.0;
    550 			void main()
    551 			{
    552 				const float theConstant2 = theConstant1;
    553 				out0 = theConstant2;
    554 				${OUTPUT}
    555 			}
    556 	 ""
    557 end
    558 
    559 case const_float_assignment_4
    560 	 version 300 es
    561 	 values { output float out0 = 10.0; }
    562 
    563 	 both ""
    564 			#version 300 es
    565 			precision mediump float;
    566 			${DECLARATIONS}
    567 			const float theConstant1 = 10.0;
    568 			float func()
    569 			{
    570 				const float theConstant2 = theConstant1;
    571 				return theConstant2;
    572 			}
    573 			void main()
    574 			{
    575 				out0 = func();
    576 				${OUTPUT}
    577 			}
    578 	 ""
    579 end
    580 
    581 case const_float_assign_uniform
    582 	 version 300 es
    583 	 expect compile_fail
    584 	 values { output float out0 = 10.0; }
    585 	 both ""
    586 			#version 300 es
    587 			precision mediump float;
    588 			${DECLARATIONS}
    589 			uniform float theUniform;
    590 			void main()
    591 			{
    592 				const float theConstant = theUniform;
    593 				out0 = theConstant;
    594 				${OUTPUT}
    595 			}
    596 	 ""
    597 end
    598 
    599 case const_float_assign_varying
    600 	 version 300 es
    601 	 expect compile_fail
    602 	 values { output float out0 = 10.0; }
    603 	 vertex ""
    604 			#version 300 es
    605 			${VERTEX_DECLARATIONS}
    606 			out float theVarying;
    607 			void main()
    608 			{
    609 				theVarying = 1.0;
    610 				gl_Position = vec(1.0);
    611 			}
    612 	 ""
    613 	 fragment ""
    614 			#version 300 es
    615 			precision mediump float;
    616 			${FRAGMENT_DECLARATIONS}
    617 			in float theVarying;
    618 			void main()
    619 			{
    620 				const float theConstant = theVarying;
    621 				out0 = theConstant;
    622 				${FRAGMENT_OUTPUT}
    623 			}
    624 	 ""
    625 end
    626 
    627 case const_float_function_gotcha
    628 	 version 300 es
    629 	 desc "Function constant parameters are not really constants, so using them as constant expressions should fail."
    630 	 expect compile_fail
    631 	 values { output float out0 = 20.0; }
    632 	 both ""
    633 			#version 300 es
    634 			precision mediump float;
    635 			${DECLARATIONS}
    636 			float func(const float gotcha)
    637 			{
    638 				const float theConstant2 = gotcha;
    639 				return theConstant2*2.0;
    640 			}
    641 			void main()
    642 			{
    643 					const float theConstant = 10.0;
    644 				out0 = func(theConstant);
    645 				${OUTPUT}
    646 			}
    647 	 ""
    648 end
    649 
    650 case const_float_from_int
    651 	 version 300 es
    652 	 values { output float out0 = 10.0; }
    653 
    654 	 both ""
    655 			#version 300 es
    656 			precision mediump float;
    657 			${DECLARATIONS}
    658 			const float theConstant = float(10);
    659 			void main()
    660 			{
    661 				out0 = theConstant;
    662 				${OUTPUT}
    663 			}
    664 	 ""
    665 end
    666 
    667 case const_float_from_vec2
    668 	 version 300 es
    669 	 values { output float out0 = 10.0; }
    670 
    671 	 both ""
    672 			#version 300 es
    673 			precision mediump float;
    674 			${DECLARATIONS}
    675 			const float theConstant = vec2(1.0, 10.0).y;
    676 			void main()
    677 			{
    678 				out0 = theConstant;
    679 				${OUTPUT}
    680 			}
    681 	 ""
    682 end
    683 
    684 case const_float_from_vec3
    685 	 version 300 es
    686 	 values { output float out0 = 10.0; }
    687 
    688 	 both ""
    689 			#version 300 es
    690 			precision mediump float;
    691 			${DECLARATIONS}
    692 			const float theConstant = vec3(1.0, 10.0, 20.0).y;
    693 			void main()
    694 			{
    695 				out0 = theConstant;
    696 				${OUTPUT}
    697 			}
    698 	 ""
    699 end
    700 
    701 case const_float_from_vec4
    702 	 version 300 es
    703 	 values { output float out0 = 10.0; }
    704 
    705 	 both ""
    706 			#version 300 es
    707 			precision mediump float;
    708 			${DECLARATIONS}
    709 			const float theConstant = vec4(1.0, 10.0, 20.0, -10.0).y;
    710 			void main()
    711 			{
    712 				out0 = theConstant;
    713 				${OUTPUT}
    714 			}
    715 	 ""
    716 end
    717 
    718 case const_float_assign_variable_1
    719 	 version 300 es
    720 	 expect compile_fail
    721 	 values { output float out0 = 20.0; }
    722 	 both ""
    723 			#version 300 es
    724 			precision mediump float;
    725 			${DECLARATIONS}
    726 			void main()
    727 			{
    728 				float theVariable = 20.0;
    729 				const float theConstant = theVariable;
    730 				out0 = theConstant;
    731 				${OUTPUT}
    732 			}
    733 	 ""
    734 end
    735 
    736 case const_float_assign_variable_2
    737 	 version 300 es
    738 	 expect compile_fail
    739 	 values { output float out0 = 50.0; }
    740 	 both ""
    741 			#version 300 es
    742 			precision mediump float;
    743 			${DECLARATIONS}
    744 			void main()
    745 			{
    746 				float theVariable = 20.0;
    747 				theVariable += 30.0;
    748 				const float theConstant = theVariable;
    749 				out0 = theConstant;
    750 				${OUTPUT}
    751 			}
    752 	 ""
    753 end
    754 
    755 case const_float_assign_user_func
    756 	 version 300 es
    757 	 expect compile_fail
    758 	 values { output float out0 = 50.0; }
    759 	 both ""
    760 			#version 300 es
    761 			precision mediump float;
    762 			${DECLARATIONS}
    763 			float func()
    764 			{
    765 				return 50.0;
    766 			}
    767 			void main()
    768 			{
    769 				const float theConstant = func();
    770 				out0 = theConstant;
    771 				${OUTPUT}
    772 			}
    773 	 ""
    774 end
    775 
    776 case int_decimal
    777 	version 300 es
    778 	values { output int out0 = 7; }
    779 	both ""
    780 		#version 300 es
    781 		${DECLARATIONS}
    782 		void main ()
    783 		{
    784 			${SETUP}
    785 			int value = 7;
    786 			out0 = value;
    787 			${OUTPUT}
    788 		}
    789 	""
    790 end
    791 
    792 case int_octal
    793 	version 300 es
    794 	values { output int out0 = 15; }
    795 	both ""
    796 		#version 300 es
    797 		${DECLARATIONS}
    798 		void main ()
    799 		{
    800 			${SETUP}
    801 			int value = 017;
    802 			out0 = value;
    803 			${OUTPUT}
    804 		}
    805 	""
    806 end
    807 
    808 case int_hexadecimal_0
    809 	version 300 es
    810 	values { output int out0 = 47; }
    811 	both ""
    812 		#version 300 es
    813 		${DECLARATIONS}
    814 		void main ()
    815 		{
    816 			${SETUP}
    817 			int value = 0x2f;
    818 			out0 = value;
    819 			${OUTPUT}
    820 		}
    821 	""
    822 end
    823 
    824 case int_hexadecimal_1
    825 	version 300 es
    826 	values { output int out0 = 47; }
    827 	both ""
    828 		#version 300 es
    829 		${DECLARATIONS}
    830 		void main ()
    831 		{
    832 			${SETUP}
    833 			int value = 0X2f;
    834 			out0 = value;
    835 			${OUTPUT}
    836 		}
    837 	""
    838 end
    839 
    840 case uint_decimal_0
    841 	version 300 es
    842 	values { output uint out0 = 7; }
    843 	both ""
    844 		#version 300 es
    845 		${DECLARATIONS}
    846 		void main ()
    847 		{
    848 			${SETUP}
    849 			uint value = 7u;
    850 			out0 = value;
    851 			${OUTPUT}
    852 		}
    853 	""
    854 end
    855 
    856 case uint_decimal_1
    857 	version 300 es
    858 	values { output uint out0 = 7; }
    859 	both ""
    860 		#version 300 es
    861 		${DECLARATIONS}
    862 		void main ()
    863 		{
    864 			${SETUP}
    865 			uint value = 7U;
    866 			out0 = value;
    867 			${OUTPUT}
    868 		}
    869 	""
    870 end
    871 
    872 case uint_decimal_2
    873 	version 300 es
    874 	values { output uint out0 = 0; }
    875 	both ""
    876 		#version 300 es
    877 		${DECLARATIONS}
    878 		void main ()
    879 		{
    880 			${SETUP}
    881 			uint value = 0u;
    882 			out0 = value;
    883 			${OUTPUT}
    884 		}
    885 	""
    886 end
    887 
    888 case uint_decimal_3
    889 	version 300 es
    890 	values { output uint out0 = 0; }
    891 	both ""
    892 		#version 300 es
    893 		${DECLARATIONS}
    894 		void main ()
    895 		{
    896 			${SETUP}
    897 			uint value = 0U;
    898 			out0 = value;
    899 			${OUTPUT}
    900 		}
    901 	""
    902 end
    903 
    904 case uint_octal_0
    905 	version 300 es
    906 	values { output uint out0 = 15; }
    907 	both ""
    908 		#version 300 es
    909 		${DECLARATIONS}
    910 		void main ()
    911 		{
    912 			${SETUP}
    913 			uint value = 017u;
    914 			out0 = value;
    915 			${OUTPUT}
    916 		}
    917 	""
    918 end
    919 
    920 case uint_octal_1
    921 	version 300 es
    922 	values { output uint out0 = 15; }
    923 	both ""
    924 		#version 300 es
    925 		${DECLARATIONS}
    926 		void main ()
    927 		{
    928 			${SETUP}
    929 			uint value = 017U;
    930 			out0 = value;
    931 			${OUTPUT}
    932 		}
    933 	""
    934 end
    935 
    936 case uint_hexadecimal_0
    937 	version 300 es
    938 	values { output uint out0 = 47; }
    939 	both ""
    940 		#version 300 es
    941 		${DECLARATIONS}
    942 		void main ()
    943 		{
    944 			${SETUP}
    945 			uint value = 0x2fU;
    946 			out0 = value;
    947 			${OUTPUT}
    948 		}
    949 	""
    950 end
    951 
    952 case uint_hexadecimal_1
    953 	version 300 es
    954 	values { output uint out0 = 47; }
    955 	both ""
    956 		#version 300 es
    957 		${DECLARATIONS}
    958 		void main ()
    959 		{
    960 			${SETUP}
    961 			uint value = 0X2fu;
    962 			out0 = value;
    963 			${OUTPUT}
    964 		}
    965 	""
    966 end
    967 
    968 case int_from_uint
    969 	expect compile_fail
    970 	version 300 es
    971 	both ""
    972 		#version 300 es
    973 		${DECLARATIONS}
    974 		void main ()
    975 		{
    976 			int value = 7u;
    977 			${POSITION_FRAG_COLOR} = vec4(0.0);
    978 		}
    979 	""
    980 end
    981 
    982 case int_from_uint_2
    983 	expect compile_fail
    984 	version 300 es
    985 	both ""
    986 		#version 300 es
    987 		${DECLARATIONS}
    988 		void main ()
    989 		{
    990 			int value = 0u;
    991 			${POSITION_FRAG_COLOR} = vec4(0.0);
    992 		}
    993 	""
    994 end
    995 
    996 case uint_from_int
    997 	expect compile_fail
    998 	version 300 es
    999 	both ""
   1000 		#version 300 es
   1001 		${DECLARATIONS}
   1002 		void main ()
   1003 		{
   1004 			uint value = 7;
   1005 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1006 		}
   1007 	""
   1008 end
   1009 
   1010 case uint_from_int_2
   1011 	expect compile_fail
   1012 	version 300 es
   1013 	both ""
   1014 		#version 300 es
   1015 		${DECLARATIONS}
   1016 		void main ()
   1017 		{
   1018 			uint value = 0;
   1019 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1020 		}
   1021 	""
   1022 end
   1023 
   1024 case int_from_float
   1025 	expect compile_fail
   1026 	version 300 es
   1027 	both ""
   1028 		#version 300 es
   1029 		${DECLARATIONS}
   1030 		void main ()
   1031 		{
   1032 			int value = 7.0;
   1033 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1034 		}
   1035 	""
   1036 end
   1037 
   1038 case uint_from_float
   1039 	expect compile_fail
   1040 	version 300 es
   1041 	both ""
   1042 		#version 300 es
   1043 		${DECLARATIONS}
   1044 		void main ()
   1045 		{
   1046 			uint value = 7.0;
   1047 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1048 		}
   1049 	""
   1050 end
   1051 
   1052 case bool_from_int
   1053 	expect compile_fail
   1054 	version 300 es
   1055 	both ""
   1056 		#version 300 es
   1057 		${DECLARATIONS}
   1058 		void main ()
   1059 		{
   1060 			bool value = 1;
   1061 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1062 		}
   1063 	""
   1064 end
   1065 
   1066 case bool_from_uint
   1067 	expect compile_fail
   1068 	version 300 es
   1069 	both ""
   1070 		#version 300 es
   1071 		${DECLARATIONS}
   1072 		void main ()
   1073 		{
   1074 			bool value = 1u;
   1075 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1076 		}
   1077 	""
   1078 end
   1079 
   1080 case bool_from_float
   1081 	expect compile_fail
   1082 	version 300 es
   1083 	both ""
   1084 		#version 300 es
   1085 		${DECLARATIONS}
   1086 		void main ()
   1087 		{
   1088 			bool value = 1.0;
   1089 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1090 		}
   1091 	""
   1092 end
   1093 
   1094 case float_int_f_suffix_0
   1095 	expect compile_fail
   1096 	version 300 es
   1097 	both ""
   1098 		#version 300 es
   1099 		precision mediump float;
   1100 		${DECLARATIONS}
   1101 		void main ()
   1102 		{
   1103 			${SETUP}
   1104 			float value = 1f;
   1105 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1106 		}
   1107 	""
   1108 end
   1109 
   1110 case float_int_f_suffix_1
   1111 	expect compile_fail
   1112 	version 300 es
   1113 	both ""
   1114 		#version 300 es
   1115 		precision mediump float;
   1116 		${DECLARATIONS}
   1117 		void main ()
   1118 		{
   1119 			${SETUP}
   1120 			float value = 1F;
   1121 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1122 		}
   1123 	""
   1124 end
   1125 
   1126 case int_l_suffix
   1127 	expect compile_fail
   1128 	version 300 es
   1129 	both ""
   1130 		#version 300 es
   1131 		${DECLARATIONS}
   1132 		void main ()
   1133 		{
   1134 			int value = 1l;
   1135 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1136 		}
   1137 	""
   1138 end
   1139 
   1140 case uint_ul_suffix
   1141 	expect compile_fail
   1142 	version 300 es
   1143 	both ""
   1144 		#version 300 es
   1145 		${DECLARATIONS}
   1146 		void main ()
   1147 		{
   1148 			uint value = 1ul;
   1149 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1150 		}
   1151 	""
   1152 end
   1153 
   1154 case invalid_octal_0
   1155 	expect compile_fail
   1156 	version 300 es
   1157 	both ""
   1158 		#version 300 es
   1159 		${DECLARATIONS}
   1160 		void main ()
   1161 		{
   1162 			int value = 018;
   1163 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1164 		}
   1165 	""
   1166 end
   1167 
   1168 case invalid_octal_1
   1169 	expect compile_fail
   1170 	version 300 es
   1171 	both ""
   1172 		#version 300 es
   1173 		${DECLARATIONS}
   1174 		void main ()
   1175 		{
   1176 			uint value = 09U;
   1177 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1178 		}
   1179 	""
   1180 end
   1181 
   1182 case invalid_hexadecimal_0
   1183 	expect compile_fail
   1184 	version 300 es
   1185 	both ""
   1186 		#version 300 es
   1187 		${DECLARATIONS}
   1188 		void main ()
   1189 		{
   1190 			int value = 0x2g7;
   1191 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1192 		}
   1193 	""
   1194 end
   1195 
   1196 case invalid_hexadecimal_1
   1197 	expect compile_fail
   1198 	version 300 es
   1199 	both ""
   1200 		#version 300 es
   1201 		${DECLARATIONS}
   1202 		void main ()
   1203 		{
   1204 			uint value = 0X1h7u;
   1205 			${POSITION_FRAG_COLOR} = vec4(0.0);
   1206 		}
   1207 	""
   1208 end
   1209