| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 115 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability Float16 |
| OpCapability UniformAndStorageBuffer16BitAccess |
| OpCapability StorageBuffer16BitAccess |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %f "f" %local_invocation_index_1 |
| OpExecutionMode %f LocalSize 1 1 1 |
| OpName %local_invocation_index_1 "local_invocation_index_1" |
| OpName %u_block_std140 "u_block_std140" |
| OpMemberName %u_block_std140 0 "inner" |
| OpName %mat2x4_f16 "mat2x4_f16" |
| OpMemberName %mat2x4_f16 0 "col0" |
| OpMemberName %mat2x4_f16 1 "col1" |
| OpName %u "u" |
| OpName %w "w" |
| OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory" |
| OpName %local_idx "local_idx" |
| OpName %idx "idx" |
| OpName %conv_mat2x4_f16 "conv_mat2x4_f16" |
| OpName %val "val" |
| OpName %conv_arr4_mat2x4_f16 "conv_arr4_mat2x4_f16" |
| OpName %val_0 "val" |
| OpName %arr "arr" |
| OpName %i "i" |
| OpName %var_for_index "var_for_index" |
| OpName %f_inner "f_inner" |
| OpName %local_invocation_index "local_invocation_index" |
| OpName %f "f" |
| OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex |
| OpDecorate %u_block_std140 Block |
| OpMemberDecorate %u_block_std140 0 Offset 0 |
| OpMemberDecorate %mat2x4_f16 0 Offset 0 |
| OpMemberDecorate %mat2x4_f16 1 Offset 8 |
| OpDecorate %_arr_mat2x4_f16_uint_4 ArrayStride 16 |
| OpDecorate %u NonWritable |
| OpDecorate %u DescriptorSet 0 |
| OpDecorate %u Binding 0 |
| OpDecorate %_arr_mat2v4half_uint_4 ArrayStride 16 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Input_uint Input |
| %half = OpTypeFloat 16 |
| %v4half = OpTypeVector %half 4 |
| %mat2x4_f16 = OpTypeStruct %v4half %v4half |
| %uint_4 = OpConstant %uint 4 |
| %_arr_mat2x4_f16_uint_4 = OpTypeArray %mat2x4_f16 %uint_4 |
| %u_block_std140 = OpTypeStruct %_arr_mat2x4_f16_uint_4 |
| %_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140 |
| %u = OpVariable %_ptr_Uniform_u_block_std140 Uniform |
| %mat2v4half = OpTypeMatrix %v4half 2 |
| %_arr_mat2v4half_uint_4 = OpTypeArray %mat2v4half %uint_4 |
| %_ptr_Workgroup__arr_mat2v4half_uint_4 = OpTypePointer Workgroup %_arr_mat2v4half_uint_4 |
| %w = OpVariable %_ptr_Workgroup__arr_mat2v4half_uint_4 Workgroup |
| %void = OpTypeVoid |
| %16 = OpTypeFunction %void %uint |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %23 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Workgroup_mat2v4half = OpTypePointer Workgroup %mat2v4half |
| %37 = OpConstantNull %mat2v4half |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %44 = OpTypeFunction %mat2v4half %mat2x4_f16 |
| %51 = OpTypeFunction %_arr_mat2v4half_uint_4 %_arr_mat2x4_f16_uint_4 |
| %_ptr_Function__arr_mat2v4half_uint_4 = OpTypePointer Function %_arr_mat2v4half_uint_4 |
| %57 = OpConstantNull %_arr_mat2v4half_uint_4 |
| %_ptr_Function__arr_mat2x4_f16_uint_4 = OpTypePointer Function %_arr_mat2x4_f16_uint_4 |
| %70 = OpConstantNull %_arr_mat2x4_f16_uint_4 |
| %_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half |
| %_ptr_Function_mat2x4_f16 = OpTypePointer Function %mat2x4_f16 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform__arr_mat2x4_f16_uint_4 = OpTypePointer Uniform %_arr_mat2x4_f16_uint_4 |
| %int = OpTypeInt 32 1 |
| %int_1 = OpConstant %int 1 |
| %_ptr_Uniform_mat2x4_f16 = OpTypePointer Uniform %mat2x4_f16 |
| %98 = OpConstantNull %int |
| %_ptr_Workgroup_v4half = OpTypePointer Workgroup %v4half |
| %_ptr_Uniform_v4half = OpTypePointer Uniform %v4half |
| %_ptr_Workgroup_half = OpTypePointer Workgroup %half |
| %_ptr_Uniform_half = OpTypePointer Uniform %half |
| %110 = OpTypeFunction %void |
| %tint_zero_workgroup_memory = OpFunction %void None %16 |
| %local_idx = OpFunctionParameter %uint |
| %20 = OpLabel |
| %idx = OpVariable %_ptr_Function_uint Function %23 |
| OpStore %idx %local_idx |
| OpBranch %24 |
| %24 = OpLabel |
| OpLoopMerge %25 %26 None |
| OpBranch %27 |
| %27 = OpLabel |
| %29 = OpLoad %uint %idx |
| %30 = OpULessThan %bool %29 %uint_4 |
| %28 = OpLogicalNot %bool %30 |
| OpSelectionMerge %32 None |
| OpBranchConditional %28 %33 %32 |
| %33 = OpLabel |
| OpBranch %25 |
| %32 = OpLabel |
| %34 = OpLoad %uint %idx |
| %36 = OpAccessChain %_ptr_Workgroup_mat2v4half %w %34 |
| OpStore %36 %37 |
| OpBranch %26 |
| %26 = OpLabel |
| %38 = OpLoad %uint %idx |
| %40 = OpIAdd %uint %38 %uint_1 |
| OpStore %idx %40 |
| OpBranch %24 |
| %25 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| OpReturn |
| OpFunctionEnd |
| %conv_mat2x4_f16 = OpFunction %mat2v4half None %44 |
| %val = OpFunctionParameter %mat2x4_f16 |
| %47 = OpLabel |
| %48 = OpCompositeExtract %v4half %val 0 |
| %49 = OpCompositeExtract %v4half %val 1 |
| %50 = OpCompositeConstruct %mat2v4half %48 %49 |
| OpReturnValue %50 |
| OpFunctionEnd |
| %conv_arr4_mat2x4_f16 = OpFunction %_arr_mat2v4half_uint_4 None %51 |
| %val_0 = OpFunctionParameter %_arr_mat2x4_f16_uint_4 |
| %54 = OpLabel |
| %arr = OpVariable %_ptr_Function__arr_mat2v4half_uint_4 Function %57 |
| %i = OpVariable %_ptr_Function_uint Function %23 |
| %var_for_index = OpVariable %_ptr_Function__arr_mat2x4_f16_uint_4 Function %70 |
| OpBranch %59 |
| %59 = OpLabel |
| OpLoopMerge %60 %61 None |
| OpBranch %62 |
| %62 = OpLabel |
| %64 = OpLoad %uint %i |
| %65 = OpULessThan %bool %64 %uint_4 |
| %63 = OpLogicalNot %bool %65 |
| OpSelectionMerge %66 None |
| OpBranchConditional %63 %67 %66 |
| %67 = OpLabel |
| OpBranch %60 |
| %66 = OpLabel |
| OpStore %var_for_index %val_0 |
| %71 = OpLoad %uint %i |
| %73 = OpAccessChain %_ptr_Function_mat2v4half %arr %71 |
| %75 = OpLoad %uint %i |
| %77 = OpAccessChain %_ptr_Function_mat2x4_f16 %var_for_index %75 |
| %78 = OpLoad %mat2x4_f16 %77 |
| %74 = OpFunctionCall %mat2v4half %conv_mat2x4_f16 %78 |
| OpStore %73 %74 |
| OpBranch %61 |
| %61 = OpLabel |
| %79 = OpLoad %uint %i |
| %80 = OpIAdd %uint %79 %uint_1 |
| OpStore %i %80 |
| OpBranch %59 |
| %60 = OpLabel |
| %81 = OpLoad %_arr_mat2v4half_uint_4 %arr |
| OpReturnValue %81 |
| OpFunctionEnd |
| %f_inner = OpFunction %void None %16 |
| %local_invocation_index = OpFunctionParameter %uint |
| %84 = OpLabel |
| %85 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index |
| %89 = OpAccessChain %_ptr_Uniform__arr_mat2x4_f16_uint_4 %u %uint_0 |
| %90 = OpLoad %_arr_mat2x4_f16_uint_4 %89 |
| %86 = OpFunctionCall %_arr_mat2v4half_uint_4 %conv_arr4_mat2x4_f16 %90 |
| OpStore %w %86 |
| %93 = OpAccessChain %_ptr_Workgroup_mat2v4half %w %int_1 |
| %96 = OpAccessChain %_ptr_Uniform_mat2x4_f16 %u %uint_0 %uint_2 |
| %97 = OpLoad %mat2x4_f16 %96 |
| %94 = OpFunctionCall %mat2v4half %conv_mat2x4_f16 %97 |
| OpStore %93 %94 |
| %100 = OpAccessChain %_ptr_Workgroup_v4half %w %int_1 %98 |
| %102 = OpAccessChain %_ptr_Uniform_v4half %u %uint_0 %23 %uint_1 |
| %103 = OpLoad %v4half %102 |
| %104 = OpVectorShuffle %v4half %103 %103 1 3 0 2 |
| OpStore %100 %104 |
| %106 = OpAccessChain %_ptr_Workgroup_half %w %int_1 %98 %uint_0 |
| %108 = OpAccessChain %_ptr_Uniform_half %u %uint_0 %23 %uint_1 %23 |
| %109 = OpLoad %half %108 |
| OpStore %106 %109 |
| OpReturn |
| OpFunctionEnd |
| %f = OpFunction %void None %110 |
| %112 = OpLabel |
| %114 = OpLoad %uint %local_invocation_index_1 |
| %113 = OpFunctionCall %void %f_inner %114 |
| OpReturn |
| OpFunctionEnd |