Sfoglia il codice sorgente

Fix memory semantics validation rules according to the spec (#4008)

This commit updates memory semantics validation rules to match
Vulkan specification update
https://github.com/KhronosGroup/Vulkan-Docs/pull/2528
and spirv-tools update
https://github.com/KhronosGroup/SPIRV-Tools/pull/6096

Signed-off-by: Natalia Gavrilenko <[email protected]>
natgavrilenko 1 mese fa
parent
commit
579d34d5a7

+ 593 - 587
Test/baseResults/spv.atomicFloat.comp.out

@@ -2,7 +2,7 @@ spv.atomicFloat.comp
 Validation failed
 Validation failed
 // Module Version 10300
 // Module Version 10300
 // Generated by (magic number): 8000b
 // Generated by (magic number): 8000b
-// Id's are bound by 470
+// Id's are bound by 476
 
 
                               Capability Shader
                               Capability Shader
                               Capability Float64
                               Capability Float64
@@ -29,38 +29,38 @@ Validation failed
                               MemberName 25(Buffer) 0  "dataf"
                               MemberName 25(Buffer) 0  "dataf"
                               MemberName 25(Buffer) 1  "datad"
                               MemberName 25(Buffer) 1  "datad"
                               Name 27  "buf"
                               Name 27  "buf"
-                              Name 34  "resultd"
-                              Name 37  "atomd"
-                              Name 143  "fimage1D"
-                              Name 189  "fimage1DArray"
-                              Name 232  "fimage2D"
-                              Name 270  "fimage2DRect"
-                              Name 308  "fimage2DArray"
-                              Name 352  "fimageCube"
-                              Name 392  "fimageCubeArray"
-                              Name 430  "fimage3D"
+                              Name 35  "resultd"
+                              Name 38  "atomd"
+                              Name 148  "fimage1D"
+                              Name 195  "fimage1DArray"
+                              Name 238  "fimage2D"
+                              Name 276  "fimage2DRect"
+                              Name 314  "fimage2DArray"
+                              Name 358  "fimageCube"
+                              Name 398  "fimageCubeArray"
+                              Name 436  "fimage3D"
                               Decorate 25(Buffer) Block
                               Decorate 25(Buffer) Block
                               MemberDecorate 25(Buffer) 0 Offset 0
                               MemberDecorate 25(Buffer) 0 Offset 0
                               MemberDecorate 25(Buffer) 1 Offset 8
                               MemberDecorate 25(Buffer) 1 Offset 8
                               Decorate 27(buf) Binding 0
                               Decorate 27(buf) Binding 0
                               Decorate 27(buf) DescriptorSet 0
                               Decorate 27(buf) DescriptorSet 0
-                              Decorate 143(fimage1D) Binding 0
-                              Decorate 143(fimage1D) DescriptorSet 0
-                              Decorate 189(fimage1DArray) Binding 1
-                              Decorate 189(fimage1DArray) DescriptorSet 0
-                              Decorate 232(fimage2D) Binding 2
-                              Decorate 232(fimage2D) DescriptorSet 0
-                              Decorate 270(fimage2DRect) Binding 4
-                              Decorate 270(fimage2DRect) DescriptorSet 0
-                              Decorate 308(fimage2DArray) Binding 3
-                              Decorate 308(fimage2DArray) DescriptorSet 0
-                              Decorate 352(fimageCube) Binding 5
-                              Decorate 352(fimageCube) DescriptorSet 0
-                              Decorate 392(fimageCubeArray) Binding 6
-                              Decorate 392(fimageCubeArray) DescriptorSet 0
-                              Decorate 430(fimage3D) Binding 9
-                              Decorate 430(fimage3D) DescriptorSet 0
-                              Decorate 469 BuiltIn WorkgroupSize
+                              Decorate 148(fimage1D) Binding 0
+                              Decorate 148(fimage1D) DescriptorSet 0
+                              Decorate 195(fimage1DArray) Binding 1
+                              Decorate 195(fimage1DArray) DescriptorSet 0
+                              Decorate 238(fimage2D) Binding 2
+                              Decorate 238(fimage2D) DescriptorSet 0
+                              Decorate 276(fimage2DRect) Binding 4
+                              Decorate 276(fimage2DRect) DescriptorSet 0
+                              Decorate 314(fimage2DArray) Binding 3
+                              Decorate 314(fimage2DArray) DescriptorSet 0
+                              Decorate 358(fimageCube) Binding 5
+                              Decorate 358(fimageCube) DescriptorSet 0
+                              Decorate 398(fimageCubeArray) Binding 6
+                              Decorate 398(fimageCubeArray) DescriptorSet 0
+                              Decorate 436(fimage3D) Binding 9
+                              Decorate 436(fimage3D) DescriptorSet 0
+                              Decorate 475 BuiltIn WorkgroupSize
                2:             TypeVoid
                2:             TypeVoid
                3:             TypeFunction 2
                3:             TypeFunction 2
                6:             TypeFloat 32
                6:             TypeFloat 32
@@ -76,576 +76,582 @@ Validation failed
               18:             TypeInt 32 1
               18:             TypeInt 32 1
               19:     18(int) Constant 1
               19:     18(int) Constant 1
               20:     18(int) Constant 64
               20:     18(int) Constant 64
-              21:     18(int) Constant 0
-              22:     13(int) Constant 64
+              21:     18(int) Constant 8
+              22:     13(int) Constant 72
               24:             TypeFloat 64
               24:             TypeFloat 64
       25(Buffer):             TypeStruct 6(float) 24(float64_t)
       25(Buffer):             TypeStruct 6(float) 24(float64_t)
               26:             TypePointer StorageBuffer 25(Buffer)
               26:             TypePointer StorageBuffer 25(Buffer)
          27(buf):     26(ptr) Variable StorageBuffer
          27(buf):     26(ptr) Variable StorageBuffer
-              28:             TypePointer StorageBuffer 6(float)
-              33:             TypePointer Function 24(float64_t)
-              35:24(float64_t) Constant 0 0
-              36:             TypePointer Workgroup 24(float64_t)
-       37(atomd):     36(ptr) Variable Workgroup
-              38:24(float64_t) Constant 0 1074266112
-              40:24(float64_t) Constant 0 1074921472
-              42:             TypePointer StorageBuffer 24(float64_t)
-              57:     18(int) Constant 256
-              58:     13(int) Constant 256
-             141:             TypeImage 6(float) 1D nonsampled format:R32f
-             142:             TypePointer UniformConstant 141
-   143(fimage1D):    142(ptr) Variable UniformConstant
-             144:    6(float) Constant 1073741824
-             145:             TypePointer Image 6(float)
-             147:     13(int) Constant 32768
-             149:     13(int) Constant 2
-             155:     18(int) Constant 2048
-             157:     13(int) Constant 2048
-             164:    6(float) Constant 1082130432
-             179:     18(int) Constant 2
-             187:             TypeImage 6(float) 1D array nonsampled format:R32f
-             188:             TypePointer UniformConstant 187
-189(fimage1DArray):    188(ptr) Variable UniformConstant
-             190:             TypeVector 18(int) 2
-             191:  190(ivec2) ConstantComposite 21 21
-             199:  190(ivec2) ConstantComposite 19 19
-             207:  190(ivec2) ConstantComposite 19 21
-             222:  190(ivec2) ConstantComposite 179 179
-             230:             TypeImage 6(float) 2D nonsampled format:R32f
-             231:             TypePointer UniformConstant 230
-   232(fimage2D):    231(ptr) Variable UniformConstant
-             268:             TypeImage 6(float) Rect nonsampled format:R32f
-             269:             TypePointer UniformConstant 268
-270(fimage2DRect):    269(ptr) Variable UniformConstant
-             306:             TypeImage 6(float) 2D array nonsampled format:R32f
-             307:             TypePointer UniformConstant 306
-308(fimage2DArray):    307(ptr) Variable UniformConstant
-             309:             TypeVector 18(int) 3
-             310:  309(ivec3) ConstantComposite 21 21 21
-             318:  309(ivec3) ConstantComposite 19 19 21
-             326:  309(ivec3) ConstantComposite 19 21 19
-             334:  309(ivec3) ConstantComposite 19 19 19
-             342:  309(ivec3) ConstantComposite 179 179 21
-             350:             TypeImage 6(float) Cube nonsampled format:R32f
-             351:             TypePointer UniformConstant 350
- 352(fimageCube):    351(ptr) Variable UniformConstant
-             367:  309(ivec3) ConstantComposite 19 21 21
-             382:  309(ivec3) ConstantComposite 179 179 19
-             390:             TypeImage 6(float) Cube array nonsampled format:R32f
-             391:             TypePointer UniformConstant 390
-392(fimageCubeArray):    391(ptr) Variable UniformConstant
-             428:             TypeImage 6(float) 3D nonsampled format:R32f
-             429:             TypePointer UniformConstant 428
-   430(fimage3D):    429(ptr) Variable UniformConstant
-             466:             TypeVector 13(int) 3
-             467:     13(int) Constant 16
-             468:     13(int) Constant 1
-             469:  466(ivec3) ConstantComposite 467 467 468
+              28:     18(int) Constant 0
+              29:             TypePointer StorageBuffer 6(float)
+              34:             TypePointer Function 24(float64_t)
+              36:24(float64_t) Constant 0 0
+              37:             TypePointer Workgroup 24(float64_t)
+       38(atomd):     37(ptr) Variable Workgroup
+              39:24(float64_t) Constant 0 1074266112
+              41:24(float64_t) Constant 0 1074921472
+              43:             TypePointer StorageBuffer 24(float64_t)
+              58:     18(int) Constant 256
+              59:     13(int) Constant 264
+             111:     18(int) Constant 2
+             112:     13(int) Constant 258
+             116:     18(int) Constant 4
+             117:     13(int) Constant 260
+             146:             TypeImage 6(float) 1D nonsampled format:R32f
+             147:             TypePointer UniformConstant 146
+   148(fimage1D):    147(ptr) Variable UniformConstant
+             149:    6(float) Constant 1073741824
+             150:             TypePointer Image 6(float)
+             152:     13(int) Constant 32768
+             154:     13(int) Constant 2
+             160:     18(int) Constant 2048
+             162:     13(int) Constant 2056
+             169:    6(float) Constant 1082130432
+             178:     13(int) Constant 2050
+             187:     13(int) Constant 2052
+             193:             TypeImage 6(float) 1D array nonsampled format:R32f
+             194:             TypePointer UniformConstant 193
+195(fimage1DArray):    194(ptr) Variable UniformConstant
+             196:             TypeVector 18(int) 2
+             197:  196(ivec2) ConstantComposite 28 28
+             205:  196(ivec2) ConstantComposite 19 19
+             213:  196(ivec2) ConstantComposite 19 28
+             228:  196(ivec2) ConstantComposite 111 111
+             236:             TypeImage 6(float) 2D nonsampled format:R32f
+             237:             TypePointer UniformConstant 236
+   238(fimage2D):    237(ptr) Variable UniformConstant
+             274:             TypeImage 6(float) Rect nonsampled format:R32f
+             275:             TypePointer UniformConstant 274
+276(fimage2DRect):    275(ptr) Variable UniformConstant
+             312:             TypeImage 6(float) 2D array nonsampled format:R32f
+             313:             TypePointer UniformConstant 312
+314(fimage2DArray):    313(ptr) Variable UniformConstant
+             315:             TypeVector 18(int) 3
+             316:  315(ivec3) ConstantComposite 28 28 28
+             324:  315(ivec3) ConstantComposite 19 19 28
+             332:  315(ivec3) ConstantComposite 19 28 19
+             340:  315(ivec3) ConstantComposite 19 19 19
+             348:  315(ivec3) ConstantComposite 111 111 28
+             356:             TypeImage 6(float) Cube nonsampled format:R32f
+             357:             TypePointer UniformConstant 356
+ 358(fimageCube):    357(ptr) Variable UniformConstant
+             373:  315(ivec3) ConstantComposite 19 28 28
+             388:  315(ivec3) ConstantComposite 111 111 19
+             396:             TypeImage 6(float) Cube array nonsampled format:R32f
+             397:             TypePointer UniformConstant 396
+398(fimageCubeArray):    397(ptr) Variable UniformConstant
+             434:             TypeImage 6(float) 3D nonsampled format:R32f
+             435:             TypePointer UniformConstant 434
+   436(fimage3D):    435(ptr) Variable UniformConstant
+             472:             TypeVector 13(int) 3
+             473:     13(int) Constant 16
+             474:     13(int) Constant 1
+             475:  472(ivec3) ConstantComposite 473 473 474
          4(main):           2 Function None 3
          4(main):           2 Function None 3
                5:             Label
                5:             Label
       8(resultf):      7(ptr) Variable Function
       8(resultf):      7(ptr) Variable Function
-     34(resultd):     33(ptr) Variable Function
+     35(resultd):     34(ptr) Variable Function
                               Store 8(resultf) 9
                               Store 8(resultf) 9
               16:    6(float) AtomicFAddEXT 11(atomf) 14 15 12
               16:    6(float) AtomicFAddEXT 11(atomf) 14 15 12
                               Store 8(resultf) 16
                               Store 8(resultf) 16
               23:    6(float) AtomicFAddEXT 11(atomf) 19 22 17
               23:    6(float) AtomicFAddEXT 11(atomf) 19 22 17
                               Store 8(resultf) 23
                               Store 8(resultf) 23
-              29:     28(ptr) AccessChain 27(buf) 21
-              30:    6(float) AtomicFAddEXT 29 14 15 12
-                              Store 8(resultf) 30
-              31:     28(ptr) AccessChain 27(buf) 21
-              32:    6(float) AtomicFAddEXT 31 19 22 17
-                              Store 8(resultf) 32
-                              Store 34(resultd) 35
-              39:24(float64_t) AtomicFAddEXT 37(atomd) 14 15 38
-                              Store 34(resultd) 39
-              41:24(float64_t) AtomicFAddEXT 37(atomd) 19 22 40
-                              Store 34(resultd) 41
-              43:     42(ptr) AccessChain 27(buf) 19
-              44:24(float64_t) AtomicFAddEXT 43 14 15 38
-                              Store 34(resultd) 44
-              45:     42(ptr) AccessChain 27(buf) 19
-              46:24(float64_t) AtomicFAddEXT 45 19 22 40
-                              Store 34(resultd) 46
-              47:     28(ptr) AccessChain 27(buf) 21
-              48:    6(float) Load 8(resultf)
-              49:    6(float) AtomicExchange 47 14 15 48
-                              Store 8(resultf) 49
-              50:    6(float) Load 8(resultf)
-              51:     28(ptr) AccessChain 27(buf) 21
-              52:    6(float) Load 51
-              53:    6(float) FAdd 52 50
-              54:     28(ptr) AccessChain 27(buf) 21
-                              Store 54 53
-              55:     28(ptr) AccessChain 27(buf) 21
-              56:    6(float) Load 8(resultf)
-              59:    6(float) AtomicExchange 55 19 58 56
-                              Store 8(resultf) 59
-              60:    6(float) Load 8(resultf)
-              61:     28(ptr) AccessChain 27(buf) 21
-              62:    6(float) Load 61
-              63:    6(float) FAdd 62 60
-              64:     28(ptr) AccessChain 27(buf) 21
-                              Store 64 63
-              65:    6(float) Load 8(resultf)
-              66:    6(float) AtomicExchange 11(atomf) 14 15 65
-                              Store 8(resultf) 66
-              67:    6(float) Load 8(resultf)
-              68:     28(ptr) AccessChain 27(buf) 21
-              69:    6(float) Load 68
-              70:    6(float) FAdd 69 67
-              71:     28(ptr) AccessChain 27(buf) 21
-                              Store 71 70
-              72:    6(float) Load 8(resultf)
-              73:    6(float) AtomicExchange 11(atomf) 19 58 72
-                              Store 8(resultf) 73
-              74:    6(float) Load 8(resultf)
-              75:     28(ptr) AccessChain 27(buf) 21
-              76:    6(float) Load 75
-              77:    6(float) FAdd 76 74
-              78:     28(ptr) AccessChain 27(buf) 21
-                              Store 78 77
-              79:     42(ptr) AccessChain 27(buf) 19
-              80:24(float64_t) Load 34(resultd)
-              81:24(float64_t) AtomicExchange 79 14 15 80
-                              Store 34(resultd) 81
-              82:24(float64_t) Load 34(resultd)
-              83:     42(ptr) AccessChain 27(buf) 19
-              84:24(float64_t) Load 83
-              85:24(float64_t) FAdd 84 82
-              86:     42(ptr) AccessChain 27(buf) 19
-                              Store 86 85
-              87:     42(ptr) AccessChain 27(buf) 19
-              88:24(float64_t) Load 34(resultd)
-              89:24(float64_t) AtomicExchange 87 19 58 88
-                              Store 34(resultd) 89
-              90:24(float64_t) Load 34(resultd)
-              91:     42(ptr) AccessChain 27(buf) 19
-              92:24(float64_t) Load 91
-              93:24(float64_t) FAdd 92 90
-              94:     42(ptr) AccessChain 27(buf) 19
-                              Store 94 93
-              95:24(float64_t) Load 34(resultd)
-              96:24(float64_t) AtomicExchange 37(atomd) 14 15 95
-                              Store 34(resultd) 96
-              97:24(float64_t) Load 34(resultd)
-              98:     42(ptr) AccessChain 27(buf) 19
-              99:24(float64_t) Load 98
-             100:24(float64_t) FAdd 99 97
-             101:     42(ptr) AccessChain 27(buf) 19
-                              Store 101 100
-             102:24(float64_t) Load 34(resultd)
-             103:24(float64_t) AtomicExchange 37(atomd) 19 58 102
-                              Store 34(resultd) 103
-             104:24(float64_t) Load 34(resultd)
-             105:     42(ptr) AccessChain 27(buf) 19
-             106:24(float64_t) Load 105
-             107:24(float64_t) FAdd 106 104
-             108:     42(ptr) AccessChain 27(buf) 19
-                              Store 108 107
-             109:     28(ptr) AccessChain 27(buf) 21
-             110:    6(float) AtomicLoad 109 19 58
-                              Store 8(resultf) 110
-             111:     28(ptr) AccessChain 27(buf) 21
-             112:    6(float) Load 8(resultf)
-                              AtomicStore 111 19 58 112
-             113:    6(float) Load 8(resultf)
-             114:     28(ptr) AccessChain 27(buf) 21
-             115:    6(float) Load 114
-             116:    6(float) FAdd 115 113
-             117:     28(ptr) AccessChain 27(buf) 21
-                              Store 117 116
-             118:    6(float) AtomicLoad 11(atomf) 19 58
-                              Store 8(resultf) 118
-             119:    6(float) Load 8(resultf)
-                              AtomicStore 11(atomf) 19 58 119
-             120:    6(float) Load 8(resultf)
-             121:     28(ptr) AccessChain 27(buf) 21
-             122:    6(float) Load 121
-             123:    6(float) FAdd 122 120
-             124:     28(ptr) AccessChain 27(buf) 21
-                              Store 124 123
-             125:     42(ptr) AccessChain 27(buf) 19
-             126:24(float64_t) AtomicLoad 125 19 58
-                              Store 34(resultd) 126
-             127:     42(ptr) AccessChain 27(buf) 19
-             128:24(float64_t) Load 34(resultd)
-                              AtomicStore 127 19 58 128
-             129:24(float64_t) Load 34(resultd)
-             130:     42(ptr) AccessChain 27(buf) 19
-             131:24(float64_t) Load 130
-             132:24(float64_t) FAdd 131 129
-             133:     42(ptr) AccessChain 27(buf) 19
-                              Store 133 132
-             134:24(float64_t) AtomicLoad 37(atomd) 19 58
-                              Store 34(resultd) 134
-             135:24(float64_t) Load 34(resultd)
-                              AtomicStore 37(atomd) 19 58 135
-             136:24(float64_t) Load 34(resultd)
-             137:     42(ptr) AccessChain 27(buf) 19
-             138:24(float64_t) Load 137
-             139:24(float64_t) FAdd 138 136
-             140:     42(ptr) AccessChain 27(buf) 19
-                              Store 140 139
-             146:    145(ptr) ImageTexelPointer 143(fimage1D) 21 15
-             148:    6(float) AtomicFAddEXT 146 14 147 144
-                              Store 11(atomf) 148 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             150:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             151:     28(ptr) AccessChain 27(buf) 21
-             152:    6(float) Load 151
-             153:    6(float) FAdd 152 150
-             154:     28(ptr) AccessChain 27(buf) 21
-                              Store 154 153
-             156:    145(ptr) ImageTexelPointer 143(fimage1D) 19 15
-             158:    6(float) AtomicFAddEXT 156 19 157 12
-                              Store 11(atomf) 158 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             159:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             160:     28(ptr) AccessChain 27(buf) 21
-             161:    6(float) Load 160
-             162:    6(float) FAdd 161 159
-             163:     28(ptr) AccessChain 27(buf) 21
-                              Store 163 162
-             165:    145(ptr) ImageTexelPointer 143(fimage1D) 19 15
-             166:    6(float) AtomicExchange 165 19 157 164
-                              Store 11(atomf) 166 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             167:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             168:     28(ptr) AccessChain 27(buf) 21
-             169:    6(float) Load 168
-             170:    6(float) FAdd 169 167
-             171:     28(ptr) AccessChain 27(buf) 21
-                              Store 171 170
-             172:    145(ptr) ImageTexelPointer 143(fimage1D) 19 15
-             173:    6(float) AtomicLoad 172 19 157
-                              Store 11(atomf) 173 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             174:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             175:     28(ptr) AccessChain 27(buf) 21
-             176:    6(float) Load 175
-             177:    6(float) FAdd 176 174
-             178:     28(ptr) AccessChain 27(buf) 21
-                              Store 178 177
-             180:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             181:    145(ptr) ImageTexelPointer 143(fimage1D) 179 15
-                              AtomicStore 181 19 157 180
-             182:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             183:     28(ptr) AccessChain 27(buf) 21
-             184:    6(float) Load 183
-             185:    6(float) FAdd 184 182
-             186:     28(ptr) AccessChain 27(buf) 21
-                              Store 186 185
-             192:    145(ptr) ImageTexelPointer 189(fimage1DArray) 191 15
-             193:    6(float) AtomicFAddEXT 192 14 147 144
-                              Store 11(atomf) 193 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             194:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             195:     28(ptr) AccessChain 27(buf) 21
-             196:    6(float) Load 195
-             197:    6(float) FAdd 196 194
-             198:     28(ptr) AccessChain 27(buf) 21
-                              Store 198 197
-             200:    145(ptr) ImageTexelPointer 189(fimage1DArray) 199 15
-             201:    6(float) AtomicFAddEXT 200 19 157 12
-                              Store 11(atomf) 201 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             202:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             203:     28(ptr) AccessChain 27(buf) 21
-             204:    6(float) Load 203
-             205:    6(float) FAdd 204 202
-             206:     28(ptr) AccessChain 27(buf) 21
-                              Store 206 205
-             208:    145(ptr) ImageTexelPointer 189(fimage1DArray) 207 15
-             209:    6(float) AtomicExchange 208 19 157 164
-                              Store 11(atomf) 209 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             210:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             211:     28(ptr) AccessChain 27(buf) 21
-             212:    6(float) Load 211
-             213:    6(float) FAdd 212 210
-             214:     28(ptr) AccessChain 27(buf) 21
-                              Store 214 213
-             215:    145(ptr) ImageTexelPointer 189(fimage1DArray) 199 15
-             216:    6(float) AtomicLoad 215 19 157
-                              Store 11(atomf) 216 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             217:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             218:     28(ptr) AccessChain 27(buf) 21
-             219:    6(float) Load 218
-             220:    6(float) FAdd 219 217
-             221:     28(ptr) AccessChain 27(buf) 21
-                              Store 221 220
-             223:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             224:    145(ptr) ImageTexelPointer 189(fimage1DArray) 222 15
-                              AtomicStore 224 19 157 223
-             225:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             226:     28(ptr) AccessChain 27(buf) 21
-             227:    6(float) Load 226
-             228:    6(float) FAdd 227 225
-             229:     28(ptr) AccessChain 27(buf) 21
-                              Store 229 228
-             233:    145(ptr) ImageTexelPointer 232(fimage2D) 191 15
-             234:    6(float) AtomicFAddEXT 233 14 147 144
-                              Store 11(atomf) 234 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             235:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             236:     28(ptr) AccessChain 27(buf) 21
-             237:    6(float) Load 236
-             238:    6(float) FAdd 237 235
-             239:     28(ptr) AccessChain 27(buf) 21
-                              Store 239 238
-             240:    145(ptr) ImageTexelPointer 232(fimage2D) 199 15
-             241:    6(float) AtomicFAddEXT 240 19 157 12
-                              Store 11(atomf) 241 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             242:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             243:     28(ptr) AccessChain 27(buf) 21
-             244:    6(float) Load 243
-             245:    6(float) FAdd 244 242
-             246:     28(ptr) AccessChain 27(buf) 21
-                              Store 246 245
-             247:    145(ptr) ImageTexelPointer 232(fimage2D) 207 15
-             248:    6(float) AtomicExchange 247 19 157 164
-                              Store 11(atomf) 248 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             249:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             250:     28(ptr) AccessChain 27(buf) 21
-             251:    6(float) Load 250
-             252:    6(float) FAdd 251 249
-             253:     28(ptr) AccessChain 27(buf) 21
-                              Store 253 252
-             254:    145(ptr) ImageTexelPointer 232(fimage2D) 199 15
-             255:    6(float) AtomicLoad 254 19 157
-                              Store 11(atomf) 255 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             256:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             257:     28(ptr) AccessChain 27(buf) 21
-             258:    6(float) Load 257
-             259:    6(float) FAdd 258 256
-             260:     28(ptr) AccessChain 27(buf) 21
-                              Store 260 259
-             261:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             262:    145(ptr) ImageTexelPointer 232(fimage2D) 222 15
-                              AtomicStore 262 19 157 261
-             263:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             264:     28(ptr) AccessChain 27(buf) 21
-             265:    6(float) Load 264
-             266:    6(float) FAdd 265 263
-             267:     28(ptr) AccessChain 27(buf) 21
-                              Store 267 266
-             271:    145(ptr) ImageTexelPointer 270(fimage2DRect) 191 15
-             272:    6(float) AtomicFAddEXT 271 14 147 144
-                              Store 11(atomf) 272 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             273:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             274:     28(ptr) AccessChain 27(buf) 21
-             275:    6(float) Load 274
-             276:    6(float) FAdd 275 273
-             277:     28(ptr) AccessChain 27(buf) 21
-                              Store 277 276
-             278:    145(ptr) ImageTexelPointer 270(fimage2DRect) 199 15
-             279:    6(float) AtomicFAddEXT 278 19 157 12
-                              Store 11(atomf) 279 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             280:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             281:     28(ptr) AccessChain 27(buf) 21
-             282:    6(float) Load 281
-             283:    6(float) FAdd 282 280
-             284:     28(ptr) AccessChain 27(buf) 21
-                              Store 284 283
-             285:    145(ptr) ImageTexelPointer 270(fimage2DRect) 207 15
-             286:    6(float) AtomicExchange 285 19 157 164
-                              Store 11(atomf) 286 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             287:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             288:     28(ptr) AccessChain 27(buf) 21
-             289:    6(float) Load 288
-             290:    6(float) FAdd 289 287
-             291:     28(ptr) AccessChain 27(buf) 21
-                              Store 291 290
-             292:    145(ptr) ImageTexelPointer 270(fimage2DRect) 199 15
-             293:    6(float) AtomicLoad 292 19 157
-                              Store 11(atomf) 293 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             294:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             295:     28(ptr) AccessChain 27(buf) 21
-             296:    6(float) Load 295
-             297:    6(float) FAdd 296 294
-             298:     28(ptr) AccessChain 27(buf) 21
-                              Store 298 297
-             299:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             300:    145(ptr) ImageTexelPointer 270(fimage2DRect) 222 15
-                              AtomicStore 300 19 157 299
-             301:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             302:     28(ptr) AccessChain 27(buf) 21
-             303:    6(float) Load 302
-             304:    6(float) FAdd 303 301
-             305:     28(ptr) AccessChain 27(buf) 21
-                              Store 305 304
-             311:    145(ptr) ImageTexelPointer 308(fimage2DArray) 310 15
-             312:    6(float) AtomicFAddEXT 311 14 147 144
-                              Store 11(atomf) 312 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             313:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             314:     28(ptr) AccessChain 27(buf) 21
-             315:    6(float) Load 314
-             316:    6(float) FAdd 315 313
-             317:     28(ptr) AccessChain 27(buf) 21
-                              Store 317 316
-             319:    145(ptr) ImageTexelPointer 308(fimage2DArray) 318 15
-             320:    6(float) AtomicFAddEXT 319 19 157 12
-                              Store 11(atomf) 320 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             321:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             322:     28(ptr) AccessChain 27(buf) 21
-             323:    6(float) Load 322
-             324:    6(float) FAdd 323 321
-             325:     28(ptr) AccessChain 27(buf) 21
-                              Store 325 324
-             327:    145(ptr) ImageTexelPointer 308(fimage2DArray) 326 15
-             328:    6(float) AtomicExchange 327 19 157 164
-                              Store 11(atomf) 328 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             329:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             330:     28(ptr) AccessChain 27(buf) 21
-             331:    6(float) Load 330
-             332:    6(float) FAdd 331 329
-             333:     28(ptr) AccessChain 27(buf) 21
-                              Store 333 332
-             335:    145(ptr) ImageTexelPointer 308(fimage2DArray) 334 15
-             336:    6(float) AtomicLoad 335 19 157
-                              Store 11(atomf) 336 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             337:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             338:     28(ptr) AccessChain 27(buf) 21
-             339:    6(float) Load 338
-             340:    6(float) FAdd 339 337
-             341:     28(ptr) AccessChain 27(buf) 21
-                              Store 341 340
-             343:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             344:    145(ptr) ImageTexelPointer 308(fimage2DArray) 342 15
-                              AtomicStore 344 19 157 343
-             345:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             346:     28(ptr) AccessChain 27(buf) 21
-             347:    6(float) Load 346
-             348:    6(float) FAdd 347 345
-             349:     28(ptr) AccessChain 27(buf) 21
-                              Store 349 348
-             353:    145(ptr) ImageTexelPointer 352(fimageCube) 310 15
-             354:    6(float) AtomicFAddEXT 353 14 147 144
-                              Store 11(atomf) 354 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             355:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             356:     28(ptr) AccessChain 27(buf) 21
-             357:    6(float) Load 356
-             358:    6(float) FAdd 357 355
-             359:     28(ptr) AccessChain 27(buf) 21
-                              Store 359 358
-             360:    145(ptr) ImageTexelPointer 352(fimageCube) 318 15
-             361:    6(float) AtomicFAddEXT 360 19 157 12
-                              Store 11(atomf) 361 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             362:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             363:     28(ptr) AccessChain 27(buf) 21
-             364:    6(float) Load 363
-             365:    6(float) FAdd 364 362
-             366:     28(ptr) AccessChain 27(buf) 21
-                              Store 366 365
-             368:    145(ptr) ImageTexelPointer 352(fimageCube) 367 15
-             369:    6(float) AtomicExchange 368 19 157 164
-                              Store 11(atomf) 369 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             370:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             371:     28(ptr) AccessChain 27(buf) 21
-             372:    6(float) Load 371
-             373:    6(float) FAdd 372 370
-             374:     28(ptr) AccessChain 27(buf) 21
-                              Store 374 373
-             375:    145(ptr) ImageTexelPointer 352(fimageCube) 334 15
-             376:    6(float) AtomicLoad 375 19 157
-                              Store 11(atomf) 376 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             377:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             378:     28(ptr) AccessChain 27(buf) 21
-             379:    6(float) Load 378
-             380:    6(float) FAdd 379 377
-             381:     28(ptr) AccessChain 27(buf) 21
-                              Store 381 380
-             383:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             384:    145(ptr) ImageTexelPointer 352(fimageCube) 382 15
-                              AtomicStore 384 19 157 383
-             385:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             386:     28(ptr) AccessChain 27(buf) 21
-             387:    6(float) Load 386
-             388:    6(float) FAdd 387 385
-             389:     28(ptr) AccessChain 27(buf) 21
-                              Store 389 388
-             393:    145(ptr) ImageTexelPointer 392(fimageCubeArray) 310 15
-             394:    6(float) AtomicFAddEXT 393 14 147 144
-                              Store 11(atomf) 394 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             395:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             396:     28(ptr) AccessChain 27(buf) 21
-             397:    6(float) Load 396
-             398:    6(float) FAdd 397 395
-             399:     28(ptr) AccessChain 27(buf) 21
-                              Store 399 398
-             400:    145(ptr) ImageTexelPointer 392(fimageCubeArray) 318 15
-             401:    6(float) AtomicFAddEXT 400 19 157 12
-                              Store 11(atomf) 401 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             402:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             403:     28(ptr) AccessChain 27(buf) 21
-             404:    6(float) Load 403
-             405:    6(float) FAdd 404 402
-             406:     28(ptr) AccessChain 27(buf) 21
-                              Store 406 405
-             407:    145(ptr) ImageTexelPointer 392(fimageCubeArray) 326 15
-             408:    6(float) AtomicExchange 407 19 157 164
-                              Store 11(atomf) 408 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             409:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             410:     28(ptr) AccessChain 27(buf) 21
-             411:    6(float) Load 410
-             412:    6(float) FAdd 411 409
-             413:     28(ptr) AccessChain 27(buf) 21
-                              Store 413 412
-             414:    145(ptr) ImageTexelPointer 392(fimageCubeArray) 334 15
-             415:    6(float) AtomicLoad 414 19 157
-                              Store 11(atomf) 415 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             416:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             417:     28(ptr) AccessChain 27(buf) 21
-             418:    6(float) Load 417
-             419:    6(float) FAdd 418 416
-             420:     28(ptr) AccessChain 27(buf) 21
-                              Store 420 419
-             421:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             422:    145(ptr) ImageTexelPointer 392(fimageCubeArray) 342 15
-                              AtomicStore 422 19 157 421
-             423:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             424:     28(ptr) AccessChain 27(buf) 21
-             425:    6(float) Load 424
-             426:    6(float) FAdd 425 423
-             427:     28(ptr) AccessChain 27(buf) 21
-                              Store 427 426
-             431:    145(ptr) ImageTexelPointer 430(fimage3D) 310 15
-             432:    6(float) AtomicFAddEXT 431 14 147 144
-                              Store 11(atomf) 432 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             433:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             434:     28(ptr) AccessChain 27(buf) 21
-             435:    6(float) Load 434
-             436:    6(float) FAdd 435 433
-             437:     28(ptr) AccessChain 27(buf) 21
-                              Store 437 436
-             438:    145(ptr) ImageTexelPointer 430(fimage3D) 318 15
-             439:    6(float) AtomicFAddEXT 438 19 157 12
-                              Store 11(atomf) 439 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             440:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             441:     28(ptr) AccessChain 27(buf) 21
-             442:    6(float) Load 441
-             443:    6(float) FAdd 442 440
-             444:     28(ptr) AccessChain 27(buf) 21
-                              Store 444 443
-             445:    145(ptr) ImageTexelPointer 430(fimage3D) 326 15
-             446:    6(float) AtomicExchange 445 19 157 164
-                              Store 11(atomf) 446 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             447:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             448:     28(ptr) AccessChain 27(buf) 21
-             449:    6(float) Load 448
-             450:    6(float) FAdd 449 447
-             451:     28(ptr) AccessChain 27(buf) 21
-                              Store 451 450
-             452:    145(ptr) ImageTexelPointer 430(fimage3D) 334 15
-             453:    6(float) AtomicLoad 452 19 157
-                              Store 11(atomf) 453 MakePointerAvailableKHR NonPrivatePointerKHR 149
-             454:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             455:     28(ptr) AccessChain 27(buf) 21
-             456:    6(float) Load 455
-             457:    6(float) FAdd 456 454
-             458:     28(ptr) AccessChain 27(buf) 21
-                              Store 458 457
-             459:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             460:    145(ptr) ImageTexelPointer 430(fimage3D) 342 15
-                              AtomicStore 460 19 157 459
-             461:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
-             462:     28(ptr) AccessChain 27(buf) 21
-             463:    6(float) Load 462
-             464:    6(float) FAdd 463 461
-             465:     28(ptr) AccessChain 27(buf) 21
-                              Store 465 464
+              30:     29(ptr) AccessChain 27(buf) 28
+              31:    6(float) AtomicFAddEXT 30 14 15 12
+                              Store 8(resultf) 31
+              32:     29(ptr) AccessChain 27(buf) 28
+              33:    6(float) AtomicFAddEXT 32 19 22 17
+                              Store 8(resultf) 33
+                              Store 35(resultd) 36
+              40:24(float64_t) AtomicFAddEXT 38(atomd) 14 15 39
+                              Store 35(resultd) 40
+              42:24(float64_t) AtomicFAddEXT 38(atomd) 19 22 41
+                              Store 35(resultd) 42
+              44:     43(ptr) AccessChain 27(buf) 19
+              45:24(float64_t) AtomicFAddEXT 44 14 15 39
+                              Store 35(resultd) 45
+              46:     43(ptr) AccessChain 27(buf) 19
+              47:24(float64_t) AtomicFAddEXT 46 19 22 41
+                              Store 35(resultd) 47
+              48:     29(ptr) AccessChain 27(buf) 28
+              49:    6(float) Load 8(resultf)
+              50:    6(float) AtomicExchange 48 14 15 49
+                              Store 8(resultf) 50
+              51:    6(float) Load 8(resultf)
+              52:     29(ptr) AccessChain 27(buf) 28
+              53:    6(float) Load 52
+              54:    6(float) FAdd 53 51
+              55:     29(ptr) AccessChain 27(buf) 28
+                              Store 55 54
+              56:     29(ptr) AccessChain 27(buf) 28
+              57:    6(float) Load 8(resultf)
+              60:    6(float) AtomicExchange 56 19 59 57
+                              Store 8(resultf) 60
+              61:    6(float) Load 8(resultf)
+              62:     29(ptr) AccessChain 27(buf) 28
+              63:    6(float) Load 62
+              64:    6(float) FAdd 63 61
+              65:     29(ptr) AccessChain 27(buf) 28
+                              Store 65 64
+              66:    6(float) Load 8(resultf)
+              67:    6(float) AtomicExchange 11(atomf) 14 15 66
+                              Store 8(resultf) 67
+              68:    6(float) Load 8(resultf)
+              69:     29(ptr) AccessChain 27(buf) 28
+              70:    6(float) Load 69
+              71:    6(float) FAdd 70 68
+              72:     29(ptr) AccessChain 27(buf) 28
+                              Store 72 71
+              73:    6(float) Load 8(resultf)
+              74:    6(float) AtomicExchange 11(atomf) 19 59 73
+                              Store 8(resultf) 74
+              75:    6(float) Load 8(resultf)
+              76:     29(ptr) AccessChain 27(buf) 28
+              77:    6(float) Load 76
+              78:    6(float) FAdd 77 75
+              79:     29(ptr) AccessChain 27(buf) 28
+                              Store 79 78
+              80:     43(ptr) AccessChain 27(buf) 19
+              81:24(float64_t) Load 35(resultd)
+              82:24(float64_t) AtomicExchange 80 14 15 81
+                              Store 35(resultd) 82
+              83:24(float64_t) Load 35(resultd)
+              84:     43(ptr) AccessChain 27(buf) 19
+              85:24(float64_t) Load 84
+              86:24(float64_t) FAdd 85 83
+              87:     43(ptr) AccessChain 27(buf) 19
+                              Store 87 86
+              88:     43(ptr) AccessChain 27(buf) 19
+              89:24(float64_t) Load 35(resultd)
+              90:24(float64_t) AtomicExchange 88 19 59 89
+                              Store 35(resultd) 90
+              91:24(float64_t) Load 35(resultd)
+              92:     43(ptr) AccessChain 27(buf) 19
+              93:24(float64_t) Load 92
+              94:24(float64_t) FAdd 93 91
+              95:     43(ptr) AccessChain 27(buf) 19
+                              Store 95 94
+              96:24(float64_t) Load 35(resultd)
+              97:24(float64_t) AtomicExchange 38(atomd) 14 15 96
+                              Store 35(resultd) 97
+              98:24(float64_t) Load 35(resultd)
+              99:     43(ptr) AccessChain 27(buf) 19
+             100:24(float64_t) Load 99
+             101:24(float64_t) FAdd 100 98
+             102:     43(ptr) AccessChain 27(buf) 19
+                              Store 102 101
+             103:24(float64_t) Load 35(resultd)
+             104:24(float64_t) AtomicExchange 38(atomd) 19 59 103
+                              Store 35(resultd) 104
+             105:24(float64_t) Load 35(resultd)
+             106:     43(ptr) AccessChain 27(buf) 19
+             107:24(float64_t) Load 106
+             108:24(float64_t) FAdd 107 105
+             109:     43(ptr) AccessChain 27(buf) 19
+                              Store 109 108
+             110:     29(ptr) AccessChain 27(buf) 28
+             113:    6(float) AtomicLoad 110 19 112
+                              Store 8(resultf) 113
+             114:     29(ptr) AccessChain 27(buf) 28
+             115:    6(float) Load 8(resultf)
+                              AtomicStore 114 19 117 115
+             118:    6(float) Load 8(resultf)
+             119:     29(ptr) AccessChain 27(buf) 28
+             120:    6(float) Load 119
+             121:    6(float) FAdd 120 118
+             122:     29(ptr) AccessChain 27(buf) 28
+                              Store 122 121
+             123:    6(float) AtomicLoad 11(atomf) 19 112
+                              Store 8(resultf) 123
+             124:    6(float) Load 8(resultf)
+                              AtomicStore 11(atomf) 19 117 124
+             125:    6(float) Load 8(resultf)
+             126:     29(ptr) AccessChain 27(buf) 28
+             127:    6(float) Load 126
+             128:    6(float) FAdd 127 125
+             129:     29(ptr) AccessChain 27(buf) 28
+                              Store 129 128
+             130:     43(ptr) AccessChain 27(buf) 19
+             131:24(float64_t) AtomicLoad 130 19 112
+                              Store 35(resultd) 131
+             132:     43(ptr) AccessChain 27(buf) 19
+             133:24(float64_t) Load 35(resultd)
+                              AtomicStore 132 19 117 133
+             134:24(float64_t) Load 35(resultd)
+             135:     43(ptr) AccessChain 27(buf) 19
+             136:24(float64_t) Load 135
+             137:24(float64_t) FAdd 136 134
+             138:     43(ptr) AccessChain 27(buf) 19
+                              Store 138 137
+             139:24(float64_t) AtomicLoad 38(atomd) 19 112
+                              Store 35(resultd) 139
+             140:24(float64_t) Load 35(resultd)
+                              AtomicStore 38(atomd) 19 117 140
+             141:24(float64_t) Load 35(resultd)
+             142:     43(ptr) AccessChain 27(buf) 19
+             143:24(float64_t) Load 142
+             144:24(float64_t) FAdd 143 141
+             145:     43(ptr) AccessChain 27(buf) 19
+                              Store 145 144
+             151:    150(ptr) ImageTexelPointer 148(fimage1D) 28 15
+             153:    6(float) AtomicFAddEXT 151 14 152 149
+                              Store 11(atomf) 153 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             155:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             156:     29(ptr) AccessChain 27(buf) 28
+             157:    6(float) Load 156
+             158:    6(float) FAdd 157 155
+             159:     29(ptr) AccessChain 27(buf) 28
+                              Store 159 158
+             161:    150(ptr) ImageTexelPointer 148(fimage1D) 19 15
+             163:    6(float) AtomicFAddEXT 161 19 162 12
+                              Store 11(atomf) 163 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             164:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             165:     29(ptr) AccessChain 27(buf) 28
+             166:    6(float) Load 165
+             167:    6(float) FAdd 166 164
+             168:     29(ptr) AccessChain 27(buf) 28
+                              Store 168 167
+             170:    150(ptr) ImageTexelPointer 148(fimage1D) 19 15
+             171:    6(float) AtomicExchange 170 19 162 169
+                              Store 11(atomf) 171 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             172:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             173:     29(ptr) AccessChain 27(buf) 28
+             174:    6(float) Load 173
+             175:    6(float) FAdd 174 172
+             176:     29(ptr) AccessChain 27(buf) 28
+                              Store 176 175
+             177:    150(ptr) ImageTexelPointer 148(fimage1D) 19 15
+             179:    6(float) AtomicLoad 177 19 178
+                              Store 11(atomf) 179 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             180:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             181:     29(ptr) AccessChain 27(buf) 28
+             182:    6(float) Load 181
+             183:    6(float) FAdd 182 180
+             184:     29(ptr) AccessChain 27(buf) 28
+                              Store 184 183
+             185:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             186:    150(ptr) ImageTexelPointer 148(fimage1D) 111 15
+                              AtomicStore 186 19 187 185
+             188:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             189:     29(ptr) AccessChain 27(buf) 28
+             190:    6(float) Load 189
+             191:    6(float) FAdd 190 188
+             192:     29(ptr) AccessChain 27(buf) 28
+                              Store 192 191
+             198:    150(ptr) ImageTexelPointer 195(fimage1DArray) 197 15
+             199:    6(float) AtomicFAddEXT 198 14 152 149
+                              Store 11(atomf) 199 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             200:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             201:     29(ptr) AccessChain 27(buf) 28
+             202:    6(float) Load 201
+             203:    6(float) FAdd 202 200
+             204:     29(ptr) AccessChain 27(buf) 28
+                              Store 204 203
+             206:    150(ptr) ImageTexelPointer 195(fimage1DArray) 205 15
+             207:    6(float) AtomicFAddEXT 206 19 162 12
+                              Store 11(atomf) 207 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             208:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             209:     29(ptr) AccessChain 27(buf) 28
+             210:    6(float) Load 209
+             211:    6(float) FAdd 210 208
+             212:     29(ptr) AccessChain 27(buf) 28
+                              Store 212 211
+             214:    150(ptr) ImageTexelPointer 195(fimage1DArray) 213 15
+             215:    6(float) AtomicExchange 214 19 162 169
+                              Store 11(atomf) 215 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             216:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             217:     29(ptr) AccessChain 27(buf) 28
+             218:    6(float) Load 217
+             219:    6(float) FAdd 218 216
+             220:     29(ptr) AccessChain 27(buf) 28
+                              Store 220 219
+             221:    150(ptr) ImageTexelPointer 195(fimage1DArray) 205 15
+             222:    6(float) AtomicLoad 221 19 178
+                              Store 11(atomf) 222 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             223:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             224:     29(ptr) AccessChain 27(buf) 28
+             225:    6(float) Load 224
+             226:    6(float) FAdd 225 223
+             227:     29(ptr) AccessChain 27(buf) 28
+                              Store 227 226
+             229:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             230:    150(ptr) ImageTexelPointer 195(fimage1DArray) 228 15
+                              AtomicStore 230 19 187 229
+             231:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             232:     29(ptr) AccessChain 27(buf) 28
+             233:    6(float) Load 232
+             234:    6(float) FAdd 233 231
+             235:     29(ptr) AccessChain 27(buf) 28
+                              Store 235 234
+             239:    150(ptr) ImageTexelPointer 238(fimage2D) 197 15
+             240:    6(float) AtomicFAddEXT 239 14 152 149
+                              Store 11(atomf) 240 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             241:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             242:     29(ptr) AccessChain 27(buf) 28
+             243:    6(float) Load 242
+             244:    6(float) FAdd 243 241
+             245:     29(ptr) AccessChain 27(buf) 28
+                              Store 245 244
+             246:    150(ptr) ImageTexelPointer 238(fimage2D) 205 15
+             247:    6(float) AtomicFAddEXT 246 19 162 12
+                              Store 11(atomf) 247 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             248:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             249:     29(ptr) AccessChain 27(buf) 28
+             250:    6(float) Load 249
+             251:    6(float) FAdd 250 248
+             252:     29(ptr) AccessChain 27(buf) 28
+                              Store 252 251
+             253:    150(ptr) ImageTexelPointer 238(fimage2D) 213 15
+             254:    6(float) AtomicExchange 253 19 162 169
+                              Store 11(atomf) 254 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             255:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             256:     29(ptr) AccessChain 27(buf) 28
+             257:    6(float) Load 256
+             258:    6(float) FAdd 257 255
+             259:     29(ptr) AccessChain 27(buf) 28
+                              Store 259 258
+             260:    150(ptr) ImageTexelPointer 238(fimage2D) 205 15
+             261:    6(float) AtomicLoad 260 19 178
+                              Store 11(atomf) 261 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             262:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             263:     29(ptr) AccessChain 27(buf) 28
+             264:    6(float) Load 263
+             265:    6(float) FAdd 264 262
+             266:     29(ptr) AccessChain 27(buf) 28
+                              Store 266 265
+             267:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             268:    150(ptr) ImageTexelPointer 238(fimage2D) 228 15
+                              AtomicStore 268 19 187 267
+             269:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             270:     29(ptr) AccessChain 27(buf) 28
+             271:    6(float) Load 270
+             272:    6(float) FAdd 271 269
+             273:     29(ptr) AccessChain 27(buf) 28
+                              Store 273 272
+             277:    150(ptr) ImageTexelPointer 276(fimage2DRect) 197 15
+             278:    6(float) AtomicFAddEXT 277 14 152 149
+                              Store 11(atomf) 278 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             279:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             280:     29(ptr) AccessChain 27(buf) 28
+             281:    6(float) Load 280
+             282:    6(float) FAdd 281 279
+             283:     29(ptr) AccessChain 27(buf) 28
+                              Store 283 282
+             284:    150(ptr) ImageTexelPointer 276(fimage2DRect) 205 15
+             285:    6(float) AtomicFAddEXT 284 19 162 12
+                              Store 11(atomf) 285 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             286:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             287:     29(ptr) AccessChain 27(buf) 28
+             288:    6(float) Load 287
+             289:    6(float) FAdd 288 286
+             290:     29(ptr) AccessChain 27(buf) 28
+                              Store 290 289
+             291:    150(ptr) ImageTexelPointer 276(fimage2DRect) 213 15
+             292:    6(float) AtomicExchange 291 19 162 169
+                              Store 11(atomf) 292 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             293:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             294:     29(ptr) AccessChain 27(buf) 28
+             295:    6(float) Load 294
+             296:    6(float) FAdd 295 293
+             297:     29(ptr) AccessChain 27(buf) 28
+                              Store 297 296
+             298:    150(ptr) ImageTexelPointer 276(fimage2DRect) 205 15
+             299:    6(float) AtomicLoad 298 19 178
+                              Store 11(atomf) 299 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             300:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             301:     29(ptr) AccessChain 27(buf) 28
+             302:    6(float) Load 301
+             303:    6(float) FAdd 302 300
+             304:     29(ptr) AccessChain 27(buf) 28
+                              Store 304 303
+             305:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             306:    150(ptr) ImageTexelPointer 276(fimage2DRect) 228 15
+                              AtomicStore 306 19 187 305
+             307:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             308:     29(ptr) AccessChain 27(buf) 28
+             309:    6(float) Load 308
+             310:    6(float) FAdd 309 307
+             311:     29(ptr) AccessChain 27(buf) 28
+                              Store 311 310
+             317:    150(ptr) ImageTexelPointer 314(fimage2DArray) 316 15
+             318:    6(float) AtomicFAddEXT 317 14 152 149
+                              Store 11(atomf) 318 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             319:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             320:     29(ptr) AccessChain 27(buf) 28
+             321:    6(float) Load 320
+             322:    6(float) FAdd 321 319
+             323:     29(ptr) AccessChain 27(buf) 28
+                              Store 323 322
+             325:    150(ptr) ImageTexelPointer 314(fimage2DArray) 324 15
+             326:    6(float) AtomicFAddEXT 325 19 162 12
+                              Store 11(atomf) 326 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             327:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             328:     29(ptr) AccessChain 27(buf) 28
+             329:    6(float) Load 328
+             330:    6(float) FAdd 329 327
+             331:     29(ptr) AccessChain 27(buf) 28
+                              Store 331 330
+             333:    150(ptr) ImageTexelPointer 314(fimage2DArray) 332 15
+             334:    6(float) AtomicExchange 333 19 162 169
+                              Store 11(atomf) 334 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             335:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             336:     29(ptr) AccessChain 27(buf) 28
+             337:    6(float) Load 336
+             338:    6(float) FAdd 337 335
+             339:     29(ptr) AccessChain 27(buf) 28
+                              Store 339 338
+             341:    150(ptr) ImageTexelPointer 314(fimage2DArray) 340 15
+             342:    6(float) AtomicLoad 341 19 178
+                              Store 11(atomf) 342 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             343:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             344:     29(ptr) AccessChain 27(buf) 28
+             345:    6(float) Load 344
+             346:    6(float) FAdd 345 343
+             347:     29(ptr) AccessChain 27(buf) 28
+                              Store 347 346
+             349:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             350:    150(ptr) ImageTexelPointer 314(fimage2DArray) 348 15
+                              AtomicStore 350 19 187 349
+             351:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             352:     29(ptr) AccessChain 27(buf) 28
+             353:    6(float) Load 352
+             354:    6(float) FAdd 353 351
+             355:     29(ptr) AccessChain 27(buf) 28
+                              Store 355 354
+             359:    150(ptr) ImageTexelPointer 358(fimageCube) 316 15
+             360:    6(float) AtomicFAddEXT 359 14 152 149
+                              Store 11(atomf) 360 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             361:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             362:     29(ptr) AccessChain 27(buf) 28
+             363:    6(float) Load 362
+             364:    6(float) FAdd 363 361
+             365:     29(ptr) AccessChain 27(buf) 28
+                              Store 365 364
+             366:    150(ptr) ImageTexelPointer 358(fimageCube) 324 15
+             367:    6(float) AtomicFAddEXT 366 19 162 12
+                              Store 11(atomf) 367 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             368:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             369:     29(ptr) AccessChain 27(buf) 28
+             370:    6(float) Load 369
+             371:    6(float) FAdd 370 368
+             372:     29(ptr) AccessChain 27(buf) 28
+                              Store 372 371
+             374:    150(ptr) ImageTexelPointer 358(fimageCube) 373 15
+             375:    6(float) AtomicExchange 374 19 162 169
+                              Store 11(atomf) 375 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             376:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             377:     29(ptr) AccessChain 27(buf) 28
+             378:    6(float) Load 377
+             379:    6(float) FAdd 378 376
+             380:     29(ptr) AccessChain 27(buf) 28
+                              Store 380 379
+             381:    150(ptr) ImageTexelPointer 358(fimageCube) 340 15
+             382:    6(float) AtomicLoad 381 19 178
+                              Store 11(atomf) 382 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             383:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             384:     29(ptr) AccessChain 27(buf) 28
+             385:    6(float) Load 384
+             386:    6(float) FAdd 385 383
+             387:     29(ptr) AccessChain 27(buf) 28
+                              Store 387 386
+             389:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             390:    150(ptr) ImageTexelPointer 358(fimageCube) 388 15
+                              AtomicStore 390 19 187 389
+             391:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             392:     29(ptr) AccessChain 27(buf) 28
+             393:    6(float) Load 392
+             394:    6(float) FAdd 393 391
+             395:     29(ptr) AccessChain 27(buf) 28
+                              Store 395 394
+             399:    150(ptr) ImageTexelPointer 398(fimageCubeArray) 316 15
+             400:    6(float) AtomicFAddEXT 399 14 152 149
+                              Store 11(atomf) 400 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             401:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             402:     29(ptr) AccessChain 27(buf) 28
+             403:    6(float) Load 402
+             404:    6(float) FAdd 403 401
+             405:     29(ptr) AccessChain 27(buf) 28
+                              Store 405 404
+             406:    150(ptr) ImageTexelPointer 398(fimageCubeArray) 324 15
+             407:    6(float) AtomicFAddEXT 406 19 162 12
+                              Store 11(atomf) 407 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             408:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             409:     29(ptr) AccessChain 27(buf) 28
+             410:    6(float) Load 409
+             411:    6(float) FAdd 410 408
+             412:     29(ptr) AccessChain 27(buf) 28
+                              Store 412 411
+             413:    150(ptr) ImageTexelPointer 398(fimageCubeArray) 332 15
+             414:    6(float) AtomicExchange 413 19 162 169
+                              Store 11(atomf) 414 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             415:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             416:     29(ptr) AccessChain 27(buf) 28
+             417:    6(float) Load 416
+             418:    6(float) FAdd 417 415
+             419:     29(ptr) AccessChain 27(buf) 28
+                              Store 419 418
+             420:    150(ptr) ImageTexelPointer 398(fimageCubeArray) 340 15
+             421:    6(float) AtomicLoad 420 19 178
+                              Store 11(atomf) 421 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             422:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             423:     29(ptr) AccessChain 27(buf) 28
+             424:    6(float) Load 423
+             425:    6(float) FAdd 424 422
+             426:     29(ptr) AccessChain 27(buf) 28
+                              Store 426 425
+             427:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             428:    150(ptr) ImageTexelPointer 398(fimageCubeArray) 348 15
+                              AtomicStore 428 19 187 427
+             429:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             430:     29(ptr) AccessChain 27(buf) 28
+             431:    6(float) Load 430
+             432:    6(float) FAdd 431 429
+             433:     29(ptr) AccessChain 27(buf) 28
+                              Store 433 432
+             437:    150(ptr) ImageTexelPointer 436(fimage3D) 316 15
+             438:    6(float) AtomicFAddEXT 437 14 152 149
+                              Store 11(atomf) 438 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             439:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             440:     29(ptr) AccessChain 27(buf) 28
+             441:    6(float) Load 440
+             442:    6(float) FAdd 441 439
+             443:     29(ptr) AccessChain 27(buf) 28
+                              Store 443 442
+             444:    150(ptr) ImageTexelPointer 436(fimage3D) 324 15
+             445:    6(float) AtomicFAddEXT 444 19 162 12
+                              Store 11(atomf) 445 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             446:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             447:     29(ptr) AccessChain 27(buf) 28
+             448:    6(float) Load 447
+             449:    6(float) FAdd 448 446
+             450:     29(ptr) AccessChain 27(buf) 28
+                              Store 450 449
+             451:    150(ptr) ImageTexelPointer 436(fimage3D) 332 15
+             452:    6(float) AtomicExchange 451 19 162 169
+                              Store 11(atomf) 452 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             453:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             454:     29(ptr) AccessChain 27(buf) 28
+             455:    6(float) Load 454
+             456:    6(float) FAdd 455 453
+             457:     29(ptr) AccessChain 27(buf) 28
+                              Store 457 456
+             458:    150(ptr) ImageTexelPointer 436(fimage3D) 340 15
+             459:    6(float) AtomicLoad 458 19 178
+                              Store 11(atomf) 459 MakePointerAvailableKHR NonPrivatePointerKHR 154
+             460:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             461:     29(ptr) AccessChain 27(buf) 28
+             462:    6(float) Load 461
+             463:    6(float) FAdd 462 460
+             464:     29(ptr) AccessChain 27(buf) 28
+                              Store 464 463
+             465:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             466:    150(ptr) ImageTexelPointer 436(fimage3D) 348 15
+                              AtomicStore 466 19 187 465
+             467:    6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 154
+             468:     29(ptr) AccessChain 27(buf) 28
+             469:    6(float) Load 468
+             470:    6(float) FAdd 469 467
+             471:     29(ptr) AccessChain 27(buf) 28
+                              Store 471 470
                               Return
                               Return
                               FunctionEnd
                               FunctionEnd

+ 7 - 6
Test/baseResults/spv.atomicStoreInt64.comp.out

@@ -1,7 +1,7 @@
 spv.atomicStoreInt64.comp
 spv.atomicStoreInt64.comp
 // Module Version 10000
 // Module Version 10000
 // Generated by (magic number): 8000b
 // Generated by (magic number): 8000b
-// Id's are bound by 25
+// Id's are bound by 26
 
 
                               Capability Shader
                               Capability Shader
                               Capability Int64
                               Capability Int64
@@ -43,15 +43,16 @@ spv.atomicStoreInt64.comp
               16:     15(ptr) Variable Uniform
               16:     15(ptr) Variable Uniform
               19:     10(int) Constant 1
               19:     10(int) Constant 1
               20:     10(int) Constant 64
               20:     10(int) Constant 64
-              21:             TypeInt 32 0
-              22:     21(int) Constant 1
-              23:     21(int) Constant 0
-              24:     21(int) Constant 64
+              21:     10(int) Constant 4
+              22:             TypeInt 32 0
+              23:     22(int) Constant 1
+              24:     22(int) Constant 0
+              25:     22(int) Constant 68
          4(main):           2 Function None 3
          4(main):           2 Function None 3
                5:             Label
                5:             Label
               13:     12(ptr) AccessChain 9 11
               13:     12(ptr) AccessChain 9 11
               17:     12(ptr) AccessChain 16 11
               17:     12(ptr) AccessChain 16 11
               18:  6(int64_t) Load 17
               18:  6(int64_t) Load 17
-                              AtomicStore 13 19 24 18
+                              AtomicStore 13 19 25 18
                               Return
                               Return
                               FunctionEnd
                               FunctionEnd

+ 9 - 8
Test/baseResults/spv.imageAtomic64.comp.out

@@ -1,7 +1,7 @@
 spv.imageAtomic64.comp
 spv.imageAtomic64.comp
 // Module Version 10000
 // Module Version 10000
 // Generated by (magic number): 8000b
 // Generated by (magic number): 8000b
-// Id's are bound by 28
+// Id's are bound by 29
 
 
                               Capability Shader
                               Capability Shader
                               Capability Int64
                               Capability Int64
@@ -43,16 +43,17 @@ spv.imageAtomic64.comp
               17:     10(int) Constant 0
               17:     10(int) Constant 0
               18:             TypePointer Uniform 6(int64_t)
               18:             TypePointer Uniform 6(int64_t)
               21:     10(int) Constant 2048
               21:     10(int) Constant 2048
-              22:             TypeInt 32 0
-              23:     22(int) Constant 0
-              24:             TypePointer Image 6(int64_t)
-              26:     22(int) Constant 1
-              27:     22(int) Constant 2048
+              22:     10(int) Constant 4
+              23:             TypeInt 32 0
+              24:     23(int) Constant 0
+              25:             TypePointer Image 6(int64_t)
+              27:     23(int) Constant 1
+              28:     23(int) Constant 2052
          4(main):           2 Function None 3
          4(main):           2 Function None 3
                5:             Label
                5:             Label
               19:     18(ptr) AccessChain 16 17
               19:     18(ptr) AccessChain 16 17
               20:  6(int64_t) Load 19
               20:  6(int64_t) Load 19
-              25:     24(ptr) ImageTexelPointer 9(z) 13 23
-                              AtomicStore 25 12 27 20
+              26:     25(ptr) ImageTexelPointer 9(z) 13 24
+                              AtomicStore 26 12 28 20
                               Return
                               Return
                               FunctionEnd
                               FunctionEnd

+ 451 - 448
Test/baseResults/spv.imageAtomic64.frag.out

@@ -2,7 +2,7 @@ spv.imageAtomic64.frag
 Validation failed
 Validation failed
 // Module Version 10000
 // Module Version 10000
 // Generated by (magic number): 8000b
 // Generated by (magic number): 8000b
-// Id's are bound by 503
+// Id's are bound by 506
 
 
                               Capability Shader
                               Capability Shader
                               Capability Int64
                               Capability Int64
@@ -39,13 +39,13 @@ Validation failed
                               Name 58  "i2DArray"
                               Name 58  "i2DArray"
                               Name 69  "i2DRect"
                               Name 69  "i2DRect"
                               Name 81  "i2DMSArray"
                               Name 81  "i2DMSArray"
-                              Name 194  "u2D"
-                              Name 207  "uCube"
-                              Name 218  "u1DArray"
-                              Name 229  "uCubeArray"
-                              Name 240  "u2DMS"
-                              Name 458  "ResType"
-                              Name 483  "ResType"
+                              Name 198  "u2D"
+                              Name 211  "uCube"
+                              Name 222  "u1DArray"
+                              Name 233  "uCubeArray"
+                              Name 244  "u2DMS"
+                              Name 461  "ResType"
+                              Name 486  "ResType"
                               Decorate 12(Buf) BufferBlock
                               Decorate 12(Buf) BufferBlock
                               MemberDecorate 12(Buf) 0 Offset 0
                               MemberDecorate 12(Buf) 0 Offset 0
                               MemberDecorate 12(Buf) 1 Offset 8
                               MemberDecorate 12(Buf) 1 Offset 8
@@ -66,16 +66,16 @@ Validation failed
                               Decorate 69(i2DRect) DescriptorSet 0
                               Decorate 69(i2DRect) DescriptorSet 0
                               Decorate 81(i2DMSArray) Binding 10
                               Decorate 81(i2DMSArray) Binding 10
                               Decorate 81(i2DMSArray) DescriptorSet 0
                               Decorate 81(i2DMSArray) DescriptorSet 0
-                              Decorate 194(u2D) Binding 1
-                              Decorate 194(u2D) DescriptorSet 0
-                              Decorate 207(uCube) Binding 3
-                              Decorate 207(uCube) DescriptorSet 0
-                              Decorate 218(u1DArray) Binding 5
-                              Decorate 218(u1DArray) DescriptorSet 0
-                              Decorate 229(uCubeArray) Binding 7
-                              Decorate 229(uCubeArray) DescriptorSet 0
-                              Decorate 240(u2DMS) Binding 9
-                              Decorate 240(u2DMS) DescriptorSet 0
+                              Decorate 198(u2D) Binding 1
+                              Decorate 198(u2D) DescriptorSet 0
+                              Decorate 211(uCube) Binding 3
+                              Decorate 211(uCube) DescriptorSet 0
+                              Decorate 222(u1DArray) Binding 5
+                              Decorate 222(u1DArray) DescriptorSet 0
+                              Decorate 233(uCubeArray) Binding 7
+                              Decorate 233(uCubeArray) DescriptorSet 0
+                              Decorate 244(u2DMS) Binding 9
+                              Decorate 244(u2DMS) DescriptorSet 0
                2:             TypeVoid
                2:             TypeVoid
                3:             TypeFunction 2
                3:             TypeFunction 2
                6:             TypeInt 64 1
                6:             TypeInt 64 1
@@ -120,32 +120,35 @@ Validation failed
              107:  6(int64_t) Constant 1 0
              107:  6(int64_t) Constant 1 0
              116:     10(int) Constant 1
              116:     10(int) Constant 1
              117:     10(int) Constant 2048
              117:     10(int) Constant 2048
-             119:     20(int) Constant 2048
-             192:             TypeImage 7(int64_t) 2D nonsampled format:R64ui
-             193:             TypePointer UniformConstant 192
-        194(u2D):    193(ptr) Variable UniformConstant
-             198:             TypePointer Uniform 7(int64_t)
-             201:             TypePointer Image 7(int64_t)
-             205:             TypeImage 7(int64_t) Cube nonsampled format:R64ui
-             206:             TypePointer UniformConstant 205
-      207(uCube):    206(ptr) Variable UniformConstant
-             216:             TypeImage 7(int64_t) 1D array nonsampled format:R64ui
-             217:             TypePointer UniformConstant 216
-   218(u1DArray):    217(ptr) Variable UniformConstant
-             227:             TypeImage 7(int64_t) Cube array nonsampled format:R64ui
-             228:             TypePointer UniformConstant 227
- 229(uCubeArray):    228(ptr) Variable UniformConstant
-             238:             TypeImage 7(int64_t) 2D multi-sampled nonsampled format:R64ui
-             239:             TypePointer UniformConstant 238
-      240(u2DMS):    239(ptr) Variable UniformConstant
-             244:     20(int) Constant 2
-             275:  7(int64_t) Constant 1 0
-             363:     10(int) Constant 2
-             368:             TypePointer Uniform 8(i64vec4)
-             423:     10(int) Constant 3
-             424:             TypePointer Uniform 9(i64vec4)
-    458(ResType):             TypeStruct 10(int) 8(i64vec4)
-    483(ResType):             TypeStruct 10(int) 9(i64vec4)
+             118:     10(int) Constant 8
+             120:     20(int) Constant 2056
+             179:     10(int) Constant 2
+             181:     20(int) Constant 2050
+             195:     20(int) Constant 2052
+             196:             TypeImage 7(int64_t) 2D nonsampled format:R64ui
+             197:             TypePointer UniformConstant 196
+        198(u2D):    197(ptr) Variable UniformConstant
+             202:             TypePointer Uniform 7(int64_t)
+             205:             TypePointer Image 7(int64_t)
+             209:             TypeImage 7(int64_t) Cube nonsampled format:R64ui
+             210:             TypePointer UniformConstant 209
+      211(uCube):    210(ptr) Variable UniformConstant
+             220:             TypeImage 7(int64_t) 1D array nonsampled format:R64ui
+             221:             TypePointer UniformConstant 220
+   222(u1DArray):    221(ptr) Variable UniformConstant
+             231:             TypeImage 7(int64_t) Cube array nonsampled format:R64ui
+             232:             TypePointer UniformConstant 231
+ 233(uCubeArray):    232(ptr) Variable UniformConstant
+             242:             TypeImage 7(int64_t) 2D multi-sampled nonsampled format:R64ui
+             243:             TypePointer UniformConstant 242
+      244(u2DMS):    243(ptr) Variable UniformConstant
+             248:     20(int) Constant 2
+             279:  7(int64_t) Constant 1 0
+             371:             TypePointer Uniform 8(i64vec4)
+             426:     10(int) Constant 3
+             427:             TypePointer Uniform 9(i64vec4)
+    461(ResType):             TypeStruct 10(int) 8(i64vec4)
+    486(ResType):             TypeStruct 10(int) 9(i64vec4)
          4(main):           2 Function None 3
          4(main):           2 Function None 3
                5:             Label
                5:             Label
               23:     22(ptr) AccessChain 14 19 21
               23:     22(ptr) AccessChain 14 19 21
@@ -226,409 +229,409 @@ Validation failed
              113:     10(int) Load 112
              113:     10(int) Load 112
              114:     25(ptr) AccessChain 14 15
              114:     25(ptr) AccessChain 14 15
              115:  6(int64_t) Load 114
              115:  6(int64_t) Load 114
-             118:     28(ptr) ImageTexelPointer 18(i1D) 113 21
-             120:  6(int64_t) AtomicIAdd 118 116 119 115
-             121:     25(ptr) AccessChain 14 15
-                              Store 121 120
-             122:     37(ptr) AccessChain 14 19
-             123:   11(ivec4) Load 122
-             124:   36(ivec3) VectorShuffle 123 123 0 1 2
-             125:     25(ptr) AccessChain 14 15
-             126:  6(int64_t) Load 125
-             127:     28(ptr) ImageTexelPointer 35(i3D) 124 21
-             128:  6(int64_t) AtomicSMin 127 116 119 126
-             129:     25(ptr) AccessChain 14 15
-                              Store 129 128
-             130:     22(ptr) AccessChain 14 19 21
-             131:     10(int) Load 130
-             132:     25(ptr) AccessChain 14 15
-             133:  6(int64_t) Load 132
-             134:     28(ptr) ImageTexelPointer 48(iBuf) 131 21
-             135:  6(int64_t) AtomicSMax 134 116 119 133
-             136:     25(ptr) AccessChain 14 15
-                              Store 136 135
-             137:     37(ptr) AccessChain 14 19
-             138:   11(ivec4) Load 137
-             139:   36(ivec3) VectorShuffle 138 138 0 1 2
-             140:     25(ptr) AccessChain 14 15
-             141:  6(int64_t) Load 140
-             142:     28(ptr) ImageTexelPointer 58(i2DArray) 139 21
-             143:  6(int64_t) AtomicAnd 142 116 119 141
-             144:     25(ptr) AccessChain 14 15
-                              Store 144 143
-             145:     37(ptr) AccessChain 14 19
-             146:   11(ivec4) Load 145
-             147:   70(ivec2) VectorShuffle 146 146 0 1
-             148:     25(ptr) AccessChain 14 15
-             149:  6(int64_t) Load 148
-             150:     28(ptr) ImageTexelPointer 69(i2DRect) 147 21
-             151:  6(int64_t) AtomicOr 150 116 119 149
-             152:     25(ptr) AccessChain 14 15
-                              Store 152 151
-             153:     37(ptr) AccessChain 14 19
-             154:   11(ivec4) Load 153
-             155:   36(ivec3) VectorShuffle 154 154 0 1 2
-             156:     22(ptr) AccessChain 14 19 85
-             157:     10(int) Load 156
-             158:     25(ptr) AccessChain 14 15
-             159:  6(int64_t) Load 158
-             160:     28(ptr) ImageTexelPointer 81(i2DMSArray) 155 157
-             161:  6(int64_t) AtomicXor 160 116 119 159
-             162:     25(ptr) AccessChain 14 15
-                              Store 162 161
-             163:     22(ptr) AccessChain 14 19 21
-             164:     10(int) Load 163
-             165:     25(ptr) AccessChain 14 15
-             166:  6(int64_t) Load 165
-             167:     28(ptr) ImageTexelPointer 18(i1D) 164 21
-             168:  6(int64_t) AtomicExchange 167 116 119 166
-             169:     25(ptr) AccessChain 14 15
-                              Store 169 168
-             170:     37(ptr) AccessChain 14 19
-             171:   11(ivec4) Load 170
-             172:   36(ivec3) VectorShuffle 171 171 0 1 2
-             173:     25(ptr) AccessChain 14 15
-             174:  6(int64_t) Load 173
-             175:     25(ptr) AccessChain 14 15
-             176:  6(int64_t) Load 175
-             177:  6(int64_t) IAdd 176 107
-             178:     28(ptr) ImageTexelPointer 35(i3D) 172 21
-             179:  6(int64_t) AtomicCompareExchange 178 116 119 119 177 174
-             180:     25(ptr) AccessChain 14 15
-                              Store 180 179
-             181:     22(ptr) AccessChain 14 19 21
-             182:     10(int) Load 181
-             183:     28(ptr) ImageTexelPointer 48(iBuf) 182 21
-             184:  6(int64_t) AtomicLoad 183 116 119
-             185:     25(ptr) AccessChain 14 15
-                              Store 185 184
-             186:     37(ptr) AccessChain 14 19
-             187:   11(ivec4) Load 186
-             188:   36(ivec3) VectorShuffle 187 187 0 1 2
-             189:     25(ptr) AccessChain 14 15
-             190:  6(int64_t) Load 189
-             191:     28(ptr) ImageTexelPointer 58(i2DArray) 188 21
-                              AtomicStore 191 116 119 190
-             195:     37(ptr) AccessChain 14 19
-             196:   11(ivec4) Load 195
-             197:   70(ivec2) VectorShuffle 196 196 0 1
-             199:    198(ptr) AccessChain 14 116
-             200:  7(int64_t) Load 199
-             202:    201(ptr) ImageTexelPointer 194(u2D) 197 21
-             203:  7(int64_t) AtomicIAdd 202 30 21 200
-             204:    198(ptr) AccessChain 14 116
-                              Store 204 203
-             208:     37(ptr) AccessChain 14 19
-             209:   11(ivec4) Load 208
-             210:   36(ivec3) VectorShuffle 209 209 0 1 2
-             211:    198(ptr) AccessChain 14 116
-             212:  7(int64_t) Load 211
-             213:    201(ptr) ImageTexelPointer 207(uCube) 210 21
-             214:  7(int64_t) AtomicUMin 213 30 21 212
-             215:    198(ptr) AccessChain 14 116
-                              Store 215 214
-             219:     37(ptr) AccessChain 14 19
-             220:   11(ivec4) Load 219
-             221:   70(ivec2) VectorShuffle 220 220 0 1
-             222:    198(ptr) AccessChain 14 116
-             223:  7(int64_t) Load 222
-             224:    201(ptr) ImageTexelPointer 218(u1DArray) 221 21
-             225:  7(int64_t) AtomicUMax 224 30 21 223
-             226:    198(ptr) AccessChain 14 116
-                              Store 226 225
-             230:     37(ptr) AccessChain 14 19
-             231:   11(ivec4) Load 230
-             232:   36(ivec3) VectorShuffle 231 231 0 1 2
-             233:    198(ptr) AccessChain 14 116
-             234:  7(int64_t) Load 233
-             235:    201(ptr) ImageTexelPointer 229(uCubeArray) 232 21
-             236:  7(int64_t) AtomicAnd 235 30 21 234
-             237:    198(ptr) AccessChain 14 116
-                              Store 237 236
-             241:     37(ptr) AccessChain 14 19
-             242:   11(ivec4) Load 241
-             243:   70(ivec2) VectorShuffle 242 242 0 1
-             245:     22(ptr) AccessChain 14 19 244
-             246:     10(int) Load 245
-             247:    198(ptr) AccessChain 14 116
-             248:  7(int64_t) Load 247
-             249:    201(ptr) ImageTexelPointer 240(u2DMS) 243 246
-             250:  7(int64_t) AtomicOr 249 30 21 248
-             251:    198(ptr) AccessChain 14 116
-                              Store 251 250
-             252:     37(ptr) AccessChain 14 19
-             253:   11(ivec4) Load 252
-             254:   70(ivec2) VectorShuffle 253 253 0 1
-             255:    198(ptr) AccessChain 14 116
-             256:  7(int64_t) Load 255
-             257:    201(ptr) ImageTexelPointer 194(u2D) 254 21
-             258:  7(int64_t) AtomicXor 257 30 21 256
-             259:    198(ptr) AccessChain 14 116
-                              Store 259 258
-             260:     37(ptr) AccessChain 14 19
-             261:   11(ivec4) Load 260
-             262:   36(ivec3) VectorShuffle 261 261 0 1 2
-             263:    198(ptr) AccessChain 14 116
-             264:  7(int64_t) Load 263
-             265:    201(ptr) ImageTexelPointer 207(uCube) 262 21
-             266:  7(int64_t) AtomicExchange 265 30 21 264
-             267:    198(ptr) AccessChain 14 116
-                              Store 267 266
-             268:     37(ptr) AccessChain 14 19
-             269:   11(ivec4) Load 268
-             270:   70(ivec2) VectorShuffle 269 269 0 1
-             271:    198(ptr) AccessChain 14 116
-             272:  7(int64_t) Load 271
-             273:    198(ptr) AccessChain 14 116
-             274:  7(int64_t) Load 273
-             276:  7(int64_t) IAdd 274 275
-             277:    201(ptr) ImageTexelPointer 218(u1DArray) 270 21
-             278:  7(int64_t) AtomicCompareExchange 277 30 21 21 276 272
-             279:    198(ptr) AccessChain 14 116
-                              Store 279 278
-             280:     37(ptr) AccessChain 14 19
-             281:   11(ivec4) Load 280
-             282:   70(ivec2) VectorShuffle 281 281 0 1
-             283:    198(ptr) AccessChain 14 116
-             284:  7(int64_t) Load 283
-             285:    201(ptr) ImageTexelPointer 194(u2D) 282 21
-             286:  7(int64_t) AtomicIAdd 285 116 119 284
-             287:    198(ptr) AccessChain 14 116
-                              Store 287 286
-             288:     37(ptr) AccessChain 14 19
-             289:   11(ivec4) Load 288
-             290:   36(ivec3) VectorShuffle 289 289 0 1 2
-             291:    198(ptr) AccessChain 14 116
-             292:  7(int64_t) Load 291
-             293:    201(ptr) ImageTexelPointer 207(uCube) 290 21
-             294:  7(int64_t) AtomicUMin 293 116 119 292
-             295:    198(ptr) AccessChain 14 116
-                              Store 295 294
-             296:     37(ptr) AccessChain 14 19
-             297:   11(ivec4) Load 296
-             298:   70(ivec2) VectorShuffle 297 297 0 1
-             299:    198(ptr) AccessChain 14 116
-             300:  7(int64_t) Load 299
-             301:    201(ptr) ImageTexelPointer 218(u1DArray) 298 21
-             302:  7(int64_t) AtomicUMax 301 116 119 300
-             303:    198(ptr) AccessChain 14 116
-                              Store 303 302
-             304:     37(ptr) AccessChain 14 19
-             305:   11(ivec4) Load 304
-             306:   36(ivec3) VectorShuffle 305 305 0 1 2
-             307:    198(ptr) AccessChain 14 116
-             308:  7(int64_t) Load 307
-             309:    201(ptr) ImageTexelPointer 229(uCubeArray) 306 21
-             310:  7(int64_t) AtomicAnd 309 116 119 308
-             311:    198(ptr) AccessChain 14 116
-                              Store 311 310
-             312:     37(ptr) AccessChain 14 19
-             313:   11(ivec4) Load 312
-             314:   70(ivec2) VectorShuffle 313 313 0 1
-             315:     22(ptr) AccessChain 14 19 244
-             316:     10(int) Load 315
-             317:    198(ptr) AccessChain 14 116
-             318:  7(int64_t) Load 317
-             319:    201(ptr) ImageTexelPointer 240(u2DMS) 314 316
-             320:  7(int64_t) AtomicOr 319 116 119 318
-             321:    198(ptr) AccessChain 14 116
-                              Store 321 320
-             322:     37(ptr) AccessChain 14 19
-             323:   11(ivec4) Load 322
-             324:   70(ivec2) VectorShuffle 323 323 0 1
-             325:    198(ptr) AccessChain 14 116
-             326:  7(int64_t) Load 325
-             327:    201(ptr) ImageTexelPointer 194(u2D) 324 21
-             328:  7(int64_t) AtomicXor 327 116 119 326
-             329:    198(ptr) AccessChain 14 116
-                              Store 329 328
-             330:     37(ptr) AccessChain 14 19
-             331:   11(ivec4) Load 330
-             332:   36(ivec3) VectorShuffle 331 331 0 1 2
-             333:    198(ptr) AccessChain 14 116
-             334:  7(int64_t) Load 333
-             335:    201(ptr) ImageTexelPointer 207(uCube) 332 21
-             336:  7(int64_t) AtomicExchange 335 116 119 334
-             337:    198(ptr) AccessChain 14 116
-                              Store 337 336
-             338:     37(ptr) AccessChain 14 19
-             339:   11(ivec4) Load 338
-             340:   70(ivec2) VectorShuffle 339 339 0 1
-             341:    198(ptr) AccessChain 14 116
-             342:  7(int64_t) Load 341
-             343:    198(ptr) AccessChain 14 116
-             344:  7(int64_t) Load 343
-             345:  7(int64_t) IAdd 344 275
-             346:    201(ptr) ImageTexelPointer 218(u1DArray) 340 21
-             347:  7(int64_t) AtomicCompareExchange 346 116 119 119 345 342
-             348:    198(ptr) AccessChain 14 116
-                              Store 348 347
-             349:     37(ptr) AccessChain 14 19
-             350:   11(ivec4) Load 349
-             351:   36(ivec3) VectorShuffle 350 350 0 1 2
-             352:    201(ptr) ImageTexelPointer 229(uCubeArray) 351 21
-             353:  7(int64_t) AtomicLoad 352 116 119
-             354:    198(ptr) AccessChain 14 116
-                              Store 354 353
-             355:     37(ptr) AccessChain 14 19
-             356:   11(ivec4) Load 355
-             357:   70(ivec2) VectorShuffle 356 356 0 1
-             358:     22(ptr) AccessChain 14 19 244
-             359:     10(int) Load 358
-             360:    198(ptr) AccessChain 14 116
-             361:  7(int64_t) Load 360
-             362:    201(ptr) ImageTexelPointer 240(u2DMS) 357 359
-                              AtomicStore 362 116 119 361
-             364:          16 Load 18(i1D)
-             365:     22(ptr) AccessChain 14 19 21
-             366:     10(int) Load 365
-             367:  8(i64vec4) ImageRead 364 366
-             369:    368(ptr) AccessChain 14 363
-             370:  8(i64vec4) Load 369
-             371:  8(i64vec4) IAdd 370 367
-             372:    368(ptr) AccessChain 14 363
-                              Store 372 371
-             373:          33 Load 35(i3D)
-             374:     37(ptr) AccessChain 14 19
-             375:   11(ivec4) Load 374
-             376:   36(ivec3) VectorShuffle 375 375 0 1 2
-             377:  8(i64vec4) ImageRead 373 376
-             378:    368(ptr) AccessChain 14 363
-             379:  8(i64vec4) Load 378
-             380:  8(i64vec4) IAdd 379 377
-             381:    368(ptr) AccessChain 14 363
-                              Store 381 380
-             382:          46 Load 48(iBuf)
-             383:     22(ptr) AccessChain 14 19 21
-             384:     10(int) Load 383
-             385:  8(i64vec4) ImageRead 382 384
-             386:    368(ptr) AccessChain 14 363
-             387:  8(i64vec4) Load 386
-             388:  8(i64vec4) IAdd 387 385
-             389:    368(ptr) AccessChain 14 363
-                              Store 389 388
-             390:          56 Load 58(i2DArray)
-             391:     37(ptr) AccessChain 14 19
-             392:   11(ivec4) Load 391
-             393:   36(ivec3) VectorShuffle 392 392 0 1 2
-             394:  8(i64vec4) ImageRead 390 393
-             395:    368(ptr) AccessChain 14 363
-             396:  8(i64vec4) Load 395
-             397:  8(i64vec4) IAdd 396 394
-             398:    368(ptr) AccessChain 14 363
-                              Store 398 397
-             399:          67 Load 69(i2DRect)
-             400:     37(ptr) AccessChain 14 19
-             401:   11(ivec4) Load 400
-             402:   70(ivec2) VectorShuffle 401 401 0 1
-             403:  8(i64vec4) ImageRead 399 402
-             404:    368(ptr) AccessChain 14 363
-             405:  8(i64vec4) Load 404
-             406:  8(i64vec4) IAdd 405 403
-             407:    368(ptr) AccessChain 14 363
-                              Store 407 406
-             408:          79 Load 81(i2DMSArray)
-             409:     37(ptr) AccessChain 14 19
-             410:   11(ivec4) Load 409
-             411:   36(ivec3) VectorShuffle 410 410 0 1 2
-             412:     22(ptr) AccessChain 14 19 85
-             413:     10(int) Load 412
-             414:  8(i64vec4) ImageRead 408 411 Sample 413
-             415:    368(ptr) AccessChain 14 363
-             416:  8(i64vec4) Load 415
-             417:  8(i64vec4) IAdd 416 414
-             418:    368(ptr) AccessChain 14 363
-                              Store 418 417
-             419:         192 Load 194(u2D)
-             420:     37(ptr) AccessChain 14 19
-             421:   11(ivec4) Load 420
-             422:   70(ivec2) VectorShuffle 421 421 0 1
-             425:    424(ptr) AccessChain 14 423
-             426:  9(i64vec4) Load 425
-                              ImageWrite 419 422 426
-             427:         205 Load 207(uCube)
-             428:     37(ptr) AccessChain 14 19
-             429:   11(ivec4) Load 428
-             430:   36(ivec3) VectorShuffle 429 429 0 1 2
-             431:    424(ptr) AccessChain 14 423
-             432:  9(i64vec4) Load 431
-                              ImageWrite 427 430 432
-             433:         216 Load 218(u1DArray)
-             434:     37(ptr) AccessChain 14 19
-             435:   11(ivec4) Load 434
-             436:   70(ivec2) VectorShuffle 435 435 0 1
-             437:    424(ptr) AccessChain 14 423
-             438:  9(i64vec4) Load 437
-                              ImageWrite 433 436 438
-             439:         227 Load 229(uCubeArray)
-             440:     37(ptr) AccessChain 14 19
-             441:   11(ivec4) Load 440
-             442:   36(ivec3) VectorShuffle 441 441 0 1 2
-             443:    424(ptr) AccessChain 14 423
-             444:  9(i64vec4) Load 443
-                              ImageWrite 439 442 444
-             445:         238 Load 240(u2DMS)
-             446:     37(ptr) AccessChain 14 19
-             447:   11(ivec4) Load 446
-             448:   70(ivec2) VectorShuffle 447 447 0 1
-             449:     22(ptr) AccessChain 14 19 244
-             450:     10(int) Load 449
-             451:    424(ptr) AccessChain 14 423
-             452:  9(i64vec4) Load 451
-                              ImageWrite 445 448 452 Sample 450
-             453:          33 Load 35(i3D)
-             454:     37(ptr) AccessChain 14 19
-             455:   11(ivec4) Load 454
-             456:   36(ivec3) VectorShuffle 455 455 0 1 2
-             457:    368(ptr) AccessChain 14 363
-             459:458(ResType) ImageSparseRead 453 456
-             460:  8(i64vec4) CompositeExtract 459 1
-                              Store 457 460
-             461:     10(int) CompositeExtract 459 0
-             462:          56 Load 58(i2DArray)
-             463:     37(ptr) AccessChain 14 19
-             464:   11(ivec4) Load 463
-             465:   36(ivec3) VectorShuffle 464 464 0 1 2
-             466:    368(ptr) AccessChain 14 363
-             467:458(ResType) ImageSparseRead 462 465
-             468:  8(i64vec4) CompositeExtract 467 1
-                              Store 466 468
-             469:     10(int) CompositeExtract 467 0
-             470:          67 Load 69(i2DRect)
-             471:     37(ptr) AccessChain 14 19
-             472:   11(ivec4) Load 471
-             473:   70(ivec2) VectorShuffle 472 472 0 1
-             474:    368(ptr) AccessChain 14 363
-             475:458(ResType) ImageSparseRead 470 473
-             476:  8(i64vec4) CompositeExtract 475 1
-                              Store 474 476
-             477:     10(int) CompositeExtract 475 0
-             478:         192 Load 194(u2D)
-             479:     37(ptr) AccessChain 14 19
-             480:   11(ivec4) Load 479
-             481:   70(ivec2) VectorShuffle 480 480 0 1
-             482:    424(ptr) AccessChain 14 423
-             484:483(ResType) ImageSparseRead 478 481
-             485:  9(i64vec4) CompositeExtract 484 1
-                              Store 482 485
-             486:     10(int) CompositeExtract 484 0
-             487:         205 Load 207(uCube)
-             488:     37(ptr) AccessChain 14 19
-             489:   11(ivec4) Load 488
-             490:   36(ivec3) VectorShuffle 489 489 0 1 2
-             491:    424(ptr) AccessChain 14 423
-             492:483(ResType) ImageSparseRead 487 490
-             493:  9(i64vec4) CompositeExtract 492 1
-                              Store 491 493
-             494:     10(int) CompositeExtract 492 0
-             495:         227 Load 229(uCubeArray)
-             496:     37(ptr) AccessChain 14 19
-             497:   11(ivec4) Load 496
-             498:   36(ivec3) VectorShuffle 497 497 0 1 2
-             499:    424(ptr) AccessChain 14 423
-             500:483(ResType) ImageSparseRead 495 498
-             501:  9(i64vec4) CompositeExtract 500 1
-                              Store 499 501
-             502:     10(int) CompositeExtract 500 0
+             119:     28(ptr) ImageTexelPointer 18(i1D) 113 21
+             121:  6(int64_t) AtomicIAdd 119 116 120 115
+             122:     25(ptr) AccessChain 14 15
+                              Store 122 121
+             123:     37(ptr) AccessChain 14 19
+             124:   11(ivec4) Load 123
+             125:   36(ivec3) VectorShuffle 124 124 0 1 2
+             126:     25(ptr) AccessChain 14 15
+             127:  6(int64_t) Load 126
+             128:     28(ptr) ImageTexelPointer 35(i3D) 125 21
+             129:  6(int64_t) AtomicSMin 128 116 120 127
+             130:     25(ptr) AccessChain 14 15
+                              Store 130 129
+             131:     22(ptr) AccessChain 14 19 21
+             132:     10(int) Load 131
+             133:     25(ptr) AccessChain 14 15
+             134:  6(int64_t) Load 133
+             135:     28(ptr) ImageTexelPointer 48(iBuf) 132 21
+             136:  6(int64_t) AtomicSMax 135 116 120 134
+             137:     25(ptr) AccessChain 14 15
+                              Store 137 136
+             138:     37(ptr) AccessChain 14 19
+             139:   11(ivec4) Load 138
+             140:   36(ivec3) VectorShuffle 139 139 0 1 2
+             141:     25(ptr) AccessChain 14 15
+             142:  6(int64_t) Load 141
+             143:     28(ptr) ImageTexelPointer 58(i2DArray) 140 21
+             144:  6(int64_t) AtomicAnd 143 116 120 142
+             145:     25(ptr) AccessChain 14 15
+                              Store 145 144
+             146:     37(ptr) AccessChain 14 19
+             147:   11(ivec4) Load 146
+             148:   70(ivec2) VectorShuffle 147 147 0 1
+             149:     25(ptr) AccessChain 14 15
+             150:  6(int64_t) Load 149
+             151:     28(ptr) ImageTexelPointer 69(i2DRect) 148 21
+             152:  6(int64_t) AtomicOr 151 116 120 150
+             153:     25(ptr) AccessChain 14 15
+                              Store 153 152
+             154:     37(ptr) AccessChain 14 19
+             155:   11(ivec4) Load 154
+             156:   36(ivec3) VectorShuffle 155 155 0 1 2
+             157:     22(ptr) AccessChain 14 19 85
+             158:     10(int) Load 157
+             159:     25(ptr) AccessChain 14 15
+             160:  6(int64_t) Load 159
+             161:     28(ptr) ImageTexelPointer 81(i2DMSArray) 156 158
+             162:  6(int64_t) AtomicXor 161 116 120 160
+             163:     25(ptr) AccessChain 14 15
+                              Store 163 162
+             164:     22(ptr) AccessChain 14 19 21
+             165:     10(int) Load 164
+             166:     25(ptr) AccessChain 14 15
+             167:  6(int64_t) Load 166
+             168:     28(ptr) ImageTexelPointer 18(i1D) 165 21
+             169:  6(int64_t) AtomicExchange 168 116 120 167
+             170:     25(ptr) AccessChain 14 15
+                              Store 170 169
+             171:     37(ptr) AccessChain 14 19
+             172:   11(ivec4) Load 171
+             173:   36(ivec3) VectorShuffle 172 172 0 1 2
+             174:     25(ptr) AccessChain 14 15
+             175:  6(int64_t) Load 174
+             176:     25(ptr) AccessChain 14 15
+             177:  6(int64_t) Load 176
+             178:  6(int64_t) IAdd 177 107
+             180:     28(ptr) ImageTexelPointer 35(i3D) 173 21
+             182:  6(int64_t) AtomicCompareExchange 180 116 120 181 178 175
+             183:     25(ptr) AccessChain 14 15
+                              Store 183 182
+             184:     22(ptr) AccessChain 14 19 21
+             185:     10(int) Load 184
+             186:     28(ptr) ImageTexelPointer 48(iBuf) 185 21
+             187:  6(int64_t) AtomicLoad 186 116 181
+             188:     25(ptr) AccessChain 14 15
+                              Store 188 187
+             189:     37(ptr) AccessChain 14 19
+             190:   11(ivec4) Load 189
+             191:   36(ivec3) VectorShuffle 190 190 0 1 2
+             192:     25(ptr) AccessChain 14 15
+             193:  6(int64_t) Load 192
+             194:     28(ptr) ImageTexelPointer 58(i2DArray) 191 21
+                              AtomicStore 194 116 195 193
+             199:     37(ptr) AccessChain 14 19
+             200:   11(ivec4) Load 199
+             201:   70(ivec2) VectorShuffle 200 200 0 1
+             203:    202(ptr) AccessChain 14 116
+             204:  7(int64_t) Load 203
+             206:    205(ptr) ImageTexelPointer 198(u2D) 201 21
+             207:  7(int64_t) AtomicIAdd 206 30 21 204
+             208:    202(ptr) AccessChain 14 116
+                              Store 208 207
+             212:     37(ptr) AccessChain 14 19
+             213:   11(ivec4) Load 212
+             214:   36(ivec3) VectorShuffle 213 213 0 1 2
+             215:    202(ptr) AccessChain 14 116
+             216:  7(int64_t) Load 215
+             217:    205(ptr) ImageTexelPointer 211(uCube) 214 21
+             218:  7(int64_t) AtomicUMin 217 30 21 216
+             219:    202(ptr) AccessChain 14 116
+                              Store 219 218
+             223:     37(ptr) AccessChain 14 19
+             224:   11(ivec4) Load 223
+             225:   70(ivec2) VectorShuffle 224 224 0 1
+             226:    202(ptr) AccessChain 14 116
+             227:  7(int64_t) Load 226
+             228:    205(ptr) ImageTexelPointer 222(u1DArray) 225 21
+             229:  7(int64_t) AtomicUMax 228 30 21 227
+             230:    202(ptr) AccessChain 14 116
+                              Store 230 229
+             234:     37(ptr) AccessChain 14 19
+             235:   11(ivec4) Load 234
+             236:   36(ivec3) VectorShuffle 235 235 0 1 2
+             237:    202(ptr) AccessChain 14 116
+             238:  7(int64_t) Load 237
+             239:    205(ptr) ImageTexelPointer 233(uCubeArray) 236 21
+             240:  7(int64_t) AtomicAnd 239 30 21 238
+             241:    202(ptr) AccessChain 14 116
+                              Store 241 240
+             245:     37(ptr) AccessChain 14 19
+             246:   11(ivec4) Load 245
+             247:   70(ivec2) VectorShuffle 246 246 0 1
+             249:     22(ptr) AccessChain 14 19 248
+             250:     10(int) Load 249
+             251:    202(ptr) AccessChain 14 116
+             252:  7(int64_t) Load 251
+             253:    205(ptr) ImageTexelPointer 244(u2DMS) 247 250
+             254:  7(int64_t) AtomicOr 253 30 21 252
+             255:    202(ptr) AccessChain 14 116
+                              Store 255 254
+             256:     37(ptr) AccessChain 14 19
+             257:   11(ivec4) Load 256
+             258:   70(ivec2) VectorShuffle 257 257 0 1
+             259:    202(ptr) AccessChain 14 116
+             260:  7(int64_t) Load 259
+             261:    205(ptr) ImageTexelPointer 198(u2D) 258 21
+             262:  7(int64_t) AtomicXor 261 30 21 260
+             263:    202(ptr) AccessChain 14 116
+                              Store 263 262
+             264:     37(ptr) AccessChain 14 19
+             265:   11(ivec4) Load 264
+             266:   36(ivec3) VectorShuffle 265 265 0 1 2
+             267:    202(ptr) AccessChain 14 116
+             268:  7(int64_t) Load 267
+             269:    205(ptr) ImageTexelPointer 211(uCube) 266 21
+             270:  7(int64_t) AtomicExchange 269 30 21 268
+             271:    202(ptr) AccessChain 14 116
+                              Store 271 270
+             272:     37(ptr) AccessChain 14 19
+             273:   11(ivec4) Load 272
+             274:   70(ivec2) VectorShuffle 273 273 0 1
+             275:    202(ptr) AccessChain 14 116
+             276:  7(int64_t) Load 275
+             277:    202(ptr) AccessChain 14 116
+             278:  7(int64_t) Load 277
+             280:  7(int64_t) IAdd 278 279
+             281:    205(ptr) ImageTexelPointer 222(u1DArray) 274 21
+             282:  7(int64_t) AtomicCompareExchange 281 30 21 21 280 276
+             283:    202(ptr) AccessChain 14 116
+                              Store 283 282
+             284:     37(ptr) AccessChain 14 19
+             285:   11(ivec4) Load 284
+             286:   70(ivec2) VectorShuffle 285 285 0 1
+             287:    202(ptr) AccessChain 14 116
+             288:  7(int64_t) Load 287
+             289:    205(ptr) ImageTexelPointer 198(u2D) 286 21
+             290:  7(int64_t) AtomicIAdd 289 116 120 288
+             291:    202(ptr) AccessChain 14 116
+                              Store 291 290
+             292:     37(ptr) AccessChain 14 19
+             293:   11(ivec4) Load 292
+             294:   36(ivec3) VectorShuffle 293 293 0 1 2
+             295:    202(ptr) AccessChain 14 116
+             296:  7(int64_t) Load 295
+             297:    205(ptr) ImageTexelPointer 211(uCube) 294 21
+             298:  7(int64_t) AtomicUMin 297 116 120 296
+             299:    202(ptr) AccessChain 14 116
+                              Store 299 298
+             300:     37(ptr) AccessChain 14 19
+             301:   11(ivec4) Load 300
+             302:   70(ivec2) VectorShuffle 301 301 0 1
+             303:    202(ptr) AccessChain 14 116
+             304:  7(int64_t) Load 303
+             305:    205(ptr) ImageTexelPointer 222(u1DArray) 302 21
+             306:  7(int64_t) AtomicUMax 305 116 120 304
+             307:    202(ptr) AccessChain 14 116
+                              Store 307 306
+             308:     37(ptr) AccessChain 14 19
+             309:   11(ivec4) Load 308
+             310:   36(ivec3) VectorShuffle 309 309 0 1 2
+             311:    202(ptr) AccessChain 14 116
+             312:  7(int64_t) Load 311
+             313:    205(ptr) ImageTexelPointer 233(uCubeArray) 310 21
+             314:  7(int64_t) AtomicAnd 313 116 120 312
+             315:    202(ptr) AccessChain 14 116
+                              Store 315 314
+             316:     37(ptr) AccessChain 14 19
+             317:   11(ivec4) Load 316
+             318:   70(ivec2) VectorShuffle 317 317 0 1
+             319:     22(ptr) AccessChain 14 19 248
+             320:     10(int) Load 319
+             321:    202(ptr) AccessChain 14 116
+             322:  7(int64_t) Load 321
+             323:    205(ptr) ImageTexelPointer 244(u2DMS) 318 320
+             324:  7(int64_t) AtomicOr 323 116 120 322
+             325:    202(ptr) AccessChain 14 116
+                              Store 325 324
+             326:     37(ptr) AccessChain 14 19
+             327:   11(ivec4) Load 326
+             328:   70(ivec2) VectorShuffle 327 327 0 1
+             329:    202(ptr) AccessChain 14 116
+             330:  7(int64_t) Load 329
+             331:    205(ptr) ImageTexelPointer 198(u2D) 328 21
+             332:  7(int64_t) AtomicXor 331 116 120 330
+             333:    202(ptr) AccessChain 14 116
+                              Store 333 332
+             334:     37(ptr) AccessChain 14 19
+             335:   11(ivec4) Load 334
+             336:   36(ivec3) VectorShuffle 335 335 0 1 2
+             337:    202(ptr) AccessChain 14 116
+             338:  7(int64_t) Load 337
+             339:    205(ptr) ImageTexelPointer 211(uCube) 336 21
+             340:  7(int64_t) AtomicExchange 339 116 120 338
+             341:    202(ptr) AccessChain 14 116
+                              Store 341 340
+             342:     37(ptr) AccessChain 14 19
+             343:   11(ivec4) Load 342
+             344:   70(ivec2) VectorShuffle 343 343 0 1
+             345:    202(ptr) AccessChain 14 116
+             346:  7(int64_t) Load 345
+             347:    202(ptr) AccessChain 14 116
+             348:  7(int64_t) Load 347
+             349:  7(int64_t) IAdd 348 279
+             350:    205(ptr) ImageTexelPointer 222(u1DArray) 344 21
+             351:  7(int64_t) AtomicCompareExchange 350 116 120 181 349 346
+             352:    202(ptr) AccessChain 14 116
+                              Store 352 351
+             353:     37(ptr) AccessChain 14 19
+             354:   11(ivec4) Load 353
+             355:   36(ivec3) VectorShuffle 354 354 0 1 2
+             356:    205(ptr) ImageTexelPointer 233(uCubeArray) 355 21
+             357:  7(int64_t) AtomicLoad 356 116 181
+             358:    202(ptr) AccessChain 14 116
+                              Store 358 357
+             359:     37(ptr) AccessChain 14 19
+             360:   11(ivec4) Load 359
+             361:   70(ivec2) VectorShuffle 360 360 0 1
+             362:     22(ptr) AccessChain 14 19 248
+             363:     10(int) Load 362
+             364:    202(ptr) AccessChain 14 116
+             365:  7(int64_t) Load 364
+             366:    205(ptr) ImageTexelPointer 244(u2DMS) 361 363
+                              AtomicStore 366 116 195 365
+             367:          16 Load 18(i1D)
+             368:     22(ptr) AccessChain 14 19 21
+             369:     10(int) Load 368
+             370:  8(i64vec4) ImageRead 367 369
+             372:    371(ptr) AccessChain 14 179
+             373:  8(i64vec4) Load 372
+             374:  8(i64vec4) IAdd 373 370
+             375:    371(ptr) AccessChain 14 179
+                              Store 375 374
+             376:          33 Load 35(i3D)
+             377:     37(ptr) AccessChain 14 19
+             378:   11(ivec4) Load 377
+             379:   36(ivec3) VectorShuffle 378 378 0 1 2
+             380:  8(i64vec4) ImageRead 376 379
+             381:    371(ptr) AccessChain 14 179
+             382:  8(i64vec4) Load 381
+             383:  8(i64vec4) IAdd 382 380
+             384:    371(ptr) AccessChain 14 179
+                              Store 384 383
+             385:          46 Load 48(iBuf)
+             386:     22(ptr) AccessChain 14 19 21
+             387:     10(int) Load 386
+             388:  8(i64vec4) ImageRead 385 387
+             389:    371(ptr) AccessChain 14 179
+             390:  8(i64vec4) Load 389
+             391:  8(i64vec4) IAdd 390 388
+             392:    371(ptr) AccessChain 14 179
+                              Store 392 391
+             393:          56 Load 58(i2DArray)
+             394:     37(ptr) AccessChain 14 19
+             395:   11(ivec4) Load 394
+             396:   36(ivec3) VectorShuffle 395 395 0 1 2
+             397:  8(i64vec4) ImageRead 393 396
+             398:    371(ptr) AccessChain 14 179
+             399:  8(i64vec4) Load 398
+             400:  8(i64vec4) IAdd 399 397
+             401:    371(ptr) AccessChain 14 179
+                              Store 401 400
+             402:          67 Load 69(i2DRect)
+             403:     37(ptr) AccessChain 14 19
+             404:   11(ivec4) Load 403
+             405:   70(ivec2) VectorShuffle 404 404 0 1
+             406:  8(i64vec4) ImageRead 402 405
+             407:    371(ptr) AccessChain 14 179
+             408:  8(i64vec4) Load 407
+             409:  8(i64vec4) IAdd 408 406
+             410:    371(ptr) AccessChain 14 179
+                              Store 410 409
+             411:          79 Load 81(i2DMSArray)
+             412:     37(ptr) AccessChain 14 19
+             413:   11(ivec4) Load 412
+             414:   36(ivec3) VectorShuffle 413 413 0 1 2
+             415:     22(ptr) AccessChain 14 19 85
+             416:     10(int) Load 415
+             417:  8(i64vec4) ImageRead 411 414 Sample 416
+             418:    371(ptr) AccessChain 14 179
+             419:  8(i64vec4) Load 418
+             420:  8(i64vec4) IAdd 419 417
+             421:    371(ptr) AccessChain 14 179
+                              Store 421 420
+             422:         196 Load 198(u2D)
+             423:     37(ptr) AccessChain 14 19
+             424:   11(ivec4) Load 423
+             425:   70(ivec2) VectorShuffle 424 424 0 1
+             428:    427(ptr) AccessChain 14 426
+             429:  9(i64vec4) Load 428
+                              ImageWrite 422 425 429
+             430:         209 Load 211(uCube)
+             431:     37(ptr) AccessChain 14 19
+             432:   11(ivec4) Load 431
+             433:   36(ivec3) VectorShuffle 432 432 0 1 2
+             434:    427(ptr) AccessChain 14 426
+             435:  9(i64vec4) Load 434
+                              ImageWrite 430 433 435
+             436:         220 Load 222(u1DArray)
+             437:     37(ptr) AccessChain 14 19
+             438:   11(ivec4) Load 437
+             439:   70(ivec2) VectorShuffle 438 438 0 1
+             440:    427(ptr) AccessChain 14 426
+             441:  9(i64vec4) Load 440
+                              ImageWrite 436 439 441
+             442:         231 Load 233(uCubeArray)
+             443:     37(ptr) AccessChain 14 19
+             444:   11(ivec4) Load 443
+             445:   36(ivec3) VectorShuffle 444 444 0 1 2
+             446:    427(ptr) AccessChain 14 426
+             447:  9(i64vec4) Load 446
+                              ImageWrite 442 445 447
+             448:         242 Load 244(u2DMS)
+             449:     37(ptr) AccessChain 14 19
+             450:   11(ivec4) Load 449
+             451:   70(ivec2) VectorShuffle 450 450 0 1
+             452:     22(ptr) AccessChain 14 19 248
+             453:     10(int) Load 452
+             454:    427(ptr) AccessChain 14 426
+             455:  9(i64vec4) Load 454
+                              ImageWrite 448 451 455 Sample 453
+             456:          33 Load 35(i3D)
+             457:     37(ptr) AccessChain 14 19
+             458:   11(ivec4) Load 457
+             459:   36(ivec3) VectorShuffle 458 458 0 1 2
+             460:    371(ptr) AccessChain 14 179
+             462:461(ResType) ImageSparseRead 456 459
+             463:  8(i64vec4) CompositeExtract 462 1
+                              Store 460 463
+             464:     10(int) CompositeExtract 462 0
+             465:          56 Load 58(i2DArray)
+             466:     37(ptr) AccessChain 14 19
+             467:   11(ivec4) Load 466
+             468:   36(ivec3) VectorShuffle 467 467 0 1 2
+             469:    371(ptr) AccessChain 14 179
+             470:461(ResType) ImageSparseRead 465 468
+             471:  8(i64vec4) CompositeExtract 470 1
+                              Store 469 471
+             472:     10(int) CompositeExtract 470 0
+             473:          67 Load 69(i2DRect)
+             474:     37(ptr) AccessChain 14 19
+             475:   11(ivec4) Load 474
+             476:   70(ivec2) VectorShuffle 475 475 0 1
+             477:    371(ptr) AccessChain 14 179
+             478:461(ResType) ImageSparseRead 473 476
+             479:  8(i64vec4) CompositeExtract 478 1
+                              Store 477 479
+             480:     10(int) CompositeExtract 478 0
+             481:         196 Load 198(u2D)
+             482:     37(ptr) AccessChain 14 19
+             483:   11(ivec4) Load 482
+             484:   70(ivec2) VectorShuffle 483 483 0 1
+             485:    427(ptr) AccessChain 14 426
+             487:486(ResType) ImageSparseRead 481 484
+             488:  9(i64vec4) CompositeExtract 487 1
+                              Store 485 488
+             489:     10(int) CompositeExtract 487 0
+             490:         209 Load 211(uCube)
+             491:     37(ptr) AccessChain 14 19
+             492:   11(ivec4) Load 491
+             493:   36(ivec3) VectorShuffle 492 492 0 1 2
+             494:    427(ptr) AccessChain 14 426
+             495:486(ResType) ImageSparseRead 490 493
+             496:  9(i64vec4) CompositeExtract 495 1
+                              Store 494 496
+             497:     10(int) CompositeExtract 495 0
+             498:         231 Load 233(uCubeArray)
+             499:     37(ptr) AccessChain 14 19
+             500:   11(ivec4) Load 499
+             501:   36(ivec3) VectorShuffle 500 500 0 1 2
+             502:    427(ptr) AccessChain 14 426
+             503:486(ResType) ImageSparseRead 498 501
+             504:  9(i64vec4) CompositeExtract 503 1
+                              Store 502 504
+             505:     10(int) CompositeExtract 503 0
                               Return
                               Return
                               FunctionEnd
                               FunctionEnd

+ 119 - 4
Test/baseResults/spv.memoryScopeSemantics.comp.out

@@ -1,7 +1,7 @@
 spv.memoryScopeSemantics.comp
 spv.memoryScopeSemantics.comp
 // Module Version 10300
 // Module Version 10300
 // Generated by (magic number): 8000b
 // Generated by (magic number): 8000b
-// Id's are bound by 169
+// Id's are bound by 245
 
 
                               Capability Shader
                               Capability Shader
                               Capability Int64
                               Capability Int64
@@ -182,6 +182,33 @@ spv.memoryScopeSemantics.comp
              164:             TypePointer UniformConstant 163
              164:             TypePointer UniformConstant 163
     165(imageMS):    164(ptr) Variable UniformConstant
     165(imageMS):    164(ptr) Variable UniformConstant
              167:      6(int) Constant 4294967289
              167:      6(int) Constant 4294967289
+             169:      6(int) Constant 8
+             170:     15(int) Constant 72
+             171:     15(int) Constant 328
+             172:      6(int) Constant 16386
+             173:     15(int) Constant 16450
+             174:      6(int) Constant 8196
+             175:     15(int) Constant 8260
+             176:      6(int) Constant 24584
+             177:     15(int) Constant 24904
+             182:      6(int) Constant 32770
+             183:     15(int) Constant 32834
+             186:      6(int) Constant 49154
+             187:     15(int) Constant 49474
+             189:      6(int) Constant 32772
+             190:     15(int) Constant 32836
+             191:      6(int) Constant 40964
+             192:     15(int) Constant 41284
+             200:      6(int) Constant 32776
+             201:     15(int) Constant 32840
+             205:     15(int) Constant 24648
+             208:      6(int) Constant 57352
+             209:     15(int) Constant 57672
+             211:     15(int) Constant 20
+             235:      6(int) Constant 16392
+             236:     15(int) Constant 16456
+             238:      6(int) Constant 8200
+             239:     15(int) Constant 8264
          4(main):           2 Function None 3
          4(main):           2 Function None 3
                5:             Label
                5:             Label
         8(origi):      7(ptr) Variable Function
         8(origi):      7(ptr) Variable Function
@@ -221,9 +248,6 @@ spv.memoryScopeSemantics.comp
                               Store 21(origu) 65
                               Store 21(origu) 65
               70:     69(ptr) AccessChain 68(bufferu) 38
               70:     69(ptr) AccessChain 68(bufferu) 38
               72:     15(int) AtomicIAdd 70 12 18 71
               72:     15(int) AtomicIAdd 70 12 18 71
-                              MemoryBarrier 26 18
-                              ControlBarrier 26 26 64
-                              ControlBarrier 26 26 17
               74:     69(ptr) AccessChain 68(bufferu) 38
               74:     69(ptr) AccessChain 68(bufferu) 38
               75:     15(int) Load 74 MakePointerVisibleKHR NonPrivatePointerKHR 26
               75:     15(int) Load 74 MakePointerVisibleKHR NonPrivatePointerKHR 26
                               Store 73(y) 75
                               Store 73(y) 75
@@ -283,5 +307,96 @@ spv.memoryScopeSemantics.comp
                               AtomicStore 166 12 33 14
                               AtomicStore 166 12 33 14
              168:     40(ptr) ImageTexelPointer 36(imagei) 39 17
              168:     40(ptr) ImageTexelPointer 36(imagei) 39 17
                               AtomicStore 168 12 33 167
                               AtomicStore 168 12 33 167
+                              ControlBarrier 26 26 17
+                              ControlBarrier 26 26 30
+                              ControlBarrier 26 26 33
+                              ControlBarrier 26 26 170
+                              ControlBarrier 26 26 171
+                              ControlBarrier 26 26 173
+                              ControlBarrier 26 26 175
+                              ControlBarrier 26 26 177
+                              MemoryBarrier 26 30
+                              MemoryBarrier 26 33
+                              MemoryBarrier 26 170
+                              MemoryBarrier 26 171
+                              MemoryBarrier 26 173
+                              MemoryBarrier 26 175
+                              MemoryBarrier 26 177
+             178:     15(int) AtomicLoad 23(atomu) 12 17
+                              Store 21(origu) 178
+             179:     15(int) AtomicLoad 23(atomu) 12 42
+                              Store 21(origu) 179
+             180:     15(int) AtomicLoad 23(atomu) 12 30
+                              Store 21(origu) 180
+             181:     15(int) AtomicLoad 23(atomu) 12 64
+                              Store 21(origu) 181
+             184:     15(int) AtomicLoad 23(atomu) 12 183
+                              Store 21(origu) 184
+             185:     15(int) AtomicLoad 23(atomu) 12 173
+                              Store 21(origu) 185
+             188:     15(int) AtomicLoad 23(atomu) 12 187
+                              Store 21(origu) 188
+                              AtomicStore 23(atomu) 12 17 62
+                              AtomicStore 23(atomu) 12 42 62
+                              AtomicStore 23(atomu) 12 33 62
+                              AtomicStore 23(atomu) 12 18 62
+                              AtomicStore 23(atomu) 12 190 62
+                              AtomicStore 23(atomu) 12 175 62
+                              AtomicStore 23(atomu) 12 192 62
+             193:     15(int) AtomicAnd 23(atomu) 12 17 62
+                              Store 21(origu) 193
+             194:     15(int) AtomicAnd 23(atomu) 12 42 62
+                              Store 21(origu) 194
+             195:     15(int) AtomicAnd 23(atomu) 12 30 62
+                              Store 21(origu) 195
+             196:     15(int) AtomicAnd 23(atomu) 12 33 62
+                              Store 21(origu) 196
+             197:     15(int) AtomicAnd 23(atomu) 12 170 62
+                              Store 21(origu) 197
+             198:     15(int) AtomicAnd 23(atomu) 12 183 62
+                              Store 21(origu) 198
+             199:     15(int) AtomicAnd 23(atomu) 12 190 62
+                              Store 21(origu) 199
+             202:     15(int) AtomicAnd 23(atomu) 12 201 62
+                              Store 21(origu) 202
+             203:     15(int) AtomicAnd 23(atomu) 12 173 62
+                              Store 21(origu) 203
+             204:     15(int) AtomicAnd 23(atomu) 12 175 62
+                              Store 21(origu) 204
+             206:     15(int) AtomicAnd 23(atomu) 12 205 62
+                              Store 21(origu) 206
+             207:     15(int) AtomicAnd 23(atomu) 12 177 62
+                              Store 21(origu) 207
+             210:     15(int) AtomicAnd 23(atomu) 12 209 62
+                              Store 21(origu) 210
+             212:     15(int) AtomicCompareExchange 23(atomu) 12 17 17 211 62
+             213:     15(int) AtomicCompareExchange 23(atomu) 12 42 42 211 62
+             214:     15(int) AtomicCompareExchange 23(atomu) 12 30 17 211 62
+             215:     15(int) AtomicCompareExchange 23(atomu) 12 33 17 211 62
+             216:     15(int) AtomicCompareExchange 23(atomu) 12 170 17 211 62
+             217:     15(int) AtomicCompareExchange 23(atomu) 12 183 42 211 62
+             218:     15(int) AtomicCompareExchange 23(atomu) 12 190 42 211 62
+             219:     15(int) AtomicCompareExchange 23(atomu) 12 201 42 211 62
+             220:     15(int) AtomicCompareExchange 23(atomu) 12 173 17 211 62
+             221:     15(int) AtomicCompareExchange 23(atomu) 12 175 17 211 62
+             222:     15(int) AtomicCompareExchange 23(atomu) 12 177 17 211 62
+             223:     15(int) AtomicCompareExchange 23(atomu) 12 209 42 211 62
+             224:     15(int) AtomicCompareExchange 23(atomu) 12 30 30 211 62
+             225:     15(int) AtomicCompareExchange 23(atomu) 12 183 183 211 62
+             226:     15(int) AtomicCompareExchange 23(atomu) 12 64 30 211 62
+             227:     15(int) AtomicCompareExchange 23(atomu) 12 64 64 211 62
+             228:     15(int) AtomicCompareExchange 23(atomu) 12 173 30 211 62
+             229:     15(int) AtomicCompareExchange 23(atomu) 12 173 173 211 62
+             230:     15(int) AtomicCompareExchange 23(atomu) 12 187 187 211 62
+             231:     15(int) AtomicCompareExchange 23(atomu) 12 170 30 211 62
+             232:     15(int) AtomicCompareExchange 23(atomu) 12 201 183 211 62
+             233:     15(int) AtomicCompareExchange 23(atomu) 12 171 30 211 62
+             234:     15(int) AtomicCompareExchange 23(atomu) 12 171 64 211 62
+             237:     15(int) AtomicCompareExchange 23(atomu) 12 236 30 211 62
+             240:     15(int) AtomicCompareExchange 23(atomu) 12 239 30 211 62
+             241:     15(int) AtomicCompareExchange 23(atomu) 12 205 30 211 62
+             242:     15(int) AtomicCompareExchange 23(atomu) 12 236 173 211 62
+             243:     15(int) AtomicCompareExchange 23(atomu) 12 205 173 211 62
+             244:     15(int) AtomicCompareExchange 23(atomu) 12 209 187 211 62
                               Return
                               Return
                               FunctionEnd
                               FunctionEnd

+ 50 - 15
Test/baseResults/spv.memoryScopeSemantics_Error.comp.out

@@ -1,19 +1,54 @@
 spv.memoryScopeSemantics_Error.comp
 spv.memoryScopeSemantics_Error.comp
-ERROR: 0:15: 'atomicStore' : gl_SemanticsAcquire must not be used with (image) atomic store 
-ERROR: 0:16: 'imageAtomicLoad' : gl_SemanticsRelease must not be used with (image) atomic load 
-ERROR: 0:17: 'atomicStore' : gl_SemanticsAcquireRelease must not be used with (image) atomic load/store 
-ERROR: 0:18: 'atomicStore' : Invalid semantics value 
-ERROR: 0:19: 'imageAtomicLoad' : Invalid storage class semantics value 
-ERROR: 0:20: 'memoryBarrier' : Semantics must include exactly one of gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease 
-ERROR: 0:21: 'memoryBarrier' : Storage class semantics must not be zero 
-ERROR: 0:22: 'memoryBarrier' : Semantics must include exactly one of gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease 
-ERROR: 0:23: 'atomicAdd' : Semantics must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease 
-ERROR: 0:24: 'atomicCompSwap' : semUnequal must not be gl_SemanticsRelease or gl_SemanticsAcquireRelease 
-ERROR: 0:25: 'memoryBarrier' : gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease 
-ERROR: 0:26: 'memoryBarrier' : gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease 
-ERROR: 0:27: 'memoryBarrier' : gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier 
-ERROR: 0:28: 'atomicCompSwap' : semEqual and semUnequal must either both include gl_SemanticsVolatile or neither 
-ERROR: 14 compilation errors.  No code generated.
+ERROR: 0:13: 'atomicStore' : gl_SemanticsAcquire must not be used with (image) atomic store 
+ERROR: 0:14: 'imageAtomicStore' : gl_SemanticsAcquire must not be used with (image) atomic store 
+ERROR: 0:17: 'atomicLoad' : gl_SemanticsRelease must not be used with (image) atomic load 
+ERROR: 0:18: 'imageAtomicLoad' : gl_SemanticsRelease must not be used with (image) atomic load 
+ERROR: 0:21: 'atomicStore' : gl_SemanticsAcquireRelease must not be used with (image) atomic load/store 
+ERROR: 0:22: 'imageAtomicStore' : gl_SemanticsAcquireRelease must not be used with (image) atomic load/store 
+ERROR: 0:23: 'atomicLoad' : gl_SemanticsAcquireRelease must not be used with (image) atomic load/store 
+ERROR: 0:24: 'imageAtomicLoad' : gl_SemanticsAcquireRelease must not be used with (image) atomic load/store 
+ERROR: 0:27: 'memoryBarrier' : Semantics must include exactly one of gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used with memoryBarrier 
+ERROR: 0:30: 'atomicCompSwap' : Invalid semantics value 
+ERROR: 0:31: 'atomicCompSwap' : Invalid semantics value 
+ERROR: 0:32: 'atomicCompSwap' : Invalid semantics value 
+ERROR: 0:33: 'atomicCompSwap' : Invalid semantics value 
+ERROR: 0:36: 'atomicCompSwap' : Invalid storage class semantics value 
+ERROR: 0:37: 'atomicCompSwap' : Invalid storage class semantics value 
+ERROR: 0:40: 'atomicCompSwap' : Semantics must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease 
+ERROR: 0:41: 'atomicCompSwap' : Semantics must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease 
+ERROR: 0:44: 'atomicCompSwap' : Storage class semantics must not be zero when used with gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease 
+ERROR: 0:45: 'atomicCompSwap' : Storage class semantics must not be zero when used with gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease 
+ERROR: 0:48: 'atomicCompSwap' : Semantics must be gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used with non-zero storage class semantics 
+ERROR: 0:49: 'atomicCompSwap' : Semantics must be gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used with non-zero storage class semantics 
+ERROR: 0:50: 'atomicCompSwap' : Semantics must be gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used with non-zero storage class semantics 
+ERROR: 0:51: 'atomicCompSwap' : Semantics must be gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used with non-zero storage class semantics 
+ERROR: 0:52: 'imageAtomicAdd' : Semantics must be gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used with non-zero storage class semantics 
+ERROR: 0:53: 'imageAtomicAdd' : Semantics must be gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used with non-zero storage class semantics 
+ERROR: 0:56: 'atomicCompSwap' : gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease 
+ERROR: 0:57: 'atomicCompSwap' : gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease 
+ERROR: 0:58: 'atomicCompSwap' : gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease 
+ERROR: 0:59: 'atomicCompSwap' : gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease 
+ERROR: 0:62: 'atomicCompSwap' : gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease 
+ERROR: 0:63: 'atomicCompSwap' : gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease 
+ERROR: 0:64: 'atomicCompSwap' : gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease 
+ERROR: 0:67: 'memoryBarrier' : gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier 
+ERROR: 0:68: 'controlBarrier' : gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier 
+ERROR: 0:69: 'controlBarrier' : gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier 
+ERROR: 0:72: 'atomicCompSwap' : semUnequal must not be gl_SemanticsRelease or gl_SemanticsAcquireRelease 
+ERROR: 0:73: 'atomicCompSwap' : semUnequal must not be gl_SemanticsRelease or gl_SemanticsAcquireRelease 
+ERROR: 0:76: 'atomicCompSwap' : semUnequal must not be gl_SemanticsAcquire unless semEqual is gl_SemanticsAcquire or gl_SemanticsAcquireRelease 
+ERROR: 0:76: 'atomicCompSwap' : semStorageUnequal must not include any option that is not present in semStorageEqual 
+ERROR: 0:77: 'atomicCompSwap' : semUnequal must not be gl_SemanticsAcquire unless semEqual is gl_SemanticsAcquire or gl_SemanticsAcquireRelease 
+ERROR: 0:80: 'atomicCompSwap' : semUnequal must not include gl_SemanticsMakeVisible unless semEqual also includes gl_SemanticsMakeVisible 
+ERROR: 0:81: 'atomicCompSwap' : semUnequal must not include gl_SemanticsMakeVisible unless semEqual also includes gl_SemanticsMakeVisible 
+ERROR: 0:84: 'atomicCompSwap' : semStorageUnequal must not include any option that is not present in semStorageEqual 
+ERROR: 0:85: 'atomicCompSwap' : semStorageUnequal must not include any option that is not present in semStorageEqual 
+ERROR: 0:86: 'atomicCompSwap' : semStorageUnequal must not include any option that is not present in semStorageEqual 
+ERROR: 0:89: 'atomicCompSwap' : semEqual and semUnequal must either both include gl_SemanticsVolatile or neither 
+ERROR: 0:90: 'atomicCompSwap' : semEqual and semUnequal must either both include gl_SemanticsVolatile or neither 
+ERROR: 0:91: 'atomicCompSwap' : semEqual and semUnequal must either both include gl_SemanticsVolatile or neither 
+ERROR: 0:92: 'atomicCompSwap' : semEqual and semUnequal must either both include gl_SemanticsVolatile or neither 
+ERROR: 49 compilation errors.  No code generated.
 
 
 
 
 SPIR-V is not generated for failed compile or link
 SPIR-V is not generated for failed compile or link

+ 48 - 48
Test/spv.atomicFloat.comp

@@ -29,169 +29,169 @@ void main()
     //atomicAdd
     //atomicAdd
     float resultf = 0;
     float resultf = 0;
     resultf = atomicAdd(atomf, 3.0);
     resultf = atomicAdd(atomf, 3.0);
-    resultf = atomicAdd(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicAdd(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultf = atomicAdd(buf.dataf, 3.0);
     resultf = atomicAdd(buf.dataf, 3.0);
-    resultf = atomicAdd(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicAdd(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     double resultd = 0;
     double resultd = 0;
     resultd = atomicAdd(atomd, 3.0);
     resultd = atomicAdd(atomd, 3.0);
-    resultd = atomicAdd(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicAdd(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultd = atomicAdd(buf.datad, 3.0);
     resultd = atomicAdd(buf.datad, 3.0);
-    resultd = atomicAdd(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicAdd(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     //atomicExchange
     //atomicExchange
     resultf = atomicExchange(buf.dataf, resultf);
     resultf = atomicExchange(buf.dataf, resultf);
     buf.dataf += resultf;
     buf.dataf += resultf;
-    resultf = atomicExchange(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicExchange(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.dataf += resultf;
     buf.dataf += resultf;
     resultf = atomicExchange(atomf, resultf);
     resultf = atomicExchange(atomf, resultf);
     buf.dataf += resultf;
     buf.dataf += resultf;
-    resultf = atomicExchange(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicExchange(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.dataf += resultf;
     buf.dataf += resultf;
 
 
     resultd = atomicExchange(buf.datad, resultd);
     resultd = atomicExchange(buf.datad, resultd);
     buf.datad += resultd;
     buf.datad += resultd;
-    resultd = atomicExchange(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultd = atomicExchange(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.datad += resultd;
     buf.datad += resultd;
     resultd = atomicExchange(atomd, resultd);
     resultd = atomicExchange(atomd, resultd);
     buf.datad += resultd;
     buf.datad += resultd;
-    resultd = atomicExchange(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultd = atomicExchange(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.datad += resultd;
     buf.datad += resultd;
 
 
     //atomic load/store
     //atomic load/store
-    resultf = atomicLoad(buf.dataf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicLoad(buf.dataf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.dataf += resultf;
     buf.dataf += resultf;
 
 
-    resultf = atomicLoad(atomf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicLoad(atomf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.dataf += resultf;
     buf.dataf += resultf;
 
 
-    resultd = atomicLoad(buf.datad, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultd = atomicLoad(buf.datad, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.datad += resultd;
     buf.datad += resultd;
 
 
-    resultd = atomicLoad(atomd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultd = atomicLoad(atomd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.datad += resultd;
     buf.datad += resultd;
 
 
     // image atomics on 1D:
     // image atomics on 1D:
     atomf = imageAtomicAdd(fimage1D, int(0), 2.0);
     atomf = imageAtomicAdd(fimage1D, int(0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimage1D, int(1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimage1D, int(1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimage1D, int(1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimage1D, int(1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimage1D, int(2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimage1D, int(2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 1D Array:
     // image atomics on 1D Array:
     atomf = imageAtomicAdd(fimage1DArray, ivec2(0,0), 2.0);
     atomf = imageAtomicAdd(fimage1DArray, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimage1DArray, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimage1DArray, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimage1DArray, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimage1DArray, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimage1DArray, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimage1DArray, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 2D:
     // image atomics on 2D:
     atomf = imageAtomicAdd(fimage2D, ivec2(0,0), 2.0);
     atomf = imageAtomicAdd(fimage2D, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimage2D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimage2D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimage2D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimage2D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimage2D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimage2D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 2D Rect:
     // image atomics on 2D Rect:
     atomf = imageAtomicAdd(fimage2DRect, ivec2(0,0), 2.0);
     atomf = imageAtomicAdd(fimage2DRect, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimage2DRect, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimage2DRect, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimage2DRect, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimage2DRect, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimage2DRect, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimage2DRect, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 2D Array:
     // image atomics on 2D Array:
     atomf = imageAtomicAdd(fimage2DArray, ivec3(0,0,0), 2.0);
     atomf = imageAtomicAdd(fimage2DArray, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimage2DArray, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimage2DArray, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimage2DArray, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimage2DArray, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimage2DArray, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimage2DArray, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on Cube:
     // image atomics on Cube:
     atomf = imageAtomicAdd(fimageCube, ivec3(0,0,0), 2.0);
     atomf = imageAtomicAdd(fimageCube, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimageCube, ivec3(1,0,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimageCube, ivec3(1,0,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimageCube, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimageCube, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimageCube, ivec3(2,2,1), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimageCube, ivec3(2,2,1), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on Cube Array:
     // image atomics on Cube Array:
     atomf = imageAtomicAdd(fimageCubeArray, ivec3(0,0,0), 2.0);
     atomf = imageAtomicAdd(fimageCubeArray, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimageCubeArray, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimageCubeArray, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimageCubeArray, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimageCubeArray, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimageCubeArray, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimageCubeArray, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 3D:
     // image atomics on 3D:
     atomf = imageAtomicAdd(fimage3D, ivec3(0,0,0), 2.0);
     atomf = imageAtomicAdd(fimage3D, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicAdd(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicExchange(fimage3D, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimage3D, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    atomf = imageAtomicLoad(fimage3D, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicLoad(fimage3D, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
-    imageAtomicStore(fimage3D, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(fimage3D, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 }
 }

+ 36 - 36
Test/spv.atomicFloat2.comp

@@ -32,148 +32,148 @@ void main()
     //atomicAdd
     //atomicAdd
     float16_t resulth = float16_t(0.0);
     float16_t resulth = float16_t(0.0);
     resulth = atomicAdd(atomh, float16_t(3.0));
     resulth = atomicAdd(atomh, float16_t(3.0));
-    resulth = atomicAdd(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resulth = atomicAdd(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resulth = atomicAdd(buf.datah, float16_t(3.0));
     resulth = atomicAdd(buf.datah, float16_t(3.0));
-    resulth = atomicAdd(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resulth = atomicAdd(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     //atomicMin
     //atomicMin
     resulth = atomicMin(atomh, float16_t(3.0));
     resulth = atomicMin(atomh, float16_t(3.0));
-    resulth = atomicMin(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resulth = atomicMin(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resulth = atomicMin(buf.datah, float16_t(3.0));
     resulth = atomicMin(buf.datah, float16_t(3.0));
-    resulth = atomicMin(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resulth = atomicMin(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     float resultf = 0.0;
     float resultf = 0.0;
     resultf = atomicMin(atomf, 3.0);
     resultf = atomicMin(atomf, 3.0);
-    resultf = atomicMin(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicMin(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultf = atomicMin(buf.dataf, 3.0);
     resultf = atomicMin(buf.dataf, 3.0);
-    resultf = atomicMin(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicMin(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     double resultd = 0.0;
     double resultd = 0.0;
     resultd = atomicMin(atomd, 3.0);
     resultd = atomicMin(atomd, 3.0);
-    resultd = atomicMin(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicMin(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultd = atomicMin(buf.datad, 3.0);
     resultd = atomicMin(buf.datad, 3.0);
-    resultd = atomicMin(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicMin(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     //atomicMax
     //atomicMax
     resulth = atomicMax(atomh, float16_t(3.0));
     resulth = atomicMax(atomh, float16_t(3.0));
-    resulth = atomicMax(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resulth = atomicMax(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resulth = atomicMax(buf.datah, float16_t(3.0));
     resulth = atomicMax(buf.datah, float16_t(3.0));
-    resulth = atomicMax(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resulth = atomicMax(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     resultf = atomicMax(atomf, 3.0);
     resultf = atomicMax(atomf, 3.0);
-    resultf = atomicMax(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicMax(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultf = atomicMax(buf.dataf, 3.0);
     resultf = atomicMax(buf.dataf, 3.0);
-    resultf = atomicMax(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicMax(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     resultd = atomicMax(atomd, 3.0);
     resultd = atomicMax(atomd, 3.0);
-    resultd = atomicMax(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicMax(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultd = atomicMax(buf.datad, 3.0);
     resultd = atomicMax(buf.datad, 3.0);
-    resultd = atomicMax(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicMax(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     //atomicExchange
     //atomicExchange
     resulth = atomicExchange(buf.datah, resulth);
     resulth = atomicExchange(buf.datah, resulth);
     buf.datah += resulth;
     buf.datah += resulth;
-    resulth = atomicExchange(buf.datah, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resulth = atomicExchange(buf.datah, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.datah += resulth;
     buf.datah += resulth;
     resulth = atomicExchange(atomh, resulth);
     resulth = atomicExchange(atomh, resulth);
     buf.datah += resulth;
     buf.datah += resulth;
-    resulth = atomicExchange(atomh, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resulth = atomicExchange(atomh, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.datah += resulth;
     buf.datah += resulth;
 
 
     //atomic load/store
     //atomic load/store
-    resulth = atomicLoad(buf.datah, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(buf.datah, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resulth = atomicLoad(buf.datah, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(buf.datah, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.datah += resulth;
     buf.datah += resulth;
 
 
-    resulth = atomicLoad(atomh, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(atomh, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resulth = atomicLoad(atomh, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(atomh, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.datah += resulth;
     buf.datah += resulth;
 
 
     // image atomics on 1D:
     // image atomics on 1D:
     atomf = imageAtomicMin(fimage1D, int(0), 2.0);
     atomf = imageAtomicMin(fimage1D, int(0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimage1D, int(0), 2.0);
     atomf = imageAtomicMax(fimage1D, int(0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 1D Array:
     // image atomics on 1D Array:
     atomf = imageAtomicMin(fimage1DArray, ivec2(0,0), 2.0);
     atomf = imageAtomicMin(fimage1DArray, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimage1DArray, ivec2(0,0), 2.0);
     atomf = imageAtomicMax(fimage1DArray, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 2D:
     // image atomics on 2D:
     atomf = imageAtomicMin(fimage2D, ivec2(0,0), 2.0);
     atomf = imageAtomicMin(fimage2D, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimage2D, ivec2(0,0), 2.0);
     atomf = imageAtomicMax(fimage2D, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 2D Rect:
     // image atomics on 2D Rect:
     atomf = imageAtomicMin(fimage2DRect, ivec2(0,0), 2.0);
     atomf = imageAtomicMin(fimage2DRect, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimage2DRect, ivec2(0,0), 2.0);
     atomf = imageAtomicMax(fimage2DRect, ivec2(0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 2D Array:
     // image atomics on 2D Array:
     atomf = imageAtomicMin(fimage2DArray, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMin(fimage2DArray, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimage2DArray, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMax(fimage2DArray, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on Cube:
     // image atomics on Cube:
     atomf = imageAtomicMin(fimageCube, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMin(fimageCube, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimageCube, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMax(fimageCube, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on Cube Array:
     // image atomics on Cube Array:
     atomf = imageAtomicMin(fimageCubeArray, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMin(fimageCubeArray, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimageCubeArray, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMax(fimageCubeArray, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     // image atomics on 3D:
     // image atomics on 3D:
     atomf = imageAtomicMin(fimage3D, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMin(fimage3D, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMin(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMin(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 
 
     atomf = imageAtomicMax(fimage3D, ivec3(0,0,0), 2.0);
     atomf = imageAtomicMax(fimage3D, ivec3(0,0,0), 2.0);
     buf.dataf += atomf;
     buf.dataf += atomf;
-    atomf = imageAtomicMax(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
+    atomf = imageAtomicMax(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 }
 }

+ 36 - 36
Test/spv.atomicFloat_Error.comp

@@ -23,48 +23,48 @@ void undeclared_errors()
     //atomicAdd
     //atomicAdd
     float resultf = 0;
     float resultf = 0;
     resultf = atomicAdd(atomf, 3.0);
     resultf = atomicAdd(atomf, 3.0);
-    resultf = atomicAdd(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicAdd(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultf = atomicAdd(buf.dataf, 3.0);
     resultf = atomicAdd(buf.dataf, 3.0);
-    resultf = atomicAdd(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicAdd(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     double resultd = 0;
     double resultd = 0;
     resultd = atomicAdd(atomd, 3.0);
     resultd = atomicAdd(atomd, 3.0);
-    resultd = atomicAdd(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicAdd(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
     resultd = atomicAdd(buf.datad, 3.0);
     resultd = atomicAdd(buf.datad, 3.0);
-    resultd = atomicAdd(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultd = atomicAdd(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     //atomicExchange
     //atomicExchange
     resultf = atomicExchange(buf.dataf, resultf);
     resultf = atomicExchange(buf.dataf, resultf);
-    resultf = atomicExchange(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicExchange(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     resultf = atomicExchange(atomf, resultf);
     resultf = atomicExchange(atomf, resultf);
-    resultf = atomicExchange(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicExchange(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.dataf += resultf;
     buf.dataf += resultf;
 
 
     resultd = atomicExchange(buf.datad, resultd);
     resultd = atomicExchange(buf.datad, resultd);
-    resultd = atomicExchange(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultd = atomicExchange(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     resultd = atomicExchange(atomd, resultd);
     resultd = atomicExchange(atomd, resultd);
-    resultd = atomicExchange(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultd = atomicExchange(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.datad += resultd;
     buf.datad += resultd;
 
 
     //atomic load/store
     //atomic load/store
-    resultf = atomicLoad(buf.dataf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    resultf = atomicLoad(atomf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicLoad(buf.dataf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
+    resultf = atomicLoad(atomf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.dataf += resultf;
     buf.dataf += resultf;
 
 
-    resultd = atomicLoad(buf.datad, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    resultd = atomicLoad(atomd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultd = atomicLoad(buf.datad, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
+    resultd = atomicLoad(atomd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelease);
     buf.datad += resultd;
     buf.datad += resultd;
 
 
     // image atomics:
     // image atomics:
     atomf = imageAtomicAdd(fimage2D, ivec2(0,0), 2.0);
     atomf = imageAtomicAdd(fimage2D, ivec2(0,0), 2.0);
-    atomf = imageAtomicAdd(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
-    atomf = imageAtomicExchange(fimage2D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    atomf = imageAtomicLoad(fimage2D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    imageAtomicStore(fimage2D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicAdd(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsAcquireRelease);
+    atomf = imageAtomicExchange(fimage2D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    atomf = imageAtomicLoad(fimage2D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    imageAtomicStore(fimage2D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 }
 }
 
 
@@ -79,34 +79,34 @@ void main()
     //atomicAdd
     //atomicAdd
     resultf = atomicAdd(atomi);
     resultf = atomicAdd(atomi);
     resultf = atomicAdd(atomi, 3.0);
     resultf = atomicAdd(atomi, 3.0);
-    resultf = atomicAdd(atomi, resultf, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
-    resultf = atomicAdd(atomi, resultf, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    resultf = atomicAdd(atomi, resultf, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    resultf = atomicAdd(atomi, resultf, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
 
 
     //atomicExchange
     //atomicExchange
     resultf = atomicExchange(buf.datai);
     resultf = atomicExchange(buf.datai);
     resultf = atomicExchange(buf.datai, resultf);
     resultf = atomicExchange(buf.datai, resultf);
-    resultf = atomicExchange(buf.datai, resultf, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    resultf = atomicExchange(buf.datai, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicExchange(buf.datai, resultf, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
+    resultf = atomicExchange(buf.datai, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     resultf = atomicExchange(atomi, resultf);
     resultf = atomicExchange(atomi, resultf);
-    resultf = atomicExchange(atomi, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicExchange(atomi, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
     buf.dataf += resultf;
     buf.dataf += resultf;
 
 
     //atomic load/store
     //atomic load/store
-    resultf = atomicLoad(buf.datai, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
-    atomicStore(buf.datai, resulti, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
+    resultf = atomicLoad(buf.datai, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicStore(buf.datai, resulti, gl_StorageSemanticsShared, gl_SemanticsRelease);
 
 
     // image atomics:
     // image atomics:
     atomf = imageAtomicAdd(fimage1D, ivec2(0,0), 2.0);
     atomf = imageAtomicAdd(fimage1D, ivec2(0,0), 2.0);
     atomf = imageAtomicAdd(fimage2D, ivec3(0,0,0), 2.0);
     atomf = imageAtomicAdd(fimage2D, ivec3(0,0,0), 2.0);
     atomf = imageAtomicAdd(fimage2D, 2.0);
     atomf = imageAtomicAdd(fimage2D, 2.0);
-    atomf = imageAtomicExchange(fimage1D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    atomf = imageAtomicExchange(fimage2D, 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    atomf = imageAtomicExchange(fimage2D, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    atomf = imageAtomicLoad(fimage1D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    atomf = imageAtomicLoad(fimage2D, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    atomf = imageAtomicLoad(fimage2D, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    imageAtomicStore(fimage1D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    imageAtomicStore(fimage2D, atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    imageAtomicStore(fimage2D, ivec3(2,2,1), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    atomf = imageAtomicExchange(fimage1D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    atomf = imageAtomicExchange(fimage2D, 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    atomf = imageAtomicExchange(fimage2D, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    atomf = imageAtomicLoad(fimage1D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    atomf = imageAtomicLoad(fimage2D, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    atomf = imageAtomicLoad(fimage2D, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    imageAtomicStore(fimage1D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
+    imageAtomicStore(fimage2D, atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
+    imageAtomicStore(fimage2D, ivec3(2,2,1), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
     buf.dataf += atomf;
     buf.dataf += atomf;
 }
 }

+ 1 - 1
Test/spv.atomicStoreInt64.comp

@@ -7,5 +7,5 @@ layout(set = 0, binding = 0) buffer ssbo { uint64_t y; };
 layout(set = 0, binding = 1) uniform ubo { uint64_t z; };
 layout(set = 0, binding = 1) uniform ubo { uint64_t z; };
 
 
 void main() {
 void main() {
-    atomicStore(y, z, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+    atomicStore(y, z, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
 }
 }

+ 1 - 1
Test/spv.imageAtomic64.comp

@@ -8,5 +8,5 @@ layout(set = 0, binding = 1, r64ui) uniform u64image2D z;
 
 
 void main() {
 void main() {
     // Test imageAtomicStore exclusively. Do NOT add other atomic operations to this test.
     // Test imageAtomicStore exclusively. Do NOT add other atomic operations to this test.
-    imageAtomicStore(z, ivec2(1, 1), y, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    imageAtomicStore(z, ivec2(1, 1), y, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
 }
 }

+ 20 - 20
Test/spv.imageAtomic64.frag

@@ -37,17 +37,17 @@ void main()
     i64 = imageAtomicExchange(i1D, i32v4.x, i64);
     i64 = imageAtomicExchange(i1D, i32v4.x, i64);
     i64 = imageAtomicCompSwap(i3D, i32v4.xyz, i64, i64 + 1);
     i64 = imageAtomicCompSwap(i3D, i32v4.xyz, i64, i64 + 1);
 
 
-    i64 = imageAtomicAdd(i1D, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    i64 = imageAtomicMin(i3D, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    i64 = imageAtomicMax(iBuf, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    i64 = imageAtomicAnd(i2DArray, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    i64 = imageAtomicOr(i2DRect, i32v4.xy, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    i64 = imageAtomicXor(i2DMSArray, i32v4.xyz, i32v4.w, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    i64 = imageAtomicExchange(i1D, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    i64 = imageAtomicAdd(i1D, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    i64 = imageAtomicMin(i3D, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    i64 = imageAtomicMax(iBuf, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    i64 = imageAtomicAnd(i2DArray, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    i64 = imageAtomicOr(i2DRect, i32v4.xy, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    i64 = imageAtomicXor(i2DMSArray, i32v4.xyz, i32v4.w, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    i64 = imageAtomicExchange(i1D, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     i64 = imageAtomicCompSwap(i3D, i32v4.xyz, i64, i64 + 1, gl_ScopeDevice,
     i64 = imageAtomicCompSwap(i3D, i32v4.xyz, i64, i64 + 1, gl_ScopeDevice,
-            gl_StorageSemanticsImage, gl_SemanticsRelaxed, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    i64 = imageAtomicLoad(iBuf, i32v4.x, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    imageAtomicStore(i2DArray, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+            gl_StorageSemanticsImage, gl_SemanticsAcquireRelease, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    i64 = imageAtomicLoad(iBuf, i32v4.x, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    imageAtomicStore(i2DArray, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
 
 
     u64 = imageAtomicAdd(u2D, i32v4.xy, u64);
     u64 = imageAtomicAdd(u2D, i32v4.xy, u64);
     u64 = imageAtomicMin(uCube, i32v4.xyz, u64);
     u64 = imageAtomicMin(uCube, i32v4.xyz, u64);
@@ -58,17 +58,17 @@ void main()
     u64 = imageAtomicExchange(uCube, i32v4.xyz, u64);
     u64 = imageAtomicExchange(uCube, i32v4.xyz, u64);
     u64 = imageAtomicCompSwap(u1DArray, i32v4.xy, u64, u64 + 1);
     u64 = imageAtomicCompSwap(u1DArray, i32v4.xy, u64, u64 + 1);
 
 
-    u64 = imageAtomicAdd(u2D, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    u64 = imageAtomicMin(uCube, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    u64 = imageAtomicMax(u1DArray, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    u64 = imageAtomicAnd(uCubeArray, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    u64 = imageAtomicOr(u2DMS, i32v4.xy, i32v4.z, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    u64 = imageAtomicXor(u2D, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    u64 = imageAtomicExchange(uCube, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+    u64 = imageAtomicAdd(u2D, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    u64 = imageAtomicMin(uCube, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    u64 = imageAtomicMax(u1DArray, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    u64 = imageAtomicAnd(uCubeArray, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    u64 = imageAtomicOr(u2DMS, i32v4.xy, i32v4.z, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    u64 = imageAtomicXor(u2D, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
+    u64 = imageAtomicExchange(uCube, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquireRelease);
     u64 = imageAtomicCompSwap(u1DArray, i32v4.xy, u64, u64 + 1, gl_ScopeDevice,
     u64 = imageAtomicCompSwap(u1DArray, i32v4.xy, u64, u64 + 1, gl_ScopeDevice,
-            gl_StorageSemanticsImage, gl_SemanticsRelaxed, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    u64 = imageAtomicLoad(uCubeArray, i32v4.xyz, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
-    imageAtomicStore(u2DMS, i32v4.xy, i32v4.z, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
+            gl_StorageSemanticsImage, gl_SemanticsAcquireRelease, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    u64 = imageAtomicLoad(uCubeArray, i32v4.xyz, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsAcquire);
+    imageAtomicStore(u2DMS, i32v4.xy, i32v4.z, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelease);
 
 
     i64v4 += imageLoad(i1D, i32v4.x);
     i64v4 += imageLoad(i1D, i32v4.x);
     i64v4 += imageLoad(i3D, i32v4.xyz);
     i64v4 += imageLoad(i3D, i32v4.xyz);

+ 79 - 4
Test/spv.memoryScopeSemantics.comp

@@ -39,9 +39,6 @@ void main()
     origi = atomicExchange(atomi, origi, gl_ScopeDevice, 0, 0);
     origi = atomicExchange(atomi, origi, gl_ScopeDevice, 0, 0);
     origu = atomicCompSwap(atomu, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
     origu = atomicCompSwap(atomu, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
     atomicAdd(bufferu.x, 1, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsRelease);
     atomicAdd(bufferu.x, 1, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsRelease);
-    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsRelease);
-    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
-    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, 0, 0);
 
 
     uint y;
     uint y;
     y = bufferu.x;
     y = bufferu.x;
@@ -70,5 +67,83 @@ void main()
 
 
     imageAtomicStore(imageMS, ivec2(0,0), 1, 4, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
     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);
     imageAtomicStore(imagei, ivec2(0,0), -7, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
-}
 
 
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, 0, 0);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeAvailable);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable);
+
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeAvailable);
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable);
+
+    origu = atomicLoad(atomu, gl_ScopeDevice, 0, 0);
+    origu = atomicLoad(atomu, gl_ScopeDevice, 0, gl_SemanticsVolatile);
+    origu = atomicLoad(atomu, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    origu = atomicLoad(atomu, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    origu = atomicLoad(atomu, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile);
+    origu = atomicLoad(atomu, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    origu = atomicLoad(atomu, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire | gl_SemanticsMakeVisible | gl_SemanticsVolatile);
+
+    atomicStore(atomu, 10U, gl_ScopeDevice, 0, 0);
+    atomicStore(atomu, 10U, gl_ScopeDevice, 0, gl_SemanticsVolatile);
+    atomicStore(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
+    atomicStore(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsRelease);
+    atomicStore(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsVolatile);
+    atomicStore(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeAvailable);
+    atomicStore(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsRelease | gl_SemanticsMakeAvailable | gl_SemanticsVolatile);
+
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, 0, 0);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, 0, gl_SemanticsVolatile);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsVolatile);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsVolatile);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeAvailable);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable);
+    origu = atomicAnd(atomu, 10U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable | gl_SemanticsVolatile);
+
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, 0, 0, 0, 0);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, 0, gl_SemanticsVolatile, 0, gl_SemanticsVolatile);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire, 0, 0);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease, 0, 0);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, 0, 0);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile, 0, gl_SemanticsVolatile);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsVolatile, 0, gl_SemanticsVolatile);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsVolatile, 0, gl_SemanticsVolatile);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible, 0, 0);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeAvailable, 0, 0);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable, 0, 0);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable | gl_SemanticsVolatile, 0, gl_SemanticsVolatile);
+
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire | gl_SemanticsMakeVisible | gl_SemanticsVolatile, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire | gl_SemanticsMakeVisible | gl_SemanticsVolatile);
+
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsVolatile, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeAvailable, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    atomicCompSwap(atomu, 10U, 20U, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible | gl_SemanticsMakeAvailable | gl_SemanticsVolatile, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire | gl_SemanticsMakeVisible | gl_SemanticsVolatile);
+}

+ 85 - 22
Test/spv.memoryScopeSemantics_Error.comp

@@ -1,30 +1,93 @@
 #version 450
 #version 450
 #extension GL_KHR_memory_scope_semantics : require
 #extension GL_KHR_memory_scope_semantics : require
 
 
-
 shared uint value;
 shared uint value;
-shared int atomi;
-shared uint atomu;
-layout(binding = 0, r32ui) workgroupcoherent uniform uimage2D imageu;
-layout(binding = 1, r32i) coherent uniform iimage2D imagei;
-layout (binding = 2) buffer BufferU { workgroupcoherent uint x; } bufferu;
-layout (binding = 3) subgroupcoherent buffer BufferI { uint x; } bufferi;
+layout (binding = 0) buffer BufferU { coherent uint x; } bufferu;
+layout(binding = 1, r32ui) coherent uniform uimage2D imageu;
 
 
 void main()
 void main()
 {
 {
-    atomicStore(atomu, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
-    int origi = imageAtomicLoad(imagei, ivec2(0,0), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
-    atomicStore(atomu, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
-    atomicStore(atomu, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_StorageSemanticsBuffer);
-    origi = imageAtomicLoad(imagei, ivec2(0,0), gl_ScopeDevice, gl_SemanticsAcquire, gl_SemanticsAcquire);
-    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, 0);
-    memoryBarrier(gl_ScopeWorkgroup, 0, gl_SemanticsRelease);
-    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsRelease | gl_SemanticsAcquire);
-    atomicAdd(atomu, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsAcquire);
-    uint origu = atomicCompSwap(atomu, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquireRelease);
-    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeVisible);
-    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeAvailable);
-    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsVolatile);
-    atomicCompSwap(bufferi.x, 10u, 10u, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
-}
+    uint origu;
+
+    // Acquire must not be used with (image) atomic store
+    atomicStore(bufferu.x, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    imageAtomicStore(imageu, ivec2(0,0), value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+
+    // Release must not be used with (image) atomic load
+    origu = atomicLoad(bufferu.x, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
+    origu = imageAtomicLoad(imageu, ivec2(0,0), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
+
+    // AcquireRelease must not be used with (image) atomic load/store
+    atomicStore(bufferu.x, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    imageAtomicStore(imageu, ivec2(0,0), value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    origu = atomicLoad(bufferu.x, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    origu = imageAtomicLoad(imageu, ivec2(0,0), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+
+    // Relaxed must not be used with memoryBarrier
+    memoryBarrier(gl_ScopeWorkgroup, 0, 0);
+
+    // Illegal semantics bits
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, 0, gl_StorageSemanticsBuffer, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_StorageSemanticsBuffer | gl_SemanticsAcquireRelease, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, 0, gl_StorageSemanticsBuffer);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, gl_StorageSemanticsBuffer | gl_SemanticsAcquire);
+
+    // Illegal storage class semantics bits
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_SemanticsAcquire, gl_SemanticsAcquire, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_SemanticsAcquire, gl_SemanticsAcquire, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+
+    // Semantics must not have multiple memory order bits set
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsRelease, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsAcquireRelease, 0, 0);
+
+    // Storage class semantics must be non-zero when used with a non-relaxed memory order
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, 0, gl_SemanticsAcquireRelease, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, 0, gl_SemanticsAcquire);
 
 
+    // Semantics must have a non-relaxed memory order when used with non-zero storage class semantics
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, 0, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsVolatile, 0, gl_SemanticsVolatile);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsVolatile, gl_StorageSemanticsBuffer, gl_SemanticsVolatile);
+    imageAtomicAdd(imageu, ivec2(0,0), value, gl_ScopeDevice, gl_StorageSemanticsImage, 0);
+    imageAtomicAdd(imageu, ivec2(0,0), value, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsVolatile);
+
+    // MakeAvailable requires Release or AcquireRelease
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, 0, gl_SemanticsMakeAvailable, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeAvailable, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeAvailable, 0, gl_SemanticsMakeAvailable);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeAvailable, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeAvailable);
+
+    // MakeVisible requires Acquire or AcquireRelease
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, 0, gl_SemanticsMakeVisible, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease | gl_SemanticsMakeVisible, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsMakeVisible, 0, gl_SemanticsMakeVisible);
+
+    // Volatile must not be used with memoryBarrier or controlBarrier
+    memoryBarrier(gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsVolatile);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, 0, gl_SemanticsVolatile);
+    controlBarrier(gl_ScopeWorkgroup, gl_ScopeWorkgroup, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsVolatile);
+
+    // SemUnequal must not be Release or AcquireRelease 
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, gl_SemanticsRelease);
+
+    // SemUnequal must not be Acquire unless SemEqual is Acquire or AcquireRelease
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, 0, 0, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelease, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+
+    // SemUnequal must not include MakeVisible unless SemEqual also includes MakeVisible
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsMakeVisible);
+
+    // SemStorageUnequal must not include any option that is not present in SemStorageEqual
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire, gl_StorageSemanticsShared, gl_SemanticsAcquire);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
+
+    // SemEqual and SemUnequal must either both include Volatile or neither
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, 0, gl_SemanticsVolatile, 0, 0);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, 0, 0, 0, gl_SemanticsVolatile);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease | gl_SemanticsVolatile, gl_StorageSemanticsBuffer, gl_SemanticsAcquire);
+    atomicCompSwap(bufferu.x, 10u, value, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsAcquireRelease, gl_StorageSemanticsBuffer, gl_SemanticsAcquire | gl_SemanticsVolatile);
+}

+ 86 - 54
glslang/MachineIndependent/ParseHelper.cpp

@@ -2232,6 +2232,9 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
     const int gl_StorageSemanticsImage    = 0x800;
     const int gl_StorageSemanticsImage    = 0x800;
     const int gl_StorageSemanticsOutput   = 0x1000;
     const int gl_StorageSemanticsOutput   = 0x1000;
 
 
+    const int nonRelaxedMemoryOrder = gl_SemanticsAcquire |
+                                      gl_SemanticsRelease |
+                                      gl_SemanticsAcquireRelease;
 
 
     unsigned int semantics = 0, storageClassSemantics = 0;
     unsigned int semantics = 0, storageClassSemantics = 0;
     unsigned int semantics2 = 0, storageClassSemantics2 = 0;
     unsigned int semantics2 = 0, storageClassSemantics2 = 0;
@@ -2298,22 +2301,6 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
         break;
         break;
     }
     }
 
 
-    if ((semantics & gl_SemanticsAcquire) &&
-        (callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore)) {
-        error(loc, "gl_SemanticsAcquire must not be used with (image) atomic store",
-              fnCandidate.getName().c_str(), "");
-    }
-    if ((semantics & gl_SemanticsRelease) &&
-        (callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad)) {
-        error(loc, "gl_SemanticsRelease must not be used with (image) atomic load",
-              fnCandidate.getName().c_str(), "");
-    }
-    if ((semantics & gl_SemanticsAcquireRelease) &&
-        (callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore ||
-         callNode.getOp() == EOpAtomicLoad  || callNode.getOp() == EOpImageAtomicLoad)) {
-        error(loc, "gl_SemanticsAcquireRelease must not be used with (image) atomic load/store",
-              fnCandidate.getName().c_str(), "");
-    }
     if (((semantics | semantics2) & ~(gl_SemanticsAcquire |
     if (((semantics | semantics2) & ~(gl_SemanticsAcquire |
                                       gl_SemanticsRelease |
                                       gl_SemanticsRelease |
                                       gl_SemanticsAcquireRelease |
                                       gl_SemanticsAcquireRelease |
@@ -2322,6 +2309,7 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
                                       gl_SemanticsVolatile))) {
                                       gl_SemanticsVolatile))) {
         error(loc, "Invalid semantics value", fnCandidate.getName().c_str(), "");
         error(loc, "Invalid semantics value", fnCandidate.getName().c_str(), "");
     }
     }
+
     if (((storageClassSemantics | storageClassSemantics2) & ~(gl_StorageSemanticsBuffer |
     if (((storageClassSemantics | storageClassSemantics2) & ~(gl_StorageSemanticsBuffer |
                                                               gl_StorageSemanticsShared |
                                                               gl_StorageSemanticsShared |
                                                               gl_StorageSemanticsImage |
                                                               gl_StorageSemanticsImage |
@@ -2329,58 +2317,102 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
         error(loc, "Invalid storage class semantics value", fnCandidate.getName().c_str(), "");
         error(loc, "Invalid storage class semantics value", fnCandidate.getName().c_str(), "");
     }
     }
 
 
-    if (callNode.getOp() == EOpMemoryBarrier) {
-        if (!IsPow2(semantics & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease))) {
-            error(loc, "Semantics must include exactly one of gl_SemanticsRelease, gl_SemanticsAcquire, or "
-                       "gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), "");
-        }
-    } else {
-        if (semantics & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease)) {
-            if (!IsPow2(semantics & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease))) {
-                error(loc, "Semantics must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or "
-                           "gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), "");
-            }
-        }
-        if (semantics2 & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease)) {
-            if (!IsPow2(semantics2 & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease))) {
-                error(loc, "semUnequal must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or "
-                           "gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), "");
-            }
-        }
-    }
-    if (callNode.getOp() == EOpMemoryBarrier) {
-        if (storageClassSemantics == 0) {
-            error(loc, "Storage class semantics must not be zero", fnCandidate.getName().c_str(), "");
-        }
+    if (((semantics & nonRelaxedMemoryOrder) && !IsPow2(semantics & nonRelaxedMemoryOrder)) ||
+        ((semantics2 & nonRelaxedMemoryOrder) && !IsPow2(semantics2 & nonRelaxedMemoryOrder))) {
+        error(loc,
+              "Semantics must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or "
+              "gl_SemanticsAcquireRelease",
+              fnCandidate.getName().c_str(), "");
     }
     }
-    if (callNode.getOp() == EOpBarrier && semantics != 0 && storageClassSemantics == 0) {
-        error(loc, "Storage class semantics must not be zero", fnCandidate.getName().c_str(), "");
+
+    if (((semantics & nonRelaxedMemoryOrder) && !storageClassSemantics) ||
+        ((semantics2 & nonRelaxedMemoryOrder) && !storageClassSemantics2)) {
+        error(loc,
+              "Storage class semantics must not be zero when used with gl_SemanticsRelease, "
+              "gl_SemanticsAcquire, or gl_SemanticsAcquireRelease",
+              fnCandidate.getName().c_str(), "");
     }
     }
-    if ((callNode.getOp() == EOpAtomicCompSwap || callNode.getOp() == EOpImageAtomicCompSwap) &&
-        (semantics2 & (gl_SemanticsRelease | gl_SemanticsAcquireRelease))) {
-        error(loc, "semUnequal must not be gl_SemanticsRelease or gl_SemanticsAcquireRelease",
+
+    if ((storageClassSemantics && !(semantics & nonRelaxedMemoryOrder)) ||
+        (storageClassSemantics2 && !(semantics2 & nonRelaxedMemoryOrder))) {
+        error(loc,
+              "Semantics must be gl_SemanticsRelease, gl_SemanticsAcquire, or gl_SemanticsAcquireRelease when used "
+              "with non-zero storage class semantics",
               fnCandidate.getName().c_str(), "");
               fnCandidate.getName().c_str(), "");
     }
     }
-    if ((semantics & gl_SemanticsMakeAvailable) &&
-        !(semantics & (gl_SemanticsRelease | gl_SemanticsAcquireRelease))) {
+
+    if (((semantics & gl_SemanticsMakeAvailable) &&
+         !(semantics & (gl_SemanticsRelease | gl_SemanticsAcquireRelease))) ||
+        ((semantics2 & gl_SemanticsMakeAvailable) &&
+         !(semantics2 & (gl_SemanticsRelease | gl_SemanticsAcquireRelease)))) {
         error(loc, "gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease",
         error(loc, "gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease",
               fnCandidate.getName().c_str(), "");
               fnCandidate.getName().c_str(), "");
     }
     }
-    if ((semantics & gl_SemanticsMakeVisible) &&
-        !(semantics & (gl_SemanticsAcquire | gl_SemanticsAcquireRelease))) {
+
+    if (((semantics & gl_SemanticsMakeVisible) && !(semantics & (gl_SemanticsAcquire | gl_SemanticsAcquireRelease))) ||
+        ((semantics2 & gl_SemanticsMakeVisible) &&
+         !(semantics2 & (gl_SemanticsAcquire | gl_SemanticsAcquireRelease)))) {
         error(loc, "gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease",
         error(loc, "gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease",
               fnCandidate.getName().c_str(), "");
               fnCandidate.getName().c_str(), "");
     }
     }
-    if ((semantics & gl_SemanticsVolatile) &&
-        (callNode.getOp() == EOpMemoryBarrier || callNode.getOp() == EOpBarrier)) {
-        error(loc, "gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier",
+
+    if ((callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore) &&
+        (semantics & gl_SemanticsAcquire)) {
+        error(loc, "gl_SemanticsAcquire must not be used with (image) atomic store", fnCandidate.getName().c_str(), "");
+    }
+
+    if ((callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad) &&
+        (semantics & gl_SemanticsRelease)) {
+        error(loc, "gl_SemanticsRelease must not be used with (image) atomic load", fnCandidate.getName().c_str(), "");
+    }
+
+    if ((callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore ||
+         callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad) &&
+        (semantics & gl_SemanticsAcquireRelease)) {
+        error(loc, "gl_SemanticsAcquireRelease must not be used with (image) atomic load/store",
               fnCandidate.getName().c_str(), "");
               fnCandidate.getName().c_str(), "");
     }
     }
-    if ((callNode.getOp() == EOpAtomicCompSwap || callNode.getOp() == EOpImageAtomicCompSwap) &&
-        ((semantics ^ semantics2) & gl_SemanticsVolatile)) {
-        error(loc, "semEqual and semUnequal must either both include gl_SemanticsVolatile or neither",
+
+    if (callNode.getOp() == EOpMemoryBarrier &&
+        !(semantics & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease))) {
+        error(loc,
+              "Semantics must include exactly one of gl_SemanticsRelease, gl_SemanticsAcquire, or "
+              "gl_SemanticsAcquireRelease when used with memoryBarrier",
               fnCandidate.getName().c_str(), "");
               fnCandidate.getName().c_str(), "");
     }
     }
+
+    if ((callNode.getOp() == EOpMemoryBarrier || callNode.getOp() == EOpBarrier) &&
+        (semantics & gl_SemanticsVolatile)) {
+        error(loc, "gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier",
+              fnCandidate.getName().c_str(), "");
+    }
+
+    if (callNode.getOp() == EOpAtomicCompSwap || callNode.getOp() == EOpImageAtomicCompSwap) {
+        if (semantics2 & (gl_SemanticsRelease | gl_SemanticsAcquireRelease)) {
+            error(loc, "semUnequal must not be gl_SemanticsRelease or gl_SemanticsAcquireRelease",
+                  fnCandidate.getName().c_str(), "");
+        }
+        if ((semantics2 & gl_SemanticsAcquire) && !(semantics & (gl_SemanticsAcquire | gl_SemanticsAcquireRelease))) {
+            error(loc,
+                  "semUnequal must not be gl_SemanticsAcquire unless semEqual is gl_SemanticsAcquire "
+                  "or gl_SemanticsAcquireRelease",
+                  fnCandidate.getName().c_str(), "");
+        }
+        if ((semantics2 & gl_SemanticsMakeVisible) && !(semantics & gl_SemanticsMakeVisible)) {
+            error(loc,
+                  "semUnequal must not include gl_SemanticsMakeVisible unless semEqual also includes "
+                  "gl_SemanticsMakeVisible",
+                  fnCandidate.getName().c_str(), "");
+        }
+        if (storageClassSemantics2 & ~(storageClassSemantics)) {
+            error(loc, "semStorageUnequal must not include any option that is not present in semStorageEqual",
+                  fnCandidate.getName().c_str(), "");
+        }
+        if ((semantics ^ semantics2) & gl_SemanticsVolatile) {
+            error(loc, "semEqual and semUnequal must either both include gl_SemanticsVolatile or neither",
+                  fnCandidate.getName().c_str(), "");
+        }
+    }
 }
 }
 
 
 //
 //