Avoid duplicate BuiltIn variables for ray tracing matrices (fix #2921)

Fixes an issue where invalid SPIR-V was generated when
gl_ObjectToWorldEXT and gl_ObjectToWorld3x4EXT, or
gl_WorldToObjectEXT and gl_WorldToObject3x4EXT, were used in the same
shader. The SPIR-V specification requires that there be at most one
OpVariable decorated with a given BuiltIn value.
This commit is contained in:
Andrea Faulds 2022-06-01 10:43:13 +02:00
parent 316f12ac1d
commit 6cdae46314
4 changed files with 142 additions and 134 deletions

View File

@ -260,6 +260,7 @@ protected:
std::unordered_map<std::string, spv::Id> extBuiltinMap; std::unordered_map<std::string, spv::Id> extBuiltinMap;
std::unordered_map<long long, spv::Id> symbolValues; std::unordered_map<long long, spv::Id> symbolValues;
std::unordered_map<uint32_t, spv::Id> builtInVariableIds;
std::unordered_set<long long> rValueParameters; // set of formal function parameters passed as rValues, std::unordered_set<long long> rValueParameters; // set of formal function parameters passed as rValues,
// rather than a pointer // rather than a pointer
std::unordered_map<std::string, spv::Function*> functionMap; std::unordered_map<std::string, spv::Function*> functionMap;
@ -8750,7 +8751,32 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
// it was not found, create it // it was not found, create it
spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false); spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
auto forcedType = getForcedType(symbol->getQualifier().builtIn, symbol->getType()); auto forcedType = getForcedType(symbol->getQualifier().builtIn, symbol->getType());
// There are pairs of symbols that map to the same SPIR-V built-in:
// gl_ObjectToWorldEXT and gl_ObjectToWorld3x4EXT, and gl_WorldToObjectEXT
// and gl_WorldToObject3x4EXT. SPIR-V forbids having two OpVariables
// with the same BuiltIn in the same storage class, so we must re-use one.
const bool mayNeedToReuseBuiltIn =
builtIn == spv::BuiltInObjectToWorldKHR ||
builtIn == spv::BuiltInWorldToObjectKHR;
if (mayNeedToReuseBuiltIn) {
auto iter = builtInVariableIds.find(uint32_t(builtIn));
if (builtInVariableIds.end() != iter) {
id = iter->second;
symbolValues[symbol->getId()] = id;
if (forcedType.second != spv::NoType)
forceType[id] = forcedType.second;
return id;
}
}
id = createSpvVariable(symbol, forcedType.first); id = createSpvVariable(symbol, forcedType.first);
if (mayNeedToReuseBuiltIn) {
builtInVariableIds.insert({uint32_t(builtIn), id});
}
symbolValues[symbol->getId()] = id; symbolValues[symbol->getId()] = id;
if (forcedType.second != spv::NoType) if (forcedType.second != spv::NoType)
forceType[id] = forcedType.second; forceType[id] = forcedType.second;

View File

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

View File

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

View File

