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
glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git]
/
tests
/
shaders
/
glsl-struct-constructor-01.shader_test
blob
e40e81d199aad315376b1be81f815c27be287120
1
/* Test an unary struct constructor. */
2
3
[require]
4
GLSL >= 1.10
5
6
7
[vertex shader]
8
void main()
9
{
10
gl_Position = ftransform();
11
}
12
13
[fragment shader]
14
struct s {
15
float f;
16
};
17
18
void main()
19
{
20
s s1 = s(0.5);
21
if (s1.f == 0.5)
22
gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
23
else
24
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
25
}
26
27
[test]
28
draw rect -1 -1 2 2
29
probe all rgba 0.0 1.0 0.0 1.0
30