blob: 102f6a2582004304fe2ffeccdc4679b35e049715 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 147
; 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 %S_std140 "S_std140"
OpMemberName %S_std140 0 "before"
OpMemberName %S_std140 1 "m_0"
OpMemberName %S_std140 2 "m_1"
OpMemberName %S_std140 3 "m_2"
OpMemberName %S_std140 4 "after"
OpName %u "u"
OpName %u_block "u_block"
OpMemberName %u_block 0 "inner"
OpName %S "S"
OpMemberName %S 0 "before"
OpMemberName %S 1 "m"
OpMemberName %S 2 "after"
OpName %s "s"
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
OpName %dest "dest"
OpName %value "value"
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
OpName %value_0 "value"
OpName %i "i"
OpName %var_for_index "var_for_index"
OpName %conv_S "conv_S"
OpName %val "val"
OpName %conv_arr4_S "conv_arr4_S"
OpName %val_0 "val"
OpName %arr "arr"
OpName %i_0 "i"
OpName %var_for_index_1 "var_for_index_1"
OpName %load_u_inner_2_m "load_u_inner_2_m"
OpName %f "f"
OpDecorate %u_block_std140 Block
OpMemberDecorate %u_block_std140 0 Offset 0
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
OpMemberDecorate %S_std140 3 Offset 12
OpMemberDecorate %S_std140 4 Offset 64
OpDecorate %_arr_S_std140_uint_4 ArrayStride 128
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
OpDecorate %u_block Block
OpMemberDecorate %u_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 1 ColMajor
OpMemberDecorate %S 1 MatrixStride 4
OpMemberDecorate %S 2 Offset 64
OpDecorate %_arr_S_uint_4 ArrayStride 128
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
OpDecorate %_arr_uint_uint_1 ArrayStride 4
%int = OpTypeInt 32 1
%half = OpTypeFloat 16
%v2half = OpTypeVector %half 2
%S_std140 = OpTypeStruct %int %v2half %v2half %v2half %int
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_S_std140_uint_4 = OpTypeArray %S_std140 %uint_4
%u_block_std140 = OpTypeStruct %_arr_S_std140_uint_4
%_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140
%u = OpVariable %_ptr_Uniform_u_block_std140 Uniform
%mat3v2half = OpTypeMatrix %v2half 3
%S = OpTypeStruct %int %mat3v2half %int
%_arr_S_uint_4 = OpTypeArray %S %uint_4
%u_block = OpTypeStruct %_arr_S_uint_4
%_ptr_StorageBuffer_u_block = OpTypePointer StorageBuffer %u_block
%s = OpVariable %_ptr_StorageBuffer_u_block StorageBuffer
%void = OpTypeVoid
%uint_1 = OpConstant %uint 1
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
%17 = OpTypeFunction %void %_arr_uint_uint_1 %S
%uint_0 = OpConstant %uint 0
%26 = OpConstantNull %int
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_StorageBuffer_mat3v2half = OpTypePointer StorageBuffer %mat3v2half
%uint_2 = OpConstant %uint 2
%39 = OpTypeFunction %void %_arr_S_uint_4
%43 = OpConstantNull %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
%58 = OpConstantNull %_arr_S_uint_4
%_ptr_Function_S = OpTypePointer Function %S
%68 = OpTypeFunction %S %S_std140
%79 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
%_ptr_Function__arr_S_std140_uint_4 = OpTypePointer Function %_arr_S_std140_uint_4
%96 = OpConstantNull %_arr_S_std140_uint_4
%_ptr_Function_S_std140 = OpTypePointer Function %S_std140
%107 = OpTypeFunction %mat3v2half
%_ptr_Uniform_S_std140 = OpTypePointer Uniform %S_std140
%_ptr_Uniform_v2half = OpTypePointer Uniform %v2half
%uint_3 = OpConstant %uint 3
%125 = OpTypeFunction %void
%_ptr_Uniform__arr_S_std140_uint_4 = OpTypePointer Uniform %_arr_S_std140_uint_4
%134 = OpConstantComposite %_arr_uint_uint_1 %uint_1
%int_3 = OpConstant %int 3
%int_1 = OpConstant %int 1
%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
%assign_and_preserve_padding_1_s_X = OpFunction %void None %17
%dest = OpFunctionParameter %_arr_uint_uint_1
%value = OpFunctionParameter %S
%24 = OpLabel
%27 = OpCompositeExtract %uint %dest 0
%29 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %27 %uint_0
%30 = OpCompositeExtract %int %value 0
OpStore %29 %30
%31 = OpCompositeExtract %uint %dest 0
%33 = OpAccessChain %_ptr_StorageBuffer_mat3v2half %s %uint_0 %31 %uint_1
%34 = OpCompositeExtract %mat3v2half %value 1
OpStore %33 %34
%35 = OpCompositeExtract %uint %dest 0
%37 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %35 %uint_2
%38 = OpCompositeExtract %int %value 2
OpStore %37 %38
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_s = OpFunction %void None %39
%value_0 = OpFunctionParameter %_arr_S_uint_4
%42 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %43
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
OpStore %i %43
OpBranch %46
%46 = OpLabel
OpLoopMerge %47 %48 None
OpBranch %49
%49 = OpLabel
%51 = OpLoad %uint %i
%52 = OpULessThan %bool %51 %uint_4
%50 = OpLogicalNot %bool %52
OpSelectionMerge %54 None
OpBranchConditional %50 %55 %54
%55 = OpLabel
OpBranch %47
%54 = OpLabel
OpStore %var_for_index %value_0
%60 = OpLoad %uint %i
%61 = OpCompositeConstruct %_arr_uint_uint_1 %60
%62 = OpLoad %uint %i
%64 = OpAccessChain %_ptr_Function_S %var_for_index %62
%65 = OpLoad %S %64
%59 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %61 %65
OpBranch %48
%48 = OpLabel
%66 = OpLoad %uint %i
%67 = OpIAdd %uint %66 %uint_1
OpStore %i %67
OpBranch %46
%47 = OpLabel
OpReturn
OpFunctionEnd
%conv_S = OpFunction %S None %68
%val = OpFunctionParameter %S_std140
%71 = OpLabel
%72 = OpCompositeExtract %int %val 0
%73 = OpCompositeExtract %v2half %val 1
%74 = OpCompositeExtract %v2half %val 2
%75 = OpCompositeExtract %v2half %val 3
%76 = OpCompositeConstruct %mat3v2half %73 %74 %75
%77 = OpCompositeExtract %int %val 4
%78 = OpCompositeConstruct %S %72 %76 %77
OpReturnValue %78
OpFunctionEnd
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %79
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
%82 = OpLabel
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
%i_0 = OpVariable %_ptr_Function_uint Function %43
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %96
OpBranch %85
%85 = OpLabel
OpLoopMerge %86 %87 None
OpBranch %88
%88 = OpLabel
%90 = OpLoad %uint %i_0
%91 = OpULessThan %bool %90 %uint_4
%89 = OpLogicalNot %bool %91
OpSelectionMerge %92 None
OpBranchConditional %89 %93 %92
%93 = OpLabel
OpBranch %86
%92 = OpLabel
OpStore %var_for_index_1 %val_0
%97 = OpLoad %uint %i_0
%98 = OpAccessChain %_ptr_Function_S %arr %97
%100 = OpLoad %uint %i_0
%102 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %100
%103 = OpLoad %S_std140 %102
%99 = OpFunctionCall %S %conv_S %103
OpStore %98 %99
OpBranch %87
%87 = OpLabel
%104 = OpLoad %uint %i_0
%105 = OpIAdd %uint %104 %uint_1
OpStore %i_0 %105
OpBranch %85
%86 = OpLabel
%106 = OpLoad %_arr_S_uint_4 %arr
OpReturnValue %106
OpFunctionEnd
%load_u_inner_2_m = OpFunction %mat3v2half None %107
%109 = OpLabel
%112 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
%115 = OpAccessChain %_ptr_Uniform_v2half %112 %uint_1
%116 = OpLoad %v2half %115
%118 = OpAccessChain %_ptr_Uniform_v2half %112 %uint_2
%119 = OpLoad %v2half %118
%122 = OpAccessChain %_ptr_Uniform_v2half %112 %uint_3
%123 = OpLoad %v2half %122
%124 = OpCompositeConstruct %mat3v2half %116 %119 %123
OpReturnValue %124
OpFunctionEnd
%f = OpFunction %void None %125
%127 = OpLabel
%131 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
%132 = OpLoad %_arr_S_std140_uint_4 %131
%129 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %132
%128 = OpFunctionCall %void %assign_and_preserve_padding_s %129
%136 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
%137 = OpLoad %S_std140 %136
%135 = OpFunctionCall %S %conv_S %137
%133 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %134 %135
%139 = OpAccessChain %_ptr_StorageBuffer_mat3v2half %s %uint_0 %int_3 %uint_1
%140 = OpFunctionCall %mat3v2half %load_u_inner_2_m
OpStore %139 %140
%143 = OpAccessChain %_ptr_StorageBuffer_v2half %s %uint_0 %int_1 %uint_1 %26
%144 = OpAccessChain %_ptr_Uniform_v2half %u %uint_0 %43 %uint_2
%145 = OpLoad %v2half %144
%146 = OpVectorShuffle %v2half %145 %145 1 0
OpStore %143 %146
OpReturn
OpFunctionEnd