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
ARB_ubo/referenced-by-shader: pass if shader compiler moves UBOs between shaders
[piglit.git]
/
tests
/
spec
/
glsl-1.50
/
uniform_buffer
/
gs-bools.shader_test
blob
221abe818fcfc983008833811a18855f570d8d29
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
bool r;
23
bool g;
24
bool b;
25
bool 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 int r 0
59
uniform int g 1
60
uniform int b 2
61
uniform int a 0
62
draw arrays GL_TRIANGLE_FAN 0 4
63
probe all rgba 0.0 1.0 1.0 0.0