Add support for EXT_ray_flags_primitive_culling. (#2173)

Fixes issue #2169.
This commit is contained in:
alelenv
2020-04-08 21:09:20 -07:00
committed by GitHub
parent 9c3204a1fd
commit 75de196cec
11 changed files with 126 additions and 106 deletions

View File

@@ -1,18 +1,19 @@
rayQuery-allOps.comp
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 257
// Id's are bound by 258
Capability Shader
Capability RayQueryProvisionalKHR
Capability RayTraversalPrimitiveCullingProvisionalKHR
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_flags_primitive_culling"
SourceExtension "GL_EXT_ray_query"
SourceExtension "GL_NV_ray_tracing"
Name 4 "main"
Name 6 "doSomething("
Name 10 "Ray"
@@ -34,16 +35,16 @@ rayQuery-allOps.comp
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 ""
Name 241 "o"
Name 243 "d"
Name 253 "Ray"
MemberName 253(Ray) 0 "pos"
MemberName 253(Ray) 1 "tmin"
MemberName 253(Ray) 2 "dir"
MemberName 253(Ray) 3 "tmax"
Name 255 "Rays"
MemberName 255(Rays) 0 "rays"
Name 257 ""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
@@ -51,15 +52,15 @@ rayQuery-allOps.comp
Decorate 17 Binding 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) Binding 1
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
MemberDecorate 253(Ray) 0 Offset 0
MemberDecorate 253(Ray) 1 Offset 12
MemberDecorate 253(Ray) 2 Offset 16
MemberDecorate 253(Ray) 3 Offset 28
Decorate 254 ArrayStride 32
MemberDecorate 255(Rays) 0 Offset 0
Decorate 255(Rays) BufferBlock
Decorate 257 DescriptorSet 0
Decorate 257 Binding 2
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@@ -104,11 +105,12 @@ rayQuery-allOps.comp
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
231: 14(int) Constant 256
253(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
254: TypeRuntimeArray 253(Ray)
255(Rays): TypeStruct 254
256: TypePointer Uniform 255(Rays)
257: 256(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
43(ray): 25(ptr) Variable Function
@@ -118,8 +120,8 @@ rayQuery-allOps.comp
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
241(o): 29(ptr) Variable Function
243(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
51: 48 Load 50(rtas)
@@ -375,36 +377,36 @@ rayQuery-allOps.comp
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: 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
232: 66(bool) UGreaterThan 230 231
SelectionMerge 234 None
BranchConditional 232 233 234
233: Label
235: 2 FunctionCall 6(doSomething()
Branch 234
234: Label
236: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
237: 66(bool) FOrdGreaterThan 236 27
SelectionMerge 239 None
BranchConditional 237 238 239
238: Label
240: 2 FunctionCall 6(doSomething()
Branch 239
239: Label
242: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 241(o) 242
244: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 243(d) 244
245: 35(ptr) AccessChain 241(o) 20
246: 8(float) Load 245
247: 35(ptr) AccessChain 243(d) 198
248: 8(float) Load 247
249: 66(bool) FOrdEqual 246 248
SelectionMerge 251 None
BranchConditional 249 250 251
250: Label
252: 2 FunctionCall 6(doSomething()
Branch 251
251: Label
Return
FunctionEnd
6(doSomething(): 2 Function None 3