fix the spelling in whole piglit
[piglit.git] / tests / vulkan / shaders / fs-large-local-array.vk_shader_test
blobf37a14556dadaed7757ff4ee4b408bd05818651b
1 # Tests a large uint local array.
2 # Vulkan equivalent to tests/spec/glsl-1.30/execution/fs-large-local-array.shader_test
3 # And quoting from that test:
5 #    "Test correct handling of local-scope declared arrays large enough to
6 #     typically not fit into first level GPU memory such as its register file,
7 #     requiring storing/loading to some device-specific scratch space.
9 #     One hardware example is R600 where arrays larger than 124*vec4 cannot
10 #     fit into its GPR register file and has to be spilled to scratch memory.
11 #     As of 2017-03-06 this is the largest known register file of any GPU, so
12 #     the test uses that as a size to guarantee some form of spilling on any GPU."
14 [require]
16 [vertex shader passthrough]
18 [fragment shader]
19 #version 450
21 layout (binding = 5) uniform block {
22        uint i;
25 layout (location = 0) out vec4 out_color;
27 void main()
29         uint A[130];
30         A[20] = 0u;
31         A[i] = 37u;
32         out_color.rba = vec3(0.0, 0.0, 1.0);
33         out_color.g = float(A[20] == 37u);
36 [test]
37 clear color 1.0 0.0 0.0 1.0
38 clear
40 ubo 5 subdata uint 0 19
41 draw rect -1 -1 2 2
42 probe all rgba 0.0 0.0 0.0 1.0
44 clear
45 ubo 5 subdata uint 0 20
46 draw rect -1 -1 2 2
47 probe all rgba 0.0 1.0 0.0 1.0