1 # not declared in vertex shader, declared in fragment shader
3 desc "varying declared in fragment shader, no reference in vertex shader"
4 values { output float out0 = 1.0; }
13 precision mediump float;
14 varying mediump float var;
15 ${FRAGMENT_DECLARATIONS}
24 # declared in vertex shader, no reference in frag shader
26 desc "varying declared in vertex shader, no reference in fragment shader"
28 ${VERTEX_DECLARATIONS}
29 varying mediump float var;
38 gl_FragColor = vec4(1.0);
43 # declared in vertex shader, declared in frag shader
45 desc "varying declared in both vertex and fragment shader, but not used"
47 ${VERTEX_DECLARATIONS}
48 varying mediump float var;
55 varying mediump float var;
58 gl_FragColor = vec4(1.0);
63 # declared in vertex shader, static use in frag shader
65 desc "varying declared in both shaders, statically used in fragment shader"
66 values { uniform bool u_false = false; }
68 ${VERTEX_DECLARATIONS}
69 varying mediump float var;
76 varying mediump float var;
81 gl_FragColor = vec4(var);
83 gl_FragColor = vec4(1.0);
88 # static use in vertex shader, no reference in fragment shader
90 desc "varying declared and statically used in vertex shader, no reference in fragment shader"
91 values { uniform bool u_false = false; }
93 ${VERTEX_DECLARATIONS}
94 varying mediump float var;
105 gl_FragColor = vec4(1.0);
110 # static use in vertex shader, declared in fragment shader
112 desc "varying declared and statically used in vertex shader, only declared in fragment shader"
113 values { uniform bool u_false = false; }
115 ${VERTEX_DECLARATIONS}
116 varying mediump float var;
125 varying mediump float var;
128 gl_FragColor = vec4(1.0);
133 # static use in vertex shader, used in fragment shader
135 desc "varying statically used in both vertex and fragment shader"
136 values { uniform bool u_false = false; }
138 ${VERTEX_DECLARATIONS}
139 varying mediump float var;
148 ${FRAGMENT_DECLARATIONS}
149 varying mediump float var;
153 gl_FragColor = vec4(var);
155 gl_FragColor = vec4(1.0);
160 case varying_type_float
161 desc "varying of type float"
164 input float in0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
165 output float out0 = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
168 ${VERTEX_DECLARATIONS}
169 varying mediump float var;
177 precision mediump float;
178 ${FRAGMENT_DECLARATIONS}
188 case varying_type_vec2
189 desc "varying of type vec2"
192 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) ];
193 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) ];
196 ${VERTEX_DECLARATIONS}
197 varying mediump vec2 var;
205 precision mediump float;
206 ${FRAGMENT_DECLARATIONS}
216 case varying_type_vec3
217 desc "varying of type vec3"
220 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) ];
221 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) ];
224 ${VERTEX_DECLARATIONS}
225 varying mediump vec3 var;
233 precision mediump float;
234 ${FRAGMENT_DECLARATIONS}
244 case varying_type_vec4
245 desc "varying of type vec4"
248 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) ];
249 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) ];
252 ${VERTEX_DECLARATIONS}
253 varying mediump vec4 var;
261 precision mediump float;
262 ${FRAGMENT_DECLARATIONS}
272 case varying_type_mat2
273 desc "varying of type mat2"
276 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) ];
277 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) ];
280 ${VERTEX_DECLARATIONS}
281 varying mediump mat2 var;
289 precision mediump float;
290 ${FRAGMENT_DECLARATIONS}
300 case varying_type_mat3
301 desc "varying of type mat3"
304 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) ];
305 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) ];
308 ${VERTEX_DECLARATIONS}
309 varying mediump mat3 var;
317 precision mediump float;
318 ${FRAGMENT_DECLARATIONS}
328 case varying_type_mat4
329 desc "varying of type mat4"
332 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) ];
333 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) ];
336 ${VERTEX_DECLARATIONS}
337 varying mediump mat4 var;
345 precision mediump float;
346 ${FRAGMENT_DECLARATIONS}
356 # differing precision tests
357 case varying_differing_precision_1
358 desc "varying declared as highp in vertex shader, but mediump in fragment shader"
361 input float in0 = [ -1.25 | -25.55 | 1.0 | 2.25 | 3.4 | 16.0 ];
362 output float out0 = [ -1.25 | -25.55 | 1.0 | 2.25 | 3.4 | 16.0 ];
366 ${VERTEX_DECLARATIONS}
367 varying highp float var;
375 precision mediump float;
376 ${FRAGMENT_DECLARATIONS}
377 varying mediump float var;
386 # differing precision tests
387 case varying_differing_precision_2
388 desc "varying declared as highp in vertex shader, but lowp in fragment shader"
391 input float in0 = [ -1.25 | -25.56 | 1.0 | 2.25 | 3.4 | 16.0 ];
392 output float out0 = [ -1.25 | -25.56 | 1.0 | 2.25 | 3.4 | 16.0 ];
396 ${VERTEX_DECLARATIONS}
397 varying highp vec2 var;
400 var = vec2(in0, 2.0*in0);
405 precision mediump float;
406 ${FRAGMENT_DECLARATIONS}
407 varying lowp vec2 var;
410 out0 = var.y - var.x;
416 # differing precision tests
417 case varying_differing_precision_3
418 desc "varying declared as lowp in vertex shader, but mediump in fragment shader"
421 input float in0 = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
422 output float out0 = [ -1.25 | -25.0 | 1.0 | 2.25 | 3.4 | 16.0 ];
426 ${VERTEX_DECLARATIONS}
427 varying lowp vec4 var;
430 var = vec4(in0, 2.0*in0, -in0, -in0);
435 precision mediump float;
436 ${FRAGMENT_DECLARATIONS}
437 varying mediump vec4 var;
440 out0 = var.x + var.y + var.z + var.w;
446 # mismatched type, static use but no runtime use in the fragment shader
447 case varying_type_mismatch_1
448 desc "varying type mismatch (float vs. vec2), static use but no runtime use in the fragment shader"
451 ${VERTEX_DECLARATIONS}
452 varying mediump float var;
460 varying mediump vec2 var;
465 gl_FragColor = vec4(var.y);
469 ${FRAG_COLOR} = vec4(1.0);
475 # mismatched type, varyings used
476 case varying_type_mismatch_2
477 desc "varying type mismatch (float vs. vec2)"
480 ${VERTEX_DECLARATIONS}
481 varying mediump float var;
489 varying mediump vec2 var;
492 gl_FragColor = var.xyyx;
497 # no declaration in vertex shader, but static use in fragment
498 case varying_illegal_usage_1
499 desc "varying not declared in vertex shader, but statically used in fragment shader"
502 ${VERTEX_DECLARATIONS}
509 varying mediump float var;
512 gl_FragColor = vec4(var);
517 # integer varyings not allowed
518 case invalid_varying_type_int
519 desc "integer varying used"
522 ${VERTEX_DECLARATIONS}
523 varying mediump int var;
530 varying mediump int var;
533 gl_FragColor = vec4(1.0);
538 # bool varyings not allowed
539 case invalid_varying_type_bool
540 desc "boolean varying used"
543 ${VERTEX_DECLARATIONS}
554 gl_FragColor = vec4(1.0);
559 # struct varyings not allowed
560 case invalid_varying_type_struct
561 desc "struct varying used"
564 ${VERTEX_DECLARATIONS}
565 varying struct { mediump float foo; } var;
572 varying struct { mediump float foo; } var;
575 gl_FragColor = vec4(1.0);
580 case varying_readback_1
581 desc "read back (an already written) varying in the vertex shader"
584 input float in0 = [ 1.0 | 0.0 | -2.0 | 10.0 ];
585 output float out0 = [ 3.0 | 0.0 | -6.0 | 30.0 ];
588 precision mediump float;
589 ${VERTEX_DECLARATIONS}
601 precision mediump float;
602 ${FRAGMENT_DECLARATIONS}
614 case varying_writeback_1
615 desc "write back a varying in the fragment shader"
618 precision mediump float;
619 ${VERTEX_DECLARATIONS}
631 precision mediump float;
632 ${FRAGMENT_DECLARATIONS}
645 # Struct linkage handling
647 desc "Same uniform struct in both shaders"
649 uniform float val.a = 1.0;
650 uniform float val.b = 2.0;
651 output float out0 = 3.0;
654 ${VERTEX_DECLARATIONS}
655 struct Struct {mediump float a; mediump float b;};
657 varying mediump float dummy;
660 dummy = val.a + val.b;
665 precision mediump float;
666 struct Struct {mediump float a; mediump float b;};
668 varying mediump float dummy;
669 ${FRAGMENT_DECLARATIONS}
672 out0 = val.b + val.a;
680 case uniform_struct_vertex_only
681 desc "Uniform struct declared in both, used only in vertex."
683 uniform float val.a = 1.0;
684 uniform float val.b = 2.0;
685 output float out0 = 3.0;
688 ${VERTEX_DECLARATIONS}
689 struct Struct {mediump float a; mediump float b;};
691 varying mediump float res;
699 precision mediump float;
700 struct Struct {mediump float a; mediump float b;};
702 varying mediump float res;
703 ${FRAGMENT_DECLARATIONS}
712 case uniform_struct_fragment_only
713 desc "Uniform struct declared in both, used only in fragment."
715 uniform float val.a = 1.0;
716 uniform float val.b = 2.0;
717 output float out0 = 3.0;
720 ${VERTEX_DECLARATIONS}
721 struct Struct {mediump float a; mediump float b;};
729 precision mediump float;
730 struct Struct {mediump float a; mediump float b;};
732 ${FRAGMENT_DECLARATIONS}
735 out0 = val.a + val.b;
741 case uniform_struct_partial
742 desc "Uniform struct declared in both, used partially in both."
744 uniform float val.a = 1.0;
745 uniform float val.b = 2.0;
746 output float out0 = 3.0;
749 ${VERTEX_DECLARATIONS}
750 struct Struct {mediump float a; mediump float b;};
752 varying mediump float res;
760 precision mediump float;
761 struct Struct {mediump float a; mediump float b;};
763 ${FRAGMENT_DECLARATIONS}
764 varying mediump float res;
773 case uniform_struct_vec4
774 desc "Same uniform struct in both shaders. Datatype vec4"
776 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
777 uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
778 output float out0 = 3.0;
781 ${VERTEX_DECLARATIONS}
782 struct Struct {mediump vec4 a; mediump vec4 b;};
784 varying mediump float dummy;
787 dummy = val.a.x + val.b.y;
792 precision mediump float;
793 struct Struct {mediump vec4 a; mediump vec4 b;};
795 varying mediump float dummy;
796 ${FRAGMENT_DECLARATIONS}
799 out0 = val.b.y + val.a.x;
807 case uniform_struct_vertex_only_vec4
808 desc "Uniform struct declared in both, used only in vertex. Datatype vec4 "
810 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
811 uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
812 output float out0 = 3.0;
815 ${VERTEX_DECLARATIONS}
816 struct Struct {mediump vec4 a; mediump vec4 b;};
818 varying mediump float res;
821 res = val.a.x + val.b.y;
826 precision mediump float;
827 struct Struct {mediump vec4 a; mediump vec4 b;};
829 varying mediump float res;
830 ${FRAGMENT_DECLARATIONS}
839 case uniform_struct_fragment_only_vec4
840 desc "Uniform struct declared in both, used only in fragment. Datatype vec4"
842 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
843 uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
844 output float out0 = 3.0;
847 ${VERTEX_DECLARATIONS}
848 struct Struct {mediump vec4 a; mediump vec4 b;};
856 precision mediump float;
857 struct Struct {mediump vec4 a; mediump vec4 b;};
859 ${FRAGMENT_DECLARATIONS}
862 out0 = val.a.x + val.b.y;
868 case uniform_struct_partial_vec4
869 desc "Uniform struct declared in both, used partially in both. Datatype vec4"
871 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
872 uniform vec4 val.b = vec4(1.0, 2.0, 3.0, 4.0);
873 output float out0 = 3.0;
876 ${VERTEX_DECLARATIONS}
877 struct Struct {mediump vec4 a; mediump vec4 b;};
879 varying mediump float res;
887 precision mediump float;
888 struct Struct {mediump vec4 a; mediump vec4 b;};
890 ${FRAGMENT_DECLARATIONS}
891 varying mediump float res;
894 out0 = res + val.b.y;
900 case uniform_struct_vec4_vec3
901 desc "Same uniform struct in both shaders. Datatype vec4 and vec3"
903 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
904 uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
905 output float out0 = 3.0;
908 ${VERTEX_DECLARATIONS}
909 struct Struct {mediump vec4 a; mediump vec3 b;};
911 varying mediump float dummy;
914 dummy = val.a.x + val.b.y;
919 precision mediump float;
920 struct Struct {mediump vec4 a; mediump vec3 b;};
922 varying mediump float dummy;
923 ${FRAGMENT_DECLARATIONS}
926 out0 = val.b.y + val.a.x;
934 case uniform_struct_vertex_only_vec4_vec3
935 desc "Uniform struct declared in both, used only in vertex. Datatype vec4 and vec3"
937 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
938 uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
939 output float out0 = 3.0;
942 ${VERTEX_DECLARATIONS}
943 struct Struct {mediump vec4 a; mediump vec3 b;};
945 varying mediump float res;
948 res = val.a.x + val.b.y;
953 precision mediump float;
954 struct Struct {mediump vec4 a; mediump vec3 b;};
956 varying mediump float res;
957 ${FRAGMENT_DECLARATIONS}
966 case uniform_struct_fragment_only_vec4_vec3
967 desc "Uniform struct declared in both, used only in fragment. Datatype vec4 and vec3"
969 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
970 uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
971 output float out0 = 3.0;
974 ${VERTEX_DECLARATIONS}
975 struct Struct {mediump vec4 a; mediump vec3 b;};
983 precision mediump float;
984 struct Struct {mediump vec4 a; mediump vec3 b;};
986 ${FRAGMENT_DECLARATIONS}
989 out0 = val.a.x + val.b.y;
995 case uniform_struct_partial_vec4_vec3
996 desc "Uniform struct declared in both, used partially in both. Datatype vec4 and vec3"
998 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
999 uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
1000 output float out0 = 3.0;
1003 ${VERTEX_DECLARATIONS}
1004 struct Struct {mediump vec4 a; mediump vec3 b;};
1006 varying mediump float res;
1014 precision mediump float;
1015 struct Struct {mediump vec4 a; mediump vec3 b;};
1017 ${FRAGMENT_DECLARATIONS}
1018 varying mediump float res;
1021 out0 = res + val.b.y;
1027 case uniform_struct_vec4_float
1028 desc "Same uniform struct in both shaders. Datatype vec4 and float"
1030 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
1031 uniform float val.b = 2.0;
1032 output float out0 = 3.0;
1035 ${VERTEX_DECLARATIONS}
1036 struct Struct {mediump vec4 a; mediump float b;};
1038 varying mediump float dummy;
1041 dummy = val.a.x + val.b;
1046 precision mediump float;
1047 struct Struct {mediump vec4 a; mediump float b;};
1049 varying mediump float dummy;
1050 ${FRAGMENT_DECLARATIONS}
1053 out0 = val.b + val.a.x;
1054 out0 = out0 + dummy;
1055 out0 = out0 - dummy;
1061 case uniform_struct_vertex_only_vec4_float
1062 desc "Uniform struct declared in both, used only in vertex. Datatype vec4 and float"
1064 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
1065 uniform float val.b = 2.0;
1066 output float out0 = 3.0;
1069 ${VERTEX_DECLARATIONS}
1070 struct Struct {mediump vec4 a; mediump float b;};
1072 varying mediump float res;
1075 res = val.a.x + val.b;
1080 precision mediump float;
1081 struct Struct {mediump vec4 a; mediump float b;};
1083 varying mediump float res;
1084 ${FRAGMENT_DECLARATIONS}
1093 case uniform_struct_fragment_only_vec4_float
1094 desc "Uniform struct declared in both, used only in fragment. Datatype vec4 and float"
1096 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
1097 uniform float val.b = 2.0;
1098 output float out0 = 3.0;
1101 ${VERTEX_DECLARATIONS}
1102 struct Struct {mediump vec4 a; mediump float b;};
1110 precision mediump float;
1111 struct Struct {mediump vec4 a; mediump float b;};
1113 ${FRAGMENT_DECLARATIONS}
1116 out0 = val.a.x + val.b;
1122 case uniform_struct_partial_vec4_float
1123 desc "Uniform struct declared in both, used partially in both. Datatype vec4 and float"
1125 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
1126 uniform float val.b = 2.0;
1127 output float out0 = 3.0;
1130 ${VERTEX_DECLARATIONS}
1131 struct Struct {mediump vec4 a; mediump float b;};
1133 varying mediump float res;
1141 precision mediump float;
1142 struct Struct {mediump vec4 a; mediump float b;};
1144 ${FRAGMENT_DECLARATIONS}
1145 varying mediump float res;
1154 case uniform_struct_partial_vec4_struct
1155 desc "Uniform struct declared in both, used partially in both. Datatype vec4 and struct with vec4"
1157 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
1158 uniform vec4 val.b.c = vec4(1.0, 2.0, 3.0, 4.0);
1159 output float out0 = 3.0;
1162 ${VERTEX_DECLARATIONS}
1163 struct Inner {mediump vec4 c;};
1164 struct Struct {mediump vec4 a; Inner b;};
1166 varying mediump float res;
1174 precision mediump float;
1175 struct Inner {mediump vec4 c;};
1176 struct Struct {mediump vec4 a; Inner b;};
1178 ${FRAGMENT_DECLARATIONS}
1179 varying mediump float res;
1182 out0 = res + val.b.c.y;
1190 case uniform_struct_partial_vec4_vec3_struct
1191 desc "Uniform struct declared in both, used partially in both. Datatype vec4 and struct with vec3"
1193 uniform vec4 val.a = vec4(1.0, 2.0, 3.0, 4.0);
1194 uniform vec3 val.b.c = vec3(1.0, 2.0, 3.0);
1195 output float out0 = 3.0;
1198 ${VERTEX_DECLARATIONS}
1199 struct Inner {mediump vec3 c;};
1200 struct Struct {mediump vec4 a; Inner b;};
1202 varying mediump float res;
1210 precision mediump float;
1211 struct Inner {mediump vec3 c;};
1212 struct Struct {mediump vec4 a; Inner b;};
1214 ${FRAGMENT_DECLARATIONS}
1215 varying mediump float res;
1218 out0 = res + val.b.c.y;
1224 case uniform_struct_partial_vec2_vec3
1225 desc "Uniform struct declared in both, used partially in both. Datatype vec2 and vec3"
1227 uniform vec2 val.a = vec2(1.0, 2.0);
1228 uniform vec3 val.b = vec3(1.0, 2.0, 3.0);
1229 output float out0 = 3.0;
1232 ${VERTEX_DECLARATIONS}
1233 struct Struct {mediump vec2 a; mediump vec3 b;};
1235 varying mediump float res;
1243 precision mediump float;
1244 struct Struct {mediump vec2 a; mediump vec3 b;};
1246 ${FRAGMENT_DECLARATIONS}
1247 varying mediump float res;
1250 out0 = res + val.b.y;
1256 case uniform_struct_partial_vec2_int
1257 desc "Uniform struct declared in both, used partially in both. Datatype vec2 and int"
1259 uniform vec2 val.a = vec2(1.0, 2.0);
1260 uniform int val.b = 2;
1261 output float out0 = 3.0;
1264 ${VERTEX_DECLARATIONS}
1265 struct Struct {mediump vec2 a; mediump int b;};
1267 varying mediump float res;
1275 precision mediump float;
1276 struct Struct {mediump vec2 a; mediump int b;};
1278 ${FRAGMENT_DECLARATIONS}
1279 varying mediump float res;
1282 out0 = res + float(val.b);
1288 case uniform_struct_partial_int_float
1289 desc "Uniform struct declared in both, used partially in both. Datatype int and float"
1291 uniform float val.a = 1.0;
1292 uniform int val.b = 2;
1293 output float out0 = 3.0;
1296 ${VERTEX_DECLARATIONS}
1297 struct Struct {mediump float a; mediump int b;};
1299 varying mediump float res;
1307 precision mediump float;
1308 struct Struct {mediump float a; mediump int b;};
1310 ${FRAGMENT_DECLARATIONS}
1311 varying mediump float res;
1314 out0 = res + float(val.b);
1320 case uniform_struct_partial_bvec2_vec2
1321 desc "Uniform struct declared in both, used partially in both. Datatype bvec2 and vec2"
1323 uniform bvec2 val.a = bvec2(true, true);
1324 uniform vec2 val.b = vec2(1.0, 2.0);
1325 output float out0 = 3.0;
1328 ${VERTEX_DECLARATIONS}
1329 struct Struct {bvec2 a; mediump vec2 b;};
1331 varying mediump float res;
1334 res = float(val.a.x);
1339 precision mediump float;
1340 struct Struct {bvec2 a; mediump vec2 b;};
1342 ${FRAGMENT_DECLARATIONS}
1343 varying mediump float res;
1346 out0 = res + val.b.y;
1352 case uniform_struct_partial_ivec2_vec2
1353 desc "Uniform struct declared in both, used partially in both. Datatype ivec2 and vec2"
1355 uniform ivec2 val.a = ivec2(1, 2);
1356 uniform vec2 val.b = vec2(1.0, 2.0);
1357 output float out0 = 3.0;
1360 ${VERTEX_DECLARATIONS}
1361 struct Struct {mediump ivec2 a; mediump vec2 b;};
1363 varying mediump float res;
1366 res = vec2(val.a).x;
1371 precision mediump float;
1372 struct Struct {mediump ivec2 a; mediump vec2 b;};
1374 ${FRAGMENT_DECLARATIONS}
1375 varying mediump float res;
1378 out0 = res + val.b.y;
1384 case uniform_struct_partial_ivec2_ivec2
1385 desc "Uniform struct declared in both, used partially in both. Datatype ivec2 and ivec2"
1387 uniform ivec2 val.a = ivec2(1, 2);
1388 uniform ivec2 val.b = ivec2(1, 2);
1389 output float out0 = 3.0;
1392 ${VERTEX_DECLARATIONS}
1393 struct Struct {mediump ivec2 a; mediump ivec2 b;};
1395 varying mediump float res;
1398 res = vec2(val.a).x;
1403 precision mediump float;
1404 struct Struct {mediump ivec2 a; mediump ivec2 b;};
1406 ${FRAGMENT_DECLARATIONS}
1407 varying mediump float res;
1410 out0 = res + vec2(val.b).y;
1416 case uniform_struct_type_conflict_1
1417 desc "Fragment struct has one less member than fragment version"
1419 values {output float out0 = 3.0;}
1421 ${VERTEX_DECLARATIONS}
1422 struct Struct {mediump float a; mediump float b;};
1424 varying mediump float res;
1432 precision mediump float;
1433 struct Struct {mediump float a;};
1435 ${FRAGMENT_DECLARATIONS}
1436 varying mediump float res;
1445 case uniform_struct_type_conflict_2
1446 desc "Vertex struct has int, fragment struct has float."
1448 values {output float out0 = 3.0;}
1450 ${VERTEX_DECLARATIONS}
1451 struct Struct {mediump int a;};
1453 varying mediump float res;
1461 precision mediump float;
1462 struct Struct {mediump float a;};
1464 ${FRAGMENT_DECLARATIONS}
1465 varying mediump float res;
1474 case uniform_struct_type_conflict_3
1475 desc "Vertex struct has vec3, fragment struct has vec4."
1477 values {output float out0 = 3.0;}
1479 ${VERTEX_DECLARATIONS}
1480 struct Struct {mediump vec3 a;};
1482 varying mediump float res;
1485 res = float(val.a.x);
1490 precision mediump float;
1491 struct Struct {mediump vec4 a;};
1493 ${FRAGMENT_DECLARATIONS}
1494 varying mediump float res;
1503 case uniform_struct_precision_conflict_1
1504 desc "Vertex side struct has highp, fragment side struct mediump."
1506 values {output float out0 = 3.0;}
1508 ${VERTEX_DECLARATIONS}
1509 struct Struct {highp float a;};
1511 varying mediump float res;
1519 precision mediump float;
1520 struct Struct {mediump float a;};
1522 ${FRAGMENT_DECLARATIONS}
1523 varying mediump float res;
1532 case uniform_struct_precision_conflict_2
1533 desc "Vertex side struct has mediump, fragment side struct lowp."
1535 values {output float out0 = 3.0;}
1537 ${VERTEX_DECLARATIONS}
1538 struct Struct {mediump float a;};
1540 varying mediump float res;
1548 precision mediump float;
1549 struct Struct {lowp float a;};
1551 ${FRAGMENT_DECLARATIONS}
1552 varying mediump float res;
1561 case uniform_struct_precision_conflict_3
1562 desc "Vertex side struct has lowp, fragment side struct mediump."
1564 values {output float out0 = 3.0;}
1566 ${VERTEX_DECLARATIONS}
1567 struct Struct {lowp float a;};
1569 varying mediump float res;
1577 precision mediump float;
1578 struct Struct {mediump float a;};
1580 ${FRAGMENT_DECLARATIONS}
1581 varying mediump float res;
1590 case uniform_struct_precision_conflict_4
1591 desc "Vertex side struct has lowp, fragment side struct implicit mediump."
1593 values {output float out0 = 3.0;}
1595 ${VERTEX_DECLARATIONS}
1596 struct Struct {lowp float a;};
1598 varying mediump float res;
1606 precision mediump float;
1607 struct Struct {float a;};
1609 ${FRAGMENT_DECLARATIONS}
1610 varying mediump float res;
1619 case uniform_struct_use_case_rip
1620 desc "Complex Light struct from use case tests."
1622 uniform float val.constantAttenuation = 1.0;
1623 uniform float val.quadraticAttenuation = 1.0;
1624 output float out0 = 2.0;
1630 highp vec4 position;
1631 highp vec3 direction;
1632 mediump float constantAttenuation;
1633 mediump float linearAttenuation;
1634 mediump float quadraticAttenuation;
1636 ${VERTEX_DECLARATIONS}
1638 varying mediump float res;
1641 res = val.constantAttenuation;
1646 precision mediump float;
1650 highp vec4 position;
1651 highp vec3 direction;
1652 mediump float constantAttenuation;
1653 mediump float linearAttenuation;
1654 mediump float quadraticAttenuation;
1656 struct Struct {float a;};
1658 ${FRAGMENT_DECLARATIONS}
1659 varying mediump float res;
1662 out0 = res + val.quadraticAttenuation;
1668 case uniform_struct_use_case_rip_sans_highp
1669 desc "Complex Light struct from use case tests, without highp usage"
1671 uniform float val.constantAttenuation = 1.0;
1672 uniform float val.quadraticAttenuation = 1.0;
1673 output float out0 = 2.0;
1679 mediump vec4 position;
1680 mediump vec3 direction;
1681 mediump float constantAttenuation;
1682 mediump float linearAttenuation;
1683 mediump float quadraticAttenuation;
1685 ${VERTEX_DECLARATIONS}
1687 varying mediump float res;
1690 res = val.constantAttenuation;
1695 precision mediump float;
1699 mediump vec4 position;
1700 mediump vec3 direction;
1701 mediump float constantAttenuation;
1702 mediump float linearAttenuation;
1703 mediump float quadraticAttenuation;
1705 struct Struct {float a;};
1707 ${FRAGMENT_DECLARATIONS}
1708 varying mediump float res;
1711 out0 = res + val.quadraticAttenuation;