@ -1,7 +1,7 @@
spv.ext.IntersectShader.rint spv.ext.IntersectShader.rint
// Module Version 10400 // Module Version 10400
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 86 // Id's are bound by 84
Capability RayTracingKHR Capability RayTracingKHR
Capability RayCullMaskKHR Capability RayCullMaskKHR
@ -9,7 +9,7 @@ spv.ext.IntersectShader.rint
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint IntersectionKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 56 59 65 69 75 78 EntryPoint IntersectionKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 56 59 73 76
Source GLSL 460 Source GLSL 460
SourceExtension "GL_EXT_ray_cull_mask" SourceExtension "GL_EXT_ray_cull_mask"
SourceExtension "GL_EXT_ray_tracing" SourceExtension "GL_EXT_ray_tracing"
@ -41,12 +41,10 @@ spv.ext.IntersectShader.rint
Name 58 "v12" Name 58 "v12"
Name 59 "gl_WorldToObjectEXT" Name 59 "gl_WorldToObjectEXT"
Name 64 "v13" Name 64 "v13"
Name 65 "gl_ObjectToWorld3x4EXT" Name 67 "v14"
Name 68 "v14" Name 71 "v15"
Name 69 "gl_WorldToObject3x4EXT" Name 73 "gl_CullMaskEXT"
Name 73 "v15" Name 76 "iAttr"
Name 75 "gl_CullMaskEXT"
Name 78 "iAttr"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
@ -62,9 +60,7 @@ spv.ext.IntersectShader.rint
Decorate 50(gl_RayTmaxEXT) Coherent Decorate 50(gl_RayTmaxEXT) Coherent
Decorate 56(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR Decorate 56(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
Decorate 59(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 59(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
Decorate 65(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR Decorate 73(gl_CullMaskEXT) BuiltIn CullMaskKHR
Decorate 69(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
Decorate 75(gl_CullMaskEXT) BuiltIn CullMaskKHR
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -99,19 +95,17 @@ spv.ext.IntersectShader.rint
61: TypeVector 28(float) 4 61: TypeVector 28(float) 4
62: TypeMatrix 61(fvec4) 3 62: TypeMatrix 61(fvec4) 3
63: TypePointer Function 62 63: TypePointer Function 62
65(gl_ObjectToWorld3x4EXT): 55(ptr) Variable Input 70: TypePointer Function 6(int)
69(gl_WorldToObject3x4EXT): 55(ptr) Variable Input 72: TypePointer Input 6(int)
72: TypePointer Function 6(int) 73(gl_CullMaskEXT): 72(ptr) Variable Input
74: TypePointer Input 6(int) 75: TypePointer HitAttributeKHR 61(fvec4)
75(gl_CullMaskEXT): 74(ptr) Variable Input 76(iAttr): 75(ptr) Variable HitAttributeKHR
77: TypePointer HitAttributeKHR 61(fvec4) 77: 28(float) Constant 1056964608
78(iAttr): 77(ptr) Variable HitAttributeKHR 78: 28(float) Constant 0
79: 28(float) Constant 1056964608 79: 28(float) Constant 1065353216
80: 28(float) Constant 0 80: 61(fvec4) ConstantComposite 77 77 78 79
81: 28(float) Constant 1065353216 81: 6(int) Constant 1
82: 61(fvec4) ConstantComposite 79 79 80 81 82: TypeBool
83: 6(int) Constant 1
84: TypeBool
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(v0): 8(ptr) Variable Function 9(v0): 8(ptr) Variable Function
@ -128,8 +122,8 @@ spv.ext.IntersectShader.rint
54(v11): 53(ptr) Variable Function 54(v11): 53(ptr) Variable Function
58(v12): 53(ptr) Variable Function 58(v12): 53(ptr) Variable Function
64(v13): 63(ptr) Variable Function 64(v13): 63(ptr) Variable Function
68(v14): 63(ptr) Variable Function 67(v14): 63(ptr) Variable Function
73(v15): 72(ptr) Variable Function 71(v15): 70(ptr) Variable Function
12: 7(ivec3) Load 11(gl_LaunchIDEXT) 12: 7(ivec3) Load 11(gl_LaunchIDEXT)
Store 9(v0) 12 Store 9(v0) 12
15: 7(ivec3) Load 14(gl_LaunchSizeEXT) 15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
@ -156,15 +150,15 @@ spv.ext.IntersectShader.rint
Store 54(v11) 57 Store 54(v11) 57
60: 52 Load 59(gl_WorldToObjectEXT) 60: 52 Load 59(gl_WorldToObjectEXT)
Store 58(v12) 60 Store 58(v12) 60
66: 52 Load 65(gl_ObjectToWorld3x4EXT) 65: 52 Load 56(gl_ObjectToWorldEXT)
67: 62 Transpose 66 66: 62 Transpose 65
Store 64(v13) 67 Store 64(v13) 66
70: 52 Load 69(gl_WorldToObject3x4EXT) 68: 52 Load 59(gl_WorldToObjectEXT)
71: 62 Transpose 70 69: 62 Transpose 68
Store 68(v14) 71 Store 67(v14) 69
76: 6(int) Load 75(gl_CullMaskEXT) 74: 6(int) Load 73(gl_CullMaskEXT)
Store 73(v15) 76 Store 71(v15) 74
Store 78(iAttr) 82 Store 76(iAttr) 80
85: 84(bool) ReportIntersectionKHR 79 83 83: 82(bool) ReportIntersectionKHR 77 81
Return Return
FunctionEnd FunctionEnd