1spv.atomicAdd.bufferReference.comp 2// Module Version 10000 3// Generated by (magic number): 8000b 4// Id's are bound by 188 5 6 Capability Shader 7 Capability VulkanMemoryModelKHR 8 Capability VulkanMemoryModelDeviceScopeKHR 9 Capability PhysicalStorageBufferAddressesEXT 10 Extension "SPV_KHR_physical_storage_buffer" 11 Extension "SPV_KHR_storage_buffer_storage_class" 12 Extension "SPV_KHR_vulkan_memory_model" 13 1: ExtInstImport "GLSL.std.450" 14 MemoryModel PhysicalStorageBuffer64EXT VulkanKHR 15 EntryPoint GLCompute 4 "main" 37 81 133 16 ExecutionMode 4 LocalSize 1 1 1 17 Source GLSL 450 18 SourceExtension "GL_ARB_gpu_shader_int64" 19 SourceExtension "GL_EXT_buffer_reference" 20 SourceExtension "GL_KHR_memory_scope_semantics" 21 SourceExtension "GL_KHR_shader_subgroup_ballot" 22 SourceExtension "GL_KHR_shader_subgroup_basic" 23 SourceExtension "GL_KHR_shader_subgroup_shuffle" 24 Name 4 "main" 25 Name 8 "pass" 26 Name 10 "skip" 27 Name 13 "sharedSkip" 28 Name 18 "PayloadRef" 29 MemberName 18(PayloadRef) 0 "x" 30 Name 20 "payload" 31 Name 22 "PC" 32 MemberName 22(PC) 0 "payloadref" 33 MemberName 22(PC) 1 "guard" 34 Name 24 "GuardRef" 35 MemberName 24(GuardRef) 0 "x" 36 Name 26 "" 37 Name 34 "globalId" 38 Name 37 "gl_GlobalInvocationID" 39 Name 42 "partnerGlobalId" 40 Name 43 "DIM" 41 Name 44 "NUM_WORKGROUP_EACH_DIM" 42 Name 54 "bufferCoord" 43 Name 66 "partnerBufferCoord" 44 Name 75 "imageCoord" 45 Name 77 "partnerImageCoord" 46 Name 79 "globalId00" 47 Name 81 "gl_WorkGroupID" 48 Name 86 "partnerGlobalId00" 49 Name 95 "bufferCoord00" 50 Name 104 "partnerBufferCoord00" 51 Name 113 "imageCoord00" 52 Name 115 "partnerImageCoord00" 53 Name 133 "gl_LocalInvocationID" 54 Name 163 "r" 55 Name 179 "Fail" 56 MemberName 179(Fail) 0 "x" 57 Name 181 "fail" 58 Decorate 17 ArrayStride 4 59 Decorate 18(PayloadRef) Block 60 MemberDecorate 18(PayloadRef) 0 Offset 0 61 Decorate 20(payload) DecorationAliasedPointerEXT 62 Decorate 22(PC) Block 63 MemberDecorate 22(PC) 0 Offset 0 64 MemberDecorate 22(PC) 1 Offset 8 65 Decorate 23 ArrayStride 4 66 Decorate 24(GuardRef) Block 67 MemberDecorate 24(GuardRef) 0 Offset 0 68 Decorate 37(gl_GlobalInvocationID) BuiltIn GlobalInvocationId 69 Decorate 43(DIM) SpecId 0 70 Decorate 44(NUM_WORKGROUP_EACH_DIM) SpecId 1 71 Decorate 81(gl_WorkGroupID) BuiltIn WorkgroupId 72 Decorate 133(gl_LocalInvocationID) BuiltIn LocalInvocationId 73 Decorate 178 ArrayStride 4 74 Decorate 179(Fail) Block 75 MemberDecorate 179(Fail) 0 Offset 0 76 Decorate 181(fail) Binding 2 77 Decorate 181(fail) DescriptorSet 0 78 Decorate 185 SpecId 0 79 Decorate 186 SpecId 0 80 Decorate 187 BuiltIn WorkgroupSize 81 2: TypeVoid 82 3: TypeFunction 2 83 6: TypeBool 84 7: TypePointer Function 6(bool) 85 9: 6(bool) ConstantTrue 86 11: 6(bool) ConstantFalse 87 12: TypePointer Workgroup 6(bool) 88 13(sharedSkip): 12(ptr) Variable Workgroup 89 14: TypeInt 32 0 90 15: 14(int) Constant 2 91 TypeForwardPointer 16 PhysicalStorageBufferEXT 92 17: TypeRuntimeArray 14(int) 93 18(PayloadRef): TypeStruct 17 94 16: TypePointer PhysicalStorageBufferEXT 18(PayloadRef) 95 19: TypePointer Function 16(ptr) 96 TypeForwardPointer 21 PhysicalStorageBufferEXT 97 22(PC): TypeStruct 16(ptr) 21 98 23: TypeRuntimeArray 14(int) 99 24(GuardRef): TypeStruct 23 100 21: TypePointer PhysicalStorageBufferEXT 24(GuardRef) 101 25: TypePointer PushConstant 22(PC) 102 26: 25(ptr) Variable PushConstant 103 27: TypeInt 32 1 104 28: 27(int) Constant 0 105 29: TypePointer PushConstant 16(ptr) 106 32: TypeVector 27(int) 2 107 33: TypePointer Function 32(ivec2) 108 35: TypeVector 14(int) 3 109 36: TypePointer Input 35(ivec3) 11037(gl_GlobalInvocationID): 36(ptr) Variable Input 111 38: TypeVector 14(int) 2 112 43(DIM): 27(int) SpecConstant 1 11344(NUM_WORKGROUP_EACH_DIM): 27(int) SpecConstant 1 114 45: 27(int) SpecConstantOp 132 43(DIM) 44(NUM_WORKGROUP_EACH_DIM) 115 46: 27(int) Constant 1 116 47: 27(int) SpecConstantOp 130 45 46 117 48: 32(ivec2) SpecConstantComposite 47 47 118 53: TypePointer Function 14(int) 119 55: 14(int) Constant 1 120 56: TypePointer Function 27(int) 121 61: 14(int) Constant 0 122 80: 32(ivec2) SpecConstantComposite 43(DIM) 43(DIM) 12381(gl_WorkGroupID): 36(ptr) Variable Input 124 87: 32(ivec2) SpecConstantComposite 43(DIM) 43(DIM) 125 88: 27(int) SpecConstantOp 130 44(NUM_WORKGROUP_EACH_DIM) 46 126 89: 32(ivec2) SpecConstantComposite 88 88 127 122: TypePointer PhysicalStorageBufferEXT 14(int) 128 125: 27(int) Constant 31 129 129: 27(int) Constant 2 130 130: 27(int) Constant 320 131 131: 27(int) Constant 8200 132 132: 14(int) Constant 8520 133133(gl_LocalInvocationID): 36(ptr) Variable Input 134 136: 38(ivec2) ConstantComposite 61 61 135 137: TypeVector 6(bool) 2 136 142: TypePointer PushConstant 21(ptr) 137 147: 27(int) Constant 64 138 148: 27(int) Constant 8196 139 149: 14(int) Constant 5 140 150: 14(int) Constant 8260 141 155: 27(int) Constant 16386 142 156: 14(int) Constant 16450 143 160: 27(int) Constant 16392 144 161: 14(int) Constant 16712 145 178: TypeRuntimeArray 14(int) 146 179(Fail): TypeStruct 178 147 180: TypePointer StorageBuffer 179(Fail) 148 181(fail): 180(ptr) Variable StorageBuffer 149 183: TypePointer StorageBuffer 14(int) 150 185: 14(int) SpecConstant 1 151 186: 14(int) SpecConstant 1 152 187: 35(ivec3) SpecConstantComposite 185 186 55 153 4(main): 2 Function None 3 154 5: Label 155 8(pass): 7(ptr) Variable Function 156 10(skip): 7(ptr) Variable Function 157 20(payload): 19(ptr) Variable Function 158 34(globalId): 33(ptr) Variable Function 15942(partnerGlobalId): 33(ptr) Variable Function 160 54(bufferCoord): 53(ptr) Variable Function 16166(partnerBufferCoord): 53(ptr) Variable Function 162 75(imageCoord): 33(ptr) Variable Function 16377(partnerImageCoord): 33(ptr) Variable Function 164 79(globalId00): 33(ptr) Variable Function 16586(partnerGlobalId00): 33(ptr) Variable Function 16695(bufferCoord00): 53(ptr) Variable Function 167104(partnerBufferCoord00): 53(ptr) Variable Function 168113(imageCoord00): 33(ptr) Variable Function 169115(partnerImageCoord00): 33(ptr) Variable Function 170 163(r): 53(ptr) Variable Function 171 Store 8(pass) 9 172 Store 10(skip) 11 173 Store 13(sharedSkip) 11 MakePointerAvailableKHR NonPrivatePointerKHR 15 174 30: 29(ptr) AccessChain 26 28 175 31: 16(ptr) Load 30 176 Store 20(payload) 31 177 39: 35(ivec3) Load 37(gl_GlobalInvocationID) 178 40: 38(ivec2) VectorShuffle 39 39 0 1 179 41: 32(ivec2) Bitcast 40 180 Store 34(globalId) 41 181 49: 35(ivec3) Load 37(gl_GlobalInvocationID) 182 50: 38(ivec2) VectorShuffle 49 49 0 1 183 51: 32(ivec2) Bitcast 50 184 52: 32(ivec2) ISub 48 51 185 Store 42(partnerGlobalId) 52 186 57: 56(ptr) AccessChain 34(globalId) 55 187 58: 27(int) Load 57 188 59: 27(int) IMul 58 43(DIM) 189 60: 27(int) IMul 59 44(NUM_WORKGROUP_EACH_DIM) 190 62: 56(ptr) AccessChain 34(globalId) 61 191 63: 27(int) Load 62 192 64: 27(int) IAdd 60 63 193 65: 14(int) Bitcast 64 194 Store 54(bufferCoord) 65 195 67: 56(ptr) AccessChain 42(partnerGlobalId) 55 196 68: 27(int) Load 67 197 69: 27(int) IMul 68 43(DIM) 198 70: 27(int) IMul 69 44(NUM_WORKGROUP_EACH_DIM) 199 71: 56(ptr) AccessChain 42(partnerGlobalId) 61 200 72: 27(int) Load 71 201 73: 27(int) IAdd 70 72 202 74: 14(int) Bitcast 73 203 Store 66(partnerBufferCoord) 74 204 76: 32(ivec2) Load 34(globalId) 205 Store 75(imageCoord) 76 206 78: 32(ivec2) Load 42(partnerGlobalId) 207 Store 77(partnerImageCoord) 78 208 82: 35(ivec3) Load 81(gl_WorkGroupID) 209 83: 38(ivec2) VectorShuffle 82 82 0 1 210 84: 32(ivec2) Bitcast 83 211 85: 32(ivec2) IMul 80 84 212 Store 79(globalId00) 85 213 90: 35(ivec3) Load 81(gl_WorkGroupID) 214 91: 38(ivec2) VectorShuffle 90 90 0 1 215 92: 32(ivec2) Bitcast 91 216 93: 32(ivec2) ISub 89 92 217 94: 32(ivec2) IMul 87 93 218 Store 86(partnerGlobalId00) 94 219 96: 56(ptr) AccessChain 79(globalId00) 55 220 97: 27(int) Load 96 221 98: 27(int) IMul 97 43(DIM) 222 99: 27(int) IMul 98 44(NUM_WORKGROUP_EACH_DIM) 223 100: 56(ptr) AccessChain 79(globalId00) 61 224 101: 27(int) Load 100 225 102: 27(int) IAdd 99 101 226 103: 14(int) Bitcast 102 227 Store 95(bufferCoord00) 103 228 105: 56(ptr) AccessChain 86(partnerGlobalId00) 55 229 106: 27(int) Load 105 230 107: 27(int) IMul 106 43(DIM) 231 108: 27(int) IMul 107 44(NUM_WORKGROUP_EACH_DIM) 232 109: 56(ptr) AccessChain 86(partnerGlobalId00) 61 233 110: 27(int) Load 109 234 111: 27(int) IAdd 108 110 235 112: 14(int) Bitcast 111 236 Store 104(partnerBufferCoord00) 112 237 114: 32(ivec2) Load 79(globalId00) 238 Store 113(imageCoord00) 114 239 116: 32(ivec2) Load 86(partnerGlobalId00) 240 Store 115(partnerImageCoord00) 116 241 117: 16(ptr) Load 20(payload) 242 118: 14(int) Load 54(bufferCoord) 243 119: 14(int) Load 54(bufferCoord) 244 120: 16(ptr) Load 20(payload) 245 121: 14(int) Load 66(partnerBufferCoord) 246 123: 122(ptr) AccessChain 120 28 121 247 124: 14(int) Load 123 Aligned NonPrivatePointerKHR 4 248 126: 14(int) ShiftRightLogical 124 125 249 127: 14(int) IAdd 119 126 250 128: 122(ptr) AccessChain 117 28 118 251 Store 128 127 Aligned NonPrivatePointerKHR 4 252 ControlBarrier 15 15 132 253 134: 35(ivec3) Load 133(gl_LocalInvocationID) 254 135: 38(ivec2) VectorShuffle 134 134 0 1 255 138: 137(bvec2) IEqual 135 136 256 139: 6(bool) All 138 257 SelectionMerge 141 None 258 BranchConditional 139 140 141 259 140: Label 260 143: 142(ptr) AccessChain 26 46 261 144: 21(ptr) Load 143 262 145: 14(int) Load 54(bufferCoord) 263 146: 122(ptr) AccessChain 144 28 145 264 AtomicStore 146 46 150 55 265 151: 142(ptr) AccessChain 26 46 266 152: 21(ptr) Load 151 267 153: 14(int) Load 104(partnerBufferCoord00) 268 154: 122(ptr) AccessChain 152 28 153 269 157: 14(int) AtomicLoad 154 46 156 270 158: 6(bool) IEqual 157 61 271 Store 10(skip) 158 272 159: 6(bool) Load 10(skip) 273 Store 13(sharedSkip) 159 MakePointerAvailableKHR NonPrivatePointerKHR 15 274 Branch 141 275 141: Label 276 ControlBarrier 15 15 161 277 162: 6(bool) Load 13(sharedSkip) MakePointerVisibleKHR NonPrivatePointerKHR 15 278 Store 10(skip) 162 279 164: 16(ptr) Load 20(payload) 280 165: 14(int) Load 66(partnerBufferCoord) 281 166: 122(ptr) AccessChain 164 28 165 282 167: 14(int) Load 166 Aligned NonPrivatePointerKHR 4 283 Store 163(r) 167 284 168: 6(bool) Load 10(skip) 285 169: 6(bool) LogicalNot 168 286 SelectionMerge 171 None 287 BranchConditional 169 170 171 288 170: Label 289 172: 14(int) Load 163(r) 290 173: 14(int) Load 66(partnerBufferCoord) 291 174: 6(bool) INotEqual 172 173 292 Branch 171 293 171: Label 294 175: 6(bool) Phi 169 141 174 170 295 SelectionMerge 177 None 296 BranchConditional 175 176 177 297 176: Label 298 182: 14(int) Load 54(bufferCoord) 299 184: 183(ptr) AccessChain 181(fail) 28 182 300 Store 184 55 301 Branch 177 302 177: Label 303 Return 304 FunctionEnd 305