blob: 112a9196d807a03970bd54766c18d7a1bb49e801 [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 77
; Schema: 0
OpCapability Shader
OpCapability VulkanMemoryModel
OpCapability VulkanMemoryModelDeviceScope
OpCapability Float16
OpCapability StorageBuffer16BitAccess
OpCapability CooperativeMatrixKHR
OpExtension "SPV_KHR_vulkan_memory_model"
OpExtension "SPV_KHR_cooperative_matrix"
%27 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical Vulkan
OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input
OpExecutionMode %compute_main LocalSize 1 1 1
OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner"
OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout"
OpName %arg_0 "arg_0"
OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input"
OpName %subgroupMatrixLoad_fe78c2 "subgroupMatrixLoad_fe78c2"
OpName %arg_1 "arg_1"
OpName %arg_3 "arg_3"
OpName %res "res"
OpName %compute_main_inner "compute_main_inner"
OpName %tint_local_index "tint_local_index"
OpName %compute_main "compute_main"
OpDecorate %_arr_half_uint_1024 ArrayStride 2
OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0
OpDecorate %prevent_dce_block_tint_explicit_layout Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex
%half = OpTypeFloat 16
%uint = OpTypeInt 32 0
%uint_1024 = OpConstant %uint 1024
%_arr_half_uint_1024 = OpTypeArray %half %uint_1024
%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_half_uint_1024
%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout
%1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer
%_arr_half_uint_1024_0 = OpTypeArray %half %uint_1024
%_ptr_Workgroup__arr_half_uint_1024_0 = OpTypePointer Workgroup %_arr_half_uint_1024_0
%arg_0 = OpVariable %_ptr_Workgroup__arr_half_uint_1024_0 Workgroup
%_ptr_Input_uint = OpTypePointer Input %uint
%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input
%uint_3 = OpConstant %uint 3
%uint_8 = OpConstant %uint 8
%uint_0 = OpConstant %uint 0
%14 = OpTypeCooperativeMatrixKHR %half %uint_3 %uint_8 %uint_8 %uint_0
%18 = OpTypeFunction %14
%_ptr_Function_uint = OpTypePointer Function %uint
%uint_1 = OpConstant %uint 1
%uint_7 = OpConstant %uint 7
%bool = OpTypeBool
%_ptr_Function_14 = OpTypePointer Function %14
%36 = OpConstantNull %14
%_ptr_Workgroup_half = OpTypePointer Workgroup %half
%void = OpTypeVoid
%48 = OpTypeFunction %void %uint
%uint_2 = OpConstant %uint 2
%uint_24840 = OpConstant %uint 24840
%_ptr_StorageBuffer__arr_half_uint_1024 = OpTypePointer StorageBuffer %_arr_half_uint_1024
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%uint_64 = OpConstant %uint 64
%half_0x0p_0 = OpConstant %half 0x0p+0
%73 = OpTypeFunction %void
%subgroupMatrixLoad_fe78c2 = OpFunction %14 None %18
%19 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function
%arg_3 = OpVariable %_ptr_Function_uint Function
%34 = OpVariable %_ptr_Function_14 Function %36
%res = OpVariable %_ptr_Function_14 Function
OpStore %arg_1 %uint_1
OpStore %arg_3 %uint_8
%24 = OpLoad %uint %arg_1 None
%25 = OpLoad %uint %arg_3 None
%26 = OpExtInst %uint %27 UMax %25 %uint_8
%28 = OpIMul %uint %26 %uint_7
%30 = OpIAdd %uint %24 %28
%31 = OpIAdd %uint %30 %uint_8
%32 = OpULessThanEqual %bool %31 %uint_1024
OpSelectionMerge %37 None
OpBranchConditional %32 %38 %37
%38 = OpLabel
%42 = OpAccessChain %_ptr_Workgroup_half %arg_0 %24
%44 = OpCooperativeMatrixLoadKHR %14 %42 %uint_1 %26 NonPrivatePointer
OpStore %34 %44 None
OpBranch %37
%37 = OpLabel
%39 = OpLoad %14 %34 None
OpStore %res %39
%41 = OpLoad %14 %res None
OpReturnValue %41
OpFunctionEnd
%compute_main_inner = OpFunction %void None %48
%tint_local_index = OpFunctionParameter %uint
%49 = OpLabel
OpBranch %50
%50 = OpLabel
OpBranch %53
%53 = OpLabel
%55 = OpPhi %uint %tint_local_index %50 %56 %52
OpLoopMerge %54 %52 None
OpBranch %51
%51 = OpLabel
%67 = OpUGreaterThanEqual %bool %55 %uint_1024
OpSelectionMerge %68 None
OpBranchConditional %67 %69 %68
%69 = OpLabel
OpBranch %54
%68 = OpLabel
%70 = OpAccessChain %_ptr_Workgroup_half %arg_0 %55
OpStore %70 %half_0x0p_0 NonPrivatePointer
OpBranch %52
%52 = OpLabel
%56 = OpIAdd %uint %55 %uint_1
OpBranch %53
%54 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_24840
%60 = OpFunctionCall %14 %subgroupMatrixLoad_fe78c2
%61 = OpAccessChain %_ptr_StorageBuffer__arr_half_uint_1024 %1 %uint_0
%63 = OpAccessChain %_ptr_StorageBuffer_half %61 %uint_0
OpCooperativeMatrixStoreKHR %63 %60 %uint_0 %uint_64 NonPrivatePointer
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %73
%74 = OpLabel
%75 = OpLoad %uint %compute_main_local_invocation_index_Input None
%76 = OpFunctionCall %void %compute_main_inner %75
OpReturn
OpFunctionEnd