• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2layout(input_attachment_index = 1) SubpassInput<float4> subpass_f4 : register(t1);
3layout(input_attachment_index = 2) SubpassInput<int4>   subpass_i4;
4layout(input_attachment_index = 3) SubpassInput<uint4>  subpass_u4;
5
6layout(input_attachment_index = 4) SubpassInputMS<float4> subpass_ms_f4;
7layout(input_attachment_index = 5) SubpassInputMS<int4>   subpass_ms_i4;
8layout(input_attachment_index = 6) SubpassInputMS<uint4>  subpass_ms_u4;
9
10layout(input_attachment_index = 1) SubpassInput<float3> subpass_f3;
11layout(input_attachment_index = 2) SubpassInput<int3>   subpass_i3;
12layout(input_attachment_index = 3) SubpassInput<uint3>  subpass_u3;
13
14layout(input_attachment_index = 4) SubpassInputMS<float3> subpass_ms_f3;
15layout(input_attachment_index = 5) SubpassInputMS<int3>   subpass_ms_i3;
16layout(input_attachment_index = 6) SubpassInputMS<uint3>  subpass_ms_u3;
17
18layout(input_attachment_index = 1) SubpassInput<float2> subpass_f2;
19layout(input_attachment_index = 2) SubpassInput<int2>   subpass_i2;
20layout(input_attachment_index = 3) SubpassInput<uint2>  subpass_u2;
21
22layout(input_attachment_index = 4) SubpassInputMS<float2> subpass_ms_f2;
23layout(input_attachment_index = 5) SubpassInputMS<int2>   subpass_ms_i2;
24layout(input_attachment_index = 6) SubpassInputMS<uint2>  subpass_ms_u2;
25
26layout(input_attachment_index = 1) SubpassInput<float> subpass_f;
27layout(input_attachment_index = 2) SubpassInput<int>   subpass_i;
28layout(input_attachment_index = 3) SubpassInput<uint>  subpass_u;
29
30layout(input_attachment_index = 4) SubpassInputMS<float> subpass_ms_f;
31layout(input_attachment_index = 5) SubpassInputMS<int>   subpass_ms_i;
32layout(input_attachment_index = 6) SubpassInputMS<uint>  subpass_ms_u;
33
34[[vk::input_attachment_index(7)]] SubpassInput subpass_2;
35
36struct mystruct_f_t
37{
38    float  c0;
39    float2 c1;
40    float  c2;
41};
42
43struct mystruct_i_t
44{
45    int  c0;
46    int2 c1;
47    int  c2;
48};
49
50struct mystruct_u_t
51{
52    uint  c0;
53    uint2 c1;
54    uint  c2;
55};
56
57// TODO: ...
58// layout(input_attachment_index = 7) SubpassInput<mystruct_f_t>    subpass_fs;
59// layout(input_attachment_index = 8) SubpassInputMS<mystruct_f_t>  subpass_ms_fs;
60
61// layout(input_attachment_index = 7) SubpassInput<mystruct_i_t>    subpass_is;
62// layout(input_attachment_index = 8) SubpassInputMS<mystruct_i_t>  subpass_ms_is;
63
64// layout(input_attachment_index = 7) SubpassInput<mystruct_u_t>    subpass_us;
65// layout(input_attachment_index = 8) SubpassInputMS<mystruct_u_t>  subpass_ms_us;
66
67float4 main() : SV_Target0
68{
69    float4 result00 = subpass_f4.SubpassLoad();
70    int4   result01 = subpass_i4.SubpassLoad();
71    uint4  result02 = subpass_u4.SubpassLoad();
72
73    float4 result10 = subpass_ms_f4.SubpassLoad(3);
74    int4   result11 = subpass_ms_i4.SubpassLoad(3);
75    uint4  result12 = subpass_ms_u4.SubpassLoad(3);
76
77    float3 result20 = subpass_f3.SubpassLoad();
78    int3   result21 = subpass_i3.SubpassLoad();
79    uint3  result22 = subpass_u3.SubpassLoad();
80
81    float3 result30 = subpass_ms_f3.SubpassLoad(3);
82    int3   result31 = subpass_ms_i3.SubpassLoad(3);
83    uint3  result32 = subpass_ms_u3.SubpassLoad(3);
84
85    float2 result40 = subpass_f2.SubpassLoad();
86    int2   result41 = subpass_i2.SubpassLoad();
87    uint2  result42 = subpass_u2.SubpassLoad();
88
89    float2 result50 = subpass_ms_f2.SubpassLoad(2);
90    int2   result51 = subpass_ms_i2.SubpassLoad(2);
91    uint2  result52 = subpass_ms_u2.SubpassLoad(2);
92
93    float  result60 = subpass_f.SubpassLoad();
94    int    result61 = subpass_i.SubpassLoad();
95    uint   result62 = subpass_u.SubpassLoad();
96
97    float  result70 = subpass_ms_f.SubpassLoad(2);
98    int    result71 = subpass_ms_i.SubpassLoad(2);
99    uint   result72 = subpass_ms_u.SubpassLoad(2);
100
101    float4 result73 = subpass_2.SubpassLoad();
102
103    // TODO:
104    // mystruct_f_t result80 = subpass_fs.SubpassLoad();
105    // mystruct_i_t result81 = subpass_is.SubpassLoad();
106    // mystruct_u_t result82 = subpass_us.SubpassLoad();
107
108    // mystruct_f_t result90 = subpass_ms_sf.SubpassLoad(2);
109    // mystruct_i_t result91 = subpass_ms_if.SubpassLoad(2);
110    // mystruct_u_t result92 = subpass_ms_uf.SubpassLoad(2);
111
112    return 0;
113}
114