perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.10 / execution / glsl-vs-mat-mul-2.shader_test
blob436c8d23df1059629de0e9e51646c1da9f680930
1 [require]
2 GLSL >= 1.10
4 [vertex shader]
5 uniform vec4 arg0;
6 varying mat4 mat;
8 void main()
10         /* Like glsl-vs-mat-mul-1.shader_test, but put the result in a
11          * varying so that we don't reassociate the matrix
12          * multiplication to produce two mat * vecs instead of mat *
13          * mat and mat * vec.
14          */
15         gl_Position = gl_Vertex;
17         mat4 scale = mat4(arg0.x);
18         mat4 rot = mat4(0.0,    arg0.y, 0.0, 0.0,
19                         arg0.z, 0.0,    0.0, 0.0,
20                         0.0,    0.0,    1.0, 0.0,
21                         0.0,    0.0,    0.0, 1.0);
23         mat = rot * scale;
26 [fragment shader]
27 uniform vec4 arg1;
28 varying mat4 mat;
30 void main()
32         gl_FragColor = mat * arg1;
35 [test]
36 uniform vec4 arg0 2.0 1.0 -1.0 0.0
37 uniform vec4 arg1 0.5 -0.25 0.25 0.25
38 draw rect -1 -1 2 2
39 probe rgba 1 1 0.5 1.0 0.5 0.5