blob: 8bb89eaf9f5d9425bfc1bd0257cb059612b36277 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input
OpExecutionMode %compute_main LocalSize 1 1 1
OpMemberName %S 0 "x"
OpMemberName %S 1 "a"
OpMemberName %S 2 "y"
OpName %S "S"
OpName %wg "wg"
OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input"
OpName %compute_main_inner "compute_main_inner"
OpName %tint_local_index "tint_local_index"
OpName %compute_main "compute_main"
OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%_arr_uint_uint_10 = OpTypeArray %uint %uint_10
%S = OpTypeStruct %int %_arr_uint_uint_10 %uint
%_ptr_Workgroup_S = OpTypePointer Workgroup %S
%wg = OpVariable %_ptr_Workgroup_S Workgroup
%_ptr_Input_uint = OpTypePointer Input %uint
%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input
%void = OpTypeVoid
%13 = OpTypeFunction %void %uint
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%uint_4 = OpConstant %uint 4
%uint_0 = OpConstant %uint 0
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%int_0 = OpConstant %int 0
%_ptr_Workgroup_uint_0 = OpTypePointer Workgroup %uint
%46 = OpTypeFunction %void
%compute_main_inner = OpFunction %void None %13
%tint_local_index = OpFunctionParameter %uint
%14 = OpLabel
%15 = OpULessThan %bool %tint_local_index %uint_1
OpSelectionMerge %18 None
OpBranchConditional %15 %19 %18
%19 = OpLabel
%35 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %35 %int_0 None
%38 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_2
OpStore %38 %uint_0 None
OpBranch %18
%18 = OpLabel
OpBranch %20
%20 = OpLabel
OpBranch %23
%23 = OpLabel
%25 = OpPhi %uint %tint_local_index %20 %26 %22
OpLoopMerge %24 %22 None
OpBranch %21
%21 = OpLabel
%40 = OpUGreaterThanEqual %bool %25 %uint_10
OpSelectionMerge %41 None
OpBranchConditional %40 %42 %41
%42 = OpLabel
OpBranch %24
%41 = OpLabel
%43 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1 %25
OpAtomicStore %43 %uint_2 %uint_0 %uint_0
OpBranch %22
%22 = OpLabel
%26 = OpIAdd %uint %25 %uint_1
OpBranch %23
%24 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%30 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1 %uint_4
OpAtomicStore %30 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %46
%47 = OpLabel
%48 = OpLoad %uint %compute_main_local_invocation_index_Input None
%49 = OpFunctionCall %void %compute_main_inner %48
OpReturn
OpFunctionEnd