blob: 5a71458a81a620d8870f6a0dcb444e19628f455e (
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
46
47
48
49
|
[require]
GLSL >= 1.10
[vertex shader]
/**
* Test i965 guardband limits by drawing a really huge triangle. The
* guardband allows primitives to be trivially accepted by the clip stage
* without incurring the overhead of actual clipping. However, there are
* generation-specific limits on the size of a primitive, and software is
* supposed to ensure that clipping reduces primitives to not exceed that.
* Otherwise, coordinates are clamped to fit within that range, causing
* the primitive to be drawn incorrectly.
*
* This makes sure we program the guardband size correctly; otherwise, the
* triangle's vertices will be clamped instead of clipped, resulting in a
* change in position and slope.
*/
attribute vec4 vertex;
void main()
{
gl_Position = gl_ModelViewProjectionMatrix * vertex;
}
[fragment shader]
void main()
{
gl_FragColor = vec4(1.0);
}
[vertex data]
vertex/float/2
-28000.0 -3700.0
37000.0 -3700.0
37000.0 5300.0
[test]
clear color 0.0 0.0 0.0 0.0
clear
ortho
draw arrays GL_TRIANGLE_FAN 0 3
probe rgb 2 175 1.0 1.0 1.0
probe rgb 122 192 1.0 1.0 1.0
probe rgb 201 203 1.0 1.0 1.0
probe rgb 245 199 1.0 1.0 1.0
probe rgb 2 180 0.0 0.0 0.0
probe rgb 122 198 0.0 0.0 0.0
probe rgb 201 208 0.0 0.0 0.0
probe rgb 245 214 0.0 0.0 0.0
|