blob: f2cdc97c9f2e94b8f6be5f67887c2d13efac9f9d [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %v2f "v2f"
OpName %v3i "v3i"
OpName %v4u "v4u"
OpName %v2b "v2b"
OpName %foo "foo"
OpName %i "i"
OpName %main "main"
OpName %i_0 "i"
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%_ptr_Private_v2float = OpTypePointer Private %v2float
%5 = OpConstantNull %v2float
%v2f = OpVariable %_ptr_Private_v2float Private %5
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
%_ptr_Private_v3int = OpTypePointer Private %v3int
%10 = OpConstantNull %v3int
%v3i = OpVariable %_ptr_Private_v3int Private %10
%uint = OpTypeInt 32 0
%v4uint = OpTypeVector %uint 4
%_ptr_Private_v4uint = OpTypePointer Private %v4uint
%15 = OpConstantNull %v4uint
%v4u = OpVariable %_ptr_Private_v4uint Private %15
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%_ptr_Private_v2bool = OpTypePointer Private %v2bool
%20 = OpConstantNull %v2bool
%v2b = OpVariable %_ptr_Private_v2bool Private %20
%void = OpTypeVoid
%21 = OpTypeFunction %void
%25 = OpConstantNull %int
%_ptr_Function_int = OpTypePointer Function %int
%_ptr_Private_float = OpTypePointer Private %float
%float_1 = OpConstant %float 1
%_ptr_Private_int = OpTypePointer Private %int
%int_1 = OpConstant %int 1
%_ptr_Private_uint = OpTypePointer Private %uint
%uint_1 = OpConstant %uint 1
%_ptr_Private_bool = OpTypePointer Private %bool
%true = OpConstantTrue %bool
%int_2 = OpConstant %int 2
%foo = OpFunction %void None %21
%24 = OpLabel
%i = OpVariable %_ptr_Function_int Function %25
OpStore %i %25
%28 = OpLoad %int %i
%30 = OpAccessChain %_ptr_Private_float %v2f %28
OpStore %30 %float_1
%32 = OpLoad %int %i
%34 = OpAccessChain %_ptr_Private_int %v3i %32
OpStore %34 %int_1
%36 = OpLoad %int %i
%38 = OpAccessChain %_ptr_Private_uint %v4u %36
OpStore %38 %uint_1
%40 = OpLoad %int %i
%42 = OpAccessChain %_ptr_Private_bool %v2b %40
OpStore %42 %true
OpReturn
OpFunctionEnd
%main = OpFunction %void None %21
%45 = OpLabel
%i_0 = OpVariable %_ptr_Function_int Function %25
OpStore %i_0 %25
OpBranch %47
%47 = OpLabel
OpLoopMerge %48 %49 None
OpBranch %50
%50 = OpLabel
%52 = OpLoad %int %i_0
%54 = OpSLessThan %bool %52 %int_2
%51 = OpLogicalNot %bool %54
OpSelectionMerge %55 None
OpBranchConditional %51 %56 %55
%56 = OpLabel
OpBranch %48
%55 = OpLabel
%57 = OpFunctionCall %void %foo
OpBranch %49
%49 = OpLabel
%58 = OpLoad %int %i_0
%59 = OpIAdd %int %58 %int_1
OpStore %i_0 %59
OpBranch %47
%48 = OpLabel
OpReturn
OpFunctionEnd