blob: 7a3251b28857bc64f5e39642c8f7dba8e448a7ba [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 66
; 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_std140 "u_block_std140"
OpMemberName %u_block_std140 0 "inner_0"
OpMemberName %u_block_std140 1 "inner_1"
OpName %u "u"
OpName %w "w"
OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory"
OpName %local_idx "local_idx"
OpName %load_u_inner "load_u_inner"
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_std140 Block
OpMemberDecorate %u_block_std140 0 Offset 0
OpMemberDecorate %u_block_std140 1 Offset 8
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
%v2float = OpTypeVector %float 2
%u_block_std140 = OpTypeStruct %v2float %v2float
%_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140
%u = OpVariable %_ptr_Uniform_u_block_std140 Uniform
%mat2v2float = OpTypeMatrix %v2float 2
%_ptr_Workgroup_mat2v2float = OpTypePointer Workgroup %mat2v2float
%w = OpVariable %_ptr_Workgroup_mat2v2float Workgroup
%void = OpTypeVoid
%12 = OpTypeFunction %void %uint
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%22 = OpConstantNull %mat2v2float
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%26 = OpTypeFunction %mat2v2float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Workgroup_v2float = OpTypePointer Workgroup %v2float
%54 = OpConstantNull %int
%_ptr_Workgroup_float = OpTypePointer Workgroup %float
%57 = OpConstantNull %uint
%_ptr_Uniform_float = OpTypePointer Uniform %float
%61 = OpTypeFunction %void
%tint_zero_workgroup_memory = OpFunction %void None %12
%local_idx = OpFunctionParameter %uint
%16 = OpLabel
%18 = OpULessThan %bool %local_idx %uint_1
OpSelectionMerge %20 None
OpBranchConditional %18 %21 %20
%21 = OpLabel
OpStore %w %22
OpBranch %20
%20 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%load_u_inner = OpFunction %mat2v2float None %26
%28 = OpLabel
%33 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0
%34 = OpLoad %v2float %33
%36 = OpAccessChain %_ptr_Uniform_v2float %u %uint_1
%37 = OpLoad %v2float %36
%38 = OpCompositeConstruct %mat2v2float %34 %37
OpReturnValue %38
OpFunctionEnd
%f_inner = OpFunction %void None %12
%local_invocation_index = OpFunctionParameter %uint
%41 = OpLabel
%42 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index
%43 = OpFunctionCall %mat2v2float %load_u_inner
OpStore %w %43
%47 = OpAccessChain %_ptr_Workgroup_v2float %w %int_1
%48 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0
%49 = OpLoad %v2float %48
OpStore %47 %49
%50 = OpAccessChain %_ptr_Workgroup_v2float %w %int_1
%51 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0
%52 = OpLoad %v2float %51
%53 = OpVectorShuffle %v2float %52 %52 1 0
OpStore %50 %53
%56 = OpAccessChain %_ptr_Workgroup_float %w %54 %int_1
%59 = OpAccessChain %_ptr_Uniform_float %u %uint_1 %57
%60 = OpLoad %float %59
OpStore %56 %60
OpReturn
OpFunctionEnd
%f = OpFunction %void None %61
%63 = OpLabel
%65 = OpLoad %uint %local_invocation_index_1
%64 = OpFunctionCall %void %f_inner %65
OpReturn
OpFunctionEnd