blob: fae65db58d045817bd178a1f044c5415a23c3ed9 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 78
; 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 %iteration "iteration"
OpName %k "k"
OpName %main_1 "main_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
%v3float = OpTypeVector %float 3
%8 = OpTypeFunction %v3float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%15 = OpConstantNull %int
%int_0 = OpConstant %int 0
%int_100 = OpConstant %int 100
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%56 = OpConstantComposite %v3float %float_1 %float_0 %float_0
%57 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%void = OpTypeVoid
%58 = OpTypeFunction %void
%main_out = OpTypeStruct %v4float
%67 = OpTypeFunction %main_out
%f_ = OpFunction %v3float None %8
%11 = OpLabel
%iteration = OpVariable %_ptr_Function_int Function %15
%k = OpVariable %_ptr_Function_int Function %15
OpStore %iteration %int_0
OpStore %k %int_0
OpBranch %18
%18 = OpLabel
OpLoopMerge %19 %20 None
OpBranch %21
%21 = OpLabel
%22 = OpLoad %int %k
%24 = OpSLessThan %bool %22 %int_100
OpSelectionMerge %26 None
OpBranchConditional %24 %27 %28
%27 = OpLabel
OpBranch %26
%28 = OpLabel
OpBranch %19
%26 = OpLabel
%29 = OpLoad %int %iteration
%31 = OpIAdd %int %29 %int_1
OpStore %iteration %31
OpBranch %20
%20 = OpLabel
%32 = OpLoad %int %k
%33 = OpIAdd %int %32 %int_1
OpStore %k %33
OpBranch %18
%19 = OpLabel
%34 = OpLoad %int %iteration
%35 = OpSLessThan %bool %34 %int_100
OpSelectionMerge %36 None
OpBranchConditional %35 %37 %38
%37 = OpLabel
%39 = OpLoad %int %iteration
%40 = OpLoad %int %iteration
%43 = OpISub %int %39 %int_1
%42 = OpConvertSToF %float %43
%45 = OpISub %int %40 %int_1
%44 = OpConvertSToF %float %45
%46 = OpCompositeConstruct %v3float %float_1 %42 %44
OpReturnValue %46
%38 = OpLabel
OpBranch %47
%47 = OpLabel
OpLoopMerge %48 %49 None
OpBranch %50
%50 = OpLabel
OpBranch %51
%51 = OpLabel
OpLoopMerge %52 %53 None
OpBranch %54
%54 = OpLabel
OpReturnValue %56
%53 = OpLabel
OpBranch %51
%52 = OpLabel
OpReturnValue %57
%49 = OpLabel
OpBranch %47
%48 = OpLabel
OpReturnValue %57
%36 = OpLabel
OpReturnValue %57
OpFunctionEnd
%main_1 = OpFunction %void None %58
%61 = OpLabel
%62 = OpFunctionCall %v3float %f_
%63 = OpCompositeExtract %float %62 0
%64 = OpCompositeExtract %float %62 1
%65 = OpCompositeExtract %float %62 2
%66 = OpCompositeConstruct %v4float %63 %64 %65 %float_1
OpStore %x_GLF_color %66
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %67
%70 = OpLabel
%71 = OpFunctionCall %void %main_1
%72 = OpLoad %v4float %x_GLF_color
%73 = OpCompositeConstruct %main_out %72
OpReturnValue %73
OpFunctionEnd
%main = OpFunction %void None %58
%75 = OpLabel
%76 = OpFunctionCall %main_out %main_inner
%77 = OpCompositeExtract %v4float %76 0
OpStore %x_GLF_color_1_1 %77
OpReturn
OpFunctionEnd