blob: 1cc498139ce44dffa4e31c9faca83ae8d4bb7728 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 60
; Schema: 0
OpCapability Shader
%35 = OpExtInstImport "GLSL.std.450"
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 %buf0 "buf0"
OpMemberName %buf0 0 "one"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %f "f"
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
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 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
%buf0 = OpTypeStruct %float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%11 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%17 = OpConstantNull %float
%float_1 = OpConstant %float 1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_10 = OpConstant %float 10
%float_8 = OpConstant %float 8
%float_9 = OpConstant %float 9
%bool = OpTypeBool
%float_0 = OpConstant %float 0
%47 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%48 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%49 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%f = OpVariable %_ptr_Function_float Function %17
OpStore %f %float_1
OpBranch %19
%19 = OpLabel
OpLoopMerge %20 %21 None
OpBranch %22
%22 = OpLabel
%26 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0
%27 = OpLoad %float %26
%28 = OpLoad %float %f
%29 = OpFAdd %float %28 %27
OpStore %f %29
OpBranch %21
%21 = OpLabel
%30 = OpLoad %float %f
%31 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0
%32 = OpLoad %float %31
%38 = OpFAdd %float %float_9 %32
%34 = OpExtInst %float %35 NClamp %30 %float_8 %38
%39 = OpFOrdGreaterThan %bool %float_10 %34
OpBranchConditional %39 %19 %20
%20 = OpLabel
%41 = OpLoad %float %f
%42 = OpFOrdEqual %bool %41 %float_10
OpSelectionMerge %43 None
OpBranchConditional %42 %44 %45
%44 = OpLabel
OpStore %x_GLF_color %47
OpBranch %43
%45 = OpLabel
OpStore %x_GLF_color %48
OpBranch %43
%43 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %49
%52 = OpLabel
%53 = OpFunctionCall %void %main_1
%54 = OpLoad %v4float %x_GLF_color
%55 = OpCompositeConstruct %main_out %54
OpReturnValue %55
OpFunctionEnd
%main = OpFunction %void None %11
%57 = OpLabel
%58 = OpFunctionCall %main_out %main_inner
%59 = OpCompositeExtract %v4float %58 0
OpStore %x_GLF_color_1_1 %59
OpReturn
OpFunctionEnd