• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1rayQuery-allOps.comp
2// Module Version 10000
3// Generated by (magic number): 8000a
4// Id's are bound by 258
5
6                              Capability Shader
7                              Capability RayQueryProvisionalKHR
8                              Capability RayTraversalPrimitiveCullingProvisionalKHR
9                              Extension  "SPV_KHR_ray_query"
10               1:             ExtInstImport  "GLSL.std.450"
11                              MemoryModel Logical GLSL450
12                              EntryPoint GLCompute 4  "main"
13                              ExecutionMode 4 LocalSize 1 1 1
14                              Source GLSL 460
15                              SourceExtension  "GL_EXT_ray_flags_primitive_culling"
16                              SourceExtension  "GL_EXT_ray_query"
17                              Name 4  "main"
18                              Name 6  "doSomething("
19                              Name 10  "Ray"
20                              MemberName 10(Ray) 0  "pos"
21                              MemberName 10(Ray) 1  "tmin"
22                              MemberName 10(Ray) 2  "dir"
23                              MemberName 10(Ray) 3  "tmax"
24                              Name 12  "makeRayDesc("
25                              Name 15  "Log"
26                              MemberName 15(Log) 0  "x"
27                              MemberName 15(Log) 1  "y"
28                              Name 17  ""
29                              Name 26  "ray"
30                              Name 43  "ray"
31                              Name 47  "rayQuery"
32                              Name 50  "rtas"
33                              Name 69  "candidateType"
34                              Name 78  "_mat4x3"
35                              Name 83  "_mat3x4"
36                              Name 143  "t"
37                              Name 156  "committedStatus"
38                              Name 241  "o"
39                              Name 243  "d"
40                              Name 253  "Ray"
41                              MemberName 253(Ray) 0  "pos"
42                              MemberName 253(Ray) 1  "tmin"
43                              MemberName 253(Ray) 2  "dir"
44                              MemberName 253(Ray) 3  "tmax"
45                              Name 255  "Rays"
46                              MemberName 255(Rays) 0  "rays"
47                              Name 257  ""
48                              MemberDecorate 15(Log) 0 Offset 0
49                              MemberDecorate 15(Log) 1 Offset 4
50                              Decorate 15(Log) BufferBlock
51                              Decorate 17 DescriptorSet 0
52                              Decorate 17 Binding 0
53                              Decorate 50(rtas) DescriptorSet 0
54                              Decorate 50(rtas) Binding 1
55                              MemberDecorate 253(Ray) 0 Offset 0
56                              MemberDecorate 253(Ray) 1 Offset 12
57                              MemberDecorate 253(Ray) 2 Offset 16
58                              MemberDecorate 253(Ray) 3 Offset 28
59                              Decorate 254 ArrayStride 32
60                              MemberDecorate 255(Rays) 0 Offset 0
61                              Decorate 255(Rays) BufferBlock
62                              Decorate 257 DescriptorSet 0
63                              Decorate 257 Binding 2
64               2:             TypeVoid
65               3:             TypeFunction 2
66               8:             TypeFloat 32
67               9:             TypeVector 8(float) 3
68         10(Ray):             TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
69              11:             TypeFunction 10(Ray)
70              14:             TypeInt 32 0
71         15(Log):             TypeStruct 14(int) 14(int)
72              16:             TypePointer Uniform 15(Log)
73              17:     16(ptr) Variable Uniform
74              18:             TypeInt 32 1
75              19:     18(int) Constant 0
76              20:     14(int) Constant 0
77              21:             TypePointer Uniform 14(int)
78              23:     18(int) Constant 1
79              25:             TypePointer Function 10(Ray)
80              27:    8(float) Constant 0
81              28:    9(fvec3) ConstantComposite 27 27 27
82              29:             TypePointer Function 9(fvec3)
83              31:     18(int) Constant 2
84              32:    8(float) Constant 1065353216
85              33:    9(fvec3) ConstantComposite 32 27 27
86              35:             TypePointer Function 8(float)
87              37:     18(int) Constant 3
88              38:    8(float) Constant 1176255488
89              45:             TypeRayQueryProvisionalKHR
90              46:             TypePointer Function 45
91              48:             TypeAccelerationStructureKHR
92              49:             TypePointer UniformConstant 48
93        50(rtas):     49(ptr) Variable UniformConstant
94              52:     14(int) Constant 255
95              66:             TypeBool
96              68:             TypePointer Function 14(int)
97              70:    66(bool) ConstantFalse
98              76:             TypeMatrix 9(fvec3) 4
99              77:             TypePointer Function 76
100              80:             TypeVector 8(float) 4
101              81:             TypeMatrix 80(fvec4) 3
102              82:             TypePointer Function 81
103              86:    66(bool) ConstantTrue
104              91:             TypeVector 8(float) 2
105             144:    8(float) Constant 1056964608
106             175:     14(int) Constant 1
107             198:     14(int) Constant 2
108             231:     14(int) Constant 256
109        253(Ray):             TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
110             254:             TypeRuntimeArray 253(Ray)
111       255(Rays):             TypeStruct 254
112             256:             TypePointer Uniform 255(Rays)
113             257:    256(ptr) Variable Uniform
114         4(main):           2 Function None 3
115               5:             Label
116         43(ray):     25(ptr) Variable Function
117    47(rayQuery):     46(ptr) Variable Function
11869(candidateType):     68(ptr) Variable Function
119     78(_mat4x3):     77(ptr) Variable Function
120     83(_mat3x4):     82(ptr) Variable Function
121          143(t):     35(ptr) Variable Function
122156(committedStatus):     68(ptr) Variable Function
123          241(o):     29(ptr) Variable Function
124          243(d):     29(ptr) Variable Function
125              44:     10(Ray) FunctionCall 12(makeRayDesc()
126                              Store 43(ray) 44
127              51:          48 Load 50(rtas)
128              53:     29(ptr) AccessChain 43(ray) 19
129              54:    9(fvec3) Load 53
130              55:     35(ptr) AccessChain 43(ray) 23
131              56:    8(float) Load 55
132              57:     29(ptr) AccessChain 43(ray) 31
133              58:    9(fvec3) Load 57
134              59:     35(ptr) AccessChain 43(ray) 37
135              60:    8(float) Load 59
136                              RayQueryInitializeKHR 47(rayQuery) 51 20 52 54 56 58 60
137                              Branch 61
138              61:             Label
139                              LoopMerge 63 64 None
140                              Branch 65
141              65:             Label
142              67:    66(bool) RayQueryProceedKHR 47(rayQuery)
143                              BranchConditional 67 62 63
144              62:               Label
145              71:     14(int)   RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
146                                Store 69(candidateType) 71
147              72:     14(int)   Load 69(candidateType)
148                                SelectionMerge 75 None
149                                Switch 72 75
150                                       case 0: 73
151                                       case 1: 74
152              73:                 Label
153                                  RayQueryTerminateKHR 47(rayQuery)
154              79:          76     RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
155                                  Store 78(_mat4x3) 79
156              84:          76     Load 78(_mat4x3)
157              85:          81     Transpose 84
158                                  Store 83(_mat3x4) 85
159                                  RayQueryConfirmIntersectionKHR 47(rayQuery)
160              87:    66(bool)     RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
161                                  SelectionMerge 89 None
162                                  BranchConditional 87 88 89
163              88:                   Label
164              90:           2       FunctionCall 6(doSomething()
165                                    Branch 89
166              89:                 Label
167              92:   91(fvec2)     RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
168              93:    8(float)     CompositeExtract 92 0
169              94:    66(bool)     FOrdEqual 93 27
170                                  SelectionMerge 96 None
171                                  BranchConditional 94 95 96
172              95:                   Label
173              97:           2       FunctionCall 6(doSomething()
174                                    Branch 96
175              96:                 Label
176              98:     18(int)     RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
177              99:    66(bool)     SGreaterThan 98 19
178                                  SelectionMerge 101 None
179                                  BranchConditional 99 100 101
180             100:                   Label
181             102:           2       FunctionCall 6(doSomething()
182                                    Branch 101
183             101:                 Label
184             103:     18(int)     RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
185             104:    66(bool)     SGreaterThan 103 19
186                                  SelectionMerge 106 None
187                                  BranchConditional 104 105 106
188             105:                   Label
189             107:           2       FunctionCall 6(doSomething()
190                                    Branch 106
191             106:                 Label
192             108:    9(fvec3)     RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
193             109:    8(float)     CompositeExtract 108 0
194             110:    66(bool)     FOrdGreaterThan 109 27
195                                  SelectionMerge 112 None
196                                  BranchConditional 110 111 112
197             111:                   Label
198             113:           2       FunctionCall 6(doSomething()
199                                    Branch 112
200             112:                 Label
201             114:    9(fvec3)     RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
202             115:    8(float)     CompositeExtract 114 0
203             116:    66(bool)     FOrdGreaterThan 115 27
204                                  SelectionMerge 118 None
205                                  BranchConditional 116 117 118
206             117:                   Label
207             119:           2       FunctionCall 6(doSomething()
208                                    Branch 118
209             118:                 Label
210             120:     18(int)     RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211             121:    66(bool)     SGreaterThan 120 19
212                                  SelectionMerge 123 None
213                                  BranchConditional 121 122 123
214             122:                   Label
215             124:           2       FunctionCall 6(doSomething()
216                                    Branch 123
217             123:                 Label
218             125:    8(float)     RayQueryGetIntersectionTKHR 47(rayQuery) 23
219             126:    66(bool)     FOrdGreaterThan 125 27
220                                  SelectionMerge 128 None
221                                  BranchConditional 126 127 128
222             127:                   Label
223             129:           2       FunctionCall 6(doSomething()
224                                    Branch 128
225             128:                 Label
226             130:     18(int)     RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
227             131:    66(bool)     UGreaterThan 130 20
228                                  SelectionMerge 133 None
229                                  BranchConditional 131 132 133
230             132:                   Label
231             134:           2       FunctionCall 6(doSomething()
232                                    Branch 133
233             133:                 Label
234                                  Branch 75
235              74:                 Label
236             136:          76     RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
237                                  Store 78(_mat4x3) 136
238             137:          76     Load 78(_mat4x3)
239             138:          81     Transpose 137
240                                  Store 83(_mat3x4) 138
241             139:    66(bool)     RayQueryGetIntersectionCandidateAABBOpaqueKHR 47(rayQuery)
242                                  SelectionMerge 141 None
243                                  BranchConditional 139 140 141
244             140:                   Label
245             142:           2       FunctionCall 6(doSomething()
246                                    Branch 141
247             141:                 Label
248                                  Store 143(t) 144
249             145:    8(float)     Load 143(t)
250                                  RayQueryGenerateIntersectionKHR 47(rayQuery) 145
251                                  RayQueryTerminateKHR 47(rayQuery)
252                                  Branch 75
253              75:               Label
254                                Branch 64
255              64:               Label
256                                Branch 61
257              63:             Label
258             148:     35(ptr) AccessChain 83(_mat3x4) 19 20
259             149:    8(float) Load 148
260             150:     35(ptr) AccessChain 78(_mat4x3) 19 20
261             151:    8(float) Load 150
262             152:    66(bool) FOrdEqual 149 151
263                              SelectionMerge 154 None
264                              BranchConditional 152 153 154
265             153:               Label
266             155:           2   FunctionCall 6(doSomething()
267                                Branch 154
268             154:             Label
269             157:     14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
270                              Store 156(committedStatus) 157
271             158:     14(int) Load 156(committedStatus)
272                              SelectionMerge 162 None
273                              Switch 158 162
274                                     case 0: 159
275                                     case 1: 160
276                                     case 2: 161
277             159:               Label
278             163:          76   RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
279                                Store 78(_mat4x3) 163
280             164:          76   Load 78(_mat4x3)
281             165:          81   Transpose 164
282                                Store 83(_mat3x4) 165
283                                Branch 162
284             160:               Label
285             167:          76   RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
286                                Store 78(_mat4x3) 167
287             168:          76   Load 78(_mat4x3)
288             169:          81   Transpose 168
289                                Store 83(_mat3x4) 169
290             170:    66(bool)   RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
291                                SelectionMerge 172 None
292                                BranchConditional 170 171 172
293             171:                 Label
294             173:           2     FunctionCall 6(doSomething()
295                                  Branch 172
296             172:               Label
297             174:   91(fvec2)   RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
298             176:    8(float)   CompositeExtract 174 1
299             177:    66(bool)   FOrdEqual 176 27
300                                SelectionMerge 179 None
301                                BranchConditional 177 178 179
302             178:                 Label
303             180:           2     FunctionCall 6(doSomething()
304                                  Branch 179
305             179:               Label
306                                Branch 162
307             161:               Label
308             182:     18(int)   RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
309             183:    66(bool)   SGreaterThan 182 19
310                                SelectionMerge 185 None
311                                BranchConditional 183 184 185
312             184:                 Label
313             186:           2     FunctionCall 6(doSomething()
314                                  Branch 185
315             185:               Label
316             187:     18(int)   RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
317             188:    66(bool)   SGreaterThan 187 19
318                                SelectionMerge 190 None
319                                BranchConditional 188 189 190
320             189:                 Label
321             191:           2     FunctionCall 6(doSomething()
322                                  Branch 190
323             190:               Label
324             192:     18(int)   RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
325             193:    66(bool)   SGreaterThan 192 19
326                                SelectionMerge 195 None
327                                BranchConditional 193 194 195
328             194:                 Label
329             196:           2     FunctionCall 6(doSomething()
330                                  Branch 195
331             195:               Label
332             197:    9(fvec3)   RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
333             199:    8(float)   CompositeExtract 197 2
334             200:    66(bool)   FOrdGreaterThan 199 27
335                                SelectionMerge 202 None
336                                BranchConditional 200 201 202
337             201:                 Label
338             203:           2     FunctionCall 6(doSomething()
339                                  Branch 202
340             202:               Label
341             204:    9(fvec3)   RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
342             205:    8(float)   CompositeExtract 204 0
343             206:    66(bool)   FOrdGreaterThan 205 27
344                                SelectionMerge 208 None
345                                BranchConditional 206 207 208
346             207:                 Label
347             209:           2     FunctionCall 6(doSomething()
348                                  Branch 208
349             208:               Label
350             210:     18(int)   RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
351             211:    66(bool)   SGreaterThan 210 19
352                                SelectionMerge 213 None
353                                BranchConditional 211 212 213
354             212:                 Label
355             214:           2     FunctionCall 6(doSomething()
356                                  Branch 213
357             213:               Label
358             215:    8(float)   RayQueryGetIntersectionTKHR 47(rayQuery) 23
359             216:    66(bool)   FOrdGreaterThan 215 27
360                                SelectionMerge 218 None
361                                BranchConditional 216 217 218
362             217:                 Label
363             219:           2     FunctionCall 6(doSomething()
364                                  Branch 218
365             218:               Label
366                                Branch 162
367             162:             Label
368             222:     35(ptr) AccessChain 83(_mat3x4) 19 20
369             223:    8(float) Load 222
370             224:     35(ptr) AccessChain 78(_mat4x3) 19 20
371             225:    8(float) Load 224
372             226:    66(bool) FOrdEqual 223 225
373                              SelectionMerge 228 None
374                              BranchConditional 226 227 228
375             227:               Label
376             229:           2   FunctionCall 6(doSomething()
377                                Branch 228
378             228:             Label
379             230:     14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
380             232:    66(bool) UGreaterThan 230 231
381                              SelectionMerge 234 None
382                              BranchConditional 232 233 234
383             233:               Label
384             235:           2   FunctionCall 6(doSomething()
385                                Branch 234
386             234:             Label
387             236:    8(float) RayQueryGetRayTMinKHR 47(rayQuery)
388             237:    66(bool) FOrdGreaterThan 236 27
389                              SelectionMerge 239 None
390                              BranchConditional 237 238 239
391             238:               Label
392             240:           2   FunctionCall 6(doSomething()
393                                Branch 239
394             239:             Label
395             242:    9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
396                              Store 241(o) 242
397             244:    9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
398                              Store 243(d) 244
399             245:     35(ptr) AccessChain 241(o) 20
400             246:    8(float) Load 245
401             247:     35(ptr) AccessChain 243(d) 198
402             248:    8(float) Load 247
403             249:    66(bool) FOrdEqual 246 248
404                              SelectionMerge 251 None
405                              BranchConditional 249 250 251
406             250:               Label
407             252:           2   FunctionCall 6(doSomething()
408                                Branch 251
409             251:             Label
410                              Return
411                              FunctionEnd
412 6(doSomething():           2 Function None 3
413               7:             Label
414              22:     21(ptr) AccessChain 17 19
415                              Store 22 20
416              24:     21(ptr) AccessChain 17 23
417                              Store 24 20
418                              Return
419                              FunctionEnd
42012(makeRayDesc():     10(Ray) Function None 11
421              13:             Label
422         26(ray):     25(ptr) Variable Function
423              30:     29(ptr) AccessChain 26(ray) 19
424                              Store 30 28
425              34:     29(ptr) AccessChain 26(ray) 31
426                              Store 34 33
427              36:     35(ptr) AccessChain 26(ray) 23
428                              Store 36 27
429              39:     35(ptr) AccessChain 26(ray) 37
430                              Store 39 38
431              40:     10(Ray) Load 26(ray)
432                              ReturnValue 40
433                              FunctionEnd
434