blob: 61ef2143e3ff2ae27ed3ef54b7e4e2de22f8bb32 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 53
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %local_invocation_index_1
OpExecutionMode %main LocalSize 1 1 1
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %str "str"
OpMemberName %str 0 "i"
OpName %S "S"
OpName %func_S_X "func_S_X"
OpName %pointer "pointer"
OpName %main_inner "main_inner"
OpName %local_invocation_index "local_invocation_index"
OpName %idx "idx"
OpName %main "main"
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpMemberDecorate %str 0 Offset 0
OpDecorate %_arr_str_uint_4 ArrayStride 4
OpDecorate %_arr_uint_uint_1 ArrayStride 4
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%int = OpTypeInt 32 1
%str = OpTypeStruct %int
%uint_4 = OpConstant %uint 4
%_arr_str_uint_4 = OpTypeArray %str %uint_4
%_ptr_Workgroup__arr_str_uint_4 = OpTypePointer Workgroup %_arr_str_uint_4
%S = OpVariable %_ptr_Workgroup__arr_str_uint_4 Workgroup
%void = OpTypeVoid
%uint_1 = OpConstant %uint 1
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
%10 = OpTypeFunction %void %_arr_uint_uint_1
%17 = OpConstantNull %int
%_ptr_Workgroup_str = OpTypePointer Workgroup %str
%21 = OpConstantNull %str
%22 = OpTypeFunction %void %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%28 = OpConstantNull %uint
%bool = OpTypeBool
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%47 = OpConstantComposite %_arr_uint_uint_1 %uint_2
%48 = OpTypeFunction %void
%func_S_X = OpFunction %void None %10
%pointer = OpFunctionParameter %_arr_uint_uint_1
%16 = OpLabel
%18 = OpCompositeExtract %uint %pointer 0
%20 = OpAccessChain %_ptr_Workgroup_str %S %18
OpStore %20 %21
OpReturn
OpFunctionEnd
%main_inner = OpFunction %void None %22
%local_invocation_index = OpFunctionParameter %uint
%25 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %28
OpStore %idx %local_invocation_index
OpBranch %29
%29 = OpLabel
OpLoopMerge %30 %31 None
OpBranch %32
%32 = OpLabel
%34 = OpLoad %uint %idx
%35 = OpULessThan %bool %34 %uint_4
%33 = OpLogicalNot %bool %35
OpSelectionMerge %37 None
OpBranchConditional %33 %38 %37
%38 = OpLabel
OpBranch %30
%37 = OpLabel
%39 = OpLoad %uint %idx
%40 = OpAccessChain %_ptr_Workgroup_str %S %39
OpStore %40 %21
OpBranch %31
%31 = OpLabel
%41 = OpLoad %uint %idx
%42 = OpIAdd %uint %41 %uint_1
OpStore %idx %42
OpBranch %29
%30 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%46 = OpFunctionCall %void %func_S_X %47
OpReturn
OpFunctionEnd
%main = OpFunction %void None %48
%50 = OpLabel
%52 = OpLoad %uint %local_invocation_index_1
%51 = OpFunctionCall %void %main_inner %52
OpReturn
OpFunctionEnd