pass by reference updates
This commit is contained in:
parent
b366a703a5
commit
054b5e35eb
@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
|
||||
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
||||
{
|
||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||
return spv::StorageClassWorkgroup;
|
||||
return spv::StorageClassFunction;
|
||||
if (type.getQualifier().isPipeInput())
|
||||
return spv::StorageClassInput;
|
||||
if (type.getQualifier().isPipeOutput())
|
||||
@ -2727,8 +2727,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
builder.addExtension("SPV_KHR_ray_query");
|
||||
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
|
||||
builder.addExtension("SPV_KHR_variable_pointers");
|
||||
builder.addCapability(spv::CapabilityVariablePointers);
|
||||
noReturnValue = true;
|
||||
break;
|
||||
case glslang::EOpRayQueryProceed:
|
||||
@ -2752,8 +2750,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
case glslang::EOpRayQueryGetIntersectionWorldToObject:
|
||||
builder.addExtension("SPV_KHR_ray_query");
|
||||
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
|
||||
builder.addExtension("SPV_KHR_variable_pointers");
|
||||
builder.addCapability(spv::CapabilityVariablePointers);
|
||||
break;
|
||||
case glslang::EOpCooperativeMatrixLoad:
|
||||
case glslang::EOpCooperativeMatrixStore:
|
||||
|
@ -4,10 +4,8 @@ rayQuery-allOps.comp
|
||||
// Id's are bound by 257
|
||||
|
||||
Capability Shader
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main"
|
||||
@ -88,8 +86,7 @@ rayQuery-allOps.comp
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
46: TypePointer Workgroup 45
|
||||
47(rayQuery): 46(ptr) Variable Workgroup
|
||||
46: TypePointer Function 45
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
@ -115,6 +112,7 @@ rayQuery-allOps.comp
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
43(ray): 25(ptr) Variable Function
|
||||
47(rayQuery): 46(ptr) Variable Function
|
||||
69(candidateType): 68(ptr) Variable Function
|
||||
78(_mat4x3): 77(ptr) Variable Function
|
||||
83(_mat3x4): 82(ptr) Variable Function
|
||||
|
@ -4,10 +4,8 @@ rayQuery-allOps.frag
|
||||
// Id's are bound by 257
|
||||
|
||||
Capability Shader
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
@ -88,8 +86,7 @@ rayQuery-allOps.frag
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
46: TypePointer Workgroup 45
|
||||
47(rayQuery): 46(ptr) Variable Workgroup
|
||||
46: TypePointer Function 45
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
@ -115,6 +112,7 @@ rayQuery-allOps.frag
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
43(ray): 25(ptr) Variable Function
|
||||
47(rayQuery): 46(ptr) Variable Function
|
||||
69(candidateType): 68(ptr) Variable Function
|
||||
78(_mat4x3): 77(ptr) Variable Function
|
||||
83(_mat3x4): 82(ptr) Variable Function
|
||||
|
@ -3,11 +3,9 @@ rayQuery-allOps.rgen
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 257
|
||||
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
@ -88,8 +86,7 @@ rayQuery-allOps.rgen
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
46: TypePointer Workgroup 45
|
||||
47(rayQuery): 46(ptr) Variable Workgroup
|
||||
46: TypePointer Function 45
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
@ -115,6 +112,7 @@ rayQuery-allOps.rgen
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
43(ray): 25(ptr) Variable Function
|
||||
47(rayQuery): 46(ptr) Variable Function
|
||||
69(candidateType): 68(ptr) Variable Function
|
||||
78(_mat4x3): 77(ptr) Variable Function
|
||||
83(_mat3x4): 82(ptr) Variable Function
|
||||
|
@ -1,195 +0,0 @@
|
||||
rayQuery-array-2d-dynamic.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 124
|
||||
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 23 28
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "launchIndex("
|
||||
Name 14 "Ray"
|
||||
MemberName 14(Ray) 0 "pos"
|
||||
MemberName 14(Ray) 1 "tmin"
|
||||
MemberName 14(Ray) 2 "dir"
|
||||
MemberName 14(Ray) 3 "tmax"
|
||||
Name 19 "doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;"
|
||||
Name 17 "rayQuery"
|
||||
Name 18 "ray"
|
||||
Name 23 "gl_LaunchIDNV"
|
||||
Name 28 "gl_LaunchSizeNV"
|
||||
Name 50 "rtas"
|
||||
Name 69 "index"
|
||||
Name 71 "ray"
|
||||
Name 72 "Ray"
|
||||
MemberName 72(Ray) 0 "pos"
|
||||
MemberName 72(Ray) 1 "tmin"
|
||||
MemberName 72(Ray) 2 "dir"
|
||||
MemberName 72(Ray) 3 "tmax"
|
||||
Name 74 "Rays"
|
||||
MemberName 74(Rays) 0 "rays"
|
||||
Name 76 ""
|
||||
Name 91 "rayQuery"
|
||||
Name 94 "param"
|
||||
Name 118 "C"
|
||||
Name 121 "param"
|
||||
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 50(rtas) DescriptorSet 0
|
||||
Decorate 50(rtas) Binding 0
|
||||
MemberDecorate 72(Ray) 0 Offset 0
|
||||
MemberDecorate 72(Ray) 1 Offset 12
|
||||
MemberDecorate 72(Ray) 2 Offset 16
|
||||
MemberDecorate 72(Ray) 3 Offset 28
|
||||
Decorate 73 ArrayStride 32
|
||||
MemberDecorate 74(Rays) 0 Offset 0
|
||||
Decorate 74(Rays) BufferBlock
|
||||
Decorate 76 DescriptorSet 0
|
||||
Decorate 76 Binding 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
11: TypePointer Workgroup 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
15: TypePointer Function 14(Ray)
|
||||
16: TypeFunction 2 11(ptr) 15(ptr)
|
||||
21: TypeVector 6(int) 3
|
||||
22: TypePointer Input 21(ivec3)
|
||||
23(gl_LaunchIDNV): 22(ptr) Variable Input
|
||||
24: 6(int) Constant 2
|
||||
25: TypePointer Input 6(int)
|
||||
28(gl_LaunchSizeNV): 22(ptr) Variable Input
|
||||
29: 6(int) Constant 0
|
||||
33: 6(int) Constant 1
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
52: 6(int) Constant 16
|
||||
53: TypeInt 32 1
|
||||
54: 53(int) Constant 0
|
||||
55: TypePointer Function 13(fvec3)
|
||||
58: 53(int) Constant 1
|
||||
59: TypePointer Function 12(float)
|
||||
62: 53(int) Constant 2
|
||||
65: 53(int) Constant 3
|
||||
68: TypePointer Function 6(int)
|
||||
72(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
73: TypeRuntimeArray 72(Ray)
|
||||
74(Rays): TypeStruct 73
|
||||
75: TypePointer Uniform 74(Rays)
|
||||
76: 75(ptr) Variable Uniform
|
||||
78: TypePointer Uniform 72(Ray)
|
||||
89: TypeArray 10 24
|
||||
90: TypePointer Workgroup 89
|
||||
91(rayQuery): 90(ptr) Variable Workgroup
|
||||
108: 6(int) Constant 32
|
||||
117: TypePointer Private 53(int)
|
||||
118(C): 117(ptr) Variable Private
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
69(index): 68(ptr) Variable Function
|
||||
71(ray): 15(ptr) Variable Function
|
||||
94(param): 15(ptr) Variable Function
|
||||
121(param): 15(ptr) Variable Function
|
||||
70: 6(int) FunctionCall 8(launchIndex()
|
||||
Store 69(index) 70
|
||||
77: 6(int) Load 69(index)
|
||||
79: 78(ptr) AccessChain 76 54 77
|
||||
80: 72(Ray) Load 79
|
||||
81: 13(fvec3) CompositeExtract 80 0
|
||||
82: 55(ptr) AccessChain 71(ray) 54
|
||||
Store 82 81
|
||||
83: 12(float) CompositeExtract 80 1
|
||||
84: 59(ptr) AccessChain 71(ray) 58
|
||||
Store 84 83
|
||||
85: 13(fvec3) CompositeExtract 80 2
|
||||
86: 55(ptr) AccessChain 71(ray) 62
|
||||
Store 86 85
|
||||
87: 12(float) CompositeExtract 80 3
|
||||
88: 59(ptr) AccessChain 71(ray) 65
|
||||
Store 88 87
|
||||
92: 6(int) Load 69(index)
|
||||
93: 11(ptr) AccessChain 91(rayQuery) 54
|
||||
95: 78(ptr) AccessChain 76 54 92
|
||||
96: 72(Ray) Load 95
|
||||
97: 13(fvec3) CompositeExtract 96 0
|
||||
98: 55(ptr) AccessChain 94(param) 54
|
||||
Store 98 97
|
||||
99: 12(float) CompositeExtract 96 1
|
||||
100: 59(ptr) AccessChain 94(param) 58
|
||||
Store 100 99
|
||||
101: 13(fvec3) CompositeExtract 96 2
|
||||
102: 55(ptr) AccessChain 94(param) 62
|
||||
Store 102 101
|
||||
103: 12(float) CompositeExtract 96 3
|
||||
104: 59(ptr) AccessChain 94(param) 65
|
||||
Store 104 103
|
||||
105: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93 94(param)
|
||||
106: 11(ptr) AccessChain 91(rayQuery) 58
|
||||
107: 48 Load 50(rtas)
|
||||
109: 55(ptr) AccessChain 71(ray) 54
|
||||
110: 13(fvec3) Load 109
|
||||
111: 59(ptr) AccessChain 71(ray) 58
|
||||
112: 12(float) Load 111
|
||||
113: 55(ptr) AccessChain 71(ray) 62
|
||||
114: 13(fvec3) Load 113
|
||||
115: 59(ptr) AccessChain 71(ray) 65
|
||||
116: 12(float) Load 115
|
||||
RayQueryInitializeKHR 106 107 33 108 110 112 114 116
|
||||
119: 53(int) Load 118(C)
|
||||
120: 11(ptr) AccessChain 91(rayQuery) 119
|
||||
122: 14(Ray) Load 71(ray)
|
||||
Store 121(param) 122
|
||||
123: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 120 121(param)
|
||||
Return
|
||||
FunctionEnd
|
||||
8(launchIndex(): 6(int) Function None 7
|
||||
9: Label
|
||||
26: 25(ptr) AccessChain 23(gl_LaunchIDNV) 24
|
||||
27: 6(int) Load 26
|
||||
30: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
31: 6(int) Load 30
|
||||
32: 6(int) IMul 27 31
|
||||
34: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 33
|
||||
35: 6(int) Load 34
|
||||
36: 6(int) IMul 32 35
|
||||
37: 25(ptr) AccessChain 23(gl_LaunchIDNV) 33
|
||||
38: 6(int) Load 37
|
||||
39: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
40: 6(int) Load 39
|
||||
41: 6(int) IMul 38 40
|
||||
42: 6(int) IAdd 36 41
|
||||
43: 25(ptr) AccessChain 23(gl_LaunchIDNV) 29
|
||||
44: 6(int) Load 43
|
||||
45: 6(int) IAdd 42 44
|
||||
ReturnValue 45
|
||||
FunctionEnd
|
||||
19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;): 2 Function None 16
|
||||
17(rayQuery): 11(ptr) FunctionParameter
|
||||
18(ray): 15(ptr) FunctionParameter
|
||||
20: Label
|
||||
51: 48 Load 50(rtas)
|
||||
56: 55(ptr) AccessChain 18(ray) 54
|
||||
57: 13(fvec3) Load 56
|
||||
60: 59(ptr) AccessChain 18(ray) 58
|
||||
61: 12(float) Load 60
|
||||
63: 55(ptr) AccessChain 18(ray) 62
|
||||
64: 13(fvec3) Load 63
|
||||
66: 59(ptr) AccessChain 18(ray) 65
|
||||
67: 12(float) Load 66
|
||||
RayQueryInitializeKHR 17(rayQuery) 51 29 52 57 61 64 67
|
||||
Return
|
||||
FunctionEnd
|
@ -3,11 +3,9 @@ rayQuery-decls.rgen
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 130
|
||||
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
@ -92,29 +90,29 @@ rayQuery-decls.rgen
|
||||
69: TypeRayQueryProvisionalKHR
|
||||
70: 6(int) Constant 4
|
||||
71: TypeArray 69 70
|
||||
72: TypePointer Workgroup 71
|
||||
73(g_rayQueryArray): 72(ptr) Variable Workgroup
|
||||
72: TypePointer Function 71
|
||||
74(block): TypeStruct 6(int)
|
||||
75: TypePointer ShaderRecordBufferKHR 74(block)
|
||||
76: 75(ptr) Variable ShaderRecordBufferKHR
|
||||
77: TypePointer ShaderRecordBufferKHR 6(int)
|
||||
80: TypePointer Workgroup 69
|
||||
81(rayQuery0b): 80(ptr) Variable Workgroup
|
||||
86(rayQuery0a): 80(ptr) Variable Workgroup
|
||||
89(rayQuery0c): 80(ptr) Variable Workgroup
|
||||
80: TypePointer Function 69
|
||||
94: TypeAccelerationStructureKHR
|
||||
95: TypePointer UniformConstant 94
|
||||
96(rtas): 95(ptr) Variable UniformConstant
|
||||
98: 6(int) Constant 16
|
||||
107(rayQuery1c): 80(ptr) Variable Workgroup
|
||||
109: 6(int) Constant 32
|
||||
119: 6(int) Constant 3
|
||||
120: 6(int) Constant 64
|
||||
129(g_rayQueryUnused): 80(ptr) Variable Workgroup
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
38(index): 37(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()
|
||||
Store 38(index) 39
|
||||
52: 6(int) Load 38(index)
|
||||
|
@ -3,11 +3,9 @@ rayQuery-initialize.rgen
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 103
|
||||
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
@ -58,7 +56,7 @@ rayQuery-initialize.rgen
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
11: TypePointer Workgroup 10
|
||||
11: TypePointer Function 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
@ -90,12 +88,12 @@ rayQuery-initialize.rgen
|
||||
75: TypePointer Uniform 74(Rays)
|
||||
76: 75(ptr) Variable Uniform
|
||||
78: TypePointer Uniform 72(Ray)
|
||||
89(rayQuery): 11(ptr) Variable Workgroup
|
||||
94: 6(int) Constant 32
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
69(index): 68(ptr) Variable Function
|
||||
71(ray): 15(ptr) Variable Function
|
||||
89(rayQuery): 11(ptr) Variable Function
|
||||
90(param): 15(ptr) Variable Function
|
||||
70: 6(int) FunctionCall 8(launchIndex()
|
||||
Store 69(index) 70
|
||||
|
@ -3,11 +3,9 @@ rayQuery-no-cse.rgen
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 107
|
||||
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
@ -60,7 +58,7 @@ rayQuery-no-cse.rgen
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
11: TypePointer Workgroup 10
|
||||
11: TypePointer Function 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
@ -92,14 +90,14 @@ rayQuery-no-cse.rgen
|
||||
75: TypePointer Uniform 74(Rays)
|
||||
76: 75(ptr) Variable Uniform
|
||||
78: TypePointer Uniform 72(Ray)
|
||||
89(rayQuery1): 11(ptr) Variable Workgroup
|
||||
94: 6(int) Constant 32
|
||||
103(rayQuery2): 11(ptr) Variable Workgroup
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
69(index): 68(ptr) Variable Function
|
||||
71(ray): 15(ptr) Variable Function
|
||||
89(rayQuery1): 11(ptr) Variable Function
|
||||
90(param): 15(ptr) Variable Function
|
||||
103(rayQuery2): 11(ptr) Variable Function
|
||||
104(param): 15(ptr) Variable Function
|
||||
70: 6(int) FunctionCall 8(launchIndex()
|
||||
Store 69(index) 70
|
||||
|
@ -3,11 +3,9 @@ rayQuery.rgen
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 44
|
||||
|
||||
Capability VariablePointers
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_KHR_variable_pointers"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
@ -40,8 +38,7 @@ rayQuery.rgen
|
||||
13: 10(float) Constant 0
|
||||
15: 10(float) Constant 1148846080
|
||||
16: TypeRayQueryProvisionalKHR
|
||||
17: TypePointer Workgroup 16
|
||||
18(localRayQuery): 17(ptr) Variable Workgroup
|
||||
17: TypePointer Function 16
|
||||
19: TypeAccelerationStructureKHR
|
||||
20: TypePointer UniformConstant 19
|
||||
21(accNV0): 20(ptr) Variable UniformConstant
|
||||
@ -60,6 +57,7 @@ rayQuery.rgen
|
||||
8(rayFlags): 7(ptr) Variable Function
|
||||
12(tMin): 11(ptr) Variable Function
|
||||
14(tMax): 11(ptr) Variable Function
|
||||
18(localRayQuery): 17(ptr) Variable Function
|
||||
Store 8(rayFlags) 9
|
||||
Store 12(tMin) 13
|
||||
Store 14(tMax) 15
|
||||
|
@ -1,36 +0,0 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
uint launchIndex()
|
||||
{
|
||||
return gl_LaunchIDNV.z*gl_LaunchSizeNV.x*gl_LaunchSizeNV.y + gl_LaunchIDNV.y*gl_LaunchSizeNV.x + gl_LaunchIDNV.x;
|
||||
}
|
||||
|
||||
void doInitialize(rayQueryEXT rayQuery, Ray ray)
|
||||
{
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, gl_RayFlagsCullBackFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
}
|
||||
|
||||
int C;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = launchIndex();
|
||||
Ray ray = rays[index];
|
||||
rayQueryEXT rayQuery[2];
|
||||
doInitialize(rayQuery[0], rays[index]);
|
||||
rayQueryInitializeEXT(rayQuery[1], rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullFrontFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
doInitialize(rayQuery[C], ray);
|
||||
}
|
@ -231,7 +231,6 @@ INSTANTIATE_TEST_CASE_P(
|
||||
"spv.while-simple.vert",
|
||||
// vulkan-specific tests
|
||||
"rayQuery.rgen",
|
||||
"rayQuery-array-2d-dynamic.rgen",
|
||||
"rayQuery-decls.rgen",
|
||||
"rayQuery-no-cse.rgen",
|
||||
"rayQuery-initialize.rgen",
|
||||
|
Loading…
x
Reference in New Issue
Block a user