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
7d37a68a
Commit
7d37a68a
authored
Mar 26, 2020
by
Neslisah Torosdagli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass-by-reference updates
parent
2df8c712
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
127 additions
and
128 deletions
+127
-128
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+14
-3
rayQuery-allOps.comp.out
Test/baseResults/rayQuery-allOps.comp.out
+0
-0
rayQuery-allOps.frag.out
Test/baseResults/rayQuery-allOps.frag.out
+0
-0
rayQuery-allOps.rgen.out
Test/baseResults/rayQuery-allOps.rgen.out
+0
-0
rayQuery-array-2d-dynamic.rgen.out
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
+43
-49
rayQuery-decls.rgen.out
Test/baseResults/rayQuery-decls.rgen.out
+10
-8
rayQuery-initialize.rgen.out
Test/baseResults/rayQuery-initialize.rgen.out
+19
-21
rayQuery-no-cse.rgen.out
Test/baseResults/rayQuery-no-cse.rgen.out
+26
-32
rayQuery.rgen.out
Test/baseResults/rayQuery.rgen.out
+14
-14
Types.h
glslang/Include/Types.h
+1
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
7d37a68a
...
@@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
...
@@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
spv
::
StorageClass
TGlslangToSpvTraverser
::
TranslateStorageClass
(
const
glslang
::
TType
&
type
)
spv
::
StorageClass
TGlslangToSpvTraverser
::
TranslateStorageClass
(
const
glslang
::
TType
&
type
)
{
{
if
(
type
.
getBasicType
()
==
glslang
::
EbtRayQuery
)
if
(
type
.
getBasicType
()
==
glslang
::
EbtRayQuery
)
return
spv
::
StorageClass
Function
;
return
spv
::
StorageClass
Workgroup
;
if
(
type
.
getQualifier
().
isPipeInput
())
if
(
type
.
getQualifier
().
isPipeInput
())
return
spv
::
StorageClassInput
;
return
spv
::
StorageClassInput
;
if
(
type
.
getQualifier
().
isPipeOutput
())
if
(
type
.
getQualifier
().
isPipeOutput
())
...
@@ -2197,7 +2197,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
...
@@ -2197,7 +2197,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
if
(
node
->
getOp
()
==
glslang
::
EOpAtomicCounterIncrement
||
if
(
node
->
getOp
()
==
glslang
::
EOpAtomicCounterIncrement
||
node
->
getOp
()
==
glslang
::
EOpAtomicCounterDecrement
||
node
->
getOp
()
==
glslang
::
EOpAtomicCounterDecrement
||
node
->
getOp
()
==
glslang
::
EOpAtomicCounter
||
node
->
getOp
()
==
glslang
::
EOpAtomicCounter
||
node
->
getOp
()
==
glslang
::
EOpInterpolateAtCentroid
)
{
node
->
getOp
()
==
glslang
::
EOpInterpolateAtCentroid
||
node
->
getOp
()
==
glslang
::
EOpRayQueryProceed
||
node
->
getOp
()
==
glslang
::
EOpRayQueryGetRayTMin
||
node
->
getOp
()
==
glslang
::
EOpRayQueryGetRayFlags
||
node
->
getOp
()
==
glslang
::
EOpRayQueryGetWorldRayOrigin
||
node
->
getOp
()
==
glslang
::
EOpRayQueryGetWorldRayDirection
||
node
->
getOp
()
==
glslang
::
EOpRayQueryGetIntersectionCandidateAABBOpaque
||
node
->
getOp
()
==
glslang
::
EOpRayQueryTerminate
||
node
->
getOp
()
==
glslang
::
EOpRayQueryConfirmIntersection
)
{
operand
=
builder
.
accessChainGetLValue
();
// Special case l-value operands
operand
=
builder
.
accessChainGetLValue
();
// Special case l-value operands
lvalueCoherentFlags
=
builder
.
getAccessChain
().
coherentFlags
;
lvalueCoherentFlags
=
builder
.
getAccessChain
().
coherentFlags
;
lvalueCoherentFlags
|=
TranslateCoherent
(
operandNode
->
getAsTyped
()
->
getType
());
lvalueCoherentFlags
|=
TranslateCoherent
(
operandNode
->
getAsTyped
()
->
getType
());
...
@@ -2296,7 +2304,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
...
@@ -2296,7 +2304,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
case
glslang
:
:
EOpRayQueryConfirmIntersection
:
case
glslang
:
:
EOpRayQueryConfirmIntersection
:
builder
.
createNoResultOp
(
spv
::
OpRayQueryConfirmIntersectionKHR
,
operand
);
builder
.
createNoResultOp
(
spv
::
OpRayQueryConfirmIntersectionKHR
,
operand
);
return
false
;
return
false
;
#endif
#endif
default
:
default
:
...
@@ -2720,6 +2727,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -2720,6 +2727,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case
glslang
:
:
EOpRayQueryConfirmIntersection
:
case
glslang
:
:
EOpRayQueryConfirmIntersection
:
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addExtension
(
"SPV_KHR_variable_pointers"
);
builder
.
addCapability
(
spv
::
CapabilityVariablePointers
);
noReturnValue
=
true
;
noReturnValue
=
true
;
break
;
break
;
case
glslang
:
:
EOpRayQueryProceed
:
case
glslang
:
:
EOpRayQueryProceed
:
...
@@ -2743,6 +2752,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -2743,6 +2752,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case
glslang
:
:
EOpRayQueryGetIntersectionWorldToObject
:
case
glslang
:
:
EOpRayQueryGetIntersectionWorldToObject
:
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addExtension
(
"SPV_KHR_variable_pointers"
);
builder
.
addCapability
(
spv
::
CapabilityVariablePointers
);
break
;
break
;
case
glslang
:
:
EOpCooperativeMatrixLoad
:
case
glslang
:
:
EOpCooperativeMatrixLoad
:
case
glslang
:
:
EOpCooperativeMatrixStore
:
case
glslang
:
:
EOpCooperativeMatrixStore
:
...
...
Test/baseResults/rayQuery-allOps.comp.out
View file @
7d37a68a
This diff is collapsed.
Click to expand it.
Test/baseResults/rayQuery-allOps.frag.out
View file @
7d37a68a
This diff is collapsed.
Click to expand it.
Test/baseResults/rayQuery-allOps.rgen.out
View file @
7d37a68a
This diff is collapsed.
Click to expand it.
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
View file @
7d37a68a
rayQuery-array-2d-dynamic.rgen
rayQuery-array-2d-dynamic.rgen
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 12
8
// Id's are bound by 12
4
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -37,11 +39,9 @@ rayQuery-array-2d-dynamic.rgen
...
@@ -37,11 +39,9 @@ rayQuery-array-2d-dynamic.rgen
MemberName 74(Rays) 0 "rays"
MemberName 74(Rays) 0 "rays"
Name 76 ""
Name 76 ""
Name 91 "rayQuery"
Name 91 "rayQuery"
Name 93 "param"
Name 94 "param"
Name 96 "param"
Name 118 "C"
Name 120 "C"
Name 121 "param"
Name 122 "param"
Name 125 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) DescriptorSet 0
...
@@ -60,7 +60,7 @@ rayQuery-array-2d-dynamic.rgen
...
@@ -60,7 +60,7 @@ rayQuery-array-2d-dynamic.rgen
6: TypeInt 32 0
6: TypeInt 32 0
7: TypeFunction 6(int)
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
10: TypeRayQueryProvisionalKHR
11: TypePointer
Function
10
11: TypePointer
Workgroup
10
12: TypeFloat 32
12: TypeFloat 32
13: TypeVector 12(float) 3
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...
@@ -93,19 +93,17 @@ rayQuery-array-2d-dynamic.rgen
...
@@ -93,19 +93,17 @@ rayQuery-array-2d-dynamic.rgen
76: 75(ptr) Variable Uniform
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
78: TypePointer Uniform 72(Ray)
89: TypeArray 10 24
89: TypeArray 10 24
90: TypePointer Function 89
90: TypePointer Workgroup 89
110: 6(int) Constant 32
91(rayQuery): 90(ptr) Variable Workgroup
119: TypePointer Private 53(int)
108: 6(int) Constant 32
120(C): 119(ptr) Variable Private
117: TypePointer Private 53(int)
118(C): 117(ptr) Variable Private
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
69(index): 68(ptr) Variable Function
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
71(ray): 15(ptr) Variable Function
91(rayQuery): 90(ptr) Variable Function
94(param): 15(ptr) Variable Function
93(param): 11(ptr) Variable Function
121(param): 15(ptr) Variable Function
96(param): 15(ptr) Variable Function
122(param): 11(ptr) Variable Function
125(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
Store 69(index) 70
77: 6(int) Load 69(index)
77: 6(int) Load 69(index)
...
@@ -124,42 +122,38 @@ rayQuery-array-2d-dynamic.rgen
...
@@ -124,42 +122,38 @@ rayQuery-array-2d-dynamic.rgen
88: 59(ptr) AccessChain 71(ray) 65
88: 59(ptr) AccessChain 71(ray) 65
Store 88 87
Store 88 87
92: 6(int) Load 69(index)
92: 6(int) Load 69(index)
94: 11(ptr) AccessChain 91(rayQuery) 54
93: 11(ptr) AccessChain 91(rayQuery) 54
95: 10 Load 94
95: 78(ptr) AccessChain 76 54 92
Store 93(param) 95
96: 72(Ray) Load 95
97: 78(ptr) AccessChain 76 54 92
97: 13(fvec3) CompositeExtract 96 0
98: 72(Ray) Load 97
98: 55(ptr) AccessChain 94(param) 54
99: 13(fvec3) CompositeExtract 98 0
Store 98 97
100: 55(ptr) AccessChain 96(param) 54
99: 12(float) CompositeExtract 96 1
100: 59(ptr) AccessChain 94(param) 58
Store 100 99
Store 100 99
101: 1
2(float) CompositeExtract 98 1
101: 1
3(fvec3) CompositeExtract 96 2
102: 5
9(ptr) AccessChain 96(param) 58
102: 5
5(ptr) AccessChain 94(param) 62
Store 102 101
Store 102 101
103: 1
3(fvec3) CompositeExtract 98 2
103: 1
2(float) CompositeExtract 96 3
104: 5
5(ptr) AccessChain 96(param) 62
104: 5
9(ptr) AccessChain 94(param) 65
Store 104 103
Store 104 103
105: 12(float) CompositeExtract 98 3
105: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93 94(param)
106: 59(ptr) AccessChain 96(param) 65
106: 11(ptr) AccessChain 91(rayQuery) 58
Store 106 105
107: 48 Load 50(rtas)
107: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93(param) 96(param)
109: 55(ptr) AccessChain 71(ray) 54
108: 11(ptr) AccessChain 91(rayQuery) 58
110: 13(fvec3) Load 109
109: 48 Load 50(rtas)
111: 59(ptr) AccessChain 71(ray) 58
111: 55(ptr) AccessChain 71(ray) 54
112: 12(float) Load 111
112: 13(fvec3) Load 111
113: 55(ptr) AccessChain 71(ray) 62
113: 59(ptr) AccessChain 71(ray) 58
114: 13(fvec3) Load 113
114: 12(float) Load 113
115: 59(ptr) AccessChain 71(ray) 65
115: 55(ptr) AccessChain 71(ray) 62
116: 12(float) Load 115
116: 13(fvec3) Load 115
RayQueryInitializeKHR 106 107 33 108 110 112 114 116
117: 59(ptr) AccessChain 71(ray) 65
119: 53(int) Load 118(C)
118: 12(float) Load 117
120: 11(ptr) AccessChain 91(rayQuery) 119
RayQueryInitializeKHR 108 109 33 110 112 114 116 118
122: 14(Ray) Load 71(ray)
121: 53(int) Load 120(C)
Store 121(param) 122
123: 11(ptr) AccessChain 91(rayQuery) 121
123: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 120 121(param)
124: 10 Load 123
Store 122(param) 124
126: 14(Ray) Load 71(ray)
Store 125(param) 126
127: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 122(param) 125(param)
Return
Return
FunctionEnd
FunctionEnd
8(launchIndex(): 6(int) Function None 7
8(launchIndex(): 6(int) Function None 7
...
...
Test/baseResults/rayQuery-decls.rgen.out
View file @
7d37a68a
...
@@ -3,9 +3,11 @@ rayQuery-decls.rgen
...
@@ -3,9 +3,11 @@ rayQuery-decls.rgen
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 130
// Id's are bound by 130
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -90,29 +92,29 @@ rayQuery-decls.rgen
...
@@ -90,29 +92,29 @@ rayQuery-decls.rgen
69: TypeRayQueryProvisionalKHR
69: TypeRayQueryProvisionalKHR
70: 6(int) Constant 4
70: 6(int) Constant 4
71: TypeArray 69 70
71: TypeArray 69 70
72: TypePointer Function 71
72: TypePointer Workgroup 71
73(g_rayQueryArray): 72(ptr) Variable Workgroup
74(block): TypeStruct 6(int)
74(block): TypeStruct 6(int)
75: TypePointer ShaderRecordBufferKHR 74(block)
75: TypePointer ShaderRecordBufferKHR 74(block)
76: 75(ptr) Variable ShaderRecordBufferKHR
76: 75(ptr) Variable ShaderRecordBufferKHR
77: TypePointer ShaderRecordBufferKHR 6(int)
77: TypePointer ShaderRecordBufferKHR 6(int)
80: TypePointer Function 69
80: TypePointer Workgroup 69
81(rayQuery0b): 80(ptr) Variable Workgroup
86(rayQuery0a): 80(ptr) Variable Workgroup
89(rayQuery0c): 80(ptr) Variable Workgroup
94: TypeAccelerationStructureKHR
94: TypeAccelerationStructureKHR
95: TypePointer UniformConstant 94
95: TypePointer UniformConstant 94
96(rtas): 95(ptr) Variable UniformConstant
96(rtas): 95(ptr) Variable UniformConstant
98: 6(int) Constant 16
98: 6(int) Constant 16
107(rayQuery1c): 80(ptr) Variable Workgroup
109: 6(int) Constant 32
109: 6(int) Constant 32
119: 6(int) Constant 3
119: 6(int) Constant 3
120: 6(int) Constant 64
120: 6(int) Constant 64
129(g_rayQueryUnused): 80(ptr) Variable Workgroup
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
38(index): 37(ptr) Variable Function
38(index): 37(ptr) Variable Function
44(ray): 43(ptr) Variable Function
44(ray): 43(ptr) Variable Function
73(g_rayQueryArray): 72(ptr) Variable Function
81(rayQuery0b): 80(ptr) Variable Function
86(rayQuery0a): 80(ptr) Variable Function
89(rayQuery0c): 80(ptr) Variable Function
107(rayQuery1c): 80(ptr) Variable Function
129(g_rayQueryUnused): 80(ptr) Variable Function
39: 6(int) FunctionCall 8(launchIndex()
39: 6(int) FunctionCall 8(launchIndex()
Store 38(index) 39
Store 38(index) 39
52: 6(int) Load 38(index)
52: 6(int) Load 38(index)
...
...
Test/baseResults/rayQuery-initialize.rgen.out
View file @
7d37a68a
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 VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -38,7 +40,6 @@ rayQuery-initialize.rgen
...
@@ -38,7 +40,6 @@ rayQuery-initialize.rgen
Name 76 ""
Name 76 ""
Name 89 "rayQuery"
Name 89 "rayQuery"
Name 90 "param"
Name 90 "param"
Name 92 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) DescriptorSet 0
...
@@ -57,7 +58,7 @@ rayQuery-initialize.rgen
...
@@ -57,7 +58,7 @@ rayQuery-initialize.rgen
6: TypeInt 32 0
6: TypeInt 32 0
7: TypeFunction 6(int)
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
10: TypeRayQueryProvisionalKHR
11: TypePointer
Function
10
11: TypePointer
Workgroup
10
12: TypeFloat 32
12: TypeFloat 32
13: TypeVector 12(float) 3
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...
@@ -89,14 +90,13 @@ rayQuery-initialize.rgen
...
@@ -89,14 +90,13 @@ rayQuery-initialize.rgen
75: TypePointer Uniform 74(Rays)
75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
78: TypePointer Uniform 72(Ray)
96: 6(int) Constant 32
89(rayQuery): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
69(index): 68(ptr) Variable Function
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
71(ray): 15(ptr) Variable Function
89(rayQuery): 11(ptr) Variable Function
90(param): 15(ptr) Variable Function
90(param): 11(ptr) Variable Function
92(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
Store 69(index) 70
77: 6(int) Load 69(index)
77: 6(int) Load 69(index)
...
@@ -114,21 +114,19 @@ rayQuery-initialize.rgen
...
@@ -114,21 +114,19 @@ rayQuery-initialize.rgen
87: 12(float) CompositeExtract 80 3
87: 12(float) CompositeExtract 80 3
88: 59(ptr) AccessChain 71(ray) 65
88: 59(ptr) AccessChain 71(ray) 65
Store 88 87
Store 88 87
91:
10 Load 89(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 @
7d37a68a
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 VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -38,10 +40,8 @@ rayQuery-no-cse.rgen
...
@@ -38,10 +40,8 @@ rayQuery-no-cse.rgen
Name 76 ""
Name 76 ""
Name 89 "rayQuery1"
Name 89 "rayQuery1"
Name 90 "param"
Name 90 "param"
Name 92 "param"
Name 103 "rayQuery2"
Name 105 "rayQuery2"
Name 104 "param"
Name 106 "param"
Name 108 "param"
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) DescriptorSet 0
...
@@ -60,7 +60,7 @@ rayQuery-no-cse.rgen
...
@@ -60,7 +60,7 @@ rayQuery-no-cse.rgen
6: TypeInt 32 0
6: TypeInt 32 0
7: TypeFunction 6(int)
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
10: TypeRayQueryProvisionalKHR
11: TypePointer
Function
10
11: TypePointer
Workgroup
10
12: TypeFloat 32
12: TypeFloat 32
13: TypeVector 12(float) 3
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...
@@ -92,17 +92,15 @@ rayQuery-no-cse.rgen
...
@@ -92,17 +92,15 @@ rayQuery-no-cse.rgen
75: TypePointer Uniform 74(Rays)
75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
78: TypePointer Uniform 72(Ray)
96: 6(int) Constant 32
89(rayQuery1): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
103(rayQuery2): 11(ptr) Variable Workgroup
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
69(index): 68(ptr) Variable Function
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
71(ray): 15(ptr) Variable Function
89(rayQuery1): 11(ptr) Variable Function
90(param): 15(ptr) Variable Function
90(param): 11(ptr) Variable Function
104(param): 15(ptr) Variable Function
92(param): 15(ptr) Variable Function
105(rayQuery2): 11(ptr) Variable Function
106(param): 11(ptr) Variable Function
108(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
Store 69(index) 70
77: 6(int) Load 69(index)
77: 6(int) Load 69(index)
...
@@ -120,26 +118,22 @@ rayQuery-no-cse.rgen
...
@@ -120,26 +118,22 @@ rayQuery-no-cse.rgen
87: 12(float) CompositeExtract 80 3
87: 12(float) CompositeExtract 80 3
88: 59(ptr) AccessChain 71(ray) 65
88: 59(ptr) AccessChain 71(ray) 65
Store 88 87
Store 88 87
91:
10 Load 89(rayQuery1
)
91:
14(Ray) Load 71(ray
)
Store 90(param) 91
Store 90(param) 91
93: 14(Ray) Load 71(ray)
92: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 89(rayQuery1) 90(param)
Store 92(param) 93
93: 48 Load 50(rtas)
94: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 90(param) 92(param)
95: 55(ptr) AccessChain 71(ray) 54
95: 48 Load 50(rtas)
96: 13(fvec3) Load 95
97: 55(ptr) AccessChain 71(ray) 54
97: 59(ptr) AccessChain 71(ray) 58
98: 13(fvec3) Load 97
98: 12(float) Load 97
99: 59(ptr) AccessChain 71(ray) 58
99: 55(ptr) AccessChain 71(ray) 62
100: 12(float) Load 99
100: 13(fvec3) Load 99
101: 55(ptr) AccessChain 71(ray) 62
101: 59(ptr) AccessChain 71(ray) 65
102: 13(fvec3) Load 101
102: 12(float) Load 101
103: 59(ptr) AccessChain 71(ray) 65
RayQueryInitializeKHR 89(rayQuery1) 93 33 94 96 98 100 102
104: 12(float) Load 103
105: 14(Ray) Load 71(ray)
RayQueryInitializeKHR 89(rayQuery1) 95 33 96 98 100 102 104
Store 104(param) 105
107: 10 Load 105(rayQuery2)
106: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 103(rayQuery2) 104(param)
Store 106(param) 107
109: 14(Ray) Load 71(ray)
Store 108(param) 109
110: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 106(param) 108(param)
Return
Return
FunctionEnd
FunctionEnd
8(launchIndex(): 6(int) Function None 7
8(launchIndex(): 6(int) Function None 7
...
...
Test/baseResults/rayQuery.rgen.out
View file @
7d37a68a
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 VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -38,7 +40,8 @@ rayQuery.rgen
...
@@ -38,7 +40,8 @@ rayQuery.rgen
13: 10(float) Constant 0
13: 10(float) Constant 0
15: 10(float) Constant 1148846080
15: 10(float) Constant 1148846080
16: TypeRayQueryProvisionalKHR
16: TypeRayQueryProvisionalKHR
17: TypePointer Function 16
17: TypePointer Workgroup 16
18(localRayQuery): 17(ptr) Variable Workgroup
19: TypeAccelerationStructureKHR
19: TypeAccelerationStructureKHR
20: TypePointer UniformConstant 19
20: TypePointer UniformConstant 19
21(accNV0): 20(ptr) Variable UniformConstant
21(accNV0): 20(ptr) Variable UniformConstant
...
@@ -51,13 +54,12 @@ rayQuery.rgen
...
@@ -51,13 +54,12 @@ rayQuery.rgen
30: 29(int) Constant 1
30: 29(int) Constant 1
31: TypePointer ShaderRecordBufferKHR 25(fvec3)
31: TypePointer ShaderRecordBufferKHR 25(fvec3)
35: 29(int) Constant 0
35: 29(int) Constant 0
40
: TypeBool
39
: TypeBool
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(rayFlags): 7(ptr) Variable Function
8(rayFlags): 7(ptr) Variable Function
12(tMin): 11(ptr) Variable Function
12(tMin): 11(ptr) Variable Function
14(tMax): 11(ptr) Variable Function
14(tMax): 11(ptr) Variable Function
18(localRayQuery): 17(ptr) Variable Function
Store 8(rayFlags) 9
Store 8(rayFlags) 9
Store 12(tMin) 13
Store 12(tMin) 13
Store 14(tMax) 15
Store 14(tMax) 15
...
@@ -70,15 +72,13 @@ rayQuery.rgen
...
@@ -70,15 +72,13 @@ rayQuery.rgen
37: 25(fvec3) Load 36
37: 25(fvec3) Load 36
38: 10(float) Load 14(tMax)
38: 10(float) Load 14(tMax)
RayQueryInitializeKHR 18(localRayQuery) 22 23 24 33 34 37 38
RayQueryInitializeKHR 18(localRayQuery) 22 23 24 33 34 37 38
39: 16 Load 18(localRayQuery)
40: 39(bool) RayQueryProceedKHR 18(localRayQuery)
41: 40(bool) RayQueryProceedKHR 39
41: 39(bool) LogicalNot 40
42: 40(bool) LogicalNot 41
SelectionMerge 43 None
SelectionMerge 44 None
BranchConditional 41 42 43
BranchConditional 42 43 44
42: Label
43: Label
RayQueryTerminateKHR 18(localRayQuery)
45: 16 Load 18(localRayQuery)
Branch 43
RayQueryTerminateKHR 45
43: Label
Branch 44
44: Label
Return
Return
FunctionEnd
FunctionEnd
glslang/Include/Types.h
View file @
7d37a68a
...
@@ -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
;
}
...
...
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