1spv.ext.ClosestHitShader.rchit
2// Module Version 10400
3// Generated by (magic number): 8000b
4// Id's are bound by 109
5
6                              Capability RayTracingKHR
7                              Capability RayTracingPositionFetchKHR
8                              Capability RayCullMaskKHR
9                              Extension  "SPV_KHR_ray_cull_mask"
10                              Extension  "SPV_KHR_ray_tracing"
11                              Extension  "SPV_KHR_ray_tracing_position_fetch"
12               1:             ExtInstImport  "GLSL.std.450"
13                              MemoryModel Logical GLSL450
14                              EntryPoint ClosestHitKHR 4  "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 88 94 106 108
15                              Source GLSL 460
16                              SourceExtension  "GL_EXT_ray_cull_mask"
17                              SourceExtension  "GL_EXT_ray_tracing"
18                              SourceExtension  "GL_EXT_ray_tracing_position_fetch"
19                              Name 4  "main"
20                              Name 9  "v0"
21                              Name 11  "gl_LaunchIDEXT"
22                              Name 13  "v1"
23                              Name 14  "gl_LaunchSizeEXT"
24                              Name 18  "v2"
25                              Name 20  "gl_PrimitiveID"
26                              Name 22  "v3"
27                              Name 23  "gl_InstanceID"
28                              Name 25  "v4"
29                              Name 26  "gl_InstanceCustomIndexEXT"
30                              Name 31  "v5"
31                              Name 33  "gl_WorldRayOriginEXT"
32                              Name 35  "v6"
33                              Name 36  "gl_WorldRayDirectionEXT"
34                              Name 38  "v7"
35                              Name 39  "gl_ObjectRayOriginEXT"
36                              Name 41  "v8"
37                              Name 42  "gl_ObjectRayDirectionEXT"
38                              Name 45  "v9"
39                              Name 47  "gl_RayTminEXT"
40                              Name 49  "v10"
41                              Name 50  "gl_RayTmaxEXT"
42                              Name 52  "v11"
43                              Name 53  "gl_HitTEXT"
44                              Name 56  "v12"
45                              Name 58  "gl_HitKindEXT"
46                              Name 62  "v13"
47                              Name 64  "gl_ObjectToWorldEXT"
48                              Name 66  "v14"
49                              Name 67  "gl_WorldToObjectEXT"
50                              Name 69  "v15"
51                              Name 70  "gl_GeometryIndexEXT"
52                              Name 75  "v16"
53                              Name 78  "v17"
54                              Name 81  "v18"
55                              Name 82  "gl_CullMaskEXT"
56                              Name 84  "v19"
57                              Name 88  "gl_HitTriangleVertexPositionsEXT"
58                              Name 94  "accEXT"
59                              Name 106  "incomingPayload"
60                              Name 108  "localPayload"
61                              Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
62                              Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
63                              Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
64                              Decorate 23(gl_InstanceID) BuiltIn InstanceId
65                              Decorate 26(gl_InstanceCustomIndexEXT) BuiltIn InstanceCustomIndexKHR
66                              Decorate 33(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
67                              Decorate 36(gl_WorldRayDirectionEXT) BuiltIn WorldRayDirectionKHR
68                              Decorate 39(gl_ObjectRayOriginEXT) BuiltIn ObjectRayOriginKHR
69                              Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
70                              Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
71                              Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
72                              Decorate 53(gl_HitTEXT) BuiltIn RayTmaxKHR
73                              Decorate 58(gl_HitKindEXT) BuiltIn HitKindKHR
74                              Decorate 64(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
75                              Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
76                              Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR
77                              Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR
78                              Decorate 88(gl_HitTriangleVertexPositionsEXT) BuiltIn HitTriangleVertexPositionsKHR
79                              Decorate 94(accEXT) DescriptorSet 0
80                              Decorate 94(accEXT) Binding 0
81               2:             TypeVoid
82               3:             TypeFunction 2
83               6:             TypeInt 32 0
84               7:             TypeVector 6(int) 3
85               8:             TypePointer Function 7(ivec3)
86              10:             TypePointer Input 7(ivec3)
8711(gl_LaunchIDEXT):     10(ptr) Variable Input
8814(gl_LaunchSizeEXT):     10(ptr) Variable Input
89              16:             TypeInt 32 1
90              17:             TypePointer Function 16(int)
91              19:             TypePointer Input 16(int)
9220(gl_PrimitiveID):     19(ptr) Variable Input
9323(gl_InstanceID):     19(ptr) Variable Input
9426(gl_InstanceCustomIndexEXT):     19(ptr) Variable Input
95              28:             TypeFloat 32
96              29:             TypeVector 28(float) 3
97              30:             TypePointer Function 29(fvec3)
98              32:             TypePointer Input 29(fvec3)
9933(gl_WorldRayOriginEXT):     32(ptr) Variable Input
10036(gl_WorldRayDirectionEXT):     32(ptr) Variable Input
10139(gl_ObjectRayOriginEXT):     32(ptr) Variable Input
10242(gl_ObjectRayDirectionEXT):     32(ptr) Variable Input
103              44:             TypePointer Function 28(float)
104              46:             TypePointer Input 28(float)
10547(gl_RayTminEXT):     46(ptr) Variable Input
10650(gl_RayTmaxEXT):     46(ptr) Variable Input
107  53(gl_HitTEXT):     46(ptr) Variable Input
108              55:             TypePointer Function 6(int)
109              57:             TypePointer Input 6(int)
11058(gl_HitKindEXT):     57(ptr) Variable Input
111              60:             TypeMatrix 29(fvec3) 4
112              61:             TypePointer Function 60
113              63:             TypePointer Input 60
11464(gl_ObjectToWorldEXT):     63(ptr) Variable Input
11567(gl_WorldToObjectEXT):     63(ptr) Variable Input
11670(gl_GeometryIndexEXT):     19(ptr) Variable Input
117              72:             TypeVector 28(float) 4
118              73:             TypeMatrix 72(fvec4) 3
119              74:             TypePointer Function 73
12082(gl_CullMaskEXT):     57(ptr) Variable Input
121              85:      6(int) Constant 3
122              86:             TypeArray 29(fvec3) 85
123              87:             TypePointer Input 86
12488(gl_HitTriangleVertexPositionsEXT):     87(ptr) Variable Input
125              89:     16(int) Constant 0
126              92:             TypeAccelerationStructureKHR
127              93:             TypePointer UniformConstant 92
128      94(accEXT):     93(ptr) Variable UniformConstant
129              96:      6(int) Constant 0
130              97:      6(int) Constant 1
131              98:      6(int) Constant 2
132              99:   28(float) Constant 1056964608
133             100:   29(fvec3) ConstantComposite 99 99 99
134             101:   28(float) Constant 1065353216
135             102:   29(fvec3) ConstantComposite 101 101 101
136             103:   28(float) Constant 1061158912
137             104:     16(int) Constant 1
138             105:             TypePointer IncomingRayPayloadKHR 72(fvec4)
139106(incomingPayload):    105(ptr) Variable IncomingRayPayloadKHR
140             107:             TypePointer RayPayloadKHR 72(fvec4)
141108(localPayload):    107(ptr) Variable RayPayloadKHR
142         4(main):           2 Function None 3
143               5:             Label
144           9(v0):      8(ptr) Variable Function
145          13(v1):      8(ptr) Variable Function
146          18(v2):     17(ptr) Variable Function
147          22(v3):     17(ptr) Variable Function
148          25(v4):     17(ptr) Variable Function
149          31(v5):     30(ptr) Variable Function
150          35(v6):     30(ptr) Variable Function
151          38(v7):     30(ptr) Variable Function
152          41(v8):     30(ptr) Variable Function
153          45(v9):     44(ptr) Variable Function
154         49(v10):     44(ptr) Variable Function
155         52(v11):     44(ptr) Variable Function
156         56(v12):     55(ptr) Variable Function
157         62(v13):     61(ptr) Variable Function
158         66(v14):     61(ptr) Variable Function
159         69(v15):     17(ptr) Variable Function
160         75(v16):     74(ptr) Variable Function
161         78(v17):     74(ptr) Variable Function
162         81(v18):     55(ptr) Variable Function
163         84(v19):     30(ptr) Variable Function
164              12:    7(ivec3) Load 11(gl_LaunchIDEXT)
165                              Store 9(v0) 12
166              15:    7(ivec3) Load 14(gl_LaunchSizeEXT)
167                              Store 13(v1) 15
168              21:     16(int) Load 20(gl_PrimitiveID)
169                              Store 18(v2) 21
170              24:     16(int) Load 23(gl_InstanceID)
171                              Store 22(v3) 24
172              27:     16(int) Load 26(gl_InstanceCustomIndexEXT)
173                              Store 25(v4) 27
174              34:   29(fvec3) Load 33(gl_WorldRayOriginEXT)
175                              Store 31(v5) 34
176              37:   29(fvec3) Load 36(gl_WorldRayDirectionEXT)
177                              Store 35(v6) 37
178              40:   29(fvec3) Load 39(gl_ObjectRayOriginEXT)
179                              Store 38(v7) 40
180              43:   29(fvec3) Load 42(gl_ObjectRayDirectionEXT)
181                              Store 41(v8) 43
182              48:   28(float) Load 47(gl_RayTminEXT)
183                              Store 45(v9) 48
184              51:   28(float) Load 50(gl_RayTmaxEXT)
185                              Store 49(v10) 51
186              54:   28(float) Load 53(gl_HitTEXT)
187                              Store 52(v11) 54
188              59:      6(int) Load 58(gl_HitKindEXT)
189                              Store 56(v12) 59
190              65:          60 Load 64(gl_ObjectToWorldEXT)
191                              Store 62(v13) 65
192              68:          60 Load 67(gl_WorldToObjectEXT)
193                              Store 66(v14) 68
194              71:     16(int) Load 70(gl_GeometryIndexEXT)
195                              Store 69(v15) 71
196              76:          60 Load 64(gl_ObjectToWorldEXT)
197              77:          73 Transpose 76
198                              Store 75(v16) 77
199              79:          60 Load 67(gl_WorldToObjectEXT)
200              80:          73 Transpose 79
201                              Store 78(v17) 80
202              83:      6(int) Load 82(gl_CullMaskEXT)
203                              Store 81(v18) 83
204              90:     32(ptr) AccessChain 88(gl_HitTriangleVertexPositionsEXT) 89
205              91:   29(fvec3) Load 90
206                              Store 84(v19) 91
207              95:          92 Load 94(accEXT)
208                              TraceRayKHR 95 96 97 98 85 96 100 99 102 103 106(incomingPayload)
209                              Return
210                              FunctionEnd
211