| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 84 |
| ; 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 |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %int_8 = OpConstant %int 8 |
| %uint_7 = OpConstant %uint 7 |
| %uint_8 = OpConstant %uint 8 |
| %bool = OpTypeBool |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %uint_3 = OpConstant %uint 3 |
| %50 = OpTypeCooperativeMatrixKHR %float %uint_3 %uint_8 %uint_8 %uint_0 |
| %_ptr_Workgroup_float = OpTypePointer Workgroup %float |
| %uint_1 = OpConstant %uint 1 |
| %58 = OpTypeCooperativeMatrixKHR %float %uint_3 %uint_8 %uint_8 %uint_1 |
| %float_0 = OpConstant %float 0 |
| %uint_32 = OpConstant %uint 32 |
| %80 = 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 |
| %73 = OpUGreaterThanEqual %bool %23 %uint_1024 |
| OpSelectionMerge %74 None |
| OpBranchConditional %73 %75 %74 |
| %75 = OpLabel |
| OpBranch %22 |
| %74 = OpLabel |
| %76 = OpAccessChain %_ptr_Workgroup_float %wg_var %23 |
| OpStore %76 %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 = OpBitcast %uint %int_0 |
| %35 = OpBitcast %uint %int_8 |
| %37 = OpIMul %uint %35 %uint_7 |
| %39 = OpIAdd %uint %32 %37 |
| %40 = OpIAdd %uint %39 %uint_8 |
| %42 = OpULessThanEqual %bool %40 %31 |
| %44 = OpSelect %uint %42 %32 %uint_0 |
| %45 = OpSelect %uint %42 %35 %uint_8 |
| %46 = OpAccessChain %_ptr_StorageBuffer__runtimearr_float %1 %uint_0 |
| %47 = OpAccessChain %_ptr_StorageBuffer_float %46 %44 |
| %m = OpCooperativeMatrixLoadKHR %50 %47 %uint_0 %45 NonPrivatePointer |
| %52 = OpAccessChain %_ptr_Workgroup_float %wg_var %uint_0 |
| OpCooperativeMatrixStoreKHR %52 %m %uint_0 %int_8 NonPrivatePointer |
| OpControlBarrier %uint_2 %uint_2 %uint_24840 |
| %56 = OpAccessChain %_ptr_Workgroup_float %wg_var %uint_0 |
| %m2 = OpCooperativeMatrixLoadKHR %58 %56 %uint_1 %int_8 NonPrivatePointer |
| %60 = OpAccessChain %_ptr_StorageBuffer__runtimearr_float %1 %uint_0 |
| %61 = OpArrayLength %uint %1 0 |
| %62 = OpBitcast %uint %int_0 |
| %63 = OpBitcast %uint %int_8 |
| %64 = OpIMul %uint %63 %uint_7 |
| %65 = OpIAdd %uint %62 %64 |
| %66 = OpIAdd %uint %65 %uint_8 |
| %67 = OpULessThanEqual %bool %66 %61 |
| %68 = OpSelect %uint %67 %62 %uint_0 |
| %69 = OpSelect %uint %67 %63 %uint_8 |
| %70 = OpAccessChain %_ptr_StorageBuffer__runtimearr_float %1 %uint_0 |
| %71 = OpAccessChain %_ptr_StorageBuffer_float %70 %68 |
| OpCooperativeMatrixStoreKHR %71 %m2 %uint_1 %69 NonPrivatePointer |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %80 |
| %81 = OpLabel |
| %82 = OpLoad %uint %main_local_invocation_index_Input None |
| %83 = OpFunctionCall %void %main_inner %82 |
| OpReturn |
| OpFunctionEnd |