pass-by-reference updates

This commit is contained in:
Neslisah Torosdagli 2020-03-26 10:52:33 -04:00
parent 2df8c71258
commit 7d37a68ad7
10 changed files with 985 additions and 1007 deletions

View File

@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
{
if (type.getBasicType() == glslang::EbtRayQuery)
return spv::StorageClassFunction;
return spv::StorageClassWorkgroup;
if (type.getQualifier().isPipeInput())
return spv::StorageClassInput;
if (type.getQualifier().isPipeOutput())
@ -2197,7 +2197,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
node->getOp() == glslang::EOpAtomicCounterDecrement ||
node->getOp() == glslang::EOpAtomicCounter ||
node->getOp() == glslang::EOpInterpolateAtCentroid) {
node->getOp() == glslang::EOpInterpolateAtCentroid ||
node->getOp() == glslang::EOpRayQueryProceed ||
node->getOp() == glslang::EOpRayQueryGetRayTMin ||
node->getOp() == glslang::EOpRayQueryGetRayFlags ||
node->getOp() == glslang::EOpRayQueryGetWorldRayOrigin ||
node->getOp() == glslang::EOpRayQueryGetWorldRayDirection ||
node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
node->getOp() == glslang::EOpRayQueryTerminate ||
node->getOp() == glslang::EOpRayQueryConfirmIntersection) {
operand = builder.accessChainGetLValue(); // Special case l-value operands
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
@ -2296,7 +2304,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
case glslang::EOpRayQueryConfirmIntersection:
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand);
return false;
#endif
default:
@ -2720,6 +2727,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpRayQueryConfirmIntersection:
builder.addExtension("SPV_KHR_ray_query");
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
builder.addExtension("SPV_KHR_variable_pointers");
builder.addCapability(spv::CapabilityVariablePointers);
noReturnValue = true;
break;
case glslang::EOpRayQueryProceed:
@ -2743,6 +2752,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpRayQueryGetIntersectionWorldToObject:
builder.addExtension("SPV_KHR_ray_query");
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
builder.addExtension("SPV_KHR_variable_pointers");
builder.addCapability(spv::CapabilityVariablePointers);
break;
case glslang::EOpCooperativeMatrixLoad:
case glslang::EOpCooperativeMatrixStore:

View File

