blob: 0dbd9644351a7c089fee4ee3ce622e4e2edd5de9 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 58
; 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 %wg "wg"
OpName %compute_main_inner "compute_main_inner"
OpName %local_invocation_index "local_invocation_index"
OpName %idx "idx"
OpName %compute_main "compute_main"
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpDecorate %_arr_uint_uint_1 ArrayStride 4
OpDecorate %_arr__arr_uint_uint_1_uint_2 ArrayStride 4
OpDecorate %_arr__arr__arr_uint_uint_1_uint_2_uint_3 ArrayStride 8
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%uint_1 = OpConstant %uint 1
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
%uint_2 = OpConstant %uint 2
%_arr__arr_uint_uint_1_uint_2 = OpTypeArray %_arr_uint_uint_1 %uint_2
%uint_3 = OpConstant %uint 3
%_arr__arr__arr_uint_uint_1_uint_2_uint_3 = OpTypeArray %_arr__arr_uint_uint_1_uint_2 %uint_3
%_ptr_Workgroup__arr__arr__arr_uint_uint_1_uint_2_uint_3 = OpTypePointer Workgroup %_arr__arr__arr_uint_uint_1_uint_2_uint_3
%wg = OpVariable %_ptr_Workgroup__arr__arr__arr_uint_uint_1_uint_2_uint_3 Workgroup
%void = OpTypeVoid
%12 = OpTypeFunction %void %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%19 = OpConstantNull %uint
%uint_6 = OpConstant %uint 6
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%uint_264 = OpConstant %uint 264
%int = OpTypeInt 32 1
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%51 = OpConstantNull %int
%53 = OpTypeFunction %void
%compute_main_inner = OpFunction %void None %12
%local_invocation_index = OpFunctionParameter %uint
%16 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %19
OpStore %idx %local_invocation_index
OpBranch %20
%20 = OpLabel
OpLoopMerge %21 %22 None
OpBranch %23
%23 = OpLabel
%25 = OpLoad %uint %idx
%27 = OpULessThan %bool %25 %uint_6
%24 = OpLogicalNot %bool %27
OpSelectionMerge %29 None
OpBranchConditional %24 %30 %29
%30 = OpLabel
OpBranch %21
%29 = OpLabel
%31 = OpLoad %uint %idx
%32 = OpUDiv %uint %31 %uint_2
%33 = OpLoad %uint %idx
%34 = OpUMod %uint %33 %uint_2
%35 = OpLoad %uint %idx
%36 = OpUMod %uint %35 %uint_1
%41 = OpAccessChain %_ptr_Workgroup_uint %wg %32 %34 %36
OpAtomicStore %41 %uint_2 %uint_0 %19
OpBranch %22
%22 = OpLabel
%42 = OpLoad %uint %idx
%43 = OpIAdd %uint %42 %uint_1
OpStore %idx %43
OpBranch %20
%21 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%52 = OpAccessChain %_ptr_Workgroup_uint %wg %int_2 %int_1 %51
OpAtomicStore %52 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %53
%55 = OpLabel
%57 = OpLoad %uint %local_invocation_index_1
%56 = OpFunctionCall %void %compute_main_inner %57
OpReturn
OpFunctionEnd