blob: 8a60eb4eb08e51625aa5712d6f02c8b11de272d7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 167
; 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 %buf1 "buf1"
OpMemberName %buf1 0 "resolution"
OpName %x_6 "x_6"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_9 "x_9"
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 %data "data"
OpName %x_41_phi "x_41_phi"
OpName %x_53_phi "x_53_phi"
OpName %x_42 "x_42"
OpName %x_54 "x_54"
OpName %x_60_phi "x_60_phi"
OpName %x_83 "x_83"
OpName %x_84 "x_84"
OpName %x_61 "x_61"
OpName %x_85_phi "x_85_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 %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpDecorate %_arr_float_uint_10 ArrayStride 4
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
%v2float = OpTypeVector %float 2
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_9 = 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
%18 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%_arr_float_uint_10 = OpTypeArray %float %uint_10
%_ptr_Function__arr_float_uint_10 = OpTypePointer Function %_arr_float_uint_10
%27 = OpConstantNull %_arr_float_uint_10
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%31 = OpConstantNull %int
%int_0 = OpConstant %int 0
%int_10 = OpConstant %int 10
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Function_float = OpTypePointer Function %float
%int_1 = OpConstant %int 1
%int_9 = OpConstant %int 9
%_ptr_Function_bool = OpTypePointer Function %bool
%77 = OpConstantNull %bool
%_ptr_Private_float = OpTypePointer Private %float
%float_0_5 = OpConstant %float 0.5
%int_5 = OpConstant %int 5
%float_0_100000001 = OpConstant %float 0.100000001
%float_1 = OpConstant %float 1
%main_out = OpTypeStruct %v4float
%154 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %18
%21 = OpLabel
%data = OpVariable %_ptr_Function__arr_float_uint_10 Function %27
%x_41_phi = OpVariable %_ptr_Function_int Function %31
%x_53_phi = OpVariable %_ptr_Function_int Function %31
%x_42 = OpVariable %_ptr_Function_int Function %31
%x_54 = OpVariable %_ptr_Function_int Function %31
%x_60_phi = OpVariable %_ptr_Function_int Function %31
%x_83 = OpVariable %_ptr_Function_bool Function %77
%x_84 = OpVariable %_ptr_Function_bool Function %77
%x_61 = OpVariable %_ptr_Function_int Function %31
%x_85_phi = OpVariable %_ptr_Function_bool Function %77
OpStore %x_41_phi %int_0
OpBranch %34
%34 = OpLabel
OpLoopMerge %35 %36 None
OpBranch %37
%37 = OpLabel
%39 = OpLoad %int %x_41_phi
%41 = OpSLessThan %bool %39 %int_10
OpSelectionMerge %43 None
OpBranchConditional %41 %44 %45
%44 = OpLabel
OpBranch %43
%45 = OpLabel
OpBranch %35
%43 = OpLabel
OpBranch %36
%36 = OpLabel
%49 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_1
%50 = OpLoad %float %49
%52 = OpAccessChain %_ptr_Function_float %data %39
%54 = OpISub %int %int_10 %39
%53 = OpConvertSToF %float %54
%55 = OpFMul %float %53 %50
OpStore %52 %55
%57 = OpIAdd %int %39 %int_1
OpStore %x_42 %57
%58 = OpLoad %int %x_42
OpStore %x_41_phi %58
OpBranch %34
%35 = OpLabel
OpStore %x_53_phi %int_0
OpBranch %59
%59 = OpLabel
OpLoopMerge %60 %61 None
OpBranch %62
%62 = OpLabel
%65 = OpLoad %int %x_53_phi
%67 = OpSLessThan %bool %65 %int_9
OpSelectionMerge %68 None
OpBranchConditional %67 %69 %70
%69 = OpLabel
OpBranch %68
%70 = OpLabel
OpBranch %60
%68 = OpLabel
OpStore %x_60_phi %int_0
OpBranch %71
%71 = OpLabel
OpLoopMerge %72 %73 None
OpBranch %74
%74 = OpLabel
%81 = OpLoad %int %x_60_phi
%82 = OpSLessThan %bool %81 %int_10
OpSelectionMerge %83 None
OpBranchConditional %82 %84 %85
%84 = OpLabel
OpBranch %83
%85 = OpLabel
OpBranch %72
%83 = OpLabel
%86 = OpIAdd %int %65 %int_1
%87 = OpSLessThan %bool %81 %86
OpSelectionMerge %88 None
OpBranchConditional %87 %89 %88
%89 = OpLabel
OpBranch %73
%88 = OpLabel
%90 = OpAccessChain %_ptr_Function_float %data %65
%91 = OpLoad %float %90
%92 = OpAccessChain %_ptr_Function_float %data %81
%93 = OpLoad %float %92
%95 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%96 = OpLoad %float %95
%97 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
%98 = OpLoad %float %97
%100 = OpFMul %float %98 %float_0_5
%101 = OpFOrdLessThan %bool %96 %100
OpSelectionMerge %102 None
OpBranchConditional %101 %103 %104
%103 = OpLabel
%105 = OpFOrdGreaterThan %bool %91 %93
OpStore %x_83 %105
%106 = OpLoad %bool %x_83
OpStore %x_85_phi %106
OpBranch %102
%104 = OpLabel
%107 = OpFOrdLessThan %bool %91 %93
OpStore %x_84 %107
%108 = OpLoad %bool %x_84
OpStore %x_85_phi %108
OpBranch %102
%102 = OpLabel
%109 = OpLoad %bool %x_85_phi
OpSelectionMerge %110 None
OpBranchConditional %109 %111 %110
%111 = OpLabel
%112 = OpAccessChain %_ptr_Function_float %data %65
%113 = OpLoad %float %112
%114 = OpAccessChain %_ptr_Function_float %data %81
%115 = OpLoad %float %114
%116 = OpAccessChain %_ptr_Function_float %data %65
OpStore %116 %115
%117 = OpAccessChain %_ptr_Function_float %data %81
OpStore %117 %113
OpBranch %110
%110 = OpLabel
OpBranch %73
%73 = OpLabel
%118 = OpIAdd %int %81 %int_1
OpStore %x_61 %118
%119 = OpLoad %int %x_61
OpStore %x_60_phi %119
OpBranch %71
%72 = OpLabel
OpBranch %61
%61 = OpLabel
%120 = OpIAdd %int %65 %int_1
OpStore %x_54 %120
%121 = OpLoad %int %x_54
OpStore %x_53_phi %121
OpBranch %59
%60 = OpLabel
%122 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%123 = OpLoad %float %122
%124 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0
%125 = OpLoad %float %124
%126 = OpFMul %float %125 %float_0_5
%127 = OpFOrdLessThan %bool %123 %126
OpSelectionMerge %128 None
OpBranchConditional %127 %129 %130
%129 = OpLabel
%131 = OpAccessChain %_ptr_Function_float %data %int_0
%132 = OpLoad %float %131
%134 = OpAccessChain %_ptr_Function_float %data %int_5
%135 = OpLoad %float %134
%136 = OpAccessChain %_ptr_Function_float %data %int_9
%137 = OpLoad %float %136
%139 = OpFMul %float %132 %float_0_100000001
%140 = OpFMul %float %135 %float_0_100000001
%141 = OpFMul %float %137 %float_0_100000001
%143 = OpCompositeConstruct %v4float %139 %140 %141 %float_1
OpStore %x_GLF_color %143
OpBranch %128
%130 = OpLabel
%144 = OpAccessChain %_ptr_Function_float %data %int_5
%145 = OpLoad %float %144
%146 = OpAccessChain %_ptr_Function_float %data %int_9
%147 = OpLoad %float %146
%148 = OpAccessChain %_ptr_Function_float %data %int_0
%149 = OpLoad %float %148
%150 = OpFMul %float %145 %float_0_100000001
%151 = OpFMul %float %147 %float_0_100000001
%152 = OpFMul %float %149 %float_0_100000001
%153 = OpCompositeConstruct %v4float %150 %151 %152 %float_1
OpStore %x_GLF_color %153
OpBranch %128
%128 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %154
%tint_symbol_1 = OpFunctionParameter %main_out
%158 = OpLabel
%159 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %159
OpReturn
OpFunctionEnd
%main = OpFunction %void None %18
%161 = OpLabel
%162 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %162
%163 = OpFunctionCall %void %main_1
%165 = OpLoad %v4float %x_GLF_color
%166 = OpCompositeConstruct %main_out %165
%164 = OpFunctionCall %void %tint_symbol_3 %166
OpReturn
OpFunctionEnd