blob: ac4af127b61ad6fbc4bfeedb1dd493574672ca5d [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 109
; 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 128
OpDecorate %_arr_S_uint_4 ArrayStride 192
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
%mat4v3float = OpTypeMatrix %v3float 4
%S = OpTypeStruct %int %mat4v3float %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 %mat4v3float
%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
%int_3 = OpConstant %int 3
%uint_3 = OpConstant %uint 3
%43 = OpTypeFunction %void %_arr_uint_uint_1 %S
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%59 = 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
%77 = OpConstantNull %_arr_S_uint_4
%_ptr_Function_S = OpTypePointer Function %S
%87 = OpTypeFunction %void
%_ptr_Uniform__arr_S_uint_4 = OpTypePointer Uniform %_arr_S_uint_4
%95 = OpConstantComposite %_arr_uint_uint_1 %uint_1
%_ptr_Uniform_S = OpTypePointer Uniform %S
%100 = OpConstantComposite %_arr_uint_uint_1 %uint_3
%_ptr_Uniform_mat4v3float = OpTypePointer Uniform %mat4v3float
%_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 %mat4v3float
%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
%38 = OpCompositeExtract %uint %dest 0
%40 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %38 %uint_1 %int_3
%42 = OpCompositeExtract %v3float %value 3
OpStore %40 %42
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_1_s_X = OpFunction %void None %43
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
%value_0 = OpFunctionParameter %S
%47 = OpLabel
%48 = OpCompositeExtract %uint %dest_0 0
%50 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %48 %uint_0
%51 = OpCompositeExtract %int %value_0 0
OpStore %50 %51
%53 = OpCompositeExtract %uint %dest_0 0
%54 = OpCompositeConstruct %_arr_uint_uint_1 %53
%55 = OpCompositeExtract %mat4v3float %value_0 1
%52 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %54 %55
%56 = OpCompositeExtract %uint %dest_0 0
%57 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %56 %uint_2
%58 = OpCompositeExtract %int %value_0 2
OpStore %57 %58
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_s = OpFunction %void None %59
%value_1 = OpFunctionParameter %_arr_S_uint_4
%62 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %27
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %77
OpStore %i %27
OpBranch %65
%65 = OpLabel
OpLoopMerge %66 %67 None
OpBranch %68
%68 = OpLabel
%70 = OpLoad %uint %i
%71 = OpULessThan %bool %70 %uint_4
%69 = OpLogicalNot %bool %71
OpSelectionMerge %73 None
OpBranchConditional %69 %74 %73
%74 = OpLabel
OpBranch %66
%73 = OpLabel
OpStore %var_for_index %value_1
%79 = OpLoad %uint %i
%80 = OpCompositeConstruct %_arr_uint_uint_1 %79
%81 = OpLoad %uint %i
%83 = OpAccessChain %_ptr_Function_S %var_for_index %81
%84 = OpLoad %S %83
%78 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %80 %84
OpBranch %67
%67 = OpLabel
%85 = OpLoad %uint %i
%86 = OpIAdd %uint %85 %uint_1
OpStore %i %86
OpBranch %65
%66 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %87
%89 = OpLabel
%92 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
%93 = OpLoad %_arr_S_uint_4 %92
%90 = OpFunctionCall %void %assign_and_preserve_padding_s %93
%97 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
%98 = OpLoad %S %97
%94 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %95 %98
%102 = OpAccessChain %_ptr_Uniform_mat4v3float %u %uint_0 %int_2 %uint_1
%103 = OpLoad %mat4v3float %102
%99 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %100 %103
%104 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
%106 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
%107 = OpLoad %v3float %106
%108 = OpVectorShuffle %v3float %107 %107 2 0 1
OpStore %104 %108
OpReturn
OpFunctionEnd