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
ad08b30f
Commit
ad08b30f
authored
Aug 12, 2016
by
John Kessenich
Committed by
GitHub
Aug 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #456 from steve-lunarg/remapper-literal64
SPIRV: Remapper: allow 64 bit literals in OperandVariableLiteralId iteration
parents
28660bb5
b249f2fc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
53 deletions
+108
-53
SPVRemapper.cpp
SPIRV/SPVRemapper.cpp
+94
-41
SPVRemapper.h
SPIRV/SPVRemapper.h
+14
-12
No files found.
SPIRV/SPVRemapper.cpp
View file @
ad08b30f
This diff is collapsed.
Click to expand it.
SPIRV/SPVRemapper.h
View file @
ad08b30f
...
...
@@ -162,13 +162,15 @@ private:
// handle error
void
error
(
const
std
::
string
&
txt
)
const
{
errorHandler
(
txt
);
}
bool
isConstOp
(
spv
::
Op
opCode
)
const
;
bool
isTypeOp
(
spv
::
Op
opCode
)
const
;
bool
isStripOp
(
spv
::
Op
opCode
)
const
;
bool
isFlowCtrl
(
spv
::
Op
opCode
)
const
;
range_t
literalRange
(
spv
::
Op
opCode
)
const
;
range_t
typeRange
(
spv
::
Op
opCode
)
const
;
range_t
constRange
(
spv
::
Op
opCode
)
const
;
bool
isConstOp
(
spv
::
Op
opCode
)
const
;
bool
isTypeOp
(
spv
::
Op
opCode
)
const
;
bool
isStripOp
(
spv
::
Op
opCode
)
const
;
bool
isFlowCtrl
(
spv
::
Op
opCode
)
const
;
range_t
literalRange
(
spv
::
Op
opCode
)
const
;
range_t
typeRange
(
spv
::
Op
opCode
)
const
;
range_t
constRange
(
spv
::
Op
opCode
)
const
;
unsigned
typeSizeInWords
(
spv
::
Id
id
)
const
;
unsigned
idTypeSizeInWords
(
spv
::
Id
id
)
const
;
spv
::
Id
&
asId
(
unsigned
word
)
{
return
spv
[
word
];
}
const
spv
::
Id
&
asId
(
unsigned
word
)
const
{
return
spv
[
word
];
}
...
...
@@ -177,10 +179,10 @@ private:
spv
::
Decoration
asDecoration
(
unsigned
word
)
const
{
return
spv
::
Decoration
(
spv
[
word
]);
}
unsigned
asWordCount
(
unsigned
word
)
const
{
return
opWordCount
(
spv
[
word
]);
}
spv
::
Id
asTypeConstId
(
unsigned
word
)
const
{
return
asId
(
word
+
(
isTypeOp
(
asOpCode
(
word
))
?
1
:
2
));
}
unsigned
typePos
(
spv
::
Id
id
)
const
;
unsigned
idPos
(
spv
::
Id
id
)
const
;
static
unsigned
opWordCount
(
spirword_t
data
)
{
return
data
>>
spv
::
WordCountShift
;
}
static
spv
::
Op
opOpCode
(
spirword_t
data
)
{
return
spv
::
Op
(
data
&
spv
::
OpCodeMask
);
}
static
unsigned
opWordCount
(
spirword_t
data
)
{
return
data
>>
spv
::
WordCountShift
;
}
static
spv
::
Op
opOpCode
(
spirword_t
data
)
{
return
spv
::
Op
(
data
&
spv
::
OpCodeMask
);
}
// Header access & set methods
spirword_t
magic
()
const
{
return
spv
[
0
];
}
// return magic number
...
...
@@ -263,8 +265,8 @@ private:
// Which functions are called, anywhere in the module, with a call count
std
::
unordered_map
<
spv
::
Id
,
int
>
fnCalls
;
posmap_t
typeConstPos
;
// word positions that define types & consts (ordered)
posmap_rev_t
typeConstPosR
;
// reverse map from IDs to positions
posmap_t
typeConstPos
;
// word positions that define types & consts (ordered)
posmap_rev_t
idPosR
;
// reverse map from IDs to positions
std
::
vector
<
spv
::
Id
>
idMapL
;
// ID {M}ap from {L}ocal to {G}lobal IDs
...
...
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