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
811d9f4c
Commit
811d9f4c
authored
Aug 17, 2016
by
steve-lunarg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: SPIRV remapper: allow 64 bit literals in OperandVariableLiteralId class iteration
parent
057c01ef
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
SPVRemapper.cpp
SPIRV/SPVRemapper.cpp
+0
-0
SPVRemapper.h
SPIRV/SPVRemapper.h
+8
-2
No files found.
SPIRV/SPVRemapper.cpp
View file @
811d9f4c
This diff is collapsed.
Click to expand it.
SPIRV/SPVRemapper.h
View file @
811d9f4c
...
@@ -159,6 +159,9 @@ private:
...
@@ -159,6 +159,9 @@ private:
typedef
std
::
set
<
int
>
posmap_t
;
typedef
std
::
set
<
int
>
posmap_t
;
typedef
std
::
unordered_map
<
spv
::
Id
,
int
>
posmap_rev_t
;
typedef
std
::
unordered_map
<
spv
::
Id
,
int
>
posmap_rev_t
;
// Maps and ID to the size of its base type, if known.
typedef
std
::
unordered_map
<
spv
::
Id
,
unsigned
>
typesize_map_t
;
// handle error
// handle error
void
error
(
const
std
::
string
&
txt
)
const
{
errorHandler
(
txt
);
}
void
error
(
const
std
::
string
&
txt
)
const
{
errorHandler
(
txt
);
}
...
@@ -169,6 +172,8 @@ private:
...
@@ -169,6 +172,8 @@ private:
range_t
literalRange
(
spv
::
Op
opCode
)
const
;
range_t
literalRange
(
spv
::
Op
opCode
)
const
;
range_t
typeRange
(
spv
::
Op
opCode
)
const
;
range_t
typeRange
(
spv
::
Op
opCode
)
const
;
range_t
constRange
(
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
];
}
spv
::
Id
&
asId
(
unsigned
word
)
{
return
spv
[
word
];
}
const
spv
::
Id
&
asId
(
unsigned
word
)
const
{
return
spv
[
word
];
}
const
spv
::
Id
&
asId
(
unsigned
word
)
const
{
return
spv
[
word
];
}
...
@@ -177,7 +182,7 @@ private:
...
@@ -177,7 +182,7 @@ private:
spv
::
Decoration
asDecoration
(
unsigned
word
)
const
{
return
spv
::
Decoration
(
spv
[
word
]);
}
spv
::
Decoration
asDecoration
(
unsigned
word
)
const
{
return
spv
::
Decoration
(
spv
[
word
]);
}
unsigned
asWordCount
(
unsigned
word
)
const
{
return
opWordCount
(
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
));
}
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
unsigned
opWordCount
(
spirword_t
data
)
{
return
data
>>
spv
::
WordCountShift
;
}
static
spv
::
Op
opOpCode
(
spirword_t
data
)
{
return
spv
::
Op
(
data
&
spv
::
OpCodeMask
);
}
static
spv
::
Op
opOpCode
(
spirword_t
data
)
{
return
spv
::
Op
(
data
&
spv
::
OpCodeMask
);
}
...
@@ -264,7 +269,8 @@ private:
...
@@ -264,7 +269,8 @@ private:
std
::
unordered_map
<
spv
::
Id
,
int
>
fnCalls
;
std
::
unordered_map
<
spv
::
Id
,
int
>
fnCalls
;
posmap_t
typeConstPos
;
// word positions that define types & consts (ordered)
posmap_t
typeConstPos
;
// word positions that define types & consts (ordered)
posmap_rev_t
typeConstPosR
;
// reverse map from IDs to positions
posmap_rev_t
idPosR
;
// reverse map from IDs to positions
typesize_map_t
idTypeSizeMap
;
// maps each ID to its type size, if known.
std
::
vector
<
spv
::
Id
>
idMapL
;
// ID {M}ap from {L}ocal to {G}lobal IDs
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