@ -1,11 +1,13 @@
rayQuery-allOps.comp
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 266
// Id's are bound by 257
Capability Shader
Capability VariablePointers
Capability RayQueryProvisionalKHR
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
@ -29,21 +31,21 @@ rayQuery-allOps.comp
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 ""
Name 69 "candidateType"
Name 78 "_mat4x3"
Name 83 "_mat3x4"
Name 143 "t"
Name 156 "committedStatus"
Name 240 "o"
Name 242 "d"
Name 252 "Ray"
MemberName 252(Ray) 0 "pos"
MemberName 252(Ray) 1 "tmin"
MemberName 252(Ray) 2 "dir"
MemberName 252(Ray) 3 "tmax"
Name 254 "Rays"
MemberName 254(Rays) 0 "rays"
Name 256 ""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
@ -51,15 +53,15 @@ rayQuery-allOps.comp
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
MemberDecorate 252(Ray) 0 Offset 0
MemberDecorate 252(Ray) 1 Offset 12
MemberDecorate 252(Ray) 2 Offset 16
MemberDecorate 252(Ray) 3 Offset 28
Decorate 253 ArrayStride 32
MemberDecorate 254(Rays) 0 Offset 0
Decorate 254(Rays) BufferBlock
Decorate 256 DescriptorSet 0
Decorate 256 Binding 2
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@ -86,40 +88,40 @@ rayQuery-allOps.comp
37: 18(int) Constant 3
38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR
46: TypePointer Function 45
46: TypePointer Workgroup 45
47(rayQuery): 46(ptr) Variable Workgroup
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
66: TypeBool
68: TypePointer Function 14(int)
70: 66(bool) ConstantFalse
76: TypeMatrix 9(fvec3) 4
77: TypePointer Function 76
80: TypeVector 8(float) 4
81: TypeMatrix 80(fvec4) 3
82: TypePointer Function 81
86: 66(bool) ConstantTrue
91: TypeVector 8(float) 2
144: 8(float) Constant 1056964608
175: 14(int) Constant 1
198: 14(int) Constant 2
252(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
253: TypeRuntimeArray 252(Ray)
254(Rays): TypeStruct 253
255: TypePointer Uniform 254(Rays)
256: 255(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
69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
143(t): 35(ptr) Variable Function
156(committedStatus): 68(ptr) Variable Function
240(o): 29(ptr) Variable Function
242(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
51: 48 Load 50(rtas)
@ -137,283 +139,274 @@ rayQuery-allOps.comp
LoopMerge 63 64 None
Branch 65
65: Label
66: 45 Load 47(rayQuery)
68: 67(bool) RayQueryProceedKHR 66
BranchConditional 68 62 63
67: 66(bool) RayQueryProceedKHR 47(rayQuery)
BranchConditional 67 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
71: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
Store 69(candidateType) 71
72: 14(int) Load 69(candidateType)
SelectionMerge 75 None
Switch 72 75
case 0: 73
case 1: 74
73: Label
RayQueryTerminateKHR 47(rayQuery)
79: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 79
84: 76 Load 78(_mat4x3)
85: 81 Transpose 84
Store 83(_mat3x4) 85
RayQueryConfirmIntersectionKHR 47(rayQuery)
87: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 89 None
BranchConditional 87 88 89
88: Label
90: 2 FunctionCall 6(doSomething()
Branch 89
89: Label
92: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
93: 8(float) CompositeExtract 92 0
94: 66(bool) FOrdEqual 93 27
SelectionMerge 96 None
BranchConditional 94 95 96
95: Label
97: 2 FunctionCall 6(doSomething()
Branch 96
96: Label
98: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
99: 66(bool) SGreaterThan 98 19
SelectionMerge 101 None
BranchConditional 99 100 101
100: Label
102: 2 FunctionCall 6(doSomething()
Branch 101
101: Label
103: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
104: 66(bool) SGreaterThan 103 19
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
107: 2 FunctionCall 6(doSomething()
Branch 106
106: Label
108: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
109: 8(float) CompositeExtract 108 0
110: 66(bool) FOrdGreaterThan 109 27
SelectionMerge 112 None
BranchConditional 110 111 112
111: Label
113: 2 FunctionCall 6(doSomething()
Branch 112
112: Label
114: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
115: 8(float) CompositeExtract 114 0
116: 66(bool) FOrdGreaterThan 115 27
SelectionMerge 118 None
BranchConditional 116 117 118
117: Label
119: 2 FunctionCall 6(doSomething()
Branch 118
118: Label
120: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
121: 66(bool) SGreaterThan 120 19
SelectionMerge 123 None
BranchConditional 121 122 123
122: Label
124: 2 FunctionCall 6(doSomething()
Branch 123
123: Label
125: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
126: 66(bool) FOrdGreaterThan 125 27
SelectionMerge 128 None
BranchConditional 126 127 128
127: Label
129: 2 FunctionCall 6(doSomething()
Branch 128
128: Label
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
131: 66(bool) UGreaterThan 130 20
SelectionMerge 133 None
BranchConditional 131 132 133
132: Label
134: 2 FunctionCall 6(doSomething()
Branch 133
133: Label
Branch 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
136: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 136
137: 76 Load 78(_mat4x3)
138: 81 Transpose 137
Store 83(_mat3x4) 138
139: 66(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 47(rayQuery)
SelectionMerge 141 None
BranchConditional 139 140 141
140: Label
142: 2 FunctionCall 6(doSomething()
Branch 141
141: Label
Store 143(t) 144
145: 8(float) Load 143(t)
RayQueryGenerateIntersectionKHR 47(rayQuery) 145
RayQueryTerminateKHR 47(rayQuery)
Branch 75
75: 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
148: 35(ptr) AccessChain 83(_mat3x4) 19 20
149: 8(float) Load 148
150: 35(ptr) AccessChain 78(_mat4x3) 19 20
151: 8(float) Load 150
152: 66(bool) FOrdEqual 149 151
SelectionMerge 154 None
BranchConditional 152 153 154
153: Label
155: 2 FunctionCall 6(doSomething()
Branch 154
154: Label
157: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
Store 156(committedStatus) 157
158: 14(int) Load 156(committedStatus)
SelectionMerge 162 None
Switch 158 162
case 0: 159
case 1: 160
case 2: 161
159: Label
163: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
Store 78(_mat4x3) 163
164: 76 Load 78(_mat4x3)
165: 81 Transpose 164
Store 83(_mat3x4) 165
Branch 162
160: Label
167: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
Store 78(_mat4x3) 167
168: 76 Load 78(_mat4x3)
169: 81 Transpose 168
Store 83(_mat3x4) 169
170: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 172 None
BranchConditional 170 171 172
171: Label
173: 2 FunctionCall 6(doSomething()
Branch 172
172: Label
174: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
176: 8(float) CompositeExtract 174 1
177: 66(bool) FOrdEqual 176 27
SelectionMerge 179 None
BranchConditional 177 178 179
178: Label
180: 2 FunctionCall 6(doSomething()
Branch 179
179: Label
Branch 162
161: Label
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
183: 66(bool) SGreaterThan 182 19
SelectionMerge 185 None
BranchConditional 183 184 185
184: Label
186: 2 FunctionCall 6(doSomething()
Branch 185
185: Label
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(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
192: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
193: 66(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
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
199: 8(float) CompositeExtract 197 2
200: 66(bool) FOrdGreaterThan 199 27
SelectionMerge 202 None
BranchConditional 200 201 202
201: Label
203: 2 FunctionCall 6(doSomething()
Branch 202
202: Label
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
205: 8(float) CompositeExtract 204 0
206: 66(bool) FOrdGreaterThan 205 27
SelectionMerge 208 None
BranchConditional 206 207 208
207: Label
209: 2 FunctionCall 6(doSomething()
Branch 208
208: Label
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211: 66(bool) SGreaterThan 210 19
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
215: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
216: 66(bool) FOrdGreaterThan 215 27
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
Branch 162
162: Label
222: 35(ptr) AccessChain 83(_mat3x4) 19 20
223: 8(float) Load 222
224: 35(ptr) AccessChain 78(_mat4x3) 19 20
225: 8(float) Load 224
226: 66(bool) FOrdEqual 223 225
SelectionMerge 228 None
BranchConditional 226 227 228
227: Label
229: 2 FunctionCall 6(doSomething()
Branch 228
228: Label
230: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
231: 66(bool) UGreaterThan 230 20
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
235: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
236: 66(bool) FOrdGreaterThan 235 27
SelectionMerge 238 None
BranchConditional 236 237 238
237: Label
239: 2 FunctionCall 6(doSomething()
Branch 238
238: Label
241: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 240(o) 241
243: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 242(d) 243
244: 35(ptr) AccessChain 240(o) 20
245: 8(float) Load 244
246: 35(ptr) AccessChain 242(d) 198
247: 8(float) Load 246
248: 66(bool) FOrdEqual 245 247
SelectionMerge 250 None
BranchConditional 248 249 250
249: Label
251: 2 FunctionCall 6(doSomething()
Branch 250
250: Label
Return
FunctionEnd
6(doSomething(): 2 Function None 3

View File

@ -1,11 +1,13 @@
rayQuery-allOps.frag
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 266
// Id's are bound by 257
Capability Shader
Capability VariablePointers
Capability RayQueryProvisionalKHR
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
@ -29,21 +31,21 @@ rayQuery-allOps.frag
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 ""
Name 69 "candidateType"
Name 78 "_mat4x3"
Name 83 "_mat3x4"
Name 143 "t"
Name 156 "committedStatus"
Name 240 "o"
Name 242 "d"
Name 252 "Ray"
MemberName 252(Ray) 0 "pos"
MemberName 252(Ray) 1 "tmin"
MemberName 252(Ray) 2 "dir"
MemberName 252(Ray) 3 "tmax"
Name 254 "Rays"
MemberName 254(Rays) 0 "rays"
Name 256 ""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
@ -51,15 +53,15 @@ rayQuery-allOps.frag
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
MemberDecorate 252(Ray) 0 Offset 0
MemberDecorate 252(Ray) 1 Offset 12
MemberDecorate 252(Ray) 2 Offset 16
MemberDecorate 252(Ray) 3 Offset 28
Decorate 253 ArrayStride 32
MemberDecorate 254(Rays) 0 Offset 0
Decorate 254(Rays) BufferBlock
Decorate 256 DescriptorSet 0
Decorate 256 Binding 2
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@ -86,40 +88,40 @@ rayQuery-allOps.frag
37: 18(int) Constant 3
38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR
46: TypePointer Function 45
46: TypePointer Workgroup 45
47(rayQuery): 46(ptr) Variable Workgroup
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
66: TypeBool
68: TypePointer Function 14(int)
70: 66(bool) ConstantFalse
76: TypeMatrix 9(fvec3) 4
77: TypePointer Function 76
80: TypeVector 8(float) 4
81: TypeMatrix 80(fvec4) 3
82: TypePointer Function 81
86: 66(bool) ConstantTrue
91: TypeVector 8(float) 2
144: 8(float) Constant 1056964608
175: 14(int) Constant 1
198: 14(int) Constant 2
252(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
253: TypeRuntimeArray 252(Ray)
254(Rays): TypeStruct 253
255: TypePointer Uniform 254(Rays)
256: 255(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
69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
143(t): 35(ptr) Variable Function
156(committedStatus): 68(ptr) Variable Function
240(o): 29(ptr) Variable Function
242(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
51: 48 Load 50(rtas)
@ -137,283 +139,274 @@ rayQuery-allOps.frag
LoopMerge 63 64 None
Branch 65
65: Label
66: 45 Load 47(rayQuery)
68: 67(bool) RayQueryProceedKHR 66
BranchConditional 68 62 63
67: 66(bool) RayQueryProceedKHR 47(rayQuery)
BranchConditional 67 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
71: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
Store 69(candidateType) 71
72: 14(int) Load 69(candidateType)
SelectionMerge 75 None
Switch 72 75
case 0: 73
case 1: 74
73: Label
RayQueryTerminateKHR 47(rayQuery)
79: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 79
84: 76 Load 78(_mat4x3)
85: 81 Transpose 84
Store 83(_mat3x4) 85
RayQueryConfirmIntersectionKHR 47(rayQuery)
87: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 89 None
BranchConditional 87 88 89
88: Label
90: 2 FunctionCall 6(doSomething()
Branch 89
89: Label
92: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
93: 8(float) CompositeExtract 92 0
94: 66(bool) FOrdEqual 93 27
SelectionMerge 96 None
BranchConditional 94 95 96
95: Label
97: 2 FunctionCall 6(doSomething()
Branch 96
96: Label
98: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
99: 66(bool) SGreaterThan 98 19
SelectionMerge 101 None
BranchConditional 99 100 101
100: Label
102: 2 FunctionCall 6(doSomething()
Branch 101
101: Label
103: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
104: 66(bool) SGreaterThan 103 19
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
107: 2 FunctionCall 6(doSomething()
Branch 106
106: Label
108: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
109: 8(float) CompositeExtract 108 0
110: 66(bool) FOrdGreaterThan 109 27
SelectionMerge 112 None
BranchConditional 110 111 112
111: Label
113: 2 FunctionCall 6(doSomething()
Branch 112
112: Label
114: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
115: 8(float) CompositeExtract 114 0
116: 66(bool) FOrdGreaterThan 115 27
SelectionMerge 118 None
BranchConditional 116 117 118
117: Label
119: 2 FunctionCall 6(doSomething()
Branch 118
118: Label
120: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
121: 66(bool) SGreaterThan 120 19
SelectionMerge 123 None
BranchConditional 121 122 123
122: Label
124: 2 FunctionCall 6(doSomething()
Branch 123
123: Label
125: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
126: 66(bool) FOrdGreaterThan 125 27
SelectionMerge 128 None
BranchConditional 126 127 128
127: Label
129: 2 FunctionCall 6(doSomething()
Branch 128
128: Label
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
131: 66(bool) UGreaterThan 130 20
SelectionMerge 133 None
BranchConditional 131 132 133
132: Label
134: 2 FunctionCall 6(doSomething()
Branch 133
133: Label
Branch 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
136: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 136
137: 76 Load 78(_mat4x3)
138: 81 Transpose 137
Store 83(_mat3x4) 138
139: 66(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 47(rayQuery)
SelectionMerge 141 None
BranchConditional 139 140 141
140: Label
142: 2 FunctionCall 6(doSomething()
Branch 141
141: Label
Store 143(t) 144
145: 8(float) Load 143(t)
RayQueryGenerateIntersectionKHR 47(rayQuery) 145
RayQueryTerminateKHR 47(rayQuery)
Branch 75
75: 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
148: 35(ptr) AccessChain 83(_mat3x4) 19 20
149: 8(float) Load 148
150: 35(ptr) AccessChain 78(_mat4x3) 19 20
151: 8(float) Load 150
152: 66(bool) FOrdEqual 149 151
SelectionMerge 154 None
BranchConditional 152 153 154
153: Label
155: 2 FunctionCall 6(doSomething()
Branch 154
154: Label
157: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
Store 156(committedStatus) 157
158: 14(int) Load 156(committedStatus)
SelectionMerge 162 None
Switch 158 162
case 0: 159
case 1: 160
case 2: 161
159: Label
163: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
Store 78(_mat4x3) 163
164: 76 Load 78(_mat4x3)
165: 81 Transpose 164
Store 83(_mat3x4) 165
Branch 162
160: Label
167: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
Store 78(_mat4x3) 167
168: 76 Load 78(_mat4x3)
169: 81 Transpose 168
Store 83(_mat3x4) 169
170: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 172 None
BranchConditional 170 171 172
171: Label
173: 2 FunctionCall 6(doSomething()
Branch 172
172: Label
174: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
176: 8(float) CompositeExtract 174 1
177: 66(bool) FOrdEqual 176 27
SelectionMerge 179 None
BranchConditional 177 178 179
178: Label
180: 2 FunctionCall 6(doSomething()
Branch 179
179: Label
Branch 162
161: Label
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
183: 66(bool) SGreaterThan 182 19
SelectionMerge 185 None
BranchConditional 183 184 185
184: Label
186: 2 FunctionCall 6(doSomething()
Branch 185
185: Label
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(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
192: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
193: 66(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
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
199: 8(float) CompositeExtract 197 2
200: 66(bool) FOrdGreaterThan 199 27
SelectionMerge 202 None
BranchConditional 200 201 202
201: Label
203: 2 FunctionCall 6(doSomething()
Branch 202
202: Label
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
205: 8(float) CompositeExtract 204 0
206: 66(bool) FOrdGreaterThan 205 27
SelectionMerge 208 None
BranchConditional 206 207 208
207: Label
209: 2 FunctionCall 6(doSomething()
Branch 208
208: Label
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211: 66(bool) SGreaterThan 210 19
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
215: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
216: 66(bool) FOrdGreaterThan 215 27
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
Branch 162
162: Label
222: 35(ptr) AccessChain 83(_mat3x4) 19 20
223: 8(float) Load 222
224: 35(ptr) AccessChain 78(_mat4x3) 19 20
225: 8(float) Load 224
226: 66(bool) FOrdEqual 223 225
SelectionMerge 228 None
BranchConditional 226 227 228
227: Label
229: 2 FunctionCall 6(doSomething()
Branch 228
228: Label
230: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
231: 66(bool) UGreaterThan 230 20
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
235: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
236: 66(bool) FOrdGreaterThan 235 27
SelectionMerge 238 None
BranchConditional 236 237 238
237: Label
239: 2 FunctionCall 6(doSomething()
Branch 238
238: Label
241: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 240(o) 241
243: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 242(d) 243
244: 35(ptr) AccessChain 240(o) 20
245: 8(float) Load 244
246: 35(ptr) AccessChain 242(d) 198
247: 8(float) Load 246
248: 66(bool) FOrdEqual 245 247
SelectionMerge 250 None
BranchConditional 248 249 250
249: Label
251: 2 FunctionCall 6(doSomething()
Branch 250
250: Label
Return
FunctionEnd
6(doSomething(): 2 Function None 3

View File

@ -1,11 +1,13 @@
rayQuery-allOps.rgen
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 266
// Id's are bound by 257
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@ -29,21 +31,21 @@ rayQuery-allOps.rgen
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 ""
Name 69 "candidateType"
Name 78 "_mat4x3"
Name 83 "_mat3x4"
Name 143 "t"
Name 156 "committedStatus"
Name 240 "o"
Name 242 "d"
Name 252 "Ray"
MemberName 252(Ray) 0 "pos"
MemberName 252(Ray) 1 "tmin"
MemberName 252(Ray) 2 "dir"
MemberName 252(Ray) 3 "tmax"
Name 254 "Rays"
MemberName 254(Rays) 0 "rays"
Name 256 ""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
@ -51,15 +53,15 @@ rayQuery-allOps.rgen
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
MemberDecorate 252(Ray) 0 Offset 0
MemberDecorate 252(Ray) 1 Offset 12
MemberDecorate 252(Ray) 2 Offset 16
MemberDecorate 252(Ray) 3 Offset 28
Decorate 253 ArrayStride 32
MemberDecorate 254(Rays) 0 Offset 0
Decorate 254(Rays) BufferBlock
Decorate 256 DescriptorSet 0
Decorate 256 Binding 2
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@ -86,40 +88,40 @@ rayQuery-allOps.rgen
37: 18(int) Constant 3
38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR
46: TypePointer Function 45
46: TypePointer Workgroup 45
47(rayQuery): 46(ptr) Variable Workgroup
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
66: TypeBool
68: TypePointer Function 14(int)
70: 66(bool) ConstantFalse
76: TypeMatrix 9(fvec3) 4
77: TypePointer Function 76
80: TypeVector 8(float) 4
81: TypeMatrix 80(fvec4) 3
82: TypePointer Function 81
86: 66(bool) ConstantTrue
91: TypeVector 8(float) 2
144: 8(float) Constant 1056964608
175: 14(int) Constant 1
198: 14(int) Constant 2
252(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
253: TypeRuntimeArray 252(Ray)
254(Rays): TypeStruct 253
255: TypePointer Uniform 254(Rays)
256: 255(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
69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
143(t): 35(ptr) Variable Function
156(committedStatus): 68(ptr) Variable Function
240(o): 29(ptr) Variable Function
242(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
51: 48 Load 50(rtas)
@ -137,283 +139,274 @@ rayQuery-allOps.rgen
LoopMerge 63 64 None
Branch 65
65: Label
66: 45 Load 47(rayQuery)
68: 67(bool) RayQueryProceedKHR 66
BranchConditional 68 62 63
67: 66(bool) RayQueryProceedKHR 47(rayQuery)
BranchConditional 67 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
71: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
Store 69(candidateType) 71
72: 14(int) Load 69(candidateType)
SelectionMerge 75 None
Switch 72 75
case 0: 73
case 1: 74
73: Label
RayQueryTerminateKHR 47(rayQuery)
79: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 79
84: 76 Load 78(_mat4x3)
85: 81 Transpose 84
Store 83(_mat3x4) 85
RayQueryConfirmIntersectionKHR 47(rayQuery)
87: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 89 None
BranchConditional 87 88 89
88: Label
90: 2 FunctionCall 6(doSomething()
Branch 89
89: Label
92: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
93: 8(float) CompositeExtract 92 0
94: 66(bool) FOrdEqual 93 27
SelectionMerge 96 None
BranchConditional 94 95 96
95: Label
97: 2 FunctionCall 6(doSomething()
Branch 96
96: Label
98: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
99: 66(bool) SGreaterThan 98 19
SelectionMerge 101 None
BranchConditional 99 100 101
100: Label
102: 2 FunctionCall 6(doSomething()
Branch 101
101: Label
103: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
104: 66(bool) SGreaterThan 103 19
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
107: 2 FunctionCall 6(doSomething()
Branch 106
106: Label
108: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
109: 8(float) CompositeExtract 108 0
110: 66(bool) FOrdGreaterThan 109 27
SelectionMerge 112 None
BranchConditional 110 111 112
111: Label
113: 2 FunctionCall 6(doSomething()
Branch 112
112: Label
114: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
115: 8(float) CompositeExtract 114 0
116: 66(bool) FOrdGreaterThan 115 27
SelectionMerge 118 None
BranchConditional 116 117 118
117: Label
119: 2 FunctionCall 6(doSomething()
Branch 118
118: Label
120: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
121: 66(bool) SGreaterThan 120 19
SelectionMerge 123 None
BranchConditional 121 122 123
122: Label
124: 2 FunctionCall 6(doSomething()
Branch 123
123: Label
125: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
126: 66(bool) FOrdGreaterThan 125 27
SelectionMerge 128 None
BranchConditional 126 127 128
127: Label
129: 2 FunctionCall 6(doSomething()
Branch 128
128: Label
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
131: 66(bool) UGreaterThan 130 20
SelectionMerge 133 None
BranchConditional 131 132 133
132: Label
134: 2 FunctionCall 6(doSomething()
Branch 133
133: Label
Branch 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
136: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 136
137: 76 Load 78(_mat4x3)
138: 81 Transpose 137
Store 83(_mat3x4) 138
139: 66(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 47(rayQuery)
SelectionMerge 141 None
BranchConditional 139 140 141
140: Label
142: 2 FunctionCall 6(doSomething()
Branch 141
141: Label
Store 143(t) 144
145: 8(float) Load 143(t)
RayQueryGenerateIntersectionKHR 47(rayQuery) 145
RayQueryTerminateKHR 47(rayQuery)
Branch 75
75: 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
148: 35(ptr) AccessChain 83(_mat3x4) 19 20
149: 8(float) Load 148
150: 35(ptr) AccessChain 78(_mat4x3) 19 20
151: 8(float) Load 150
152: 66(bool) FOrdEqual 149 151
SelectionMerge 154 None
BranchConditional 152 153 154
153: Label
155: 2 FunctionCall 6(doSomething()
Branch 154
154: Label
157: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
Store 156(committedStatus) 157
158: 14(int) Load 156(committedStatus)
SelectionMerge 162 None
Switch 158 162
case 0: 159
case 1: 160
case 2: 161
159: Label
163: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
Store 78(_mat4x3) 163
164: 76 Load 78(_mat4x3)
165: 81 Transpose 164
Store 83(_mat3x4) 165
Branch 162
160: Label
167: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
Store 78(_mat4x3) 167
168: 76 Load 78(_mat4x3)
169: 81 Transpose 168
Store 83(_mat3x4) 169
170: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 172 None
BranchConditional 170 171 172
171: Label
173: 2 FunctionCall 6(doSomething()
Branch 172
172: Label
174: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
176: 8(float) CompositeExtract 174 1
177: 66(bool) FOrdEqual 176 27
SelectionMerge 179 None
BranchConditional 177 178 179
178: Label
180: 2 FunctionCall 6(doSomething()
Branch 179
179: Label
Branch 162
161: Label
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
183: 66(bool) SGreaterThan 182 19
SelectionMerge 185 None
BranchConditional 183 184 185
184: Label
186: 2 FunctionCall 6(doSomething()
Branch 185
185: Label
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(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
192: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
193: 66(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
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
199: 8(float) CompositeExtract 197 2
200: 66(bool) FOrdGreaterThan 199 27
SelectionMerge 202 None
BranchConditional 200 201 202
201: Label
203: 2 FunctionCall 6(doSomething()
Branch 202
202: Label
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
205: 8(float) CompositeExtract 204 0
206: 66(bool) FOrdGreaterThan 205 27
SelectionMerge 208 None
BranchConditional 206 207 208
207: Label
209: 2 FunctionCall 6(doSomething()
Branch 208
208: Label
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211: 66(bool) SGreaterThan 210 19
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
215: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
216: 66(bool) FOrdGreaterThan 215 27
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
Branch 162
162: Label
222: 35(ptr) AccessChain 83(_mat3x4) 19 20
223: 8(float) Load 222
224: 35(ptr) AccessChain 78(_mat4x3) 19 20
225: 8(float) Load 224
226: 66(bool) FOrdEqual 223 225
SelectionMerge 228 None
BranchConditional 226 227 228
227: Label
229: 2 FunctionCall 6(doSomething()
Branch 228
228: Label
230: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
231: 66(bool) UGreaterThan 230 20
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
235: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
236: 66(bool) FOrdGreaterThan 235 27
SelectionMerge 238 None
BranchConditional 236 237 238
237: Label
239: 2 FunctionCall 6(doSomething()
Branch 238
238: Label
241: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 240(o) 241
243: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 242(d) 243
244: 35(ptr) AccessChain 240(o) 20
245: 8(float) Load 244
246: 35(ptr) AccessChain 242(d) 198
247: 8(float) Load 246
248: 66(bool) FOrdEqual 245 247
SelectionMerge 250 None
BranchConditional 248 249 250
249: Label
251: 2 FunctionCall 6(doSomething()
Branch 250
250: Label
Return
FunctionEnd
6(doSomething(): 2 Function None 3

View File

@ -1,11 +1,13 @@
rayQuery-array-2d-dynamic.rgen
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 128
// Id's are bound by 124
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@ -37,11 +39,9 @@ rayQuery-array-2d-dynamic.rgen
MemberName 74(Rays) 0 "rays"
Name 76 ""
Name 91 "rayQuery"
Name 93 "param"
Name 96 "param"
Name 120 "C"
Name 122 "param"
Name 125 "param"
Name 94 "param"
Name 118 "C"
Name 121 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0
@ -60,7 +60,7 @@ rayQuery-array-2d-dynamic.rgen
6: TypeInt 32 0
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10
11: TypePointer Workgroup 10
12: TypeFloat 32
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
@ -93,19 +93,17 @@ rayQuery-array-2d-dynamic.rgen
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
89: TypeArray 10 24
90: TypePointer Function 89
110: 6(int) Constant 32
119: TypePointer Private 53(int)
120(C): 119(ptr) Variable Private
90: TypePointer Workgroup 89
91(rayQuery): 90(ptr) Variable Workgroup
108: 6(int) Constant 32
117: TypePointer Private 53(int)
118(C): 117(ptr) Variable Private
4(main): 2 Function None 3
5: Label
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
91(rayQuery): 90(ptr) Variable Function
93(param): 11(ptr) Variable Function
96(param): 15(ptr) Variable Function
122(param): 11(ptr) Variable Function
125(param): 15(ptr) Variable Function
94(param): 15(ptr) Variable Function
121(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
77: 6(int) Load 69(index)
@ -124,42 +122,38 @@ rayQuery-array-2d-dynamic.rgen
88: 59(ptr) AccessChain 71(ray) 65
Store 88 87
92: 6(int) Load 69(index)
94: 11(ptr) AccessChain 91(rayQuery) 54
95: 10 Load 94
Store 93(param) 95
97: 78(ptr) AccessChain 76 54 92
98: 72(Ray) Load 97
99: 13(fvec3) CompositeExtract 98 0
100: 55(ptr) AccessChain 96(param) 54
93: 11(ptr) AccessChain 91(rayQuery) 54
95: 78(ptr) AccessChain 76 54 92
96: 72(Ray) Load 95
97: 13(fvec3) CompositeExtract 96 0
98: 55(ptr) AccessChain 94(param) 54
Store 98 97
99: 12(float) CompositeExtract 96 1
100: 59(ptr) AccessChain 94(param) 58
Store 100 99
101: 12(float) CompositeExtract 98 1
102: 59(ptr) AccessChain 96(param) 58
101: 13(fvec3) CompositeExtract 96 2
102: 55(ptr) AccessChain 94(param) 62
Store 102 101
103: 13(fvec3) CompositeExtract 98 2
104: 55(ptr) AccessChain 96(param) 62
103: 12(float) CompositeExtract 96 3
104: 59(ptr) AccessChain 94(param) 65
Store 104 103
105: 12(float) CompositeExtract 98 3
106: 59(ptr) AccessChain 96(param) 65
Store 106 105
107: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93(param) 96(param)
108: 11(ptr) AccessChain 91(rayQuery) 58
109: 48 Load 50(rtas)
111: 55(ptr) AccessChain 71(ray) 54
112: 13(fvec3) Load 111
113: 59(ptr) AccessChain 71(ray) 58
114: 12(float) Load 113
115: 55(ptr) AccessChain 71(ray) 62
116: 13(fvec3) Load 115
117: 59(ptr) AccessChain 71(ray) 65
118: 12(float) Load 117
RayQueryInitializeKHR 108 109 33 110 112 114 116 118
121: 53(int) Load 120(C)
123: 11(ptr) AccessChain 91(rayQuery) 121
124: 10 Load 123
Store 122(param) 124
126: 14(Ray) Load 71(ray)
Store 125(param) 126
127: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 122(param) 125(param)
105: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93 94(param)
106: 11(ptr) AccessChain 91(rayQuery) 58
107: 48 Load 50(rtas)
109: 55(ptr) AccessChain 71(ray) 54
110: 13(fvec3) Load 109
111: 59(ptr) AccessChain 71(ray) 58
112: 12(float) Load 111
113: 55(ptr) AccessChain 71(ray) 62
114: 13(fvec3) Load 113
115: 59(ptr) AccessChain 71(ray) 65
116: 12(float) Load 115
RayQueryInitializeKHR 106 107 33 108 110 112 114 116
119: 53(int) Load 118(C)
120: 11(ptr) AccessChain 91(rayQuery) 119
122: 14(Ray) Load 71(ray)
Store 121(param) 122
123: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 120 121(param)
Return
FunctionEnd
8(launchIndex(): 6(int) Function None 7

View File

@ -3,9 +3,11 @@ rayQuery-decls.rgen
// Generated by (magic number): 80008
// Id's are bound by 130
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@ -90,29 +92,29 @@ rayQuery-decls.rgen
69: TypeRayQueryProvisionalKHR
70: 6(int) Constant 4
71: TypeArray 69 70
72: TypePointer Function 71
72: TypePointer Workgroup 71
73(g_rayQueryArray): 72(ptr) Variable Workgroup
74(block): TypeStruct 6(int)
75: TypePointer ShaderRecordBufferKHR 74(block)
76: 75(ptr) Variable ShaderRecordBufferKHR
77: TypePointer ShaderRecordBufferKHR 6(int)
80: TypePointer Function 69
80: TypePointer Workgroup 69
81(rayQuery0b): 80(ptr) Variable Workgroup
86(rayQuery0a): 80(ptr) Variable Workgroup
89(rayQuery0c): 80(ptr) Variable Workgroup
94: TypeAccelerationStructureKHR
95: TypePointer UniformConstant 94
96(rtas): 95(ptr) Variable UniformConstant
98: 6(int) Constant 16
107(rayQuery1c): 80(ptr) Variable Workgroup
109: 6(int) Constant 32
119: 6(int) Constant 3
120: 6(int) Constant 64
129(g_rayQueryUnused): 80(ptr) Variable Workgroup
4(main): 2 Function None 3
5: Label
38(index): 37(ptr) Variable Function
44(ray): 43(ptr) Variable Function
73(g_rayQueryArray): 72(ptr) Variable Function
81(rayQuery0b): 80(ptr) Variable Function
86(rayQuery0a): 80(ptr) Variable Function
89(rayQuery0c): 80(ptr) Variable Function
107(rayQuery1c): 80(ptr) Variable Function
129(g_rayQueryUnused): 80(ptr) Variable Function
39: 6(int) FunctionCall 8(launchIndex()
Store 38(index) 39
52: 6(int) Load 38(index)

View File

@ -1,11 +1,13 @@
rayQuery-initialize.rgen
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 105
// Id's are bound by 103
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@ -38,7 +40,6 @@ rayQuery-initialize.rgen
Name 76 ""
Name 89 "rayQuery"
Name 90 "param"
Name 92 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0
@ -57,7 +58,7 @@ rayQuery-initialize.rgen
6: TypeInt 32 0
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10
11: TypePointer Workgroup 10
12: TypeFloat 32
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
@ -89,14 +90,13 @@ rayQuery-initialize.rgen
75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
96: 6(int) Constant 32
89(rayQuery): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
4(main): 2 Function None 3
5: Label
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
89(rayQuery): 11(ptr) Variable Function
90(param): 11(ptr) Variable Function
92(param): 15(ptr) Variable Function
90(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
77: 6(int) Load 69(index)
@ -114,21 +114,19 @@ rayQuery-initialize.rgen
87: 12(float) CompositeExtract 80 3
88: 59(ptr) AccessChain 71(ray) 65
Store 88 87
91: 10 Load 89(rayQuery)
91: 14(Ray) Load 71(ray)
Store 90(param) 91
93: 14(Ray) Load 71(ray)
Store 92(param) 93
94: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 90(param) 92(param)
95: 48 Load 50(rtas)
97: 55(ptr) AccessChain 71(ray) 54
98: 13(fvec3) Load 97
99: 59(ptr) AccessChain 71(ray) 58
100: 12(float) Load 99
101: 55(ptr) AccessChain 71(ray) 62
102: 13(fvec3) Load 101
103: 59(ptr) AccessChain 71(ray) 65
104: 12(float) Load 103
RayQueryInitializeKHR 89(rayQuery) 95 33 96 98 100 102 104
92: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 89(rayQuery) 90(param)
93: 48 Load 50(rtas)
95: 55(ptr) AccessChain 71(ray) 54
96: 13(fvec3) Load 95
97: 59(ptr) AccessChain 71(ray) 58
98: 12(float) Load 97
99: 55(ptr) AccessChain 71(ray) 62
100: 13(fvec3) Load 99
101: 59(ptr) AccessChain 71(ray) 65
102: 12(float) Load 101
RayQueryInitializeKHR 89(rayQuery) 93 33 94 96 98 100 102
Return
FunctionEnd
8(launchIndex(): 6(int) Function None 7

View File

@ -1,11 +1,13 @@
rayQuery-no-cse.rgen
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 111
// Id's are bound by 107
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@ -38,10 +40,8 @@ rayQuery-no-cse.rgen
Name 76 ""
Name 89 "rayQuery1"
Name 90 "param"
Name 92 "param"
Name 105 "rayQuery2"
Name 106 "param"
Name 108 "param"
Name 103 "rayQuery2"
Name 104 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0
@ -60,7 +60,7 @@ rayQuery-no-cse.rgen
6: TypeInt 32 0
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10
11: TypePointer Workgroup 10
12: TypeFloat 32
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
@ -92,17 +92,15 @@ rayQuery-no-cse.rgen
75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
96: 6(int) Constant 32
89(rayQuery1): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
103(rayQuery2): 11(ptr) Variable Workgroup
4(main): 2 Function None 3
5: Label
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
89(rayQuery1): 11(ptr) Variable Function
90(param): 11(ptr) Variable Function
92(param): 15(ptr) Variable Function
105(rayQuery2): 11(ptr) Variable Function
106(param): 11(ptr) Variable Function
108(param): 15(ptr) Variable Function
90(param): 15(ptr) Variable Function
104(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
77: 6(int) Load 69(index)
@ -120,26 +118,22 @@ rayQuery-no-cse.rgen
87: 12(float) CompositeExtract 80 3
88: 59(ptr) AccessChain 71(ray) 65
Store 88 87
91: 10 Load 89(rayQuery1)
91: 14(Ray) Load 71(ray)
Store 90(param) 91
93: 14(Ray) Load 71(ray)
Store 92(param) 93
94: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 90(param) 92(param)
95: 48 Load 50(rtas)
97: 55(ptr) AccessChain 71(ray) 54
98: 13(fvec3) Load 97
99: 59(ptr) AccessChain 71(ray) 58
100: 12(float) Load 99
101: 55(ptr) AccessChain 71(ray) 62
102: 13(fvec3) Load 101
103: 59(ptr) AccessChain 71(ray) 65
104: 12(float) Load 103
RayQueryInitializeKHR 89(rayQuery1) 95 33 96 98 100 102 104
107: 10 Load 105(rayQuery2)
Store 106(param) 107
109: 14(Ray) Load 71(ray)
Store 108(param) 109
110: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 106(param) 108(param)
92: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 89(rayQuery1) 90(param)
93: 48 Load 50(rtas)
95: 55(ptr) AccessChain 71(ray) 54
96: 13(fvec3) Load 95
97: 59(ptr) AccessChain 71(ray) 58
98: 12(float) Load 97
99: 55(ptr) AccessChain 71(ray) 62
100: 13(fvec3) Load 99
101: 59(ptr) AccessChain 71(ray) 65
102: 12(float) Load 101
RayQueryInitializeKHR 89(rayQuery1) 93 33 94 96 98 100 102
105: 14(Ray) Load 71(ray)
Store 104(param) 105
106: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 103(rayQuery2) 104(param)
Return
FunctionEnd
8(launchIndex(): 6(int) Function None 7

View File

@ -1,11 +1,13 @@
rayQuery.rgen
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 46
// Id's are bound by 44
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@ -38,7 +40,8 @@ rayQuery.rgen
13: 10(float) Constant 0
15: 10(float) Constant 1148846080
16: TypeRayQueryProvisionalKHR
17: TypePointer Function 16
17: TypePointer Workgroup 16
18(localRayQuery): 17(ptr) Variable Workgroup
19: TypeAccelerationStructureKHR
20: TypePointer UniformConstant 19
21(accNV0): 20(ptr) Variable UniformConstant
@ -51,13 +54,12 @@ rayQuery.rgen
30: 29(int) Constant 1
31: TypePointer ShaderRecordBufferKHR 25(fvec3)
35: 29(int) Constant 0
40: TypeBool
39: TypeBool
4(main): 2 Function None 3
5: Label
8(rayFlags): 7(ptr) Variable Function
12(tMin): 11(ptr) Variable Function
14(tMax): 11(ptr) Variable Function
18(localRayQuery): 17(ptr) Variable Function
Store 8(rayFlags) 9
Store 12(tMin) 13
Store 14(tMax) 15
@ -70,15 +72,13 @@ rayQuery.rgen
37: 25(fvec3) Load 36
38: 10(float) Load 14(tMax)
RayQueryInitializeKHR 18(localRayQuery) 22 23 24 33 34 37 38
39: 16 Load 18(localRayQuery)
41: 40(bool) RayQueryProceedKHR 39
42: 40(bool) LogicalNot 41
SelectionMerge 44 None
BranchConditional 42 43 44
43: Label
45: 16 Load 18(localRayQuery)
RayQueryTerminateKHR 45
Branch 44
44: Label
40: 39(bool) RayQueryProceedKHR 18(localRayQuery)
41: 39(bool) LogicalNot 40
SelectionMerge 43 None
BranchConditional 41 42 43
42: Label
RayQueryTerminateKHR 18(localRayQuery)
Branch 43
43: Label
Return
FunctionEnd

View File

@ -1674,7 +1674,7 @@ public:
}
virtual bool isOpaque() const { return basicType == EbtSampler
#ifndef GLSLANG_WEB
|| basicType == EbtAtomicUint || basicType == EbtAccStruct
|| basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
#endif
; }
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }