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
d4782c10
Commit
d4782c10
authored
Sep 06, 2015
by
Rex Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPIRV: Token layout of OpAtomicXXX instructions is incorrect #70
parent
0c81156c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+13
-2
disassemble.cpp
SPIRV/disassemble.cpp
+0
-2
No files found.
SPIRV/GlslangToSpv.cpp
View file @
d4782c10
...
@@ -1064,6 +1064,17 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -1064,6 +1064,17 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
if
(
arg
==
1
)
if
(
arg
==
1
)
lvalue
=
true
;
lvalue
=
true
;
break
;
break
;
case
glslang
:
:
EOpAtomicAdd
:
case
glslang
:
:
EOpAtomicMin
:
case
glslang
:
:
EOpAtomicMax
:
case
glslang
:
:
EOpAtomicAnd
:
case
glslang
:
:
EOpAtomicOr
:
case
glslang
:
:
EOpAtomicXor
:
case
glslang
:
:
EOpAtomicExchange
:
case
glslang
:
:
EOpAtomicCompSwap
:
if
(
arg
==
0
)
lvalue
=
true
;
break
;
//case glslang::EOpUAddCarry:
//case glslang::EOpUAddCarry:
//case glslang::EOpUSubBorrow:
//case glslang::EOpUSubBorrow:
//case glslang::EOpUMulExtended:
//case glslang::EOpUMulExtended:
...
@@ -2470,8 +2481,8 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
...
@@ -2470,8 +2481,8 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
std
::
vector
<
spv
::
Id
>
spvAtomicOperands
;
// hold the spv operands
std
::
vector
<
spv
::
Id
>
spvAtomicOperands
;
// hold the spv operands
auto
opIt
=
operands
.
begin
();
// walk the glslang operands
auto
opIt
=
operands
.
begin
();
// walk the glslang operands
spvAtomicOperands
.
push_back
(
*
(
opIt
++
));
spvAtomicOperands
.
push_back
(
*
(
opIt
++
));
spvAtomicOperands
.
push_back
(
builder
.
makeUintConstant
(
spv
::
ScopeDevice
)
);
// TBD: what is the correct scope?
spvAtomicOperands
.
push_back
(
spv
::
ScopeDevice
);
// TBD: what is the correct scope?
spvAtomicOperands
.
push_back
(
builder
.
makeUintConstant
(
spv
::
MemorySemanticsMaskNone
)
);
// TBD: what are the correct memory semantics?
spvAtomicOperands
.
push_back
(
spv
::
MemorySemanticsMaskNone
);
// TBD: what are the correct memory semantics?
// Add the rest of the operands, skipping the first one, which was dealt with above.
// Add the rest of the operands, skipping the first one, which was dealt with above.
// For some ops, there are none, for some 1, for compare-exchange, 2.
// For some ops, there are none, for some 1, for compare-exchange, 2.
...
...
SPIRV/disassemble.cpp
View file @
d4782c10
...
@@ -386,8 +386,6 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
...
@@ -386,8 +386,6 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
OperandClass
operandClass
=
InstructionDesc
[
opCode
].
operands
.
getClass
(
op
);
OperandClass
operandClass
=
InstructionDesc
[
opCode
].
operands
.
getClass
(
op
);
switch
(
operandClass
)
{
switch
(
operandClass
)
{
case
OperandId
:
case
OperandId
:
case
OperandScope
:
case
OperandMemorySemantics
:
disassembleIds
(
1
);
disassembleIds
(
1
);
// Get names for printing "(XXX)" for readability, *after* this id
// Get names for printing "(XXX)" for readability, *after* this id
if
(
opCode
==
OpName
)
if
(
opCode
==
OpName
)
...
...
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