blob: 482cbf27e6e27387c13f29e85c7954af75e09a2a [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" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
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 %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
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 %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%buf0 = OpTypeStruct %float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
%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_n0x1p_128 = OpConstant %float -0x1p+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 %void %main_out
%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_n0x1p_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
%tint_symbol_3 = OpFunction %void None %65
%tint_symbol_1 = OpFunctionParameter %main_out
%69 = OpLabel
%70 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %70
OpReturn
OpFunctionEnd
%main = OpFunction %void None %14
%72 = OpLabel
%73 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %73
%74 = OpFunctionCall %void %main_1
%76 = OpLoad %v4float %x_GLF_color
%77 = OpCompositeConstruct %main_out %76
%75 = OpFunctionCall %void %tint_symbol_3 %77
OpReturn
OpFunctionEnd