| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 71 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability VulkanMemoryModel |
| OpCapability VulkanMemoryModelDeviceScope |
| OpCapability CooperativeMatrixKHR |
| OpExtension "SPV_KHR_vulkan_memory_model" |
| OpExtension "SPV_KHR_cooperative_matrix" |
| OpMemoryModel Logical Vulkan |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input |
| OpExecutionMode %main LocalSize 32 1 1 |
| OpMemberName %s_var_block_tint_explicit_layout 0 "inner" |
| OpName %s_var_block_tint_explicit_layout "s_var_block_tint_explicit_layout" |
| OpName %wg_var "wg_var" |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" |
| OpName %main_inner "main_inner" |
| OpName %tint_local_index "tint_local_index" |
| OpName %m "m" |
| OpName %m2 "m2" |
| OpName %main "main" |
| OpDecorate %_runtimearr_float ArrayStride 4 |
| OpMemberDecorate %s_var_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %s_var_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %float = OpTypeFloat 32 |
| %_runtimearr_float = OpTypeRuntimeArray %float |
| %s_var_block_tint_explicit_layout = OpTypeStruct %_runtimearr_float |
| %_ptr_StorageBuffer_s_var_block_tint_explicit_layout = OpTypePointer StorageBuffer %s_var_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_StorageBuffer_s_var_block_tint_explicit_layout StorageBuffer |
| %uint = OpTypeInt 32 0 |
| %uint_1024 = OpConstant %uint 1024 |
| %_arr_float_uint_1024 = OpTypeArray %float %uint_1024 |
| %_ptr_Workgroup__arr_float_uint_1024 = OpTypePointer Workgroup %_arr_float_uint_1024 |
| %wg_var = OpVariable %_ptr_Workgroup__arr_float_uint_1024 Workgroup |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %void = OpTypeVoid |
| %16 = OpTypeFunction %void %uint |
| %uint_2 = OpConstant %uint 2 |
| %uint_24840 = OpConstant %uint 24840 |
| %_ptr_StorageBuffer__runtimearr_float = OpTypePointer StorageBuffer %_runtimearr_float |
| %uint_0 = OpConstant %uint 0 |
| %uint_64 = OpConstant %uint 64 |
| %bool = OpTypeBool |
| %uint_8 = OpConstant %uint 8 |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %uint_3 = OpConstant %uint 3 |
| %42 = OpTypeCooperativeMatrixKHR %float %uint_3 %uint_8 %uint_8 %uint_0 |
| %_ptr_Workgroup_float = OpTypePointer Workgroup %float |
| %uint_1 = OpConstant %uint 1 |
| %50 = OpTypeCooperativeMatrixKHR %float %uint_3 %uint_8 %uint_8 %uint_1 |
| %float_0 = OpConstant %float 0 |
| %uint_32 = OpConstant %uint 32 |
| %67 = OpTypeFunction %void |
| %main_inner = OpFunction %void None %16 |
| %tint_local_index = OpFunctionParameter %uint |
| %17 = OpLabel |
| OpBranch %18 |
| %18 = OpLabel |
| OpBranch %21 |
| %21 = OpLabel |
| %23 = OpPhi %uint %tint_local_index %18 %24 %20 |
| OpLoopMerge %22 %20 None |
| OpBranch %19 |
| %19 = OpLabel |
| %60 = OpUGreaterThanEqual %bool %23 %uint_1024 |
| OpSelectionMerge %61 None |
| OpBranchConditional %60 %62 %61 |
| %62 = OpLabel |
| OpBranch %22 |
| %61 = OpLabel |
| %63 = OpAccessChain %_ptr_Workgroup_float %wg_var %23 |
| OpStore %63 %float_0 NonPrivatePointer |
| OpBranch %20 |
| %20 = OpLabel |
| %24 = OpIAdd %uint %23 %uint_32 |
| OpBranch %21 |
| %22 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_24840 |
| %28 = OpAccessChain %_ptr_StorageBuffer__runtimearr_float %1 %uint_0 |
| %31 = OpArrayLength %uint %1 0 |
| %32 = OpULessThanEqual %bool %uint_64 %31 |
| %35 = OpSelect %uint %32 %uint_0 %uint_0 |
| %36 = OpSelect %uint %32 %uint_8 %uint_8 |
| %38 = OpAccessChain %_ptr_StorageBuffer__runtimearr_float %1 %uint_0 |
| %39 = OpAccessChain %_ptr_StorageBuffer_float %38 %35 |
| %m = OpCooperativeMatrixLoadKHR %42 %39 %uint_0 %36 NonPrivatePointer |
| %44 = OpAccessChain %_ptr_Workgroup_float %wg_var %uint_0 |
| OpCooperativeMatrixStoreKHR %44 %m %uint_0 %uint_8 NonPrivatePointer |
| OpControlBarrier %uint_2 %uint_2 %uint_24840 |
| %48 = OpAccessChain %_ptr_Workgroup_float %wg_var %uint_0 |
| %m2 = OpCooperativeMatrixLoadKHR %50 %48 %uint_1 %uint_8 NonPrivatePointer |
| %52 = OpAccessChain %_ptr_StorageBuffer__runtimearr_float %1 %uint_0 |
| %53 = OpArrayLength %uint %1 0 |
| %54 = OpULessThanEqual %bool %uint_64 %53 |
| %55 = OpSelect %uint %54 %uint_0 %uint_0 |
| %56 = OpSelect %uint %54 %uint_8 %uint_8 |
| %57 = OpAccessChain %_ptr_StorageBuffer__runtimearr_float %1 %uint_0 |
| %58 = OpAccessChain %_ptr_StorageBuffer_float %57 %55 |
| OpCooperativeMatrixStoreKHR %58 %m2 %uint_1 %56 NonPrivatePointer |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %67 |
| %68 = OpLabel |
| %69 = OpLoad %uint %main_local_invocation_index_Input None |
| %70 = OpFunctionCall %void %main_inner %69 |
| OpReturn |
| OpFunctionEnd |