blob: f4d0f975aed5643590aca3f377fb1214ea761566 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 142
; Schema: 0
OpCapability Shader
%76 = OpExtInstImport "GLSL.std.450"
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 "one"
OpName %x_8 "x_8"
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 %a "a"
OpName %b "b"
OpName %x_105 "x_105"
OpName %x_111 "x_111"
OpName %x_106_phi "x_106_phi"
OpName %x_112_phi "x_112_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_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 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_8 = 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
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%21 = OpConstantNull %v2float
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%25 = OpConstantNull %v3float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%29 = OpConstantNull %bool
%float_1 = OpConstant %float 1
%34 = OpConstantComposite %v2float %float_1 %float_1
%float_0 = OpConstant %float 0
%36 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%int = OpTypeInt 32 1
%int_40 = OpConstant %int 40
%float_0_100000001 = OpConstant %float 0.100000001
%50 = OpConstantComposite %v3float %float_0_100000001 %float_0_100000001 %float_0_100000001
%int_60 = OpConstant %int 60
%float_0_200000003 = OpConstant %float 0.200000003
%60 = OpConstantComposite %v3float %float_0_200000003 %float_0_200000003 %float_0_200000003
%float_80 = OpConstant %float 80
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_0_00999999978 = OpConstant %float 0.00999999978
%81 = OpConstantComposite %v3float %float_0_00999999978 %float_0_00999999978 %float_0_00999999978
%int_100 = OpConstant %int 100
%int_500 = OpConstant %int 500
%float_0_540302277 = OpConstant %float 0.540302277
%float_n0_99996084 = OpConstant %float -0.99996084
%104 = OpConstantComposite %v3float %float_0_540302277 %float_0_540302277 %float_n0_99996084
%float_1_01999998 = OpConstant %float 1.01999998
%uint_2 = OpConstant %uint 2
%127 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%128 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%129 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %14
%17 = OpLabel
%a = OpVariable %_ptr_Function_v2float Function %21
%b = OpVariable %_ptr_Function_v3float Function %25
%x_105 = OpVariable %_ptr_Function_bool Function %29
%x_111 = OpVariable %_ptr_Function_bool Function %29
%x_106_phi = OpVariable %_ptr_Function_bool Function %29
%x_112_phi = OpVariable %_ptr_Function_bool Function %29
OpStore %a %34
OpStore %b %36
%40 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%41 = OpLoad %float %40
%42 = OpConvertFToS %int %41
%45 = OpSLessThan %bool %42 %int_40
OpSelectionMerge %46 None
OpBranchConditional %45 %47 %48
%47 = OpLabel
OpStore %b %50
OpBranch %46
%48 = OpLabel
%51 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%52 = OpLoad %float %51
%53 = OpConvertFToS %int %52
%55 = OpSLessThan %bool %53 %int_60
OpSelectionMerge %56 None
OpBranchConditional %55 %57 %58
%57 = OpLabel
OpStore %b %60
OpBranch %56
%58 = OpLabel
%61 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%62 = OpLoad %float %61
%64 = OpFOrdLessThan %bool %62 %float_80
OpSelectionMerge %65 None
OpBranchConditional %64 %66 %67
%66 = OpLabel
%70 = OpAccessChain %_ptr_Function_float %a %uint_0
%71 = OpLoad %float %70
%73 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0
%74 = OpLoad %float %73
%77 = OpCompositeConstruct %v3float %71 %71 %71
%78 = OpCompositeConstruct %v3float %74 %74 %74
%79 = OpFAdd %v3float %77 %78
%75 = OpExtInst %v3float %76 Cos %79
%82 = OpFAdd %v3float %75 %81
OpStore %b %82
OpBranch %65
%67 = OpLabel
%83 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%84 = OpLoad %float %83
%85 = OpConvertFToS %int %84
%87 = OpSLessThan %bool %85 %int_100
OpSelectionMerge %88 None
OpBranchConditional %87 %89 %90
%89 = OpLabel
%91 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0
%92 = OpLoad %float %91
%94 = OpCompositeConstruct %v3float %92 %92 %92
%93 = OpExtInst %v3float %76 Cos %94
OpStore %b %93
OpBranch %88
%90 = OpLabel
%95 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%96 = OpLoad %float %95
%97 = OpConvertFToS %int %96
%99 = OpSLessThan %bool %97 %int_500
OpSelectionMerge %100 None
OpBranchConditional %99 %101 %100
%101 = OpLabel
OpStore %b %104
OpBranch %100
%100 = OpLabel
OpBranch %88
%88 = OpLabel
OpBranch %65
%65 = OpLabel
OpBranch %56
%56 = OpLabel
OpBranch %46
%46 = OpLabel
%105 = OpAccessChain %_ptr_Function_float %b %uint_0
%106 = OpLoad %float %105
%108 = OpFOrdLessThan %bool %106 %float_1_01999998
OpStore %x_106_phi %108
OpSelectionMerge %109 None
OpBranchConditional %108 %110 %109
%110 = OpLabel
%111 = OpAccessChain %_ptr_Function_float %b %uint_1
%112 = OpLoad %float %111
%113 = OpFOrdLessThan %bool %112 %float_1_01999998
OpStore %x_105 %113
%114 = OpLoad %bool %x_105
OpStore %x_106_phi %114
OpBranch %109
%109 = OpLabel
%115 = OpLoad %bool %x_106_phi
OpStore %x_112_phi %115
OpSelectionMerge %116 None
OpBranchConditional %115 %117 %116
%117 = OpLabel
%119 = OpAccessChain %_ptr_Function_float %b %uint_2
%120 = OpLoad %float %119
%121 = OpFOrdLessThan %bool %120 %float_1_01999998
OpStore %x_111 %121
%122 = OpLoad %bool %x_111
OpStore %x_112_phi %122
OpBranch %116
%116 = OpLabel
%123 = OpLoad %bool %x_112_phi
OpSelectionMerge %124 None
OpBranchConditional %123 %125 %126
%125 = OpLabel
OpStore %x_GLF_color %127
OpBranch %124
%126 = OpLabel
OpStore %x_GLF_color %128
OpBranch %124
%124 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %129
%tint_symbol_1 = OpFunctionParameter %main_out
%133 = OpLabel
%134 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %134
OpReturn
OpFunctionEnd
%main = OpFunction %void None %14
%136 = OpLabel
%137 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %137
%138 = OpFunctionCall %void %main_1
%140 = OpLoad %v4float %x_GLF_color
%141 = OpCompositeConstruct %main_out %140
%139 = OpFunctionCall %void %tint_symbol_3 %141
OpReturn
OpFunctionEnd