cb12ba5d3f142d5e8a748af24b9e9f226c1dabbf
[platform/upstream/glslang.git] / Test / baseResults / hlsl.structbuffer.fn2.comp.out
1 hlsl.structbuffer.fn2.comp
2 Shader version: 500
3 local_size = (256, 1, 1)
4 0:? Sequence
5 0:5  Function Definition: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
6 0:5    Function Parameters: 
7 0:5      'loc' ( in uint)
8 0:5      'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
9 0:?     Sequence
10 0:6      Sequence
11 0:6        move second child to first child ( temp 2-component vector of uint)
12 0:6          'result' ( temp 2-component vector of uint)
13 0:?           Sequence
14 0:6            move second child to first child ( temp int)
15 0:6              'byteAddrTemp' ( temp int)
16 0:6              right-shift ( temp int)
17 0:6                'loc' ( in uint)
18 0:6                Constant:
19 0:6                  2 (const int)
20 0:?             Construct vec2 ( temp 2-component vector of uint)
21 0:6              indirect index ( temp float)
22 0:6                @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
23 0:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
24 0:6                  Constant:
25 0:6                    0 (const uint)
26 0:6                'byteAddrTemp' ( temp int)
27 0:6              indirect index ( temp float)
28 0:6                @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
29 0:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
30 0:6                  Constant:
31 0:6                    0 (const uint)
32 0:6                add ( temp int)
33 0:6                  'byteAddrTemp' ( temp int)
34 0:6                  Constant:
35 0:6                    1 (const int)
36 0:7      Branch: Return with expression
37 0:7        'result' ( temp 2-component vector of uint)
38 0:12  Function Definition: @main(u1; ( temp void)
39 0:12    Function Parameters: 
40 0:12      'dispatchId' ( in uint)
41 0:?     Sequence
42 0:13      Sequence
43 0:13        move second child to first child ( temp 2-component vector of uint)
44 0:13          'result' ( temp 2-component vector of uint)
45 0:13          Function Call: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
46 0:13            'dispatchId' ( in uint)
47 0:13            'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
48 0:14      Sequence
49 0:14        imageStore ( temp void)
50 0:14          'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
51 0:14          'dispatchId' ( in uint)
52 0:14          'result' ( temp 2-component vector of uint)
53 0:14        'result' ( temp 2-component vector of uint)
54 0:12  Function Definition: main( ( temp void)
55 0:12    Function Parameters: 
56 0:?     Sequence
57 0:12      move second child to first child ( temp uint)
58 0:?         'dispatchId' ( temp uint)
59 0:?         'dispatchId' ( in uint GlobalInvocationID)
60 0:12      Function Call: @main(u1; ( temp void)
61 0:?         'dispatchId' ( temp uint)
62 0:?   Linker Objects
63 0:?     'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
64 0:?     'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
65 0:?     'dispatchId' ( in uint GlobalInvocationID)
66
67
68 Linked compute stage:
69
70
71 Shader version: 500
72 local_size = (256, 1, 1)
73 0:? Sequence
74 0:5  Function Definition: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
75 0:5    Function Parameters: 
76 0:5      'loc' ( in uint)
77 0:5      'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
78 0:?     Sequence
79 0:6      Sequence
80 0:6        move second child to first child ( temp 2-component vector of uint)
81 0:6          'result' ( temp 2-component vector of uint)
82 0:?           Sequence
83 0:6            move second child to first child ( temp int)
84 0:6              'byteAddrTemp' ( temp int)
85 0:6              right-shift ( temp int)
86 0:6                'loc' ( in uint)
87 0:6                Constant:
88 0:6                  2 (const int)
89 0:?             Construct vec2 ( temp 2-component vector of uint)
90 0:6              indirect index ( temp float)
91 0:6                @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
92 0:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
93 0:6                  Constant:
94 0:6                    0 (const uint)
95 0:6                'byteAddrTemp' ( temp int)
96 0:6              indirect index ( temp float)
97 0:6                @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
98 0:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
99 0:6                  Constant:
100 0:6                    0 (const uint)
101 0:6                add ( temp int)
102 0:6                  'byteAddrTemp' ( temp int)
103 0:6                  Constant:
104 0:6                    1 (const int)
105 0:7      Branch: Return with expression
106 0:7        'result' ( temp 2-component vector of uint)
107 0:12  Function Definition: @main(u1; ( temp void)
108 0:12    Function Parameters: 
109 0:12      'dispatchId' ( in uint)
110 0:?     Sequence
111 0:13      Sequence
112 0:13        move second child to first child ( temp 2-component vector of uint)
113 0:13          'result' ( temp 2-component vector of uint)
114 0:13          Function Call: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
115 0:13            'dispatchId' ( in uint)
116 0:13            'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
117 0:14      Sequence
118 0:14        imageStore ( temp void)
119 0:14          'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
120 0:14          'dispatchId' ( in uint)
121 0:14          'result' ( temp 2-component vector of uint)
122 0:14        'result' ( temp 2-component vector of uint)
123 0:12  Function Definition: main( ( temp void)
124 0:12    Function Parameters: 
125 0:?     Sequence
126 0:12      move second child to first child ( temp uint)
127 0:?         'dispatchId' ( temp uint)
128 0:?         'dispatchId' ( in uint GlobalInvocationID)
129 0:12      Function Call: @main(u1; ( temp void)
130 0:?         'dispatchId' ( temp uint)
131 0:?   Linker Objects
132 0:?     'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
133 0:?     'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
134 0:?     'dispatchId' ( in uint GlobalInvocationID)
135
136 // Module Version 10000
137 // Generated by (magic number): 80001
138 // Id's are bound by 61
139
140                               Capability Shader
141                               Capability SampledBuffer
142                               Capability StorageImageExtendedFormats
143                1:             ExtInstImport  "GLSL.std.450"
144                               MemoryModel Logical GLSL450
145                               EntryPoint GLCompute 4  "main" 56
146                               ExecutionMode 4 LocalSize 256 1 1
147                               Source HLSL 500
148                               Name 4  "main"
149                               Name 9  ""
150                               MemberName 9 0  "@data"
151                               Name 15  "testLoad(u1;block--u1[0]1;"
152                               Name 13  "loc"
153                               Name 14  "buffer"
154                               Name 19  "@main(u1;"
155                               Name 18  "dispatchId"
156                               Name 22  "result"
157                               Name 25  "byteAddrTemp"
158                               Name 43  "result"
159                               Name 44  "g_input"
160                               Name 45  "param"
161                               Name 50  "g_output"
162                               Name 54  "dispatchId"
163                               Name 56  "dispatchId"
164                               Name 58  "param"
165                               Decorate 8 ArrayStride 4
166                               MemberDecorate 9 0 NonWritable
167                               MemberDecorate 9 0 Offset 0
168                               Decorate 9 BufferBlock
169                               Decorate 14(buffer) NonWritable
170                               Decorate 44(g_input) DescriptorSet 0
171                               Decorate 44(g_input) Binding 0
172                               Decorate 50(g_output) DescriptorSet 0
173                               Decorate 50(g_output) Binding 1
174                               Decorate 56(dispatchId) BuiltIn GlobalInvocationId
175                2:             TypeVoid
176                3:             TypeFunction 2
177                6:             TypeInt 32 0
178                7:             TypePointer Function 6(int)
179                8:             TypeRuntimeArray 6(int)
180                9:             TypeStruct 8
181               10:             TypePointer Uniform 9(struct)
182               11:             TypeVector 6(int) 2
183               12:             TypeFunction 11(ivec2) 7(ptr) 10(ptr)
184               17:             TypeFunction 2 7(ptr)
185               21:             TypePointer Function 11(ivec2)
186               23:             TypeInt 32 1
187               24:             TypePointer Function 23(int)
188               27:     23(int) Constant 2
189               29:     23(int) Constant 0
190               31:             TypePointer Uniform 6(int)
191               35:     23(int) Constant 1
192      44(g_input):     10(ptr) Variable Uniform
193               48:             TypeImage 6(int) Buffer nonsampled format:Rg32ui
194               49:             TypePointer UniformConstant 48
195     50(g_output):     49(ptr) Variable UniformConstant
196               55:             TypePointer Input 6(int)
197   56(dispatchId):     55(ptr) Variable Input
198          4(main):           2 Function None 3
199                5:             Label
200   54(dispatchId):      7(ptr) Variable Function
201        58(param):      7(ptr) Variable Function
202               57:      6(int) Load 56(dispatchId)
203                               Store 54(dispatchId) 57
204               59:      6(int) Load 54(dispatchId)
205                               Store 58(param) 59
206               60:           2 FunctionCall 19(@main(u1;) 58(param)
207                               Return
208                               FunctionEnd
209 15(testLoad(u1;block--u1[0]1;):   11(ivec2) Function None 12
210          13(loc):      7(ptr) FunctionParameter
211       14(buffer):     10(ptr) FunctionParameter
212               16:             Label
213       22(result):     21(ptr) Variable Function
214 25(byteAddrTemp):     24(ptr) Variable Function
215               26:      6(int) Load 13(loc)
216               28:     23(int) ShiftRightLogical 26 27
217                               Store 25(byteAddrTemp) 28
218               30:     23(int) Load 25(byteAddrTemp)
219               32:     31(ptr) AccessChain 14(buffer) 29 30
220               33:      6(int) Load 32
221               34:     23(int) Load 25(byteAddrTemp)
222               36:     23(int) IAdd 34 35
223               37:     31(ptr) AccessChain 14(buffer) 29 36
224               38:      6(int) Load 37
225               39:   11(ivec2) CompositeConstruct 33 38
226                               Store 22(result) 39
227               40:   11(ivec2) Load 22(result)
228                               ReturnValue 40
229                               FunctionEnd
230    19(@main(u1;):           2 Function None 17
231   18(dispatchId):      7(ptr) FunctionParameter
232               20:             Label
233       43(result):     21(ptr) Variable Function
234        45(param):      7(ptr) Variable Function
235               46:      6(int) Load 18(dispatchId)
236                               Store 45(param) 46
237               47:   11(ivec2) FunctionCall 15(testLoad(u1;block--u1[0]1;) 45(param) 44(g_input)
238                               Store 43(result) 47
239               51:          48 Load 50(g_output)
240               52:      6(int) Load 18(dispatchId)
241               53:   11(ivec2) Load 43(result)
242                               ImageWrite 51 52 53
243                               Return
244                               FunctionEnd