blob: 0835ddb5c5d765380947c55f214c130f3405225a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 102
; 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
%mat2v3float = OpTypeMatrix %v3float 2
%S = OpTypeStruct %int %mat2v3float %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 %mat2v3float
%uint_0 = OpConstant %uint 0
%23 = OpConstantNull %int
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%27 = OpConstantNull %uint
%int_1 = OpConstant %int 1
%33 = OpTypeFunction %void %_arr_uint_uint_1 %S
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%uint_2 = OpConstant %uint 2
%50 = 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
%68 = OpConstantNull %_arr_S_uint_4
%_ptr_Function_S = OpTypePointer Function %S
%78 = OpTypeFunction %void
%_ptr_Uniform__arr_S_uint_4 = OpTypePointer Uniform %_arr_S_uint_4
%86 = OpConstantComposite %_arr_uint_uint_1 %uint_1
%int_2 = OpConstant %int 2
%_ptr_Uniform_S = OpTypePointer Uniform %S
%uint_3 = OpConstant %uint 3
%93 = OpConstantComposite %_arr_uint_uint_1 %uint_3
%_ptr_Uniform_mat2v3float = OpTypePointer Uniform %mat2v3float
%_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 %mat2v3float
%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
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_1_s_X = OpFunction %void None %33
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
%value_0 = OpFunctionParameter %S
%37 = OpLabel
%38 = OpCompositeExtract %uint %dest_0 0
%40 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %38 %uint_0
%41 = OpCompositeExtract %int %value_0 0
OpStore %40 %41
%43 = OpCompositeExtract %uint %dest_0 0
%44 = OpCompositeConstruct %_arr_uint_uint_1 %43
%45 = OpCompositeExtract %mat2v3float %value_0 1
%42 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %44 %45
%46 = OpCompositeExtract %uint %dest_0 0
%48 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %46 %uint_2
%49 = OpCompositeExtract %int %value_0 2
OpStore %48 %49
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_s = OpFunction %void None %50
%value_1 = OpFunctionParameter %_arr_S_uint_4
%53 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %27
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %68
OpStore %i %27
OpBranch %56
%56 = OpLabel
OpLoopMerge %57 %58 None
OpBranch %59
%59 = OpLabel
%61 = OpLoad %uint %i
%62 = OpULessThan %bool %61 %uint_4
%60 = OpLogicalNot %bool %62
OpSelectionMerge %64 None
OpBranchConditional %60 %65 %64
%65 = OpLabel
OpBranch %57
%64 = OpLabel
OpStore %var_for_index %value_1
%70 = OpLoad %uint %i
%71 = OpCompositeConstruct %_arr_uint_uint_1 %70
%72 = OpLoad %uint %i
%74 = OpAccessChain %_ptr_Function_S %var_for_index %72
%75 = OpLoad %S %74
%69 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %71 %75
OpBranch %58
%58 = OpLabel
%76 = OpLoad %uint %i
%77 = OpIAdd %uint %76 %uint_1
OpStore %i %77
OpBranch %56
%57 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %78
%80 = OpLabel
%83 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
%84 = OpLoad %_arr_S_uint_4 %83
%81 = OpFunctionCall %void %assign_and_preserve_padding_s %84
%89 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
%90 = OpLoad %S %89
%85 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %86 %90
%95 = OpAccessChain %_ptr_Uniform_mat2v3float %u %uint_0 %int_2 %uint_1
%96 = OpLoad %mat2v3float %95
%91 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %93 %96
%97 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
%99 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
%100 = OpLoad %v3float %99
%101 = OpVectorShuffle %v3float %100 %100 2 0 1
OpStore %97 %101
OpReturn
OpFunctionEnd