| 1 |
; SPIR-V |
| 2 |
; Version: 1.3 |
| 3 |
; Generator: Unknown(30017); 21022 |
| 4 |
; Bound: 233 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpCapability SampledBuffer |
| 8 |
OpCapability ImageBuffer |
| 9 |
OpCapability ImageQuery |
| 10 |
OpCapability StorageImageWriteWithoutFormat |
| 11 |
OpCapability GroupNonUniformBallot |
| 12 |
OpCapability RuntimeDescriptorArray |
| 13 |
OpCapability UniformTexelBufferArrayDynamicIndexing |
| 14 |
OpCapability StorageTexelBufferArrayDynamicIndexing |
| 15 |
OpCapability UniformTexelBufferArrayNonUniformIndexing |
| 16 |
OpCapability StorageTexelBufferArrayNonUniformIndexing |
| 17 |
OpCapability PhysicalStorageBufferAddresses |
| 18 |
OpExtension "SPV_EXT_descriptor_indexing" |
| 19 |
OpExtension "SPV_KHR_physical_storage_buffer" |
| 20 |
OpMemoryModel PhysicalStorageBuffer64 GLSL450 |
| 21 |
OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID |
| 22 |
OpExecutionMode %main LocalSize 1 1 1 |
| 23 |
OpName %main "main" |
| 24 |
OpName %RootConstants "RootConstants" |
| 25 |
OpName %registers "registers" |
| 26 |
OpName %SSBO_Offsets "SSBO_Offsets" |
| 27 |
OpDecorate %RootConstants Block |
| 28 |
OpMemberDecorate %RootConstants 0 Offset 0 |
| 29 |
OpMemberDecorate %RootConstants 1 Offset 4 |
| 30 |
OpMemberDecorate %RootConstants 2 Offset 8 |
| 31 |
OpMemberDecorate %RootConstants 3 Offset 12 |
| 32 |
OpMemberDecorate %RootConstants 4 Offset 16 |
| 33 |
OpMemberDecorate %RootConstants 5 Offset 20 |
| 34 |
OpMemberDecorate %RootConstants 6 Offset 24 |
| 35 |
OpMemberDecorate %RootConstants 7 Offset 28 |
| 36 |
OpDecorate %_runtimearr_v2uint ArrayStride 8 |
| 37 |
OpMemberDecorate %SSBO_Offsets 0 Offset 0 |
| 38 |
OpDecorate %SSBO_Offsets Block |
| 39 |
OpDecorate %13 DescriptorSet 0 |
| 40 |
OpDecorate %13 Binding 0 |
| 41 |
OpDecorate %13 NonWritable |
| 42 |
OpDecorate %13 Restrict |
| 43 |
OpDecorate %18 DescriptorSet 1 |
| 44 |
OpDecorate %18 Binding 0 |
| 45 |
OpDecorate %22 DescriptorSet 4 |
| 46 |
OpDecorate %22 Binding 0 |
| 47 |
OpDecorate %26 DescriptorSet 4 |
| 48 |
OpDecorate %26 Binding 0 |
| 49 |
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId |
| 50 |
OpDecorate %148 NonUniform |
| 51 |
OpDecorate %149 NonUniform |
| 52 |
OpDecorate %172 NonUniform |
| 53 |
OpDecorate %173 NonUniform |
| 54 |
OpDecorate %196 NonUniform |
| 55 |
OpDecorate %197 NonUniform |
| 56 |
OpDecorate %205 NonUniform |
| 57 |
%void = OpTypeVoid |
| 58 |
%2 = OpTypeFunction %void |
| 59 |
%uint = OpTypeInt 32 0 |
| 60 |
%RootConstants = OpTypeStruct %uint %uint %uint %uint %uint %uint %uint %uint |
| 61 |
%_ptr_PushConstant_RootConstants = OpTypePointer PushConstant %RootConstants |
| 62 |
%registers = OpVariable %_ptr_PushConstant_RootConstants PushConstant |
| 63 |
%v2uint = OpTypeVector %uint 2 |
| 64 |
%_runtimearr_v2uint = OpTypeRuntimeArray %v2uint |
| 65 |
%SSBO_Offsets = OpTypeStruct %_runtimearr_v2uint |
| 66 |
%_ptr_StorageBuffer_SSBO_Offsets = OpTypePointer StorageBuffer %SSBO_Offsets |
| 67 |
%13 = OpVariable %_ptr_StorageBuffer_SSBO_Offsets StorageBuffer |
| 68 |
%float = OpTypeFloat 32 |
| 69 |
%15 = OpTypeImage %float Buffer 0 0 0 1 Unknown |
| 70 |
%_runtimearr_15 = OpTypeRuntimeArray %15 |
| 71 |
%_ptr_UniformConstant__runtimearr_15 = OpTypePointer UniformConstant %_runtimearr_15 |
| 72 |
%18 = OpVariable %_ptr_UniformConstant__runtimearr_15 UniformConstant |
| 73 |
%19 = OpTypeImage %float Buffer 0 0 0 2 R32f |
| 74 |
%_runtimearr_19 = OpTypeRuntimeArray %19 |
| 75 |
%_ptr_UniformConstant__runtimearr_19 = OpTypePointer UniformConstant %_runtimearr_19 |
| 76 |
%22 = OpVariable %_ptr_UniformConstant__runtimearr_19 UniformConstant |
| 77 |
%23 = OpTypeImage %uint Buffer 0 0 0 2 R32ui |
| 78 |
%_runtimearr_23 = OpTypeRuntimeArray %23 |
| 79 |
%_ptr_UniformConstant__runtimearr_23 = OpTypePointer UniformConstant %_runtimearr_23 |
| 80 |
%26 = OpVariable %_ptr_UniformConstant__runtimearr_23 UniformConstant |
| 81 |
%_ptr_UniformConstant_23 = OpTypePointer UniformConstant %23 |
| 82 |
%_ptr_PushConstant_uint = OpTypePointer PushConstant %uint |
| 83 |
%uint_4 = OpConstant %uint 4 |
| 84 |
%uint_2 = OpConstant %uint 2 |
| 85 |
%uint_3 = OpConstant %uint 3 |
| 86 |
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint |
| 87 |
%uint_0 = OpConstant %uint 0 |
| 88 |
%_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19 |
| 89 |
%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15 |
| 90 |
%uint_1 = OpConstant %uint 1 |
| 91 |
%v3uint = OpTypeVector %uint 3 |
| 92 |
%_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| 93 |
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input |
| 94 |
%_ptr_Input_uint = OpTypePointer Input %uint |
| 95 |
%bool = OpTypeBool |
| 96 |
%uint_4294967295 = OpConstant %uint 4294967295 |
| 97 |
%v4float = OpTypeVector %float 4 |
| 98 |
%uint_1024 = OpConstant %uint 1024 |
| 99 |
%uint_2048 = OpConstant %uint 2048 |
| 100 |
%_ptr_Image_uint = OpTypePointer Image %uint |
| 101 |
%uint_40 = OpConstant %uint 40 |
| 102 |
%uint_50 = OpConstant %uint 50 |
| 103 |
%uint_70 = OpConstant %uint 70 |
| 104 |
%main = OpFunction %void None %2 |
| 105 |
%4 = OpLabel |
| 106 |
OpBranch %231 |
| 107 |
%231 = OpLabel |
| 108 |
%30 = OpAccessChain %_ptr_PushConstant_uint %registers %uint_4 |
| 109 |
%32 = OpLoad %uint %30 |
| 110 |
%33 = OpIAdd %uint %32 %uint_2 |
| 111 |
%28 = OpAccessChain %_ptr_UniformConstant_23 %26 %33 |
| 112 |
%35 = OpLoad %23 %28 |
| 113 |
%36 = OpGroupNonUniformBroadcastFirst %uint %uint_3 %33 |
| 114 |
%39 = OpAccessChain %_ptr_StorageBuffer_v2uint %13 %uint_0 %36 |
| 115 |
%41 = OpLoad %v2uint %39 |
| 116 |
%44 = OpAccessChain %_ptr_PushConstant_uint %registers %uint_4 |
| 117 |
%45 = OpLoad %uint %44 |
| 118 |
%43 = OpAccessChain %_ptr_UniformConstant_19 %22 %45 |
| 119 |
%46 = OpLoad %19 %43 |
| 120 |
%47 = OpGroupNonUniformBroadcastFirst %uint %uint_3 %45 |
| 121 |
%48 = OpAccessChain %_ptr_StorageBuffer_v2uint %13 %uint_0 %47 |
| 122 |
%49 = OpLoad %v2uint %48 |
| 123 |
%52 = OpAccessChain %_ptr_PushConstant_uint %registers %uint_1 |
| 124 |
%54 = OpLoad %uint %52 |
| 125 |
%55 = OpIAdd %uint %54 %uint_1 |
| 126 |
%51 = OpAccessChain %_ptr_UniformConstant_15 %18 %55 |
| 127 |
%56 = OpLoad %15 %51 |
| 128 |
%57 = OpGroupNonUniformBroadcastFirst %uint %uint_3 %55 |
| 129 |
%58 = OpAccessChain %_ptr_StorageBuffer_v2uint %13 %uint_0 %57 |
| 130 |
%59 = OpLoad %v2uint %58 |
| 131 |
%64 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_0 |
| 132 |
%65 = OpLoad %uint %64 |
| 133 |
%66 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_1 |
| 134 |
%67 = OpLoad %uint %66 |
| 135 |
%68 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_2 |
| 136 |
%69 = OpLoad %uint %68 |
| 137 |
%70 = OpIAdd %uint %65 %uint_4 |
| 138 |
%71 = OpCompositeExtract %uint %49 0 |
| 139 |
%72 = OpCompositeExtract %uint %49 1 |
| 140 |
%73 = OpIAdd %uint %70 %71 |
| 141 |
%75 = OpULessThan %bool %70 %72 |
| 142 |
%76 = OpSelect %uint %75 %73 %uint_4294967295 |
| 143 |
%79 = OpImageRead %v4float %46 %76 |
| 144 |
%80 = OpCompositeExtract %float %79 0 |
| 145 |
%81 = OpCompositeExtract %float %79 1 |
| 146 |
%82 = OpCompositeExtract %float %79 2 |
| 147 |
%83 = OpCompositeExtract %float %79 3 |
| 148 |
%84 = OpIAdd %uint %65 %uint_1024 |
| 149 |
%86 = OpCompositeExtract %uint %49 0 |
| 150 |
%87 = OpCompositeExtract %uint %49 1 |
| 151 |
%88 = OpIAdd %uint %84 %86 |
| 152 |
%89 = OpULessThan %bool %84 %87 |
| 153 |
%90 = OpSelect %uint %89 %88 %uint_4294967295 |
| 154 |
%91 = OpCompositeConstruct %v4float %80 %81 %82 %83 |
| 155 |
OpImageWrite %46 %90 %91 |
| 156 |
%92 = OpIAdd %uint %65 %uint_2 |
| 157 |
%93 = OpCompositeExtract %uint %59 0 |
| 158 |
%94 = OpCompositeExtract %uint %59 1 |
| 159 |
%95 = OpIAdd %uint %92 %93 |
| 160 |
%96 = OpULessThan %bool %92 %94 |
| 161 |
%97 = OpSelect %uint %96 %95 %uint_4294967295 |
| 162 |
%98 = OpImageFetch %v4float %56 %97 |
| 163 |
%99 = OpCompositeExtract %float %98 0 |
| 164 |
%100 = OpCompositeExtract %float %98 1 |
| 165 |
%101 = OpCompositeExtract %float %98 2 |
| 166 |
%102 = OpCompositeExtract %float %98 3 |
| 167 |
%103 = OpIAdd %uint %65 %uint_2048 |
| 168 |
%105 = OpCompositeExtract %uint %49 0 |
| 169 |
%106 = OpCompositeExtract %uint %49 1 |
| 170 |
%107 = OpIAdd %uint %103 %105 |
| 171 |
%108 = OpULessThan %bool %103 %106 |
| 172 |
%109 = OpSelect %uint %108 %107 %uint_4294967295 |
| 173 |
%110 = OpCompositeConstruct %v4float %99 %100 %101 %102 |
| 174 |
OpImageWrite %46 %109 %110 |
| 175 |
%111 = OpCompositeExtract %uint %41 0 |
| 176 |
%112 = OpCompositeExtract %uint %41 1 |
| 177 |
%113 = OpIAdd %uint %65 %111 |
| 178 |
%114 = OpULessThan %bool %65 %112 |
| 179 |
%115 = OpSelect %uint %114 %113 %uint_4294967295 |
| 180 |
%117 = OpImageTexelPointer %_ptr_Image_uint %28 %115 %uint_0 |
| 181 |
%118 = OpAtomicIAdd %uint %117 %uint_1 %uint_0 %uint_40 |
| 182 |
%120 = OpCompositeExtract %uint %41 0 |
| 183 |
%121 = OpCompositeExtract %uint %41 1 |
| 184 |
%122 = OpIAdd %uint %67 %120 |
| 185 |
%123 = OpULessThan %bool %67 %121 |
| 186 |
%124 = OpSelect %uint %123 %122 %uint_4294967295 |
| 187 |
%125 = OpImageTexelPointer %_ptr_Image_uint %28 %124 %uint_0 |
| 188 |
%126 = OpAtomicCompareExchange %uint %125 %uint_1 %uint_0 %uint_0 %uint_50 %uint_40 |
| 189 |
%128 = OpCompositeExtract %uint %49 1 |
| 190 |
%129 = OpConvertUToF %float %128 |
| 191 |
%130 = OpCompositeExtract %uint %49 0 |
| 192 |
%131 = OpCompositeExtract %uint %49 1 |
| 193 |
%132 = OpIAdd %uint %uint_0 %130 |
| 194 |
%133 = OpULessThan %bool %uint_0 %131 |
| 195 |
%134 = OpSelect %uint %133 %132 %uint_4294967295 |
| 196 |
%135 = OpCompositeConstruct %v4float %129 %129 %129 %129 |
| 197 |
OpImageWrite %46 %134 %135 |
| 198 |
%136 = OpCompositeExtract %uint %59 1 |
| 199 |
%137 = OpConvertUToF %float %136 |
| 200 |
%138 = OpCompositeExtract %uint %49 0 |
| 201 |
%139 = OpCompositeExtract %uint %49 1 |
| 202 |
%140 = OpIAdd %uint %uint_1 %138 |
| 203 |
%141 = OpULessThan %bool %uint_1 %139 |
| 204 |
%142 = OpSelect %uint %141 %140 %uint_4294967295 |
| 205 |
%143 = OpCompositeConstruct %v4float %137 %137 %137 %137 |
| 206 |
OpImageWrite %46 %142 %143 |
| 207 |
%144 = OpIAdd %uint %69 %uint_0 |
| 208 |
%146 = OpAccessChain %_ptr_PushConstant_uint %registers %uint_4 |
| 209 |
%147 = OpLoad %uint %146 |
| 210 |
%148 = OpIAdd %uint %147 %144 |
| 211 |
%145 = OpAccessChain %_ptr_UniformConstant_19 %22 %148 |
| 212 |
%149 = OpLoad %19 %145 |
| 213 |
%150 = OpAccessChain %_ptr_StorageBuffer_v2uint %13 %uint_0 %148 |
| 214 |
%151 = OpLoad %v2uint %150 |
| 215 |
%152 = OpCompositeExtract %uint %151 0 |
| 216 |
%153 = OpCompositeExtract %uint %151 1 |
| 217 |
%154 = OpIAdd %uint %70 %152 |
| 218 |
%155 = OpULessThan %bool %70 %153 |
| 219 |
%156 = OpSelect %uint %155 %154 %uint_4294967295 |
| 220 |
%157 = OpImageRead %v4float %149 %156 |
| 221 |
%158 = OpCompositeExtract %float %157 0 |
| 222 |
%159 = OpCompositeExtract %float %157 1 |
| 223 |
%160 = OpCompositeExtract %float %157 2 |
| 224 |
%161 = OpCompositeExtract %float %157 3 |
| 225 |
%162 = OpCompositeExtract %uint %151 0 |
| 226 |
%163 = OpCompositeExtract %uint %151 1 |
| 227 |
%164 = OpIAdd %uint %84 %162 |
| 228 |
%165 = OpULessThan %bool %84 %163 |
| 229 |
%166 = OpSelect %uint %165 %164 %uint_4294967295 |
| 230 |
%167 = OpCompositeConstruct %v4float %158 %159 %160 %161 |
| 231 |
OpImageWrite %149 %166 %167 |
| 232 |
%168 = OpIAdd %uint %69 %uint_0 |
| 233 |
%170 = OpAccessChain %_ptr_PushConstant_uint %registers %uint_1 |
| 234 |
%171 = OpLoad %uint %170 |
| 235 |
%172 = OpIAdd %uint %171 %168 |
| 236 |
%169 = OpAccessChain %_ptr_UniformConstant_15 %18 %172 |
| 237 |
%173 = OpLoad %15 %169 |
| 238 |
%174 = OpAccessChain %_ptr_StorageBuffer_v2uint %13 %uint_0 %172 |
| 239 |
%175 = OpLoad %v2uint %174 |
| 240 |
%176 = OpCompositeExtract %uint %175 0 |
| 241 |
%177 = OpCompositeExtract %uint %175 1 |
| 242 |
%178 = OpIAdd %uint %70 %176 |
| 243 |
%179 = OpULessThan %bool %70 %177 |
| 244 |
%180 = OpSelect %uint %179 %178 %uint_4294967295 |
| 245 |
%181 = OpImageFetch %v4float %173 %180 |
| 246 |
%182 = OpCompositeExtract %float %181 0 |
| 247 |
%183 = OpCompositeExtract %float %181 1 |
| 248 |
%184 = OpCompositeExtract %float %181 2 |
| 249 |
%185 = OpCompositeExtract %float %181 3 |
| 250 |
%186 = OpCompositeExtract %uint %151 0 |
| 251 |
%187 = OpCompositeExtract %uint %151 1 |
| 252 |
%188 = OpIAdd %uint %103 %186 |
| 253 |
%189 = OpULessThan %bool %103 %187 |
| 254 |
%190 = OpSelect %uint %189 %188 %uint_4294967295 |
| 255 |
%191 = OpCompositeConstruct %v4float %182 %183 %184 %185 |
| 256 |
OpImageWrite %149 %190 %191 |
| 257 |
%192 = OpIAdd %uint %69 %uint_0 |
| 258 |
%194 = OpAccessChain %_ptr_PushConstant_uint %registers %uint_4 |
| 259 |
%195 = OpLoad %uint %194 |
| 260 |
%196 = OpIAdd %uint %195 %192 |
| 261 |
%193 = OpAccessChain %_ptr_UniformConstant_23 %26 %196 |
| 262 |
%197 = OpLoad %23 %193 |
| 263 |
%198 = OpAccessChain %_ptr_StorageBuffer_v2uint %13 %uint_0 %196 |
| 264 |
%199 = OpLoad %v2uint %198 |
| 265 |
%200 = OpCompositeExtract %uint %199 0 |
| 266 |
%201 = OpCompositeExtract %uint %199 1 |
| 267 |
%202 = OpIAdd %uint %67 %200 |
| 268 |
%203 = OpULessThan %bool %67 %201 |
| 269 |
%204 = OpSelect %uint %203 %202 %uint_4294967295 |
| 270 |
%205 = OpImageTexelPointer %_ptr_Image_uint %193 %204 %uint_0 |
| 271 |
%206 = OpAtomicIAdd %uint %205 %uint_1 %uint_0 %uint_40 |
| 272 |
%207 = OpCompositeExtract %uint %199 0 |
| 273 |
%208 = OpCompositeExtract %uint %199 1 |
| 274 |
%209 = OpIAdd %uint %67 %207 |
| 275 |
%210 = OpULessThan %bool %67 %208 |
| 276 |
%211 = OpSelect %uint %210 %209 %uint_4294967295 |
| 277 |
%212 = OpImageTexelPointer %_ptr_Image_uint %193 %211 %uint_0 |
| 278 |
%213 = OpAtomicCompareExchange %uint %212 %uint_1 %uint_0 %uint_0 %uint_70 %uint_40 |
| 279 |
%215 = OpCompositeExtract %uint %151 1 |
| 280 |
%216 = OpConvertUToF %float %215 |
| 281 |
%217 = OpCompositeExtract %uint %49 0 |
| 282 |
%218 = OpCompositeExtract %uint %49 1 |
| 283 |
%219 = OpIAdd %uint %uint_2 %217 |
| 284 |
%220 = OpULessThan %bool %uint_2 %218 |
| 285 |
%221 = OpSelect %uint %220 %219 %uint_4294967295 |
| 286 |
%222 = OpCompositeConstruct %v4float %216 %216 %216 %216 |
| 287 |
OpImageWrite %46 %221 %222 |
| 288 |
%223 = OpCompositeExtract %uint %175 1 |
| 289 |
%224 = OpConvertUToF %float %223 |
| 290 |
%225 = OpCompositeExtract %uint %49 0 |
| 291 |
%226 = OpCompositeExtract %uint %49 1 |
| 292 |
%227 = OpIAdd %uint %uint_3 %225 |
| 293 |
%228 = OpULessThan %bool %uint_3 %226 |
| 294 |
%229 = OpSelect %uint %228 %227 %uint_4294967295 |
| 295 |
%230 = OpCompositeConstruct %v4float %224 %224 %224 %224 |
| 296 |
OpImageWrite %46 %229 %230 |
| 297 |
OpReturn |
| 298 |
OpFunctionEnd |