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