blob: 18347586094155da962d67bea95f96b69e4520f9 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 98
; 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 %a_block_std140 "a_block_std140"
OpMemberName %a_block_std140 0 "inner"
OpName %mat2x3_f16 "mat2x3_f16"
OpMemberName %mat2x3_f16 0 "col0"
OpMemberName %mat2x3_f16 1 "col1"
OpName %a "a"
OpName %counter "counter"
OpName %i "i"
OpName %conv_mat2x3_f16 "conv_mat2x3_f16"
OpName %val "val"
OpName %conv_arr4_mat2x3_f16 "conv_arr4_mat2x3_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 %f "f"
OpDecorate %a_block_std140 Block
OpMemberDecorate %a_block_std140 0 Offset 0
OpMemberDecorate %mat2x3_f16 0 Offset 0
OpMemberDecorate %mat2x3_f16 1 Offset 8
OpDecorate %_arr_mat2x3_f16_uint_4 ArrayStride 16
OpDecorate %a NonWritable
OpDecorate %a DescriptorSet 0
OpDecorate %a Binding 0
OpDecorate %_arr_mat2v3half_uint_4 ArrayStride 16
%half = OpTypeFloat 16
%v3half = OpTypeVector %half 3
%mat2x3_f16 = OpTypeStruct %v3half %v3half
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_mat2x3_f16_uint_4 = OpTypeArray %mat2x3_f16 %uint_4
%a_block_std140 = OpTypeStruct %_arr_mat2x3_f16_uint_4
%_ptr_Uniform_a_block_std140 = OpTypePointer Uniform %a_block_std140
%a = OpVariable %_ptr_Uniform_a_block_std140 Uniform
%int = OpTypeInt 32 1
%11 = OpConstantNull %int
%_ptr_Private_int = OpTypePointer Private %int
%counter = OpVariable %_ptr_Private_int Private %11
%14 = OpTypeFunction %int
%int_1 = OpConstant %int 1
%mat2v3half = OpTypeMatrix %v3half 2
%21 = OpTypeFunction %mat2v3half %mat2x3_f16
%_arr_mat2v3half_uint_4 = OpTypeArray %mat2v3half %uint_4
%29 = OpTypeFunction %_arr_mat2v3half_uint_4 %_arr_mat2x3_f16_uint_4
%_ptr_Function__arr_mat2v3half_uint_4 = OpTypePointer Function %_arr_mat2v3half_uint_4
%36 = OpConstantNull %_arr_mat2v3half_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%39 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_mat2x3_f16_uint_4 = OpTypePointer Function %_arr_mat2x3_f16_uint_4
%52 = OpConstantNull %_arr_mat2x3_f16_uint_4
%_ptr_Function_mat2v3half = OpTypePointer Function %mat2v3half
%_ptr_Function_mat2x3_f16 = OpTypePointer Function %mat2x3_f16
%uint_1 = OpConstant %uint 1
%65 = OpTypeFunction %v3half %uint %uint
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_v3half = OpTypePointer Uniform %v3half
%80 = OpConstantNull %v3half
%void = OpTypeVoid
%81 = OpTypeFunction %void
%_ptr_Uniform__arr_mat2x3_f16_uint_4 = OpTypePointer Uniform %_arr_mat2x3_f16_uint_4
%_ptr_Uniform_mat2x3_f16 = OpTypePointer Uniform %mat2x3_f16
%i = OpFunction %int None %14
%16 = OpLabel
%17 = OpLoad %int %counter
%19 = OpIAdd %int %17 %int_1
OpStore %counter %19
%20 = OpLoad %int %counter
OpReturnValue %20
OpFunctionEnd
%conv_mat2x3_f16 = OpFunction %mat2v3half None %21
%val = OpFunctionParameter %mat2x3_f16
%25 = OpLabel
%26 = OpCompositeExtract %v3half %val 0
%27 = OpCompositeExtract %v3half %val 1
%28 = OpCompositeConstruct %mat2v3half %26 %27
OpReturnValue %28
OpFunctionEnd
%conv_arr4_mat2x3_f16 = OpFunction %_arr_mat2v3half_uint_4 None %29
%val_0 = OpFunctionParameter %_arr_mat2x3_f16_uint_4
%33 = OpLabel
%arr = OpVariable %_ptr_Function__arr_mat2v3half_uint_4 Function %36
%i_0 = OpVariable %_ptr_Function_uint Function %39
%var_for_index = OpVariable %_ptr_Function__arr_mat2x3_f16_uint_4 Function %52
OpBranch %40
%40 = OpLabel
OpLoopMerge %41 %42 None
OpBranch %43
%43 = OpLabel
%45 = OpLoad %uint %i_0
%46 = OpULessThan %bool %45 %uint_4
%44 = OpLogicalNot %bool %46
OpSelectionMerge %48 None
OpBranchConditional %44 %49 %48
%49 = OpLabel
OpBranch %41
%48 = OpLabel
OpStore %var_for_index %val_0
%53 = OpLoad %uint %i_0
%55 = OpAccessChain %_ptr_Function_mat2v3half %arr %53
%57 = OpLoad %uint %i_0
%59 = OpAccessChain %_ptr_Function_mat2x3_f16 %var_for_index %57
%60 = OpLoad %mat2x3_f16 %59
%56 = OpFunctionCall %mat2v3half %conv_mat2x3_f16 %60
OpStore %55 %56
OpBranch %42
%42 = OpLabel
%61 = OpLoad %uint %i_0
%63 = OpIAdd %uint %61 %uint_1
OpStore %i_0 %63
OpBranch %40
%41 = OpLabel
%64 = OpLoad %_arr_mat2v3half_uint_4 %arr
OpReturnValue %64
OpFunctionEnd
%load_a_inner_p0_p1 = OpFunction %v3half None %65
%p0 = OpFunctionParameter %uint
%p1 = OpFunctionParameter %uint
%69 = OpLabel
OpSelectionMerge %70 None
OpSwitch %p1 %71 0 %72 1 %73
%72 = OpLabel
%76 = OpAccessChain %_ptr_Uniform_v3half %a %uint_0 %p0 %uint_0
%77 = OpLoad %v3half %76
OpReturnValue %77
%73 = OpLabel
%78 = OpAccessChain %_ptr_Uniform_v3half %a %uint_0 %p0 %uint_1
%79 = OpLoad %v3half %78
OpReturnValue %79
%71 = OpLabel
OpReturnValue %80
%70 = OpLabel
OpReturnValue %80
OpFunctionEnd
%f = OpFunction %void None %81
%84 = OpLabel
%85 = OpFunctionCall %int %i
%86 = OpFunctionCall %int %i
%89 = OpAccessChain %_ptr_Uniform__arr_mat2x3_f16_uint_4 %a %uint_0
%90 = OpLoad %_arr_mat2x3_f16_uint_4 %89
%87 = OpFunctionCall %_arr_mat2v3half_uint_4 %conv_arr4_mat2x3_f16 %90
%93 = OpAccessChain %_ptr_Uniform_mat2x3_f16 %a %uint_0 %85
%94 = OpLoad %mat2x3_f16 %93
%91 = OpFunctionCall %mat2v3half %conv_mat2x3_f16 %94
%96 = OpBitcast %uint %85
%97 = OpBitcast %uint %86
%95 = OpFunctionCall %v3half %load_a_inner_p0_p1 %96 %97
OpReturn
OpFunctionEnd