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
gl/frameworks: Use piglit_set_destroy_func() when gl_fw->destroy is set
[piglit.git]
/
tests
/
spec
/
glsl-1.10
/
linker
/
link-struct-usage.shader_test
blob
7bea0b059f4945c08379e4e1ef0b4edcbc60d252
1
[require]
2
GLSL >= 1.10
3
4
[vertex shader]
5
varying vec4 color;
6
struct S {
7
vec4 v;
8
};
9
void func();
10
11
S a;
12
13
void main()
14
{
15
gl_Position = gl_Vertex;
16
17
a.v = vec4(0.0);
18
19
func();
20
21
color = a.v;
22
}
23
24
[vertex shader]
25
struct S {
26
vec4 v;
27
};
28
29
S a;
30
31
void func()
32
{
33
a.v += vec4(0.0, 1.0, 0.0, 0.0);
34
}
35
36
[fragment shader]
37
varying vec4 color;
38
void main()
39
{
40
gl_FragColor = color;
41
}
42
43
[test]
44
draw rect -1 -1 2 2
45
probe all rgba 0.0 1.0 0.0 0.0