perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.10 / execution / uniform-update.shader_test
blobd38f094f43c7b1897800894b23a68cf1eaca1cf0
1 # Use 4 uniforms and gl_FragCoord (which adds a mesa state parameter) and see
2 # if the uniform storage is updated after reallocating the parameter list.
4 [require]
5 GLSL >= 1.10
7 [vertex shader]
8 #version 110
10 void main()
12         gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
15 [fragment shader]
16 #version 110
18 uniform float zero0, zero1, zero2;
19 uniform float u;
21 void main()
23     gl_FragColor = u + zero0 * gl_FragCoord + zero1 + zero2;
26 [test]
27 uniform float zero0 0
28 uniform float zero1 0
29 uniform float zero2 0
30 uniform float u 0.3
32 clear color 0.0 0.0 0.0 0.0
33 clear
34 ortho
36 draw rect 0 0 50 50
38 uniform float u 0.4
39 draw rect 50 0 50 50
41 uniform float u 0.5
42 draw rect 100 0 50 50
44 uniform float u 0.6
45 draw rect 150 0 50 50
47 probe rgb 25 25 0.3 0.3 0.3
48 probe rgb 75 25 0.4 0.4 0.4
49 probe rgb 125 25 0.5 0.5 0.5
50 probe rgb 175 25 0.6 0.6 0.6