Merge pull request #2913 from greg-lunarg/i2905
[platform/upstream/glslang.git] / Test / hlsl.struct.frag
1 struct {
2 };
3
4 struct {
5     bool b;
6 };
7
8 struct myS {
9     bool b, c;
10     float4 a, d;
11 };
12
13 myS s1;
14
15 static class {
16     float4 i;
17 } s2;
18
19 struct IN_S {
20     linear float4 a;
21     nointerpolation bool b;
22     noperspective centroid float1 c;
23     sample centroid float2 d;
24     bool ff1 : SV_IsFrontFace;
25     bool ff2 : packoffset(c0.y);
26     bool ff3 : packoffset(c0.y) : register(ps_5_0, s0) ;
27     float4 ff4 : VPOS : packoffset(c0.y) : register(ps_5_0, s0) <int bambam=30;> ;
28 };
29
30 float ff5 : packoffset(c101.y) : register(ps_5_0, s[5]);
31 float ff6 : packoffset(c102.y) : register(s3[5]);
32
33 struct empty {};\r
34 \r
35 struct containEmpty {\r
36     empty e;\r
37 };\r
38
39 float4 PixelShaderFunction(float4 input, IN_S s) : COLOR0
40 {
41     class FS {
42         bool3 b3;
43     } s3;
44
45     s3 == s3;
46     s2.i = s.ff4;
47
48     containEmpty ce;
49     empty e;
50     e = ce.e;
51
52     return input;
53 }