blob: d6116a23663201500cc23057f04a9e71569025a3 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 105
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
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 %u "u"
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 %f "f"
OpDecorate %u_block Block
OpMemberDecorate %u_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 16
OpMemberDecorate %S 1 ColMajor
OpMemberDecorate %S 1 MatrixStride 16
OpMemberDecorate %S 2 Offset 64
OpDecorate %_arr_S_uint_4 ArrayStride 128
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
OpDecorate %_arr_uint_uint_1 ArrayStride 4
%int = OpTypeInt 32 1
%float = OpTypeFloat 32
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%S = OpTypeStruct %int %mat3v3float %int
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_S_uint_4 = OpTypeArray %S %uint_4
%u_block = OpTypeStruct %_arr_S_uint_4
%_ptr_Uniform_u_block = OpTypePointer Uniform %u_block
%u = OpVariable %_ptr_Uniform_u_block Uniform
%_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
%14 = OpTypeFunction %void %_arr_uint_uint_1 %mat3v3float
%uint_0 = OpConstant %uint 0
%23 = OpConstantNull %int
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%27 = OpConstantNull %uint
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%uint_2 = OpConstant %uint 2
%38 = OpTypeFunction %void %_arr_uint_uint_1 %S
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%54 = 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
%72 = OpConstantNull %_arr_S_uint_4
%_ptr_Function_S = OpTypePointer Function %S
%82 = OpTypeFunction %void
%_ptr_Uniform__arr_S_uint_4 = OpTypePointer Uniform %_arr_S_uint_4
%90 = OpConstantComposite %_arr_uint_uint_1 %uint_1
%_ptr_Uniform_S = OpTypePointer Uniform %S
%uint_3 = OpConstant %uint 3
%96 = OpConstantComposite %_arr_uint_uint_1 %uint_3
%_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %14
%dest = OpFunctionParameter %_arr_uint_uint_1
%value = OpFunctionParameter %mat3v3float
%21 = OpLabel
%24 = OpCompositeExtract %uint %dest 0
%26 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %24 %uint_1 %23
%28 = OpCompositeExtract %v3float %value 0
OpStore %26 %28
%29 = OpCompositeExtract %uint %dest 0
%31 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %29 %uint_1 %int_1
%32 = OpCompositeExtract %v3float %value 1
OpStore %31 %32
%33 = OpCompositeExtract %uint %dest 0
%35 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %33 %uint_1 %int_2
%37 = OpCompositeExtract %v3float %value 2
OpStore %35 %37
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_1_s_X = OpFunction %void None %38
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
%value_0 = OpFunctionParameter %S
%42 = OpLabel
%43 = OpCompositeExtract %uint %dest_0 0
%45 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %43 %uint_0
%46 = OpCompositeExtract %int %value_0 0
OpStore %45 %46
%48 = OpCompositeExtract %uint %dest_0 0
%49 = OpCompositeConstruct %_arr_uint_uint_1 %48
%50 = OpCompositeExtract %mat3v3float %value_0 1
%47 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %49 %50
%51 = OpCompositeExtract %uint %dest_0 0
%52 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %51 %uint_2
%53 = OpCompositeExtract %int %value_0 2
OpStore %52 %53
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_s = OpFunction %void None %54
%value_1 = OpFunctionParameter %_arr_S_uint_4
%57 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %27
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %72
OpStore %i %27
OpBranch %60
%60 = OpLabel
OpLoopMerge %61 %62 None
OpBranch %63
%63 = OpLabel
%65 = OpLoad %uint %i
%66 = OpULessThan %bool %65 %uint_4
%64 = OpLogicalNot %bool %66
OpSelectionMerge %68 None
OpBranchConditional %64 %69 %68
%69 = OpLabel
OpBranch %61
%68 = OpLabel
OpStore %var_for_index %value_1
%74 = OpLoad %uint %i
%75 = OpCompositeConstruct %_arr_uint_uint_1 %74
%76 = OpLoad %uint %i
%78 = OpAccessChain %_ptr_Function_S %var_for_index %76
%79 = OpLoad %S %78
%73 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %75 %79
OpBranch %62
%62 = OpLabel
%80 = OpLoad %uint %i
%81 = OpIAdd %uint %80 %uint_1
OpStore %i %81
OpBranch %60
%61 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %82
%84 = OpLabel
%87 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
%88 = OpLoad %_arr_S_uint_4 %87
%85 = OpFunctionCall %void %assign_and_preserve_padding_s %88
%92 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
%93 = OpLoad %S %92
%89 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %90 %93
%98 = OpAccessChain %_ptr_Uniform_mat3v3float %u %uint_0 %int_2 %uint_1
%99 = OpLoad %mat3v3float %98
%94 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %96 %99
%100 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
%102 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
%103 = OpLoad %v3float %102
%104 = OpVectorShuffle %v3float %103 %103 2 0 1
OpStore %100 %104
OpReturn
OpFunctionEnd