blob: af0b5281b03358e3d65c30e850a162cecef202a5 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 74
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %x_GLF_color "x_GLF_color"
OpName %f_ "f_"
OpName %i "i"
OpName %main_1 "main_1"
OpName %c "c"
OpName %i_1 "i_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%8 = OpTypeFunction %float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%14 = OpConstantNull %int
%int_1 = OpConstant %int 1
%int_10 = OpConstant %int 10
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%void = OpTypeVoid
%36 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%float_0 = OpConstant %float 0
%44 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%main_out = OpTypeStruct %v4float
%63 = OpTypeFunction %main_out
%f_ = OpFunction %float None %8
%10 = OpLabel
%i = OpVariable %_ptr_Function_int Function %14
OpStore %i %int_1
OpBranch %16
%16 = OpLabel
OpLoopMerge %17 %18 None
OpBranch %19
%19 = OpLabel
%20 = OpLoad %int %i
%22 = OpSLessThan %bool %20 %int_10
OpSelectionMerge %24 None
OpBranchConditional %22 %25 %26
%25 = OpLabel
OpBranch %24
%26 = OpLabel
OpBranch %17
%24 = OpLabel
%27 = OpLoad %int %i
%28 = OpConvertSToF %float %27
%30 = OpFOrdGreaterThanEqual %bool %28 %float_1
OpSelectionMerge %31 None
OpBranchConditional %30 %32 %33
%32 = OpLabel
OpReturnValue %float_1
%33 = OpLabel
OpBranch %18
%31 = OpLabel
OpBranch %18
%18 = OpLabel
%34 = OpLoad %int %i
%35 = OpIAdd %int %34 %int_1
OpStore %i %35
OpBranch %16
%17 = OpLabel
OpReturnValue %float_1
OpFunctionEnd
%main_1 = OpFunction %void None %36
%39 = OpLabel
%c = OpVariable %_ptr_Function_v4float Function %5
%i_1 = OpVariable %_ptr_Function_int Function %14
OpStore %c %44
OpStore %i_1 %int_0
OpBranch %46
%46 = OpLabel
OpLoopMerge %47 %48 None
OpBranch %49
%49 = OpLabel
%50 = OpLoad %int %i_1
%51 = OpSLessThan %bool %50 %int_1
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %54
%53 = OpLabel
OpBranch %52
%54 = OpLabel
OpBranch %47
%52 = OpLabel
OpBranch %48
%48 = OpLabel
%55 = OpFunctionCall %float %f_
%59 = OpAccessChain %_ptr_Function_float %c %uint_0
OpStore %59 %55
%60 = OpLoad %int %i_1
%61 = OpIAdd %int %60 %int_1
OpStore %i_1 %61
OpBranch %46
%47 = OpLabel
%62 = OpLoad %v4float %c
OpStore %x_GLF_color %62
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %63
%66 = OpLabel
%67 = OpFunctionCall %void %main_1
%68 = OpLoad %v4float %x_GLF_color
%69 = OpCompositeConstruct %main_out %68
OpReturnValue %69
OpFunctionEnd
%main = OpFunction %void None %36
%71 = OpLabel
%72 = OpFunctionCall %main_out %main_inner
%73 = OpCompositeExtract %v4float %72 0
OpStore %x_GLF_color_1_1 %73
OpReturn
OpFunctionEnd