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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 126 additions and 106 deletions

View file

@ -1,14 +1,16 @@
spv.ext.RayGenShader.rgen
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 57
// Id's are bound by 58
Capability RayTraversalPrimitiveCullingProvisionalKHR
Capability RayTracingProvisionalKHR
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main" 11 21
Source GLSL 460
SourceExtension "GL_EXT_ray_flags_primitive_culling"
SourceExtension "GL_EXT_ray_tracing"
Name 4 "main"
Name 8 "lx"
@ -18,25 +20,25 @@ spv.ext.RayGenShader.rgen
Name 21 "gl_LaunchSizeEXT"
Name 24 "sy"
Name 29 "accEXT0"
Name 37 "block"
MemberName 37(block) 0 "dir"
MemberName 37(block) 1 "origin"
Name 39 ""
Name 50 "accEXT1"
Name 53 "imageu"
Name 56 "payload"
Name 38 "block"
MemberName 38(block) 0 "dir"
MemberName 38(block) 1 "origin"
Name 40 ""
Name 51 "accEXT1"
Name 54 "imageu"
Name 57 "payload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 29(accEXT0) DescriptorSet 0
Decorate 29(accEXT0) Binding 0
MemberDecorate 37(block) 0 Offset 0
MemberDecorate 37(block) 1 Offset 16
Decorate 37(block) BufferBlock
Decorate 50(accEXT1) DescriptorSet 0
Decorate 50(accEXT1) Binding 1
Decorate 53(imageu) DescriptorSet 0
Decorate 53(imageu) Binding 2
Decorate 56(payload) Location 0
MemberDecorate 38(block) 0 Offset 0
MemberDecorate 38(block) 1 Offset 16
Decorate 38(block) BufferBlock
Decorate 51(accEXT1) DescriptorSet 0
Decorate 51(accEXT1) Binding 1
Decorate 54(imageu) DescriptorSet 0
Decorate 54(imageu) Binding 2
Decorate 57(payload) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@ -51,24 +53,25 @@ spv.ext.RayGenShader.rgen
27: TypeAccelerationStructureKHR
28: TypePointer UniformConstant 27
29(accEXT0): 28(ptr) Variable UniformConstant
35: TypeFloat 32
36: TypeVector 35(float) 3
37(block): TypeStruct 36(fvec3) 36(fvec3)
38: TypePointer ShaderRecordBufferKHR 37(block)
39: 38(ptr) Variable ShaderRecordBufferKHR
40: TypeInt 32 1
41: 40(int) Constant 1
42: TypePointer ShaderRecordBufferKHR 36(fvec3)
45: 35(float) Constant 1056964608
46: 40(int) Constant 0
49: 35(float) Constant 1061158912
50(accEXT1): 28(ptr) Variable UniformConstant
51: TypeImage 6(int) 2D nonsampled format:R32ui
52: TypePointer UniformConstant 51
53(imageu): 52(ptr) Variable UniformConstant
54: TypeVector 35(float) 4
55: TypePointer RayPayloadKHR 54(fvec4)
56(payload): 55(ptr) Variable RayPayloadKHR
35: 6(int) Constant 768
36: TypeFloat 32
37: TypeVector 36(float) 3
38(block): TypeStruct 37(fvec3) 37(fvec3)
39: TypePointer ShaderRecordBufferKHR 38(block)
40: 39(ptr) Variable ShaderRecordBufferKHR
41: TypeInt 32 1
42: 41(int) Constant 1
43: TypePointer ShaderRecordBufferKHR 37(fvec3)
46: 36(float) Constant 1056964608
47: 41(int) Constant 0
50: 36(float) Constant 1061158912
51(accEXT1): 28(ptr) Variable UniformConstant
52: TypeImage 6(int) 2D nonsampled format:R32ui
53: TypePointer UniformConstant 52
54(imageu): 53(ptr) Variable UniformConstant
55: TypeVector 36(float) 4
56: TypePointer RayPayloadKHR 55(fvec4)
57(payload): 56(ptr) Variable RayPayloadKHR
4(main): 2 Function None 3
5: Label
8(lx): 7(ptr) Variable Function
@ -92,10 +95,10 @@ spv.ext.RayGenShader.rgen
32: 6(int) Load 16(ly)
33: 6(int) Load 20(sx)
34: 6(int) Load 24(sy)
43: 42(ptr) AccessChain 39 41
44: 36(fvec3) Load 43
47: 42(ptr) AccessChain 39 46
48: 36(fvec3) Load 47
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41
44: 43(ptr) AccessChain 40 42
45: 37(fvec3) Load 44
48: 43(ptr) AccessChain 40 47
49: 37(fvec3) Load 48
TraceRayKHR 30 31 32 33 34 35 45 46 49 50 42
Return
FunctionEnd