blob: 1bf6c881ffdfa6c07fe51bde7f75df0e3a43c100 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 162
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
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_2_s_X_m "assign_and_preserve_padding_2_s_X_m"
OpName %dest "dest"
OpName %value "value"
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
OpName %dest_0 "dest"
OpName %value_0 "value"
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
OpName %value_1 "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 8
OpMemberDecorate %S_std140 2 Offset 16
OpMemberDecorate %S_std140 3 Offset 24
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 8
OpMemberDecorate %S 1 ColMajor
OpMemberDecorate %S 1 MatrixStride 8
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
%v3half = OpTypeVector %half 3
%S_std140 = OpTypeStruct %int %v3half %v3half %v3half %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
%mat3v3half = OpTypeMatrix %v3half 3
%S = OpTypeStruct %int %mat3v3half %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 %mat3v3half
%uint_0 = OpConstant %uint 0
%26 = OpConstantNull %int
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
%30 = OpConstantNull %uint
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%uint_2 = OpConstant %uint 2
%41 = OpTypeFunction %void %_arr_uint_uint_1 %S
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%57 = OpTypeFunction %void %_arr_S_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
%75 = OpConstantNull %_arr_S_uint_4
%_ptr_Function_S = OpTypePointer Function %S
%85 = OpTypeFunction %S %S_std140
%96 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
%_ptr_Function__arr_S_std140_uint_4 = OpTypePointer Function %_arr_S_std140_uint_4
%113 = OpConstantNull %_arr_S_std140_uint_4
%_ptr_Function_S_std140 = OpTypePointer Function %S_std140
%124 = OpTypeFunction %mat3v3half
%_ptr_Uniform_S_std140 = OpTypePointer Uniform %S_std140
%_ptr_Uniform_v3half = OpTypePointer Uniform %v3half
%uint_3 = OpConstant %uint 3
%142 = OpTypeFunction %void
%_ptr_Uniform__arr_S_std140_uint_4 = OpTypePointer Uniform %_arr_S_std140_uint_4
%151 = OpConstantComposite %_arr_uint_uint_1 %uint_1
%156 = OpConstantComposite %_arr_uint_uint_1 %uint_3
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %17
%dest = OpFunctionParameter %_arr_uint_uint_1
%value = OpFunctionParameter %mat3v3half
%24 = OpLabel
%27 = OpCompositeExtract %uint %dest 0
%29 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %27 %uint_1 %26
%31 = OpCompositeExtract %v3half %value 0
OpStore %29 %31
%32 = OpCompositeExtract %uint %dest 0
%34 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %32 %uint_1 %int_1
%35 = OpCompositeExtract %v3half %value 1
OpStore %34 %35
%36 = OpCompositeExtract %uint %dest 0
%38 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %36 %uint_1 %int_2
%40 = OpCompositeExtract %v3half %value 2
OpStore %38 %40
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_1_s_X = OpFunction %void None %41
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
%value_0 = OpFunctionParameter %S
%45 = OpLabel
%46 = OpCompositeExtract %uint %dest_0 0
%48 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %46 %uint_0
%49 = OpCompositeExtract %int %value_0 0
OpStore %48 %49
%51 = OpCompositeExtract %uint %dest_0 0
%52 = OpCompositeConstruct %_arr_uint_uint_1 %51
%53 = OpCompositeExtract %mat3v3half %value_0 1
%50 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %52 %53
%54 = OpCompositeExtract %uint %dest_0 0
%55 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %54 %uint_2
%56 = OpCompositeExtract %int %value_0 2
OpStore %55 %56
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_s = OpFunction %void None %57
%value_1 = OpFunctionParameter %_arr_S_uint_4
%60 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %30
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %75
OpStore %i %30
OpBranch %63
%63 = OpLabel
OpLoopMerge %64 %65 None
OpBranch %66
%66 = OpLabel
%68 = OpLoad %uint %i
%69 = OpULessThan %bool %68 %uint_4
%67 = OpLogicalNot %bool %69
OpSelectionMerge %71 None
OpBranchConditional %67 %72 %71
%72 = OpLabel
OpBranch %64
%71 = OpLabel
OpStore %var_for_index %value_1
%77 = OpLoad %uint %i
%78 = OpCompositeConstruct %_arr_uint_uint_1 %77
%79 = OpLoad %uint %i
%81 = OpAccessChain %_ptr_Function_S %var_for_index %79
%82 = OpLoad %S %81
%76 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %78 %82
OpBranch %65
%65 = OpLabel
%83 = OpLoad %uint %i
%84 = OpIAdd %uint %83 %uint_1
OpStore %i %84
OpBranch %63
%64 = OpLabel
OpReturn
OpFunctionEnd
%conv_S = OpFunction %S None %85
%val = OpFunctionParameter %S_std140
%88 = OpLabel
%89 = OpCompositeExtract %int %val 0
%90 = OpCompositeExtract %v3half %val 1
%91 = OpCompositeExtract %v3half %val 2
%92 = OpCompositeExtract %v3half %val 3
%93 = OpCompositeConstruct %mat3v3half %90 %91 %92
%94 = OpCompositeExtract %int %val 4
%95 = OpCompositeConstruct %S %89 %93 %94
OpReturnValue %95
OpFunctionEnd
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %96
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
%99 = OpLabel
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %75
%i_0 = OpVariable %_ptr_Function_uint Function %30
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %113
OpBranch %102
%102 = OpLabel
OpLoopMerge %103 %104 None
OpBranch %105
%105 = OpLabel
%107 = OpLoad %uint %i_0
%108 = OpULessThan %bool %107 %uint_4
%106 = OpLogicalNot %bool %108
OpSelectionMerge %109 None
OpBranchConditional %106 %110 %109
%110 = OpLabel
OpBranch %103
%109 = OpLabel
OpStore %var_for_index_1 %val_0
%114 = OpLoad %uint %i_0
%115 = OpAccessChain %_ptr_Function_S %arr %114
%117 = OpLoad %uint %i_0
%119 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %117
%120 = OpLoad %S_std140 %119
%116 = OpFunctionCall %S %conv_S %120
OpStore %115 %116
OpBranch %104
%104 = OpLabel
%121 = OpLoad %uint %i_0
%122 = OpIAdd %uint %121 %uint_1
OpStore %i_0 %122
OpBranch %102
%103 = OpLabel
%123 = OpLoad %_arr_S_uint_4 %arr
OpReturnValue %123
OpFunctionEnd
%load_u_inner_2_m = OpFunction %mat3v3half None %124
%126 = OpLabel
%129 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
%132 = OpAccessChain %_ptr_Uniform_v3half %129 %uint_1
%133 = OpLoad %v3half %132
%135 = OpAccessChain %_ptr_Uniform_v3half %129 %uint_2
%136 = OpLoad %v3half %135
%139 = OpAccessChain %_ptr_Uniform_v3half %129 %uint_3
%140 = OpLoad %v3half %139
%141 = OpCompositeConstruct %mat3v3half %133 %136 %140
OpReturnValue %141
OpFunctionEnd
%f = OpFunction %void None %142
%144 = OpLabel
%148 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
%149 = OpLoad %_arr_S_std140_uint_4 %148
%146 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %149
%145 = OpFunctionCall %void %assign_and_preserve_padding_s %146
%153 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
%154 = OpLoad %S_std140 %153
%152 = OpFunctionCall %S %conv_S %154
%150 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %151 %152
%157 = OpFunctionCall %mat3v3half %load_u_inner_2_m
%155 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %156 %157
%158 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1 %uint_1 %26
%159 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0 %30 %uint_2
%160 = OpLoad %v3half %159
%161 = OpVectorShuffle %v3half %160 %160 2 0 1
OpStore %158 %161
OpReturn
OpFunctionEnd