blob: a05688bc757aba3b7f960a18bdf49230fa180962 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 192
; Schema: 0
OpCapability Shader
%67 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "resolution"
OpName %x_10 "x_10"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "injectionSwitch"
OpName %x_16 "x_16"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %compute_value_f1_f1_ "compute_value_f1_f1_"
OpName %limit "limit"
OpName %thirty_two "thirty_two"
OpName %x_104 "x_104"
OpName %x_104_phi "x_104_phi"
OpName %x_107_phi "x_107_phi"
OpName %x_126 "x_126"
OpName %x_125 "x_125"
OpName %x_108 "x_108"
OpName %x_105_phi "x_105_phi"
OpName %x_124 "x_124"
OpName %x_125_phi "x_125_phi"
OpName %x_105 "x_105"
OpName %main_1 "main_1"
OpName %c "c"
OpName %param "param"
OpName %param_1 "param_1"
OpName %param_2 "param_2"
OpName %param_3 "param_3"
OpName %x_54 "x_54"
OpName %x_74_phi "x_74_phi"
OpName %x_75 "x_75"
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_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_16 NonWritable
OpDecorate %x_16 DescriptorSet 0
OpDecorate %x_16 Binding 1
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_10 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %9
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_16 = OpVariable %_ptr_Uniform_buf1 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_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 %9
%_ptr_Function_float = OpTypePointer Function %float
%18 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float
%25 = OpConstantNull %float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%30 = OpConstantNull %int
%float_n0_5 = OpConstant %float -0.5
%int_1 = OpConstant %int 1
%int_800 = OpConstant %int 800
%bool = OpTypeBool
%int_32 = OpConstant %int 32
%int_0 = OpConstant %int 0
%float_0_400000006 = OpConstant %float 0.400000006
%float_0_00999999978 = OpConstant %float 0.00999999978
%float_100 = OpConstant %float 100
%void = OpTypeVoid
%92 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%99 = OpConstantNull %v3float
%float_7 = OpConstant %float 7
%float_8 = OpConstant %float 8
%float_9 = OpConstant %float 9
%109 = OpConstantComposite %v3float %float_7 %float_8 %float_9
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_0_125 = OpConstant %float 0.125
%_ptr_Private_float = OpTypePointer Private %float
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%int_3 = OpConstant %int 3
%float_1 = OpConstant %float 1
%main_out = OpTypeStruct %v4float
%179 = OpTypeFunction %void %main_out
%compute_value_f1_f1_ = OpFunction %float None %18
%limit = OpFunctionParameter %_ptr_Function_float
%thirty_two = OpFunctionParameter %_ptr_Function_float
%23 = OpLabel
%x_104 = OpVariable %_ptr_Function_float Function %25
%x_104_phi = OpVariable %_ptr_Function_float Function %25
%x_107_phi = OpVariable %_ptr_Function_int Function %30
%x_126 = OpVariable %_ptr_Function_float Function %25
%x_125 = OpVariable %_ptr_Function_float Function %25
%x_108 = OpVariable %_ptr_Function_int Function %30
%x_105_phi = OpVariable %_ptr_Function_float Function %25
%x_124 = OpVariable %_ptr_Function_float Function %25
%x_125_phi = OpVariable %_ptr_Function_float Function %25
%x_105 = OpVariable %_ptr_Function_float Function %25
OpStore %x_104_phi %float_n0_5
OpStore %x_107_phi %int_1
OpBranch %33
%33 = OpLabel
OpLoopMerge %34 %35 None
OpBranch %36
%36 = OpLabel
%41 = OpLoad %float %x_104_phi
OpStore %x_104 %41
%42 = OpLoad %int %x_107_phi
%44 = OpSLessThan %bool %42 %int_800
OpSelectionMerge %46 None
OpBranchConditional %44 %47 %48
%47 = OpLabel
OpBranch %46
%48 = OpLabel
OpBranch %34
%46 = OpLabel
%52 = OpSMod %int %42 %int_32
%54 = OpIEqual %bool %52 %int_0
OpSelectionMerge %55 None
OpBranchConditional %54 %56 %57
%56 = OpLabel
%58 = OpLoad %float %x_104
%60 = OpFAdd %float %58 %float_0_400000006
OpStore %x_126 %60
%61 = OpLoad %float %x_126
OpStore %x_105_phi %61
OpBranch %55
%57 = OpLabel
%63 = OpLoad %float %thirty_two
%64 = OpLoad %float %x_104
OpStore %x_125_phi %64
%65 = OpConvertSToF %float %42
%66 = OpExtInst %float %67 RoundEven %63
%68 = OpFRem %float %65 %66
%70 = OpFOrdLessThanEqual %bool %68 %float_0_00999999978
OpSelectionMerge %71 None
OpBranchConditional %70 %72 %71
%72 = OpLabel
%73 = OpLoad %float %x_104
%75 = OpFAdd %float %73 %float_100
OpStore %x_124 %75
%76 = OpLoad %float %x_124
OpStore %x_125_phi %76
OpBranch %71
%71 = OpLabel
%77 = OpLoad %float %x_125_phi
OpStore %x_125 %77
%78 = OpLoad %float %x_125
OpStore %x_105_phi %78
OpBranch %55
%55 = OpLabel
%80 = OpLoad %float %x_105_phi
OpStore %x_105 %80
%82 = OpLoad %float %limit
%83 = OpConvertSToF %float %42
%84 = OpFOrdGreaterThanEqual %bool %83 %82
OpSelectionMerge %85 None
OpBranchConditional %84 %86 %85
%86 = OpLabel
%87 = OpLoad %float %x_105
OpReturnValue %87
%85 = OpLabel
OpBranch %35
%35 = OpLabel
%88 = OpIAdd %int %42 %int_1
OpStore %x_108 %88
%89 = OpLoad %float %x_105
OpStore %x_104_phi %89
%90 = OpLoad %int %x_108
OpStore %x_107_phi %90
OpBranch %33
%34 = OpLabel
%91 = OpLoad %float %x_104
OpReturnValue %91
OpFunctionEnd
%main_1 = OpFunction %void None %92
%95 = OpLabel
%c = OpVariable %_ptr_Function_v3float Function %99
%param = OpVariable %_ptr_Function_float Function %25
%param_1 = OpVariable %_ptr_Function_float Function %25
%param_2 = OpVariable %_ptr_Function_float Function %25
%param_3 = OpVariable %_ptr_Function_float Function %25
%x_54 = OpVariable %_ptr_Function_v3float Function %99
%x_74_phi = OpVariable %_ptr_Function_int Function %30
%x_75 = OpVariable %_ptr_Function_int Function %30
OpStore %c %109
%113 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_0
%114 = OpLoad %float %113
%117 = OpFMul %float %114 %float_0_125
%115 = OpExtInst %float %67 RoundEven %117
%119 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%120 = OpLoad %float %119
OpStore %param %120
OpStore %param_1 %115
%121 = OpFunctionCall %float %compute_value_f1_f1_ %param %param_1
%124 = OpAccessChain %_ptr_Function_float %c %uint_0
OpStore %124 %121
%126 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%127 = OpLoad %float %126
OpStore %param_2 %127
OpStore %param_3 %115
%128 = OpFunctionCall %float %compute_value_f1_f1_ %param_2 %param_3
%131 = OpAccessChain %_ptr_Function_float %c %uint_1
OpStore %131 %128
%132 = OpAccessChain %_ptr_Function_float %c %uint_0
%133 = OpLoad %float %132
%134 = OpLoad %v3float %c
OpStore %x_54 %134
%135 = OpAccessChain %_ptr_Function_float %x_54 %uint_1
%136 = OpLoad %float %135
%138 = OpAccessChain %_ptr_Function_float %c %uint_2
%139 = OpFAdd %float %133 %136
OpStore %138 %139
OpStore %x_74_phi %int_0
OpBranch %140
%140 = OpLabel
OpLoopMerge %141 %142 None
OpBranch %143
%143 = OpLabel
%145 = OpLoad %int %x_74_phi
%147 = OpSLessThan %bool %145 %int_3
OpSelectionMerge %148 None
OpBranchConditional %147 %149 %150
%149 = OpLabel
OpBranch %148
%150 = OpLabel
OpBranch %141
%148 = OpLabel
%151 = OpAccessChain %_ptr_Function_float %c %145
%152 = OpLoad %float %151
%154 = OpFOrdGreaterThanEqual %bool %152 %float_1
OpSelectionMerge %155 None
OpBranchConditional %154 %156 %155
%156 = OpLabel
%157 = OpAccessChain %_ptr_Uniform_float %x_16 %uint_0 %uint_0
%158 = OpLoad %float %157
%159 = OpAccessChain %_ptr_Uniform_float %x_16 %uint_0 %uint_1
%160 = OpLoad %float %159
%161 = OpFOrdGreaterThan %bool %158 %160
OpSelectionMerge %162 None
OpBranchConditional %161 %163 %162
%163 = OpLabel
OpKill
%162 = OpLabel
%164 = OpAccessChain %_ptr_Function_float %c %145
%165 = OpLoad %float %164
%166 = OpAccessChain %_ptr_Function_float %c %145
%167 = OpLoad %float %166
%168 = OpAccessChain %_ptr_Function_float %c %145
%169 = OpFMul %float %165 %167
OpStore %168 %169
OpBranch %155
%155 = OpLabel
OpBranch %142
%142 = OpLabel
%170 = OpIAdd %int %145 %int_1
OpStore %x_75 %170
%171 = OpLoad %int %x_75
OpStore %x_74_phi %171
OpBranch %140
%141 = OpLabel
%172 = OpLoad %v3float %c
%174 = OpExtInst %v3float %67 FAbs %172
%173 = OpExtInst %v3float %67 Normalize %174
%175 = OpCompositeExtract %float %173 0
%176 = OpCompositeExtract %float %173 1
%177 = OpCompositeExtract %float %173 2
%178 = OpCompositeConstruct %v4float %175 %176 %177 %float_1
OpStore %x_GLF_color %178
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %179
%tint_symbol_1 = OpFunctionParameter %main_out
%183 = OpLabel
%184 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %184
OpReturn
OpFunctionEnd
%main = OpFunction %void None %92
%186 = OpLabel
%187 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %187
%188 = OpFunctionCall %void %main_1
%190 = OpLoad %v4float %x_GLF_color
%191 = OpCompositeConstruct %main_out %190
%189 = OpFunctionCall %void %tint_symbol_3 %191
OpReturn
OpFunctionEnd