blob: cc78cd77ce6a1963bda349b04235180332d74f03 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 197
; 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
%97 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%104 = OpConstantNull %v3float
%float_7 = OpConstant %float 7
%float_8 = OpConstant %float 8
%float_9 = OpConstant %float 9
%114 = 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
%184 = 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
%69 = OpConvertSToF %float %42
%70 = OpExtInst %float %67 RoundEven %63
%71 = OpFDiv %float %69 %70
%68 = OpExtInst %float %67 Floor %71
%72 = OpFMul %float %66 %68
%73 = OpFSub %float %65 %72
%75 = OpFOrdLessThanEqual %bool %73 %float_0_00999999978
OpSelectionMerge %76 None
OpBranchConditional %75 %77 %76
%77 = OpLabel
%78 = OpLoad %float %x_104
%80 = OpFAdd %float %78 %float_100
OpStore %x_124 %80
%81 = OpLoad %float %x_124
OpStore %x_125_phi %81
OpBranch %76
%76 = OpLabel
%82 = OpLoad %float %x_125_phi
OpStore %x_125 %82
%83 = OpLoad %float %x_125
OpStore %x_105_phi %83
OpBranch %55
%55 = OpLabel
%85 = OpLoad %float %x_105_phi
OpStore %x_105 %85
%87 = OpLoad %float %limit
%88 = OpConvertSToF %float %42
%89 = OpFOrdGreaterThanEqual %bool %88 %87
OpSelectionMerge %90 None
OpBranchConditional %89 %91 %90
%91 = OpLabel
%92 = OpLoad %float %x_105
OpReturnValue %92
%90 = OpLabel
OpBranch %35
%35 = OpLabel
%93 = OpIAdd %int %42 %int_1
OpStore %x_108 %93
%94 = OpLoad %float %x_105
OpStore %x_104_phi %94
%95 = OpLoad %int %x_108
OpStore %x_107_phi %95
OpBranch %33
%34 = OpLabel
%96 = OpLoad %float %x_104
OpReturnValue %96
OpFunctionEnd
%main_1 = OpFunction %void None %97
%100 = OpLabel
%c = OpVariable %_ptr_Function_v3float Function %104
%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 %104
%x_74_phi = OpVariable %_ptr_Function_int Function %30
%x_75 = OpVariable %_ptr_Function_int Function %30
OpStore %c %114
%118 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_0
%119 = OpLoad %float %118
%122 = OpFMul %float %119 %float_0_125
%120 = OpExtInst %float %67 RoundEven %122
%124 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%125 = OpLoad %float %124
OpStore %param %125
OpStore %param_1 %120
%126 = OpFunctionCall %float %compute_value_f1_f1_ %param %param_1
%129 = OpAccessChain %_ptr_Function_float %c %uint_0
OpStore %129 %126
%131 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%132 = OpLoad %float %131
OpStore %param_2 %132
OpStore %param_3 %120
%133 = OpFunctionCall %float %compute_value_f1_f1_ %param_2 %param_3
%136 = OpAccessChain %_ptr_Function_float %c %uint_1
OpStore %136 %133
%137 = OpAccessChain %_ptr_Function_float %c %uint_0
%138 = OpLoad %float %137
%139 = OpLoad %v3float %c
OpStore %x_54 %139
%140 = OpAccessChain %_ptr_Function_float %x_54 %uint_1
%141 = OpLoad %float %140
%143 = OpAccessChain %_ptr_Function_float %c %uint_2
%144 = OpFAdd %float %138 %141
OpStore %143 %144
OpStore %x_74_phi %int_0
OpBranch %145
%145 = OpLabel
OpLoopMerge %146 %147 None
OpBranch %148
%148 = OpLabel
%150 = OpLoad %int %x_74_phi
%152 = OpSLessThan %bool %150 %int_3
OpSelectionMerge %153 None
OpBranchConditional %152 %154 %155
%154 = OpLabel
OpBranch %153
%155 = OpLabel
OpBranch %146
%153 = OpLabel
%156 = OpAccessChain %_ptr_Function_float %c %150
%157 = OpLoad %float %156
%159 = OpFOrdGreaterThanEqual %bool %157 %float_1
OpSelectionMerge %160 None
OpBranchConditional %159 %161 %160
%161 = OpLabel
%162 = OpAccessChain %_ptr_Uniform_float %x_16 %uint_0 %uint_0
%163 = OpLoad %float %162
%164 = OpAccessChain %_ptr_Uniform_float %x_16 %uint_0 %uint_1
%165 = OpLoad %float %164
%166 = OpFOrdGreaterThan %bool %163 %165
OpSelectionMerge %167 None
OpBranchConditional %166 %168 %167
%168 = OpLabel
OpKill
%167 = OpLabel
%169 = OpAccessChain %_ptr_Function_float %c %150
%170 = OpLoad %float %169
%171 = OpAccessChain %_ptr_Function_float %c %150
%172 = OpLoad %float %171
%173 = OpAccessChain %_ptr_Function_float %c %150
%174 = OpFMul %float %170 %172
OpStore %173 %174
OpBranch %160
%160 = OpLabel
OpBranch %147
%147 = OpLabel
%175 = OpIAdd %int %150 %int_1
OpStore %x_75 %175
%176 = OpLoad %int %x_75
OpStore %x_74_phi %176
OpBranch %145
%146 = OpLabel
%177 = OpLoad %v3float %c
%179 = OpExtInst %v3float %67 FAbs %177
%178 = OpExtInst %v3float %67 Normalize %179
%180 = OpCompositeExtract %float %178 0
%181 = OpCompositeExtract %float %178 1
%182 = OpCompositeExtract %float %178 2
%183 = OpCompositeConstruct %v4float %180 %181 %182 %float_1
OpStore %x_GLF_color %183
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %184
%tint_symbol_1 = OpFunctionParameter %main_out
%188 = OpLabel
%189 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %189
OpReturn
OpFunctionEnd
%main = OpFunction %void None %97
%191 = OpLabel
%192 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %192
%193 = OpFunctionCall %void %main_1
%195 = OpLoad %v4float %x_GLF_color
%196 = OpCompositeConstruct %main_out %195
%194 = OpFunctionCall %void %tint_symbol_3 %196
OpReturn
OpFunctionEnd