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,15 +1,18 @@
spv.ext.AnyHitShader.rahit
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 107
// Id's are bound by 110
Capability GroupNonUniform
Capability RayTracingKHR
Capability RayCullMaskKHR
Extension "SPV_KHR_ray_cull_mask"
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84 98
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84 87 101
Source GLSL 460
SourceExtension "GL_EXT_ray_cull_mask"
SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_KHR_shader_subgroup_basic"
Name 4 "main"
@@ -49,8 +52,10 @@ spv.ext.AnyHitShader.rahit
Name 76 "gl_ObjectToWorld3x4EXT"
Name 79 "v17"
Name 80 "gl_WorldToObject3x4EXT"
Name 84 "incomingPayload"
Name 98 "gl_SubgroupSize"
Name 83 "v18"
Name 84 "gl_CullMaskEXT"
Name 87 "incomingPayload"
Name 101 "gl_SubgroupSize"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
@@ -69,10 +74,11 @@ spv.ext.AnyHitShader.rahit
Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
Decorate 98(gl_SubgroupSize) RelaxedPrecision
Decorate 98(gl_SubgroupSize) BuiltIn SubgroupSize
Decorate 99 RelaxedPrecision
Decorate 100 RelaxedPrecision
Decorate 84(gl_CullMaskEXT) BuiltIn CullMaskKHR
Decorate 101(gl_SubgroupSize) RelaxedPrecision
Decorate 101(gl_SubgroupSize) BuiltIn SubgroupSize
Decorate 102 RelaxedPrecision
Decorate 103 RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -114,15 +120,16 @@ spv.ext.AnyHitShader.rahit
74: TypePointer Function 73
76(gl_ObjectToWorld3x4EXT): 63(ptr) Variable Input
80(gl_WorldToObject3x4EXT): 63(ptr) Variable Input
83: TypePointer IncomingRayPayloadKHR 72(fvec4)
84(incomingPayload): 83(ptr) Variable IncomingRayPayloadKHR
85: 28(float) Constant 1056964608
86: 72(fvec4) ConstantComposite 85 85 85 85
88: 16(int) Constant 1
89: TypeBool
94: 6(int) Constant 0
98(gl_SubgroupSize): 57(ptr) Variable Input
101: TypePointer IncomingRayPayloadKHR 28(float)
84(gl_CullMaskEXT): 57(ptr) Variable Input
86: TypePointer IncomingRayPayloadKHR 72(fvec4)
87(incomingPayload): 86(ptr) Variable IncomingRayPayloadKHR
88: 28(float) Constant 1056964608
89: 72(fvec4) ConstantComposite 88 88 88 88
91: 16(int) Constant 1
92: TypeBool
97: 6(int) Constant 0
101(gl_SubgroupSize): 57(ptr) Variable Input
104: TypePointer IncomingRayPayloadKHR 28(float)
4(main): 2 Function None 3
5: Label
9(v0): 8(ptr) Variable Function
@@ -143,6 +150,7 @@ spv.ext.AnyHitShader.rahit
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)
@@ -181,20 +189,22 @@ spv.ext.AnyHitShader.rahit
81: 60 Load 80(gl_WorldToObject3x4EXT)
82: 73 Transpose 81
Store 79(v17) 82
Store 84(incomingPayload) 86
87: 16(int) Load 18(v2)
90: 89(bool) IEqual 87 88
SelectionMerge 92 None
BranchConditional 90 91 92
91: Label
85: 6(int) Load 84(gl_CullMaskEXT)
Store 83(v18) 85
Store 87(incomingPayload) 89
90: 16(int) Load 18(v2)
93: 92(bool) IEqual 90 91
SelectionMerge 95 None
BranchConditional 93 94 95
94: Label
IgnoreIntersectionKHR
92: Label
99: 6(int) Load 98(gl_SubgroupSize)
100: 28(float) ConvertUToF 99
102: 101(ptr) AccessChain 84(incomingPayload) 94
103: 28(float) Load 102
104: 28(float) FAdd 103 100
105: 101(ptr) AccessChain 84(incomingPayload) 94
Store 105 104
95: Label
102: 6(int) Load 101(gl_SubgroupSize)
103: 28(float) ConvertUToF 102
105: 104(ptr) AccessChain 87(incomingPayload) 97
106: 28(float) Load 105
107: 28(float) FAdd 106 103
108: 104(ptr) AccessChain 87(incomingPayload) 97
Store 108 107
TerminateRayKHR
FunctionEnd