Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
99508c1c
Unverified
Commit
99508c1c
authored
Mar 26, 2020
by
John Kessenich
Committed by
GitHub
Mar 26, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2157 from neslimsah/master
GL_EXT_ray_query pass-by-reference issues
parents
2df8c712
054b5e35
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
887 additions
and
1159 deletions
+887
-1159
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+9
-2
rayQuery-allOps.comp.out
Test/baseResults/rayQuery-allOps.comp.out
+277
-286
rayQuery-allOps.frag.out
Test/baseResults/rayQuery-allOps.frag.out
+277
-286
rayQuery-allOps.rgen.out
Test/baseResults/rayQuery-allOps.rgen.out
+277
-286
rayQuery-array-2d-dynamic.rgen.out
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
+0
-201
rayQuery-initialize.rgen.out
Test/baseResults/rayQuery-initialize.rgen.out
+15
-19
rayQuery-no-cse.rgen.out
Test/baseResults/rayQuery-no-cse.rgen.out
+22
-30
rayQuery.rgen.out
Test/baseResults/rayQuery.rgen.out
+9
-11
rayQuery-array-2d-dynamic.rgen
Test/rayQuery-array-2d-dynamic.rgen
+0
-36
Types.h
glslang/Include/Types.h
+1
-1
Spv.FromFile.cpp
gtests/Spv.FromFile.cpp
+0
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
99508c1c
...
@@ -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
:
...
...
Test/baseResults/rayQuery-allOps.comp.out
View file @
99508c1c
rayQuery-allOps.comp
rayQuery-allOps.comp
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 2
66
// Id's are bound by 2
57
Capability Shader
Capability Shader
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
...
@@ -29,21 +29,21 @@ rayQuery-allOps.comp
...
@@ -29,21 +29,21 @@ rayQuery-allOps.comp
Name 43 "ray"
Name 43 "ray"
Name 47 "rayQuery"
Name 47 "rayQuery"
Name 50 "rtas"
Name 50 "rtas"
Name
70
"candidateType"
Name
69
"candidateType"
Name
80
"_mat4x3"
Name
78
"_mat4x3"
Name 8
5
"_mat3x4"
Name 8
3
"_mat3x4"
Name 14
7
"t"
Name 14
3
"t"
Name 1
61
"committedStatus"
Name 1
56
"committedStatus"
Name 24
7
"o"
Name 24
0
"o"
Name 2
50
"d"
Name 2
42
"d"
Name 2
61
"Ray"
Name 2
52
"Ray"
MemberName 2
61
(Ray) 0 "pos"
MemberName 2
52
(Ray) 0 "pos"
MemberName 2
61
(Ray) 1 "tmin"
MemberName 2
52
(Ray) 1 "tmin"
MemberName 2
61
(Ray) 2 "dir"
MemberName 2
52
(Ray) 2 "dir"
MemberName 2
61
(Ray) 3 "tmax"
MemberName 2
52
(Ray) 3 "tmax"
Name 2
63
"Rays"
Name 2
54
"Rays"
MemberName 2
63
(Rays) 0 "rays"
MemberName 2
54
(Rays) 0 "rays"
Name 2
65
""
Name 2
56
""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
Decorate 15(Log) BufferBlock
...
@@ -51,15 +51,15 @@ rayQuery-allOps.comp
...
@@ -51,15 +51,15 @@ rayQuery-allOps.comp
Decorate 17 Binding 0
Decorate 17 Binding 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) Binding 1
Decorate 50(rtas) Binding 1
MemberDecorate 2
61
(Ray) 0 Offset 0
MemberDecorate 2
52
(Ray) 0 Offset 0
MemberDecorate 2
61
(Ray) 1 Offset 12
MemberDecorate 2
52
(Ray) 1 Offset 12
MemberDecorate 2
61
(Ray) 2 Offset 16
MemberDecorate 2
52
(Ray) 2 Offset 16
MemberDecorate 2
61
(Ray) 3 Offset 28
MemberDecorate 2
52
(Ray) 3 Offset 28
Decorate 2
62
ArrayStride 32
Decorate 2
53
ArrayStride 32
MemberDecorate 2
63
(Rays) 0 Offset 0
MemberDecorate 2
54
(Rays) 0 Offset 0
Decorate 2
63
(Rays) BufferBlock
Decorate 2
54
(Rays) BufferBlock
Decorate 2
65
DescriptorSet 0
Decorate 2
56
DescriptorSet 0
Decorate 2
65
Binding 2
Decorate 2
56
Binding 2
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
8: TypeFloat 32
8: TypeFloat 32
...
@@ -91,35 +91,35 @@ rayQuery-allOps.comp
...
@@ -91,35 +91,35 @@ rayQuery-allOps.comp
49: TypePointer UniformConstant 48
49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant
50(rtas): 49(ptr) Variable UniformConstant
52: 14(int) Constant 255
52: 14(int) Constant 255
6
7
: TypeBool
6
6
: TypeBool
6
9
: TypePointer Function 14(int)
6
8
: TypePointer Function 14(int)
7
1: 67
(bool) ConstantFalse
7
0: 66
(bool) ConstantFalse
7
8
: TypeMatrix 9(fvec3) 4
7
6
: TypeMatrix 9(fvec3) 4
7
9: TypePointer Function 78
7
7: TypePointer Function 76
8
2
: TypeVector 8(float) 4
8
0
: TypeVector 8(float) 4
8
3: TypeMatrix 82
(fvec4) 3
8
1: TypeMatrix 80
(fvec4) 3
8
4: TypePointer Function 83
8
2: TypePointer Function 81
8
9: 67
(bool) ConstantTrue
8
6: 66
(bool) ConstantTrue
9
4
: TypeVector 8(float) 2
9
1
: TypeVector 8(float) 2
14
8
: 8(float) Constant 1056964608
14
4
: 8(float) Constant 1056964608
1
80
: 14(int) Constant 1
1
75
: 14(int) Constant 1
203
: 14(int) Constant 2
198
: 14(int) Constant 2
2
61
(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
2
52
(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
2
62: TypeRuntimeArray 261
(Ray)
2
53: TypeRuntimeArray 252
(Ray)
2
63(Rays): TypeStruct 262
2
54(Rays): TypeStruct 253
2
64: TypePointer Uniform 263
(Rays)
2
55: TypePointer Uniform 254
(Rays)
2
65: 264
(ptr) Variable Uniform
2
56: 255
(ptr) Variable Uniform
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
43(ray): 25(ptr) Variable Function
43(ray): 25(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
70(candidateType): 69
(ptr) Variable Function
69(candidateType): 68
(ptr) Variable Function
80(_mat4x3): 79
(ptr) Variable Function
78(_mat4x3): 77
(ptr) Variable Function
8
5(_mat3x4): 84
(ptr) Variable Function
8
3(_mat3x4): 82
(ptr) Variable Function
14
7
(t): 35(ptr) Variable Function
14
3
(t): 35(ptr) Variable Function
1
61(committedStatus): 69
(ptr) Variable Function
1
56(committedStatus): 68
(ptr) Variable Function
24
7
(o): 29(ptr) Variable Function
24
0
(o): 29(ptr) Variable Function
2
50
(d): 29(ptr) Variable Function
2
42
(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
Store 43(ray) 44
51: 48 Load 50(rtas)
51: 48 Load 50(rtas)
...
@@ -137,283 +137,274 @@ rayQuery-allOps.comp
...
@@ -137,283 +137,274 @@ rayQuery-allOps.comp
LoopMerge 63 64 None
LoopMerge 63 64 None
Branch 65
Branch 65
65: Label
65: Label
66: 45 Load 47(rayQuery)
67: 66(bool) RayQueryProceedKHR 47(rayQuery)
68: 67(bool) RayQueryProceedKHR 66
BranchConditional 67 62 63
BranchConditional 68 62 63
62: Label
62: Label
72: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
71: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
Store 70(candidateType) 72
Store 69(candidateType) 71
73: 14(int) Load 70(candidateType)
72: 14(int) Load 69(candidateType)
SelectionMerge 76 None
SelectionMerge 75 None
Switch 73 76
Switch 72 75
case 0: 74
case 0: 73
case 1: 75
case 1: 74
73: Label
RayQueryTerminateKHR 47(rayQuery)
79: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 79
84: 76 Load 78(_mat4x3)
85: 81 Transpose 84
Store 83(_mat3x4) 85
RayQueryConfirmIntersectionKHR 47(rayQuery)
87: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 89 None
BranchConditional 87 88 89
88: Label
90: 2 FunctionCall 6(doSomething()
Branch 89
89: Label
92: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
93: 8(float) CompositeExtract 92 0
94: 66(bool) FOrdEqual 93 27
SelectionMerge 96 None
BranchConditional 94 95 96
95: Label
97: 2 FunctionCall 6(doSomething()
Branch 96
96: Label
98: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
99: 66(bool) SGreaterThan 98 19
SelectionMerge 101 None
BranchConditional 99 100 101
100: Label
102: 2 FunctionCall 6(doSomething()
Branch 101
101: Label
103: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
104: 66(bool) SGreaterThan 103 19
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
107: 2 FunctionCall 6(doSomething()
Branch 106
106: Label
108: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
109: 8(float) CompositeExtract 108 0
110: 66(bool) FOrdGreaterThan 109 27
SelectionMerge 112 None
BranchConditional 110 111 112
111: Label
113: 2 FunctionCall 6(doSomething()
Branch 112
112: Label
114: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
115: 8(float) CompositeExtract 114 0
116: 66(bool) FOrdGreaterThan 115 27
SelectionMerge 118 None
BranchConditional 116 117 118
117: Label
119: 2 FunctionCall 6(doSomething()
Branch 118
118: Label
120: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
121: 66(bool) SGreaterThan 120 19
SelectionMerge 123 None
BranchConditional 121 122 123
122: Label
124: 2 FunctionCall 6(doSomething()
Branch 123
123: Label
125: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
126: 66(bool) FOrdGreaterThan 125 27
SelectionMerge 128 None
BranchConditional 126 127 128
127: Label
129: 2 FunctionCall 6(doSomething()
Branch 128
128: Label
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
131: 66(bool) UGreaterThan 130 20
SelectionMerge 133 None
BranchConditional 131 132 133
132: Label
134: 2 FunctionCall 6(doSomething()
Branch 133
133: Label
Branch 75
74: Label
74: Label
77: 45 Load 47(rayQuery)
136: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
RayQueryTerminateKHR 77
Store 78(_mat4x3) 136
81: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
137: 76 Load 78(_mat4x3)
Store 80(_mat4x3) 81
138: 81 Transpose 137
86: 78 Load 80(_mat4x3)
Store 83(_mat3x4) 138
87: 83 Transpose 86
139: 66(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 47(rayQuery)
Store 85(_mat3x4) 87
SelectionMerge 141 None
88: 45 Load 47(rayQuery)
BranchConditional 139 140 141
RayQueryConfirmIntersectionKHR 88
140: Label
90: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
142: 2 FunctionCall 6(doSomething()
SelectionMerge 92 None
Branch 141
BranchConditional 90 91 92
141: Label
91: Label
Store 143(t) 144
93: 2 FunctionCall 6(doSomething()
145: 8(float) Load 143(t)
Branch 92
RayQueryGenerateIntersectionKHR 47(rayQuery) 145
92: Label
RayQueryTerminateKHR 47(rayQuery)
95: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Branch 75
96: 8(float) CompositeExtract 95 0
97: 67(bool) FOrdEqual 96 27
SelectionMerge 99 None
BranchConditional 97 98 99
98: Label
100: 2 FunctionCall 6(doSomething()
Branch 99
99: Label
101: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
102: 67(bool) SGreaterThan 101 19
SelectionMerge 104 None
BranchConditional 102 103 104
103: Label
105: 2 FunctionCall 6(doSomething()
Branch 104
104: Label
106: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
107: 67(bool) SGreaterThan 106 19
SelectionMerge 109 None
BranchConditional 107 108 109
108: Label
110: 2 FunctionCall 6(doSomething()
Branch 109
109: Label
111: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
112: 8(float) CompositeExtract 111 0
113: 67(bool) FOrdGreaterThan 112 27
SelectionMerge 115 None
BranchConditional 113 114 115
114: Label
116: 2 FunctionCall 6(doSomething()
Branch 115
115: Label
117: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
118: 8(float) CompositeExtract 117 0
119: 67(bool) FOrdGreaterThan 118 27
SelectionMerge 121 None
BranchConditional 119 120 121
120: Label
122: 2 FunctionCall 6(doSomething()
Branch 121
121: Label
123: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
124: 67(bool) SGreaterThan 123 19
SelectionMerge 126 None
BranchConditional 124 125 126
125: Label
127: 2 FunctionCall 6(doSomething()
Branch 126
126: Label
128: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
129: 67(bool) FOrdGreaterThan 128 27
SelectionMerge 131 None
BranchConditional 129 130 131
130: Label
132: 2 FunctionCall 6(doSomething()
Branch 131
131: Label
133: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
134: 67(bool) UGreaterThan 133 20
SelectionMerge 136 None
BranchConditional 134 135 136
135: Label
137: 2 FunctionCall 6(doSomething()
Branch 136
136: Label
Branch 76
75: Label
75: Label
139: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 80(_mat4x3) 139
140: 78 Load 80(_mat4x3)
141: 83 Transpose 140
Store 85(_mat3x4) 141
142: 45 Load 47(rayQuery)
143: 67(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 142
SelectionMerge 145 None
BranchConditional 143 144 145
144: Label
146: 2 FunctionCall 6(doSomething()
Branch 145
145: Label
Store 147(t) 148
149: 8(float) Load 147(t)
RayQueryGenerateIntersectionKHR 47(rayQuery) 149
150: 45 Load 47(rayQuery)
RayQueryTerminateKHR 150
Branch 76
76: Label
Branch 64
Branch 64
64: Label
64: Label
Branch 61
Branch 61
63: Label
63: Label
153: 35(ptr) AccessChain 85(_mat3x4) 19 20
148: 35(ptr) AccessChain 83(_mat3x4) 19 20
154: 8(float) Load 153
149: 8(float) Load 148
155: 35(ptr) AccessChain 80(_mat4x3) 19 20
150: 35(ptr) AccessChain 78(_mat4x3) 19 20
156: 8(float) Load 155
151: 8(float) Load 150
157: 67(bool) FOrdEqual 154 156
152: 66(bool) FOrdEqual 149 151
SelectionMerge 159 None
SelectionMerge 154 None
BranchConditional 157 158 159
BranchConditional 152 153 154
158: Label
153: Label
160: 2 FunctionCall 6(doSomething()
155: 2 FunctionCall 6(doSomething()
Branch 159
Branch 154
154: Label
157: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
Store 156(committedStatus) 157
158: 14(int) Load 156(committedStatus)
SelectionMerge 162 None
Switch 158 162
case 0: 159
case 1: 160
case 2: 161
159: Label
159: Label
162: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
163: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
Store 161(committedStatus) 162
Store 78(_mat4x3) 163
163: 14(int) Load 161(committedStatus)
164: 76 Load 78(_mat4x3)
SelectionMerge 167 None
165: 81 Transpose 164
Switch 163 167
Store 83(_mat3x4) 165
case 0: 164
Branch 162
case 1: 165
160: Label
case 2: 166
167: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
164: Label
Store 78(_mat4x3) 167
168: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
168: 76 Load 78(_mat4x3)
Store 80(_mat4x3) 168
169: 81 Transpose 168
169: 78 Load 80(_mat4x3)
Store 83(_mat3x4) 169
170: 83 Transpose 169
170: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
Store 85(_mat3x4) 170
SelectionMerge 172 None
Branch 167
BranchConditional 170 171 172
165: Label
171: Label
172: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
173: 2 FunctionCall 6(doSomething()
Store 80(_mat4x3) 172
Branch 172
173: 78 Load 80(_mat4x3)
172: Label
174: 83 Transpose 173
174: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Store 85(_mat3x4) 174
176: 8(float) CompositeExtract 174 1
175: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
177: 66(bool) FOrdEqual 176 27
SelectionMerge 177 None
SelectionMerge 179 None
BranchConditional 175 176 177
BranchConditional 177 178 179
176: Label
178: Label
178: 2 FunctionCall 6(doSomething()
180: 2 FunctionCall 6(doSomething()
Branch 177
Branch 179
177: Label
179: Label
179: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Branch 162
181: 8(float) CompositeExtract 179 1
161: Label
182: 67(bool) FOrdEqual 181 27
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
SelectionMerge 184 None
183: 66(bool) SGreaterThan 182 19
BranchConditional 182 183 184
SelectionMerge 185 None
183: Label
BranchConditional 183 184 185
185: 2 FunctionCall 6(doSomething()
Branch 184
184: Label
184: Label
Branch 167
186: 2 FunctionCall 6(doSomething()
166: Label
Branch 185
187: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
185: Label
188: 67(bool) SGreaterThan 187 19
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(bool) SGreaterThan 187 19
SelectionMerge 190 None
SelectionMerge 190 None
BranchConditional 188 189 190
BranchConditional 188 189 190
189: Label
189: Label
191: 2 FunctionCall 6(doSomething()
191: 2 FunctionCall 6(doSomething()
Branch 190
Branch 190
190: Label
190: Label
192: 18(int) RayQueryGetIntersectionInstance
Id
KHR 47(rayQuery) 23
192: 18(int) RayQueryGetIntersectionInstance
CustomIndex
KHR 47(rayQuery) 23
193: 6
7
(bool) SGreaterThan 192 19
193: 6
6
(bool) SGreaterThan 192 19
SelectionMerge 195 None
SelectionMerge 195 None
BranchConditional 193 194 195
BranchConditional 193 194 195
194: Label
194: Label
196: 2 FunctionCall 6(doSomething()
196: 2 FunctionCall 6(doSomething()
Branch 195
Branch 195
195: Label
195: Label
197: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
198: 67(bool) SGreaterThan 197 19
199: 8(float) CompositeExtract 197 2
SelectionMerge 200 None
200: 66(bool) FOrdGreaterThan 199 27
BranchConditional 198 199 200
SelectionMerge 202 None
199: Label
BranchConditional 200 201 202
201: 2 FunctionCall 6(doSomething()
201: Label
Branch 200
203: 2 FunctionCall 6(doSomething()
200: Label
Branch 202
202: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
202: Label
204: 8(float) CompositeExtract 202 2
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
205: 67(bool) FOrdGreaterThan 204 27
205: 8(float) CompositeExtract 204 0
SelectionMerge 207 None
206: 66(bool) FOrdGreaterThan 205 27
BranchConditional 205 206 207
SelectionMerge 208 None
206: Label
BranchConditional 206 207 208
208: 2 FunctionCall 6(doSomething()
Branch 207
207: Label
207: Label
209: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
209: 2 FunctionCall 6(doSomething()
210: 8(float) CompositeExtract 209 0
Branch 208
211: 67(bool) FOrdGreaterThan 210 27
208: Label
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211: 66(bool) SGreaterThan 210 19
SelectionMerge 213 None
SelectionMerge 213 None
BranchConditional 211 212 213
BranchConditional 211 212 213
212: Label
212: Label
214: 2 FunctionCall 6(doSomething()
214: 2 FunctionCall 6(doSomething()
Branch 213
Branch 213
213: Label
213: Label
215:
18(int) RayQueryGetIntersectionPrimitiveIndex
KHR 47(rayQuery) 23
215:
8(float) RayQueryGetIntersectionT
KHR 47(rayQuery) 23
216: 6
7(bool) SGreaterThan 215 19
216: 6
6(bool) FOrdGreaterThan 215 27
SelectionMerge 218 None
SelectionMerge 218 None
BranchConditional 216 217 218
BranchConditional 216 217 218
217: Label
217: Label
219: 2 FunctionCall 6(doSomething()
219: 2 FunctionCall 6(doSomething()
Branch 218
Branch 218
218: Label
218: Label
220: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
Branch 162
221: 67(bool) FOrdGreaterThan 220 27
162: Label
SelectionMerge 223 None
222: 35(ptr) AccessChain 83(_mat3x4) 19 20
BranchConditional 221 222 223
223: 8(float) Load 222
22
2: Label
22
4: 35(ptr) AccessChain 78(_mat4x3) 19 20
22
4: 2 FunctionCall 6(doSomething()
22
5: 8(float) Load 224
Branch 223
226: 66(bool) FOrdEqual 223 225
223: Label
SelectionMerge 228 None
Branch 167
BranchConditional 226 227 228
167:
Label
227:
Label
22
7: 35(ptr) AccessChain 85(_mat3x4) 19 20
22
9: 2 FunctionCall 6(doSomething()
228: 8(float) Load 227
Branch 228
22
9: 35(ptr) AccessChain 80(_mat4x3) 19 20
22
8: Label
230:
8(float) Load 229
230:
14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
231: 6
7(bool) FOrdEqual 228 23
0
231: 6
6(bool) UGreaterThan 230 2
0
SelectionMerge 233 None
SelectionMerge 233 None
BranchConditional 231 232 233
BranchConditional 231 232 233
232: Label
232: Label
234: 2 FunctionCall 6(doSomething()
234: 2 FunctionCall 6(doSomething()
Branch 233
Branch 233
233: Label
233: Label
235: 45 Load 47(rayQuery)
235: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
236: 14(int) RayQueryGetRayFlagsKHR 235
236: 66(bool) FOrdGreaterThan 235 27
237: 67(bool) UGreaterThan 236 20
SelectionMerge 238 None
SelectionMerge 239 None
BranchConditional 236 237 238
BranchConditional 237 238 239
237: Label
239: 2 FunctionCall 6(doSomething()
Branch 238
238: Label
238: Label
240: 2 FunctionCall 6(doSomething()
241: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Branch 239
Store 240(o) 241
239: Label
243: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
241: 45 Load 47(rayQuery)
Store 242(d) 243
242: 8(float) RayQueryGetRayTMinKHR 241
244: 35(ptr) AccessChain 240(o) 20
243: 67(bool) FOrdGreaterThan 242 27
245: 8(float) Load 244
SelectionMerge 245 None
246: 35(ptr) AccessChain 242(d) 198
BranchConditional 243 244 245
247: 8(float) Load 246
244: Label
248: 66(bool) FOrdEqual 245 247
246: 2 FunctionCall 6(doSomething()
SelectionMerge 250 None
Branch 245
BranchConditional 248 249 250
245: Label
249: Label
248: 45 Load 47(rayQuery)
251: 2 FunctionCall 6(doSomething()
249: 9(fvec3) RayQueryGetWorldRayOriginKHR 248
Branch 250
Store 247(o) 249
250: Label
251: 45 Load 47(rayQuery)
252: 9(fvec3) RayQueryGetWorldRayDirectionKHR 251
Store 250(d) 252
253: 35(ptr) AccessChain 247(o) 20
254: 8(float) Load 253
255: 35(ptr) AccessChain 250(d) 203
256: 8(float) Load 255
257: 67(bool) FOrdEqual 254 256
SelectionMerge 259 None
BranchConditional 257 258 259
258: Label
260: 2 FunctionCall 6(doSomething()
Branch 259
259: Label
Return
Return
FunctionEnd
FunctionEnd
6(doSomething(): 2 Function None 3
6(doSomething(): 2 Function None 3
...
...
Test/baseResults/rayQuery-allOps.frag.out
View file @
99508c1c
rayQuery-allOps.frag
rayQuery-allOps.frag
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 2
66
// Id's are bound by 2
57
Capability Shader
Capability Shader
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
...
@@ -29,21 +29,21 @@ rayQuery-allOps.frag
...
@@ -29,21 +29,21 @@ rayQuery-allOps.frag
Name 43 "ray"
Name 43 "ray"
Name 47 "rayQuery"
Name 47 "rayQuery"
Name 50 "rtas"
Name 50 "rtas"
Name
70
"candidateType"
Name
69
"candidateType"
Name
80
"_mat4x3"
Name
78
"_mat4x3"
Name 8
5
"_mat3x4"
Name 8
3
"_mat3x4"
Name 14
7
"t"
Name 14
3
"t"
Name 1
61
"committedStatus"
Name 1
56
"committedStatus"
Name 24
7
"o"
Name 24
0
"o"
Name 2
50
"d"
Name 2
42
"d"
Name 2
61
"Ray"
Name 2
52
"Ray"
MemberName 2
61
(Ray) 0 "pos"
MemberName 2
52
(Ray) 0 "pos"
MemberName 2
61
(Ray) 1 "tmin"
MemberName 2
52
(Ray) 1 "tmin"
MemberName 2
61
(Ray) 2 "dir"
MemberName 2
52
(Ray) 2 "dir"
MemberName 2
61
(Ray) 3 "tmax"
MemberName 2
52
(Ray) 3 "tmax"
Name 2
63
"Rays"
Name 2
54
"Rays"
MemberName 2
63
(Rays) 0 "rays"
MemberName 2
54
(Rays) 0 "rays"
Name 2
65
""
Name 2
56
""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
Decorate 15(Log) BufferBlock
...
@@ -51,15 +51,15 @@ rayQuery-allOps.frag
...
@@ -51,15 +51,15 @@ rayQuery-allOps.frag
Decorate 17 Binding 0
Decorate 17 Binding 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) Binding 1
Decorate 50(rtas) Binding 1
MemberDecorate 2
61
(Ray) 0 Offset 0
MemberDecorate 2
52
(Ray) 0 Offset 0
MemberDecorate 2
61
(Ray) 1 Offset 12
MemberDecorate 2
52
(Ray) 1 Offset 12
MemberDecorate 2
61
(Ray) 2 Offset 16
MemberDecorate 2
52
(Ray) 2 Offset 16
MemberDecorate 2
61
(Ray) 3 Offset 28
MemberDecorate 2
52
(Ray) 3 Offset 28
Decorate 2
62
ArrayStride 32
Decorate 2
53
ArrayStride 32
MemberDecorate 2
63
(Rays) 0 Offset 0
MemberDecorate 2
54
(Rays) 0 Offset 0
Decorate 2
63
(Rays) BufferBlock
Decorate 2
54
(Rays) BufferBlock
Decorate 2
65
DescriptorSet 0
Decorate 2
56
DescriptorSet 0
Decorate 2
65
Binding 2
Decorate 2
56
Binding 2
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
8: TypeFloat 32
8: TypeFloat 32
...
@@ -91,35 +91,35 @@ rayQuery-allOps.frag
...
@@ -91,35 +91,35 @@ rayQuery-allOps.frag
49: TypePointer UniformConstant 48
49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant
50(rtas): 49(ptr) Variable UniformConstant
52: 14(int) Constant 255
52: 14(int) Constant 255
6
7
: TypeBool
6
6
: TypeBool
6
9
: TypePointer Function 14(int)
6
8
: TypePointer Function 14(int)
7
1: 67
(bool) ConstantFalse
7
0: 66
(bool) ConstantFalse
7
8
: TypeMatrix 9(fvec3) 4
7
6
: TypeMatrix 9(fvec3) 4
7
9: TypePointer Function 78
7
7: TypePointer Function 76
8
2
: TypeVector 8(float) 4
8
0
: TypeVector 8(float) 4
8
3: TypeMatrix 82
(fvec4) 3
8
1: TypeMatrix 80
(fvec4) 3
8
4: TypePointer Function 83
8
2: TypePointer Function 81
8
9: 67
(bool) ConstantTrue
8
6: 66
(bool) ConstantTrue
9
4
: TypeVector 8(float) 2
9
1
: TypeVector 8(float) 2
14
8
: 8(float) Constant 1056964608
14
4
: 8(float) Constant 1056964608
1
80
: 14(int) Constant 1
1
75
: 14(int) Constant 1
203
: 14(int) Constant 2
198
: 14(int) Constant 2
2
61
(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
2
52
(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
2
62: TypeRuntimeArray 261
(Ray)
2
53: TypeRuntimeArray 252
(Ray)
2
63(Rays): TypeStruct 262
2
54(Rays): TypeStruct 253
2
64: TypePointer Uniform 263
(Rays)
2
55: TypePointer Uniform 254
(Rays)
2
65: 264
(ptr) Variable Uniform
2
56: 255
(ptr) Variable Uniform
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
43(ray): 25(ptr) Variable Function
43(ray): 25(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
70(candidateType): 69
(ptr) Variable Function
69(candidateType): 68
(ptr) Variable Function
80(_mat4x3): 79
(ptr) Variable Function
78(_mat4x3): 77
(ptr) Variable Function
8
5(_mat3x4): 84
(ptr) Variable Function
8
3(_mat3x4): 82
(ptr) Variable Function
14
7
(t): 35(ptr) Variable Function
14
3
(t): 35(ptr) Variable Function
1
61(committedStatus): 69
(ptr) Variable Function
1
56(committedStatus): 68
(ptr) Variable Function
24
7
(o): 29(ptr) Variable Function
24
0
(o): 29(ptr) Variable Function
2
50
(d): 29(ptr) Variable Function
2
42
(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
Store 43(ray) 44
51: 48 Load 50(rtas)
51: 48 Load 50(rtas)
...
@@ -137,283 +137,274 @@ rayQuery-allOps.frag
...
@@ -137,283 +137,274 @@ rayQuery-allOps.frag
LoopMerge 63 64 None
LoopMerge 63 64 None
Branch 65
Branch 65
65: Label
65: Label
66: 45 Load 47(rayQuery)
67: 66(bool) RayQueryProceedKHR 47(rayQuery)
68: 67(bool) RayQueryProceedKHR 66
BranchConditional 67 62 63
BranchConditional 68 62 63
62: Label
62: Label
72: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
71: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
Store 70(candidateType) 72
Store 69(candidateType) 71
73: 14(int) Load 70(candidateType)
72: 14(int) Load 69(candidateType)
SelectionMerge 76 None
SelectionMerge 75 None
Switch 73 76
Switch 72 75
case 0: 74
case 0: 73
case 1: 75
case 1: 74
73: Label
RayQueryTerminateKHR 47(rayQuery)
79: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 79
84: 76 Load 78(_mat4x3)
85: 81 Transpose 84
Store 83(_mat3x4) 85
RayQueryConfirmIntersectionKHR 47(rayQuery)
87: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 89 None
BranchConditional 87 88 89
88: Label
90: 2 FunctionCall 6(doSomething()
Branch 89
89: Label
92: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
93: 8(float) CompositeExtract 92 0
94: 66(bool) FOrdEqual 93 27
SelectionMerge 96 None
BranchConditional 94 95 96
95: Label
97: 2 FunctionCall 6(doSomething()
Branch 96
96: Label
98: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
99: 66(bool) SGreaterThan 98 19
SelectionMerge 101 None
BranchConditional 99 100 101
100: Label
102: 2 FunctionCall 6(doSomething()
Branch 101
101: Label
103: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
104: 66(bool) SGreaterThan 103 19
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
107: 2 FunctionCall 6(doSomething()
Branch 106
106: Label
108: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
109: 8(float) CompositeExtract 108 0
110: 66(bool) FOrdGreaterThan 109 27
SelectionMerge 112 None
BranchConditional 110 111 112
111: Label
113: 2 FunctionCall 6(doSomething()
Branch 112
112: Label
114: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
115: 8(float) CompositeExtract 114 0
116: 66(bool) FOrdGreaterThan 115 27
SelectionMerge 118 None
BranchConditional 116 117 118
117: Label
119: 2 FunctionCall 6(doSomething()
Branch 118
118: Label
120: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
121: 66(bool) SGreaterThan 120 19
SelectionMerge 123 None
BranchConditional 121 122 123
122: Label
124: 2 FunctionCall 6(doSomething()
Branch 123
123: Label
125: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
126: 66(bool) FOrdGreaterThan 125 27
SelectionMerge 128 None
BranchConditional 126 127 128
127: Label
129: 2 FunctionCall 6(doSomething()
Branch 128
128: Label
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
131: 66(bool) UGreaterThan 130 20
SelectionMerge 133 None
BranchConditional 131 132 133
132: Label
134: 2 FunctionCall 6(doSomething()
Branch 133
133: Label
Branch 75
74: Label
74: Label
77: 45 Load 47(rayQuery)
136: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
RayQueryTerminateKHR 77
Store 78(_mat4x3) 136
81: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
137: 76 Load 78(_mat4x3)
Store 80(_mat4x3) 81
138: 81 Transpose 137
86: 78 Load 80(_mat4x3)
Store 83(_mat3x4) 138
87: 83 Transpose 86
139: 66(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 47(rayQuery)
Store 85(_mat3x4) 87
SelectionMerge 141 None
88: 45 Load 47(rayQuery)
BranchConditional 139 140 141
RayQueryConfirmIntersectionKHR 88
140: Label
90: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
142: 2 FunctionCall 6(doSomething()
SelectionMerge 92 None
Branch 141
BranchConditional 90 91 92
141: Label
91: Label
Store 143(t) 144
93: 2 FunctionCall 6(doSomething()
145: 8(float) Load 143(t)
Branch 92
RayQueryGenerateIntersectionKHR 47(rayQuery) 145
92: Label
RayQueryTerminateKHR 47(rayQuery)
95: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Branch 75
96: 8(float) CompositeExtract 95 0
97: 67(bool) FOrdEqual 96 27
SelectionMerge 99 None
BranchConditional 97 98 99
98: Label
100: 2 FunctionCall 6(doSomething()
Branch 99
99: Label
101: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
102: 67(bool) SGreaterThan 101 19
SelectionMerge 104 None
BranchConditional 102 103 104
103: Label
105: 2 FunctionCall 6(doSomething()
Branch 104
104: Label
106: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
107: 67(bool) SGreaterThan 106 19
SelectionMerge 109 None
BranchConditional 107 108 109
108: Label
110: 2 FunctionCall 6(doSomething()
Branch 109
109: Label
111: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
112: 8(float) CompositeExtract 111 0
113: 67(bool) FOrdGreaterThan 112 27
SelectionMerge 115 None
BranchConditional 113 114 115
114: Label
116: 2 FunctionCall 6(doSomething()
Branch 115
115: Label
117: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
118: 8(float) CompositeExtract 117 0
119: 67(bool) FOrdGreaterThan 118 27
SelectionMerge 121 None
BranchConditional 119 120 121
120: Label
122: 2 FunctionCall 6(doSomething()
Branch 121
121: Label
123: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
124: 67(bool) SGreaterThan 123 19
SelectionMerge 126 None
BranchConditional 124 125 126
125: Label
127: 2 FunctionCall 6(doSomething()
Branch 126
126: Label
128: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
129: 67(bool) FOrdGreaterThan 128 27
SelectionMerge 131 None
BranchConditional 129 130 131
130: Label
132: 2 FunctionCall 6(doSomething()
Branch 131
131: Label
133: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
134: 67(bool) UGreaterThan 133 20
SelectionMerge 136 None
BranchConditional 134 135 136
135: Label
137: 2 FunctionCall 6(doSomething()
Branch 136
136: Label
Branch 76
75: Label
75: Label
139: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 80(_mat4x3) 139
140: 78 Load 80(_mat4x3)
141: 83 Transpose 140
Store 85(_mat3x4) 141
142: 45 Load 47(rayQuery)
143: 67(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 142
SelectionMerge 145 None
BranchConditional 143 144 145
144: Label
146: 2 FunctionCall 6(doSomething()
Branch 145
145: Label
Store 147(t) 148
149: 8(float) Load 147(t)
RayQueryGenerateIntersectionKHR 47(rayQuery) 149
150: 45 Load 47(rayQuery)
RayQueryTerminateKHR 150
Branch 76
76: Label
Branch 64
Branch 64
64: Label
64: Label
Branch 61
Branch 61
63: Label
63: Label
153: 35(ptr) AccessChain 85(_mat3x4) 19 20
148: 35(ptr) AccessChain 83(_mat3x4) 19 20
154: 8(float) Load 153
149: 8(float) Load 148
155: 35(ptr) AccessChain 80(_mat4x3) 19 20
150: 35(ptr) AccessChain 78(_mat4x3) 19 20
156: 8(float) Load 155
151: 8(float) Load 150
157: 67(bool) FOrdEqual 154 156
152: 66(bool) FOrdEqual 149 151
SelectionMerge 159 None
SelectionMerge 154 None
BranchConditional 157 158 159
BranchConditional 152 153 154
158: Label
153: Label
160: 2 FunctionCall 6(doSomething()
155: 2 FunctionCall 6(doSomething()
Branch 159
Branch 154
154: Label
157: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
Store 156(committedStatus) 157
158: 14(int) Load 156(committedStatus)
SelectionMerge 162 None
Switch 158 162
case 0: 159
case 1: 160
case 2: 161
159: Label
159: Label
162: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
163: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
Store 161(committedStatus) 162
Store 78(_mat4x3) 163
163: 14(int) Load 161(committedStatus)
164: 76 Load 78(_mat4x3)
SelectionMerge 167 None
165: 81 Transpose 164
Switch 163 167
Store 83(_mat3x4) 165
case 0: 164
Branch 162
case 1: 165
160: Label
case 2: 166
167: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
164: Label
Store 78(_mat4x3) 167
168: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
168: 76 Load 78(_mat4x3)
Store 80(_mat4x3) 168
169: 81 Transpose 168
169: 78 Load 80(_mat4x3)
Store 83(_mat3x4) 169
170: 83 Transpose 169
170: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
Store 85(_mat3x4) 170
SelectionMerge 172 None
Branch 167
BranchConditional 170 171 172
165: Label
171: Label
172: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
173: 2 FunctionCall 6(doSomething()
Store 80(_mat4x3) 172
Branch 172
173: 78 Load 80(_mat4x3)
172: Label
174: 83 Transpose 173
174: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Store 85(_mat3x4) 174
176: 8(float) CompositeExtract 174 1
175: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
177: 66(bool) FOrdEqual 176 27
SelectionMerge 177 None
SelectionMerge 179 None
BranchConditional 175 176 177
BranchConditional 177 178 179
176: Label
178: Label
178: 2 FunctionCall 6(doSomething()
180: 2 FunctionCall 6(doSomething()
Branch 177
Branch 179
177: Label
179: Label
179: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Branch 162
181: 8(float) CompositeExtract 179 1
161: Label
182: 67(bool) FOrdEqual 181 27
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
SelectionMerge 184 None
183: 66(bool) SGreaterThan 182 19
BranchConditional 182 183 184
SelectionMerge 185 None
183: Label
BranchConditional 183 184 185
185: 2 FunctionCall 6(doSomething()
Branch 184
184: Label
184: Label
Branch 167
186: 2 FunctionCall 6(doSomething()
166: Label
Branch 185
187: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
185: Label
188: 67(bool) SGreaterThan 187 19
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(bool) SGreaterThan 187 19
SelectionMerge 190 None
SelectionMerge 190 None
BranchConditional 188 189 190
BranchConditional 188 189 190
189: Label
189: Label
191: 2 FunctionCall 6(doSomething()
191: 2 FunctionCall 6(doSomething()
Branch 190
Branch 190
190: Label
190: Label
192: 18(int) RayQueryGetIntersectionInstance
Id
KHR 47(rayQuery) 23
192: 18(int) RayQueryGetIntersectionInstance
CustomIndex
KHR 47(rayQuery) 23
193: 6
7
(bool) SGreaterThan 192 19
193: 6
6
(bool) SGreaterThan 192 19
SelectionMerge 195 None
SelectionMerge 195 None
BranchConditional 193 194 195
BranchConditional 193 194 195
194: Label
194: Label
196: 2 FunctionCall 6(doSomething()
196: 2 FunctionCall 6(doSomething()
Branch 195
Branch 195
195: Label
195: Label
197: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
198: 67(bool) SGreaterThan 197 19
199: 8(float) CompositeExtract 197 2
SelectionMerge 200 None
200: 66(bool) FOrdGreaterThan 199 27
BranchConditional 198 199 200
SelectionMerge 202 None
199: Label
BranchConditional 200 201 202
201: 2 FunctionCall 6(doSomething()
201: Label
Branch 200
203: 2 FunctionCall 6(doSomething()
200: Label
Branch 202
202: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
202: Label
204: 8(float) CompositeExtract 202 2
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
205: 67(bool) FOrdGreaterThan 204 27
205: 8(float) CompositeExtract 204 0
SelectionMerge 207 None
206: 66(bool) FOrdGreaterThan 205 27
BranchConditional 205 206 207
SelectionMerge 208 None
206: Label
BranchConditional 206 207 208
208: 2 FunctionCall 6(doSomething()
Branch 207
207: Label
207: Label
209: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
209: 2 FunctionCall 6(doSomething()
210: 8(float) CompositeExtract 209 0
Branch 208
211: 67(bool) FOrdGreaterThan 210 27
208: Label
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211: 66(bool) SGreaterThan 210 19
SelectionMerge 213 None
SelectionMerge 213 None
BranchConditional 211 212 213
BranchConditional 211 212 213
212: Label
212: Label
214: 2 FunctionCall 6(doSomething()
214: 2 FunctionCall 6(doSomething()
Branch 213
Branch 213
213: Label
213: Label
215:
18(int) RayQueryGetIntersectionPrimitiveIndex
KHR 47(rayQuery) 23
215:
8(float) RayQueryGetIntersectionT
KHR 47(rayQuery) 23
216: 6
7(bool) SGreaterThan 215 19
216: 6
6(bool) FOrdGreaterThan 215 27
SelectionMerge 218 None
SelectionMerge 218 None
BranchConditional 216 217 218
BranchConditional 216 217 218
217: Label
217: Label
219: 2 FunctionCall 6(doSomething()
219: 2 FunctionCall 6(doSomething()
Branch 218
Branch 218
218: Label
218: Label
220: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
Branch 162
221: 67(bool) FOrdGreaterThan 220 27
162: Label
SelectionMerge 223 None
222: 35(ptr) AccessChain 83(_mat3x4) 19 20
BranchConditional 221 222 223
223: 8(float) Load 222
22
2: Label
22
4: 35(ptr) AccessChain 78(_mat4x3) 19 20
22
4: 2 FunctionCall 6(doSomething()
22
5: 8(float) Load 224
Branch 223
226: 66(bool) FOrdEqual 223 225
223: Label
SelectionMerge 228 None
Branch 167
BranchConditional 226 227 228
167:
Label
227:
Label
22
7: 35(ptr) AccessChain 85(_mat3x4) 19 20
22
9: 2 FunctionCall 6(doSomething()
228: 8(float) Load 227
Branch 228
22
9: 35(ptr) AccessChain 80(_mat4x3) 19 20
22
8: Label
230:
8(float) Load 229
230:
14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
231: 6
7(bool) FOrdEqual 228 23
0
231: 6
6(bool) UGreaterThan 230 2
0
SelectionMerge 233 None
SelectionMerge 233 None
BranchConditional 231 232 233
BranchConditional 231 232 233
232: Label
232: Label
234: 2 FunctionCall 6(doSomething()
234: 2 FunctionCall 6(doSomething()
Branch 233
Branch 233
233: Label
233: Label
235: 45 Load 47(rayQuery)
235: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
236: 14(int) RayQueryGetRayFlagsKHR 235
236: 66(bool) FOrdGreaterThan 235 27
237: 67(bool) UGreaterThan 236 20
SelectionMerge 238 None
SelectionMerge 239 None
BranchConditional 236 237 238
BranchConditional 237 238 239
237: Label
239: 2 FunctionCall 6(doSomething()
Branch 238
238: Label
238: Label
240: 2 FunctionCall 6(doSomething()
241: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Branch 239
Store 240(o) 241
239: Label
243: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
241: 45 Load 47(rayQuery)
Store 242(d) 243
242: 8(float) RayQueryGetRayTMinKHR 241
244: 35(ptr) AccessChain 240(o) 20
243: 67(bool) FOrdGreaterThan 242 27
245: 8(float) Load 244
SelectionMerge 245 None
246: 35(ptr) AccessChain 242(d) 198
BranchConditional 243 244 245
247: 8(float) Load 246
244: Label
248: 66(bool) FOrdEqual 245 247
246: 2 FunctionCall 6(doSomething()
SelectionMerge 250 None
Branch 245
BranchConditional 248 249 250
245: Label
249: Label
248: 45 Load 47(rayQuery)
251: 2 FunctionCall 6(doSomething()
249: 9(fvec3) RayQueryGetWorldRayOriginKHR 248
Branch 250
Store 247(o) 249
250: Label
251: 45 Load 47(rayQuery)
252: 9(fvec3) RayQueryGetWorldRayDirectionKHR 251
Store 250(d) 252
253: 35(ptr) AccessChain 247(o) 20
254: 8(float) Load 253
255: 35(ptr) AccessChain 250(d) 203
256: 8(float) Load 255
257: 67(bool) FOrdEqual 254 256
SelectionMerge 259 None
BranchConditional 257 258 259
258: Label
260: 2 FunctionCall 6(doSomething()
Branch 259
259: Label
Return
Return
FunctionEnd
FunctionEnd
6(doSomething(): 2 Function None 3
6(doSomething(): 2 Function None 3
...
...
Test/baseResults/rayQuery-allOps.rgen.out
View file @
99508c1c
rayQuery-allOps.rgen
rayQuery-allOps.rgen
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 2
66
// Id's are bound by 2
57
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
...
@@ -29,21 +29,21 @@ rayQuery-allOps.rgen
...
@@ -29,21 +29,21 @@ rayQuery-allOps.rgen
Name 43 "ray"
Name 43 "ray"
Name 47 "rayQuery"
Name 47 "rayQuery"
Name 50 "rtas"
Name 50 "rtas"
Name
70
"candidateType"
Name
69
"candidateType"
Name
80
"_mat4x3"
Name
78
"_mat4x3"
Name 8
5
"_mat3x4"
Name 8
3
"_mat3x4"
Name 14
7
"t"
Name 14
3
"t"
Name 1
61
"committedStatus"
Name 1
56
"committedStatus"
Name 24
7
"o"
Name 24
0
"o"
Name 2
50
"d"
Name 2
42
"d"
Name 2
61
"Ray"
Name 2
52
"Ray"
MemberName 2
61
(Ray) 0 "pos"
MemberName 2
52
(Ray) 0 "pos"
MemberName 2
61
(Ray) 1 "tmin"
MemberName 2
52
(Ray) 1 "tmin"
MemberName 2
61
(Ray) 2 "dir"
MemberName 2
52
(Ray) 2 "dir"
MemberName 2
61
(Ray) 3 "tmax"
MemberName 2
52
(Ray) 3 "tmax"
Name 2
63
"Rays"
Name 2
54
"Rays"
MemberName 2
63
(Rays) 0 "rays"
MemberName 2
54
(Rays) 0 "rays"
Name 2
65
""
Name 2
56
""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
Decorate 15(Log) BufferBlock
...
@@ -51,15 +51,15 @@ rayQuery-allOps.rgen
...
@@ -51,15 +51,15 @@ rayQuery-allOps.rgen
Decorate 17 Binding 0
Decorate 17 Binding 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) Binding 1
Decorate 50(rtas) Binding 1
MemberDecorate 2
61
(Ray) 0 Offset 0
MemberDecorate 2
52
(Ray) 0 Offset 0
MemberDecorate 2
61
(Ray) 1 Offset 12
MemberDecorate 2
52
(Ray) 1 Offset 12
MemberDecorate 2
61
(Ray) 2 Offset 16
MemberDecorate 2
52
(Ray) 2 Offset 16
MemberDecorate 2
61
(Ray) 3 Offset 28
MemberDecorate 2
52
(Ray) 3 Offset 28
Decorate 2
62
ArrayStride 32
Decorate 2
53
ArrayStride 32
MemberDecorate 2
63
(Rays) 0 Offset 0
MemberDecorate 2
54
(Rays) 0 Offset 0
Decorate 2
63
(Rays) BufferBlock
Decorate 2
54
(Rays) BufferBlock
Decorate 2
65
DescriptorSet 0
Decorate 2
56
DescriptorSet 0
Decorate 2
65
Binding 2
Decorate 2
56
Binding 2
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
8: TypeFloat 32
8: TypeFloat 32
...
@@ -91,35 +91,35 @@ rayQuery-allOps.rgen
...
@@ -91,35 +91,35 @@ rayQuery-allOps.rgen
49: TypePointer UniformConstant 48
49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant
50(rtas): 49(ptr) Variable UniformConstant
52: 14(int) Constant 255
52: 14(int) Constant 255
6
7
: TypeBool
6
6
: TypeBool
6
9
: TypePointer Function 14(int)
6
8
: TypePointer Function 14(int)
7
1: 67
(bool) ConstantFalse
7
0: 66
(bool) ConstantFalse
7
8
: TypeMatrix 9(fvec3) 4
7
6
: TypeMatrix 9(fvec3) 4
7
9: TypePointer Function 78
7
7: TypePointer Function 76
8
2
: TypeVector 8(float) 4
8
0
: TypeVector 8(float) 4
8
3: TypeMatrix 82
(fvec4) 3
8
1: TypeMatrix 80
(fvec4) 3
8
4: TypePointer Function 83
8
2: TypePointer Function 81
8
9: 67
(bool) ConstantTrue
8
6: 66
(bool) ConstantTrue
9
4
: TypeVector 8(float) 2
9
1
: TypeVector 8(float) 2
14
8
: 8(float) Constant 1056964608
14
4
: 8(float) Constant 1056964608
1
80
: 14(int) Constant 1
1
75
: 14(int) Constant 1
203
: 14(int) Constant 2
198
: 14(int) Constant 2
2
61
(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
2
52
(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
2
62: TypeRuntimeArray 261
(Ray)
2
53: TypeRuntimeArray 252
(Ray)
2
63(Rays): TypeStruct 262
2
54(Rays): TypeStruct 253
2
64: TypePointer Uniform 263
(Rays)
2
55: TypePointer Uniform 254
(Rays)
2
65: 264
(ptr) Variable Uniform
2
56: 255
(ptr) Variable Uniform
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
43(ray): 25(ptr) Variable Function
43(ray): 25(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
70(candidateType): 69
(ptr) Variable Function
69(candidateType): 68
(ptr) Variable Function
80(_mat4x3): 79
(ptr) Variable Function
78(_mat4x3): 77
(ptr) Variable Function
8
5(_mat3x4): 84
(ptr) Variable Function
8
3(_mat3x4): 82
(ptr) Variable Function
14
7
(t): 35(ptr) Variable Function
14
3
(t): 35(ptr) Variable Function
1
61(committedStatus): 69
(ptr) Variable Function
1
56(committedStatus): 68
(ptr) Variable Function
24
7
(o): 29(ptr) Variable Function
24
0
(o): 29(ptr) Variable Function
2
50
(d): 29(ptr) Variable Function
2
42
(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
Store 43(ray) 44
51: 48 Load 50(rtas)
51: 48 Load 50(rtas)
...
@@ -137,283 +137,274 @@ rayQuery-allOps.rgen
...
@@ -137,283 +137,274 @@ rayQuery-allOps.rgen
LoopMerge 63 64 None
LoopMerge 63 64 None
Branch 65
Branch 65
65: Label
65: Label
66: 45 Load 47(rayQuery)
67: 66(bool) RayQueryProceedKHR 47(rayQuery)
68: 67(bool) RayQueryProceedKHR 66
BranchConditional 67 62 63
BranchConditional 68 62 63
62: Label
62: Label
72: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
71: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
Store 70(candidateType) 72
Store 69(candidateType) 71
73: 14(int) Load 70(candidateType)
72: 14(int) Load 69(candidateType)
SelectionMerge 76 None
SelectionMerge 75 None
Switch 73 76
Switch 72 75
case 0: 74
case 0: 73
case 1: 75
case 1: 74
73: Label
RayQueryTerminateKHR 47(rayQuery)
79: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 78(_mat4x3) 79
84: 76 Load 78(_mat4x3)
85: 81 Transpose 84
Store 83(_mat3x4) 85
RayQueryConfirmIntersectionKHR 47(rayQuery)
87: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
SelectionMerge 89 None
BranchConditional 87 88 89
88: Label
90: 2 FunctionCall 6(doSomething()
Branch 89
89: Label
92: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
93: 8(float) CompositeExtract 92 0
94: 66(bool) FOrdEqual 93 27
SelectionMerge 96 None
BranchConditional 94 95 96
95: Label
97: 2 FunctionCall 6(doSomething()
Branch 96
96: Label
98: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
99: 66(bool) SGreaterThan 98 19
SelectionMerge 101 None
BranchConditional 99 100 101
100: Label
102: 2 FunctionCall 6(doSomething()
Branch 101
101: Label
103: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
104: 66(bool) SGreaterThan 103 19
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
107: 2 FunctionCall 6(doSomething()
Branch 106
106: Label
108: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
109: 8(float) CompositeExtract 108 0
110: 66(bool) FOrdGreaterThan 109 27
SelectionMerge 112 None
BranchConditional 110 111 112
111: Label
113: 2 FunctionCall 6(doSomething()
Branch 112
112: Label
114: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
115: 8(float) CompositeExtract 114 0
116: 66(bool) FOrdGreaterThan 115 27
SelectionMerge 118 None
BranchConditional 116 117 118
117: Label
119: 2 FunctionCall 6(doSomething()
Branch 118
118: Label
120: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
121: 66(bool) SGreaterThan 120 19
SelectionMerge 123 None
BranchConditional 121 122 123
122: Label
124: 2 FunctionCall 6(doSomething()
Branch 123
123: Label
125: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
126: 66(bool) FOrdGreaterThan 125 27
SelectionMerge 128 None
BranchConditional 126 127 128
127: Label
129: 2 FunctionCall 6(doSomething()
Branch 128
128: Label
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
131: 66(bool) UGreaterThan 130 20
SelectionMerge 133 None
BranchConditional 131 132 133
132: Label
134: 2 FunctionCall 6(doSomething()
Branch 133
133: Label
Branch 75
74: Label
74: Label
77: 45 Load 47(rayQuery)
136: 76 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
RayQueryTerminateKHR 77
Store 78(_mat4x3) 136
81: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
137: 76 Load 78(_mat4x3)
Store 80(_mat4x3) 81
138: 81 Transpose 137
86: 78 Load 80(_mat4x3)
Store 83(_mat3x4) 138
87: 83 Transpose 86
139: 66(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 47(rayQuery)
Store 85(_mat3x4) 87
SelectionMerge 141 None
88: 45 Load 47(rayQuery)
BranchConditional 139 140 141
RayQueryConfirmIntersectionKHR 88
140: Label
90: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
142: 2 FunctionCall 6(doSomething()
SelectionMerge 92 None
Branch 141
BranchConditional 90 91 92
141: Label
91: Label
Store 143(t) 144
93: 2 FunctionCall 6(doSomething()
145: 8(float) Load 143(t)
Branch 92
RayQueryGenerateIntersectionKHR 47(rayQuery) 145
92: Label
RayQueryTerminateKHR 47(rayQuery)
95: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Branch 75
96: 8(float) CompositeExtract 95 0
97: 67(bool) FOrdEqual 96 27
SelectionMerge 99 None
BranchConditional 97 98 99
98: Label
100: 2 FunctionCall 6(doSomething()
Branch 99
99: Label
101: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
102: 67(bool) SGreaterThan 101 19
SelectionMerge 104 None
BranchConditional 102 103 104
103: Label
105: 2 FunctionCall 6(doSomething()
Branch 104
104: Label
106: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
107: 67(bool) SGreaterThan 106 19
SelectionMerge 109 None
BranchConditional 107 108 109
108: Label
110: 2 FunctionCall 6(doSomething()
Branch 109
109: Label
111: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
112: 8(float) CompositeExtract 111 0
113: 67(bool) FOrdGreaterThan 112 27
SelectionMerge 115 None
BranchConditional 113 114 115
114: Label
116: 2 FunctionCall 6(doSomething()
Branch 115
115: Label
117: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
118: 8(float) CompositeExtract 117 0
119: 67(bool) FOrdGreaterThan 118 27
SelectionMerge 121 None
BranchConditional 119 120 121
120: Label
122: 2 FunctionCall 6(doSomething()
Branch 121
121: Label
123: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
124: 67(bool) SGreaterThan 123 19
SelectionMerge 126 None
BranchConditional 124 125 126
125: Label
127: 2 FunctionCall 6(doSomething()
Branch 126
126: Label
128: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
129: 67(bool) FOrdGreaterThan 128 27
SelectionMerge 131 None
BranchConditional 129 130 131
130: Label
132: 2 FunctionCall 6(doSomething()
Branch 131
131: Label
133: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
134: 67(bool) UGreaterThan 133 20
SelectionMerge 136 None
BranchConditional 134 135 136
135: Label
137: 2 FunctionCall 6(doSomething()
Branch 136
136: Label
Branch 76
75: Label
75: Label
139: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
Store 80(_mat4x3) 139
140: 78 Load 80(_mat4x3)
141: 83 Transpose 140
Store 85(_mat3x4) 141
142: 45 Load 47(rayQuery)
143: 67(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 142
SelectionMerge 145 None
BranchConditional 143 144 145
144: Label
146: 2 FunctionCall 6(doSomething()
Branch 145
145: Label
Store 147(t) 148
149: 8(float) Load 147(t)
RayQueryGenerateIntersectionKHR 47(rayQuery) 149
150: 45 Load 47(rayQuery)
RayQueryTerminateKHR 150
Branch 76
76: Label
Branch 64
Branch 64
64: Label
64: Label
Branch 61
Branch 61
63: Label
63: Label
153: 35(ptr) AccessChain 85(_mat3x4) 19 20
148: 35(ptr) AccessChain 83(_mat3x4) 19 20
154: 8(float) Load 153
149: 8(float) Load 148
155: 35(ptr) AccessChain 80(_mat4x3) 19 20
150: 35(ptr) AccessChain 78(_mat4x3) 19 20
156: 8(float) Load 155
151: 8(float) Load 150
157: 67(bool) FOrdEqual 154 156
152: 66(bool) FOrdEqual 149 151
SelectionMerge 159 None
SelectionMerge 154 None
BranchConditional 157 158 159
BranchConditional 152 153 154
158: Label
153: Label
160: 2 FunctionCall 6(doSomething()
155: 2 FunctionCall 6(doSomething()
Branch 159
Branch 154
154: Label
157: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
Store 156(committedStatus) 157
158: 14(int) Load 156(committedStatus)
SelectionMerge 162 None
Switch 158 162
case 0: 159
case 1: 160
case 2: 161
159: Label
159: Label
162: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
163: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
Store 161(committedStatus) 162
Store 78(_mat4x3) 163
163: 14(int) Load 161(committedStatus)
164: 76 Load 78(_mat4x3)
SelectionMerge 167 None
165: 81 Transpose 164
Switch 163 167
Store 83(_mat3x4) 165
case 0: 164
Branch 162
case 1: 165
160: Label
case 2: 166
167: 76 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
164: Label
Store 78(_mat4x3) 167
168: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
168: 76 Load 78(_mat4x3)
Store 80(_mat4x3) 168
169: 81 Transpose 168
169: 78 Load 80(_mat4x3)
Store 83(_mat3x4) 169
170: 83 Transpose 169
170: 66(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
Store 85(_mat3x4) 170
SelectionMerge 172 None
Branch 167
BranchConditional 170 171 172
165: Label
171: Label
172: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
173: 2 FunctionCall 6(doSomething()
Store 80(_mat4x3) 172
Branch 172
173: 78 Load 80(_mat4x3)
172: Label
174: 83 Transpose 173
174: 91(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Store 85(_mat3x4) 174
176: 8(float) CompositeExtract 174 1
175: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
177: 66(bool) FOrdEqual 176 27
SelectionMerge 177 None
SelectionMerge 179 None
BranchConditional 175 176 177
BranchConditional 177 178 179
176: Label
178: Label
178: 2 FunctionCall 6(doSomething()
180: 2 FunctionCall 6(doSomething()
Branch 177
Branch 179
177: Label
179: Label
179: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
Branch 162
181: 8(float) CompositeExtract 179 1
161: Label
182: 67(bool) FOrdEqual 181 27
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
SelectionMerge 184 None
183: 66(bool) SGreaterThan 182 19
BranchConditional 182 183 184
SelectionMerge 185 None
183: Label
BranchConditional 183 184 185
185: 2 FunctionCall 6(doSomething()
Branch 184
184: Label
184: Label
Branch 167
186: 2 FunctionCall 6(doSomething()
166: Label
Branch 185
187: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
185: Label
188: 67(bool) SGreaterThan 187 19
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(bool) SGreaterThan 187 19
SelectionMerge 190 None
SelectionMerge 190 None
BranchConditional 188 189 190
BranchConditional 188 189 190
189: Label
189: Label
191: 2 FunctionCall 6(doSomething()
191: 2 FunctionCall 6(doSomething()
Branch 190
Branch 190
190: Label
190: Label
192: 18(int) RayQueryGetIntersectionInstance
Id
KHR 47(rayQuery) 23
192: 18(int) RayQueryGetIntersectionInstance
CustomIndex
KHR 47(rayQuery) 23
193: 6
7
(bool) SGreaterThan 192 19
193: 6
6
(bool) SGreaterThan 192 19
SelectionMerge 195 None
SelectionMerge 195 None
BranchConditional 193 194 195
BranchConditional 193 194 195
194: Label
194: Label
196: 2 FunctionCall 6(doSomething()
196: 2 FunctionCall 6(doSomething()
Branch 195
Branch 195
195: Label
195: Label
197: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
198: 67(bool) SGreaterThan 197 19
199: 8(float) CompositeExtract 197 2
SelectionMerge 200 None
200: 66(bool) FOrdGreaterThan 199 27
BranchConditional 198 199 200
SelectionMerge 202 None
199: Label
BranchConditional 200 201 202
201: 2 FunctionCall 6(doSomething()
201: Label
Branch 200
203: 2 FunctionCall 6(doSomething()
200: Label
Branch 202
202: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
202: Label
204: 8(float) CompositeExtract 202 2
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
205: 67(bool) FOrdGreaterThan 204 27
205: 8(float) CompositeExtract 204 0
SelectionMerge 207 None
206: 66(bool) FOrdGreaterThan 205 27
BranchConditional 205 206 207
SelectionMerge 208 None
206: Label
BranchConditional 206 207 208
208: 2 FunctionCall 6(doSomething()
Branch 207
207: Label
207: Label
209: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
209: 2 FunctionCall 6(doSomething()
210: 8(float) CompositeExtract 209 0
Branch 208
211: 67(bool) FOrdGreaterThan 210 27
208: Label
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211: 66(bool) SGreaterThan 210 19
SelectionMerge 213 None
SelectionMerge 213 None
BranchConditional 211 212 213
BranchConditional 211 212 213
212: Label
212: Label
214: 2 FunctionCall 6(doSomething()
214: 2 FunctionCall 6(doSomething()
Branch 213
Branch 213
213: Label
213: Label
215:
18(int) RayQueryGetIntersectionPrimitiveIndex
KHR 47(rayQuery) 23
215:
8(float) RayQueryGetIntersectionT
KHR 47(rayQuery) 23
216: 6
7(bool) SGreaterThan 215 19
216: 6
6(bool) FOrdGreaterThan 215 27
SelectionMerge 218 None
SelectionMerge 218 None
BranchConditional 216 217 218
BranchConditional 216 217 218
217: Label
217: Label
219: 2 FunctionCall 6(doSomething()
219: 2 FunctionCall 6(doSomething()
Branch 218
Branch 218
218: Label
218: Label
220: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
Branch 162
221: 67(bool) FOrdGreaterThan 220 27
162: Label
SelectionMerge 223 None
222: 35(ptr) AccessChain 83(_mat3x4) 19 20
BranchConditional 221 222 223
223: 8(float) Load 222
22
2: Label
22
4: 35(ptr) AccessChain 78(_mat4x3) 19 20
22
4: 2 FunctionCall 6(doSomething()
22
5: 8(float) Load 224
Branch 223
226: 66(bool) FOrdEqual 223 225
223: Label
SelectionMerge 228 None
Branch 167
BranchConditional 226 227 228
167:
Label
227:
Label
22
7: 35(ptr) AccessChain 85(_mat3x4) 19 20
22
9: 2 FunctionCall 6(doSomething()
228: 8(float) Load 227
Branch 228
22
9: 35(ptr) AccessChain 80(_mat4x3) 19 20
22
8: Label
230:
8(float) Load 229
230:
14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
231: 6
7(bool) FOrdEqual 228 23
0
231: 6
6(bool) UGreaterThan 230 2
0
SelectionMerge 233 None
SelectionMerge 233 None
BranchConditional 231 232 233
BranchConditional 231 232 233
232: Label
232: Label
234: 2 FunctionCall 6(doSomething()
234: 2 FunctionCall 6(doSomething()
Branch 233
Branch 233
233: Label
233: Label
235: 45 Load 47(rayQuery)
235: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
236: 14(int) RayQueryGetRayFlagsKHR 235
236: 66(bool) FOrdGreaterThan 235 27
237: 67(bool) UGreaterThan 236 20
SelectionMerge 238 None
SelectionMerge 239 None
BranchConditional 236 237 238
BranchConditional 237 238 239
237: Label
239: 2 FunctionCall 6(doSomething()
Branch 238
238: Label
238: Label
240: 2 FunctionCall 6(doSomething()
241: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Branch 239
Store 240(o) 241
239: Label
243: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
241: 45 Load 47(rayQuery)
Store 242(d) 243
242: 8(float) RayQueryGetRayTMinKHR 241
244: 35(ptr) AccessChain 240(o) 20
243: 67(bool) FOrdGreaterThan 242 27
245: 8(float) Load 244
SelectionMerge 245 None
246: 35(ptr) AccessChain 242(d) 198
BranchConditional 243 244 245
247: 8(float) Load 246
244: Label
248: 66(bool) FOrdEqual 245 247
246: 2 FunctionCall 6(doSomething()
SelectionMerge 250 None
Branch 245
BranchConditional 248 249 250
245: Label
249: Label
248: 45 Load 47(rayQuery)
251: 2 FunctionCall 6(doSomething()
249: 9(fvec3) RayQueryGetWorldRayOriginKHR 248
Branch 250
Store 247(o) 249
250: Label
251: 45 Load 47(rayQuery)
252: 9(fvec3) RayQueryGetWorldRayDirectionKHR 251
Store 250(d) 252
253: 35(ptr) AccessChain 247(o) 20
254: 8(float) Load 253
255: 35(ptr) AccessChain 250(d) 203
256: 8(float) Load 255
257: 67(bool) FOrdEqual 254 256
SelectionMerge 259 None
BranchConditional 257 258 259
258: Label
260: 2 FunctionCall 6(doSomething()
Branch 259
259: Label
Return
Return
FunctionEnd
FunctionEnd
6(doSomething(): 2 Function None 3
6(doSomething(): 2 Function None 3
...
...
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
deleted
100644 → 0
View file @
2df8c712
rayQuery-array-2d-dynamic.rgen
// Module Version 10000
// Generated by (magic number): 80008
// Id's are bound by 128
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
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 93 "param"
Name 96 "param"
Name 120 "C"
Name 122 "param"
Name 125 "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 Function 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 Function 89
110: 6(int) Constant 32
119: TypePointer Private 53(int)
120(C): 119(ptr) Variable Private
4(main): 2 Function None 3
5: Label
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
91(rayQuery): 90(ptr) Variable Function
93(param): 11(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()
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)
94: 11(ptr) AccessChain 91(rayQuery) 54
95: 10 Load 94
Store 93(param) 95
97: 78(ptr) AccessChain 76 54 92
98: 72(Ray) Load 97
99: 13(fvec3) CompositeExtract 98 0
100: 55(ptr) AccessChain 96(param) 54
Store 100 99
101: 12(float) CompositeExtract 98 1
102: 59(ptr) AccessChain 96(param) 58
Store 102 101
103: 13(fvec3) CompositeExtract 98 2
104: 55(ptr) AccessChain 96(param) 62
Store 104 103
105: 12(float) CompositeExtract 98 3
106: 59(ptr) AccessChain 96(param) 65
Store 106 105
107: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93(param) 96(param)
108: 11(ptr) AccessChain 91(rayQuery) 58
109: 48 Load 50(rtas)
111: 55(ptr) AccessChain 71(ray) 54
112: 13(fvec3) Load 111
113: 59(ptr) AccessChain 71(ray) 58
114: 12(float) Load 113
115: 55(ptr) AccessChain 71(ray) 62
116: 13(fvec3) Load 115
117: 59(ptr) AccessChain 71(ray) 65
118: 12(float) Load 117
RayQueryInitializeKHR 108 109 33 110 112 114 116 118
121: 53(int) Load 120(C)
123: 11(ptr) AccessChain 91(rayQuery) 121
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
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
Test/baseResults/rayQuery-initialize.rgen.out
View file @
99508c1c
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 10
5
// Id's are bound by 10
3
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
...
@@ -38,7 +38,6 @@ rayQuery-initialize.rgen
...
@@ -38,7 +38,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
...
@@ -89,14 +88,13 @@ rayQuery-initialize.rgen
...
@@ -89,14 +88,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)
9
6
: 6(int) Constant 32
9
4
: 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
89(rayQuery): 11(ptr) Variable Function
90(param): 11(ptr) Variable Function
90(param): 15(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 +112,19 @@ rayQuery-initialize.rgen
...
@@ -114,21 +112,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(rayQuer
y)
91:
14(Ray) Load 71(ra
y)
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
...
...
Test/baseResults/rayQuery-no-cse.rgen.out
View file @
99508c1c
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 1
11
// Id's are bound by 1
07
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
...
@@ -38,10 +38,8 @@ rayQuery-no-cse.rgen
...
@@ -38,10 +38,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
...
@@ -92,17 +90,15 @@ rayQuery-no-cse.rgen
...
@@ -92,17 +90,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)
9
6
: 6(int) Constant 32
9
4
: 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(rayQuery1): 11(ptr) Variable Function
89(rayQuery1): 11(ptr) Variable Function
90(param): 11(ptr) Variable Function
90(param): 15(ptr) Variable Function
92(param): 15(ptr) Variable Function
103(rayQuery2): 11(ptr) Variable Function
105(rayQuery2): 11(ptr) Variable Function
104(param): 15(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 +116,22 @@ rayQuery-no-cse.rgen
...
@@ -120,26 +116,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
...
...
Test/baseResults/rayQuery.rgen.out
View file @
99508c1c
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 4
6
// Id's are bound by 4
4
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
...
@@ -51,7 +51,7 @@ rayQuery.rgen
...
@@ -51,7 +51,7 @@ 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
...
@@ -70,15 +70,13 @@ rayQuery.rgen
...
@@ -70,15 +70,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
Test/rayQuery-array-2d-dynamic.rgen
deleted
100644 → 0
View file @
2df8c712
#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);
}
glslang/Include/Types.h
View file @
99508c1c
...
@@ -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
;
}
...
...
gtests/Spv.FromFile.cpp
View file @
99508c1c
...
@@ -231,7 +231,6 @@ INSTANTIATE_TEST_CASE_P(
...
@@ -231,7 +231,6 @@ INSTANTIATE_TEST_CASE_P(
"spv.while-simple.vert"
,
"spv.while-simple.vert"
,
// vulkan-specific tests
// vulkan-specific tests
"rayQuery.rgen"
,
"rayQuery.rgen"
,
"rayQuery-array-2d-dynamic.rgen"
,
"rayQuery-decls.rgen"
,
"rayQuery-decls.rgen"
,
"rayQuery-no-cse.rgen"
,
"rayQuery-no-cse.rgen"
,
"rayQuery-initialize.rgen"
,
"rayQuery-initialize.rgen"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment