Home | History | Annotate | Download | only in shaders
      1 
      2 # Varying tests
      3 group varying "Varying linkage"
      4 
      5 	# Linking rules
      6 	group rules "Varying linking rules"
      7 		# not declared in vertex shader, declared in fragment shader
      8 		case fragment_declare
      9 			version 300 es
     10 			desc "varying declared in fragment shader, no reference in vertex shader"
     11 			values { output float out0 = 1.0; }
     12 			vertex ""
     13 				#version 300 es
     14 				${VERTEX_DECLARATIONS}
     15 				void main()
     16 				{
     17 					${VERTEX_OUTPUT}
     18 				}
     19 			""
     20 			fragment ""
     21 				#version 300 es
     22 				precision mediump float;
     23 				in mediump float var;
     24 				${FRAGMENT_DECLARATIONS}
     25 				void main()
     26 				{
     27 					out0 = 1.0;
     28 					${FRAGMENT_OUTPUT}
     29 				}
     30 			""
     31 		end
     32 
     33 		# declared in vertex shader, no reference in frag shader
     34 		case vertex_declare
     35 			version 300 es
     36 			desc "varying declared in vertex shader, no reference in fragment shader"
     37 			vertex ""
     38 				#version 300 es
     39 				${VERTEX_DECLARATIONS}
     40 				out mediump float var;
     41 				void main()
     42 				{
     43 					${VERTEX_OUTPUT}
     44 				}
     45 			""
     46 			fragment ""
     47 				#version 300 es
     48 				${FRAGMENT_DECLARATIONS}
     49 				void main()
     50 				{
     51 					${FRAG_COLOR} = vec4(1.0);
     52 				}
     53 			""
     54 		end
     55 
     56 		# declared in vertex shader, declared in frag shader
     57 		case both_declare
     58 			version 300 es
     59 			desc "varying declared in both vertex and fragment shader, but not used"
     60 			vertex ""
     61 				#version 300 es
     62 				${VERTEX_DECLARATIONS}
     63 				out mediump float var;
     64 				void main()
     65 				{
     66 					${VERTEX_OUTPUT}
     67 				}
     68 			""
     69 			fragment ""
     70 				#version 300 es
     71 				in mediump float var;
     72 				${FRAGMENT_DECLARATIONS}
     73 				void main()
     74 				{
     75 					${FRAG_COLOR} = vec4(1.0);
     76 				}
     77 			""
     78 		end
     79 
     80 		# declared in vertex shader, static use in frag shader
     81 		case vertex_declare_fragment_use
     82 			version 300 es
     83 			desc "varying declared in both shaders, statically used in fragment shader"
     84 			values { uniform bool u_false = false; }
     85 			vertex ""
     86 				#version 300 es
     87 				${VERTEX_DECLARATIONS}
     88 				out mediump float var;
     89 				void main()
     90 				{
     91 					${VERTEX_OUTPUT}
     92 				}
     93 			""
     94 			fragment ""
     95 				#version 300 es
     96 				in mediump float var;
     97 				${FRAGMENT_DECLARATIONS}
     98 				void main()
     99 				{
    100 					if (u_false)
    101 						${FRAG_COLOR} = vec4(var);
    102 					else
    103 						${FRAG_COLOR} = vec4(1.0);
    104 				}
    105 			""
    106 		end
    107 
    108 		# static use in vertex shader, no reference in fragment shader
    109 		case vertex_use_fragment_declare
    110 			version 300 es
    111 			desc "varying declared and statically used in vertex shader, no reference in fragment shader"
    112 			values { uniform bool u_false = false; }
    113 			vertex ""
    114 				#version 300 es
    115 				${VERTEX_DECLARATIONS}
    116 				out mediump float var;
    117 				void main()
    118 				{
    119 					if (u_false)
    120 						var = 1.0;
    121 					${VERTEX_OUTPUT}
    122 				}
    123 			""
    124 			fragment ""
    125 				#version 300 es
    126 				${FRAGMENT_DECLARATIONS}
    127 				void main()
    128 				{
    129 					${FRAG_COLOR} = vec4(1.0);
    130 				}
    131 			""
    132 		end
    133 
    134 		# static use in vertex shader, declared in fragment shader
    135 		case vertex_use_declare_fragment
    136 			version 300 es
    137 			desc "varying declared and statically used in vertex shader, only declared in fragment shader"
    138 			values { uniform bool u_false = false; }
    139 			vertex ""
    140 				#version 300 es
    141 				${VERTEX_DECLARATIONS}
    142 				out mediump float var;
    143 				void main()
    144 				{
    145 					if (u_false)
    146 						var = 1.0;
    147 					${VERTEX_OUTPUT}
    148 				}
    149 			""
    150 			fragment ""
    151 				#version 300 es
    152 				in mediump float var;
    153 				${FRAGMENT_DECLARATIONS}
    154 				void main()
    155 				{
    156 					${FRAG_COLOR} = vec4(1.0);
    157 				}
    158 			""
    159 		end
    160 
    161 		# static use in vertex shader, used in fragment shader
    162 		case vertex_use_fragment_use
    163 			version 300 es
    164 			desc "varying statically used in both vertex and fragment shader"
    165 			values { uniform bool u_false = false; }
    166 			vertex ""
    167 				#version 300 es
    168 				${VERTEX_DECLARATIONS}
    169 				out mediump float var;
    170 				void main()
    171 				{
    172 					if (u_false)
    173 						var = 1.0;
    174 					${VERTEX_OUTPUT}
    175 				}
    176 			""
    177 			fragment ""
    178 				#version 300 es
    179 				${FRAGMENT_DECLARATIONS}
    180 				in mediump float var;
    181 				void main()
    182 				{
    183 					if (u_false)
    184 						${FRAG_COLOR} = vec4(var);
    185 					else
    186 						${FRAG_COLOR} = vec4(1.0);
    187 				}
    188 			""
    189 		end
    190 
    191 		# differing precision tests
    192 		case differing_precision_1
    193 			version 300 es
    194 			desc "varying declared as highp in vertex shader, but mediump in fragment shader"
    195 			values
    196 			{
    197 				input float in0		= [ -1.25 | -25.55 | 1.0 | 2.25 | 3.4 | 16.0 ];
    198 				output float out0	= [ -1.25 | -25.55 | 1.0 | 2.25 | 3.4 | 16.0 ];
    199 			}
    200 
    201 			vertex ""
    202 				#version 300 es
    203 				${VERTEX_DECLARATIONS}
    204 				out highp float var;
    205 				void main()
    206 				{
    207 					var = in0;
    208 					${VERTEX_OUTPUT}
    209 				}
    210 			""
    211 			fragment ""
    212 				#version 300 es
    213 				precision mediump float;
    214 				${FRAGMENT_DECLARATIONS}
    215 				in mediump float var;
    216 				void main()
    217 				{
    218 					out0 = var;
    219 					${FRAGMENT_OUTPUT}
    220 				}
    221 			""
    222 		end
    223 
    224 		# differing precision tests
    225 		case differing_precision_2
    226 			version 300 es
    227 			desc "varying declared as highp in vertex shader, but lowp in fragment shader"
    228 			values
    229 			{
    230 				input float in0		= [ -1.25 | -25.56 | 1.0 | 2.25 | 3.4 | 16.0 ];
    231 				output float out0	= [ -1.25 | -25.56 | 1.0 | 2.25 | 3.4 | 16.0 ];
    232 			}
    233 
    234 			vertex ""
    235 				#version 300 es
    236 				${VERTEX_DECLARATIONS}
    237 				out highp vec2 var;
    238 				void main()
    239 				{
    240 					var = vec2(in0, 2.0*in0);
    241 					${VERTEX_OUTPUT}
    242 				}
    243 			""
    244 			fragment ""
    245 				#version 300 es
    246 				precision mediump float;
    247 				${FRAGMENT_DECLARATIONS}
    248 				in lowp vec2 var;
    249 				void main()
    250 				{
    251 					out0 = var.y - var.x;
    252 					${FRAGMENT_OUTPUT}
    253 				}
    254 			""
    255 		end
    256 
    257 		# differing precision tests
    258 		case differing_precision_3
    259 			version 300 es
    260 			desc "varying declared as lowp in vertex shader, but mediump in fragment shader"
    261 			values
    262 			{
    263 				input float in0		= [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
    264 				output float out0	= [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
    265 			}
    266 
    267 			vertex ""
    268 				#version 300 es
    269 				${VERTEX_DECLARATIONS}
    270 				out lowp vec4 var;
    271 				void main()
    272 				{
    273 					var = vec4(in0, 2.0*in0, -in0, -in0);
    274 					${VERTEX_OUTPUT}
    275 				}
    276 			""
    277 			fragment ""
    278 				#version 300 es
    279 				precision mediump float;
    280 				${FRAGMENT_DECLARATIONS}
    281 				in mediump vec4 var;
    282 				void main()
    283 				{
    284 					out0 = var.x + var.y + var.z + var.w;
    285 					${FRAGMENT_OUTPUT}
    286 				}
    287 			""
    288 		end
    289 
    290 		# mismatched type, static use but no runtime use in the fragment shader
    291 		case type_mismatch_1
    292 			version 300 es
    293 			desc "varying type mismatch (float vs. vec2), static use but no runtime use in the fragment shader"
    294 			expect link_fail
    295 			vertex ""
    296 				#version 300 es
    297 				${VERTEX_DECLARATIONS}
    298 				out mediump float var;
    299 				void main()
    300 				{
    301 					var = 2.0;
    302 					${VERTEX_OUTPUT}
    303 				}
    304 			""
    305 			fragment ""
    306 				#version 300 es
    307 				${FRAGMENT_DECLARATIONS}
    308 				in mediump vec2 var;
    309 				void main()
    310 				{
    311 					if (false)
    312 					{
    313 						${FRAG_COLOR} = vec4(var.y);
    314 					}
    315 					else
    316 					{
    317 						${FRAG_COLOR} = vec4(1.0);
    318 					}
    319 				}
    320 			""
    321 		end
    322 
    323 		# mismatched type, varyings used
    324 		case type_mismatch_2
    325 			version 300 es
    326 			desc "varying type mismatch (float vs. vec2)"
    327 			expect link_fail
    328 			vertex ""
    329 				#version 300 es
    330 				${VERTEX_DECLARATIONS}
    331 				out mediump float var;
    332 				void main()
    333 				{
    334 					var = 2.0;
    335 					${VERTEX_OUTPUT}
    336 				}
    337 			""
    338 			fragment ""
    339 				#version 300 es
    340 				${FRAGMENT_DECLARATIONS}
    341 				in mediump vec2 var;
    342 				void main()
    343 				{
    344 					${FRAG_COLOR} = var.xyyx;
    345 				}
    346 			""
    347 		end
    348 
    349 		# mismatched type, varyings used
    350 		case type_mismatch_3
    351 			version 300 es
    352 			desc "varying type mismatch (int vs. uint)"
    353 			expect link_fail
    354 			vertex ""
    355 				#version 300 es
    356 				${VERTEX_DECLARATIONS}
    357 				flat out mediump int var;
    358 				void main()
    359 				{
    360 					var = 2;
    361 					${VERTEX_OUTPUT}
    362 				}
    363 			""
    364 			fragment ""
    365 				#version 300 es
    366 				${FRAGMENT_DECLARATIONS}
    367 				flat in mediump uint var;
    368 				void main()
    369 				{
    370 					${FRAG_COLOR} = vec4(var);
    371 				}
    372 			""
    373 		end
    374 
    375 		# mismatched type, varyings used
    376 		case struct_type_mismatch_1
    377 			version 300 es
    378 			desc "struct member mismatch"
    379 			expect link_fail
    380 			vertex ""
    381 				#version 300 es
    382 				${VERTEX_DECLARATIONS}
    383 				struct S { highp float a; highp vec2 b; };
    384 				out S var;
    385 				void main()
    386 				{
    387 					var.a = 2.0;
    388 					var.b = vec2(1.0, 0.0);
    389 					${VERTEX_OUTPUT}
    390 				}
    391 			""
    392 			fragment ""
    393 				#version 300 es
    394 				${FRAGMENT_DECLARATIONS}
    395 				struct S { highp float a; highp vec3 b; };
    396 				in S var;
    397 				void main()
    398 				{
    399 					${FRAG_COLOR} = vec4(var.a, var.b);
    400 				}
    401 			""
    402 		end
    403 
    404 		# mismatched type, varyings unused in fragment shader (runtime)
    405 		case struct_type_mismatch_2
    406 			version 300 es
    407 			desc "struct member mismatch"
    408 			expect link_fail
    409 			vertex ""
    410 				#version 300 es
    411 				${VERTEX_DECLARATIONS}
    412 				struct S { highp float a; highp vec2 b; };
    413 				out S var;
    414 				void main()
    415 				{
    416 					var.a = 2.0;
    417 					var.b = vec2(1.0, 0.0);
    418 					${VERTEX_OUTPUT}
    419 				}
    420 			""
    421 			fragment ""
    422 				#version 300 es
    423 				${FRAGMENT_DECLARATIONS}
    424 				struct S { highp float a; highp vec3 b; };
    425 				in S var;
    426 				void main()
    427 				{
    428 					${FRAG_COLOR} = vec4(var.a);
    429 					if (false)
    430 						${FRAG_COLOR}.yzw = var.b;
    431 				}
    432 			""
    433 		end
    434 
    435 		# mismatched type, varyings unused in both (runtime)
    436 		case struct_type_mismatch_3
    437 			version 300 es
    438 			desc "struct member mismatch"
    439 			expect link_fail
    440 			vertex ""
    441 				#version 300 es
    442 				${VERTEX_DECLARATIONS}
    443 				struct S { highp float a; highp vec2 b; };
    444 				out S var;
    445 				void main()
    446 				{
    447 					var.a = 2.0;
    448 					if (false)
    449 						var.b = vec2(1.0, 0.0);
    450 					${VERTEX_OUTPUT}
    451 				}
    452 			""
    453 			fragment ""
    454 				#version 300 es
    455 				${FRAGMENT_DECLARATIONS}
    456 				struct S { highp float a; highp vec3 b; };
    457 				in S var;
    458 				void main()
    459 				{
    460 					${FRAG_COLOR} = vec4(var.a);
    461 					if (false)
    462 						${FRAG_COLOR}.yzw = var.b;
    463 				}
    464 			""
    465 		end
    466 
    467 		# interpolation_mismatch
    468 		case interpolation_mismatch_1
    469 			version 300 es
    470 			desc "varying interpolation different (flat vs. smooth)"
    471 			expect link_fail
    472 
    473 			vertex ""
    474 				#version 300 es
    475 				${VERTEX_DECLARATIONS}
    476 				in highp float in0;
    477 				flat out mediump float var;
    478 				void main()
    479 				{
    480 					var = in0;
    481 					${VERTEX_OUTPUT}
    482 				}
    483 			""
    484 			fragment ""
    485 				#version 300 es
    486 				precision mediump float;
    487 				${FRAGMENT_DECLARATIONS}
    488 				in mediump float var;
    489 				void main()
    490 				{
    491 					${FRAG_COLOR} = vec4(var);
    492 				}
    493 			""
    494 		end
    495 
    496 		# different interpolation
    497 		case differing_interpolation_2
    498 			version 300 es
    499 			desc "varying interpolation different (smooth vs. centroid)"
    500 			values
    501 			{
    502 				input float in0		= [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
    503 				output float out0	= [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
    504 			}
    505 
    506 			vertex ""
    507 				#version 300 es
    508 				${VERTEX_DECLARATIONS}
    509 				smooth out mediump float var;
    510 				void main()
    511 				{
    512 					var = in0;
    513 					${VERTEX_OUTPUT}
    514 				}
    515 			""
    516 			fragment ""
    517 				#version 300 es
    518 				precision mediump float;
    519 				${FRAGMENT_DECLARATIONS}
    520 				centroid in mediump float var;
    521 				void main()
    522 				{
    523 					out0 = var;
    524 					${FRAGMENT_OUTPUT}
    525 				}
    526 			""
    527 		end
    528 
    529 		# no declaration in vertex shader, but static use in fragment
    530 		case illegal_usage_1
    531 			version 300 es
    532 			desc "varying not declared in vertex shader, but statically used in fragment shader"
    533 			expect link_fail
    534 			vertex ""
    535 				#version 300 es
    536 				${VERTEX_DECLARATIONS}
    537 				void main()
    538 				{
    539 					${VERTEX_OUTPUT}
    540 				}
    541 			""
    542 			fragment ""
    543 				#version 300 es
    544 				${FRAGMENT_DECLARATIONS}
    545 				in mediump float var;
    546 				void main()
    547 				{
    548 					${FRAG_COLOR} = vec4(var);
    549 				}
    550 			""
    551 		end
    552 
    553 		# non-flat integer varyings not allowed
    554 		case invalid_type_int
    555 			version 300 es
    556 			desc "integer varying used"
    557 			expect compile_fail
    558 			vertex ""
    559 				#version 300 es
    560 				${VERTEX_DECLARATIONS}
    561 				out mediump int var;
    562 				void main()
    563 				{
    564 					${VERTEX_OUTPUT}
    565 				}
    566 			""
    567 			fragment ""
    568 				#version 300 es
    569 				${FRAGMENT_DECLARATIONS}
    570 				in mediump int var;
    571 				void main()
    572 				{
    573 					${FRAG_COLOR} = vec4(1.0);
    574 				}
    575 			""
    576 		end
    577 
    578 		# non-flat integer varyings not allowed
    579 		case invalid_type_uint
    580 			version 300 es
    581 			desc "integer varying used"
    582 			expect compile_fail
    583 			vertex ""
    584 				#version 300 es
    585 				${VERTEX_DECLARATIONS}
    586 				out mediump uint var;
    587 				void main()
    588 				{
    589 					${VERTEX_OUTPUT}
    590 				}
    591 			""
    592 			fragment ""
    593 				#version 300 es
    594 				${FRAGMENT_DECLARATIONS}
    595 				in mediump uint var;
    596 				void main()
    597 				{
    598 					${FRAG_COLOR} = vec4(1.0);
    599 				}
    600 			""
    601 		end
    602 
    603 		# bool varyings not allowed
    604 		case invalid_type_bool
    605 			version 300 es
    606 			desc "boolean varying used"
    607 			expect compile_fail
    608 			vertex ""
    609 				#version 300 es
    610 				${VERTEX_DECLARATIONS}
    611 				out bool var;
    612 				void main()
    613 				{
    614 					${VERTEX_OUTPUT}
    615 				}
    616 			""
    617 			fragment ""
    618 				#version 300 es
    619 				${FRAGMENT_DECLARATIONS}
    620 				in bool var;
    621 				void main()
    622 				{
    623 					${FRAG_COLOR} = vec4(1.0);
    624 				}
    625 			""
    626 		end
    627 
    628 		case invalid_type_struct_array
    629 			version 300 es
    630 			desc "float array inside struct"
    631 			expect compile_fail
    632 			vertex ""
    633 				#version 300 es
    634 				${VERTEX_DECLARATIONS}
    635 				struct S { mediump float a[3]; };
    636 				out S var;
    637 				void main()
    638 				{
    639 					var.a[0] = 1.0;
    640 					var.a[1] = 1.0;
    641 					var.a[2] = 1.0;
    642 					${VERTEX_OUTPUT}
    643 				}
    644 			""
    645 			fragment ""
    646 				#version 300 es
    647 				precision mediump float;
    648 				${FRAGMENT_DECLARATIONS}
    649 				struct S { mediump float a[3]; };
    650 				in S var;
    651 				void main()
    652 				{
    653 					${FRAG_COLOR} = vec4(1.0);
    654 				}
    655 			""
    656 		end
    657 
    658 		case invalid_type_struct_struct
    659 			version 300 es
    660 			desc "struct inside struct"
    661 			expect compile_fail
    662 			vertex ""
    663 				#version 300 es
    664 				${VERTEX_DECLARATIONS}
    665 				struct S { mediump float a; };
    666 				struct T { S s; };
    667 				out T var;
    668 				void main()
    669 				{
    670 					var.s.a = 1.0;
    671 					${VERTEX_OUTPUT}
    672 				}
    673 			""
    674 			fragment ""
    675 				#version 300 es
    676 				precision mediump float;
    677 				${FRAGMENT_DECLARATIONS}
    678 				struct S { mediump float a; };
    679 				struct T { S s; };
    680 				in T var;
    681 				void main()
    682 				{
    683 					${FRAG_COLOR} = vec4(1.0);
    684 				}
    685 			""
    686 		end
    687 
    688 		case invalid_type_array_struct
    689 			version 300 es
    690 			desc "array of structs"
    691 			expect compile_fail
    692 			vertex ""
    693 				#version 300 es
    694 				${VERTEX_DECLARATIONS}
    695 				struct S { mediump int a; };
    696 				flat out S var[2];
    697 				void main()
    698 				{
    699 					${VERTEX_SETUP}
    700 					var[0].a = 1;
    701 					var[1].a = 1;
    702 					${VERTEX_OUTPUT}
    703 				}
    704 			""
    705 			fragment ""
    706 				#version 300 es
    707 				${FRAGMENT_DECLARATIONS}
    708 				struct S { mediump int a; };
    709 				flat in S var[2];
    710 				void main()
    711 				{
    712 					${FRAG_COLOR} = vec4(1.0);
    713 				}
    714 			""
    715 		end
    716 
    717 		case invalid_type_array_array
    718 			version 300 es
    719 			desc "array of arrays"
    720 			expect compile_fail
    721 			vertex ""
    722 				#version 300 es
    723 				${VERTEX_DECLARATIONS}
    724 				out mediump float var[2][2];
    725 				void main()
    726 				{
    727 					${VERTEX_SETUP}
    728 					var[0][0] = 1.0;
    729 					${VERTEX_OUTPUT}
    730 				}
    731 			""
    732 			fragment ""
    733 				#version 300 es
    734 				${FRAGMENT_DECLARATIONS}
    735 				in mediump float var[2][2];
    736 				void main()
    737 				{
    738 					${FRAG_COLOR} = vec4(1.0);
    739 				}
    740 			""
    741 		end
    742 	end
    743 
    744 	group basic_types "Basic varying types"
    745 		case float
    746 			version 300 es
    747 			desc "varying of type float"
    748 			values
    749 			{
    750 				input float in0		= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
    751 				output float out0	= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
    752 			}
    753 			vertex ""
    754 				#version 300 es
    755 				${VERTEX_DECLARATIONS}
    756 				out mediump float var;
    757 				void main()
    758 				{
    759 					var = in0;
    760 					${VERTEX_OUTPUT}
    761 				}
    762 			""
    763 			fragment ""
    764 				#version 300 es
    765 				precision mediump float;
    766 				${FRAGMENT_DECLARATIONS}
    767 				in float var;
    768 				void main()
    769 				{
    770 					out0 = var;
    771 					${FRAGMENT_OUTPUT}
    772 				}
    773 			""
    774 		end
    775 
    776 		case vec2
    777 			version 300 es
    778 			desc "varying of type vec2"
    779 			values
    780 			{
    781 				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) ];
    782 				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) ];
    783 			}
    784 			vertex ""
    785 				#version 300 es
    786 				${VERTEX_DECLARATIONS}
    787 				out mediump vec2 var;
    788 				void main()
    789 				{
    790 					var = in0;
    791 					${VERTEX_OUTPUT}
    792 				}
    793 			""
    794 			fragment ""
    795 				#version 300 es
    796 				precision mediump float;
    797 				${FRAGMENT_DECLARATIONS}
    798 				in vec2 var;
    799 				void main()
    800 				{
    801 					out0 = var;
    802 					${FRAGMENT_OUTPUT}
    803 				}
    804 			""
    805 		end
    806 
    807 		case vec3
    808 			version 300 es
    809 			desc "varying of type vec3"
    810 			values
    811 			{
    812 				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) ];
    813 				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) ];
    814 			}
    815 			vertex ""
    816 				#version 300 es
    817 				${VERTEX_DECLARATIONS}
    818 				out mediump vec3 var;
    819 				void main()
    820 				{
    821 					var = in0;
    822 					${VERTEX_OUTPUT}
    823 				}
    824 			""
    825 			fragment ""
    826 				#version 300 es
    827 				precision mediump float;
    828 				${FRAGMENT_DECLARATIONS}
    829 				in vec3 var;
    830 				void main()
    831 				{
    832 					out0 = var;
    833 					${FRAGMENT_OUTPUT}
    834 				}
    835 			""
    836 		end
    837 
    838 		case vec4
    839 			version 300 es
    840 			desc "varying of type vec4"
    841 			values
    842 			{
    843 				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) ];
    844 				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) ];
    845 			}
    846 			vertex ""
    847 				#version 300 es
    848 				${VERTEX_DECLARATIONS}
    849 				out mediump vec4 var;
    850 				void main()
    851 				{
    852 					var = in0;
    853 					${VERTEX_OUTPUT}
    854 				}
    855 			""
    856 			fragment ""
    857 				#version 300 es
    858 				precision mediump float;
    859 				${FRAGMENT_DECLARATIONS}
    860 				in vec4 var;
    861 				void main()
    862 				{
    863 					out0 = var;
    864 					${FRAGMENT_OUTPUT}
    865 				}
    866 			""
    867 		end
    868 
    869 		case mat2
    870 			version 300 es
    871 			desc "varying of type mat2"
    872 			values
    873 			{
    874 				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) ];
    875 				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) ];
    876 			}
    877 			vertex ""
    878 				#version 300 es
    879 				${VERTEX_DECLARATIONS}
    880 				out mediump mat2 var;
    881 				void main()
    882 				{
    883 					var = in0;
    884 					${VERTEX_OUTPUT}
    885 				}
    886 			""
    887 			fragment ""
    888 				#version 300 es
    889 				precision mediump float;
    890 				${FRAGMENT_DECLARATIONS}
    891 				in mat2 var;
    892 				void main()
    893 				{
    894 					out0 = var;
    895 					${FRAGMENT_OUTPUT}
    896 				}
    897 			""
    898 		end
    899 
    900 		case mat2x3
    901 			version 300 es
    902 			desc "varying of type mat2x3"
    903 			values
    904 			{
    905 				input mat2x3 in0	= [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
    906 				output mat2x3 out0	= [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
    907 			}
    908 			vertex ""
    909 				#version 300 es
    910 				${VERTEX_DECLARATIONS}
    911 				out mediump mat2x3 var;
    912 				void main()
    913 				{
    914 					var = in0;
    915 					${VERTEX_OUTPUT}
    916 				}
    917 			""
    918 			fragment ""
    919 				#version 300 es
    920 				precision mediump float;
    921 				${FRAGMENT_DECLARATIONS}
    922 				in mat2x3 var;
    923 				void main()
    924 				{
    925 					out0 = var;
    926 					${FRAGMENT_OUTPUT}
    927 				}
    928 			""
    929 		end
    930 
    931 		case mat2x4
    932 			version 300 es
    933 			desc "varying of type mat2x4"
    934 			values
    935 			{
    936 				input mat2x4 in0	= [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
    937 				output mat2x4 out0	= [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
    938 			}
    939 			vertex ""
    940 				#version 300 es
    941 				${VERTEX_DECLARATIONS}
    942 				out mediump mat2x4 var;
    943 				void main()
    944 				{
    945 					var = in0;
    946 					${VERTEX_OUTPUT}
    947 				}
    948 			""
    949 			fragment ""
    950 				#version 300 es
    951 				precision mediump float;
    952 				${FRAGMENT_DECLARATIONS}
    953 				in mat2x4 var;
    954 				void main()
    955 				{
    956 					out0 = var;
    957 					${FRAGMENT_OUTPUT}
    958 				}
    959 			""
    960 		end
    961 
    962 		case mat3x2
    963 			version 300 es
    964 			desc "varying of type mat3x2"
    965 			values
    966 			{
    967 				input mat3x2 in0	= [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
    968 				output mat3x2 out0	= [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
    969 			}
    970 			vertex ""
    971 				#version 300 es
    972 				${VERTEX_DECLARATIONS}
    973 				out mediump mat3x2 var;
    974 				void main()
    975 				{
    976 					var = in0;
    977 					${VERTEX_OUTPUT}
    978 				}
    979 			""
    980 			fragment ""
    981 				#version 300 es
    982 				precision mediump float;
    983 				${FRAGMENT_DECLARATIONS}
    984 				in mat3x2 var;
    985 				void main()
    986 				{
    987 					out0 = var;
    988 					${FRAGMENT_OUTPUT}
    989 				}
    990 			""
    991 		end
    992 
    993 		case mat3
    994 			version 300 es
    995 			desc "varying of type mat3"
    996 			values
    997 			{
    998 				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) ];
    999 				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) ];
   1000 			}
   1001 			vertex ""
   1002 				#version 300 es
   1003 				${VERTEX_DECLARATIONS}
   1004 				out mediump mat3 var;
   1005 				void main()
   1006 				{
   1007 					var = in0;
   1008 					${VERTEX_OUTPUT}
   1009 				}
   1010 			""
   1011 			fragment ""
   1012 				#version 300 es
   1013 				precision mediump float;
   1014 				${FRAGMENT_DECLARATIONS}
   1015 				in mat3 var;
   1016 				void main()
   1017 				{
   1018 					out0 = var;
   1019 					${FRAGMENT_OUTPUT}
   1020 				}
   1021 			""
   1022 		end
   1023 
   1024 		case mat3x4
   1025 			version 300 es
   1026 			desc "varying of type mat3x4"
   1027 			values
   1028 			{
   1029 				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) ];
   1030 				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) ];
   1031 			}
   1032 			vertex ""
   1033 				#version 300 es
   1034 				${VERTEX_DECLARATIONS}
   1035 				out mediump mat3x4 var;
   1036 				void main()
   1037 				{
   1038 					var = in0;
   1039 					${VERTEX_OUTPUT}
   1040 				}
   1041 			""
   1042 			fragment ""
   1043 				#version 300 es
   1044 				precision mediump float;
   1045 				${FRAGMENT_DECLARATIONS}
   1046 				in mat3x4 var;
   1047 				void main()
   1048 				{
   1049 					out0 = var;
   1050 					${FRAGMENT_OUTPUT}
   1051 				}
   1052 			""
   1053 		end
   1054 
   1055 		case mat4x2
   1056 			version 300 es
   1057 			desc "varying of type mat4x2"
   1058 			values
   1059 			{
   1060 				input mat4x2 in0	= [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
   1061 				output mat4x2 out0	= [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
   1062 			}
   1063 			vertex ""
   1064 				#version 300 es
   1065 				${VERTEX_DECLARATIONS}
   1066 				out mediump mat4x2 var;
   1067 				void main()
   1068 				{
   1069 					var = in0;
   1070 					${VERTEX_OUTPUT}
   1071 				}
   1072 			""
   1073 			fragment ""
   1074 				#version 300 es
   1075 				precision mediump float;
   1076 				${FRAGMENT_DECLARATIONS}
   1077 				in mat4x2 var;
   1078 				void main()
   1079 				{
   1080 					out0 = var;
   1081 					${FRAGMENT_OUTPUT}
   1082 				}
   1083 			""
   1084 		end
   1085 
   1086 		case mat4x3
   1087 			version 300 es
   1088 			desc "varying of type mat4x3"
   1089 			values
   1090 			{
   1091 				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) ];
   1092 				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) ];
   1093 			}
   1094 			vertex ""
   1095 				#version 300 es
   1096 				${VERTEX_DECLARATIONS}
   1097 				out mediump mat4x3 var;
   1098 				void main()
   1099 				{
   1100 					var = in0;
   1101 					${VERTEX_OUTPUT}
   1102 				}
   1103 			""
   1104 			fragment ""
   1105 				#version 300 es
   1106 				precision mediump float;
   1107 				${FRAGMENT_DECLARATIONS}
   1108 				in mat4x3 var;
   1109 				void main()
   1110 				{
   1111 					out0 = var;
   1112 					${FRAGMENT_OUTPUT}
   1113 				}
   1114 			""
   1115 		end
   1116 
   1117 		case mat4
   1118 			version 300 es
   1119 			desc "varying of type mat4"
   1120 			values
   1121 			{
   1122 				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) ];
   1123 				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) ];
   1124 			}
   1125 			vertex ""
   1126 				#version 300 es
   1127 				${VERTEX_DECLARATIONS}
   1128 				out mediump mat4 var;
   1129 				void main()
   1130 				{
   1131 					var = in0;
   1132 					${VERTEX_OUTPUT}
   1133 				}
   1134 			""
   1135 			fragment ""
   1136 				#version 300 es
   1137 				precision mediump float;
   1138 				${FRAGMENT_DECLARATIONS}
   1139 				in mat4 var;
   1140 				void main()
   1141 				{
   1142 					out0 = var;
   1143 					${FRAGMENT_OUTPUT}
   1144 				}
   1145 			""
   1146 		end
   1147 
   1148 		case int
   1149 			version 300 es
   1150 			desc "varying of type int"
   1151 			values
   1152 			{
   1153 				input int in0		= [ -1 | -25 | 1 | 2 | 3 | 16 ];
   1154 				output int out0		= [ -1 | -25 | 1 | 2 | 3 | 16 ];
   1155 			}
   1156 			vertex ""
   1157 				#version 300 es
   1158 				${VERTEX_DECLARATIONS}
   1159 				flat out mediump int var;
   1160 				void main()
   1161 				{
   1162 					${VERTEX_SETUP}
   1163 					var = in0;
   1164 					${VERTEX_OUTPUT}
   1165 				}
   1166 			""
   1167 			fragment ""
   1168 				#version 300 es
   1169 				${FRAGMENT_DECLARATIONS}
   1170 				flat in int var;
   1171 				void main()
   1172 				{
   1173 					out0 = var;
   1174 					${FRAGMENT_OUTPUT}
   1175 				}
   1176 			""
   1177 		end
   1178 
   1179 		case ivec2
   1180 			version 300 es
   1181 			desc "varying of type ivec2"
   1182 			values
   1183 			{
   1184 				input ivec2 in0		= [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
   1185 				output ivec2 out0	= [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
   1186 			}
   1187 			vertex ""
   1188 				#version 300 es
   1189 				${VERTEX_DECLARATIONS}
   1190 				flat out mediump ivec2 var;
   1191 				void main()
   1192 				{
   1193 					${VERTEX_SETUP}
   1194 					var = in0;
   1195 					${VERTEX_OUTPUT}
   1196 				}
   1197 			""
   1198 			fragment ""
   1199 				#version 300 es
   1200 				${FRAGMENT_DECLARATIONS}
   1201 				flat in ivec2 var;
   1202 				void main()
   1203 				{
   1204 					out0 = var;
   1205 					${FRAGMENT_OUTPUT}
   1206 				}
   1207 			""
   1208 		end
   1209 
   1210 		case ivec3
   1211 			version 300 es
   1212 			desc "varying of type ivec3"
   1213 			values
   1214 			{
   1215 				input ivec3 in0		= [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
   1216 				output ivec3 out0	= [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
   1217 			}
   1218 			vertex ""
   1219 				#version 300 es
   1220 				${VERTEX_DECLARATIONS}
   1221 				flat out mediump ivec3 var;
   1222 				void main()
   1223 				{
   1224 					${VERTEX_SETUP}
   1225 					var = in0;
   1226 					${VERTEX_OUTPUT}
   1227 				}
   1228 			""
   1229 			fragment ""
   1230 				#version 300 es
   1231 				${FRAGMENT_DECLARATIONS}
   1232 				flat in ivec3 var;
   1233 				void main()
   1234 				{
   1235 					out0 = var;
   1236 					${FRAGMENT_OUTPUT}
   1237 				}
   1238 			""
   1239 		end
   1240 
   1241 		case ivec4
   1242 			version 300 es
   1243 			desc "varying of type ivec4"
   1244 			values
   1245 			{
   1246 				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) ];
   1247 				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) ];
   1248 			}
   1249 			vertex ""
   1250 				#version 300 es
   1251 				${VERTEX_DECLARATIONS}
   1252 				flat out mediump ivec4 var;
   1253 				void main()
   1254 				{
   1255 					${VERTEX_SETUP}
   1256 					var = in0;
   1257 					${VERTEX_OUTPUT}
   1258 				}
   1259 			""
   1260 			fragment ""
   1261 				#version 300 es
   1262 				${FRAGMENT_DECLARATIONS}
   1263 				flat in ivec4 var;
   1264 				void main()
   1265 				{
   1266 					out0 = var;
   1267 					${FRAGMENT_OUTPUT}
   1268 				}
   1269 			""
   1270 		end
   1271 
   1272 		case uint
   1273 			version 300 es
   1274 			desc "varying of type int"
   1275 			values
   1276 			{
   1277 				input uint in0			= [ 1 | 2 | 3 | 16 ];
   1278 				output uint out0		= [ 1 | 2 | 3 | 16 ];
   1279 			}
   1280 			vertex ""
   1281 				#version 300 es
   1282 				${VERTEX_DECLARATIONS}
   1283 				flat out mediump uint var;
   1284 				void main()
   1285 				{
   1286 					${VERTEX_SETUP}
   1287 					var = in0;
   1288 					${VERTEX_OUTPUT}
   1289 				}
   1290 			""
   1291 			fragment ""
   1292 				#version 300 es
   1293 				${FRAGMENT_DECLARATIONS}
   1294 				flat in uint var;
   1295 				void main()
   1296 				{
   1297 					out0 = var;
   1298 					${FRAGMENT_OUTPUT}
   1299 				}
   1300 			""
   1301 		end
   1302 
   1303 		case uvec2
   1304 			version 300 es
   1305 			desc "varying of type uvec2"
   1306 			values
   1307 			{
   1308 				input uvec2 in0		= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
   1309 				output uvec2 out0	= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
   1310 			}
   1311 			vertex ""
   1312 				#version 300 es
   1313 				${VERTEX_DECLARATIONS}
   1314 				flat out mediump uvec2 var;
   1315 				void main()
   1316 				{
   1317 					${VERTEX_SETUP}
   1318 					var = in0;
   1319 					${VERTEX_OUTPUT}
   1320 				}
   1321 			""
   1322 			fragment ""
   1323 				#version 300 es
   1324 				${FRAGMENT_DECLARATIONS}
   1325 				flat in uvec2 var;
   1326 				void main()
   1327 				{
   1328 					out0 = var;
   1329 					${FRAGMENT_OUTPUT}
   1330 				}
   1331 			""
   1332 		end
   1333 
   1334 		case uvec3
   1335 			version 300 es
   1336 			desc "varying of type uvec3"
   1337 			values
   1338 			{
   1339 				input uvec3 in0		= [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
   1340 				output uvec3 out0	= [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
   1341 			}
   1342 			vertex ""
   1343 				#version 300 es
   1344 				${VERTEX_DECLARATIONS}
   1345 				flat out mediump uvec3 var;
   1346 				void main()
   1347 				{
   1348 					${VERTEX_SETUP}
   1349 					var = in0;
   1350 					${VERTEX_OUTPUT}
   1351 				}
   1352 			""
   1353 			fragment ""
   1354 				#version 300 es
   1355 				${FRAGMENT_DECLARATIONS}
   1356 				flat in uvec3 var;
   1357 				void main()
   1358 				{
   1359 					out0 = var;
   1360 					${FRAGMENT_OUTPUT}
   1361 				}
   1362 			""
   1363 		end
   1364 
   1365 		case uvec4
   1366 			version 300 es
   1367 			desc "varying of type uvec4"
   1368 			values
   1369 			{
   1370 				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) ];
   1371 				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) ];
   1372 			}
   1373 			vertex ""
   1374 				#version 300 es
   1375 				${VERTEX_DECLARATIONS}
   1376 				flat out mediump uvec4 var;
   1377 				void main()
   1378 				{
   1379 					${VERTEX_SETUP}
   1380 					var = in0;
   1381 					${VERTEX_OUTPUT}
   1382 				}
   1383 			""
   1384 			fragment ""
   1385 				#version 300 es
   1386 				${FRAGMENT_DECLARATIONS}
   1387 				flat in uvec4 var;
   1388 				void main()
   1389 				{
   1390 					out0 = var;
   1391 					${FRAGMENT_OUTPUT}
   1392 				}
   1393 			""
   1394 		end
   1395 	end
   1396 
   1397 	group struct "Structure varyings"
   1398 		case float
   1399 			version 300 es
   1400 			desc "varying of type float inside struct"
   1401 			values
   1402 			{
   1403 				input float in0		= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
   1404 				output float out0	= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
   1405 			}
   1406 			vertex ""
   1407 				#version 300 es
   1408 				${VERTEX_DECLARATIONS}
   1409 				struct S { mediump float a; };
   1410 				out S var;
   1411 				void main()
   1412 				{
   1413 					var.a = in0;
   1414 					${VERTEX_OUTPUT}
   1415 				}
   1416 			""
   1417 			fragment ""
   1418 				#version 300 es
   1419 				precision mediump float;
   1420 				${FRAGMENT_DECLARATIONS}
   1421 				struct S { mediump float a; };
   1422 				in S var;
   1423 				void main()
   1424 				{
   1425 					out0 = var.a;
   1426 					${FRAGMENT_OUTPUT}
   1427 				}
   1428 			""
   1429 		end
   1430 
   1431 		case vec2
   1432 			version 300 es
   1433 			desc "varying of type vec2 inside struct"
   1434 			values
   1435 			{
   1436 				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) ];
   1437 				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) ];
   1438 			}
   1439 			vertex ""
   1440 				#version 300 es
   1441 				${VERTEX_DECLARATIONS}
   1442 				struct S { mediump vec2 a; };
   1443 				out S var;
   1444 				void main()
   1445 				{
   1446 					var.a = in0;
   1447 					${VERTEX_OUTPUT}
   1448 				}
   1449 			""
   1450 			fragment ""
   1451 				#version 300 es
   1452 				precision mediump float;
   1453 				${FRAGMENT_DECLARATIONS}
   1454 				struct S { mediump vec2 a; };
   1455 				in S var;
   1456 				void main()
   1457 				{
   1458 					out0 = var.a;
   1459 					${FRAGMENT_OUTPUT}
   1460 				}
   1461 			""
   1462 		end
   1463 
   1464 		case vec3
   1465 			version 300 es
   1466 			desc "varying of type vec3 inside struct"
   1467 			values
   1468 			{
   1469 				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) ];
   1470 				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) ];
   1471 			}
   1472 			vertex ""
   1473 				#version 300 es
   1474 				${VERTEX_DECLARATIONS}
   1475 				struct S { mediump vec3 a; };
   1476 				out S var;
   1477 				void main()
   1478 				{
   1479 					var.a = in0;
   1480 					${VERTEX_OUTPUT}
   1481 				}
   1482 			""
   1483 			fragment ""
   1484 				#version 300 es
   1485 				precision mediump float;
   1486 				${FRAGMENT_DECLARATIONS}
   1487 				struct S { mediump vec3 a; };
   1488 				in S var;
   1489 				void main()
   1490 				{
   1491 					out0 = var.a;
   1492 					${FRAGMENT_OUTPUT}
   1493 				}
   1494 			""
   1495 		end
   1496 
   1497 		case vec4
   1498 			version 300 es
   1499 			desc "varying of type vec4 inside struct"
   1500 			values
   1501 			{
   1502 				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) ];
   1503 				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) ];
   1504 			}
   1505 			vertex ""
   1506 				#version 300 es
   1507 				${VERTEX_DECLARATIONS}
   1508 				struct S { mediump vec4 a; };
   1509 				out S var;
   1510 				void main()
   1511 				{
   1512 					var.a = in0;
   1513 					${VERTEX_OUTPUT}
   1514 				}
   1515 			""
   1516 			fragment ""
   1517 				#version 300 es
   1518 				precision mediump float;
   1519 				${FRAGMENT_DECLARATIONS}
   1520 				struct S { mediump vec4 a; };
   1521 				in S var;
   1522 				void main()
   1523 				{
   1524 					out0 = var.a;
   1525 					${FRAGMENT_OUTPUT}
   1526 				}
   1527 			""
   1528 		end
   1529 
   1530 		case mat2
   1531 			version 300 es
   1532 			desc "varying of type mat2 inside struct"
   1533 			values
   1534 			{
   1535 				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) ];
   1536 				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) ];
   1537 			}
   1538 			vertex ""
   1539 				#version 300 es
   1540 				${VERTEX_DECLARATIONS}
   1541 				struct S { mediump mat2 a; };
   1542 				out S var;
   1543 				void main()
   1544 				{
   1545 					var.a = in0;
   1546 					${VERTEX_OUTPUT}
   1547 				}
   1548 			""
   1549 			fragment ""
   1550 				#version 300 es
   1551 				precision mediump float;
   1552 				${FRAGMENT_DECLARATIONS}
   1553 				struct S { mediump mat2 a; };
   1554 				in S var;
   1555 				void main()
   1556 				{
   1557 					out0 = var.a;
   1558 					${FRAGMENT_OUTPUT}
   1559 				}
   1560 			""
   1561 		end
   1562 
   1563 		case mat2x3
   1564 			version 300 es
   1565 			desc "varying of type mat2x3 inside struct"
   1566 			values
   1567 			{
   1568 				input mat2x3 in0	= [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
   1569 				output mat2x3 out0	= [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
   1570 			}
   1571 			vertex ""
   1572 				#version 300 es
   1573 				${VERTEX_DECLARATIONS}
   1574 				struct S { mediump mat2x3 a; };
   1575 				out S var;
   1576 				void main()
   1577 				{
   1578 					var.a = in0;
   1579 					${VERTEX_OUTPUT}
   1580 				}
   1581 			""
   1582 			fragment ""
   1583 				#version 300 es
   1584 				precision mediump float;
   1585 				${FRAGMENT_DECLARATIONS}
   1586 				struct S { mediump mat2x3 a; };
   1587 				in S var;
   1588 				void main()
   1589 				{
   1590 					out0 = var.a;
   1591 					${FRAGMENT_OUTPUT}
   1592 				}
   1593 			""
   1594 		end
   1595 
   1596 		case mat2x4
   1597 			version 300 es
   1598 			desc "varying of type mat2x4 inside struct"
   1599 			values
   1600 			{
   1601 				input mat2x4 in0	= [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
   1602 				output mat2x4 out0	= [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
   1603 			}
   1604 			vertex ""
   1605 				#version 300 es
   1606 				${VERTEX_DECLARATIONS}
   1607 				struct S { mediump mat2x4 a; };
   1608 				out S var;
   1609 				void main()
   1610 				{
   1611 					var.a = in0;
   1612 					${VERTEX_OUTPUT}
   1613 				}
   1614 			""
   1615 			fragment ""
   1616 				#version 300 es
   1617 				precision mediump float;
   1618 				${FRAGMENT_DECLARATIONS}
   1619 				struct S { mediump mat2x4 a; };
   1620 				in S var;
   1621 				void main()
   1622 				{
   1623 					out0 = var.a;
   1624 					${FRAGMENT_OUTPUT}
   1625 				}
   1626 			""
   1627 		end
   1628 
   1629 		case mat3x2
   1630 			version 300 es
   1631 			desc "varying of type mat3x2 inside struct"
   1632 			values
   1633 			{
   1634 				input mat3x2 in0	= [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
   1635 				output mat3x2 out0	= [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
   1636 			}
   1637 			vertex ""
   1638 				#version 300 es
   1639 				${VERTEX_DECLARATIONS}
   1640 				struct S { mediump mat3x2 a; };
   1641 				out S var;
   1642 				void main()
   1643 				{
   1644 					var.a = in0;
   1645 					${VERTEX_OUTPUT}
   1646 				}
   1647 			""
   1648 			fragment ""
   1649 				#version 300 es
   1650 				precision mediump float;
   1651 				${FRAGMENT_DECLARATIONS}
   1652 				struct S { mediump mat3x2 a; };
   1653 				in S var;
   1654 				void main()
   1655 				{
   1656 					out0 = var.a;
   1657 					${FRAGMENT_OUTPUT}
   1658 				}
   1659 			""
   1660 		end
   1661 
   1662 		case mat3
   1663 			version 300 es
   1664 			desc "varying of type mat3 inside struct"
   1665 			values
   1666 			{
   1667 				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) ];
   1668 				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) ];
   1669 			}
   1670 			vertex ""
   1671 				#version 300 es
   1672 				${VERTEX_DECLARATIONS}
   1673 				struct S { mediump mat3 a; };
   1674 				out S var;
   1675 				void main()
   1676 				{
   1677 					var.a = in0;
   1678 					${VERTEX_OUTPUT}
   1679 				}
   1680 			""
   1681 			fragment ""
   1682 				#version 300 es
   1683 				precision mediump float;
   1684 				${FRAGMENT_DECLARATIONS}
   1685 				struct S { mediump mat3 a; };
   1686 				in S var;
   1687 				void main()
   1688 				{
   1689 					out0 = var.a;
   1690 					${FRAGMENT_OUTPUT}
   1691 				}
   1692 			""
   1693 		end
   1694 
   1695 		case mat3x4
   1696 			version 300 es
   1697 			desc "varying of type mat3x4 inside struct"
   1698 			values
   1699 			{
   1700 				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) ];
   1701 				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) ];
   1702 			}
   1703 			vertex ""
   1704 				#version 300 es
   1705 				${VERTEX_DECLARATIONS}
   1706 				struct S { mediump mat3x4 a; };
   1707 				out S var;
   1708 				void main()
   1709 				{
   1710 					var.a = in0;
   1711 					${VERTEX_OUTPUT}
   1712 				}
   1713 			""
   1714 			fragment ""
   1715 				#version 300 es
   1716 				precision mediump float;
   1717 				${FRAGMENT_DECLARATIONS}
   1718 				struct S { mediump mat3x4 a; };
   1719 				in S var;
   1720 				void main()
   1721 				{
   1722 					out0 = var.a;
   1723 					${FRAGMENT_OUTPUT}
   1724 				}
   1725 			""
   1726 		end
   1727 
   1728 		case mat4x2
   1729 			version 300 es
   1730 			desc "varying of type mat4x2 inside struct"
   1731 			values
   1732 			{
   1733 				input mat4x2 in0	= [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
   1734 				output mat4x2 out0	= [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
   1735 			}
   1736 			vertex ""
   1737 				#version 300 es
   1738 				${VERTEX_DECLARATIONS}
   1739 				struct S { mediump mat4x2 a; };
   1740 				out S var;
   1741 				void main()
   1742 				{
   1743 					var.a = in0;
   1744 					${VERTEX_OUTPUT}
   1745 				}
   1746 			""
   1747 			fragment ""
   1748 				#version 300 es
   1749 				precision mediump float;
   1750 				${FRAGMENT_DECLARATIONS}
   1751 				struct S { mediump mat4x2 a; };
   1752 				in S var;
   1753 				void main()
   1754 				{
   1755 					out0 = var.a;
   1756 					${FRAGMENT_OUTPUT}
   1757 				}
   1758 			""
   1759 		end
   1760 
   1761 		case mat4x3
   1762 			version 300 es
   1763 			desc "varying of type mat4x3 inside struct"
   1764 			values
   1765 			{
   1766 				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) ];
   1767 				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) ];
   1768 			}
   1769 			vertex ""
   1770 				#version 300 es
   1771 				${VERTEX_DECLARATIONS}
   1772 				struct S { mediump mat4x3 a; };
   1773 				out S var;
   1774 				void main()
   1775 				{
   1776 					var.a = in0;
   1777 					${VERTEX_OUTPUT}
   1778 				}
   1779 			""
   1780 			fragment ""
   1781 				#version 300 es
   1782 				precision mediump float;
   1783 				${FRAGMENT_DECLARATIONS}
   1784 				struct S { mediump mat4x3 a; };
   1785 				in S var;
   1786 				void main()
   1787 				{
   1788 					out0 = var.a;
   1789 					${FRAGMENT_OUTPUT}
   1790 				}
   1791 			""
   1792 		end
   1793 
   1794 		case mat4
   1795 			version 300 es
   1796 			desc "varying of type mat4 inside struct"
   1797 			values
   1798 			{
   1799 				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) ];
   1800 				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) ];
   1801 			}
   1802 			vertex ""
   1803 				#version 300 es
   1804 				${VERTEX_DECLARATIONS}
   1805 				struct S { mediump mat4 a; };
   1806 				out S var;
   1807 				void main()
   1808 				{
   1809 					var.a = in0;
   1810 					${VERTEX_OUTPUT}
   1811 				}
   1812 			""
   1813 			fragment ""
   1814 				#version 300 es
   1815 				precision mediump float;
   1816 				${FRAGMENT_DECLARATIONS}
   1817 				struct S { mediump mat4 a; };
   1818 				in S var;
   1819 				void main()
   1820 				{
   1821 					out0 = var.a;
   1822 					${FRAGMENT_OUTPUT}
   1823 				}
   1824 			""
   1825 		end
   1826 
   1827 		case int
   1828 			version 300 es
   1829 			desc "varying of type int inside struct"
   1830 			values
   1831 			{
   1832 				input int in0		= [ -1 | -25 | 1 | 2 | 3 | 16 ];
   1833 				output int out0		= [ -1 | -25 | 1 | 2 | 3 | 16 ];
   1834 			}
   1835 			vertex ""
   1836 				#version 300 es
   1837 				${VERTEX_DECLARATIONS}
   1838 				struct S { mediump int a; };
   1839 				flat out S var;
   1840 				void main()
   1841 				{
   1842 					${VERTEX_SETUP}
   1843 					var.a = in0;
   1844 					${VERTEX_OUTPUT}
   1845 				}
   1846 			""
   1847 			fragment ""
   1848 				#version 300 es
   1849 				${FRAGMENT_DECLARATIONS}
   1850 				struct S { mediump int a; };
   1851 				flat in S var;
   1852 				void main()
   1853 				{
   1854 					out0 = var.a;
   1855 					${FRAGMENT_OUTPUT}
   1856 				}
   1857 			""
   1858 		end
   1859 
   1860 		case ivec2
   1861 			version 300 es
   1862 			desc "varying of type ivec2 inside struct"
   1863 			values
   1864 			{
   1865 				input ivec2 in0		= [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
   1866 				output ivec2 out0	= [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
   1867 			}
   1868 			vertex ""
   1869 				#version 300 es
   1870 				${VERTEX_DECLARATIONS}
   1871 				struct S { mediump ivec2 a; };
   1872 				flat out S var;
   1873 				void main()
   1874 				{
   1875 					${VERTEX_SETUP}
   1876 					var.a = in0;
   1877 					${VERTEX_OUTPUT}
   1878 				}
   1879 			""
   1880 			fragment ""
   1881 				#version 300 es
   1882 				${FRAGMENT_DECLARATIONS}
   1883 				struct S { mediump ivec2 a; };
   1884 				flat in S var;
   1885 				void main()
   1886 				{
   1887 					out0 = var.a;
   1888 					${FRAGMENT_OUTPUT}
   1889 				}
   1890 			""
   1891 		end
   1892 
   1893 		case ivec3
   1894 			version 300 es
   1895 			desc "varying of type ivec3 inside struct"
   1896 			values
   1897 			{
   1898 				input ivec3 in0		= [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
   1899 				output ivec3 out0	= [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
   1900 			}
   1901 			vertex ""
   1902 				#version 300 es
   1903 				${VERTEX_DECLARATIONS}
   1904 				struct S { mediump ivec3 a; };
   1905 				flat out S var;
   1906 				void main()
   1907 				{
   1908 					${VERTEX_SETUP}
   1909 					var.a = in0;
   1910 					${VERTEX_OUTPUT}
   1911 				}
   1912 			""
   1913 			fragment ""
   1914 				#version 300 es
   1915 				${FRAGMENT_DECLARATIONS}
   1916 				struct S { mediump ivec3 a; };
   1917 				flat in S var;
   1918 				void main()
   1919 				{
   1920 					out0 = var.a;
   1921 					${FRAGMENT_OUTPUT}
   1922 				}
   1923 			""
   1924 		end
   1925 
   1926 		case ivec4
   1927 			version 300 es
   1928 			desc "varying of type ivec4 inside struct"
   1929 			values
   1930 			{
   1931 				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) ];
   1932 				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) ];
   1933 			}
   1934 			vertex ""
   1935 				#version 300 es
   1936 				${VERTEX_DECLARATIONS}
   1937 				struct S { mediump ivec4 a; };
   1938 				flat out S var;
   1939 				void main()
   1940 				{
   1941 					${VERTEX_SETUP}
   1942 					var.a = in0;
   1943 					${VERTEX_OUTPUT}
   1944 				}
   1945 			""
   1946 			fragment ""
   1947 				#version 300 es
   1948 				${FRAGMENT_DECLARATIONS}
   1949 				struct S { mediump ivec4 a; };
   1950 				flat in S var;
   1951 				void main()
   1952 				{
   1953 					out0 = var.a;
   1954 					${FRAGMENT_OUTPUT}
   1955 				}
   1956 			""
   1957 		end
   1958 
   1959 		case uint
   1960 			version 300 es
   1961 			desc "varying of type uint in struct"
   1962 			values
   1963 			{
   1964 				input uint in0			= [ 1 | 2 | 3 | 16 ];
   1965 				output uint out0		= [ 1 | 2 | 3 | 16 ];
   1966 			}
   1967 			vertex ""
   1968 				#version 300 es
   1969 				${VERTEX_DECLARATIONS}
   1970 				struct S { mediump uint a; };
   1971 				flat out S var;
   1972 				void main()
   1973 				{
   1974 					${VERTEX_SETUP}
   1975 					var.a = in0;
   1976 					${VERTEX_OUTPUT}
   1977 				}
   1978 			""
   1979 			fragment ""
   1980 				#version 300 es
   1981 				${FRAGMENT_DECLARATIONS}
   1982 				struct S { mediump uint a; };
   1983 				flat in S var;
   1984 				void main()
   1985 				{
   1986 					out0 = var.a;
   1987 					${FRAGMENT_OUTPUT}
   1988 				}
   1989 			""
   1990 		end
   1991 
   1992 		case uvec2
   1993 			version 300 es
   1994 			desc "varying of type uvec2 inside struct"
   1995 			values
   1996 			{
   1997 				input uvec2 in0		= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
   1998 				output uvec2 out0	= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
   1999 			}
   2000 			vertex ""
   2001 				#version 300 es
   2002 				${VERTEX_DECLARATIONS}
   2003 				struct S { mediump uvec2 a; };
   2004 				flat out S var;
   2005 				void main()
   2006 				{
   2007 					${VERTEX_SETUP}
   2008 					var.a = in0;
   2009 					${VERTEX_OUTPUT}
   2010 				}
   2011 			""
   2012 			fragment ""
   2013 				#version 300 es
   2014 				${FRAGMENT_DECLARATIONS}
   2015 				struct S { mediump uvec2 a; };
   2016 				flat in S var;
   2017 				void main()
   2018 				{
   2019 					out0 = var.a;
   2020 					${FRAGMENT_OUTPUT}
   2021 				}
   2022 			""
   2023 		end
   2024 
   2025 		case uvec3
   2026 			version 300 es
   2027 			desc "varying of type uvec3 inside struct"
   2028 			values
   2029 			{
   2030 				input uvec3 in0		= [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
   2031 				output uvec3 out0	= [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
   2032 			}
   2033 			vertex ""
   2034 				#version 300 es
   2035 				${VERTEX_DECLARATIONS}
   2036 				struct S { mediump uvec3 a; };
   2037 				flat out S var;
   2038 				void main()
   2039 				{
   2040 					${VERTEX_SETUP}
   2041 					var.a = in0;
   2042 					${VERTEX_OUTPUT}
   2043 				}
   2044 			""
   2045 			fragment ""
   2046 				#version 300 es
   2047 				${FRAGMENT_DECLARATIONS}
   2048 				struct S { mediump uvec3 a; };
   2049 				flat in S var;
   2050 				void main()
   2051 				{
   2052 					out0 = var.a;
   2053 					${FRAGMENT_OUTPUT}
   2054 				}
   2055 			""
   2056 		end
   2057 
   2058 		case uvec4
   2059 			version 300 es
   2060 			desc "varying of type uvec4 inside struct"
   2061 			values
   2062 			{
   2063 				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) ];
   2064 				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) ];
   2065 			}
   2066 			vertex ""
   2067 				#version 300 es
   2068 				${VERTEX_DECLARATIONS}
   2069 				struct S { mediump uvec4 a; };
   2070 				flat out S var;
   2071 				void main()
   2072 				{
   2073 					${VERTEX_SETUP}
   2074 					var.a = in0;
   2075 					${VERTEX_OUTPUT}
   2076 				}
   2077 			""
   2078 			fragment ""
   2079 				#version 300 es
   2080 				${FRAGMENT_DECLARATIONS}
   2081 				struct S { mediump uvec4 a; };
   2082 				flat in S var;
   2083 				void main()
   2084 				{
   2085 					out0 = var.a;
   2086 					${FRAGMENT_OUTPUT}
   2087 				}
   2088 			""
   2089 		end
   2090 
   2091 		case float_vec3
   2092 			version 300 es
   2093 			desc "varyings of type float and vec3 inside struct"
   2094 			values
   2095 			{
   2096 				input float in0		= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
   2097 				output float out0	= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
   2098 				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) ];
   2099 				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) ];
   2100 			}
   2101 			vertex ""
   2102 				#version 300 es
   2103 				${VERTEX_DECLARATIONS}
   2104 				struct S { mediump float a; highp vec3 b; };
   2105 				out S var;
   2106 				void main()
   2107 				{
   2108 					var.a = in0;
   2109 					var.b = in1;
   2110 					${VERTEX_OUTPUT}
   2111 				}
   2112 			""
   2113 			fragment ""
   2114 				#version 300 es
   2115 				precision mediump float;
   2116 				${FRAGMENT_DECLARATIONS}
   2117 				struct S { mediump float a; highp vec3 b; };
   2118 				in S var;
   2119 				void main()
   2120 				{
   2121 					out0 = var.a;
   2122 					out1 = var.b;
   2123 					${FRAGMENT_OUTPUT}
   2124 				}
   2125 			""
   2126 		end
   2127 
   2128 		case float_uvec2_vec3
   2129 			version 300 es
   2130 			desc "varyings of type float and vec3 inside struct"
   2131 			values
   2132 			{
   2133 				input float in0		= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
   2134 				output float out0	= [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
   2135 				input uvec2 in1		= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) | uvec2(8, 7) ];
   2136 				output uvec2 out1	= [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) | uvec2(8, 7) ];
   2137 				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) ];
   2138 				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) ];
   2139 			}
   2140 			vertex ""
   2141 				#version 300 es
   2142 				${VERTEX_DECLARATIONS}
   2143 				struct S { mediump float a; highp uvec2 b; highp vec3 c; };
   2144 				flat out S var;
   2145 				void main()
   2146 				{
   2147 					${VERTEX_SETUP}
   2148 					var.a = in0;
   2149 					var.b = in1;
   2150 					var.c = in2;
   2151 					${VERTEX_OUTPUT}
   2152 				}
   2153 			""
   2154 			fragment ""
   2155 				#version 300 es
   2156 				precision mediump float;
   2157 				${FRAGMENT_DECLARATIONS}
   2158 				struct S { mediump float a; highp uvec2 b; highp vec3 c; };
   2159 				flat in S var;
   2160 				void main()
   2161 				{
   2162 					out0 = var.a;
   2163 					out1 = var.b;
   2164 					out2 = var.c;
   2165 					${FRAGMENT_OUTPUT}
   2166 				}
   2167 			""
   2168 		end
   2169 	end
   2170 
   2171 	group interpolation "Varying interpolation modes"
   2172 		case smooth
   2173 			version 300 es
   2174 			desc "varying of type vec4"
   2175 			values
   2176 			{
   2177 				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) ];
   2178 				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) ];
   2179 			}
   2180 			vertex ""
   2181 				#version 300 es
   2182 				${VERTEX_DECLARATIONS}
   2183 				smooth out mediump vec4 var;
   2184 				void main()
   2185 				{
   2186 					var = in0;
   2187 					${VERTEX_OUTPUT}
   2188 				}
   2189 			""
   2190 			fragment ""
   2191 				#version 300 es
   2192 				precision mediump float;
   2193 				${FRAGMENT_DECLARATIONS}
   2194 				smooth in vec4 var;
   2195 				void main()
   2196 				{
   2197 					out0 = var;
   2198 					${FRAGMENT_OUTPUT}
   2199 				}
   2200 			""
   2201 		end
   2202 
   2203 		case centroid
   2204 			version 300 es
   2205 			desc "varying of type vec4"
   2206 			values
   2207 			{
   2208 				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) ];
   2209 				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) ];
   2210 			}
   2211 			vertex ""
   2212 				#version 300 es
   2213 				${VERTEX_DECLARATIONS}
   2214 				centroid out mediump vec4 var;
   2215 				void main()
   2216 				{
   2217 					var = in0;
   2218 					${VERTEX_OUTPUT}
   2219 				}
   2220 			""
   2221 			fragment ""
   2222 				#version 300 es
   2223 				precision mediump float;
   2224 				${FRAGMENT_DECLARATIONS}
   2225 				centroid in vec4 var;
   2226 				void main()
   2227 				{
   2228 					out0 = var;
   2229 					${FRAGMENT_OUTPUT}
   2230 				}
   2231 			""
   2232 		end
   2233 
   2234 		case flat
   2235 			version 300 es
   2236 			desc "varying of type vec4"
   2237 			values
   2238 			{
   2239 				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) ];
   2240 				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) ];
   2241 			}
   2242 			vertex ""
   2243 				#version 300 es
   2244 				${VERTEX_DECLARATIONS}
   2245 				flat out mediump vec4 var;
   2246 				void main()
   2247 				{
   2248 					var = in0;
   2249 					${VERTEX_OUTPUT}
   2250 				}
   2251 			""
   2252 			fragment ""
   2253 				#version 300 es
   2254 				precision mediump float;
   2255 				${FRAGMENT_DECLARATIONS}
   2256 				flat in vec4 var;
   2257 				void main()
   2258 				{
   2259 					out0 = var;
   2260 					${FRAGMENT_OUTPUT}
   2261 				}
   2262 			""
   2263 		end
   2264 	end
   2265 
   2266 	group usage "Varying usage in shaders"
   2267 		case readback_1
   2268 			version 300 es
   2269 			desc "read back (an already written) varying in the vertex shader"
   2270 			values
   2271 			{
   2272 				input float in0		= [ 1.0 | 0.0 | -2.0 | 10.0 ];
   2273 				output float out0	= [ 3.0 | 0.0 | -6.0 | 30.0 ];
   2274 			}
   2275 			vertex ""
   2276 				#version 300 es
   2277 				precision mediump float;
   2278 				${VERTEX_DECLARATIONS}
   2279 				out float var1;
   2280 				out float var2;
   2281 
   2282 				void main()
   2283 				{
   2284 					var1 = in0;
   2285 					var2 = var1 + in0;
   2286 					${VERTEX_OUTPUT}
   2287 				}
   2288 			""
   2289 			fragment ""
   2290 				#version 300 es
   2291 				precision mediump float;
   2292 				${FRAGMENT_DECLARATIONS}
   2293 				in float var1;
   2294 				in float var2;
   2295 
   2296 				void main()
   2297 				{
   2298 					out0 = var1 + var2;
   2299 					${FRAGMENT_OUTPUT}
   2300 				}
   2301 			""
   2302 		end
   2303 
   2304 		case writeback_1
   2305 			version 300 es
   2306 			desc "write back a varying in the fragment shader"
   2307 			values
   2308 			{
   2309 				input float in0		= [ 1.0 | 0.0 | -2.0 | 10.0 ];
   2310 			}
   2311 			expect compile_fail
   2312 			vertex ""
   2313 				#version 300 es
   2314 				precision mediump float;
   2315 				${VERTEX_DECLARATIONS}
   2316 				out float var1;
   2317 				out float var2;
   2318 
   2319 				void main()
   2320 				{
   2321 					var1 = in0;
   2322 					var2 = var1 + in0;
   2323 					${VERTEX_OUTPUT}
   2324 				}
   2325 			""
   2326 			fragment ""
   2327 				#version 300 es
   2328 				precision mediump float;
   2329 				${FRAGMENT_DECLARATIONS}
   2330 				in float var1;
   2331 				in float var2;
   2332 
   2333 				void main()
   2334 				{
   2335 					var2 = var1;
   2336 					out0 = var1;
   2337 					${FRAGMENT_OUTPUT}
   2338 				}
   2339 			""
   2340 		end
   2341 	end
   2342 end
   2343 
   2344 group uniform "Uniform linkage"
   2345 	group basic "Default block uniforms of scalar and vector types"
   2346 		case precision_conflict_1
   2347 			version 300 es
   2348 			desc "Vertex side uniform has highp, fragment side uniform mediump."
   2349 			expect link_fail
   2350 			values {output float out0 = 3.0;}
   2351 			vertex ""
   2352 				#version 300 es
   2353 				${VERTEX_DECLARATIONS}
   2354 				uniform highp float u_val;
   2355 				out mediump float res;
   2356 				void main()
   2357 				{
   2358 					res = u_val;
   2359 					${VERTEX_OUTPUT}
   2360 				}
   2361 			""
   2362 			fragment ""
   2363 				#version 300 es
   2364 				precision mediump float;
   2365 				uniform float u_val;
   2366 				${FRAGMENT_DECLARATIONS}
   2367 				in mediump float res;
   2368 				void main()
   2369 				{
   2370 					out0 = u_val + res;
   2371 					${FRAGMENT_OUTPUT}
   2372 				}
   2373 			""
   2374 		end
   2375 		case precision_conflict_2
   2376 			version 300 es
   2377 			desc "Vertex side uniform has highp, fragment side uniform mediump."
   2378 			expect link_fail
   2379 			values {output float out0 = 3.0;}
   2380 			vertex ""
   2381 				#version 300 es
   2382 				${VERTEX_DECLARATIONS}
   2383 				uniform highp float u_val;
   2384 				out mediump float res;
   2385 				void main()
   2386 				{
   2387 					res = u_val;
   2388 					${VERTEX_OUTPUT}
   2389 				}
   2390 			""
   2391 			fragment ""
   2392 				#version 300 es
   2393 				precision highp float;
   2394 				uniform mediump float u_val;
   2395 				${FRAGMENT_DECLARATIONS}
   2396 				in mediump float res;
   2397 				void main()
   2398 				{
   2399 					out0 = u_val + res;
   2400 					${FRAGMENT_OUTPUT}
   2401 				}
   2402 			""
   2403 		end
   2404 		case precision_conflict_3
   2405 			version 300 es
   2406 			desc "Vertex side uniform has lowp, fragment side uniform highp."
   2407 			expect link_fail
   2408 			values {output float out0 = 3.0;}
   2409 			vertex ""
   2410 				#version 300 es
   2411 				${VERTEX_DECLARATIONS}
   2412 				uniform lowp int u_val;
   2413 				out mediump float res;
   2414 				void main()
   2415 				{
   2416 					res = float(u_val);
   2417 					${VERTEX_OUTPUT}
   2418 				}
   2419 			""
   2420 			fragment ""
   2421 				#version 300 es
   2422 				precision highp float;
   2423 				uniform highp int u_val;
   2424 				${FRAGMENT_DECLARATIONS}
   2425 				in mediump float res;
   2426 				void main()
   2427 				{
   2428 					out0 = float(u_val) + res;
   2429 					${FRAGMENT_OUTPUT}
   2430 				}
   2431 			""
   2432 		end
   2433 		case precision_conflict_4
   2434 			version 300 es
   2435 			desc "Vertex side uniform has lowp, fragment side uniform mediump."
   2436 			expect link_fail
   2437 			values {output float out0 = 3.0;}
   2438 			vertex ""
   2439 				#version 300 es
   2440 				${VERTEX_DECLARATIONS}
   2441 				uniform lowp vec3 u_val;
   2442 				out mediump float res;
   2443 				void main()
   2444 				{
   2445 					res = u_val.y;
   2446 					${VERTEX_OUTPUT}
   2447 				}
   2448 			""
   2449 			fragment ""
   2450 				#version 300 es
   2451 				precision highp float;
   2452 				uniform mediump vec3 u_val;
   2453 				${FRAGMENT_DECLARATIONS}
   2454 				in mediump float res;
   2455 				void main()
   2456 				{
   2457 					out0 = u_val.z + res;
   2458 					${FRAGMENT_OUTPUT}
   2459 				}
   2460 			""
   2461 		end
   2462 	end
   2463 
   2464 	group struct "Uniform structs"
   2465 		# Struct linkage handling
   2466 		case basic
   2467 			version 300 es
   2468 			desc "Same uniform struct in both shaders"
   2469 			values {
   2470 				uniform float val.a = 1.0;
   2471 				uniform float val.b = 2.0;
   2472 				output float out0 = 3.0;
   2473 			}
   2474 			vertex ""
   2475 				#version 300 es
   2476 				${VERTEX_DECLARATIONS}
   2477 				struct Struct {mediump float a; mediump float b;};
   2478 				uniform Struct val;
   2479 				out mediump float dummy;
   2480 				void main()
   2481 				{
   2482 					dummy = val.a + val.b;
   2483 					${VERTEX_OUTPUT}
   2484 				}
   2485 			""
   2486 			fragment ""
   2487 				#version 300 es
   2488 				precision mediump float;
   2489 				struct Struct {mediump float a; mediump float b;};
   2490 				uniform Struct val;
   2491 				in mediump float dummy;
   2492 				${FRAGMENT_DECLARATIONS}
   2493 				void main()
   2494 				{
   2495 					out0 = val.b + val.a;
   2496 					out0 = out0 + dummy;
   2497 					out0 = out0 - dummy;
   2498 					${FRAGMENT_OUTPUT}
   2499 				}
   2500 			""
   2501 		end
   2502 
   2503 		case vertex_only
   2504 			version 300 es
   2505 			desc "Uniform struct declared in both, used only in vertex."
   2506 			values {
   2507 				uniform float val.a = 1.0;
   2508 				uniform float val.b = 2.0;
   2509 				output float out0 = 3.0;
   2510 			}
   2511 			vertex ""
   2512 				#version 300 es
   2513 				${VERTEX_DECLARATIONS}
   2514 				struct Struct {mediump float a; mediump float b;};
   2515 				uniform Struct val;
   2516 				out mediump float res;
   2517 				void main()
   2518 				{
   2519 					res = val.a + val.b;
   2520 					${VERTEX_OUTPUT}
   2521 				}
   2522 			""
   2523 			fragment ""
   2524 				#version 300 es
   2525 				precision mediump float;
   2526 				struct Struct {mediump float a; mediump float b;};
   2527 				uniform Struct val;
   2528 				in mediump float res;
   2529 				${FRAGMENT_DECLARATIONS}
   2530 				void main()
   2531 				{
   2532 					out0 = res;
   2533 					${FRAGMENT_OUTPUT}
   2534 				}
   2535 			""
   2536 		end
   2537 
   2538 		case fragment_only
   2539 			version 300 es
   2540 			desc "Uniform struct declared in both, used only in fragment."
   2541 			values {
   2542 				uniform float val.a = 1.0;
   2543 				uniform float val.b = 2.0;
   2544 				output float out0 = 3.0;
   2545 			}
   2546 			vertex ""
   2547 				#version 300 es
   2548 				${VERTEX_DECLARATIONS}
   2549 				struct Struct {mediump float a; mediump float b;};
   2550 				uniform Struct val;
   2551 				void main()
   2552 				{
   2553 					${VERTEX_OUTPUT}
   2554 				}
   2555 			""
   2556 			fragment ""
   2557 				#version 300 es
   2558 				precision mediump float;
   2559 				struct Struct {mediump float a; mediump float b;};
   2560 				uniform Struct val;
   2561 				${FRAGMENT_DECLARATIONS}
   2562 				void main()
   2563 				{
   2564 					out0 = val.a + val.b;
   2565 					${FRAGMENT_OUTPUT}
   2566 				}
   2567 			""
   2568 		end
   2569 
   2570 		case partial
   2571 			version 300 es
   2572 			desc "Uniform struct declared in both, used partially in both."
   2573 			values {
   2574 				uniform float val.a = 1.0;
   2575 				uniform float val.b = 2.0;
   2576 				output float out0 = 3.0;
   2577 			}
   2578 			vertex ""
   2579 				#version 300 es
   2580 				${VERTEX_DECLARATIONS}
   2581 				struct Struct {mediump float a; mediump float b;};
   2582 				uniform Struct val;
   2583 				out mediump float res;
   2584 				void main()
   2585 				{
   2586 					res = val.a;
   2587 					${VERTEX_OUTPUT}
   2588 				}
   2589 			""
   2590 			fragment ""
   2591 				#version 300 es
   2592 				precision mediump float;
   2593 				struct Struct {mediump float a; mediump float b;};
   2594 				uniform Struct val;
   2595 				${FRAGMENT_DECLARATIONS}
   2596 				in mediump float res;
   2597 				void main()
   2598 				{
   2599 					out0 = res + val.b;
   2600 					${FRAGMENT_OUTPUT}
   2601 				}
   2602 			""
   2603 		end
   2604 
   2605 		case vec4
   2606 			version 300 es
   2607 			desc "Same uniform struct in both shaders. Datatype vec4"
   2608 			values {
   2609 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2610 				uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
   2611 				output float out0 = 3.0;
   2612 			}
   2613 			vertex ""
   2614 				#version 300 es
   2615 				${VERTEX_DECLARATIONS}
   2616 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2617 				uniform Struct val;
   2618 				out mediump float dummy;
   2619 				void main()
   2620 				{
   2621 					dummy = val.a.x + val.b.y;
   2622 					${VERTEX_OUTPUT}
   2623 				}
   2624 			""
   2625 			fragment ""
   2626 				#version 300 es
   2627 				precision mediump float;
   2628 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2629 				uniform Struct val;
   2630 				in mediump float dummy;
   2631 				${FRAGMENT_DECLARATIONS}
   2632 				void main()
   2633 				{
   2634 					out0 = val.b.y + val.a.x;
   2635 					out0 = out0 + dummy;
   2636 					out0 = out0 - dummy;
   2637 					${FRAGMENT_OUTPUT}
   2638 				}
   2639 			""
   2640 		end
   2641 
   2642 		case vertex_only_vec4
   2643 			version 300 es
   2644 			desc "Uniform struct declared in both, used only in vertex. Datatype vec4	"
   2645 			values {
   2646 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2647 				uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
   2648 				output float out0 = 3.0;
   2649 			}
   2650 			vertex ""
   2651 				#version 300 es
   2652 				${VERTEX_DECLARATIONS}
   2653 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2654 				uniform Struct val;
   2655 				out mediump float res;
   2656 				void main()
   2657 				{
   2658 					res = val.a.x + val.b.y;
   2659 					${VERTEX_OUTPUT}
   2660 				}
   2661 			""
   2662 			fragment ""
   2663 				#version 300 es
   2664 				precision mediump float;
   2665 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2666 				uniform Struct val;
   2667 				in mediump float res;
   2668 				${FRAGMENT_DECLARATIONS}
   2669 				void main()
   2670 				{			out0 = res;
   2671 					${FRAGMENT_OUTPUT}
   2672 				}
   2673 			""
   2674 		end
   2675 
   2676 		case fragment_only_vec4
   2677 			version 300 es
   2678 			desc "Uniform struct declared in both, used only in fragment. Datatype vec4"
   2679 			values {
   2680 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2681 				uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
   2682 				output float out0 = 3.0;
   2683 			}
   2684 			vertex ""
   2685 				#version 300 es
   2686 				${VERTEX_DECLARATIONS}
   2687 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2688 				uniform Struct val;
   2689 				void main()
   2690 				{
   2691 					${VERTEX_OUTPUT}
   2692 				}
   2693 			""
   2694 			fragment ""
   2695 				#version 300 es
   2696 				precision mediump float;
   2697 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2698 				uniform Struct val;
   2699 				${FRAGMENT_DECLARATIONS}
   2700 				void main()
   2701 				{			out0 = val.a.x + val.b.y;
   2702 					${FRAGMENT_OUTPUT}
   2703 				}
   2704 			""
   2705 		end
   2706 
   2707 		case partial_vec4
   2708 			version 300 es
   2709 			desc "Uniform struct declared in both, used partially in both. Datatype vec4"
   2710 			values {
   2711 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2712 				uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
   2713 				output float out0 = 3.0;
   2714 			}
   2715 			vertex ""
   2716 				#version 300 es
   2717 				${VERTEX_DECLARATIONS}
   2718 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2719 				uniform Struct val;
   2720 				out mediump float res;
   2721 				void main()
   2722 				{
   2723 					res = val.a.x;
   2724 					${VERTEX_OUTPUT}
   2725 				}
   2726 			""
   2727 			fragment ""
   2728 				#version 300 es
   2729 				precision mediump float;
   2730 				struct Struct {mediump vec4 a; mediump vec4 b;};
   2731 				uniform Struct val;
   2732 				${FRAGMENT_DECLARATIONS}
   2733 				in mediump float res;
   2734 				void main()
   2735 				{			out0 = res + val.b.y;
   2736 					${FRAGMENT_OUTPUT}
   2737 				}
   2738 			""
   2739 		end
   2740 
   2741 		case vec4_vec3
   2742 			version 300 es
   2743 			desc "Same uniform struct in both shaders. Datatype vec4 and vec3"
   2744 			values {
   2745 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2746 				uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
   2747 				output float out0 = 3.0;
   2748 			}
   2749 			vertex ""
   2750 				#version 300 es
   2751 				${VERTEX_DECLARATIONS}
   2752 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2753 				uniform Struct val;
   2754 				out mediump float dummy;
   2755 				void main()
   2756 				{
   2757 					dummy = val.a.x + val.b.y;
   2758 					${VERTEX_OUTPUT}
   2759 				}
   2760 			""
   2761 			fragment ""
   2762 				#version 300 es
   2763 				precision mediump float;
   2764 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2765 				uniform Struct val;
   2766 				in mediump float dummy;
   2767 				${FRAGMENT_DECLARATIONS}
   2768 				void main()
   2769 				{			out0 = val.b.y + val.a.x;
   2770 					out0 = out0 + dummy;
   2771 					out0 = out0 - dummy;
   2772 					${FRAGMENT_OUTPUT}
   2773 				}
   2774 			""
   2775 		end
   2776 
   2777 		case vertex_only_vec4_vec3
   2778 			version 300 es
   2779 			desc "Uniform struct declared in both, used only in vertex. Datatype vec4 and vec3"
   2780 			values {
   2781 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2782 				uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
   2783 				output float out0 = 3.0;
   2784 			}
   2785 			vertex ""
   2786 				#version 300 es
   2787 				${VERTEX_DECLARATIONS}
   2788 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2789 				uniform Struct val;
   2790 				out mediump float res;
   2791 				void main()
   2792 				{
   2793 					res = val.a.x + val.b.y;
   2794 					${VERTEX_OUTPUT}
   2795 				}
   2796 			""
   2797 			fragment ""
   2798 				#version 300 es
   2799 				precision mediump float;
   2800 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2801 				uniform Struct val;
   2802 				in mediump float res;
   2803 				${FRAGMENT_DECLARATIONS}
   2804 				void main()
   2805 				{			out0 = res;
   2806 					${FRAGMENT_OUTPUT}
   2807 				}
   2808 			""
   2809 		end
   2810 
   2811 		case fragment_only_vec4_vec3
   2812 			version 300 es
   2813 			desc "Uniform struct declared in both, used only in fragment. Datatype vec4 and vec3"
   2814 			values {
   2815 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2816 				uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
   2817 				output float out0 = 3.0;
   2818 			}
   2819 			vertex ""
   2820 				#version 300 es
   2821 				${VERTEX_DECLARATIONS}
   2822 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2823 				uniform Struct val;
   2824 				void main()
   2825 				{
   2826 					${VERTEX_OUTPUT}
   2827 				}
   2828 			""
   2829 			fragment ""
   2830 				#version 300 es
   2831 				precision mediump float;
   2832 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2833 				uniform Struct val;
   2834 				${FRAGMENT_DECLARATIONS}
   2835 				void main()
   2836 				{			out0 = val.a.x + val.b.y;
   2837 					${FRAGMENT_OUTPUT}
   2838 				}
   2839 			""
   2840 		end
   2841 
   2842 		case partial_vec4_vec3
   2843 			version 300 es
   2844 			desc "Uniform struct declared in both, used partially in both. Datatype vec4 and vec3"
   2845 			values {
   2846 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2847 				uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
   2848 				output float out0 = 3.0;
   2849 			}
   2850 			vertex ""
   2851 				#version 300 es
   2852 				${VERTEX_DECLARATIONS}
   2853 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2854 				uniform Struct val;
   2855 				out mediump float res;
   2856 				void main()
   2857 				{
   2858 					res = val.a.x;
   2859 					${VERTEX_OUTPUT}
   2860 				}
   2861 			""
   2862 			fragment ""
   2863 				#version 300 es
   2864 				precision mediump float;
   2865 				struct Struct {mediump vec4 a; mediump vec3 b;};
   2866 				uniform Struct val;
   2867 				${FRAGMENT_DECLARATIONS}
   2868 				in mediump float res;
   2869 				void main()
   2870 				{			out0 = res + val.b.y;
   2871 					${FRAGMENT_OUTPUT}
   2872 				}
   2873 			""
   2874 		end
   2875 
   2876 		case vec4_float
   2877 			version 300 es
   2878 			desc "Same uniform struct in both shaders. Datatype vec4 and float"
   2879 			values {
   2880 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2881 				uniform float val.b = 2.0;
   2882 				output float out0 = 3.0;
   2883 			}
   2884 			vertex ""
   2885 				#version 300 es
   2886 				${VERTEX_DECLARATIONS}
   2887 				struct Struct {mediump vec4 a; mediump float b;};
   2888 				uniform Struct val;
   2889 				out mediump float dummy;
   2890 				void main()
   2891 				{
   2892 					dummy = val.a.x + val.b;
   2893 					${VERTEX_OUTPUT}
   2894 				}
   2895 			""
   2896 			fragment ""
   2897 				#version 300 es
   2898 				precision mediump float;
   2899 				struct Struct {mediump vec4 a; mediump float b;};
   2900 				uniform Struct val;
   2901 				in mediump float dummy;
   2902 				${FRAGMENT_DECLARATIONS}
   2903 				void main()
   2904 				{			out0 = val.b + val.a.x;
   2905 					out0 = out0 + dummy;
   2906 					out0 = out0 - dummy;
   2907 					${FRAGMENT_OUTPUT}
   2908 				}
   2909 			""
   2910 		end
   2911 
   2912 		case vertex_only_vec4_float
   2913 			version 300 es
   2914 			desc "Uniform struct declared in both, used only in vertex. Datatype vec4 and float"
   2915 			values {
   2916 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2917 				uniform float val.b = 2.0;
   2918 				output float out0 = 3.0;
   2919 			}
   2920 			vertex ""
   2921 				#version 300 es
   2922 				${VERTEX_DECLARATIONS}
   2923 				struct Struct {mediump vec4 a; mediump float b;};
   2924 				uniform Struct val;
   2925 				out mediump float res;
   2926 				void main()
   2927 				{
   2928 					res = val.a.x + val.b;
   2929 					${VERTEX_OUTPUT}
   2930 				}
   2931 			""
   2932 			fragment ""
   2933 				#version 300 es
   2934 				precision mediump float;
   2935 				struct Struct {mediump vec4 a; mediump float b;};
   2936 				uniform Struct val;
   2937 				in mediump float res;
   2938 				${FRAGMENT_DECLARATIONS}
   2939 				void main()
   2940 				{			out0 = res;
   2941 					${FRAGMENT_OUTPUT}
   2942 				}
   2943 			""
   2944 		end
   2945 
   2946 		case fragment_only_vec4_float
   2947 			version 300 es
   2948 			desc "Uniform struct declared in both, used only in fragment. Datatype vec4 and float"
   2949 			values {
   2950 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2951 				uniform float val.b = 2.0;
   2952 				output float out0 = 3.0;
   2953 			}
   2954 			vertex ""
   2955 				#version 300 es
   2956 				${VERTEX_DECLARATIONS}
   2957 				struct Struct {mediump vec4 a; mediump float b;};
   2958 				uniform Struct val;
   2959 				void main()
   2960 				{
   2961 					${VERTEX_OUTPUT}
   2962 				}
   2963 			""
   2964 			fragment ""
   2965 				#version 300 es
   2966 				precision mediump float;
   2967 				struct Struct {mediump vec4 a; mediump float b;};
   2968 				uniform Struct val;
   2969 				${FRAGMENT_DECLARATIONS}
   2970 				void main()
   2971 				{			out0 = val.a.x + val.b;
   2972 					${FRAGMENT_OUTPUT}
   2973 				}
   2974 			""
   2975 		end
   2976 
   2977 		case partial_vec4_float
   2978 			version 300 es
   2979 			desc "Uniform struct declared in both, used partially in both. Datatype vec4 and float"
   2980 			values {
   2981 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   2982 				uniform float val.b = 2.0;
   2983 				output float out0 = 3.0;
   2984 			}
   2985 			vertex ""
   2986 				#version 300 es
   2987 				${VERTEX_DECLARATIONS}
   2988 				struct Struct {mediump vec4 a; mediump float b;};
   2989 				uniform Struct val;
   2990 				out mediump float res;
   2991 				void main()
   2992 				{
   2993 					res = val.a.x;
   2994 					${VERTEX_OUTPUT}
   2995 				}
   2996 			""
   2997 			fragment ""
   2998 				#version 300 es
   2999 				precision mediump float;
   3000 				struct Struct {mediump vec4 a; mediump float b;};
   3001 				uniform Struct val;
   3002 				${FRAGMENT_DECLARATIONS}
   3003 				in mediump float res;
   3004 				void main()
   3005 				{			out0 = res + val.b;
   3006 					${FRAGMENT_OUTPUT}
   3007 				}
   3008 			""
   3009 		end
   3010 
   3011 		case partial_vec4_struct
   3012 			version 300 es
   3013 			desc "Uniform struct declared in both, used partially in both. Datatype vec4 and struct with vec4"
   3014 			values {
   3015 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   3016 				uniform vec4 val.b.c = vec4(1.0, 2.0, 3.0, 4.0);
   3017 				output float out0 = 3.0;
   3018 			}
   3019 			vertex ""
   3020 				#version 300 es
   3021 				${VERTEX_DECLARATIONS}
   3022 				struct Inner {mediump vec4 c;};
   3023 				struct Struct {mediump vec4 a; Inner b;};
   3024 				uniform Struct val;
   3025 				out mediump float res;
   3026 				void main()
   3027 				{
   3028 					res = val.a.x;
   3029 					${VERTEX_OUTPUT}
   3030 				}
   3031 			""
   3032 			fragment ""
   3033 				#version 300 es
   3034 				precision mediump float;
   3035 				struct Inner {mediump vec4 c;};
   3036 				struct Struct {mediump vec4 a; Inner b;};
   3037 				uniform Struct val;
   3038 				${FRAGMENT_DECLARATIONS}
   3039 				in mediump float res;
   3040 				void main()
   3041 				{			out0 = res + val.b.c.y;
   3042 					${FRAGMENT_OUTPUT}
   3043 				}
   3044 			""
   3045 		end
   3046 
   3047 		case partial_vec4_vec3_struct
   3048 			version 300 es
   3049 			desc "Uniform struct declared in both, used partially in both. Datatype vec4 and struct with vec3"
   3050 			values {
   3051 				uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
   3052 				uniform vec3 val.b.c = vec3(1.0, 2.0, 3.0);
   3053 				output float out0 = 3.0;
   3054 			}
   3055 			vertex ""
   3056 				#version 300 es
   3057 				${VERTEX_DECLARATIONS}
   3058 				struct Inner {mediump vec3 c;};
   3059 				struct Struct {mediump vec4 a; Inner b;};
   3060 				uniform Struct val;
   3061 				out mediump float res;
   3062 				void main()
   3063 				{
   3064 					res = val.a.x;
   3065 					${VERTEX_OUTPUT}
   3066 				}
   3067 			""
   3068 			fragment ""
   3069 				#version 300 es
   3070 				precision mediump float;
   3071 				struct Inner {mediump vec3 c;};
   3072 				struct Struct {mediump vec4 a; Inner b;};
   3073 				uniform Struct val;
   3074 				${FRAGMENT_DECLARATIONS}
   3075 				in mediump float res;
   3076 				void main()
   3077 				{			out0 = res + val.b.c.y;
   3078 					${FRAGMENT_OUTPUT}
   3079 				}
   3080 			""
   3081 		end
   3082 
   3083 		case partial_vec2_vec3
   3084 			version 300 es
   3085 			desc "Uniform struct declared in both, used partially in both. Datatype vec2 and vec3"
   3086 			values {
   3087 				uniform vec2 val.a = vec2(1.0, 2.0);
   3088 				uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
   3089 				output float out0 = 3.0;
   3090 			}
   3091 			vertex ""
   3092 				#version 300 es
   3093 				${VERTEX_DECLARATIONS}
   3094 				struct Struct {mediump vec2 a; mediump vec3 b;};
   3095 				uniform Struct val;
   3096 				out mediump float res;
   3097 				void main()
   3098 				{
   3099 					res = val.a.x;
   3100 					${VERTEX_OUTPUT}
   3101 				}
   3102 			""
   3103 			fragment ""
   3104 				#version 300 es
   3105 				precision mediump float;
   3106 				struct Struct {mediump vec2 a; mediump vec3 b;};
   3107 				uniform Struct val;
   3108 				${FRAGMENT_DECLARATIONS}
   3109 				in mediump float res;
   3110 				void main()
   3111 				{			out0 = res + val.b.y;
   3112 					${FRAGMENT_OUTPUT}
   3113 				}
   3114 			""
   3115 		end
   3116 
   3117 		case partial_vec2_int
   3118 			version 300 es
   3119 			desc "Uniform struct declared in both, used partially in both. Datatype vec2 and int"
   3120 			values {
   3121 				uniform vec2 val.a = vec2(1.0, 2.0);
   3122 				uniform int val.b = 2;
   3123 				output float out0 = 3.0;
   3124 			}
   3125 			vertex ""
   3126 				#version 300 es
   3127 				${VERTEX_DECLARATIONS}
   3128 				struct Struct {mediump vec2 a; mediump int b;};
   3129 				uniform Struct val;
   3130 				out mediump float res;
   3131 				void main()
   3132 				{
   3133 					res = val.a.x;
   3134 					${VERTEX_OUTPUT}
   3135 				}
   3136 			""
   3137 			fragment ""
   3138 				#version 300 es
   3139 				precision mediump float;
   3140 				struct Struct {mediump vec2 a; mediump int b;};
   3141 				uniform Struct val;
   3142 				${FRAGMENT_DECLARATIONS}
   3143 				in mediump float res;
   3144 				void main()
   3145 				{			out0 = res + float(val.b);
   3146 					${FRAGMENT_OUTPUT}
   3147 				}
   3148 			""
   3149 		end
   3150 
   3151 		case partial_int_float
   3152 			version 300 es
   3153 			desc "Uniform struct declared in both, used partially in both. Datatype int and float"
   3154 			values {
   3155 				uniform float val.a = 1.0;
   3156 				uniform int val.b = 2;
   3157 				output float out0 = 3.0;
   3158 			}
   3159 			vertex ""
   3160 				#version 300 es
   3161 				${VERTEX_DECLARATIONS}
   3162 				struct Struct {mediump float a; mediump int b;};
   3163 				uniform Struct val;
   3164 				out mediump float res;
   3165 				void main()
   3166 				{
   3167 					res = val.a;
   3168 					${VERTEX_OUTPUT}
   3169 				}
   3170 			""
   3171 			fragment ""
   3172 				#version 300 es
   3173 				precision mediump float;
   3174 				struct Struct {mediump float a; mediump int b;};
   3175 				uniform Struct val;
   3176 				${FRAGMENT_DECLARATIONS}
   3177 				in mediump float res;
   3178 				void main()
   3179 				{			out0 = res + float(val.b);
   3180 					${FRAGMENT_OUTPUT}
   3181 				}
   3182 			""
   3183 		end
   3184 
   3185 		case partial_bvec2_vec2
   3186 			version 300 es
   3187 			desc "Uniform struct declared in both, used partially in both. Datatype bvec2 and vec2"
   3188 			values {
   3189 				uniform bvec2 val.a = bvec2(true, true);
   3190 				uniform vec2 val.b = vec2(1.0, 2.0);
   3191 				output float out0 = 3.0;
   3192 			}
   3193 			vertex ""
   3194 				#version 300 es
   3195 				${VERTEX_DECLARATIONS}
   3196 				struct Struct {bvec2 a; mediump vec2 b;};
   3197 				uniform Struct val;
   3198 				out mediump float res;
   3199 				void main()
   3200 				{
   3201 					res = float(val.a.x);
   3202 					${VERTEX_OUTPUT}
   3203 				}
   3204 			""
   3205 			fragment ""
   3206 				#version 300 es
   3207 				precision mediump float;
   3208 				struct Struct {bvec2 a; mediump vec2 b;};
   3209 				uniform Struct val;
   3210 				${FRAGMENT_DECLARATIONS}
   3211 				in mediump float res;
   3212 				void main()
   3213 				{			out0 = res + val.b.y;
   3214 					${FRAGMENT_OUTPUT}
   3215 				}
   3216 			""
   3217 		end
   3218 
   3219 		case partial_ivec2_vec2
   3220 			version 300 es
   3221 			desc "Uniform struct declared in both, used partially in both. Datatype ivec2 and vec2"
   3222 			values {
   3223 				uniform ivec2 val.a = ivec2(1, 2);
   3224 				uniform vec2 val.b = vec2(1.0, 2.0);
   3225 				output float out0 = 3.0;
   3226 			}
   3227 			vertex ""
   3228 				#version 300 es
   3229 				${VERTEX_DECLARATIONS}
   3230 				struct Struct {mediump ivec2 a; mediump vec2 b;};
   3231 				uniform Struct val;
   3232 				out mediump float res;
   3233 				void main()
   3234 				{
   3235 					res = vec2(val.a).x;
   3236 					${VERTEX_OUTPUT}
   3237 				}
   3238 			""
   3239 			fragment ""
   3240 				#version 300 es
   3241 				precision mediump float;
   3242 				struct Struct {mediump ivec2 a; mediump vec2 b;};
   3243 				uniform Struct val;
   3244 				${FRAGMENT_DECLARATIONS}
   3245 				in mediump float res;
   3246 				void main()
   3247 				{			out0 = res + val.b.y;
   3248 					${FRAGMENT_OUTPUT}
   3249 				}
   3250 			""
   3251 		end
   3252 
   3253 		case partial_ivec2_ivec2
   3254 			version 300 es
   3255 			desc "Uniform struct declared in both, used partially in both. Datatype ivec2 and ivec2"
   3256 			values {
   3257 				uniform ivec2 val.a = ivec2(1, 2);
   3258 				uniform ivec2 val.b = ivec2(1, 2);
   3259 				output float out0 = 3.0;
   3260 			}
   3261 			vertex ""
   3262 				#version 300 es
   3263 				${VERTEX_DECLARATIONS}
   3264 				struct Struct {mediump ivec2 a; mediump ivec2 b;};
   3265 				uniform Struct val;
   3266 				out mediump float res;
   3267 				void main()
   3268 				{
   3269 					res = vec2(val.a).x;
   3270 					${VERTEX_OUTPUT}
   3271 				}
   3272 			""
   3273 			fragment ""
   3274 				#version 300 es
   3275 				precision mediump float;
   3276 				struct Struct {mediump ivec2 a; mediump ivec2 b;};
   3277 				uniform Struct val;
   3278 				${FRAGMENT_DECLARATIONS}
   3279 				in mediump float res;
   3280 				void main()
   3281 				{			out0 = res + vec2(val.b).y;
   3282 					${FRAGMENT_OUTPUT}
   3283 				}
   3284 			""
   3285 		end
   3286 
   3287 		case type_conflict_1
   3288 			version 300 es
   3289 			desc "Fragment struct has one less member than fragment version"
   3290 			expect link_fail
   3291 			values {output float out0 = 3.0;}
   3292 			vertex ""
   3293 				#version 300 es
   3294 				${VERTEX_DECLARATIONS}
   3295 				struct Struct {mediump float a; mediump float b;};
   3296 				uniform Struct val;
   3297 				out mediump float res;
   3298 				void main()
   3299 				{
   3300 					res = val.a;
   3301 					${VERTEX_OUTPUT}
   3302 				}
   3303 			""
   3304 			fragment ""
   3305 				#version 300 es
   3306 				precision mediump float;
   3307 				struct Struct {mediump float a;};
   3308 				uniform Struct val;
   3309 				${FRAGMENT_DECLARATIONS}
   3310 				in mediump float res;
   3311 				void main()
   3312 				{			out0 = res + val.a;
   3313 					${FRAGMENT_OUTPUT}
   3314 				}
   3315 			""
   3316 		end
   3317 
   3318 		case type_conflict_2
   3319 			version 300 es
   3320 			desc "Vertex struct has int, fragment struct has float."
   3321 			expect link_fail
   3322 			values {output float out0 = 3.0;}
   3323 			vertex ""
   3324 				#version 300 es
   3325 				${VERTEX_DECLARATIONS}
   3326 				struct Struct {mediump int a;};
   3327 				uniform Struct val;
   3328 				out mediump float res;
   3329 				void main()
   3330 				{
   3331 					res = float(val.a);
   3332 					${VERTEX_OUTPUT}
   3333 				}
   3334 			""
   3335 			fragment ""
   3336 				#version 300 es
   3337 				precision mediump float;
   3338 				struct Struct {mediump float a;};
   3339 				uniform Struct val;
   3340 				${FRAGMENT_DECLARATIONS}
   3341 				in mediump float res;
   3342 				void main()
   3343 				{			out0 = val.a;
   3344 					${FRAGMENT_OUTPUT}
   3345 				}
   3346 			""
   3347 		end
   3348 
   3349 		case type_conflict_3
   3350 			version 300 es
   3351 			desc "Vertex struct has vec3, fragment struct has vec4."
   3352 			expect link_fail
   3353 			values {output float out0 = 3.0;}
   3354 			vertex ""
   3355 				#version 300 es
   3356 				${VERTEX_DECLARATIONS}
   3357 				struct Struct {mediump vec3 a;};
   3358 				uniform Struct val;
   3359 				out mediump float res;
   3360 				void main()
   3361 				{
   3362 					res = float(val.a.x);
   3363 					${VERTEX_OUTPUT}
   3364 				}
   3365 			""
   3366 			fragment ""
   3367 				#version 300 es
   3368 				precision mediump float;
   3369 				struct Struct {mediump vec4 a;};
   3370 				uniform Struct val;
   3371 				${FRAGMENT_DECLARATIONS}
   3372 				in mediump float res;
   3373 				void main()
   3374 				{			out0 = val.a.x;
   3375 					${FRAGMENT_OUTPUT}
   3376 				}
   3377 			""
   3378 		end
   3379 
   3380 		case precision_conflict_1
   3381 			version 300 es
   3382 			desc "Vertex side struct has highp, fragment side struct mediump."
   3383 			expect link_fail
   3384 			values {output float out0 = 3.0;}
   3385 			vertex ""
   3386 				#version 300 es
   3387 				${VERTEX_DECLARATIONS}
   3388 				struct Struct {highp float a;};
   3389 				uniform Struct val;
   3390 				out mediump float res;
   3391 				void main()
   3392 				{
   3393 					res = val.a;
   3394 					${VERTEX_OUTPUT}
   3395 				}
   3396 			""
   3397 			fragment ""
   3398 				#version 300 es
   3399 				precision mediump float;
   3400 				struct Struct {mediump float a;};
   3401 				uniform Struct val;
   3402 				${FRAGMENT_DECLARATIONS}
   3403 				in mediump float res;
   3404 				void main()
   3405 				{			out0 = val.a;
   3406 					${FRAGMENT_OUTPUT}
   3407 				}
   3408 			""
   3409 		end
   3410 
   3411 		case precision_conflict_2
   3412 			version 300 es
   3413 			desc "Vertex side struct has mediump, fragment side struct lowp."
   3414 			expect link_fail
   3415 			values {output float out0 = 3.0;}
   3416 			vertex ""
   3417 				#version 300 es
   3418 				${VERTEX_DECLARATIONS}
   3419 				struct Struct {mediump float a;};
   3420 				uniform Struct val;
   3421 				out mediump float res;
   3422 				void main()
   3423 				{
   3424 					res = val.a;
   3425 					${VERTEX_OUTPUT}
   3426 				}
   3427 			""
   3428 			fragment ""
   3429 				#version 300 es
   3430 				precision mediump float;
   3431 				struct Struct {lowp float a;};
   3432 				uniform Struct val;
   3433 				${FRAGMENT_DECLARATIONS}
   3434 				in mediump float res;
   3435 				void main()
   3436 				{			out0 = val.a;
   3437 					${FRAGMENT_OUTPUT}
   3438 				}
   3439 			""
   3440 		end
   3441 
   3442 		case precision_conflict_3
   3443 			version 300 es
   3444 			desc "Vertex side struct has lowp, fragment side struct mediump."
   3445 			expect link_fail
   3446 			values {output float out0 = 3.0;}
   3447 			vertex ""
   3448 				#version 300 es
   3449 				${VERTEX_DECLARATIONS}
   3450 				struct Struct {lowp float a;};
   3451 				uniform Struct val;
   3452 				out mediump float res;
   3453 				void main()
   3454 				{
   3455 					res = val.a;
   3456 					${VERTEX_OUTPUT}
   3457 				}
   3458 			""
   3459 			fragment ""
   3460 				#version 300 es
   3461 				precision mediump float;
   3462 				struct Struct {mediump float a;};
   3463 				uniform Struct val;
   3464 				${FRAGMENT_DECLARATIONS}
   3465 				in mediump float res;
   3466 				void main()
   3467 				{			out0 = val.a;
   3468 					${FRAGMENT_OUTPUT}
   3469 				}
   3470 			""
   3471 		end
   3472 
   3473 		case precision_conflict_4
   3474 			version 300 es
   3475 			desc "Vertex side struct has lowp, fragment side struct implicit mediump."
   3476 			expect link_fail
   3477 			values {output float out0 = 3.0;}
   3478 			vertex ""
   3479 				#version 300 es
   3480 				${VERTEX_DECLARATIONS}
   3481 				struct Struct {lowp float a;};
   3482 				uniform Struct val;
   3483 				out mediump float res;
   3484 				void main()
   3485 				{
   3486 					res = val.a;
   3487 					${VERTEX_OUTPUT}
   3488 				}
   3489 			""
   3490 			fragment ""
   3491 				#version 300 es
   3492 				precision mediump float;
   3493 				struct Struct {float a;};
   3494 				uniform Struct val;
   3495 				${FRAGMENT_DECLARATIONS}
   3496 				in mediump float res;
   3497 				void main()
   3498 				{			out0 = val.a;
   3499 					${FRAGMENT_OUTPUT}
   3500 				}
   3501 			""
   3502 		end
   3503 
   3504 		case light_struct_highp
   3505 			version 300 es
   3506 			desc "Complex Light struct from use case tests."
   3507 			values {
   3508 				uniform float val.constantAttenuation = 1.0;
   3509 				uniform float val.quadraticAttenuation = 1.0;
   3510 				output float out0 = 2.0;
   3511 			}
   3512 			vertex ""
   3513 				#version 300 es
   3514 				struct Light
   3515 				{
   3516 					mediump vec3	color;
   3517 					highp vec4		position;
   3518 					highp vec3		direction;
   3519 					mediump float	constantAttenuation;
   3520 					mediump float	linearAttenuation;
   3521 					mediump float	quadraticAttenuation;
   3522 				};
   3523 				${VERTEX_DECLARATIONS}
   3524 				uniform Light val;
   3525 				out mediump float res;
   3526 				void main()
   3527 				{
   3528 					res = val.constantAttenuation;
   3529 					${VERTEX_OUTPUT}
   3530 				}
   3531 			""
   3532 			fragment ""
   3533 				#version 300 es
   3534 				precision mediump float;
   3535 				struct Light
   3536 				{
   3537 					mediump vec3	color;
   3538 					highp vec4		position;
   3539 					highp vec3		direction;
   3540 					mediump float	constantAttenuation;
   3541 					mediump float	linearAttenuation;
   3542 					mediump float	quadraticAttenuation;
   3543 				};
   3544 				struct Struct {float a;};
   3545 				uniform Light val;
   3546 				${FRAGMENT_DECLARATIONS}
   3547 				in mediump float res;
   3548 				void main()
   3549 				{
   3550 					out0 = res + val.quadraticAttenuation;
   3551 					${FRAGMENT_OUTPUT}
   3552 				}
   3553 			""
   3554 		end
   3555 
   3556 		case light_struct_mediump
   3557 			version 300 es
   3558 			desc "Complex Light struct from use case tests, without highp usage"
   3559 			values {
   3560 				uniform float val.constantAttenuation = 1.0;
   3561 				uniform float val.quadraticAttenuation = 1.0;
   3562 				output float out0 = 2.0;
   3563 			}
   3564 			vertex ""
   3565 				#version 300 es
   3566 				struct Light
   3567 				{
   3568 					mediump vec3	color;
   3569 					mediump vec4	position;
   3570 					mediump vec3	direction;
   3571 					mediump float	constantAttenuation;
   3572 					mediump float	linearAttenuation;
   3573 					mediump float	quadraticAttenuation;
   3574 				};
   3575 				${VERTEX_DECLARATIONS}
   3576 				uniform Light val;
   3577 				out mediump float res;
   3578 				void main()
   3579 				{
   3580 					res = val.constantAttenuation;
   3581 					${VERTEX_OUTPUT}
   3582 				}
   3583 			""
   3584 			fragment ""
   3585 				#version 300 es
   3586 				precision mediump float;
   3587 				struct Light
   3588 				{
   3589 					mediump vec3	color;
   3590 					mediump vec4	position;
   3591 					mediump vec3	direction;
   3592 					mediump float	constantAttenuation;
   3593 					mediump float	linearAttenuation;
   3594 					mediump float	quadraticAttenuation;
   3595 				};
   3596 				struct Struct {float a;};
   3597 				uniform Light val;
   3598 				${FRAGMENT_DECLARATIONS}
   3599 				in mediump float res;
   3600 				void main()
   3601 				{
   3602 					out0 = res + val.quadraticAttenuation;
   3603 					${FRAGMENT_OUTPUT}
   3604 				}
   3605 			""
   3606 		end
   3607 	end
   3608 
   3609 	group block "Uniform blocks"
   3610 		case type_mismatch
   3611 			version 300 es
   3612 			expect link_fail
   3613 			vertex ""
   3614 				#version 300 es
   3615 
   3616 				uniform Block
   3617 				{
   3618 					highp vec4 val;
   3619 				};
   3620 
   3621 				${VERTEX_DECLARATIONS}
   3622 				out mediump float res;
   3623 				void main()
   3624 				{
   3625 					res = val.x;
   3626 					${VERTEX_OUTPUT}
   3627 				}
   3628 			""
   3629 			fragment ""
   3630 				#version 300 es
   3631 
   3632 				uniform Block
   3633 				{
   3634 					highp vec3 val;
   3635 				};
   3636 
   3637 				precision mediump float;
   3638 				${FRAGMENT_DECLARATIONS}
   3639 				in mediump float res;
   3640 				void main()
   3641 				{
   3642 					dEQP_FragColor = vec4(val, 1.0);
   3643 				}
   3644 			""
   3645 		end
   3646 
   3647 		case members_mismatch
   3648 			version 300 es
   3649 			expect link_fail
   3650 			vertex ""
   3651 				#version 300 es
   3652 
   3653 				uniform Block
   3654 				{
   3655 					highp vec4 val;
   3656 				};
   3657 
   3658 				${VERTEX_DECLARATIONS}
   3659 				out mediump float res;
   3660 				void main()
   3661 				{
   3662 					res = val.x;
   3663 					${VERTEX_OUTPUT}
   3664 				}
   3665 			""
   3666 			fragment ""
   3667 				#version 300 es
   3668 
   3669 				uniform Block
   3670 				{
   3671 					highp vec4 val;
   3672 					lowp uint u;
   3673 				};
   3674 
   3675 				precision mediump float;
   3676 				${FRAGMENT_DECLARATIONS}
   3677 				in mediump float res;
   3678 				void main()
   3679 				{
   3680 					dEQP_FragColor = vec4(val);
   3681 				}
   3682 			""
   3683 		end
   3684 
   3685 		case layout_qualifier_mismatch_1
   3686 			version 300 es
   3687 			expect link_fail
   3688 			vertex ""
   3689 				#version 300 es
   3690 
   3691 				layout(std140) uniform Block
   3692 				{
   3693 					highp vec4 val;
   3694 				};
   3695 
   3696 				${VERTEX_DECLARATIONS}
   3697 				out mediump float res;
   3698 				void main()
   3699 				{
   3700 					res = val.x;
   3701 					${VERTEX_OUTPUT}
   3702 				}
   3703 			""
   3704 			fragment ""
   3705 				#version 300 es
   3706 
   3707 				uniform Block
   3708 				{
   3709 					highp vec4 val;
   3710 				};
   3711 
   3712 				precision mediump float;
   3713 				${FRAGMENT_DECLARATIONS}
   3714 				in mediump float res;
   3715 				void main()
   3716 				{
   3717 					dEQP_FragColor = vec4(val);
   3718 				}
   3719 			""
   3720 		end
   3721 
   3722 		case layout_qualifier_mismatch_2
   3723 			version 300 es
   3724 			expect link_fail
   3725 			vertex ""
   3726 				#version 300 es
   3727 
   3728 				layout(shared) uniform Block
   3729 				{
   3730 					highp vec4 val;
   3731 				};
   3732 
   3733 				${VERTEX_DECLARATIONS}
   3734 				out mediump float res;
   3735 				void main()
   3736 				{
   3737 					res = val.x;
   3738 					${VERTEX_OUTPUT}
   3739 				}
   3740 			""
   3741 			fragment ""
   3742 				#version 300 es
   3743 
   3744 				layout(packed) uniform Block
   3745 				{
   3746 					highp vec4 val;
   3747 				};
   3748 
   3749 				precision mediump float;
   3750 				${FRAGMENT_DECLARATIONS}
   3751 				in mediump float res;
   3752 				void main()
   3753 				{
   3754 					dEQP_FragColor = vec4(val);
   3755 				}
   3756 			""
   3757 		end
   3758 
   3759 		case layout_qualifier_mismatch_3
   3760 			version 300 es
   3761 			expect link_fail
   3762 			vertex ""
   3763 				#version 300 es
   3764 
   3765 				layout(row_major) uniform Block
   3766 				{
   3767 					highp vec4 val;
   3768 				};
   3769 
   3770 				${VERTEX_DECLARATIONS}
   3771 				out mediump float res;
   3772 				void main()
   3773 				{
   3774 					res = val.x;
   3775 					${VERTEX_OUTPUT}
   3776 				}
   3777 			""
   3778 			fragment ""
   3779 				#version 300 es
   3780 
   3781 				layout(column_major) uniform Block
   3782 				{
   3783 					highp vec4 val;
   3784 				};
   3785 
   3786 				precision mediump float;
   3787 				${FRAGMENT_DECLARATIONS}
   3788 				in mediump float res;
   3789 				void main()
   3790 				{
   3791 					dEQP_FragColor = vec4(val);
   3792 				}
   3793 			""
   3794 		end
   3795 
   3796 		case layout_qualifier_mismatch_4
   3797 			version 300 es
   3798 			expect link_fail
   3799 			vertex ""
   3800 				#version 300 es
   3801 
   3802 				layout(row_major) uniform Block
   3803 				{
   3804 					highp mat3 val;
   3805 				};
   3806 
   3807 				${VERTEX_DECLARATIONS}
   3808 				out mediump float res;
   3809 				void main()
   3810 				{
   3811 					res = val[0][1];
   3812 					${VERTEX_OUTPUT}
   3813 				}
   3814 			""
   3815 			fragment ""
   3816 				#version 300 es
   3817 
   3818 				layout(column_major) uniform Block
   3819 				{
   3820 					highp mat3 val;
   3821 				};
   3822 
   3823 				precision mediump float;
   3824 				${FRAGMENT_DECLARATIONS}
   3825 				in mediump float res;
   3826 				void main()
   3827 				{
   3828 					dEQP_FragColor = vec4(val[2], 1.0);
   3829 				}
   3830 			""
   3831 		end
   3832 
   3833 		case layout_qualifier_mismatch_5
   3834 			version 300 es
   3835 			expect link_fail
   3836 			vertex ""
   3837 				#version 300 es
   3838 
   3839 				uniform Block
   3840 				{
   3841 					layout(row_major) uniform highp mat3 val;
   3842 				};
   3843 
   3844 				${VERTEX_DECLARATIONS}
   3845 				out mediump float res;
   3846 				void main()
   3847 				{
   3848 					res = val[0][1];
   3849 					${VERTEX_OUTPUT}
   3850 				}
   3851 			""
   3852 			fragment ""
   3853 				#version 300 es
   3854 
   3855 				uniform Block
   3856 				{
   3857 					layout(column_major) uniform highp mat3 val;
   3858 				};
   3859 
   3860 				precision mediump float;
   3861 				${FRAGMENT_DECLARATIONS}
   3862 				in mediump float res;
   3863 				void main()
   3864 				{
   3865 					dEQP_FragColor = vec4(val[2], 1.0);
   3866 				}
   3867 			""
   3868 		end
   3869 	end
   3870 end
   3871