blob: e1862bf69e9f8aeff2227bec04289151fa3e777e [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 56
; 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_0 = OpConstant %uint 0
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%19 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%uint_1 = OpConstant %uint 1
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%_ptr_Workgroup_uint_0 = OpTypePointer Workgroup %uint
%uint_264 = OpConstant %uint 264
%42 = OpTypeFunction %void
%tint_zero_workgroup_memory = OpFunction %void None %11
%local_idx = OpFunctionParameter %uint
%15 = OpLabel
%18 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %18 %19
%25 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %25 %uint_2 %uint_0 %6
%27 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_2
OpStore %27 %6
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%compute_main_inner = OpFunction %void None %11
%local_invocation_index_2 = OpFunctionParameter %uint
%32 = OpLabel
%33 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %33 %19
%36 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %36 %uint_2 %uint_0 %6
%37 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_2
OpStore %37 %6
OpControlBarrier %uint_2 %uint_2 %uint_264
%41 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %41 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %42
%44 = OpLabel
%45 = OpLoad %uint %local_invocation_index_1
%46 = OpFunctionCall %void %compute_main_inner %45
OpReturn
OpFunctionEnd
%compute_main_inner_1 = OpFunction %void None %11
%local_invocation_index_1_param = OpFunctionParameter %uint
%49 = OpLabel
%50 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index_1_param
OpStore %local_invocation_index_1 %local_invocation_index_1_param
%51 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %42
%53 = OpLabel
%55 = OpLoad %uint %local_invocation_index_1_param_1
%54 = OpFunctionCall %void %compute_main_inner_1 %55
OpReturn
OpFunctionEnd