projects
/
platform
/
upstream
/
glslang.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #2892 from greg-lunarg/mb
[platform/upstream/glslang.git]
/
Test
/
spv.debugInfo.frag
1
#version 450
\r
2
\r
3
struct S {
\r
4
int a;
\r
5
};
\r
6
\r
7
uniform ubuf {
\r
8
S s;
\r
9
};
\r
10
\r
11
uniform sampler2D s2d;
\r
12
\r
13
layout(location = 0) in vec4 inv;
\r
14
layout(location = 0) out vec4 outv;
\r
15
\r
16
vec4 foo(S s)
\r
17
{
\r
18
vec4 r = s.a * inv;
\r
19
++r;
\r
20
if (r.x > 3.0)
\r
21
--r;
\r
22
else
\r
23
r *= 2;
\r
24
\r
25
return r;
\r
26
}
\r
27
\r
28
void main()
\r
29
{
\r
30
outv = foo(s);
\r
31
outv += texture(s2d, vec2(0.5));
\r
32
\r
33
switch (s.a) {
\r
34
case 10:
\r
35
++outv;
\r
36
break;
\r
37
case 20:
\r
38
outv = 2 * outv;
\r
39
++outv;
\r
40
break;
\r
41
default:
\r
42
--outv;
\r
43
break;
\r
44
}
\r
45
\r
46
for (int i = 0; i < 10; ++i)
\r
47
outv *= 3.0;
\r
48
\r
49
outv.x < 10.0 ?
\r
50
outv = sin(outv) :
\r
51
outv = cos(outv);
\r
52
}