blob: 225383a8499424bd1a751a6f207f2e0d2c7f3167 [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" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %f "f"
OpName %x_49 "x_49"
OpName %x_50_phi "x_50_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%buf0 = OpTypeStruct %float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%14 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%20 = OpConstantNull %float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%24 = OpConstantNull %bool
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%float_n0x1_8p_128 = OpConstant %float -0x1.8p+128
%float_5 = OpConstant %float 5
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%63 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%64 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%65 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %14
%17 = OpLabel
%f = OpVariable %_ptr_Function_float Function %20
%x_49 = OpVariable %_ptr_Function_bool Function %24
%x_50_phi = OpVariable %_ptr_Function_bool Function %24
%29 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%30 = OpLoad %float %29
OpStore %f %30
%31 = OpLoad %float %f
%33 = OpFAdd %float %31 %float_n0x1_8p_128
OpStore %f %33
%34 = OpLoad %float %f
%36 = OpFDiv %float %float_5 %34
%38 = OpFOrdEqual %bool %36 %float_0
OpSelectionMerge %39 None
OpBranchConditional %38 %40 %39
%40 = OpLabel
%41 = OpLoad %float %f
%43 = OpFAdd %float %41 %float_1
OpStore %f %43
OpBranch %39
%39 = OpLabel
%44 = OpLoad %float %f
%45 = OpIsNan %bool %44
OpStore %x_50_phi %45
%46 = OpLogicalNot %bool %45
OpSelectionMerge %47 None
OpBranchConditional %46 %48 %47
%48 = OpLabel
%49 = OpLoad %float %f
%51 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0
%52 = OpLoad %float %51
%53 = OpFOrdNotEqual %bool %49 %52
OpStore %x_49 %53
%54 = OpLoad %bool %x_49
OpStore %x_50_phi %54
OpBranch %47
%47 = OpLabel
%55 = OpLoad %bool %x_50_phi
OpSelectionMerge %56 None
OpBranchConditional %55 %57 %56
%57 = OpLabel
OpStore %f %float_0
OpBranch %56
%56 = OpLabel
%58 = OpLoad %float %f
%59 = OpFOrdEqual %bool %58 %float_0
OpSelectionMerge %60 None
OpBranchConditional %59 %61 %62
%61 = OpLabel
OpStore %x_GLF_color %63
OpBranch %60
%62 = OpLabel
OpStore %x_GLF_color %64
OpBranch %60
%60 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %65
%gl_FragCoord_param = OpFunctionParameter %v4float
%69 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%70 = OpFunctionCall %void %main_1
%71 = OpLoad %v4float %x_GLF_color
%72 = OpCompositeConstruct %main_out %71
OpReturnValue %72
OpFunctionEnd
%main = OpFunction %void None %14
%74 = OpLabel
%76 = OpLoad %v4float %gl_FragCoord_param_1
%75 = OpFunctionCall %main_out %main_inner %76
%77 = OpCompositeExtract %v4float %75 0
OpStore %x_GLF_color_1_1 %77
OpReturn
OpFunctionEnd