blob: 4688d0c7c0a8d23ec687e2fb2c5f394ca5ab2a3c [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 90
; 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_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 %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
%v4float = OpTypeVector %float 4
%mat3v4float = OpTypeMatrix %v4float 3
%S = OpTypeStruct %int %mat3v4float %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 %S
%uint_0 = OpConstant %uint 0
%23 = OpConstantNull %int
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%uint_2 = OpConstant %uint 2
%36 = OpTypeFunction %void %_arr_S_uint_4
%40 = OpConstantNull %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
%55 = OpConstantNull %_arr_S_uint_4
%_ptr_Function_S = OpTypePointer Function %S
%65 = OpTypeFunction %void
%_ptr_Uniform__arr_S_uint_4 = OpTypePointer Uniform %_arr_S_uint_4
%73 = OpConstantComposite %_arr_uint_uint_1 %uint_1
%int_2 = OpConstant %int 2
%_ptr_Uniform_S = OpTypePointer Uniform %S
%int_3 = OpConstant %int 3
%_ptr_Uniform_mat3v4float = OpTypePointer Uniform %mat3v4float
%int_1 = OpConstant %int 1
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%assign_and_preserve_padding_1_s_X = OpFunction %void None %14
%dest = OpFunctionParameter %_arr_uint_uint_1
%value = OpFunctionParameter %S
%21 = OpLabel
%24 = OpCompositeExtract %uint %dest 0
%26 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %24 %uint_0
%27 = OpCompositeExtract %int %value 0
OpStore %26 %27
%28 = OpCompositeExtract %uint %dest 0
%30 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %s %uint_0 %28 %uint_1
%31 = OpCompositeExtract %mat3v4float %value 1
OpStore %30 %31
%32 = OpCompositeExtract %uint %dest 0
%34 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %32 %uint_2
%35 = OpCompositeExtract %int %value 2
OpStore %34 %35
OpReturn
OpFunctionEnd
%assign_and_preserve_padding_s = OpFunction %void None %36
%value_0 = OpFunctionParameter %_arr_S_uint_4
%39 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %40
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %55
OpStore %i %40
OpBranch %43
%43 = OpLabel
OpLoopMerge %44 %45 None
OpBranch %46
%46 = OpLabel
%48 = OpLoad %uint %i
%49 = OpULessThan %bool %48 %uint_4
%47 = OpLogicalNot %bool %49
OpSelectionMerge %51 None
OpBranchConditional %47 %52 %51
%52 = OpLabel
OpBranch %44
%51 = OpLabel
OpStore %var_for_index %value_0
%57 = OpLoad %uint %i
%58 = OpCompositeConstruct %_arr_uint_uint_1 %57
%59 = OpLoad %uint %i
%61 = OpAccessChain %_ptr_Function_S %var_for_index %59
%62 = OpLoad %S %61
%56 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %58 %62
OpBranch %45
%45 = OpLabel
%63 = OpLoad %uint %i
%64 = OpIAdd %uint %63 %uint_1
OpStore %i %64
OpBranch %43
%44 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %65
%67 = OpLabel
%70 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
%71 = OpLoad %_arr_S_uint_4 %70
%68 = OpFunctionCall %void %assign_and_preserve_padding_s %71
%76 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
%77 = OpLoad %S %76
%72 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %73 %77
%79 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %s %uint_0 %int_3 %uint_1
%81 = OpAccessChain %_ptr_Uniform_mat3v4float %u %uint_0 %int_2 %uint_1
%82 = OpLoad %mat3v4float %81
OpStore %79 %82
%85 = OpAccessChain %_ptr_StorageBuffer_v4float %s %uint_0 %int_1 %uint_1 %23
%87 = OpAccessChain %_ptr_Uniform_v4float %u %uint_0 %23 %uint_1 %int_1
%88 = OpLoad %v4float %87
%89 = OpVectorShuffle %v4float %88 %88 1 3 0 2
OpStore %85 %89
OpReturn
OpFunctionEnd