summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-lots-of-tex.shader_test
blob: a31778f4d011e6fa700d75226f59d8716e7f7db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[require]
GLSL >= 1.10

[vertex shader]

void main()
{
	gl_Position = gl_Vertex;
}

[fragment shader]
uniform sampler2D tex;
uniform vec4 cst;
void main()
{
	/* This test is for the extended shader limits on r400 cards.
	 * It should generate 34 TEX instructions.
	 */
	vec4 a = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 b = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 c = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 d = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 e = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 f = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 g = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 h = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 i = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 j = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 k = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 l = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 m = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 n = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 o = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 p = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);
	vec4 q = texture2D(tex, cst.xy) + texture2D(tex, cst.xy);

	gl_FragColor = a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q;
}

[test]
uniform int tex 0
uniform vec4 cst 0.0 0.0 0.0 0.0
texture checkerboard 0 0 (8, 8) (0.01, 0.0, 0.0, 0.0) (0.01, 0.0, 0.0, 0.0)
draw rect -1 -1 2 2
relative probe rgb (0.75, 0.75) (0.4, 0.0, 0.0)