blob: cd282a9f99885154dfd64f4a21c6a226f913ad23 [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 310
OpName %main "main"
OpName %f "f"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %_ ""
OpName %_GLF_color "_GLF_color"
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Function_float = OpTypePointer Function %float
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Input_float = OpTypePointer Input %float
%float_n0x1_8p_128 = OpConstant %float -0x1.8p+128
%float_5 = OpConstant %float 5
%float_0 = OpConstant %float 0
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%buf0 = OpTypeStruct %float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%27 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main = OpFunction %void None %9
%29 = OpLabel
%f = OpVariable %_ptr_Function_float Function
%30 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
%31 = OpLoad %float %30
OpStore %f %31
%32 = OpLoad %float %f
%33 = OpFAdd %float %32 %float_n0x1_8p_128
OpStore %f %33
%34 = OpLoad %float %f
%35 = OpFDiv %float %float_5 %34
%36 = OpFOrdEqual %bool %35 %float_0
OpSelectionMerge %37 None
OpBranchConditional %36 %38 %37
%38 = OpLabel
%39 = OpLoad %float %f
%40 = OpFAdd %float %39 %float_1
OpStore %f %40
OpBranch %37
%37 = OpLabel
%41 = OpLoad %float %f
%42 = OpIsNan %bool %41
%43 = OpLogicalNot %bool %42
OpSelectionMerge %44 None
OpBranchConditional %43 %45 %44
%45 = OpLabel
%46 = OpLoad %float %f
%47 = OpAccessChain %_ptr_Uniform_float %_ %int_0
%48 = OpLoad %float %47
%49 = OpFOrdNotEqual %bool %46 %48
OpBranch %44
%44 = OpLabel
%50 = OpPhi %bool %42 %37 %49 %45
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %51
%52 = OpLabel
OpStore %f %float_0
OpBranch %51
%51 = OpLabel
%53 = OpLoad %float %f
%54 = OpFOrdEqual %bool %53 %float_0
OpSelectionMerge %55 None
OpBranchConditional %54 %56 %57
%56 = OpLabel
OpStore %_GLF_color %27
OpBranch %55
%57 = OpLabel
OpStore %_GLF_color %28
OpBranch %55
%55 = OpLabel
OpReturn
OpFunctionEnd