blob: 45f680589533f007bcb0a27dd7407d87b1e6a0bb [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 61
; 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 "y"
OpName %wg "wg"
OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory"
OpName %local_idx "local_idx"
OpName %idx "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
OpDecorate %_arr_uint_uint_10 ArrayStride 4
OpMemberDecorate %S 2 Offset 44
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%int = OpTypeInt 32 1
%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
%void = OpTypeVoid
%10 = OpTypeFunction %void %uint
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%23 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%27 = OpConstantNull %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Workgroup_uint_0 = OpTypePointer Workgroup %uint
%uint_264 = OpConstant %uint 264
%int_4 = OpConstant %int 4
%56 = OpTypeFunction %void
%tint_zero_workgroup_memory = OpFunction %void None %10
%local_idx = OpFunctionParameter %uint
%14 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %27
%16 = OpULessThan %bool %local_idx %uint_1
OpSelectionMerge %18 None
OpBranchConditional %16 %19 %18
%19 = OpLabel
%22 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %22 %23
%26 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_2
OpStore %26 %27
OpBranch %18
%18 = OpLabel
OpStore %idx %local_idx
OpBranch %30
%30 = OpLabel
OpLoopMerge %31 %32 None
OpBranch %33
%33 = OpLabel
%35 = OpLoad %uint %idx
%36 = OpULessThan %bool %35 %uint_10
%34 = OpLogicalNot %bool %36
OpSelectionMerge %37 None
OpBranchConditional %34 %38 %37
%38 = OpLabel
OpBranch %31
%37 = OpLabel
%39 = OpLoad %uint %idx
%43 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_1 %39
OpAtomicStore %43 %uint_2 %uint_0 %27
OpBranch %32
%32 = OpLabel
%44 = OpLoad %uint %idx
%45 = OpIAdd %uint %44 %uint_1
OpStore %idx %45
OpBranch %30
%31 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%compute_main_inner = OpFunction %void None %10
%local_invocation_index = OpFunctionParameter %uint
%50 = OpLabel
%51 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index
%55 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_1 %int_4
OpAtomicStore %55 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %56
%58 = OpLabel
%60 = OpLoad %uint %local_invocation_index_1
%59 = OpFunctionCall %void %compute_main_inner %60
OpReturn
OpFunctionEnd