Merge pull request #2976 from jeremy-lunarg/hayes-fix-2975
[platform/upstream/glslang.git] / Test / hlsl.constantbuffer.frag
1
2 struct c1_t {
3     float4 x;
4 };
5
6 struct c2_t {
7     bool x;
8     float y;
9 };
10
11 ConstantBuffer<c1_t> cb1 : register(b12);
12 ConstantBuffer<c2_t> cb2[3];
13 ConstantBuffer<c2_t> cb3[2][4];
14
15 cbuffer cbuff {
16     int c1;
17 };
18
19 float4 main() : SV_Target0
20 {
21     if (cb3[1][2].x)
22         return cb1.x + cb2[1].y + c1;
23     else
24         return cb3[1][3].y;
25 }
26