441 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			441 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| rayQuery-allOps.comp
 | |
| // Module Version 10000
 | |
| // Generated by (magic number): 80008
 | |
| // Id's are bound by 266
 | |
| 
 | |
|                               Capability Shader
 | |
|                               Capability RayQueryProvisionalKHR
 | |
|                               Extension  "SPV_KHR_ray_query"
 | |
|                1:             ExtInstImport  "GLSL.std.450"
 | |
|                               MemoryModel Logical GLSL450
 | |
|                               EntryPoint GLCompute 4  "main"
 | |
|                               ExecutionMode 4 LocalSize 1 1 1
 | |
|                               Source GLSL 460
 | |
|                               SourceExtension  "GL_EXT_ray_query"
 | |
|                               SourceExtension  "GL_NV_ray_tracing"
 | |
|                               Name 4  "main"
 | |
|                               Name 6  "doSomething("
 | |
|                               Name 10  "Ray"
 | |
|                               MemberName 10(Ray) 0  "pos"
 | |
|                               MemberName 10(Ray) 1  "tmin"
 | |
|                               MemberName 10(Ray) 2  "dir"
 | |
|                               MemberName 10(Ray) 3  "tmax"
 | |
|                               Name 12  "makeRayDesc("
 | |
|                               Name 15  "Log"
 | |
|                               MemberName 15(Log) 0  "x"
 | |
|                               MemberName 15(Log) 1  "y"
 | |
|                               Name 17  ""
 | |
|                               Name 26  "ray"
 | |
|                               Name 43  "ray"
 | |
|                               Name 47  "rayQuery"
 | |
|                               Name 50  "rtas"
 | |
|                               Name 70  "candidateType"
 | |
|                               Name 80  "_mat4x3"
 | |
|                               Name 85  "_mat3x4"
 | |
|                               Name 147  "t"
 | |
|                               Name 161  "committedStatus"
 | |
|                               Name 247  "o"
 | |
|                               Name 250  "d"
 | |
|                               Name 261  "Ray"
 | |
|                               MemberName 261(Ray) 0  "pos"
 | |
|                               MemberName 261(Ray) 1  "tmin"
 | |
|                               MemberName 261(Ray) 2  "dir"
 | |
|                               MemberName 261(Ray) 3  "tmax"
 | |
|                               Name 263  "Rays"
 | |
|                               MemberName 263(Rays) 0  "rays"
 | |
|                               Name 265  ""
 | |
|                               MemberDecorate 15(Log) 0 Offset 0
 | |
|                               MemberDecorate 15(Log) 1 Offset 4
 | |
|                               Decorate 15(Log) BufferBlock
 | |
|                               Decorate 17 DescriptorSet 0
 | |
|                               Decorate 17 Binding 0
 | |
|                               Decorate 50(rtas) DescriptorSet 0
 | |
|                               Decorate 50(rtas) Binding 1
 | |
|                               MemberDecorate 261(Ray) 0 Offset 0
 | |
|                               MemberDecorate 261(Ray) 1 Offset 12
 | |
|                               MemberDecorate 261(Ray) 2 Offset 16
 | |
|                               MemberDecorate 261(Ray) 3 Offset 28
 | |
|                               Decorate 262 ArrayStride 32
 | |
|                               MemberDecorate 263(Rays) 0 Offset 0
 | |
|                               Decorate 263(Rays) BufferBlock
 | |
|                               Decorate 265 DescriptorSet 0
 | |
|                               Decorate 265 Binding 2
 | |
|                2:             TypeVoid
 | |
|                3:             TypeFunction 2
 | |
|                8:             TypeFloat 32
 | |
|                9:             TypeVector 8(float) 3
 | |
|          10(Ray):             TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
 | |
|               11:             TypeFunction 10(Ray)
 | |
|               14:             TypeInt 32 0
 | |
|          15(Log):             TypeStruct 14(int) 14(int)
 | |
|               16:             TypePointer Uniform 15(Log)
 | |
|               17:     16(ptr) Variable Uniform
 | |
|               18:             TypeInt 32 1
 | |
|               19:     18(int) Constant 0
 | |
|               20:     14(int) Constant 0
 | |
|               21:             TypePointer Uniform 14(int)
 | |
|               23:     18(int) Constant 1
 | |
|               25:             TypePointer Function 10(Ray)
 | |
