1hlsl.structbuffer.fn2.comp
2Shader version: 500
3local_size = (256, 1, 1)
40:? Sequence
50:5  Function Definition: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
60:5    Function Parameters:
70:5      'loc' ( in uint)
80:5      'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
90:?     Sequence
100:6      Sequence
110:6        move second child to first child ( temp 2-component vector of uint)
120:6          'result' ( temp 2-component vector of uint)
130:?           Sequence
140:6            move second child to first child ( temp int)
150:6              'byteAddrTemp' ( temp int)
160:6              right-shift ( temp int)
170:6                'loc' ( in uint)
180:6                Constant:
190:6                  2 (const int)
200:?             Construct vec2 ( temp 2-component vector of uint)
210:6              indirect index ( temp uint)
220:6                @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
230:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
240:6                  Constant:
250:6                    0 (const uint)
260:6                'byteAddrTemp' ( temp int)
270:6              indirect index ( temp uint)
280:6                @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
290:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
300:6                  Constant:
310:6                    0 (const uint)
320:6                add ( temp int)
330:6                  'byteAddrTemp' ( temp int)
340:6                  Constant:
350:6                    1 (const int)
360:7      Branch: Return with expression
370:7        'result' ( temp 2-component vector of uint)
380:12  Function Definition: @main(u1; ( temp void)
390:12    Function Parameters:
400:12      'dispatchId' ( in uint)
410:?     Sequence
420:13      Sequence
430:13        move second child to first child ( temp 2-component vector of uint)
440:13          'result' ( temp 2-component vector of uint)
450:13          Function Call: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
460:13            'dispatchId' ( in uint)
470:13            'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
480:14      Sequence
490:14        imageStore ( temp void)
500:14          'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
510:14          'dispatchId' ( in uint)
520:14          'result' ( temp 2-component vector of uint)
530:14        'result' ( temp 2-component vector of uint)
540:12  Function Definition: main( ( temp void)
550:12    Function Parameters:
560:?     Sequence
570:12      move second child to first child ( temp uint)
580:?         'dispatchId' ( temp uint)
590:?         Construct uint ( temp uint)
600:?           'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
610:12      Function Call: @main(u1; ( temp void)
620:?         'dispatchId' ( temp uint)
630:?   Linker Objects
640:?     'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
650:?     'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
660:?     'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
67
68
69Linked compute stage:
70
71
72Shader version: 500
73local_size = (256, 1, 1)
740:? Sequence
750:5  Function Definition: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
760:5    Function Parameters:
770:5      'loc' ( in uint)
780:5      'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
790:?     Sequence
800:6      Sequence
810:6        move second child to first child ( temp 2-component vector of uint)
820:6          'result' ( temp 2-component vector of uint)
830:?           Sequence
840:6            move second child to first child ( temp int)
850:6              'byteAddrTemp' ( temp int)
860:6              right-shift ( temp int)
870:6                'loc' ( in uint)
880:6                Constant:
890:6                  2 (const int)
900:?             Construct vec2 ( temp 2-component vector of uint)
910:6              indirect index ( temp uint)
920:6                @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
930:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
940:6                  Constant:
950:6                    0 (const uint)
960:6                'byteAddrTemp' ( temp int)
970:6              indirect index ( temp uint)
980:6                @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
990:6                  'buffer' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1000:6                  Constant:
1010:6                    0 (const uint)
1020:6                add ( temp int)
1030:6                  'byteAddrTemp' ( temp int)
1040:6                  Constant:
1050:6                    1 (const int)
1060:7      Branch: Return with expression
1070:7        'result' ( temp 2-component vector of uint)
1080:12  Function Definition: @main(u1; ( temp void)
1090:12    Function Parameters:
1100:12      'dispatchId' ( in uint)
1110:?     Sequence
1120:13      Sequence
1130:13        move second child to first child ( temp 2-component vector of uint)
1140:13          'result' ( temp 2-component vector of uint)
1150:13          Function Call: testLoad(u1;block--u1[0]1; ( temp 2-component vector of uint)
1160:13            'dispatchId' ( in uint)
1170:13            'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1180:14      Sequence
1190:14        imageStore ( temp void)
1200:14          'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
1210:14          'dispatchId' ( in uint)
1220:14          'result' ( temp 2-component vector of uint)
1230:14        'result' ( temp 2-component vector of uint)
1240:12  Function Definition: main( ( temp void)
1250:12    Function Parameters:
1260:?     Sequence
1270:12      move second child to first child ( temp uint)
1280:?         'dispatchId' ( temp uint)
1290:?         Construct uint ( temp uint)
1300:?           'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
1310:12      Function Call: @main(u1; ( temp void)
1320:?         'dispatchId' ( temp uint)
1330:?   Linker Objects
1340:?     'g_input' (layout( binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1350:?     'g_output' (layout( binding=1 rg32ui) uniform uimageBuffer)
1360:?     'dispatchId' ( in 3-component vector of uint GlobalInvocationID)
137
138// Module Version 10000
139// Generated by (magic number): 80007
140// Id's are bound by 63
141
142                              Capability Shader
143                              Capability ImageBuffer
144                              Capability StorageImageExtendedFormats
145               1:             ExtInstImport  "GLSL.std.450"
146                              MemoryModel Logical GLSL450
147                              EntryPoint GLCompute 4  "main" 57
148                              ExecutionMode 4 LocalSize 256 1 1
149                              Source HLSL 500
150                              Name 4  "main"
151                              Name 9  ""
152                              MemberName 9 0  "@data"
153                              Name 15  "testLoad(u1;block--u1[0]1;"
154                              Name 13  "loc"
155                              Name 14  "buffer"
156                              Name 19  "@main(u1;"
157                              Name 18  "dispatchId"
158                              Name 22  "result"
159                              Name 25  "byteAddrTemp"
160                              Name 43  "result"
161                              Name 44  "g_input"
162                              Name 45  "param"
163                              Name 50  "g_output"
164                              Name 54  "dispatchId"
165                              Name 57  "dispatchId"
166                              Name 60  "param"
167                              Decorate 8 ArrayStride 4
168                              MemberDecorate 9 0 NonWritable
169                              MemberDecorate 9 0 Offset 0
170                              Decorate 9 BufferBlock
171                              Decorate 14(buffer) NonWritable
172                              Decorate 44(g_input) DescriptorSet 0
173                              Decorate 44(g_input) Binding 0
174                              Decorate 50(g_output) DescriptorSet 0
175                              Decorate 50(g_output) Binding 1
176                              Decorate 57(dispatchId) BuiltIn GlobalInvocationId
177               2:             TypeVoid
178               3:             TypeFunction 2
179               6:             TypeInt 32 0
180               7:             TypePointer Function 6(int)
181               8:             TypeRuntimeArray 6(int)
182               9:             TypeStruct 8
183              10:             TypePointer Uniform 9(struct)
184              11:             TypeVector 6(int) 2
185              12:             TypeFunction 11(ivec2) 7(ptr) 10(ptr)
186              17:             TypeFunction 2 7(ptr)
187              21:             TypePointer Function 11(ivec2)
188              23:             TypeInt 32 1
189              24:             TypePointer Function 23(int)
190              27:     23(int) Constant 2
191              29:     23(int) Constant 0
192              31:             TypePointer Uniform 6(int)
193              35:     23(int) Constant 1
194     44(g_input):     10(ptr) Variable Uniform
195              48:             TypeImage 6(int) Buffer nonsampled format:Rg32ui
196              49:             TypePointer UniformConstant 48
197    50(g_output):     49(ptr) Variable UniformConstant
198              55:             TypeVector 6(int) 3
199              56:             TypePointer Input 55(ivec3)
200  57(dispatchId):     56(ptr) Variable Input
201         4(main):           2 Function None 3
202               5:             Label
203  54(dispatchId):      7(ptr) Variable Function
204       60(param):      7(ptr) Variable Function
205              58:   55(ivec3) Load 57(dispatchId)
206              59:      6(int) CompositeExtract 58 0
207                              Store 54(dispatchId) 59
208              61:      6(int) Load 54(dispatchId)
209                              Store 60(param) 61
210              62:           2 FunctionCall 19(@main(u1;) 60(param)
211                              Return
212                              FunctionEnd
21315(testLoad(u1;block--u1[0]1;):   11(ivec2) Function None 12
214         13(loc):      7(ptr) FunctionParameter
215      14(buffer):     10(ptr) FunctionParameter
216              16:             Label
217      22(result):     21(ptr) Variable Function
21825(byteAddrTemp):     24(ptr) Variable Function
219              26:      6(int) Load 13(loc)
220              28:     23(int) ShiftRightLogical 26 27
221                              Store 25(byteAddrTemp) 28
222              30:     23(int) Load 25(byteAddrTemp)
223              32:     31(ptr) AccessChain 14(buffer) 29 30
224              33:      6(int) Load 32
225              34:     23(int) Load 25(byteAddrTemp)
226              36:     23(int) IAdd 34 35
227              37:     31(ptr) AccessChain 14(buffer) 29 36
228              38:      6(int) Load 37
229              39:   11(ivec2) CompositeConstruct 33 38
230                              Store 22(result) 39
231              40:   11(ivec2) Load 22(result)
232                              ReturnValue 40
233                              FunctionEnd
234   19(@main(u1;):           2 Function None 17
235  18(dispatchId):      7(ptr) FunctionParameter
236              20:             Label
237      43(result):     21(ptr) Variable Function
238       45(param):      7(ptr) Variable Function
239              46:      6(int) Load 18(dispatchId)
240                              Store 45(param) 46
241              47:   11(ivec2) FunctionCall 15(testLoad(u1;block--u1[0]1;) 45(param) 44(g_input)
242                              Store 43(result) 47
243              51:          48 Load 50(g_output)
244              52:      6(int) Load 18(dispatchId)
245              53:   11(ivec2) Load 43(result)
246                              ImageWrite 51 52 53
247                              Return
248                              FunctionEnd
249