1 /* The ARB_shading_language_420pack suggests:
3 * Verify that the following two arrays are identical:
5 * vec4 a[12] = vec4 [] (vec4(1.2), vec4(0.0), vec4(0.0), vec4(0.0),
6 * vec4(0.0), vec4(0.0), vec4(0.0), vec4(2.4),
7 * vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0));
8 * vec4 b[12] = { vec4(1.2), vec4(0.0), vec4(0.0), vec4(0.0),
9 * vec4(0.0), vec4(0.0), vec4(0.0), vec4(2.4) }; [sic]
11 * Of course, it means to include a final row of four vec4(0.0) in the initializer
14 * This test differs from aggregate-initializer-sized-array.shader_test in that
15 * it specifies one dynamic variable, to further test the compiler. Otherwise,
16 * the initializer is constant folded away. The arrays should still be identical.
21 GL_ARB_shading_language_420pack
24 #extension GL_ARB_shading_language_420pack: enable
31 vec4 a[12] = vec4 [] (vec4(1.2), vec4(0.0), vec4(0.0), vec4(0.0),
32 vec4(0.0), vec4(0.0), vec4(0.0), vec4(2.4),
33 vec4(vertex.x), vec4(0.0), vec4(0.0), vec4(0.0));
34 vec4 b[12] = { vec4(1.2), vec4(0.0), vec4(0.0), vec4(0.0),
35 vec4(0.0), vec4(0.0), vec4(0.0), vec4(2.4),
36 vec4(vertex.x), vec4(0.0), vec4(0.0), vec4(0.0) };
38 color = vec4(0.0, 1.0, 0.0, 1.0);
40 if (a.length() != b.length()) {
41 color = vec4(0.0, 0.0, 1.0, 1.0);
43 for (int i = 0; i < a.length(); i++) {
45 color = vec4(1.0, 0.0, 0.0, 1.0);
62 probe all rgba 0.0 1.0 0.0 1.0