arb_program_interface_query: set vs_input2[1][0] as valid name
[piglit.git] / tests / spec / arb_arrays_of_arrays / execution / ubo / fs-mixed-const-nonconst.shader_test
bloba3523ca4fcbf419259ac5bcb05c4e53fdd3b9721
1 # This test verifies that dynamically uniform indexing of UBO arrays
2 # in the fragment shader behaves correctly, when the block member is a
3 # nonconst-indexed array.
5 [require]
6 GLSL >= 1.50
7 GL_ARB_gpu_shader5
8 GL_ARB_arrays_of_arrays
10 [vertex shader passthrough]
12 [fragment shader]
13 #version 150
14 #extension GL_ARB_gpu_shader5: require
15 #extension GL_ARB_arrays_of_arrays: require
17 uniform block {
18         vec4 color[2];
19 } arr[3][2];
21 uniform int n;
22 uniform int m;
24 out vec4 color;
26 void main()
28         color = arr[n][1].color[m];
31 [test]
32 clear color 0.2 0.2 0.2 0.2
33 clear
35 ubo array index 1
36 uniform vec4 block.color[0] 1.0 0.0 0.0 0.0
37 uniform vec4 block.color[1] 0.0 1.0 1.0 0.0
38 ubo array index 3
39 uniform vec4 block.color[0] 0.0 1.0 1.0 0.0
40 uniform vec4 block.color[1] 0.0 1.0 0.0 0.0
41 ubo array index 5
42 uniform vec4 block.color[0] 0.0 0.0 1.0 0.0
43 uniform vec4 block.color[1] 1.0 1.0 1.0 0.0
45 uniform int n 0
46 uniform int m 0
47 draw rect -1 -1 1 1
49 relative probe rect rgb (0.0, 0.0, 0.5, 0.5) (1.0, 0.0, 0.0)
51 uniform int n 1
52 uniform int m 1
53 draw rect 0 -1 1 1
55 relative probe rect rgb (0.5, 0.0, 0.5, 0.5) (0.0, 1.0, 0.0)
57 uniform int n 2
58 uniform int m 0
59 draw rect -1 0 1 1
61 relative probe rect rgb (0.0, 0.5, 0.5, 0.5) (0.0, 0.0, 1.0)
63 uniform int n 2
64 uniform int m 1
65 draw rect 0 0 1 1
67 relative probe rect rgb (0.5, 0.5, 0.5, 0.5) (1.0, 1.0, 1.0)