|               27:    8(float) Constant 0
 | |
|               28:    9(fvec3) ConstantComposite 27 27 27
 | |
|               29:             TypePointer Function 9(fvec3)
 | |
|               31:     18(int) Constant 2
 | |
|               32:    8(float) Constant 1065353216
 | |
|               33:    9(fvec3) ConstantComposite 32 27 27
 | |
|               35:             TypePointer Function 8(float)
 | |
|               37:     18(int) Constant 3
 | |
|               38:    8(float) Constant 1176255488
 | |
|               45:             TypeRayQueryProvisionalKHR
 | |
|               46:             TypePointer Function 45
 | |
|               48:             TypeAccelerationStructureKHR
 | |
|               49:             TypePointer UniformConstant 48
 | |
|         50(rtas):     49(ptr) Variable UniformConstant
 | |
|               52:     14(int) Constant 255
 | |
|               67:             TypeBool
 | |
|               69:             TypePointer Function 14(int)
 | |
|               71:    67(bool) ConstantFalse
 | |
|               78:             TypeMatrix 9(fvec3) 4
 | |
|               79:             TypePointer Function 78
 | |
|               82:             TypeVector 8(float) 4
 | |
|               83:             TypeMatrix 82(fvec4) 3
 | |
|               84:             TypePointer Function 83
 | |
|               89:    67(bool) ConstantTrue
 | |
|               94:             TypeVector 8(float) 2
 | |
|              148:    8(float) Constant 1056964608
 | |
|              180:     14(int) Constant 1
 | |
|              203:     14(int) Constant 2
 | |
|         261(Ray):             TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
 | |
|              262:             TypeRuntimeArray 261(Ray)
 | |
|        263(Rays):             TypeStruct 262
 | |
|              264:             TypePointer Uniform 263(Rays)
 | |
|              265:    264(ptr) Variable Uniform
 | |
|          4(main):           2 Function None 3
 | |
|                5:             Label
 | |
|          43(ray):     25(ptr) Variable Function
 | |
|     47(rayQuery):     46(ptr) Variable Function
 | |
| 70(candidateType):     69(ptr) Variable Function
 | |
|      80(_mat4x3):     79(ptr) Variable Function
 | |
|      85(_mat3x4):     84(ptr) Variable Function
 | |
|           147(t):     35(ptr) Variable Function
 | |
| 161(committedStatus):     69(ptr) Variable Function
 | |
|           247(o):     29(ptr) Variable Function
 | |
|           250(d):     29(ptr) Variable Function
 | |
