Adding support for GL_EXT_ray_cull_mask

This commit is contained in:
Marius Bjorge 2022-05-05 12:56:04 +02:00
parent e3bca2add6
commit 3015d00ee0
15 changed files with 231 additions and 156 deletions

View file

@ -1,14 +1,17 @@
spv.ext.ClosestHitShader.rchit
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 101
// Id's are bound by 104
Capability RayTracingKHR
Capability RayCullMaskKHR
Extension "SPV_KHR_ray_cull_mask"
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 85 98 100
EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84 88 101 103
Source GLSL 460
SourceExtension "GL_EXT_ray_cull_mask"
SourceExtension "GL_EXT_ray_tracing"
Name 4 "main"
Name 9 "v0"
@ -47,9 +50,11 @@ spv.ext.ClosestHitShader.rchit
Name 76 "gl_ObjectToWorld3x4EXT"
Name 79 "v17"
Name 80 "gl_WorldToObject3x4EXT"
Name 85 "accEXT"
Name 98 "incomingPayload"
Name 100 "localPayload"
Name 83 "v18"
Name 84 "gl_CullMaskEXT"
Name 88 "accEXT"
Name 101 "incomingPayload"
Name 103 "localPayload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
@ -68,8 +73,9 @@ spv.ext.ClosestHitShader.rchit
Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
Decorate 85(accEXT) DescriptorSet 0
Decorate 85(accEXT) Binding 0
Decorate 84(gl_CullMaskEXT) BuiltIn CullMaskKHR
Decorate 88(accEXT) DescriptorSet 0
Decorate 88(accEXT) Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@ -111,23 +117,24 @@ spv.ext.ClosestHitShader.rchit
74: TypePointer Function 73
76(gl_ObjectToWorld3x4EXT): 63(ptr) Variable Input
80(gl_WorldToObject3x4EXT): 63(ptr) Variable Input
83: TypeAccelerationStructureKHR
84: TypePointer UniformConstant 83
85(accEXT): 84(ptr) Variable UniformConstant
87: 6(int) Constant 0
88: 6(int) Constant 1
89: 6(int) Constant 2
90: 6(int) Constant 3
91: 28(float) Constant 1056964608
92: 29(fvec3) ConstantComposite 91 91 91
93: 28(float) Constant 1065353216
94: 29(fvec3) ConstantComposite 93 93 93
95: 28(float) Constant 1061158912
96: 16(int) Constant 1
97: TypePointer IncomingRayPayloadKHR 72(fvec4)
98(incomingPayload): 97(ptr) Variable IncomingRayPayloadKHR
99: TypePointer RayPayloadKHR 72(fvec4)
100(localPayload): 99(ptr) Variable RayPayloadKHR
84(gl_CullMaskEXT): 57(ptr) Variable Input
86: TypeAccelerationStructureKHR
87: TypePointer UniformConstant 86
88(accEXT): 87(ptr) Variable UniformConstant
90: 6(int) Constant 0
91: 6(int) Constant 1
92: 6(int) Constant 2
93: 6(int) Constant 3
94: 28(float) Constant 1056964608
95: 29(fvec3) ConstantComposite 94 94 94
96: 28(float) Constant 1065353216
97: 29(fvec3) ConstantComposite 96 96 96
98: 28(float) Constant 1061158912
99: 16(int) Constant 1
100: TypePointer IncomingRayPayloadKHR 72(fvec4)
101(incomingPayload): 100(ptr) Variable IncomingRayPayloadKHR
102: TypePointer RayPayloadKHR 72(fvec4)
103(localPayload): 102(ptr) Variable RayPayloadKHR
4(main): 2 Function None 3
5: Label
9(v0): 8(ptr) Variable Function
@ -148,6 +155,7 @@ spv.ext.ClosestHitShader.rchit
69(v15): 17(ptr) Variable Function
75(v16): 74(ptr) Variable Function
79(v17): 74(ptr) Variable Function
83(v18): 55(ptr) Variable Function
12: 7(ivec3) Load 11(gl_LaunchIDEXT)
Store 9(v0) 12
15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
@ -186,7 +194,9 @@ spv.ext.ClosestHitShader.rchit
81: 60 Load 80(gl_WorldToObject3x4EXT)
82: 73 Transpose 81
Store 79(v17) 82
86: 83 Load 85(accEXT)
TraceRayKHR 86 87 88 89 90 87 92 91 94 95 98(incomingPayload)
85: 6(int) Load 84(gl_CullMaskEXT)
Store 83(v18) 85
89: 86 Load 88(accEXT)
TraceRayKHR 89 90 91 92 93 90 95 94 97 98 101(incomingPayload)
Return
FunctionEnd