blob: 415b8aa325474c0c25af2da4cce185246a298f0b [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 88
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %u_block_std140 "u_block_std140"
OpMemberName %u_block_std140 0 "inner"
OpName %mat4x2_f16 "mat4x2_f16"
OpMemberName %mat4x2_f16 0 "col0"
OpMemberName %mat4x2_f16 1 "col1"
OpMemberName %mat4x2_f16 2 "col2"
OpMemberName %mat4x2_f16 3 "col3"
OpName %u "u"
OpName %p "p"
OpName %conv_mat4x2_f16 "conv_mat4x2_f16"
OpName %val "val"
OpName %conv_arr4_mat4x2_f16 "conv_arr4_mat4x2_f16"
OpName %val_0 "val"
OpName %arr "arr"
OpName %i "i"
OpName %var_for_index "var_for_index"
OpName %f "f"
OpDecorate %u_block_std140 Block
OpMemberDecorate %u_block_std140 0 Offset 0
OpMemberDecorate %mat4x2_f16 0 Offset 0
OpMemberDecorate %mat4x2_f16 1 Offset 4
OpMemberDecorate %mat4x2_f16 2 Offset 8
OpMemberDecorate %mat4x2_f16 3 Offset 12
OpDecorate %_arr_mat4x2_f16_uint_4 ArrayStride 16
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
OpDecorate %_arr_mat4v2half_uint_4 ArrayStride 16
%half = OpTypeFloat 16
%v2half = OpTypeVector %half 2
%mat4x2_f16 = OpTypeStruct %v2half %v2half %v2half %v2half
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_mat4x2_f16_uint_4 = OpTypeArray %mat4x2_f16 %uint_4
%u_block_std140 = OpTypeStruct %_arr_mat4x2_f16_uint_4
%_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140
%u = OpVariable %_ptr_Uniform_u_block_std140 Uniform
%mat4v2half = OpTypeMatrix %v2half 4
%_arr_mat4v2half_uint_4 = OpTypeArray %mat4v2half %uint_4
%_ptr_Private__arr_mat4v2half_uint_4 = OpTypePointer Private %_arr_mat4v2half_uint_4
%14 = OpConstantNull %_arr_mat4v2half_uint_4
%p = OpVariable %_ptr_Private__arr_mat4v2half_uint_4 Private %14
%15 = OpTypeFunction %mat4v2half %mat4x2_f16
%24 = OpTypeFunction %_arr_mat4v2half_uint_4 %_arr_mat4x2_f16_uint_4
%_ptr_Function__arr_mat4v2half_uint_4 = OpTypePointer Function %_arr_mat4v2half_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%32 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_mat4x2_f16_uint_4 = OpTypePointer Function %_arr_mat4x2_f16_uint_4
%45 = OpConstantNull %_arr_mat4x2_f16_uint_4
%_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half
%_ptr_Function_mat4x2_f16 = OpTypePointer Function %mat4x2_f16
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%58 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_Uniform__arr_mat4x2_f16_uint_4 = OpTypePointer Uniform %_arr_mat4x2_f16_uint_4
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Private_mat4v2half = OpTypePointer Private %mat4v2half
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_mat4x2_f16 = OpTypePointer Uniform %mat4x2_f16
%76 = OpConstantNull %int
%_ptr_Private_v2half = OpTypePointer Private %v2half
%_ptr_Uniform_v2half = OpTypePointer Uniform %v2half
%_ptr_Private_half = OpTypePointer Private %half
%_ptr_Uniform_half = OpTypePointer Uniform %half
%conv_mat4x2_f16 = OpFunction %mat4v2half None %15
%val = OpFunctionParameter %mat4x2_f16
%18 = OpLabel
%19 = OpCompositeExtract %v2half %val 0
%20 = OpCompositeExtract %v2half %val 1
%21 = OpCompositeExtract %v2half %val 2
%22 = OpCompositeExtract %v2half %val 3
%23 = OpCompositeConstruct %mat4v2half %19 %20 %21 %22
OpReturnValue %23
OpFunctionEnd
%conv_arr4_mat4x2_f16 = OpFunction %_arr_mat4v2half_uint_4 None %24
%val_0 = OpFunctionParameter %_arr_mat4x2_f16_uint_4
%27 = OpLabel
%arr = OpVariable %_ptr_Function__arr_mat4v2half_uint_4 Function %14
%i = OpVariable %_ptr_Function_uint Function %32
%var_for_index = OpVariable %_ptr_Function__arr_mat4x2_f16_uint_4 Function %45
OpBranch %33
%33 = OpLabel
OpLoopMerge %34 %35 None
OpBranch %36
%36 = OpLabel
%38 = OpLoad %uint %i
%39 = OpULessThan %bool %38 %uint_4
%37 = OpLogicalNot %bool %39
OpSelectionMerge %41 None
OpBranchConditional %37 %42 %41
%42 = OpLabel
OpBranch %34
%41 = OpLabel
OpStore %var_for_index %val_0
%46 = OpLoad %uint %i
%48 = OpAccessChain %_ptr_Function_mat4v2half %arr %46
%50 = OpLoad %uint %i
%52 = OpAccessChain %_ptr_Function_mat4x2_f16 %var_for_index %50
%53 = OpLoad %mat4x2_f16 %52
%49 = OpFunctionCall %mat4v2half %conv_mat4x2_f16 %53
OpStore %48 %49
OpBranch %35
%35 = OpLabel
%54 = OpLoad %uint %i
%56 = OpIAdd %uint %54 %uint_1
OpStore %i %56
OpBranch %33
%34 = OpLabel
%57 = OpLoad %_arr_mat4v2half_uint_4 %arr
OpReturnValue %57
OpFunctionEnd
%f = OpFunction %void None %58
%61 = OpLabel
%65 = OpAccessChain %_ptr_Uniform__arr_mat4x2_f16_uint_4 %u %uint_0
%66 = OpLoad %_arr_mat4x2_f16_uint_4 %65
%62 = OpFunctionCall %_arr_mat4v2half_uint_4 %conv_arr4_mat4x2_f16 %66
OpStore %p %62
%70 = OpAccessChain %_ptr_Private_mat4v2half %p %int_1
%74 = OpAccessChain %_ptr_Uniform_mat4x2_f16 %u %uint_0 %uint_2
%75 = OpLoad %mat4x2_f16 %74
%71 = OpFunctionCall %mat4v2half %conv_mat4x2_f16 %75
OpStore %70 %71
%78 = OpAccessChain %_ptr_Private_v2half %p %int_1 %76
%80 = OpAccessChain %_ptr_Uniform_v2half %u %uint_0 %32 %uint_1
%81 = OpLoad %v2half %80
%82 = OpVectorShuffle %v2half %81 %81 1 0
OpStore %78 %82
%84 = OpAccessChain %_ptr_Private_half %p %int_1 %76 %uint_0
%86 = OpAccessChain %_ptr_Uniform_half %u %uint_0 %32 %uint_1 %32
%87 = OpLoad %half %86
OpStore %84 %87
OpReturn
OpFunctionEnd