|               44:     10(Ray) FunctionCall 12(makeRayDesc()
 | |
|                               Store 43(ray) 44
 | |
|               51:          48 Load 50(rtas)
 | |
|               53:     29(ptr) AccessChain 43(ray) 19
 | |
|               54:    9(fvec3) Load 53
 | |
|               55:     35(ptr) AccessChain 43(ray) 23
 | |
|               56:    8(float) Load 55
 | |
|               57:     29(ptr) AccessChain 43(ray) 31
 | |
|               58:    9(fvec3) Load 57
 | |
|               59:     35(ptr) AccessChain 43(ray) 37
 | |
|               60:    8(float) Load 59
 | |
|                               RayQueryInitializeKHR 47(rayQuery) 51 20 52 54 56 58 60
 | |
|                               Branch 61
 | |
|               61:             Label
 | |
|                               LoopMerge 63 64 None
 | |
|                               Branch 65
 | |
|               65:             Label
 | |
|               66:          45 Load 47(rayQuery)
 | |
|               68:    67(bool) RayQueryProceedKHR 66
 | |
|                               BranchConditional 68 62 63
 | |
|               62:               Label
 | |
|               72:     14(int)   RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
 | |
|                                 Store 70(candidateType) 72
 | |
|               73:     14(int)   Load 70(candidateType)
 | |
|                                 SelectionMerge 76 None
 | |
|                                 Switch 73 76 
 | |
|                                        case 0: 74
 | |
|                                        case 1: 75
 | |
|               74:                 Label
 | |
|               77:          45     Load 47(rayQuery)
 | |
|                                   RayQueryTerminateKHR 77
 | |
|               81:          78     RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
 | |
|                                   Store 80(_mat4x3) 81
 | |
|               86:          78     Load 80(_mat4x3)
 | |
|               87:          83     Transpose 86
 | |
|                                   Store 85(_mat3x4) 87
 | |
|               88:          45     Load 47(rayQuery)
 | |
|                                   RayQueryConfirmIntersectionKHR 88
 | |
|               90:    67(bool)     RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
 | |
|                                   SelectionMerge 92 None
 | |
|                                   BranchConditional 90 91 92
 | |
|               91:                   Label
 | |
|               93:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 92
 | |
|               92:                 Label
 | |
|               95:   94(fvec2)     RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
 | |
|               96:    8(float)     CompositeExtract 95 0
 | |
|               97:    67(bool)     FOrdEqual 96 27
 | |
|                                   SelectionMerge 99 None
 | |
|                                   BranchConditional 97 98 99
 | |
|               98:                   Label
 | |
|              100:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 99
 | |
|               99:                 Label
 | |
|              101:     18(int)     RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
 | |
|              102:    67(bool)     SGreaterThan 101 19
 | |
|                                   SelectionMerge 104 None
 | |
|                                   BranchConditional 102 103 104
 | |
|              103:                   Label
 | |
|              105:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 104
 | |
|              104:                 Label
 | |
|              106:     18(int)     RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
 | |
|              107:    67(bool)     SGreaterThan 106 19
 | |
|                                   SelectionMerge 109 None
 | |
|                                   BranchConditional 107 108 109
 | |
|              108:                   Label
 | |
|              110:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 109
 | |
|              109:                 Label
 | |
|              111:    9(fvec3)     RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
 | |
|              112:    8(float)     CompositeExtract 111 0
 | |
|              113:    67(bool)     FOrdGreaterThan 112 27
 | |
|                                   SelectionMerge 115 None
 | |
|                                   BranchConditional 113 114 115
 | |
|              114:                   Label
 | |
|              116:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 115
 | |
|              115:                 Label
 | |
|              117:    9(fvec3)     RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
 | |
|              118:    8(float)     CompositeExtract 117 0
 | |
|              119:    67(bool)     FOrdGreaterThan 118 27
 | |
|                                   SelectionMerge 121 None
 | |
|                                   BranchConditional 119 120 121
 | |
|              120:                   Label
 | |
|              122:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 121
 | |
|              121:                 Label
 | |
|              123:     18(int)     RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
 | |
|              124:    67(bool)     SGreaterThan 123 19
 | |
|                                   SelectionMerge 126 None
 | |
|                                   BranchConditional 124 125 126
 | |
|              125:                   Label
 | |
|              127:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 126
 | |
|              126:                 Label
 | |
|              128:    8(float)     RayQueryGetIntersectionTKHR 47(rayQuery) 23
 | |
|              129:    67(bool)     FOrdGreaterThan 128 27
 | |
|                                   SelectionMerge 131 None
 | |
|                                   BranchConditional 129 130 131
 | |
|              130:                   Label
 | |
|              132:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 131
 | |
|              131:                 Label
 | |
|              133:     18(int)     RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
 | |
|              134:    67(bool)     UGreaterThan 133 20
 | |
|                                   SelectionMerge 136 None
 | |
|                                   BranchConditional 134 135 136
 | |
|              135:                   Label
 | |
|              137:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 136
 | |
|              136:                 Label
 | |
|                                   Branch 76
 | |
|               75:                 Label
 | |
|              139:          78     RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
 | |
|                                   Store 80(_mat4x3) 139
 | |
|              140:          78     Load 80(_mat4x3)
 | |
|              141:          83     Transpose 140
 | |
|                                   Store 85(_mat3x4) 141
 | |
|              142:          45     Load 47(rayQuery)
 | |
|              143:    67(bool)     RayQueryGetIntersectionCandidateAABBOpaqueKHR 142
 | |
|                                   SelectionMerge 145 None
 | |
|                                   BranchConditional 143 144 145
 | |
|              144:                   Label
 | |
|              146:           2       FunctionCall 6(doSomething()
 | |
|                                     Branch 145
 | |
|              145:                 Label
 | |
|                                   Store 147(t) 148
 | |
|              149:    8(float)     Load 147(t)
 | |
|                                   RayQueryGenerateIntersectionKHR 47(rayQuery) 149
 | |
|              150:          45     Load 47(rayQuery)
 | |
|                                   RayQueryTerminateKHR 150
 | |
|                                   Branch 76
 | |
|               76:               Label
 | |
|                                 Branch 64
 | |
|               64:               Label
 | |
|                                 Branch 61
 | |
|               63:             Label
 | |
|              153:     35(ptr) AccessChain 85(_mat3x4) 19 20
 | |
|              154:    8(float) Load 153
 | |
|              155:     35(ptr) AccessChain 80(_mat4x3) 19 20
 | |
|              156:    8(float) Load 155
 | |
|              157:    67(bool) FOrdEqual 154 156
 | |
|                               SelectionMerge 159 None
 | |
|                               BranchConditional 157 158 159
 | |
|              158:               Label
 | |
|              160:           2   FunctionCall 6(doSomething()
 | |
|                                 Branch 159
 | |
|              159:             Label
 | |
|              162:     14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
 | |
|                               Store 161(committedStatus) 162
 | |
|              163:     14(int) Load 161(committedStatus)
 | |
|                               SelectionMerge 167 None
 | |
|                               Switch 163 167 
 | |
|                                      case 0: 164
 | |
|                                      case 1: 165
 | |
|                                      case 2: 166
 | |
|              164:               Label
 | |
|              168:          78   RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
 | |
|                                 Store 80(_mat4x3) 168
 | |
|              169:          78   Load 80(_mat4x3)
 | |
|              170:          83   Transpose 169
 | |
|                                 Store 85(_mat3x4) 170
 | |
|                                 Branch 167
 | |
|              165:               Label
 | |
|              172:          78   RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
 | |
|                                 Store 80(_mat4x3) 172
 | |
|              173:          78   Load 80(_mat4x3)
 | |
|              174:          83   Transpose 173
 | |
|                                 Store 85(_mat3x4) 174
 | |
|              175:    67(bool)   RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
 | |
|                                 SelectionMerge 177 None
 | |
|                                 BranchConditional 175 176 177
 | |
|              176:                 Label
 | |
|              178:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 177
 | |
|              177:               Label
 | |
|              179:   94(fvec2)   RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
 | |
|              181:    8(float)   CompositeExtract 179 1
 | |
|              182:    67(bool)   FOrdEqual 181 27
 | |
|                                 SelectionMerge 184 None
 | |
|                                 BranchConditional 182 183 184
 | |
|              183:                 Label
 | |
|              185:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 184
 | |
|              184:               Label
 | |
|                                 Branch 167
 | |
|              166:               Label
 | |
|              187:     18(int)   RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
 | |
|              188:    67(bool)   SGreaterThan 187 19
 | |
|                                 SelectionMerge 190 None
 | |
|                                 BranchConditional 188 189 190
 | |
|              189:                 Label
 | |
|              191:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 190
 | |
|              190:               Label
 | |
|              192:     18(int)   RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
 | |
|              193:    67(bool)   SGreaterThan 192 19
 | |
|                                 SelectionMerge 195 None
 | |
|                                 BranchConditional 193 194 195
 | |
|              194:                 Label
 | |
|              196:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 195
 | |
|              195:               Label
 | |
|              197:     18(int)   RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
 | |
|              198:    67(bool)   SGreaterThan 197 19
 | |
|                                 SelectionMerge 200 None
 | |
|                                 BranchConditional 198 199 200
 | |
|              199:                 Label
 | |
|              201:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 200
 | |
|              200:               Label
 | |
|              202:    9(fvec3)   RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
 | |
|              204:    8(float)   CompositeExtract 202 2
 | |
|              205:    67(bool)   FOrdGreaterThan 204 27
 | |
|                                 SelectionMerge 207 None
 | |
|                                 BranchConditional 205 206 207
 | |
|              206:                 Label
 | |
|              208:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 207
 | |
|              207:               Label
 | |
|              209:    9(fvec3)   RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
 | |
|              210:    8(float)   CompositeExtract 209 0
 | |
|              211:    67(bool)   FOrdGreaterThan 210 27
 | |
|                                 SelectionMerge 213 None
 | |
|                                 BranchConditional 211 212 213
 | |
|              212:                 Label
 | |
|              214:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 213
 | |
|              213:               Label
 | |
|              215:     18(int)   RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
 | |
|              216:    67(bool)   SGreaterThan 215 19
 | |
|                                 SelectionMerge 218 None
 | |
|                                 BranchConditional 216 217 218
 | |
|              217:                 Label
 | |
|              219:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 218
 | |
|              218:               Label
 | |
|              220:    8(float)   RayQueryGetIntersectionTKHR 47(rayQuery) 23
 | |
|              221:    67(bool)   FOrdGreaterThan 220 27
 | |
|                                 SelectionMerge 223 None
 | |
|                                 BranchConditional 221 222 223
 | |
|              222:                 Label
 | |
|              224:           2     FunctionCall 6(doSomething()
 | |
|                                   Branch 223
 | |
|              223:               Label
 | |
|                                 Branch 167
 | |
|              167:             Label
 | |
|              227:     35(ptr) AccessChain 85(_mat3x4) 19 20
 | |
|              228:    8(float) Load 227
 | |
|              229:     35(ptr) AccessChain 80(_mat4x3) 19 20
 | |
|              230:    8(float) Load 229
 | |
|              231:    67(bool) FOrdEqual 228 230
 | |
|                               SelectionMerge 233 None
 | |
|                               BranchConditional 231 232 233
 | |
|              232:               Label
 | |
|              234:           2   FunctionCall 6(doSomething()
 | |
|                                 Branch 233
 | |
|              233:             Label
 | |
|              235:          45 Load 47(rayQuery)
 | |
|              236:     14(int) RayQueryGetRayFlagsKHR 235
 | |
|              237:    67(bool) UGreaterThan 236 20
 | |
|                               SelectionMerge 239 None
 | |
|                               BranchConditional 237 238 239
 | |
|              238:               Label
 | |
|              240:           2   FunctionCall 6(doSomething()
 | |
|                                 Branch 239
 | |
|              239:             Label
 | |
|              241:          45 Load 47(rayQuery)
 | |
|              242:    8(float) RayQueryGetRayTMinKHR 241
 | |
|              243:    67(bool) FOrdGreaterThan 242 27
 | |
|                               SelectionMerge 245 None
 | |
|                               BranchConditional 243 244 245
 | |
|              244:               Label
 | |
|              246:           2   FunctionCall 6(doSomething()
 | |
|                                 Branch 245
 | |
|              245:             Label
 | |
|              248:          45 Load 47(rayQuery)
 | |
|              249:    9(fvec3) RayQueryGetWorldRayOriginKHR 248
 | |
|                               Store 247(o) 249
 | |
|              251:          45 Load 47(rayQuery)
 | |
|              252:    9(fvec3) RayQueryGetWorldRayDirectionKHR 251
 | |
|                               Store 250(d) 252
 | |
|              253:     35(ptr) AccessChain 247(o) 20
 | |
|              254:    8(float) Load 253
 | |
|              255:     35(ptr) AccessChain 250(d) 203
 | |
|              256:    8(float) Load 255
 | |
|              257:    67(bool) FOrdEqual 254 256
 | |
|                               SelectionMerge 259 None
 | |
|                               BranchConditional 257 258 259
 | |
|              258:               Label
 | |
|              260:           2   FunctionCall 6(doSomething()
 | |
|                                 Branch 259
 | |
|              259:             Label
 | |
|                               Return
 | |
|                               FunctionEnd
 | |
|  6(doSomething():           2 Function None 3
 | |
|                7:             Label
 | |
|               22:     21(ptr) AccessChain 17 19
 | |
|                               Store 22 20
 | |
|               24:     21(ptr) AccessChain 17 23
 | |
|                               Store 24 20
 | |
|                               Return
 | |
|                               FunctionEnd
 | |
| 12(makeRayDesc():     10(Ray) Function None 11
 | |
|               13:             Label
 | |
|          26(ray):     25(ptr) Variable Function
 | |
|               30:     29(ptr) AccessChain 26(ray) 19
 | |
|                               Store 30 28
 | |
|               34:     29(ptr) AccessChain 26(ray) 31
 | |
|                               Store 34 33
 | |
|               36:     35(ptr) AccessChain 26(ray) 23
 | |
|                               Store 36 27
 | |
|               39:     35(ptr) AccessChain 26(ray) 37
 | |
|                               Store 39 38
 | |
|               40:     10(Ray) Load 26(ray)
 | |
|                               ReturnValue 40
 | |
|                               FunctionEnd
 | 
