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
07e1a0a6
Unverified
Commit
07e1a0a6
authored
Feb 22, 2020
by
John Kessenich
Committed by
GitHub
Feb 22, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2090 from amdrexu/bugfix
Fix an issue of SPV generation for imageAtomicStore.
parents
c12493ff
fb18b6df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+1
-1
spv.memoryScopeSemantics.comp.out
Test/baseResults/spv.memoryScopeSemantics.comp.out
+4
-1
spv.memoryScopeSemantics.comp
Test/spv.memoryScopeSemantics.comp
+1
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
07e1a0a6
...
...
@@ -4731,7 +4731,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// imageAtomicStore has a void return type so base the pointer type on
// the type of the value operand.
if
(
node
->
getOp
()
==
glslang
::
EOpImageAtomicStore
)
{
resultTypeId
=
builder
.
makePointer
(
spv
::
StorageClassImage
,
builder
.
getTypeId
(
operands
[
2
].
word
));
resultTypeId
=
builder
.
makePointer
(
spv
::
StorageClassImage
,
builder
.
getTypeId
(
*
opIt
));
}
else
{
resultTypeId
=
builder
.
makePointer
(
spv
::
StorageClassImage
,
resultType
());
}
...
...
Test/baseResults/spv.memoryScopeSemantics.comp.out
View file @
07e1a0a6
spv.memoryScopeSemantics.comp
// Module Version 10300
// Generated by (magic number): 80008
// Id's are bound by 16
7
// Id's are bound by 16
9
Capability Shader
Capability Int64
...
...
@@ -181,6 +181,7 @@ spv.memoryScopeSemantics.comp
163: TypeImage 6(int) 2D multi-sampled nonsampled format:R32i
164: TypePointer UniformConstant 163
165(imageMS): 164(ptr) Variable UniformConstant
167: 6(int) Constant 4294967289
4(main): 2 Function None 3
5: Label
8(origi): 7(ptr) Variable Function
...
...
@@ -280,5 +281,7 @@ spv.memoryScopeSemantics.comp
162: 15(int) AtomicIAdd 160 12 42 16
166: 40(ptr) ImageTexelPointer 165(imageMS) 39 12
AtomicStore 166 12 33 14
168: 40(ptr) ImageTexelPointer 36(imagei) 39 17
AtomicStore 168 12 33 167
Return
FunctionEnd
Test/spv.memoryScopeSemantics.comp
View file @
07e1a0a6
...
...
@@ -69,5 +69,6 @@ void main()
atomicAdd(bufferu.x, 5u, gl_ScopeDevice, 0, gl_SemanticsVolatile);
imageAtomicStore(imageMS, ivec2(0,0), 1, 4, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
imageAtomicStore(imagei, ivec2(0,0), -7, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
}
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