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