Commit 7d37a68a by Neslisah Torosdagli

pass-by-reference updates

parent 2df8c712
...@@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang: ...@@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type) spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
{ {
if (type.getBasicType() == glslang::EbtRayQuery) if (type.getBasicType() == glslang::EbtRayQuery)
return spv::StorageClassFunction; return spv::StorageClassWorkgroup;
if (type.getQualifier().isPipeInput()) if (type.getQualifier().isPipeInput())
return spv::StorageClassInput; return spv::StorageClassInput;
if (type.getQualifier().isPipeOutput()) if (type.getQualifier().isPipeOutput())
...@@ -2197,7 +2197,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI ...@@ -2197,7 +2197,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
if (node->getOp() == glslang::EOpAtomicCounterIncrement || if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
node->getOp() == glslang::EOpAtomicCounterDecrement || node->getOp() == glslang::EOpAtomicCounterDecrement ||
node->getOp() == glslang::EOpAtomicCounter || node->getOp() == glslang::EOpAtomicCounter ||
node->getOp() == glslang::EOpInterpolateAtCentroid) { node->getOp() == glslang::EOpInterpolateAtCentroid ||
node->getOp() == glslang::EOpRayQueryProceed ||
node->getOp() == glslang::EOpRayQueryGetRayTMin ||
node->getOp() == glslang::EOpRayQueryGetRayFlags ||
node->getOp() == glslang::EOpRayQueryGetWorldRayOrigin ||
node->getOp() == glslang::EOpRayQueryGetWorldRayDirection ||
node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
node->getOp() == glslang::EOpRayQueryTerminate ||
node->getOp() == glslang::EOpRayQueryConfirmIntersection) {
operand = builder.accessChainGetLValue(); // Special case l-value operands operand = builder.accessChainGetLValue(); // Special case l-value operands
lvalueCoherentFlags = builder.getAccessChain().coherentFlags; lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType()); lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
...@@ -2296,7 +2304,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI ...@@ -2296,7 +2304,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
case glslang::EOpRayQueryConfirmIntersection: case glslang::EOpRayQueryConfirmIntersection:
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand); builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand);
return false; return false;
#endif #endif
default: default:
...@@ -2720,6 +2727,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt ...@@ -2720,6 +2727,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpRayQueryConfirmIntersection: case glslang::EOpRayQueryConfirmIntersection:
builder.addExtension("SPV_KHR_ray_query"); builder.addExtension("SPV_KHR_ray_query");
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR); builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
builder.addExtension("SPV_KHR_variable_pointers");
builder.addCapability(spv::CapabilityVariablePointers);
noReturnValue = true; noReturnValue = true;
break; break;
case glslang::EOpRayQueryProceed: case glslang::EOpRayQueryProceed:
...@@ -2743,6 +2752,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt ...@@ -2743,6 +2752,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpRayQueryGetIntersectionWorldToObject: case glslang::EOpRayQueryGetIntersectionWorldToObject:
builder.addExtension("SPV_KHR_ray_query"); builder.addExtension("SPV_KHR_ray_query");
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR); builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
builder.addExtension("SPV_KHR_variable_pointers");
builder.addCapability(spv::CapabilityVariablePointers);
break; break;
case glslang::EOpCooperativeMatrixLoad: case glslang::EOpCooperativeMatrixLoad:
case glslang::EOpCooperativeMatrixStore: case glslang::EOpCooperativeMatrixStore:
......
rayQuery-array-2d-dynamic.rgen rayQuery-array-2d-dynamic.rgen
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80008 // Generated by (magic number): 80008
// Id's are bound by 128 // Id's are bound by 124
Capability VariablePointers
Capability RayQueryProvisionalKHR Capability RayQueryProvisionalKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
...@@ -37,11 +39,9 @@ rayQuery-array-2d-dynamic.rgen ...@@ -37,11 +39,9 @@ rayQuery-array-2d-dynamic.rgen
MemberName 74(Rays) 0 "rays" MemberName 74(Rays) 0 "rays"
Name 76 "" Name 76 ""
Name 91 "rayQuery" Name 91 "rayQuery"
Name 93 "param" Name 94 "param"
Name 96 "param" Name 118 "C"
Name 120 "C" Name 121 "param"
Name 122 "param"
Name 125 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0 Decorate 50(rtas) DescriptorSet 0
...@@ -60,7 +60,7 @@ rayQuery-array-2d-dynamic.rgen ...@@ -60,7 +60,7 @@ rayQuery-array-2d-dynamic.rgen
6: TypeInt 32 0 6: TypeInt 32 0
7: TypeFunction 6(int) 7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR 10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10 11: TypePointer Workgroup 10
12: TypeFloat 32 12: TypeFloat 32
13: TypeVector 12(float) 3 13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float) 14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...@@ -93,19 +93,17 @@ rayQuery-array-2d-dynamic.rgen ...@@ -93,19 +93,17 @@ rayQuery-array-2d-dynamic.rgen
76: 75(ptr) Variable Uniform 76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray) 78: TypePointer Uniform 72(Ray)
89: TypeArray 10 24 89: TypeArray 10 24
90: TypePointer Function 89 90: TypePointer Workgroup 89
110: 6(int) Constant 32 91(rayQuery): 90(ptr) Variable Workgroup
119: TypePointer Private 53(int) 108: 6(int) Constant 32
120(C): 119(ptr) Variable Private 117: TypePointer Private 53(int)
118(C): 117(ptr) Variable Private
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
69(index): 68(ptr) Variable Function 69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function 71(ray): 15(ptr) Variable Function
91(rayQuery): 90(ptr) Variable Function 94(param): 15(ptr) Variable Function
93(param): 11(ptr) Variable Function 121(param): 15(ptr) Variable Function
96(param): 15(ptr) Variable Function
122(param): 11(ptr) Variable Function
125(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex() 70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70 Store 69(index) 70
77: 6(int) Load 69(index) 77: 6(int) Load 69(index)
...@@ -124,42 +122,38 @@ rayQuery-array-2d-dynamic.rgen ...@@ -124,42 +122,38 @@ rayQuery-array-2d-dynamic.rgen
88: 59(ptr) AccessChain 71(ray) 65 88: 59(ptr) AccessChain 71(ray) 65
Store 88 87 Store 88 87
92: 6(int) Load 69(index) 92: 6(int) Load 69(index)
94: 11(ptr) AccessChain 91(rayQuery) 54 93: 11(ptr) AccessChain 91(rayQuery) 54
95: 10 Load 94 95: 78(ptr) AccessChain 76 54 92
Store 93(param) 95 96: 72(Ray) Load 95
97: 78(ptr) AccessChain 76 54 92 97: 13(fvec3) CompositeExtract 96 0
98: 72(Ray) Load 97 98: 55(ptr) AccessChain 94(param) 54
99: 13(fvec3) CompositeExtract 98 0 Store 98 97
100: 55(ptr) AccessChain 96(param) 54 99: 12(float) CompositeExtract 96 1
100: 59(ptr) AccessChain 94(param) 58
Store 100 99 Store 100 99
101: 12(float) CompositeExtract 98 1 101: 13(fvec3) CompositeExtract 96 2
102: 59(ptr) AccessChain 96(param) 58 102: 55(ptr) AccessChain 94(param) 62
Store 102 101 Store 102 101
103: 13(fvec3) CompositeExtract 98 2 103: 12(float) CompositeExtract 96 3
104: 55(ptr) AccessChain 96(param) 62 104: 59(ptr) AccessChain 94(param) 65
Store 104 103 Store 104 103
105: 12(float) CompositeExtract 98 3 105: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93 94(param)
106: 59(ptr) AccessChain 96(param) 65 106: 11(ptr) AccessChain 91(rayQuery) 58
Store 106 105 107: 48 Load 50(rtas)
107: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93(param) 96(param) 109: 55(ptr) AccessChain 71(ray) 54
108: 11(ptr) AccessChain 91(rayQuery) 58 110: 13(fvec3) Load 109
109: 48 Load 50(rtas) 111: 59(ptr) AccessChain 71(ray) 58
111: 55(ptr) AccessChain 71(ray) 54 112: 12(float) Load 111
112: 13(fvec3) Load 111 113: 55(ptr) AccessChain 71(ray) 62
113: 59(ptr) AccessChain 71(ray) 58 114: 13(fvec3) Load 113
114: 12(float) Load 113 115: 59(ptr) AccessChain 71(ray) 65
115: 55(ptr) AccessChain 71(ray) 62 116: 12(float) Load 115
116: 13(fvec3) Load 115 RayQueryInitializeKHR 106 107 33 108 110 112 114 116
117: 59(ptr) AccessChain 71(ray) 65 119: 53(int) Load 118(C)
118: 12(float) Load 117 120: 11(ptr) AccessChain 91(rayQuery) 119
RayQueryInitializeKHR 108 109 33 110 112 114 116 118 122: 14(Ray) Load 71(ray)
121: 53(int) Load 120(C) Store 121(param) 122
123: 11(ptr) AccessChain 91(rayQuery) 121 123: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 120 121(param)
124: 10 Load 123
Store 122(param) 124
126: 14(Ray) Load 71(ray)
Store 125(param) 126
127: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 122(param) 125(param)
Return Return
FunctionEnd FunctionEnd
8(launchIndex(): 6(int) Function None 7 8(launchIndex(): 6(int) Function None 7
......
...@@ -3,9 +3,11 @@ rayQuery-decls.rgen ...@@ -3,9 +3,11 @@ rayQuery-decls.rgen
// Generated by (magic number): 80008 // Generated by (magic number): 80008
// Id's are bound by 130 // Id's are bound by 130
Capability VariablePointers
Capability RayQueryProvisionalKHR Capability RayQueryProvisionalKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
...@@ -90,29 +92,29 @@ rayQuery-decls.rgen ...@@ -90,29 +92,29 @@ rayQuery-decls.rgen
69: TypeRayQueryProvisionalKHR 69: TypeRayQueryProvisionalKHR
70: 6(int) Constant 4 70: 6(int) Constant 4
71: TypeArray 69 70 71: TypeArray 69 70
72: TypePointer Function 71 72: TypePointer Workgroup 71
73(g_rayQueryArray): 72(ptr) Variable Workgroup
74(block): TypeStruct 6(int) 74(block): TypeStruct 6(int)
75: TypePointer ShaderRecordBufferKHR 74(block) 75: TypePointer ShaderRecordBufferKHR 74(block)
76: 75(ptr) Variable ShaderRecordBufferKHR 76: 75(ptr) Variable ShaderRecordBufferKHR
77: TypePointer ShaderRecordBufferKHR 6(int) 77: TypePointer ShaderRecordBufferKHR 6(int)
80: TypePointer Function 69 80: TypePointer Workgroup 69
81(rayQuery0b): 80(ptr) Variable Workgroup
86(rayQuery0a): 80(ptr) Variable Workgroup
89(rayQuery0c): 80(ptr) Variable Workgroup
94: TypeAccelerationStructureKHR 94: TypeAccelerationStructureKHR
95: TypePointer UniformConstant 94 95: TypePointer UniformConstant 94
96(rtas): 95(ptr) Variable UniformConstant 96(rtas): 95(ptr) Variable UniformConstant
98: 6(int) Constant 16 98: 6(int) Constant 16
107(rayQuery1c): 80(ptr) Variable Workgroup
109: 6(int) Constant 32 109: 6(int) Constant 32
119: 6(int) Constant 3 119: 6(int) Constant 3
120: 6(int) Constant 64 120: 6(int) Constant 64
129(g_rayQueryUnused): 80(ptr) Variable Workgroup
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
38(index): 37(ptr) Variable Function 38(index): 37(ptr) Variable Function
44(ray): 43(ptr) Variable Function 44(ray): 43(ptr) Variable Function
73(g_rayQueryArray): 72(ptr) Variable Function
81(rayQuery0b): 80(ptr) Variable Function
86(rayQuery0a): 80(ptr) Variable Function
89(rayQuery0c): 80(ptr) Variable Function
107(rayQuery1c): 80(ptr) Variable Function
129(g_rayQueryUnused): 80(ptr) Variable Function
39: 6(int) FunctionCall 8(launchIndex() 39: 6(int) FunctionCall 8(launchIndex()
Store 38(index) 39 Store 38(index) 39
52: 6(int) Load 38(index) 52: 6(int) Load 38(index)
......
rayQuery-initialize.rgen rayQuery-initialize.rgen
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80008 // Generated by (magic number): 80008
// Id's are bound by 105 // Id's are bound by 103
Capability VariablePointers
Capability RayQueryProvisionalKHR Capability RayQueryProvisionalKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
...@@ -38,7 +40,6 @@ rayQuery-initialize.rgen ...@@ -38,7 +40,6 @@ rayQuery-initialize.rgen
Name 76 "" Name 76 ""
Name 89 "rayQuery" Name 89 "rayQuery"
Name 90 "param" Name 90 "param"
Name 92 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0 Decorate 50(rtas) DescriptorSet 0
...@@ -57,7 +58,7 @@ rayQuery-initialize.rgen ...@@ -57,7 +58,7 @@ rayQuery-initialize.rgen
6: TypeInt 32 0 6: TypeInt 32 0
7: TypeFunction 6(int) 7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR 10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10 11: TypePointer Workgroup 10
12: TypeFloat 32 12: TypeFloat 32
13: TypeVector 12(float) 3 13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float) 14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...@@ -89,14 +90,13 @@ rayQuery-initialize.rgen ...@@ -89,14 +90,13 @@ rayQuery-initialize.rgen
75: TypePointer Uniform 74(Rays) 75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform 76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray) 78: TypePointer Uniform 72(Ray)
96: 6(int) Constant 32 89(rayQuery): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
69(index): 68(ptr) Variable Function 69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function 71(ray): 15(ptr) Variable Function
89(rayQuery): 11(ptr) Variable Function 90(param): 15(ptr) Variable Function
90(param): 11(ptr) Variable Function
92(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex() 70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70 Store 69(index) 70
77: 6(int) Load 69(index) 77: 6(int) Load 69(index)
...@@ -114,21 +114,19 @@ rayQuery-initialize.rgen ...@@ -114,21 +114,19 @@ rayQuery-initialize.rgen
87: 12(float) CompositeExtract 80 3 87: 12(float) CompositeExtract 80 3
88: 59(ptr) AccessChain 71(ray) 65 88: 59(ptr) AccessChain 71(ray) 65
Store 88 87 Store 88 87
91: 10 Load 89(rayQuery) 91: 14(Ray) Load 71(ray)
Store 90(param) 91 Store 90(param) 91
93: 14(Ray) Load 71(ray) 92: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 89(rayQuery) 90(param)
Store 92(param) 93 93: 48 Load 50(rtas)
94: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 90(param) 92(param) 95: 55(ptr) AccessChain 71(ray) 54
95: 48 Load 50(rtas) 96: 13(fvec3) Load 95
97: 55(ptr) AccessChain 71(ray) 54 97: 59(ptr) AccessChain 71(ray) 58
98: 13(fvec3) Load 97 98: 12(float) Load 97
99: 59(ptr) AccessChain 71(ray) 58 99: 55(ptr) AccessChain 71(ray) 62
100: 12(float) Load 99 100: 13(fvec3) Load 99
101: 55(ptr) AccessChain 71(ray) 62 101: 59(ptr) AccessChain 71(ray) 65
102: 13(fvec3) Load 101 102: 12(float) Load 101
103: 59(ptr) AccessChain 71(ray) 65 RayQueryInitializeKHR 89(rayQuery) 93 33 94 96 98 100 102
104: 12(float) Load 103
RayQueryInitializeKHR 89(rayQuery) 95 33 96 98 100 102 104
Return Return
FunctionEnd FunctionEnd
8(launchIndex(): 6(int) Function None 7 8(launchIndex(): 6(int) Function None 7
......
rayQuery-no-cse.rgen rayQuery-no-cse.rgen
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80008 // Generated by (magic number): 80008
// Id's are bound by 111 // Id's are bound by 107
Capability VariablePointers
Capability RayQueryProvisionalKHR Capability RayQueryProvisionalKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
...@@ -38,10 +40,8 @@ rayQuery-no-cse.rgen ...@@ -38,10 +40,8 @@ rayQuery-no-cse.rgen
Name 76 "" Name 76 ""
Name 89 "rayQuery1" Name 89 "rayQuery1"
Name 90 "param" Name 90 "param"
Name 92 "param" Name 103 "rayQuery2"
Name 105 "rayQuery2" Name 104 "param"
Name 106 "param"
Name 108 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0 Decorate 50(rtas) DescriptorSet 0
...@@ -60,7 +60,7 @@ rayQuery-no-cse.rgen ...@@ -60,7 +60,7 @@ rayQuery-no-cse.rgen
6: TypeInt 32 0 6: TypeInt 32 0
7: TypeFunction 6(int) 7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR 10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10 11: TypePointer Workgroup 10
12: TypeFloat 32 12: TypeFloat 32
13: TypeVector 12(float) 3 13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float) 14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...@@ -92,17 +92,15 @@ rayQuery-no-cse.rgen ...@@ -92,17 +92,15 @@ rayQuery-no-cse.rgen
75: TypePointer Uniform 74(Rays) 75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform 76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray) 78: TypePointer Uniform 72(Ray)
96: 6(int) Constant 32 89(rayQuery1): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
103(rayQuery2): 11(ptr) Variable Workgroup
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
69(index): 68(ptr) Variable Function 69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function 71(ray): 15(ptr) Variable Function
89(rayQuery1): 11(ptr) Variable Function 90(param): 15(ptr) Variable Function
90(param): 11(ptr) Variable Function 104(param): 15(ptr) Variable Function
92(param): 15(ptr) Variable Function
105(rayQuery2): 11(ptr) Variable Function
106(param): 11(ptr) Variable Function
108(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex() 70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70 Store 69(index) 70
77: 6(int) Load 69(index) 77: 6(int) Load 69(index)
...@@ -120,26 +118,22 @@ rayQuery-no-cse.rgen ...@@ -120,26 +118,22 @@ rayQuery-no-cse.rgen
87: 12(float) CompositeExtract 80 3 87: 12(float) CompositeExtract 80 3
88: 59(ptr) AccessChain 71(ray) 65 88: 59(ptr) AccessChain 71(ray) 65
Store 88 87 Store 88 87
91: 10 Load 89(rayQuery1) 91: 14(Ray) Load 71(ray)
Store 90(param) 91 Store 90(param) 91
93: 14(Ray) Load 71(ray) 92: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 89(rayQuery1) 90(param)
Store 92(param) 93 93: 48 Load 50(rtas)
94: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 90(param) 92(param) 95: 55(ptr) AccessChain 71(ray) 54
95: 48 Load 50(rtas) 96: 13(fvec3) Load 95
97: 55(ptr) AccessChain 71(ray) 54 97: 59(ptr) AccessChain 71(ray) 58
98: 13(fvec3) Load 97 98: 12(float) Load 97
99: 59(ptr) AccessChain 71(ray) 58 99: 55(ptr) AccessChain 71(ray) 62
100: 12(float) Load 99 100: 13(fvec3) Load 99
101: 55(ptr) AccessChain 71(ray) 62 101: 59(ptr) AccessChain 71(ray) 65
102: 13(fvec3) Load 101 102: 12(float) Load 101
103: 59(ptr) AccessChain 71(ray) 65 RayQueryInitializeKHR 89(rayQuery1) 93 33 94 96 98 100 102
104: 12(float) Load 103 105: 14(Ray) Load 71(ray)
RayQueryInitializeKHR 89(rayQuery1) 95 33 96 98 100 102 104 Store 104(param) 105
107: 10 Load 105(rayQuery2) 106: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 103(rayQuery2) 104(param)
Store 106(param) 107
109: 14(Ray) Load 71(ray)
Store 108(param) 109
110: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 106(param) 108(param)
Return Return
FunctionEnd FunctionEnd
8(launchIndex(): 6(int) Function None 7 8(launchIndex(): 6(int) Function None 7
......
rayQuery.rgen rayQuery.rgen
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80008 // Generated by (magic number): 80008
// Id's are bound by 46 // Id's are bound by 44
Capability VariablePointers
Capability RayQueryProvisionalKHR Capability RayQueryProvisionalKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
...@@ -38,7 +40,8 @@ rayQuery.rgen ...@@ -38,7 +40,8 @@ rayQuery.rgen
13: 10(float) Constant 0 13: 10(float) Constant 0
15: 10(float) Constant 1148846080 15: 10(float) Constant 1148846080
16: TypeRayQueryProvisionalKHR 16: TypeRayQueryProvisionalKHR
17: TypePointer Function 16 17: TypePointer Workgroup 16
18(localRayQuery): 17(ptr) Variable Workgroup
19: TypeAccelerationStructureKHR 19: TypeAccelerationStructureKHR
20: TypePointer UniformConstant 19 20: TypePointer UniformConstant 19
21(accNV0): 20(ptr) Variable UniformConstant 21(accNV0): 20(ptr) Variable UniformConstant
...@@ -51,13 +54,12 @@ rayQuery.rgen ...@@ -51,13 +54,12 @@ rayQuery.rgen
30: 29(int) Constant 1 30: 29(int) Constant 1
31: TypePointer ShaderRecordBufferKHR 25(fvec3) 31: TypePointer ShaderRecordBufferKHR 25(fvec3)
35: 29(int) Constant 0 35: 29(int) Constant 0
40: TypeBool 39: TypeBool
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(rayFlags): 7(ptr) Variable Function 8(rayFlags): 7(ptr) Variable Function
12(tMin): 11(ptr) Variable Function 12(tMin): 11(ptr) Variable Function
14(tMax): 11(ptr) Variable Function 14(tMax): 11(ptr) Variable Function
18(localRayQuery): 17(ptr) Variable Function
Store 8(rayFlags) 9 Store 8(rayFlags) 9
Store 12(tMin) 13 Store 12(tMin) 13
Store 14(tMax) 15 Store 14(tMax) 15
...@@ -70,15 +72,13 @@ rayQuery.rgen ...@@ -70,15 +72,13 @@ rayQuery.rgen
37: 25(fvec3) Load 36 37: 25(fvec3) Load 36
38: 10(float) Load 14(tMax) 38: 10(float) Load 14(tMax)
RayQueryInitializeKHR 18(localRayQuery) 22 23 24 33 34 37 38 RayQueryInitializeKHR 18(localRayQuery) 22 23 24 33 34 37 38
39: 16 Load 18(localRayQuery) 40: 39(bool) RayQueryProceedKHR 18(localRayQuery)
41: 40(bool) RayQueryProceedKHR 39 41: 39(bool) LogicalNot 40
42: 40(bool) LogicalNot 41 SelectionMerge 43 None
SelectionMerge 44 None BranchConditional 41 42 43
BranchConditional 42 43 44 42: Label
RayQueryTerminateKHR 18(localRayQuery)
Branch 43
43: Label 43: Label
45: 16 Load 18(localRayQuery)
RayQueryTerminateKHR 45
Branch 44
44: Label
Return Return
FunctionEnd FunctionEnd
...@@ -1674,7 +1674,7 @@ public: ...@@ -1674,7 +1674,7 @@ public:
} }
virtual bool isOpaque() const { return basicType == EbtSampler virtual bool isOpaque() const { return basicType == EbtSampler
#ifndef GLSLANG_WEB #ifndef GLSLANG_WEB
|| basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
#endif #endif
; } ; }
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; } virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment