Don't remove SPIR-V blocks before codegen.
[platform/upstream/glslang.git] / Test / baseResults / spv.atomic.comp.out
1 spv.atomic.comp
2 Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
3
4
5 Linked compute stage:
6
7
8 TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?
9 // Module Version 10000
10 // Generated by (magic number): 80001
11 // Id's are bound by 75
12
13                               Capability Shader
14                1:             ExtInstImport  "GLSL.std.450"
15                               MemoryModel Logical GLSL450
16                               EntryPoint GLCompute 4  "main"
17                               ExecutionMode 4 LocalSize 1 1 1
18                               Source ESSL 310
19                               Name 4  "main"
20                               Name 10  "func(au1;"
21                               Name 9  "c"
22                               Name 12  "atoms("
23                               Name 21  "counter"
24                               Name 22  "param"
25                               Name 25  "val"
26                               Name 29  "countArr"
27                               Name 36  "origi"
28                               Name 38  "atomi"
29                               Name 41  "origu"
30                               Name 43  "atomu"
31                               Name 45  "value"
32                               Name 62  "dataSSB"
33                               MemberName 62(dataSSB) 0  "f"
34                               MemberName 62(dataSSB) 1  "n_frames_rendered"
35                               Name 64  "result"
36                               Name 72  "arrX"
37                               Name 73  "arrY"
38                               Name 74  "arrZ"
39                               Decorate 21(counter) Binding 0
40                               Decorate 29(countArr) Binding 0
41                               MemberDecorate 62(dataSSB) 0 Offset 0
42                               MemberDecorate 62(dataSSB) 1 Offset 16
43                               Decorate 62(dataSSB) BufferBlock
44                               Decorate 64(result) Binding 0
45                2:             TypeVoid
46                3:             TypeFunction 2
47                6:             TypeInt 32 0
48                7:             TypePointer Function 6(int)
49                8:             TypeFunction 6(int) 7(ptr)
50               14:      6(int) Constant 1
51               15:      6(int) Constant 0
52               19:      6(int) Constant 1024
53               20:             TypePointer AtomicCounter 6(int)
54      21(counter):     20(ptr) Variable AtomicCounter
55               26:      6(int) Constant 4
56               27:             TypeArray 6(int) 26
57               28:             TypePointer AtomicCounter 27
58     29(countArr):     28(ptr) Variable AtomicCounter
59               30:             TypeInt 32 1
60               31:     30(int) Constant 2
61               35:             TypePointer Function 30(int)
62               37:             TypePointer Workgroup 30(int)
63        38(atomi):     37(ptr) Variable Workgroup
64               39:     30(int) Constant 3
65               42:             TypePointer Workgroup 6(int)
66        43(atomu):     42(ptr) Variable Workgroup
67               44:             TypePointer UniformConstant 6(int)
68        45(value):     44(ptr) Variable UniformConstant
69               48:      6(int) Constant 7
70               53:     30(int) Constant 7
71               57:      6(int) Constant 10
72               60:             TypeFloat 32
73               61:             TypeVector 30(int) 4
74      62(dataSSB):             TypeStruct 60(float) 61(ivec4)
75               63:             TypePointer Uniform 62(dataSSB)
76       64(result):     63(ptr) Variable Uniform
77               65:     30(int) Constant 1
78               66:      6(int) Constant 2
79               67:             TypePointer Uniform 30(int)
80               70:             TypeArray 30(int) 14
81               71:             TypePointer Private 70
82         72(arrX):     71(ptr) Variable Private
83         73(arrY):     71(ptr) Variable Private
84         74(arrZ):     71(ptr) Variable Private
85          4(main):           2 Function None 3
86                5:             Label
87        22(param):      7(ptr) Variable Function
88          25(val):      7(ptr) Variable Function
89                               MemoryBarrier 14 19
90               23:      6(int) Load 21(counter)
91                               Store 22(param) 23
92               24:      6(int) FunctionCall 10(func(au1;) 22(param)
93               32:     20(ptr) AccessChain 29(countArr) 31
94               33:      6(int) AtomicLoad 32 14 15
95                               Store 25(val) 33
96               34:      6(int) AtomicIDecrement 21(counter) 14 15
97                               Return
98                               FunctionEnd
99    10(func(au1;):      6(int) Function None 8
100             9(c):      7(ptr) FunctionParameter
101               11:             Label
102               16:      6(int) AtomicIIncrement 9(c) 14 15
103                               ReturnValue 16
104                               FunctionEnd
105       12(atoms():           2 Function None 3
106               13:             Label
107        36(origi):     35(ptr) Variable Function
108        41(origu):      7(ptr) Variable Function
109               40:     30(int) AtomicIAdd 38(atomi) 14 15 39
110                               Store 36(origi) 40
111               46:      6(int) Load 45(value)
112               47:      6(int) AtomicAnd 43(atomu) 14 15 46
113                               Store 41(origu) 47
114               49:      6(int) AtomicOr 43(atomu) 14 15 48
115                               Store 41(origu) 49
116               50:      6(int) AtomicXor 43(atomu) 14 15 48
117                               Store 41(origu) 50
118               51:      6(int) Load 45(value)
119               52:      6(int) AtomicUMin 43(atomu) 14 15 51
120                               Store 41(origu) 52
121               54:     30(int) AtomicSMax 38(atomi) 14 15 53
122                               Store 36(origi) 54
123               55:     30(int) Load 36(origi)
124               56:     30(int) AtomicExchange 38(atomi) 14 15 55
125                               Store 36(origi) 56
126               58:      6(int) Load 45(value)
127               59:      6(int) AtomicCompareExchange 43(atomu) 14 15 15 58 57
128                               Store 41(origu) 59
129               68:     67(ptr) AccessChain 64(result) 65 66
130               69:     30(int) AtomicIAdd 68 14 15 65
131                               Return
132                               FunctionEnd