blob: 862ad1ad8a1051ee69b205531ddc45fe4a4b682f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 131
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color "x_GLF_color"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_12 "x_12"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %func_f1_ "func_f1_"
OpName %b "b"
OpName %main_1 "main_1"
OpName %a "a"
OpName %param "param"
OpName %param_1 "param_1"
OpName %x_71 "x_71"
OpName %x_72_phi "x_72_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_4 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_12 NonWritable
OpDecorate %x_12 DescriptorSet 0
OpDecorate %x_12 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_float_uint_4 = OpTypeArray %float %uint_4
%buf1 = OpTypeStruct %_arr_float_uint_4
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
%int = OpTypeInt 32 1
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_12 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Function_float = OpTypePointer Function %float
%20 = OpTypeFunction %float %_ptr_Function_float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%void = OpTypeVoid
%51 = OpTypeFunction %void
%56 = OpConstantNull %float
%_ptr_Function_bool = OpTypePointer Function %bool
%61 = OpConstantNull %bool
%int_3 = OpConstant %int 3
%v4bool = OpTypeVector %bool 4
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%119 = OpTypeFunction %void %main_out
%func_f1_ = OpFunction %float None %20
%b = OpFunctionParameter %_ptr_Function_float
%24 = OpLabel
%28 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%29 = OpLoad %float %28
%30 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%31 = OpLoad %float %30
%33 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%34 = OpLoad %float %33
%36 = OpCompositeConstruct %v4float %29 %31 %34 %float_1
OpStore %x_GLF_color %36
%37 = OpLoad %v4float %x_GLF_color
OpStore %x_GLF_color %37
%38 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%39 = OpLoad %float %38
%41 = OpLoad %float %b
%42 = OpFOrdGreaterThanEqual %bool %39 %41
OpSelectionMerge %44 None
OpBranchConditional %42 %45 %44
%45 = OpLabel
%46 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%47 = OpLoad %float %46
OpReturnValue %47
%44 = OpLabel
%49 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
%50 = OpLoad %float %49
OpReturnValue %50
OpFunctionEnd
%main_1 = OpFunction %void None %51
%54 = OpLabel
%a = OpVariable %_ptr_Function_float Function %56
%param = OpVariable %_ptr_Function_float Function %56
%param_1 = OpVariable %_ptr_Function_float Function %56
%x_71 = OpVariable %_ptr_Function_bool Function %61
%x_72_phi = OpVariable %_ptr_Function_bool Function %61
%63 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%64 = OpLoad %float %63
OpStore %param %64
%65 = OpFunctionCall %float %func_f1_ %param
OpStore %a %65
%67 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%68 = OpLoad %float %67
%69 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%70 = OpLoad %float %69
%71 = OpFAdd %float %68 %70
OpStore %param_1 %71
%72 = OpFunctionCall %float %func_f1_ %param_1
%74 = OpLoad %float %a
%75 = OpFAdd %float %74 %72
OpStore %a %75
%76 = OpLoad %float %a
%78 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_3
%79 = OpLoad %float %78
%80 = OpFOrdEqual %bool %76 %79
OpStore %x_72_phi %80
OpSelectionMerge %81 None
OpBranchConditional %80 %82 %81
%82 = OpLabel
%83 = OpLoad %v4float %x_GLF_color
%84 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%85 = OpLoad %float %84
%86 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%87 = OpLoad %float %86
%88 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%89 = OpLoad %float %88
%90 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%91 = OpLoad %float %90
%93 = OpCompositeConstruct %v4float %85 %87 %89 %91
%94 = OpFOrdEqual %v4bool %83 %93
%92 = OpAll %bool %94
OpStore %x_71 %92
%96 = OpLoad %bool %x_71
OpStore %x_72_phi %96
OpBranch %81
%81 = OpLabel
%97 = OpLoad %bool %x_72_phi
OpSelectionMerge %98 None
OpBranchConditional %97 %99 %100
%99 = OpLabel
%102 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
%103 = OpLoad %int %102
%104 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_1
%105 = OpLoad %int %104
%106 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_1
%107 = OpLoad %int %106
%108 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
%109 = OpLoad %int %108
%110 = OpConvertSToF %float %103
%111 = OpConvertSToF %float %105
%112 = OpConvertSToF %float %107
%113 = OpConvertSToF %float %109
%114 = OpCompositeConstruct %v4float %110 %111 %112 %113
OpStore %x_GLF_color %114
OpBranch %98
%100 = OpLabel
%115 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_1
%116 = OpLoad %int %115
%117 = OpConvertSToF %float %116
%118 = OpCompositeConstruct %v4float %117 %117 %117 %117
OpStore %x_GLF_color %118
OpBranch %98
%98 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %119
%tint_symbol = OpFunctionParameter %main_out
%123 = OpLabel
%124 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %124
OpReturn
OpFunctionEnd
%main = OpFunction %void None %51
%126 = OpLabel
%127 = OpFunctionCall %void %main_1
%129 = OpLoad %v4float %x_GLF_color
%130 = OpCompositeConstruct %main_out %129
%128 = OpFunctionCall %void %tint_symbol_2 %130
OpReturn
OpFunctionEnd