repo.or.cz
/
piglit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ext_gpu_shader4: add compiler tests for everything
[piglit.git]
/
tests
/
spec
/
glsl-1.50
/
uniform_buffer
/
gs-floats.shader_test
blob
02be6c67db124abf9945f2aceed0bc6b723cc94e
1
[require]
2
GLSL >= 1.50
3
4
[vertex shader]
5
#version 150
6
7
in vec4 vertex;
8
out vec4 vertex_to_gs;
9
10
void main()
11
{
12
vertex_to_gs = vertex;
13
}
14
15
[geometry shader]
16
#version 150
17
18
layout(triangles) in;
19
layout(triangle_strip, max_vertices = 3) out;
20
21
uniform ubo1 {
22
float r;
23
float g;
24
float b;
25
float a;
26
};
27
28
in vec4 vertex_to_gs[3];
29
out vec4 v;
30
31
void main()
32
{
33
for (int i = 0; i < 3; i++) {
34
gl_Position = vertex_to_gs[i];
35
v = vec4(r, g, b, a);
36
EmitVertex();
37
}
38
}
39
40
[fragment shader]
41
#version 150
42
43
in vec4 v;
44
45
void main()
46
{
47
gl_FragColor = v;
48
}
49
50
[vertex data]
51
vertex/float/2
52
-1.0 -1.0
53
1.0 -1.0
54
1.0 1.0
55
-1.0 1.0
56
57
[test]
58
uniform float r 0.0
59
uniform float g 1.0
60
uniform float b 0.0
61
uniform float a 0.0
62
draw arrays GL_TRIANGLE_FAN 0 4
63
probe all rgba 0.0 1.0 0.0 0.0