blob: 25acdc423b3cd1198303d9a033528d2683713c34 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %compute_main "compute_main" %local_invocation_index_1_param_1
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %local_invocation_index_1_param_1 "local_invocation_index_1_param_1"
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %S_atomic "S_atomic"
OpMemberName %S_atomic 0 "x"
OpMemberName %S_atomic 1 "a"
OpMemberName %S_atomic 2 "y"
OpName %wg "wg"
OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory"
OpName %local_idx "local_idx"
OpName %compute_main_inner "compute_main_inner"
OpName %local_invocation_index_2 "local_invocation_index_2"
OpName %compute_main_1 "compute_main_1"
OpName %compute_main_inner_1 "compute_main_inner_1"
OpName %local_invocation_index_1_param "local_invocation_index_1_param"
OpName %compute_main "compute_main"
OpDecorate %local_invocation_index_1_param_1 BuiltIn LocalInvocationIndex
OpMemberDecorate %S_atomic 0 Offset 0
OpMemberDecorate %S_atomic 1 Offset 4
OpMemberDecorate %S_atomic 2 Offset 8
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1_param_1 = OpVariable %_ptr_Input_uint Input
%_ptr_Private_uint = OpTypePointer Private %uint
%6 = OpConstantNull %uint
%local_invocation_index_1 = OpVariable %_ptr_Private_uint Private %6
%int = OpTypeInt 32 1
%S_atomic = OpTypeStruct %int %uint %uint
%_ptr_Workgroup_S_atomic = OpTypePointer Workgroup %S_atomic
%wg = OpVariable %_ptr_Workgroup_S_atomic Workgroup
%void = OpTypeVoid
%11 = OpTypeFunction %void %uint
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%24 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%_ptr_Workgroup_uint_0 = OpTypePointer Workgroup %uint
%uint_264 = OpConstant %uint 264
%46 = OpTypeFunction %void
%tint_zero_workgroup_memory = OpFunction %void None %11
%local_idx = OpFunctionParameter %uint
%15 = OpLabel
%17 = OpULessThan %bool %local_idx %uint_1
OpSelectionMerge %19 None
OpBranchConditional %17 %20 %19
%20 = OpLabel
%23 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %23 %24
%29 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %29 %uint_2 %uint_0 %6
%31 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_2
OpStore %31 %6
OpBranch %19
%19 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%compute_main_inner = OpFunction %void None %11
%local_invocation_index_2 = OpFunctionParameter %uint
%36 = OpLabel
%37 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %37 %24
%40 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %40 %uint_2 %uint_0 %6
%41 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_2
OpStore %41 %6
OpControlBarrier %uint_2 %uint_2 %uint_264
%45 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %45 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %46
%48 = OpLabel
%49 = OpLoad %uint %local_invocation_index_1
%50 = OpFunctionCall %void %compute_main_inner %49
OpReturn
OpFunctionEnd
%compute_main_inner_1 = OpFunction %void None %11
%local_invocation_index_1_param = OpFunctionParameter %uint
%53 = OpLabel
%54 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index_1_param
OpStore %local_invocation_index_1 %local_invocation_index_1_param
%55 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %46
%57 = OpLabel
%59 = OpLoad %uint %local_invocation_index_1_param_1
%58 = OpFunctionCall %void %compute_main_inner_1 %59
OpReturn
OpFunctionEnd