blob: 2689b6351a65f80da97a308ccfa91e54d0c2c455 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %compute_main "compute_main" %local_invocation_index_1
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %S "S"
OpMemberName %S 0 "x"
OpMemberName %S 1 "a"
OpMemberName %S 2 "b"
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 "local_invocation_index"
OpName %compute_main "compute_main"
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 8
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%int = OpTypeInt 32 1
%S = OpTypeStruct %int %uint %uint
%_ptr_Workgroup_S = OpTypePointer Workgroup %S
%wg = OpVariable %_ptr_Workgroup_S Workgroup
%void = OpTypeVoid
%8 = OpTypeFunction %void %uint
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%21 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%27 = OpConstantNull %uint
%uint_264 = OpConstant %uint 264
%43 = OpTypeFunction %void
%tint_zero_workgroup_memory = OpFunction %void None %8
%local_idx = OpFunctionParameter %uint
%12 = OpLabel
%14 = OpULessThan %bool %local_idx %uint_1
OpSelectionMerge %16 None
OpBranchConditional %14 %17 %16
%17 = OpLabel
%20 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %20 %21
%26 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %26 %uint_2 %uint_0 %27
%30 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_2
OpAtomicStore %30 %uint_2 %uint_0 %27
OpBranch %16
%16 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%compute_main_inner = OpFunction %void None %8
%local_invocation_index = OpFunctionParameter %uint
%35 = OpLabel
%36 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index
%39 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1
OpAtomicStore %39 %uint_2 %uint_0 %uint_1
%42 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_2
OpAtomicStore %42 %uint_2 %uint_0 %uint_2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %43
%45 = OpLabel
%47 = OpLoad %uint %local_invocation_index_1
%46 = OpFunctionCall %void %compute_main_inner %47
OpReturn
OpFunctionEnd