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
c6831d1e
Commit
c6831d1e
authored
Jun 19, 2018
by
GregF
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for OpConstantNull and OpConstantSampler to spirv-remap
Fixes issue #1408
parent
c99304c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
SPVRemapper.cpp
SPIRV/SPVRemapper.cpp
+13
-5
No files found.
SPIRV/SPVRemapper.cpp
View file @
c6831d1e
...
@@ -220,11 +220,11 @@ namespace spv {
...
@@ -220,11 +220,11 @@ namespace spv {
bool
spirvbin_t
::
isConstOp
(
spv
::
Op
opCode
)
const
bool
spirvbin_t
::
isConstOp
(
spv
::
Op
opCode
)
const
{
{
switch
(
opCode
)
{
switch
(
opCode
)
{
case
spv
:
:
OpConstantNull
:
case
spv
:
:
OpConstantSampler
:
case
spv
:
:
OpConstantSampler
:
error
(
"unimplemented constant type"
);
error
(
"unimplemented constant type"
);
return
true
;
return
true
;
case
spv
:
:
OpConstantNull
:
case
spv
:
:
OpConstantTrue
:
case
spv
:
:
OpConstantTrue
:
case
spv
:
:
OpConstantFalse
:
case
spv
:
:
OpConstantFalse
:
case
spv
:
:
OpConstantComposite
:
case
spv
:
:
OpConstantComposite
:
...
@@ -1326,10 +1326,6 @@ namespace spv {
...
@@ -1326,10 +1326,6 @@ namespace spv {
case
spv
:
:
OpTypeReserveId
:
return
300002
;
case
spv
:
:
OpTypeReserveId
:
return
300002
;
case
spv
:
:
OpTypeQueue
:
return
300003
;
case
spv
:
:
OpTypeQueue
:
return
300003
;
case
spv
:
:
OpTypePipe
:
return
300004
;
case
spv
:
:
OpTypePipe
:
return
300004
;
case
spv
:
:
OpConstantNull
:
return
300005
;
case
spv
:
:
OpConstantSampler
:
return
300006
;
case
spv
:
:
OpConstantTrue
:
return
300007
;
case
spv
:
:
OpConstantTrue
:
return
300007
;
case
spv
:
:
OpConstantFalse
:
return
300008
;
case
spv
:
:
OpConstantFalse
:
return
300008
;
case
spv
:
:
OpConstantComposite
:
case
spv
:
:
OpConstantComposite
:
...
@@ -1346,6 +1342,18 @@ namespace spv {
...
@@ -1346,6 +1342,18 @@ namespace spv {
hash
+=
w
*
spv
[
typeStart
+
w
];
hash
+=
w
*
spv
[
typeStart
+
w
];
return
hash
;
return
hash
;
}
}
case
spv
:
:
OpConstantNull
:
{
std
::
uint32_t
hash
=
500009
+
hashType
(
idPos
(
spv
[
typeStart
+
1
]));
return
hash
;
}
case
spv
:
:
OpConstantSampler
:
{
std
::
uint32_t
hash
=
600011
+
hashType
(
idPos
(
spv
[
typeStart
+
1
]));
for
(
unsigned
w
=
3
;
w
<
wordCount
;
++
w
)
hash
+=
w
*
spv
[
typeStart
+
w
];
return
hash
;
}
default
:
default
:
error
(
"unknown type opcode"
);
error
(
"unknown type opcode"
);
...
...
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