Commit d487d4d0 by John Kessenich

Subgroups: Finish fixing GitLab issue 47.

parent 3c81ceda
......@@ -5942,7 +5942,8 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
spv::MemorySemanticsAcquireReleaseMask);
return 0;
case glslang::EOpSubgroupBarrier:
builder.createControlBarrier(spv::ScopeSubgroup, spv::ScopeDevice, spv::MemorySemanticsMaskNone);
builder.createControlBarrier(spv::ScopeSubgroup, spv::ScopeSubgroup, spv::MemorySemanticsAllMemory |
spv::MemorySemanticsAcquireReleaseMask);
return spv::NoResult;
case glslang::EOpSubgroupMemoryBarrier:
builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsAllMemory |
......
spv.subgroupBasic.comp
// Module Version 10000
// Generated by (magic number): 80003
// Id's are bound by 41
// Id's are bound by 40
Capability Shader
Capability GroupNonUniform
......@@ -32,7 +32,7 @@ spv.subgroupBasic.comp
Decorate 20 RelaxedPrecision
Decorate 22(gl_NumSubgroups) BuiltIn NumSubgroups
Decorate 25(gl_SubgroupID) BuiltIn SubgroupId
Decorate 40 BuiltIn WorkgroupSize
Decorate 39 BuiltIn WorkgroupSize
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
......@@ -51,15 +51,14 @@ spv.subgroupBasic.comp
25(gl_SubgroupID): 13(ptr) Variable Input
27: TypeBool
28: 12(int) Constant 3
32: 12(int) Constant 1
33: 12(int) Constant 0
34: 12(int) Constant 3400
35: 12(int) Constant 72
36: 12(int) Constant 264
37: 12(int) Constant 2056
38: TypeVector 12(int) 3
39: 12(int) Constant 8
40: 38(ivec3) ConstantComposite 39 39 32
32: 12(int) Constant 3400
33: 12(int) Constant 72
34: 12(int) Constant 264
35: 12(int) Constant 2056
36: TypeVector 12(int) 3
37: 12(int) Constant 8
38: 12(int) Constant 1
39: 36(ivec3) ConstantComposite 37 37 38
4(main): 2 Function None 3
5: Label
15: 12(int) Load 14(gl_SubgroupSize)
......@@ -76,10 +75,10 @@ spv.subgroupBasic.comp
30: 6(int) Select 29 16 11
31: 17(ptr) AccessChain 10(data) 11 26
Store 31 30
ControlBarrier 28 32 33
ControlBarrier 28 28 32
MemoryBarrier 28 32
MemoryBarrier 28 33
MemoryBarrier 28 34
MemoryBarrier 28 35
MemoryBarrier 28 36
MemoryBarrier 28 37
Return
FunctionEnd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment