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
39d5e711
Commit
39d5e711
authored
Jun 03, 2016
by
GregF
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remapper: do not eliminate interface variables in dce by default
this is done by counting op_entrypoint as a use/def
parent
85b52f30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
SPVRemapper.cpp
SPIRV/SPVRemapper.cpp
+11
-2
No files found.
SPIRV/SPVRemapper.cpp
View file @
39d5e711
...
@@ -926,8 +926,17 @@ namespace spv {
...
@@ -926,8 +926,17 @@ namespace spv {
// Count function variable use
// Count function variable use
process
(
process
(
[
&
](
spv
::
Op
opCode
,
unsigned
start
)
{
[
&
](
spv
::
Op
opCode
,
unsigned
start
)
{
if
(
opCode
==
spv
::
OpVariable
)
{
++
varUseCount
[
asId
(
start
+
2
)];
return
true
;
}
if
(
opCode
==
spv
::
OpVariable
)
{
return
false
;
++
varUseCount
[
asId
(
start
+
2
)];
return
true
;
}
else
if
(
opCode
==
spv
::
OpEntryPoint
)
{
const
int
wordCount
=
asWordCount
(
start
);
for
(
int
i
=
4
;
i
<
wordCount
;
i
++
)
{
++
varUseCount
[
asId
(
start
+
i
)];
}
return
true
;
}
else
return
false
;
},
},
[
&
](
spv
::
Id
&
id
)
{
if
(
varUseCount
[
id
])
++
varUseCount
[
id
];
}
[
&
](
spv
::
Id
&
id
)
{
if
(
varUseCount
[
id
])
++
varUseCount
[
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