blob: c1ac3f12b7d6ee08e33c37e9af9d1a249edf8c0a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 46
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input
OpExecutionMode %compute_main LocalSize 1 1 1
OpMemberName %S2 0 "x"
OpMemberName %S2 1 "y"
OpMemberName %S2 2 "z"
OpMemberName %S1 0 "x"
OpMemberName %S0 0 "x"
OpMemberName %S0 1 "a"
OpMemberName %S0 2 "y"
OpMemberName %S0 3 "z"
OpName %S0 "S0"
OpMemberName %S1 1 "a"
OpMemberName %S1 2 "y"
OpMemberName %S1 3 "z"
OpName %S1 "S1"
OpMemberName %S2 3 "a"
OpName %S2 "S2"
OpName %wg "wg"
OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input"
OpName %compute_main_inner "compute_main_inner"
OpName %tint_local_index "tint_local_index"
OpName %compute_main "compute_main"
OpMemberDecorate %S2 0 Offset 0
OpMemberDecorate %S2 1 Offset 4
OpMemberDecorate %S2 2 Offset 8
OpMemberDecorate %S1 0 Offset 0
OpMemberDecorate %S0 0 Offset 0
OpMemberDecorate %S0 1 Offset 4
OpMemberDecorate %S0 2 Offset 8
OpMemberDecorate %S0 3 Offset 12
OpMemberDecorate %S1 1 Offset 4
OpMemberDecorate %S1 2 Offset 20
OpMemberDecorate %S1 3 Offset 24
OpMemberDecorate %S2 3 Offset 12
OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%S0 = OpTypeStruct %int %uint %int %int
%S1 = OpTypeStruct %int %S0 %int %int
%S2 = OpTypeStruct %int %int %int %S1
%_ptr_Workgroup_S2 = OpTypePointer Workgroup %S2
%wg = OpVariable %_ptr_Workgroup_S2 Workgroup
%_ptr_Input_uint = OpTypePointer Input %uint
%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input
%void = OpTypeVoid
%13 = OpTypeFunction %void %uint
%uint_0 = OpConstant %uint 0
%bool = OpTypeBool
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%int_0 = OpConstant %int 0
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%uint_264 = OpConstant %uint 264
%42 = OpTypeFunction %void
%compute_main_inner = OpFunction %void None %13
%tint_local_index = OpFunctionParameter %uint
%14 = OpLabel
%15 = OpIEqual %bool %tint_local_index %uint_0
OpSelectionMerge %18 None
OpBranchConditional %15 %19 %18
%19 = OpLabel
%20 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0
OpStore %20 %int_0 None
%23 = OpAccessChain %_ptr_Workgroup_int %wg %uint_1
OpStore %23 %int_0 None
%25 = OpAccessChain %_ptr_Workgroup_int %wg %uint_2
OpStore %25 %int_0 None
%27 = OpAccessChain %_ptr_Workgroup_int %wg %uint_3 %uint_0
OpStore %27 %int_0 None
%29 = OpAccessChain %_ptr_Workgroup_int %wg %uint_3 %uint_1 %uint_0
OpStore %29 %int_0 None
%30 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_3 %uint_1 %uint_1
OpAtomicStore %30 %uint_2 %uint_0 %uint_0
%33 = OpAccessChain %_ptr_Workgroup_int %wg %uint_3 %uint_1 %uint_2
OpStore %33 %int_0 None
%34 = OpAccessChain %_ptr_Workgroup_int %wg %uint_3 %uint_1 %uint_3
OpStore %34 %int_0 None
%35 = OpAccessChain %_ptr_Workgroup_int %wg %uint_3 %uint_2
OpStore %35 %int_0 None
%36 = OpAccessChain %_ptr_Workgroup_int %wg %uint_3 %uint_3
OpStore %36 %int_0 None
OpBranch %18
%18 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%39 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_3 %uint_1 %uint_1
OpAtomicStore %39 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %42
%43 = OpLabel
%44 = OpLoad %uint %compute_main_local_invocation_index_Input None
%45 = OpFunctionCall %void %compute_main_inner %44
OpReturn
OpFunctionEnd