blob: 98bacf77bf23f29fcdba914b9e1f84f84479e902 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 74
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f" %local_invocation_index_1
OpExecutionMode %f LocalSize 1 1 1
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %u_block "u_block"
OpMemberName %u_block 0 "inner"
OpName %u "u"
OpName %w "w"
OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory"
OpName %local_idx "local_idx"
OpName %idx "idx"
OpName %f_inner "f_inner"
OpName %local_invocation_index "local_invocation_index"
OpName %f "f"
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpDecorate %u_block Block
OpMemberDecorate %u_block 0 Offset 0
OpMemberDecorate %u_block 0 ColMajor
OpMemberDecorate %u_block 0 MatrixStride 16
OpDecorate %_arr_mat2v4float_uint_4 ArrayStride 32
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%mat2v4float = OpTypeMatrix %v4float 2
%uint_4 = OpConstant %uint 4
%_arr_mat2v4float_uint_4 = OpTypeArray %mat2v4float %uint_4
%u_block = OpTypeStruct %_arr_mat2v4float_uint_4
%_ptr_Uniform_u_block = OpTypePointer Uniform %u_block
%u = OpVariable %_ptr_Uniform_u_block Uniform
%_ptr_Workgroup__arr_mat2v4float_uint_4 = OpTypePointer Workgroup %_arr_mat2v4float_uint_4
%w = OpVariable %_ptr_Workgroup__arr_mat2v4float_uint_4 Workgroup
%void = OpTypeVoid
%14 = OpTypeFunction %void %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Workgroup_mat2v4float = OpTypePointer Workgroup %mat2v4float
%35 = OpConstantNull %mat2v4float
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%uint_0 = OpConstant %uint 0
%_ptr_Uniform__arr_mat2v4float_uint_4 = OpTypePointer Uniform %_arr_mat2v4float_uint_4
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%_ptr_Uniform_mat2v4float = OpTypePointer Uniform %mat2v4float
%57 = OpConstantNull %int
%_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%_ptr_Workgroup_float = OpTypePointer Workgroup %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%69 = OpTypeFunction %void
%tint_zero_workgroup_memory = OpFunction %void None %14
%local_idx = OpFunctionParameter %uint
%18 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %21
OpStore %idx %local_idx
OpBranch %22
%22 = OpLabel
OpLoopMerge %23 %24 None
OpBranch %25
%25 = OpLabel
%27 = OpLoad %uint %idx
%28 = OpULessThan %bool %27 %uint_4
%26 = OpLogicalNot %bool %28
OpSelectionMerge %30 None
OpBranchConditional %26 %31 %30
%31 = OpLabel
OpBranch %23
%30 = OpLabel
%32 = OpLoad %uint %idx
%34 = OpAccessChain %_ptr_Workgroup_mat2v4float %w %32
OpStore %34 %35
OpBranch %24
%24 = OpLabel
%36 = OpLoad %uint %idx
%38 = OpIAdd %uint %36 %uint_1
OpStore %idx %38
OpBranch %22
%23 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%f_inner = OpFunction %void None %14
%local_invocation_index = OpFunctionParameter %uint
%44 = OpLabel
%45 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index
%48 = OpAccessChain %_ptr_Uniform__arr_mat2v4float_uint_4 %u %uint_0
%49 = OpLoad %_arr_mat2v4float_uint_4 %48
OpStore %w %49
%52 = OpAccessChain %_ptr_Workgroup_mat2v4float %w %int_1
%55 = OpAccessChain %_ptr_Uniform_mat2v4float %u %uint_0 %int_2
%56 = OpLoad %mat2v4float %55
OpStore %52 %56
%59 = OpAccessChain %_ptr_Workgroup_v4float %w %int_1 %57
%61 = OpAccessChain %_ptr_Uniform_v4float %u %uint_0 %57 %int_1
%62 = OpLoad %v4float %61
%63 = OpVectorShuffle %v4float %62 %62 1 3 0 2
OpStore %59 %63
%65 = OpAccessChain %_ptr_Workgroup_float %w %int_1 %57 %uint_0
%67 = OpAccessChain %_ptr_Uniform_float %u %uint_0 %57 %int_1 %uint_0
%68 = OpLoad %float %67
OpStore %65 %68
OpReturn
OpFunctionEnd
%f = OpFunction %void None %69
%71 = OpLabel
%73 = OpLoad %uint %local_invocation_index_1
%72 = OpFunctionCall %void %f_inner %73
OpReturn
OpFunctionEnd