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
7c7731ec
Commit
7c7731ec
authored
Jan 04, 2019
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV 1.4: Generate all globals on OpEntryPoint interface list.
parent
2dd4ab3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+9
-3
No files found.
SPIRV/GlslangToSpv.cpp
View file @
7c7731ec
...
@@ -1552,10 +1552,16 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
...
@@ -1552,10 +1552,16 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
// Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
// Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
if
(
builder
.
isPointer
(
id
))
{
if
(
builder
.
isPointer
(
id
))
{
spv
::
StorageClass
sc
=
builder
.
getStorageClass
(
id
);
// Consider adding to the OpEntryPoint interface list.
if
(
sc
==
spv
::
StorageClassInput
||
sc
==
spv
::
StorageClassOutput
)
{
// Only looking at structures if they have at least one member.
if
(
!
symbol
->
getType
().
isStruct
()
||
symbol
->
getType
().
getStruct
()
->
size
()
>
0
)
if
(
!
symbol
->
getType
().
isStruct
()
||
symbol
->
getType
().
getStruct
()
->
size
()
>
0
)
{
spv
::
StorageClass
sc
=
builder
.
getStorageClass
(
id
);
// Before SPIR-V 1.4, we only want to include Input and Output.
// Starting with SPIR-V 1.4, we want all globals.
if
((
glslangIntermediate
->
getSpv
().
spv
>=
glslang
::
EShTargetSpv_1_4
&&
sc
!=
spv
::
StorageClassFunction
)
||
(
sc
==
spv
::
StorageClassInput
||
sc
==
spv
::
StorageClassOutput
))
{
iOSet
.
insert
(
id
);
iOSet
.
insert
(
id
);
}
}
}
}
}
...
...
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