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
b5c8fd4f
Commit
b5c8fd4f
authored
Mar 08, 2021
by
Greg Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass correct proxy type for atomicStore
Fixes #2564
parent
c7c7982e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
1 deletion
+72
-1
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-1
spv.atomicStoreInt64.comp.out
Test/baseResults/spv.atomicStoreInt64.comp.out
+57
-0
spv.atomicStoreInt64.comp
Test/spv.atomicStoreInt64.comp
+11
-0
Spv.FromFile.cpp
gtests/Spv.FromFile.cpp
+1
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
b5c8fd4f
...
@@ -3164,7 +3164,9 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -3164,7 +3164,9 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
#endif
#endif
if
(
atomic
)
{
if
(
atomic
)
{
// Handle all atomics
// Handle all atomics
result
=
createAtomicOperation
(
node
->
getOp
(),
precision
,
resultType
(),
operands
,
node
->
getBasicType
(),
glslang
::
TBasicType
typeProxy
=
(
node
->
getOp
()
==
glslang
::
EOpAtomicStore
)
?
node
->
getSequence
()[
0
]
->
getAsTyped
()
->
getBasicType
()
:
node
->
getBasicType
();
result
=
createAtomicOperation
(
node
->
getOp
(),
precision
,
resultType
(),
operands
,
typeProxy
,
lvalueCoherentFlags
);
lvalueCoherentFlags
);
}
else
if
(
node
->
getOp
()
==
glslang
::
EOpDebugPrintf
)
{
}
else
if
(
node
->
getOp
()
==
glslang
::
EOpDebugPrintf
)
{
if
(
!
nonSemanticDebugPrintf
)
{
if
(
!
nonSemanticDebugPrintf
)
{
...
...
Test/baseResults/spv.atomicStoreInt64.comp.out
0 → 100644
View file @
b5c8fd4f
spv.atomicStoreInt64.comp
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 25
Capability Shader
Capability Int64
Capability Int64Atomics
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source GLSL 450
SourceExtension "GL_EXT_shader_atomic_int64"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64"
SourceExtension "GL_KHR_memory_scope_semantics"
Name 4 "main"
Name 7 "ssbo"
MemberName 7(ssbo) 0 "y"
Name 9 ""
Name 14 "ubo"
MemberName 14(ubo) 0 "z"
Name 16 ""
MemberDecorate 7(ssbo) 0 Offset 0
Decorate 7(ssbo) BufferBlock
Decorate 9 DescriptorSet 0
Decorate 9 Binding 0
MemberDecorate 14(ubo) 0 Offset 0
Decorate 14(ubo) Block
Decorate 16 DescriptorSet 0
Decorate 16 Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 64 0
7(ssbo): TypeStruct 6(int64_t)
8: TypePointer Uniform 7(ssbo)
9: 8(ptr) Variable Uniform
10: TypeInt 32 1
11: 10(int) Constant 0
12: TypePointer Uniform 6(int64_t)
14(ubo): TypeStruct 6(int64_t)
15: TypePointer Uniform 14(ubo)
16: 15(ptr) Variable Uniform
19: 10(int) Constant 1
20: 10(int) Constant 64
21: TypeInt 32 0
22: 21(int) Constant 1
23: 21(int) Constant 0
24: 21(int) Constant 64
4(main): 2 Function None 3
5: Label
13: 12(ptr) AccessChain 9 11
17: 12(ptr) AccessChain 16 11
18: 6(int64_t) Load 17
AtomicStore 13 19 24 18
Return
FunctionEnd
Test/spv.atomicStoreInt64.comp
0 → 100644
View file @
b5c8fd4f
#version 450
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : enable
#extension GL_EXT_shader_atomic_int64 : enable
#extension GL_KHR_memory_scope_semantics : enable
layout(set = 0, binding = 0) buffer ssbo { uint64_t y; };
layout(set = 0, binding = 1) uniform ubo { uint64_t z; };
void main() {
atomicStore(y, z, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
}
gtests/Spv.FromFile.cpp
View file @
b5c8fd4f
...
@@ -714,6 +714,7 @@ INSTANTIATE_TEST_SUITE_P(
...
@@ -714,6 +714,7 @@ INSTANTIATE_TEST_SUITE_P(
"spv.multiviewPerViewAttributes.vert"
,
"spv.multiviewPerViewAttributes.vert"
,
"spv.multiviewPerViewAttributes.tesc"
,
"spv.multiviewPerViewAttributes.tesc"
,
"spv.atomicInt64.comp"
,
"spv.atomicInt64.comp"
,
"spv.atomicStoreInt64.comp"
,
"spv.shadingRate.frag"
,
"spv.shadingRate.frag"
,
"spv.RayGenShader.rgen"
,
"spv.RayGenShader.rgen"
,
"spv.RayGenShaderArray.rgen"
,
"spv.RayGenShaderArray.rgen"
,
...
...
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