blob: 77824a8a66b5528cdd8100782567aa7825d67133 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 83
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main1 "main1" %local_invocation_index_3
OpEntryPoint GLCompute %main2 "main2" %local_invocation_index_1_1
OpEntryPoint GLCompute %main3 "main3" %local_invocation_index_2_1
OpEntryPoint GLCompute %main4 "main4"
OpExecutionMode %main1 LocalSize 1 1 1
OpExecutionMode %main2 LocalSize 1 1 1
OpExecutionMode %main3 LocalSize 1 1 1
OpExecutionMode %main4 LocalSize 1 1 1
OpName %local_invocation_index_3 "local_invocation_index_3"
OpName %local_invocation_index_1_1 "local_invocation_index_1_1"
OpName %local_invocation_index_2_1 "local_invocation_index_2_1"
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory"
OpName %local_idx "local_idx"
OpName %tint_zero_workgroup_memory_1 "tint_zero_workgroup_memory_1"
OpName %local_idx_1 "local_idx_1"
OpName %tint_zero_workgroup_memory_2 "tint_zero_workgroup_memory_2"
OpName %local_idx_2 "local_idx_2"
OpName %uses_a "uses_a"
OpName %uses_b "uses_b"
OpName %uses_a_and_b "uses_a_and_b"
OpName %no_uses "no_uses"
OpName %outer "outer"
OpName %main1_inner "main1_inner"
OpName %local_invocation_index "local_invocation_index"
OpName %main1 "main1"
OpName %main2_inner "main2_inner"
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %main2 "main2"
OpName %main3_inner "main3_inner"
OpName %local_invocation_index_2 "local_invocation_index_2"
OpName %main3 "main3"
OpName %main4 "main4"
OpDecorate %local_invocation_index_3 BuiltIn LocalInvocationIndex
OpDecorate %local_invocation_index_1_1 BuiltIn LocalInvocationIndex
OpDecorate %local_invocation_index_2_1 BuiltIn LocalInvocationIndex
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_3 = OpVariable %_ptr_Input_uint Input
%local_invocation_index_1_1 = OpVariable %_ptr_Input_uint Input
%local_invocation_index_2_1 = OpVariable %_ptr_Input_uint Input
%int = OpTypeInt 32 1
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%a = OpVariable %_ptr_Workgroup_int Workgroup
%b = OpVariable %_ptr_Workgroup_int Workgroup
%c = OpVariable %_ptr_Workgroup_int Workgroup
%void = OpTypeVoid
%11 = OpTypeFunction %void %uint
%16 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%28 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%int_42 = OpConstant %int 42
%int_7 = OpConstant %int 7
%tint_zero_workgroup_memory = OpFunction %void None %11
%local_idx = OpFunctionParameter %uint
%15 = OpLabel
OpStore %a %16
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%tint_zero_workgroup_memory_1 = OpFunction %void None %11
%local_idx_1 = OpFunctionParameter %uint
%22 = OpLabel
OpStore %b %16
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%tint_zero_workgroup_memory_2 = OpFunction %void None %11
%local_idx_2 = OpFunctionParameter %uint
%26 = OpLabel
OpStore %a %16
OpStore %b %16
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%uses_a = OpFunction %void None %28
%30 = OpLabel
%31 = OpLoad %int %a
%33 = OpIAdd %int %31 %int_1
OpStore %a %33
OpReturn
OpFunctionEnd
%uses_b = OpFunction %void None %28
%35 = OpLabel
%36 = OpLoad %int %b
%38 = OpIMul %int %36 %int_2
OpStore %b %38
OpReturn
OpFunctionEnd
%uses_a_and_b = OpFunction %void None %28
%40 = OpLabel
%41 = OpLoad %int %a
OpStore %b %41
OpReturn
OpFunctionEnd
%no_uses = OpFunction %void None %28
%43 = OpLabel
OpReturn
OpFunctionEnd
%outer = OpFunction %void None %28
%45 = OpLabel
OpStore %a %16
%46 = OpFunctionCall %void %uses_a
%47 = OpFunctionCall %void %uses_a_and_b
%48 = OpFunctionCall %void %uses_b
%49 = OpFunctionCall %void %no_uses
OpReturn
OpFunctionEnd
%main1_inner = OpFunction %void None %11
%local_invocation_index = OpFunctionParameter %uint
%52 = OpLabel
%53 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index
OpStore %a %int_42
%55 = OpFunctionCall %void %uses_a
OpReturn
OpFunctionEnd
%main1 = OpFunction %void None %28
%57 = OpLabel
%59 = OpLoad %uint %local_invocation_index_3
%58 = OpFunctionCall %void %main1_inner %59
OpReturn
OpFunctionEnd
%main2_inner = OpFunction %void None %11
%local_invocation_index_1 = OpFunctionParameter %uint
%62 = OpLabel
%63 = OpFunctionCall %void %tint_zero_workgroup_memory_1 %local_invocation_index_1
OpStore %b %int_7
%65 = OpFunctionCall %void %uses_b
OpReturn
OpFunctionEnd
%main2 = OpFunction %void None %28
%67 = OpLabel
%69 = OpLoad %uint %local_invocation_index_1_1
%68 = OpFunctionCall %void %main2_inner %69
OpReturn
OpFunctionEnd
%main3_inner = OpFunction %void None %11
%local_invocation_index_2 = OpFunctionParameter %uint
%72 = OpLabel
%73 = OpFunctionCall %void %tint_zero_workgroup_memory_2 %local_invocation_index_2
%74 = OpFunctionCall %void %outer
%75 = OpFunctionCall %void %no_uses
OpReturn
OpFunctionEnd
%main3 = OpFunction %void None %28
%77 = OpLabel
%79 = OpLoad %uint %local_invocation_index_2_1
%78 = OpFunctionCall %void %main3_inner %79
OpReturn
OpFunctionEnd
%main4 = OpFunction %void None %28
%81 = OpLabel
%82 = OpFunctionCall %void %no_uses
OpReturn
OpFunctionEnd