blob: d0b731b01a6a7f52d219ff7e70e3c8038394edbe [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 61
; 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
%int_0 = OpConstant %int 0
%_ptr_Function_int = OpTypePointer Function %int
%28 = OpConstantNull %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 %28
OpStore %i %int_0
%29 = OpLoad %int %i
%31 = OpAccessChain %_ptr_Private_float %v2f %29
OpStore %31 %float_1
%33 = OpLoad %int %i
%35 = OpAccessChain %_ptr_Private_int %v3i %33
OpStore %35 %int_1
%37 = OpLoad %int %i
%39 = OpAccessChain %_ptr_Private_uint %v4u %37
OpStore %39 %uint_1
%41 = OpLoad %int %i
%43 = OpAccessChain %_ptr_Private_bool %v2b %41
OpStore %43 %true
OpReturn
OpFunctionEnd
%main = OpFunction %void None %21
%46 = OpLabel
%i_0 = OpVariable %_ptr_Function_int Function %28
OpStore %i_0 %int_0
OpBranch %48
%48 = OpLabel
OpLoopMerge %49 %50 None
OpBranch %51
%51 = OpLabel
%53 = OpLoad %int %i_0
%55 = OpSLessThan %bool %53 %int_2
%52 = OpLogicalNot %bool %55
OpSelectionMerge %56 None
OpBranchConditional %52 %57 %56
%57 = OpLabel
OpBranch %49
%56 = OpLabel
%58 = OpFunctionCall %void %foo
OpBranch %50
%50 = OpLabel
%59 = OpLoad %int %i_0
%60 = OpIAdd %int %59 %int_1
OpStore %i_0 %60
OpBranch %48
%49 = OpLabel
OpReturn
OpFunctionEnd