1 /* The ARB_shading_language_420pack suggests:
3 * Verify that the following two arrays are identical:
5 * vec4 a[] = 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(0.0), vec4(0.0), vec4(0.0), vec4(3.6));
9 * vec4 b[] = { vec4(1.2), vec4(0.0), vec4(0.0), vec4(0.0),
10 * vec4(0.0), vec4(0.0), vec4(0.0), vec4(2.4),
11 * vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0),
12 * vec4(0.0), vec4(0.0), vec4(0.0), vec4(3.6) };
14 * This test differs from aggregate-initializer-unsized-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[] = 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(0.0), vec4(0.0), vec4(0.0), vec4(3.6));
35 vec4 b[] = { vec4(1.2), vec4(0.0), vec4(0.0), vec4(0.0),
36 vec4(0.0), vec4(0.0), vec4(0.0), vec4(2.4),
37 vec4(vertex.x), vec4(0.0), vec4(0.0), vec4(0.0),
38 vec4(0.0), vec4(0.0), vec4(0.0), vec4(3.6) };
40 color = vec4(0.0, 1.0, 0.0, 1.0);
42 if (a.length() != b.length()) {
43 color = vec4(0.0, 0.0, 1.0, 1.0);
45 for (int i = 0; i < a.length(); i++) {
47 color = vec4(1.0, 0.0, 0.0, 1.0);
64 probe all rgba 0.0 1.0 0.0 1.0