blob: db937a5a06ea344936177fcc95d1d40e32b542f1 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 47
; 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"
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 8
OpDecorate %_arr_S_uint_10 ArrayStride 12
OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%S = OpTypeStruct %int %uint %uint
%uint_10 = OpConstant %uint 10
%_arr_S_uint_10 = OpTypeArray %S %uint_10
%_ptr_Workgroup__arr_S_uint_10 = OpTypePointer Workgroup %_arr_S_uint_10
%wg = OpVariable %_ptr_Workgroup__arr_S_uint_10 Workgroup
%_ptr_Input_uint = OpTypePointer Input %uint
%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input
%void = OpTypeVoid
%13 = OpTypeFunction %void %uint
%bool = OpTypeBool
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%_ptr_Workgroup_uint_0 = OpTypePointer Workgroup %uint
%uint_264 = OpConstant %uint 264
%int_4 = OpConstant %int 4
%43 = OpTypeFunction %void
%compute_main_inner = OpFunction %void None %13
%tint_local_index = OpFunctionParameter %uint
%14 = OpLabel
OpBranch %15
%15 = OpLabel
OpBranch %18
%18 = OpLabel
%20 = OpPhi %uint %tint_local_index %15 %21 %17
OpLoopMerge %19 %17 None
OpBranch %16
%16 = OpLabel
%22 = OpUGreaterThanEqual %bool %20 %uint_10
OpSelectionMerge %24 None
OpBranchConditional %22 %25 %24
%25 = OpLabel
OpBranch %19
%24 = OpLabel
%26 = OpAccessChain %_ptr_Workgroup_int %wg %20 %uint_0
OpStore %26 %int_0 None
%30 = OpAccessChain %_ptr_Workgroup_uint %wg %20 %uint_1
OpAtomicStore %30 %uint_2 %uint_0 %uint_0
%35 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %20 %uint_2
OpStore %35 %uint_0 None
OpBranch %17
%17 = OpLabel
%21 = OpIAdd %uint %20 %uint_1
OpBranch %18
%19 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%39 = OpAccessChain %_ptr_Workgroup_uint %wg %int_4 %uint_1
OpAtomicStore %39 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %43
%44 = OpLabel
%45 = OpLoad %uint %compute_main_local_invocation_index_Input None
%46 = OpFunctionCall %void %compute_main_inner %45
OpReturn
OpFunctionEnd