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,7 +1,7 @@
spv.ext.MissShader.rmiss
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 90
// Id's are bound by 94
Capability MinLod
Capability GroupNonUniform
@ -9,15 +9,18 @@ spv.ext.MissShader.rmiss
Capability SubgroupBallotKHR
Capability RayTracingKHR
Capability ShaderSMBuiltinsNV
Capability RayCullMaskKHR
Extension "SPV_KHR_ray_cull_mask"
Extension "SPV_KHR_ray_tracing"
Extension "SPV_KHR_shader_ballot"
Extension "SPV_NV_shader_sm_builtins"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 36 51 53 58 63 74 78 85 89
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 37 41 56 57 62 67 78 82 89 93
Source GLSL 460
SourceExtension "GL_ARB_shader_ballot"
SourceExtension "GL_ARB_sparse_texture_clamp"
SourceExtension "GL_EXT_ray_cull_mask"
SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_KHR_shader_subgroup_ballot"
SourceExtension "GL_KHR_shader_subgroup_basic"
@ -35,37 +38,40 @@ spv.ext.MissShader.rmiss
Name 29 "gl_RayTminEXT"
Name 31 "v5"
Name 32 "gl_RayTmaxEXT"
Name 36 "accEXT"
Name 51 "incomingPayload"
Name 53 "gl_SubGroupSizeARB"
Name 58 "gl_SubgroupEqMask"
Name 63 "gl_WarpIDNV"
Name 70 "texel"
Name 74 "s2D"
Name 78 "c2"
Name 85 "lodClamp"
Name 89 "localPayload"
Name 35 "v6"
Name 37 "gl_CullMaskEXT"
Name 41 "accEXT"
Name 56 "incomingPayload"
Name 57 "gl_SubGroupSizeARB"
Name 62 "gl_SubgroupEqMask"
Name 67 "gl_WarpIDNV"
Name 74 "texel"
Name 78 "s2D"
Name 82 "c2"
Name 89 "lodClamp"
Name 93 "localPayload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
Decorate 24(gl_WorldRayDirectionEXT) BuiltIn WorldRayDirectionKHR
Decorate 29(gl_RayTminEXT) BuiltIn RayTminKHR
Decorate 32(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
Decorate 36(accEXT) DescriptorSet 0
Decorate 36(accEXT) Binding 0
Decorate 53(gl_SubGroupSizeARB) BuiltIn SubgroupSize
Decorate 53(gl_SubGroupSizeARB) Volatile
Decorate 53(gl_SubGroupSizeARB) Coherent
Decorate 58(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR
Decorate 58(gl_SubgroupEqMask) Volatile
Decorate 58(gl_SubgroupEqMask) Coherent
Decorate 63(gl_WarpIDNV) BuiltIn WarpIDNV
Decorate 63(gl_WarpIDNV) Volatile
Decorate 63(gl_WarpIDNV) Coherent
Decorate 74(s2D) DescriptorSet 0
Decorate 74(s2D) Binding 1
Decorate 78(c2) Location 2
Decorate 85(lodClamp) Location 3
Decorate 37(gl_CullMaskEXT) BuiltIn CullMaskKHR
Decorate 41(accEXT) DescriptorSet 0
Decorate 41(accEXT) Binding 0
Decorate 57(gl_SubGroupSizeARB) BuiltIn SubgroupSize
Decorate 57(gl_SubGroupSizeARB) Volatile
Decorate 57(gl_SubGroupSizeARB) Coherent
Decorate 62(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR
Decorate 62(gl_SubgroupEqMask) Volatile
Decorate 62(gl_SubgroupEqMask) Coherent
Decorate 67(gl_WarpIDNV) BuiltIn WarpIDNV
Decorate 67(gl_WarpIDNV) Volatile
Decorate 67(gl_WarpIDNV) Coherent
Decorate 78(s2D) DescriptorSet 0
Decorate 78(s2D) Binding 1
Decorate 82(c2) Location 2
Decorate 89(lodClamp) Location 3
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@ -84,44 +90,46 @@ spv.ext.MissShader.rmiss
28: TypePointer Input 16(float)
29(gl_RayTminEXT): 28(ptr) Variable Input
32(gl_RayTmaxEXT): 28(ptr) Variable Input
34: TypeAccelerationStructureKHR
35: TypePointer UniformConstant 34
36(accEXT): 35(ptr) Variable UniformConstant
38: 6(int) Constant 0
39: 6(int) Constant 1
40: 6(int) Constant 2
41: 6(int) Constant 3
42: 16(float) Constant 1056964608
43: 17(fvec3) ConstantComposite 42 42 42
44: 16(float) Constant 1065353216
45: 17(fvec3) ConstantComposite 44 44 44
46: 16(float) Constant 1061158912
47: TypeInt 32 1
48: 47(int) Constant 1
49: TypeVector 16(float) 4
50: TypePointer IncomingRayPayloadKHR 49(fvec4)
51(incomingPayload): 50(ptr) Variable IncomingRayPayloadKHR
52: TypePointer Input 6(int)
53(gl_SubGroupSizeARB): 52(ptr) Variable Input
56: TypeVector 6(int) 4
57: TypePointer Input 56(ivec4)
58(gl_SubgroupEqMask): 57(ptr) Variable Input
63(gl_WarpIDNV): 52(ptr) Variable Input
67: TypePointer IncomingRayPayloadKHR 16(float)
69: TypePointer Function 49(fvec4)
71: TypeImage 16(float) 2D sampled format:Unknown
72: TypeSampledImage 71
73: TypePointer UniformConstant 72
74(s2D): 73(ptr) Variable UniformConstant
76: TypeVector 16(float) 2
77: TypePointer Input 76(fvec2)
78(c2): 77(ptr) Variable Input
82: TypeVector 47(int) 2
83: 47(int) Constant 5
84: 82(ivec2) ConstantComposite 83 83
85(lodClamp): 28(ptr) Variable Input
88: TypePointer RayPayloadKHR 49(fvec4)
89(localPayload): 88(ptr) Variable RayPayloadKHR
34: TypePointer Function 6(int)
36: TypePointer Input 6(int)
37(gl_CullMaskEXT): 36(ptr) Variable Input
39: TypeAccelerationStructureKHR
40: TypePointer UniformConstant 39
41(accEXT): 40(ptr) Variable UniformConstant
43: 6(int) Constant 0
44: 6(int) Constant 1
45: 6(int) Constant 2
46: 6(int) Constant 3
47: 16(float) Constant 1056964608
48: 17(fvec3) ConstantComposite 47 47 47
49: 16(float) Constant 1065353216
50: 17(fvec3) ConstantComposite 49 49 49
51: 16(float) Constant 1061158912
52: TypeInt 32 1
53: 52(int) Constant 1
54: TypeVector 16(float) 4
55: TypePointer IncomingRayPayloadKHR 54(fvec4)
56(incomingPayload): 55(ptr) Variable IncomingRayPayloadKHR
57(gl_SubGroupSizeARB): 36(ptr) Variable Input
60: TypeVector 6(int) 4
61: TypePointer Input 60(ivec4)
62(gl_SubgroupEqMask): 61(ptr) Variable Input
67(gl_WarpIDNV): 36(ptr) Variable Input
71: TypePointer IncomingRayPayloadKHR 16(float)
73: TypePointer Function 54(fvec4)
75: TypeImage 16(float) 2D sampled format:Unknown
76: TypeSampledImage 75
77: TypePointer UniformConstant 76
78(s2D): 77(ptr) Variable UniformConstant
80: TypeVector 16(float) 2
81: TypePointer Input 80(fvec2)
82(c2): 81(ptr) Variable Input
86: TypeVector 52(int) 2
87: 52(int) Constant 5
88: 86(ivec2) ConstantComposite 87 87
89(lodClamp): 28(ptr) Variable Input
92: TypePointer RayPayloadKHR 54(fvec4)
93(localPayload): 92(ptr) Variable RayPayloadKHR
4(main): 2 Function None 3
5: Label
9(v0): 8(ptr) Variable Function
@ -130,7 +138,8 @@ spv.ext.MissShader.rmiss
23(v3): 18(ptr) Variable Function
27(v4): 26(ptr) Variable Function
31(v5): 26(ptr) Variable Function
70(texel): 69(ptr) Variable Function
35(v6): 34(ptr) Variable Function
74(texel): 73(ptr) Variable Function
12: 7(ivec3) Load 11(gl_LaunchIDEXT)
Store 9(v0) 12
15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
@ -143,25 +152,27 @@ spv.ext.MissShader.rmiss
Store 27(v4) 30
33: 16(float) Load 32(gl_RayTmaxEXT)
Store 31(v5) 33
37: 34 Load 36(accEXT)
TraceRayKHR 37 38 39 40 41 38 43 42 45 46 51(incomingPayload)
54: 6(int) Load 53(gl_SubGroupSizeARB)
55: 16(float) ConvertUToF 54
59: 56(ivec4) Load 58(gl_SubgroupEqMask)
60: 49(fvec4) ConvertUToF 59
61: 16(float) CompositeExtract 60 0
62: 16(float) FAdd 55 61
64: 6(int) Load 63(gl_WarpIDNV)
65: 16(float) ConvertUToF 64
66: 16(float) FAdd 62 65
68: 67(ptr) AccessChain 51(incomingPayload) 38
Store 68 66
75: 72 Load 74(s2D)
79: 76(fvec2) Load 78(c2)
80: 76(fvec2) Load 78(c2)
81: 76(fvec2) Load 78(c2)
86: 16(float) Load 85(lodClamp)
87: 49(fvec4) ImageSampleExplicitLod 75 79 Grad ConstOffset MinLod 80 81 84 86
Store 70(texel) 87
38: 6(int) Load 37(gl_CullMaskEXT)
Store 35(v6) 38
42: 39 Load 41(accEXT)
TraceRayKHR 42 43 44 45 46 43 48 47 50 51 56(incomingPayload)
58: 6(int) Load 57(gl_SubGroupSizeARB)
59: 16(float) ConvertUToF 58
63: 60(ivec4) Load 62(gl_SubgroupEqMask)
64: 54(fvec4) ConvertUToF 63
65: 16(float) CompositeExtract 64 0
66: 16(float) FAdd 59 65
68: 6(int) Load 67(gl_WarpIDNV)
69: 16(float) ConvertUToF 68
70: 16(float) FAdd 66 69
72: 71(ptr) AccessChain 56(incomingPayload) 43
Store 72 70
79: 76 Load 78(s2D)
83: 80(fvec2) Load 82(c2)
84: 80(fvec2) Load 82(c2)
85: 80(fvec2) Load 82(c2)
90: 16(float) Load 89(lodClamp)
91: 54(fvec4) ImageSampleExplicitLod 79 83 Grad ConstOffset MinLod 84 85 88 90
Store 74(texel) 91
Return
FunctionEnd