blob: 5a7ff67a50d06d8fe501a2258fbdd193bcfd6512 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 177
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %sk_Clockwise_param_1 %vcolor_S0_param_1 %sk_FragColor_1_1
OpExecutionMode %main OriginUpperLeft
OpName %sk_Clockwise_param_1 "sk_Clockwise_param_1"
OpName %vcolor_S0_param_1 "vcolor_S0_param_1"
OpName %sk_FragColor_1_1 "sk_FragColor_1_1"
OpName %x_4_block "x_4_block"
OpMemberName %x_4_block 0 "inner"
OpName %UniformBuffer "UniformBuffer"
OpMemberName %UniformBuffer 0 "unknownInput_S1_c0"
OpMemberName %UniformBuffer 1 "ucolorRed_S1_c0"
OpMemberName %UniformBuffer 2 "ucolorGreen_S1_c0"
OpMemberName %UniformBuffer 3 "umatrix_S1"
OpName %x_4 "x_4"
OpName %sk_FragColor "sk_FragColor"
OpName %sk_Clockwise "sk_Clockwise"
OpName %vcolor_S0 "vcolor_S0"
OpName %test_int_S1_c0_b "test_int_S1_c0_b"
OpName %unknown "unknown"
OpName %ok "ok"
OpName %val "val"
OpName %x_40 "x_40"
OpName %x_41 "x_41"
OpName %x_54 "x_54"
OpName %x_55 "x_55"
OpName %x_65 "x_65"
OpName %x_66 "x_66"
OpName %main_1 "main_1"
OpName %outputColor_S0 "outputColor_S0"
OpName %output_S1 "output_S1"
OpName %x_8_unknown "x_8_unknown"
OpName %x_9_ok "x_9_ok"
OpName %x_10_val "x_10_val"
OpName %x_116 "x_116"
OpName %x_86 "x_86"
OpName %x_87 "x_87"
OpName %x_99 "x_99"
OpName %x_100 "x_100"
OpName %x_110 "x_110"
OpName %x_111 "x_111"
OpName %x_114 "x_114"
OpName %x_115 "x_115"
OpName %main_out "main_out"
OpMemberName %main_out 0 "sk_FragColor_1"
OpName %main_inner "main_inner"
OpName %sk_Clockwise_param "sk_Clockwise_param"
OpName %vcolor_S0_param "vcolor_S0_param"
OpName %main "main"
OpDecorate %sk_Clockwise_param_1 BuiltIn FrontFacing
OpDecorate %vcolor_S0_param_1 Location 0
OpDecorate %sk_FragColor_1_1 Location 0
OpDecorate %x_4_block Block
OpMemberDecorate %x_4_block 0 Offset 0
OpMemberDecorate %UniformBuffer 0 Offset 16
OpMemberDecorate %UniformBuffer 1 Offset 32
OpMemberDecorate %UniformBuffer 2 Offset 48
OpMemberDecorate %UniformBuffer 3 Offset 64
OpMemberDecorate %UniformBuffer 3 ColMajor
OpMemberDecorate %UniformBuffer 3 MatrixStride 16
OpDecorate %x_4 NonWritable
OpDecorate %x_4 Binding 0
OpDecorate %x_4 DescriptorSet 0
OpMemberDecorate %main_out 0 Offset 0
%bool = OpTypeBool
%_ptr_Input_bool = OpTypePointer Input %bool
%sk_Clockwise_param_1 = OpVariable %_ptr_Input_bool Input
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%vcolor_S0_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%10 = OpConstantNull %v4float
%sk_FragColor_1_1 = OpVariable %_ptr_Output_v4float Output %10
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%UniformBuffer = OpTypeStruct %float %v4float %v4float %mat3v3float
%x_4_block = OpTypeStruct %UniformBuffer
%_ptr_Uniform_x_4_block = OpTypePointer Uniform %x_4_block
%x_4 = OpVariable %_ptr_Uniform_x_4_block Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%sk_FragColor = OpVariable %_ptr_Private_v4float Private %10
%_ptr_Private_bool = OpTypePointer Private %bool
%21 = OpConstantNull %bool
%sk_Clockwise = OpVariable %_ptr_Private_bool Private %21
%vcolor_S0 = OpVariable %_ptr_Private_v4float Private %10
%23 = OpTypeFunction %bool
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%29 = OpConstantNull %int
%_ptr_Function_bool = OpTypePointer Function %bool
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
%35 = OpConstantNull %v4int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%true = OpConstantTrue %bool
%v4bool = OpTypeVector %bool 4
%int_1 = OpConstant %int 1
%60 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%int_2 = OpConstant %int 2
%73 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%void = OpTypeVoid
%86 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_ptr_Function_float = OpTypePointer Function %float
%95 = OpConstantNull %float
%float_1 = OpConstant %float 1
%120 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%float_2 = OpConstant %float 2
%133 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float
%162 = OpTypeFunction %main_out %bool %v4float
%test_int_S1_c0_b = OpFunction %bool None %23
%25 = OpLabel
%unknown = OpVariable %_ptr_Function_int Function %29
%ok = OpVariable %_ptr_Function_bool Function %21
%val = OpVariable %_ptr_Function_v4int Function %35
%x_40 = OpVariable %_ptr_Function_bool Function %21
%x_41 = OpVariable %_ptr_Function_bool Function %21
%x_54 = OpVariable %_ptr_Function_bool Function %21
%x_55 = OpVariable %_ptr_Function_bool Function %21
%x_65 = OpVariable %_ptr_Function_bool Function %21
%x_66 = OpVariable %_ptr_Function_bool Function %21
%45 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 %uint_0
%46 = OpLoad %float %45
%47 = OpConvertFToS %int %46
OpStore %unknown %47
OpStore %ok %true
OpStore %x_41 %21
OpSelectionMerge %49 None
OpBranchConditional %true %50 %49
%50 = OpLabel
%52 = OpCompositeConstruct %v4int %47 %47 %47 %47
%53 = OpSDiv %v4int %35 %52
%54 = OpIEqual %v4bool %53 %35
%51 = OpAll %bool %54
OpStore %x_40 %51
%56 = OpLoad %bool %x_40
OpStore %x_41 %56
OpBranch %49
%49 = OpLabel
%57 = OpLoad %bool %x_41
OpStore %ok %57
%58 = OpCompositeConstruct %v4int %47 %47 %47 %47
OpStore %val %58
%61 = OpIAdd %v4int %58 %60
OpStore %val %61
%62 = OpISub %v4int %61 %60
OpStore %val %62
%63 = OpIAdd %v4int %62 %60
OpStore %val %63
%64 = OpISub %v4int %63 %60
OpStore %val %64
OpStore %x_55 %21
%65 = OpLoad %bool %x_41
OpSelectionMerge %66 None
OpBranchConditional %65 %67 %66
%67 = OpLabel
%69 = OpIEqual %v4bool %64 %58
%68 = OpAll %bool %69
OpStore %x_54 %68
%70 = OpLoad %bool %x_54
OpStore %x_55 %70
OpBranch %66
%66 = OpLabel
%71 = OpLoad %bool %x_55
OpStore %ok %71
%74 = OpIMul %v4int %64 %73
OpStore %val %74
%75 = OpSDiv %v4int %74 %73
OpStore %val %75
%76 = OpIMul %v4int %75 %73
OpStore %val %76
%77 = OpSDiv %v4int %76 %73
OpStore %val %77
OpStore %x_66 %21
%78 = OpLoad %bool %x_55
OpSelectionMerge %79 None
OpBranchConditional %78 %80 %79
%80 = OpLabel
%82 = OpIEqual %v4bool %77 %58
%81 = OpAll %bool %82
OpStore %x_65 %81
%83 = OpLoad %bool %x_65
OpStore %x_66 %83
OpBranch %79
%79 = OpLabel
%84 = OpLoad %bool %x_66
OpStore %ok %84
%85 = OpLoad %bool %x_66
OpReturnValue %85
OpFunctionEnd
%main_1 = OpFunction %void None %86
%89 = OpLabel
%outputColor_S0 = OpVariable %_ptr_Function_v4float Function %10
%output_S1 = OpVariable %_ptr_Function_v4float Function %10
%x_8_unknown = OpVariable %_ptr_Function_float Function %95
%x_9_ok = OpVariable %_ptr_Function_bool Function %21
%x_10_val = OpVariable %_ptr_Function_v4float Function %10
%x_116 = OpVariable %_ptr_Function_v4float Function %10
%x_86 = OpVariable %_ptr_Function_bool Function %21
%x_87 = OpVariable %_ptr_Function_bool Function %21
%x_99 = OpVariable %_ptr_Function_bool Function %21
%x_100 = OpVariable %_ptr_Function_bool Function %21
%x_110 = OpVariable %_ptr_Function_bool Function %21
%x_111 = OpVariable %_ptr_Function_bool Function %21
%x_114 = OpVariable %_ptr_Function_bool Function %21
%x_115 = OpVariable %_ptr_Function_bool Function %21
%107 = OpLoad %v4float %vcolor_S0
OpStore %outputColor_S0 %107
%108 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 %uint_0
%109 = OpLoad %float %108
OpStore %x_8_unknown %109
OpStore %x_9_ok %true
OpStore %x_87 %21
OpSelectionMerge %110 None
OpBranchConditional %true %111 %110
%111 = OpLabel
%113 = OpCompositeConstruct %v4float %109 %109 %109 %109
%114 = OpFDiv %v4float %10 %113
%115 = OpFOrdEqual %v4bool %114 %10
%112 = OpAll %bool %115
OpStore %x_86 %112
%116 = OpLoad %bool %x_86
OpStore %x_87 %116
OpBranch %110
%110 = OpLabel
%117 = OpLoad %bool %x_87
OpStore %x_9_ok %117
%118 = OpCompositeConstruct %v4float %109 %109 %109 %109
OpStore %x_10_val %118
%121 = OpFAdd %v4float %118 %120
OpStore %x_10_val %121
%122 = OpFSub %v4float %121 %120
OpStore %x_10_val %122
%123 = OpFAdd %v4float %122 %120
OpStore %x_10_val %123
%124 = OpFSub %v4float %123 %120
OpStore %x_10_val %124
OpStore %x_100 %21
%125 = OpLoad %bool %x_87
OpSelectionMerge %126 None
OpBranchConditional %125 %127 %126
%127 = OpLabel
%129 = OpFOrdEqual %v4bool %124 %118
%128 = OpAll %bool %129
OpStore %x_99 %128
%130 = OpLoad %bool %x_99
OpStore %x_100 %130
OpBranch %126
%126 = OpLabel
%131 = OpLoad %bool %x_100
OpStore %x_9_ok %131
%134 = OpFMul %v4float %124 %133
OpStore %x_10_val %134
%135 = OpFDiv %v4float %134 %133
OpStore %x_10_val %135
%136 = OpFMul %v4float %135 %133
OpStore %x_10_val %136
%137 = OpFDiv %v4float %136 %133
OpStore %x_10_val %137
OpStore %x_111 %21
%138 = OpLoad %bool %x_100
OpSelectionMerge %139 None
OpBranchConditional %138 %140 %139
%140 = OpLabel
%142 = OpFOrdEqual %v4bool %137 %118
%141 = OpAll %bool %142
OpStore %x_110 %141
%143 = OpLoad %bool %x_110
OpStore %x_111 %143
OpBranch %139
%139 = OpLabel
%144 = OpLoad %bool %x_111
OpStore %x_9_ok %144
OpStore %x_115 %21
%145 = OpLoad %bool %x_111
OpSelectionMerge %146 None
OpBranchConditional %145 %147 %146
%147 = OpLabel
%148 = OpFunctionCall %bool %test_int_S1_c0_b
OpStore %x_114 %148
%149 = OpLoad %bool %x_114
OpStore %x_115 %149
OpBranch %146
%146 = OpLabel
%150 = OpLoad %bool %x_115
OpSelectionMerge %151 None
OpBranchConditional %150 %152 %153
%152 = OpLabel
%156 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_0 %uint_2
%157 = OpLoad %v4float %156
OpStore %x_116 %157
OpBranch %151
%153 = OpLabel
%159 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_0 %uint_1
%160 = OpLoad %v4float %159
OpStore %x_116 %160
OpBranch %151
%151 = OpLabel
%161 = OpLoad %v4float %x_116
OpStore %output_S1 %161
OpStore %sk_FragColor %161
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %162
%sk_Clockwise_param = OpFunctionParameter %bool
%vcolor_S0_param = OpFunctionParameter %v4float
%167 = OpLabel
OpStore %sk_Clockwise %sk_Clockwise_param
OpStore %vcolor_S0 %vcolor_S0_param
%168 = OpFunctionCall %void %main_1
%169 = OpLoad %v4float %sk_FragColor
%170 = OpCompositeConstruct %main_out %169
OpReturnValue %170
OpFunctionEnd
%main = OpFunction %void None %86
%172 = OpLabel
%174 = OpLoad %bool %sk_Clockwise_param_1
%175 = OpLoad %v4float %vcolor_S0_param_1
%173 = OpFunctionCall %main_out %main_inner %174 %175
%176 = OpCompositeExtract %v4float %173 0
OpStore %sk_FragColor_1_1 %176
OpReturn
OpFunctionEnd