| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 146 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability Float16 |
| OpCapability UniformAndStorageBuffer16BitAccess |
| OpCapability StorageBuffer16BitAccess |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %f "f" |
| OpExecutionMode %f LocalSize 1 1 1 |
| OpName %a_block_std140 "a_block_std140" |
| OpMemberName %a_block_std140 0 "inner" |
| OpName %mat4x4_f16 "mat4x4_f16" |
| OpMemberName %mat4x4_f16 0 "col0" |
| OpMemberName %mat4x4_f16 1 "col1" |
| OpMemberName %mat4x4_f16 2 "col2" |
| OpMemberName %mat4x4_f16 3 "col3" |
| OpName %a "a" |
| OpName %s_block "s_block" |
| OpMemberName %s_block 0 "inner" |
| OpName %s "s" |
| OpName %counter "counter" |
| OpName %i "i" |
| OpName %conv_mat4x4_f16 "conv_mat4x4_f16" |
| OpName %val "val" |
| OpName %conv_arr4_mat4x4_f16 "conv_arr4_mat4x4_f16" |
| OpName %val_0 "val" |
| OpName %arr "arr" |
| OpName %i_0 "i" |
| OpName %var_for_index "var_for_index" |
| OpName %load_a_inner_p0_p1 "load_a_inner_p0_p1" |
| OpName %p0 "p0" |
| OpName %p1 "p1" |
| OpName %load_a_inner_p0_p1_0 "load_a_inner_p0_p1_0" |
| OpName %p0_0 "p0" |
| OpName %p1_0 "p1" |
| OpName %f "f" |
| OpDecorate %a_block_std140 Block |
| OpMemberDecorate %a_block_std140 0 Offset 0 |
| OpMemberDecorate %mat4x4_f16 0 Offset 0 |
| OpMemberDecorate %mat4x4_f16 1 Offset 8 |
| OpMemberDecorate %mat4x4_f16 2 Offset 16 |
| OpMemberDecorate %mat4x4_f16 3 Offset 24 |
| OpDecorate %_arr_mat4x4_f16_uint_4 ArrayStride 32 |
| OpDecorate %a NonWritable |
| OpDecorate %a DescriptorSet 0 |
| OpDecorate %a Binding 0 |
| OpDecorate %s_block Block |
| OpMemberDecorate %s_block 0 Offset 0 |
| OpDecorate %s DescriptorSet 0 |
| OpDecorate %s Binding 1 |
| OpDecorate %_arr_mat4v4half_uint_4 ArrayStride 32 |
| %half = OpTypeFloat 16 |
| %v4half = OpTypeVector %half 4 |
| %mat4x4_f16 = OpTypeStruct %v4half %v4half %v4half %v4half |
| %uint = OpTypeInt 32 0 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_mat4x4_f16_uint_4 = OpTypeArray %mat4x4_f16 %uint_4 |
| %a_block_std140 = OpTypeStruct %_arr_mat4x4_f16_uint_4 |
| %_ptr_Uniform_a_block_std140 = OpTypePointer Uniform %a_block_std140 |
| %a = OpVariable %_ptr_Uniform_a_block_std140 Uniform |
| %s_block = OpTypeStruct %half |
| %_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block |
| %s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer |
| %int = OpTypeInt 32 1 |
| %14 = OpConstantNull %int |
| %_ptr_Private_int = OpTypePointer Private %int |
| %counter = OpVariable %_ptr_Private_int Private %14 |
| %17 = OpTypeFunction %int |
| %int_1 = OpConstant %int 1 |
| %mat4v4half = OpTypeMatrix %v4half 4 |
| %24 = OpTypeFunction %mat4v4half %mat4x4_f16 |
| %_arr_mat4v4half_uint_4 = OpTypeArray %mat4v4half %uint_4 |
| %34 = OpTypeFunction %_arr_mat4v4half_uint_4 %_arr_mat4x4_f16_uint_4 |
| %_ptr_Function__arr_mat4v4half_uint_4 = OpTypePointer Function %_arr_mat4v4half_uint_4 |
| %41 = OpConstantNull %_arr_mat4v4half_uint_4 |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %44 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Function__arr_mat4x4_f16_uint_4 = OpTypePointer Function %_arr_mat4x4_f16_uint_4 |
| %57 = OpConstantNull %_arr_mat4x4_f16_uint_4 |
| %_ptr_Function_mat4v4half = OpTypePointer Function %mat4v4half |
| %_ptr_Function_mat4x4_f16 = OpTypePointer Function %mat4x4_f16 |
| %uint_1 = OpConstant %uint 1 |
| %70 = OpTypeFunction %v4half %uint %uint |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_v4half = OpTypePointer Uniform %v4half |
| %uint_2 = OpConstant %uint 2 |
| %uint_3 = OpConstant %uint 3 |
| %93 = OpConstantNull %v4half |
| %94 = OpTypeFunction %half %uint %uint |
| %_ptr_Uniform_half = OpTypePointer Uniform %half |
| %114 = OpConstantNull %half |
| %void = OpTypeVoid |
| %115 = OpTypeFunction %void |
| %_ptr_Uniform__arr_mat4x4_f16_uint_4 = OpTypePointer Uniform %_arr_mat4x4_f16_uint_4 |
| %_ptr_Uniform_mat4x4_f16 = OpTypePointer Uniform %mat4x4_f16 |
| %_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half |
| %i = OpFunction %int None %17 |
| %19 = OpLabel |
| %20 = OpLoad %int %counter |
| %22 = OpIAdd %int %20 %int_1 |
| OpStore %counter %22 |
| %23 = OpLoad %int %counter |
| OpReturnValue %23 |
| OpFunctionEnd |
| %conv_mat4x4_f16 = OpFunction %mat4v4half None %24 |
| %val = OpFunctionParameter %mat4x4_f16 |
| %28 = OpLabel |
| %29 = OpCompositeExtract %v4half %val 0 |
| %30 = OpCompositeExtract %v4half %val 1 |
| %31 = OpCompositeExtract %v4half %val 2 |
| %32 = OpCompositeExtract %v4half %val 3 |
| %33 = OpCompositeConstruct %mat4v4half %29 %30 %31 %32 |
| OpReturnValue %33 |
| OpFunctionEnd |
| %conv_arr4_mat4x4_f16 = OpFunction %_arr_mat4v4half_uint_4 None %34 |
| %val_0 = OpFunctionParameter %_arr_mat4x4_f16_uint_4 |
| %38 = OpLabel |
| %arr = OpVariable %_ptr_Function__arr_mat4v4half_uint_4 Function %41 |
| %i_0 = OpVariable %_ptr_Function_uint Function %44 |
| %var_for_index = OpVariable %_ptr_Function__arr_mat4x4_f16_uint_4 Function %57 |
| OpBranch %45 |
| %45 = OpLabel |
| OpLoopMerge %46 %47 None |
| OpBranch %48 |
| %48 = OpLabel |
| %50 = OpLoad %uint %i_0 |
| %51 = OpULessThan %bool %50 %uint_4 |
| %49 = OpLogicalNot %bool %51 |
| OpSelectionMerge %53 None |
| OpBranchConditional %49 %54 %53 |
| %54 = OpLabel |
| OpBranch %46 |
| %53 = OpLabel |
| OpStore %var_for_index %val_0 |
| %58 = OpLoad %uint %i_0 |
| %60 = OpAccessChain %_ptr_Function_mat4v4half %arr %58 |
| %62 = OpLoad %uint %i_0 |
| %64 = OpAccessChain %_ptr_Function_mat4x4_f16 %var_for_index %62 |
| %65 = OpLoad %mat4x4_f16 %64 |
| %61 = OpFunctionCall %mat4v4half %conv_mat4x4_f16 %65 |
| OpStore %60 %61 |
| OpBranch %47 |
| %47 = OpLabel |
| %66 = OpLoad %uint %i_0 |
| %68 = OpIAdd %uint %66 %uint_1 |
| OpStore %i_0 %68 |
| OpBranch %45 |
| %46 = OpLabel |
| %69 = OpLoad %_arr_mat4v4half_uint_4 %arr |
| OpReturnValue %69 |
| OpFunctionEnd |
| %load_a_inner_p0_p1 = OpFunction %v4half None %70 |
| %p0 = OpFunctionParameter %uint |
| %p1 = OpFunctionParameter %uint |
| %74 = OpLabel |
| OpSelectionMerge %75 None |
| OpSwitch %p1 %76 0 %77 1 %78 2 %79 3 %80 |
| %77 = OpLabel |
| %83 = OpAccessChain %_ptr_Uniform_v4half %a %uint_0 %p0 %uint_0 |
| %84 = OpLoad %v4half %83 |
| OpReturnValue %84 |
| %78 = OpLabel |
| %85 = OpAccessChain %_ptr_Uniform_v4half %a %uint_0 %p0 %uint_1 |
| %86 = OpLoad %v4half %85 |
| OpReturnValue %86 |
| %79 = OpLabel |
| %88 = OpAccessChain %_ptr_Uniform_v4half %a %uint_0 %p0 %uint_2 |
| %89 = OpLoad %v4half %88 |
| OpReturnValue %89 |
| %80 = OpLabel |
| %91 = OpAccessChain %_ptr_Uniform_v4half %a %uint_0 %p0 %uint_3 |
| %92 = OpLoad %v4half %91 |
| OpReturnValue %92 |
| %76 = OpLabel |
| OpReturnValue %93 |
| %75 = OpLabel |
| OpReturnValue %93 |
| OpFunctionEnd |
| %load_a_inner_p0_p1_0 = OpFunction %half None %94 |
| %p0_0 = OpFunctionParameter %uint |
| %p1_0 = OpFunctionParameter %uint |
| %98 = OpLabel |
| OpSelectionMerge %99 None |
| OpSwitch %p1_0 %100 0 %101 1 %102 2 %103 3 %104 |
| %101 = OpLabel |
| %106 = OpAccessChain %_ptr_Uniform_half %a %uint_0 %p0_0 %uint_0 %44 |
| %107 = OpLoad %half %106 |
| OpReturnValue %107 |
| %102 = OpLabel |
| %108 = OpAccessChain %_ptr_Uniform_half %a %uint_0 %p0_0 %uint_1 %44 |
| %109 = OpLoad %half %108 |
| OpReturnValue %109 |
| %103 = OpLabel |
| %110 = OpAccessChain %_ptr_Uniform_half %a %uint_0 %p0_0 %uint_2 %44 |
| %111 = OpLoad %half %110 |
| OpReturnValue %111 |
| %104 = OpLabel |
| %112 = OpAccessChain %_ptr_Uniform_half %a %uint_0 %p0_0 %uint_3 %44 |
| %113 = OpLoad %half %112 |
| OpReturnValue %113 |
| %100 = OpLabel |
| OpReturnValue %114 |
| %99 = OpLabel |
| OpReturnValue %114 |
| OpFunctionEnd |
| %f = OpFunction %void None %115 |
| %118 = OpLabel |
| %119 = OpFunctionCall %int %i |
| %120 = OpFunctionCall %int %i |
| %123 = OpAccessChain %_ptr_Uniform__arr_mat4x4_f16_uint_4 %a %uint_0 |
| %124 = OpLoad %_arr_mat4x4_f16_uint_4 %123 |
| %121 = OpFunctionCall %_arr_mat4v4half_uint_4 %conv_arr4_mat4x4_f16 %124 |
| %127 = OpAccessChain %_ptr_Uniform_mat4x4_f16 %a %uint_0 %119 |
| %128 = OpLoad %mat4x4_f16 %127 |
| %125 = OpFunctionCall %mat4v4half %conv_mat4x4_f16 %128 |
| %130 = OpBitcast %uint %119 |
| %131 = OpBitcast %uint %120 |
| %129 = OpFunctionCall %v4half %load_a_inner_p0_p1 %130 %131 |
| %133 = OpAccessChain %_ptr_StorageBuffer_half %s %uint_0 |
| %135 = OpBitcast %uint %119 |
| %136 = OpBitcast %uint %120 |
| %134 = OpFunctionCall %half %load_a_inner_p0_p1_0 %135 %136 |
| %137 = OpCompositeExtract %mat4v4half %121 0 |
| %138 = OpCompositeExtract %v4half %137 0 |
| %139 = OpCompositeExtract %half %138 0 |
| %140 = OpFAdd %half %134 %139 |
| %141 = OpCompositeExtract %v4half %125 0 |
| %142 = OpCompositeExtract %half %141 0 |
| %143 = OpFAdd %half %140 %142 |
| %144 = OpCompositeExtract %half %129 0 |
| %145 = OpFAdd %half %143 %144 |
| OpStore %133 %145 |
| OpReturn |
| OpFunctionEnd |