blob: a0ad56551ca96cc80c1989e915b08446e8080b2a [file] [log] [blame]
spv.subgroupBasic.comp
// Module Version 10000
// Generated by (magic number): 80002
// Id's are bound by 41
Capability Shader
Capability GroupNonUniform
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 14 19 22 25
ExecutionMode 4 LocalSize 8 8 1
Source GLSL 450
SourceExtension "GL_KHR_shader_subgroup_basic"
Name 4 "main"
Name 8 "Buffer"
MemberName 8(Buffer) 0 "a"
Name 10 "data"
Name 14 "gl_SubgroupSize"
Name 19 "gl_SubgroupInvocationID"
Name 22 "gl_NumSubgroups"
Name 25 "gl_SubgroupID"
Decorate 7 ArrayStride 4
MemberDecorate 8(Buffer) 0 Offset 0
Decorate 8(Buffer) BufferBlock
Decorate 10(data) DescriptorSet 0
Decorate 10(data) Binding 0
Decorate 14(gl_SubgroupSize) RelaxedPrecision
Decorate 14(gl_SubgroupSize) BuiltIn SubgroupSize
Decorate 15 RelaxedPrecision
Decorate 19(gl_SubgroupInvocationID) RelaxedPrecision
Decorate 19(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId
Decorate 20 RelaxedPrecision
Decorate 22(gl_NumSubgroups) BuiltIn NumSubgroups
Decorate 25(gl_SubgroupID) BuiltIn SubgroupId
Decorate 40 BuiltIn WorkgroupSize
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeRuntimeArray 6(int)
8(Buffer): TypeStruct 7
9: TypePointer Uniform 8(Buffer)
10(data): 9(ptr) Variable Uniform
11: 6(int) Constant 0
12: TypeInt 32 0
13: TypePointer Input 12(int)
14(gl_SubgroupSize): 13(ptr) Variable Input
16: 6(int) Constant 1
17: TypePointer Uniform 6(int)
19(gl_SubgroupInvocationID): 13(ptr) Variable Input
22(gl_NumSubgroups): 13(ptr) Variable Input
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 4048
35: 12(int) Constant 64
36: 12(int) Constant 256
37: 12(int) Constant 2048
38: TypeVector 12(int) 3
39: 12(int) Constant 8
40: 38(ivec3) ConstantComposite 39 39 32
4(main): 2 Function None 3
5: Label
15: 12(int) Load 14(gl_SubgroupSize)
18: 17(ptr) AccessChain 10(data) 11 15
Store 18 16
20: 12(int) Load 19(gl_SubgroupInvocationID)
21: 17(ptr) AccessChain 10(data) 11 20
Store 21 16
23: 12(int) Load 22(gl_NumSubgroups)
24: 17(ptr) AccessChain 10(data) 11 23
Store 24 16
26: 12(int) Load 25(gl_SubgroupID)
29: 27(bool) GroupNonUniformElect 28
30: 6(int) Select 29 16 11
31: 17(ptr) AccessChain 10(data) 11 26
Store 31 30
ControlBarrier 28 32 33
MemoryBarrier 28 34
MemoryBarrier 28 35
MemoryBarrier 28 36
MemoryBarrier 28 37
Return
FunctionEnd