aboutsummaryrefslogtreecommitdiff
path: root/Test/baseResults/hlsl.structbuffer.fn.frag.out
blob: bd2a4e6769e9d81ef783d080470b5063a67f12ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
hlsl.structbuffer.fn.frag
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:5  Function Definition: get(block--vu4[0]1;u1; ( temp 4-component vector of uint)
0:5    Function Parameters: 
0:5      'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:5      'bufferOffset' ( in uint)
0:?     Sequence
0:6      Branch: Return with expression
0:6        indirect index (layout( row_major std430) buffer 4-component vector of uint)
0:6          @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint)
0:6            'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:6            Constant:
0:6              0 (const uint)
0:6          'bufferOffset' ( in uint)
0:10  Function Definition: set(block--vu4[0]1;u1;vu4; ( temp void)
0:10    Function Parameters: 
0:10      'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:10      'sb@count' ( buffer block{layout( row_major std430) buffer uint @count})
0:10      'bufferOffset' ( in uint)
0:10      'data' ( in 4-component vector of uint)
0:?     Sequence
0:11      move second child to first child ( temp 4-component vector of uint)
0:11        indirect index ( buffer 4-component vector of uint)
0:11          @data: direct index for structure ( buffer unsized 1-element array of 4-component vector of uint)
0:11            'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:11            Constant:
0:11              0 (const uint)
0:11          'bufferOffset' ( in uint)
0:11        'data' ( in 4-component vector of uint)
0:20  Function Definition: @main(u1; ( temp 4-component vector of float)
0:20    Function Parameters: 
0:20      'pos' ( in uint)
0:?     Sequence
0:21      Function Call: set(block--vu4[0]1;u1;vu4; ( temp void)
0:21        'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:21        'sbuf2@count' ( buffer block{layout( row_major std430) buffer uint @count})
0:21        Constant:
0:21          2 (const uint)
0:21        Function Call: get(block--vu4[0]1;u1; ( temp 4-component vector of uint)
0:21          'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:21          Constant:
0:21            3 (const uint)
0:23      Branch: Return with expression
0:23        Constant:
0:23          0.000000
0:23          0.000000
0:23          0.000000
0:23          0.000000
0:20  Function Definition: main( ( temp void)
0:20    Function Parameters: 
0:?     Sequence
0:20      move second child to first child ( temp uint)
0:?         'pos' ( temp uint)
0:?         'pos' (layout( location=0) flat in uint)
0:20      move second child to first child ( temp 4-component vector of float)
0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:20        Function Call: @main(u1; ( temp 4-component vector of float)
0:?           'pos' ( temp uint)
0:?   Linker Objects
0:?     'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:?     'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:?     'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:?     'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 3-component vector of uint @data})
0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:?     'pos' (layout( location=0) flat in uint)


Linked fragment stage:


Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:5  Function Definition: get(block--vu4[0]1;u1; ( temp 4-component vector of uint)
0:5    Function Parameters: 
0:5      'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:5      'bufferOffset' ( in uint)
0:?     Sequence
0:6      Branch: Return with expression
0:6        indirect index (layout( row_major std430) buffer 4-component vector of uint)
0:6          @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint)
0:6            'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:6            Constant:
0:6              0 (const uint)
0:6          'bufferOffset' ( in uint)
0:10  Function Definition: set(block--vu4[0]1;u1;vu4; ( temp void)
0:10    Function Parameters: 
0:10      'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:10      'sb@count' ( buffer block{layout( row_major std430) buffer uint @count})
0:10      'bufferOffset' ( in uint)
0:10      'data' ( in 4-component vector of uint)
0:?     Sequence
0:11      move second child to first child ( temp 4-component vector of uint)
0:11        indirect index ( buffer 4-component vector of uint)
0:11          @data: direct index for structure ( buffer unsized 1-element array of 4-component vector of uint)
0:11            'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:11            Constant:
0:11              0 (const uint)
0:11          'bufferOffset' ( in uint)
0:11        'data' ( in 4-component vector of uint)
0:20  Function Definition: @main(u1; ( temp 4-component vector of float)
0:20    Function Parameters: 
0:20      'pos' ( in uint)
0:?     Sequence
0:21      Function Call: set(block--vu4[0]1;u1;vu4; ( temp void)
0:21        'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:21        'sbuf2@count' ( buffer block{layout( row_major std430) buffer uint @count})
0:21        Constant:
0:21          2 (const uint)
0:21        Function Call: get(block--vu4[0]1;u1; ( temp 4-component vector of uint)
0:21          'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:21          Constant:
0:21            3 (const uint)
0:23      Branch: Return with expression
0:23        Constant:
0:23          0.000000
0:23          0.000000
0:23          0.000000
0:23          0.000000
0:20  Function Definition: main( ( temp void)
0:20    Function Parameters: 
0:?     Sequence
0:20      move second child to first child ( temp uint)
0:?         'pos' ( temp uint)
0:?         'pos' (layout( location=0) flat in uint)
0:20      move second child to first child ( temp 4-component vector of float)
0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:20        Function Call: @main(u1; ( temp 4-component vector of float)
0:?           'pos' ( temp uint)
0:?   Linker Objects
0:?     'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:?     'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:?     'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:?     'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 3-component vector of uint @data})
0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:?     'pos' (layout( location=0) flat in uint)

Validation failed
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 78

                              Capability Shader
               1:             ExtInstImport  "GLSL.std.450"
                              MemoryModel Logical GLSL450
                              EntryPoint Fragment 4  "main" 63 66
                              ExecutionMode 4 OriginUpperLeft
                              Source HLSL 500
                              Name 4  "main"
                              Name 9  ""
                              MemberName 9 0  "@data"
                              Name 15  "get(block--vu4[0]1;u1;"
                              Name 13  "sb"
                              Name 14  "bufferOffset"
                              Name 18  ""
                              MemberName 18 0  "@data"
                              Name 20  ""
                              MemberName 20 0  "@count"
                              Name 28  "set(block--vu4[0]1;u1;vu4;"
                              Name 24  "sb"
                              Name 25  "sb@count"
                              Name 26  "bufferOffset"
                              Name 27  "data"
                              Name 34  "@main(u1;"
                              Name 33  "pos"
                              Name 47  "sbuf2"
                              Name 48  "sbuf2@count"
                              Name 50  "sbuf"
                              Name 52  "param"
                              Name 54  "param"
                              Name 55  "param"
                              Name 61  "pos"
                              Name 63  "pos"
                              Name 66  "@entryPointOutput"
                              Name 67  "param"
                              Name 70  "sbuf2@count"
                              MemberName 70(sbuf2@count) 0  "@count"
                              Name 72  "sbuf2@count"
                              Name 75  "sbuf3"
                              MemberName 75(sbuf3) 0  "@data"
                              Name 77  "sbuf3"
                              Decorate 8 ArrayStride 16
                              MemberDecorate 9 0 NonWritable
                              MemberDecorate 9 0 Offset 0
                              Decorate 9 BufferBlock
                              Decorate 13(sb) NonWritable
                              Decorate 17 ArrayStride 16
                              MemberDecorate 18 0 Offset 0
                              Decorate 18 BufferBlock
                              Decorate 20 BufferBlock
                              Decorate 47(sbuf2) DescriptorSet 0
                              Decorate 47(sbuf2) Binding 0
                              Decorate 48(sbuf2@count) DescriptorSet 0
                              Decorate 48(sbuf2@count) Binding 0
                              Decorate 50(sbuf) DescriptorSet 0
                              Decorate 50(sbuf) Binding 10
                              Decorate 63(pos) Flat
                              Decorate 63(pos) Location 0
                              Decorate 66(@entryPointOutput) Location 0
                              MemberDecorate 70(sbuf2@count) 0 Offset 0
                              Decorate 70(sbuf2@count) BufferBlock
                              Decorate 72(sbuf2@count) DescriptorSet 0
                              Decorate 72(sbuf2@count) Binding 0
                              Decorate 74 ArrayStride 16
                              MemberDecorate 75(sbuf3) 0 NonWritable
                              MemberDecorate 75(sbuf3) 0 Offset 0
                              Decorate 75(sbuf3) BufferBlock
                              Decorate 77(sbuf3) DescriptorSet 0
                              Decorate 77(sbuf3) Binding 12
               2:             TypeVoid
               3:             TypeFunction 2
               6:             TypeInt 32 0
               7:             TypeVector 6(int) 4
               8:             TypeRuntimeArray 7(ivec4)
               9:             TypeStruct 8
              10:             TypePointer Uniform 9(struct)
              11:             TypePointer Function 6(int)
              12:             TypeFunction 7(ivec4) 10(ptr) 11(ptr)
              17:             TypeRuntimeArray 7(ivec4)
              18:             TypeStruct 17
              19:             TypePointer Uniform 18(struct)
              20:             TypeStruct 6(int)
              21:             TypePointer Uniform 20(struct)
              22:             TypePointer Function 7(ivec4)
              23:             TypeFunction 2 19(ptr) 21(ptr) 11(ptr) 22(ptr)
              30:             TypeFloat 32
              31:             TypeVector 30(float) 4
              32:             TypeFunction 31(fvec4) 11(ptr)
              36:             TypeInt 32 1
              37:     36(int) Constant 0
              39:             TypePointer Uniform 7(ivec4)
       47(sbuf2):     19(ptr) Variable Uniform
 48(sbuf2@count):     21(ptr) Variable Uniform
              49:      6(int) Constant 2
        50(sbuf):     10(ptr) Variable Uniform
              51:      6(int) Constant 3
              57:   30(float) Constant 0
              58:   31(fvec4) ConstantComposite 57 57 57 57
              62:             TypePointer Input 6(int)
         63(pos):     62(ptr) Variable Input
              65:             TypePointer Output 31(fvec4)
66(@entryPointOutput):     65(ptr) Variable Output
 70(sbuf2@count):             TypeStruct 6(int)
              71:             TypePointer Uniform 70(sbuf2@count)
 72(sbuf2@count):     71(ptr) Variable Uniform
              73:             TypeVector 6(int) 3
              74:             TypeRuntimeArray 73(ivec3)
       75(sbuf3):             TypeStruct 74
              76:             TypePointer Uniform 75(sbuf3)
       77(sbuf3):     76(ptr) Variable Uniform
         4(main):           2 Function None 3
               5:             Label
         61(pos):     11(ptr) Variable Function
       67(param):     11(ptr) Variable Function
              64:      6(int) Load 63(pos)
                              Store 61(pos) 64
              68:      6(int) Load 61(pos)
                              Store 67(param) 68
              69:   31(fvec4) FunctionCall 34(@main(u1;) 67(param)
                              Store 66(@entryPointOutput) 69
                              Return
                              FunctionEnd
15(get(block--vu4[0]1;u1;):    7(ivec4) Function None 12
          13(sb):     10(ptr) FunctionParameter
14(bufferOffset):     11(ptr) FunctionParameter
              16:             Label
              38:      6(int) Load 14(bufferOffset)
              40:     39(ptr) AccessChain 13(sb) 37 38
              41:    7(ivec4) Load 40
                              ReturnValue 41
                              FunctionEnd
28(set(block--vu4[0]1;u1;vu4;):           2 Function None 23
          24(sb):     19(ptr) FunctionParameter
    25(sb@count):     21(ptr) FunctionParameter
26(bufferOffset):     11(ptr) FunctionParameter
        27(data):     22(ptr) FunctionParameter
              29:             Label
              44:      6(int) Load 26(bufferOffset)
              45:    7(ivec4) Load 27(data)
              46:     39(ptr) AccessChain 24(sb) 37 44
                              Store 46 45
                              Return
                              FunctionEnd
   34(@main(u1;):   31(fvec4) Function None 32
         33(pos):     11(ptr) FunctionParameter
              35:             Label
       52(param):     11(ptr) Variable Function
       54(param):     11(ptr) Variable Function
       55(param):     22(ptr) Variable Function
                              Store 52(param) 51
              53:    7(ivec4) FunctionCall 15(get(block--vu4[0]1;u1;) 50(sbuf) 52(param)
                              Store 54(param) 49
                              Store 55(param) 53
              56:           2 FunctionCall 28(set(block--vu4[0]1;u1;vu4;) 47(sbuf2) 48(sbuf2@count) 54(param) 55(param)
                              ReturnValue 58
                              FunctionEnd