3 group varying "Varying linkage"
6 group rules "Varying linking rules"
7 # declared in vertex shader, no reference in frag shader
10 desc "varying declared in vertex shader, no reference in fragment shader"
13 ${VERTEX_DECLARATIONS}
14 layout(location = 0) out mediump float var;
22 ${FRAGMENT_DECLARATIONS}
25 ${FRAG_COLOR} = vec4(1.0);
30 # declared in vertex shader, declared in frag shader
33 desc "varying declared in both vertex and fragment shader, but not used"
36 ${VERTEX_DECLARATIONS}
37 layout(location = 0) out mediump float var;
45 layout(location = 0) in mediump float var;
46 ${FRAGMENT_DECLARATIONS}
49 ${FRAG_COLOR} = vec4(1.0);
55 case legal_mismatch_vec4_vec3
57 desc "legal vertex to fragment shader varying type mismatches (vec4 to vec3)"
60 ${VERTEX_DECLARATIONS}
61 layout(location = 0) out mediump vec4 var;
73 layout(location = 0) in mediump vec3 var;
74 ${FRAGMENT_DECLARATIONS}
77 ${FRAG_COLOR} = vec4(1.0 + var.x + var.y + var.z);
83 case legal_mismatch_vec4_vec2
85 desc "legal vertex to fragment shader varying type mismatches (vec4 to vec2)"
88 ${VERTEX_DECLARATIONS}
89 layout(location = 0) out mediump vec4 var;
101 layout(location = 0) in mediump vec2 var;
102 ${FRAGMENT_DECLARATIONS}
105 ${FRAG_COLOR} = vec4(1.0 + var.x + var.y);
111 case legal_mismatch_vec4_float
113 desc "legal vertex to fragment shader varying type mismatches (vec4 to float)"
116 ${VERTEX_DECLARATIONS}
117 layout(location = 0) out mediump vec4 var;
129 layout(location = 0) in mediump float var;
130 ${FRAGMENT_DECLARATIONS}
133 ${FRAG_COLOR} = vec4(1.0 + var);
139 case legal_mismatch_vec3_vec2
141 desc "legal vertex to fragment shader varying type mismatches (vec3 to vec2)"
144 ${VERTEX_DECLARATIONS}
145 layout(location = 0) out mediump vec3 var;
156 layout(location = 0) in mediump vec2 var;
157 ${FRAGMENT_DECLARATIONS}
160 ${FRAG_COLOR} = vec4(1.0 + var.x + var.y);
166 case legal_mismatch_vec3_float
168 desc "legal vertex to fragment shader varying type mismatches (vec3 to float)"
171 ${VERTEX_DECLARATIONS}
172 layout(location = 0) out mediump vec3 var;
183 layout(location = 0) in mediump float var;
184 ${FRAGMENT_DECLARATIONS}
187 ${FRAG_COLOR} = vec4(1.0 + var);
193 case legal_mismatch_vec2_float
195 desc "legal vertex to fragment shader varying type mismatches (vec2 to float)"
198 ${VERTEX_DECLARATIONS}
199 layout(location = 0) out mediump vec2 var;
209 layout(location = 0) in mediump float var;
210 ${FRAGMENT_DECLARATIONS}
213 ${FRAG_COLOR} = vec4(1.0 + var);
219 case legal_mismatch_ivec4_ivec3
221 desc "legal vertex to fragment shader varying type mismatches (ivec4 to ivec3)"
224 ${VERTEX_DECLARATIONS}
225 layout(location = 0) out mediump ivec4 var;
237 layout(location = 0) in mediump flat ivec3 var;
238 ${FRAGMENT_DECLARATIONS}
241 if (var.x + var.y + var.z == 0)
242 ${FRAG_COLOR} = vec4(1.0);
244 ${FRAG_COLOR} = vec4(0.0);
250 case legal_mismatch_ivec4_ivec2
252 desc "legal vertex to fragment shader varying type mismatches (ivec4 to ivec2)"
255 ${VERTEX_DECLARATIONS}
256 layout(location = 0) out mediump ivec4 var;
268 layout(location = 0) in mediump flat ivec2 var;
269 ${FRAGMENT_DECLARATIONS}
272 if (var.x + var.y == 0)
273 ${FRAG_COLOR} = vec4(1.0);
275 ${FRAG_COLOR} = vec4(0.0);
281 case legal_mismatch_ivec4_int
283 desc "legal vertex to fragment shader varying type mismatches (ivec4 to int)"
286 ${VERTEX_DECLARATIONS}
287 layout(location = 0) out mediump ivec4 var;
299 layout(location = 0) in mediump flat int var;
300 ${FRAGMENT_DECLARATIONS}
304 ${FRAG_COLOR} = vec4(1.0);
306 ${FRAG_COLOR} = vec4(0.0);
312 case legal_mismatch_ivec3_ivec2
314 desc "legal vertex to fragment shader varying type mismatches (ivec3 to ivec2)"
317 ${VERTEX_DECLARATIONS}
318 layout(location = 0) out mediump ivec3 var;
329 layout(location = 0) in mediump flat ivec2 var;
330 ${FRAGMENT_DECLARATIONS}
333 if (var.x + var.y == 0)
334 ${FRAG_COLOR} = vec4(1.0);
336 ${FRAG_COLOR} = vec4(0.0);
342 case legal_mismatch_ivec3_int
344 desc "legal vertex to fragment shader varying type mismatches (ivec3 to int)"
347 ${VERTEX_DECLARATIONS}
348 layout(location = 0) out mediump ivec3 var;
359 layout(location = 0) in mediump flat int var;
360 ${FRAGMENT_DECLARATIONS}
364 ${FRAG_COLOR} = vec4(1.0);
366 ${FRAG_COLOR} = vec4(0.0);
372 case legal_mismatch_ivec2_int
374 desc "legal vertex to fragment shader varying type mismatches (ivec2 to int)"
377 ${VERTEX_DECLARATIONS}
378 layout(location = 0) out mediump ivec2 var;
388 layout(location = 0) in mediump flat int var;
389 ${FRAGMENT_DECLARATIONS}
393 ${FRAG_COLOR} = vec4(1.0);
395 ${FRAG_COLOR} = vec4(0.0);
400 # declared in vertex shader, static use in frag shader
401 case vertex_declare_fragment_use
403 desc "varying declared in both shaders, statically used in fragment shader"
404 values { uniform bool u_false = false; }
407 ${VERTEX_DECLARATIONS}
408 layout(location = 0) out mediump float var;
416 layout(location = 0) in mediump float var;
417 ${FRAGMENT_DECLARATIONS}
421 ${FRAG_COLOR} = vec4(var);
423 ${FRAG_COLOR} = vec4(1.0);
428 # static use in vertex shader, no reference in fragment shader
429 case vertex_use_fragment_declare
431 desc "varying declared and statically used in vertex shader, no reference in fragment shader"
432 values { uniform bool u_false = false; }
435 ${VERTEX_DECLARATIONS}
436 layout(location = 0) out mediump float var;
446 ${FRAGMENT_DECLARATIONS}
449 ${FRAG_COLOR} = vec4(1.0);
454 # static use in vertex shader, declared in fragment shader
455 case vertex_use_declare_fragment
457 desc "varying declared and statically used in vertex shader, only declared in fragment shader"
458 values { uniform bool u_false = false; }
461 ${VERTEX_DECLARATIONS}
462 layout(location = 0) out mediump float var;
472 layout(location = 0) in mediump float var;
473 ${FRAGMENT_DECLARATIONS}
476 ${FRAG_COLOR} = vec4(1.0);
481 # static use in vertex shader, used in fragment shader
482 case vertex_use_fragment_use
484 desc "varying statically used in both vertex and fragment shader"
485 values { uniform bool u_false = false; }
488 ${VERTEX_DECLARATIONS}
489 layout(location = 0) out mediump float var;
499 ${FRAGMENT_DECLARATIONS}
500 layout(location = 0) in mediump float var;
504 ${FRAG_COLOR} = vec4(var);
506 ${FRAG_COLOR} = vec4(1.0);
511 # different interpolation
512 case differing_interpolation_2
514 desc "varying interpolation different (smooth vs. centroid)"
517 input float in0 = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
518 output float out0 = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
523 ${VERTEX_DECLARATIONS}
524 layout(location = 0) smooth out mediump float var;
533 precision highp float;
534 ${FRAGMENT_DECLARATIONS}
535 layout(location = 0) centroid in mediump float var;
544 # differing name (linking is done by location only in SPIR-V)
545 case differing_name_1
547 desc "varying declared with matching location but different name"
550 input float in0 = [ 2.0 | 5.0 | -3.0 | 4.0 ];
551 input float in1 = [ 4.0 | 1.0 | -0.5 | 2.0 ];
552 output float out0 = [ -2.0 | 4.0 | -2.5 | 2.0 ];
557 ${VERTEX_DECLARATIONS}
558 layout(location = 0) out highp float vtxVarB;
559 layout(location = 2) out highp float vtxVarA;
569 precision highp float;
570 ${FRAGMENT_DECLARATIONS}
571 layout(location = 2) in highp float fragVarA;
572 layout(location = 0) in highp float fragVarB;
575 out0 = fragVarA - fragVarB;
581 # differing name (linking is done by location only in SPIR-V)
582 case differing_name_2
584 desc "varying declared with matching location but different name"
587 input float in0 = [ 2.0 | 5.0 | -3.0 | 4.0 ];
588 input float in1 = [ 4.0 | 1.0 | -0.5 | 2.0 ];
589 output float out0 = [ -2.0 | 4.0 | -2.5 | 2.0 ];
594 ${VERTEX_DECLARATIONS}
595 layout(location = 0) out highp float varA;
596 layout(location = 2) out highp float varB;
606 precision highp float;
607 ${FRAGMENT_DECLARATIONS}
608 layout(location = 2) in highp float varA;
609 layout(location = 0) in highp float varB;
619 group basic_types "Basic varying types"
622 desc "varying of type float"
625 input float in0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
626 output float out0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
630 ${VERTEX_DECLARATIONS}
631 layout(location = 0) out float var;
640 precision highp float;
641 ${FRAGMENT_DECLARATIONS}
642 layout(location = 0) in float var;
653 desc "varying of type vec2"
656 input vec2 in0 = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
657 output vec2 out0 = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
661 ${VERTEX_DECLARATIONS}
662 layout(location = 0) out vec2 var;
671 precision highp float;
672 ${FRAGMENT_DECLARATIONS}
673 layout(location = 0) in vec2 var;
684 desc "varying of type vec3"
687 input vec3 in0 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
688 output vec3 out0 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
692 ${VERTEX_DECLARATIONS}
693 layout(location = 0) out vec3 var;
702 precision highp float;
703 ${FRAGMENT_DECLARATIONS}
704 layout(location = 0) in vec3 var;
715 desc "varying of type vec4"
718 input vec4 in0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
719 output vec4 out0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
723 ${VERTEX_DECLARATIONS}
724 layout(location = 0) out vec4 var;
733 precision highp float;
734 ${FRAGMENT_DECLARATIONS}
735 layout(location = 0) in vec4 var;
746 desc "varying of type mat2"
749 input mat2 in0 = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
750 output mat2 out0 = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
754 ${VERTEX_DECLARATIONS}
755 layout(location = 0) out mat2 var;
764 precision highp float;
765 ${FRAGMENT_DECLARATIONS}
766 layout(location = 0) in mat2 var;
777 desc "varying of type mat2x3"
780 input mat2x3 in0 = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
781 output mat2x3 out0 = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
785 ${VERTEX_DECLARATIONS}
786 layout(location = 0) out mat2x3 var;
795 precision highp float;
796 ${FRAGMENT_DECLARATIONS}
797 layout(location = 0) in mat2x3 var;
808 desc "varying of type mat2x4"
811 input mat2x4 in0 = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
812 output mat2x4 out0 = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
816 ${VERTEX_DECLARATIONS}
817 layout(location = 0) out mat2x4 var;
826 precision highp float;
827 ${FRAGMENT_DECLARATIONS}
828 layout(location = 0) in mat2x4 var;
839 desc "varying of type mat3x2"
842 input mat3x2 in0 = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
843 output mat3x2 out0 = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
847 ${VERTEX_DECLARATIONS}
848 layout(location = 0) out mat3x2 var;
857 precision highp float;
858 ${FRAGMENT_DECLARATIONS}
859 layout(location = 0) in mat3x2 var;
870 desc "varying of type mat3"
873 input mat3 in0 = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
874 output mat3 out0 = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
878 ${VERTEX_DECLARATIONS}
879 layout(location = 0) out mat3 var;
888 precision highp float;
889 ${FRAGMENT_DECLARATIONS}
890 layout(location = 0) in mat3 var;
901 desc "varying of type mat3x4"
904 input mat3x4 in0 = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
905 output mat3x4 out0 = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
909 ${VERTEX_DECLARATIONS}
910 layout(location = 0) out mat3x4 var;
919 precision highp float;
920 ${FRAGMENT_DECLARATIONS}
921 layout(location = 0) in mat3x4 var;
932 desc "varying of type mat4x2"
935 input mat4x2 in0 = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
936 output mat4x2 out0 = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
940 ${VERTEX_DECLARATIONS}
941 layout(location = 0) out mat4x2 var;
950 precision highp float;
951 ${FRAGMENT_DECLARATIONS}
952 layout(location = 0) in mat4x2 var;
963 desc "varying of type mat4x3"
966 input mat4x3 in0 = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
967 output mat4x3 out0 = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
971 ${VERTEX_DECLARATIONS}
972 layout(location = 0) out mat4x3 var;
981 precision highp float;
982 ${FRAGMENT_DECLARATIONS}
983 layout(location = 0) in mat4x3 var;
994 desc "varying of type mat4"
997 input mat4 in0 = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
998 output mat4 out0 = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
1002 ${VERTEX_DECLARATIONS}
1003 layout(location = 0) out mat4 var;
1012 precision highp float;
1013 ${FRAGMENT_DECLARATIONS}
1014 layout(location = 0) in mat4 var;
1025 desc "varying of type int"
1028 input int in0 = [ -1 | -25 | 1 | 2 | 3 | 16 ];
1029 output int out0 = [ -1 | -25 | 1 | 2 | 3 | 16 ];
1033 ${VERTEX_DECLARATIONS}
1034 layout(location = 0) flat out mediump int var;
1044 ${FRAGMENT_DECLARATIONS}
1045 layout(location = 0) flat in int var;
1056 desc "varying of type ivec2"
1059 input ivec2 in0 = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
1060 output ivec2 out0 = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
1064 ${VERTEX_DECLARATIONS}
1065 layout(location = 0) flat out mediump ivec2 var;
1075 ${FRAGMENT_DECLARATIONS}
1076 layout(location = 0) flat in ivec2 var;
1087 desc "varying of type ivec3"
1090 input ivec3 in0 = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1091 output ivec3 out0 = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1095 ${VERTEX_DECLARATIONS}
1096 layout(location = 0) flat out mediump ivec3 var;
1106 ${FRAGMENT_DECLARATIONS}
1107 layout(location = 0) flat in ivec3 var;
1118 desc "varying of type ivec4"
1121 input ivec4 in0 = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
1122 output ivec4 out0 = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
1126 ${VERTEX_DECLARATIONS}
1127 layout(location = 0) flat out mediump ivec4 var;
1137 ${FRAGMENT_DECLARATIONS}
1138 layout(location = 0) flat in ivec4 var;
1149 desc "varying of type int"
1152 input uint in0 = [ 1 | 2 | 3 | 16 ];
1153 output uint out0 = [ 1 | 2 | 3 | 16 ];
1157 ${VERTEX_DECLARATIONS}
1158 layout(location = 0) flat out mediump uint var;
1168 ${FRAGMENT_DECLARATIONS}
1169 layout(location = 0) flat in uint var;
1180 desc "varying of type uvec2"
1183 input uvec2 in0 = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1184 output uvec2 out0 = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1188 ${VERTEX_DECLARATIONS}
1189 layout(location = 0) flat out mediump uvec2 var;
1199 ${FRAGMENT_DECLARATIONS}
1200 layout(location = 0) flat in uvec2 var;
1211 desc "varying of type uvec3"
1214 input uvec3 in0 = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1215 output uvec3 out0 = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1219 ${VERTEX_DECLARATIONS}
1220 layout(location = 0) flat out mediump uvec3 var;
1230 ${FRAGMENT_DECLARATIONS}
1231 layout(location = 0) flat in uvec3 var;
1242 desc "varying of type uvec4"
1245 input uvec4 in0 = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
1246 output uvec4 out0 = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
1250 ${VERTEX_DECLARATIONS}
1251 layout(location = 0) flat out mediump uvec4 var;
1261 ${FRAGMENT_DECLARATIONS}
1262 layout(location = 0) flat in uvec4 var;
1272 group struct "Structure varyings"
1275 desc "varying of type float inside struct"
1278 input float in0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1279 output float out0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1283 ${VERTEX_DECLARATIONS}
1284 struct S { mediump float a; };
1285 layout(location = 0) out S var;
1294 precision highp float;
1295 ${FRAGMENT_DECLARATIONS}
1296 struct S { mediump float a; };
1297 layout(location = 0) in S var;
1308 desc "varying of type vec2 inside struct"
1311 input vec2 in0 = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
1312 output vec2 out0 = [ vec2(-1.25, 1.25) | vec2(-25.65, -7.25) | vec2(0.0, 1.0) | vec2(2.25, 2.25) | vec2(3.4, 9.5) | vec2(16.0, 32.0) ];
1316 ${VERTEX_DECLARATIONS}
1317 struct S { mediump vec2 a; };
1318 layout(location = 0) out S var;
1327 precision highp float;
1328 ${FRAGMENT_DECLARATIONS}
1329 struct S { mediump vec2 a; };
1330 layout(location = 0) in S var;
1341 desc "varying of type vec3 inside struct"
1344 input vec3 in0 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1345 output vec3 out0 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1349 ${VERTEX_DECLARATIONS}
1350 struct S { mediump vec3 a; };
1351 layout(location = 0) out S var;
1360 precision highp float;
1361 ${FRAGMENT_DECLARATIONS}
1362 struct S { mediump vec3 a; };
1363 layout(location = 0) in S var;
1374 desc "varying of type vec4 inside struct"
1377 input vec4 in0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1378 output vec4 out0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
1382 ${VERTEX_DECLARATIONS}
1383 struct S { mediump vec4 a; };
1384 layout(location = 0) out S var;
1393 precision highp float;
1394 ${FRAGMENT_DECLARATIONS}
1395 struct S { mediump vec4 a; };
1396 layout(location = 0) in S var;
1407 desc "varying of type mat2 inside struct"
1410 input mat2 in0 = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
1411 output mat2 out0 = [ mat2(1.0, 1.0, 1.0, 1.0) | mat2(-1.25, 1.25, -9.5, -12.2) | mat2(-25.65, -7.25, 14.21, -77.7) | mat2(0.0, 1.0, -1.0, 2.0) | mat2(2.25, 2.25, 22.5, 225.0) | mat2(3.4, 9.5, 19.5, 29.5) | mat2(16.0, 32.0, -64.0, -128.0) ];
1415 ${VERTEX_DECLARATIONS}
1416 struct S { mediump mat2 a; };
1417 layout(location = 0) out S var;
1426 precision highp float;
1427 ${FRAGMENT_DECLARATIONS}
1428 struct S { mediump mat2 a; };
1429 layout(location = 0) in S var;
1440 desc "varying of type mat2x3 inside struct"
1443 input mat2x3 in0 = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1444 output mat2x3 out0 = [ mat2x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1448 ${VERTEX_DECLARATIONS}
1449 struct S { mediump mat2x3 a; };
1450 layout(location = 0) out S var;
1459 precision highp float;
1460 ${FRAGMENT_DECLARATIONS}
1461 struct S { mediump mat2x3 a; };
1462 layout(location = 0) in S var;
1473 desc "varying of type mat2x4 inside struct"
1476 input mat2x4 in0 = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1477 output mat2x4 out0 = [ mat2x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1481 ${VERTEX_DECLARATIONS}
1482 struct S { mediump mat2x4 a; };
1483 layout(location = 0) out S var;
1492 precision highp float;
1493 ${FRAGMENT_DECLARATIONS}
1494 struct S { mediump mat2x4 a; };
1495 layout(location = 0) in S var;
1506 desc "varying of type mat3x2 inside struct"
1509 input mat3x2 in0 = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1510 output mat3x2 out0 = [ mat3x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25) ];
1514 ${VERTEX_DECLARATIONS}
1515 struct S { mediump mat3x2 a; };
1516 layout(location = 0) out S var;
1525 precision highp float;
1526 ${FRAGMENT_DECLARATIONS}
1527 struct S { mediump mat3x2 a; };
1528 layout(location = 0) in S var;
1539 desc "varying of type mat3 inside struct"
1542 input mat3 in0 = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
1543 output mat3 out0 = [ mat3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 9.9) | mat3(0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0, -9.9) | mat3(3.4, 9.5, 19.5, 29.5, 16.0, 32.0, -64.0, -128.0, 256.0) ];
1547 ${VERTEX_DECLARATIONS}
1548 struct S { mediump mat3 a; };
1549 layout(location = 0) out S var;
1558 precision highp float;
1559 ${FRAGMENT_DECLARATIONS}
1560 struct S { mediump mat3 a; };
1561 layout(location = 0) in S var;
1572 desc "varying of type mat3x4 inside struct"
1575 input mat3x4 in0 = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1576 output mat3x4 out0 = [ mat3x4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1580 ${VERTEX_DECLARATIONS}
1581 struct S { mediump mat3x4 a; };
1582 layout(location = 0) out S var;
1591 precision highp float;
1592 ${FRAGMENT_DECLARATIONS}
1593 struct S { mediump mat3x4 a; };
1594 layout(location = 0) in S var;
1605 desc "varying of type mat4x2 inside struct"
1608 input mat4x2 in0 = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1609 output mat4x2 out0 = [ mat4x2(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7) ];
1613 ${VERTEX_DECLARATIONS}
1614 struct S { mediump mat4x2 a; };
1615 layout(location = 0) out S var;
1624 precision highp float;
1625 ${FRAGMENT_DECLARATIONS}
1626 struct S { mediump mat4x2 a; };
1627 layout(location = 0) in S var;
1638 desc "varying of type mat4x3 inside struct"
1641 input mat4x3 in0 = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1642 output mat4x3 out0 = [ mat4x3(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0) ];
1646 ${VERTEX_DECLARATIONS}
1647 struct S { mediump mat4x3 a; };
1648 layout(location = 0) out S var;
1657 precision highp float;
1658 ${FRAGMENT_DECLARATIONS}
1659 struct S { mediump mat4x3 a; };
1660 layout(location = 0) in S var;
1671 desc "varying of type mat4 inside struct"
1674 input mat4 in0 = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
1675 output mat4 out0 = [ mat4(-1.25, 1.25, -9.5, -12.2, -25.65, -7.25, 14.21, -77.7, 0.0, 1.0, -1.0, 2.0, 2.25, 2.25, 22.5, 225.0) ];
1679 ${VERTEX_DECLARATIONS}
1680 struct S { mediump mat4 a; };
1681 layout(location = 0) out S var;
1690 precision highp float;
1691 ${FRAGMENT_DECLARATIONS}
1692 struct S { mediump mat4 a; };
1693 layout(location = 0) in S var;
1704 desc "varying of type int inside struct"
1707 input int in0 = [ -1 | -25 | 1 | 2 | 3 | 16 ];
1708 output int out0 = [ -1 | -25 | 1 | 2 | 3 | 16 ];
1712 ${VERTEX_DECLARATIONS}
1713 struct S { mediump int a; };
1714 layout(location = 0) flat out S var;
1724 ${FRAGMENT_DECLARATIONS}
1725 struct S { mediump int a; };
1726 layout(location = 0) flat in S var;
1737 desc "varying of type ivec2 inside struct"
1740 input ivec2 in0 = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
1741 output ivec2 out0 = [ ivec2(-1, 1) | ivec2(-25, 25) | ivec2(1, 1) | ivec2(2, 3) | ivec2(16, 17) ];
1745 ${VERTEX_DECLARATIONS}
1746 struct S { mediump ivec2 a; };
1747 layout(location = 0) flat out S var;
1757 ${FRAGMENT_DECLARATIONS}
1758 struct S { mediump ivec2 a; };
1759 layout(location = 0) flat in S var;
1770 desc "varying of type ivec3 inside struct"
1773 input ivec3 in0 = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1774 output ivec3 out0 = [ ivec3(-1, 1, -2) | ivec3(-25, 25, -3) | ivec3(1, 1, 1) | ivec3(2, 3, 4) | ivec3(16, 17, 18) ];
1778 ${VERTEX_DECLARATIONS}
1779 struct S { mediump ivec3 a; };
1780 layout(location = 0) flat out S var;
1790 ${FRAGMENT_DECLARATIONS}
1791 struct S { mediump ivec3 a; };
1792 layout(location = 0) flat in S var;
1803 desc "varying of type ivec4 inside struct"
1806 input ivec4 in0 = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
1807 output ivec4 out0 = [ ivec4(-1, 1, -2, 2) | ivec4(-25, 25, -3, 3) | ivec4(1, 1, 1, 1) | ivec4(2, 3, 4, 5) | ivec4(16, 17, 18, 19) ];
1811 ${VERTEX_DECLARATIONS}
1812 struct S { mediump ivec4 a; };
1813 layout(location = 0) flat out S var;
1823 ${FRAGMENT_DECLARATIONS}
1824 struct S { mediump ivec4 a; };
1825 layout(location = 0) flat in S var;
1836 desc "varying of type uint in struct"
1839 input uint in0 = [ 1 | 2 | 3 | 16 ];
1840 output uint out0 = [ 1 | 2 | 3 | 16 ];
1844 ${VERTEX_DECLARATIONS}
1845 struct S { mediump uint a; };
1846 layout(location = 0) flat out S var;
1856 ${FRAGMENT_DECLARATIONS}
1857 struct S { mediump uint a; };
1858 layout(location = 0) flat in S var;
1869 desc "varying of type uvec2 inside struct"
1872 input uvec2 in0 = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1873 output uvec2 out0 = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) ];
1877 ${VERTEX_DECLARATIONS}
1878 struct S { mediump uvec2 a; };
1879 layout(location = 0) flat out S var;
1889 ${FRAGMENT_DECLARATIONS}
1890 struct S { mediump uvec2 a; };
1891 layout(location = 0) flat in S var;
1902 desc "varying of type uvec3 inside struct"
1905 input uvec3 in0 = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1906 output uvec3 out0 = [ uvec3(1, 1, 2) | uvec3(25, 25, 3) | uvec3(1, 1, 1) | uvec3(2, 3, 4) | uvec3(16, 17, 18) ];
1910 ${VERTEX_DECLARATIONS}
1911 struct S { mediump uvec3 a; };
1912 layout(location = 0) flat out S var;
1922 ${FRAGMENT_DECLARATIONS}
1923 struct S { mediump uvec3 a; };
1924 layout(location = 0) flat in S var;
1935 desc "varying of type uvec4 inside struct"
1938 input uvec4 in0 = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
1939 output uvec4 out0 = [ uvec4(1, 1, 2, 2) | uvec4(25, 25, 3, 3) | uvec4(1, 1, 1, 1) | uvec4(2, 3, 4, 5) | uvec4(16, 17, 18, 19) ];
1943 ${VERTEX_DECLARATIONS}
1944 struct S { mediump uvec4 a; };
1945 layout(location = 0) flat out S var;
1955 ${FRAGMENT_DECLARATIONS}
1956 struct S { mediump uvec4 a; };
1957 layout(location = 0) flat in S var;
1968 desc "varyings of type float and vec3 inside struct"
1971 input float in0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1972 output float out0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
1973 input vec3 in1 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1974 output vec3 out1 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
1978 ${VERTEX_DECLARATIONS}
1979 struct S { mediump float a; highp vec3 b; };
1980 layout(location = 0) out S var;
1990 precision highp float;
1991 ${FRAGMENT_DECLARATIONS}
1992 struct S { mediump float a; highp vec3 b; };
1993 layout(location = 0) in S var;
2003 case float_uvec2_vec3
2005 desc "varyings of type float and vec3 inside struct"
2008 input float in0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
2009 output float out0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
2010 input uvec2 in1 = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) | uvec2(8, 7) ];
2011 output uvec2 out1 = [ uvec2(1, 1) | uvec2(25, 25) | uvec2(1, 1) | uvec2(2, 3) | uvec2(16, 17) | uvec2(8, 7) ];
2012 input vec3 in2 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
2013 output vec3 out2 = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
2017 ${VERTEX_DECLARATIONS}
2018 struct S { mediump float a; highp uvec2 b; highp vec3 c; };
2019 layout(location = 0) flat out S var;
2031 precision highp float;
2032 ${FRAGMENT_DECLARATIONS}
2033 struct S { mediump float a; highp uvec2 b; highp vec3 c; };
2034 layout(location = 0) flat in S var;
2046 group interpolation "Varying interpolation modes"
2049 desc "varying of type vec4"
2052 input vec4 in0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
2053 output vec4 out0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
2057 ${VERTEX_DECLARATIONS}
2058 layout(location = 0) smooth out vec4 var;
2067 precision highp float;
2068 ${FRAGMENT_DECLARATIONS}
2069 layout(location = 0) smooth in vec4 var;
2080 desc "varying of type vec4"
2083 input vec4 in0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
2084 output vec4 out0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
2088 ${VERTEX_DECLARATIONS}
2089 layout(location = 0) centroid out vec4 var;
2098 precision highp float;
2099 ${FRAGMENT_DECLARATIONS}
2100 layout(location = 0) centroid in vec4 var;
2111 desc "varying of type vec4"
2114 input vec4 in0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
2115 output vec4 out0 = [ vec4(-1.25, 1.25, -9.5, -12.2) | vec4(-25.65, -7.25, 14.21, -77.7) | vec4(0.0, 1.0, -1.0, 2.0) | vec4(2.25, 2.25, 22.5, 225.0) | vec4(3.4, 9.5, 19.5, 29.5) | vec4(16.0, 32.0, -64.0, -128.0) ];
2119 ${VERTEX_DECLARATIONS}
2120 layout(location = 0) flat out vec4 var;
2129 precision highp float;
2130 ${FRAGMENT_DECLARATIONS}
2131 layout(location = 0) flat in vec4 var;
2141 group usage "Varying usage in shaders"
2144 desc "read back (an already written) varying in the vertex shader"
2147 input float in0 = [ 1.0 | 0.0 | -2.0 | 10.0 ];
2148 output float out0 = [ 3.0 | 0.0 | -6.0 | 30.0 ];
2152 precision highp float;
2153 ${VERTEX_DECLARATIONS}
2154 layout(location = 0) out float var1;
2155 layout(location = 1) out float var2;
2166 precision highp float;
2167 ${FRAGMENT_DECLARATIONS}
2168 layout(location = 0) in float var1;
2169 layout(location = 1) in float var2;