blob: 2af192ce4a959c1a556cb0159baeb9de9c5b8811 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 131
; Schema: 0
OpCapability Shader
%90 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf2 "buf2"
OpMemberName %buf2 0 "zeroVec"
OpName %x_9 "x_9"
OpName %buf3 "buf3"
OpMemberName %buf3 0 "oneVec"
OpName %x_12 "x_12"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_15 "x_15"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %S "S"
OpMemberName %S 0 "numbers"
OpName %obj "obj"
OpName %a "a"
OpName %x_49 "x_49"
OpName %b "b"
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_5 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %buf2 Block
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 2
OpDecorate %buf3 Block
OpMemberDecorate %buf3 0 Offset 0
OpDecorate %x_12 NonWritable
OpDecorate %x_12 DescriptorSet 0
OpDecorate %x_12 Binding 3
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_15 NonWritable
OpDecorate %x_15 DescriptorSet 0
OpDecorate %x_15 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %S 0 Offset 0
OpDecorate %_arr_float_uint_3 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_5 = OpConstant %uint 5
%_arr_float_uint_5 = OpTypeArray %float %uint_5
%buf1 = OpTypeStruct %_arr_float_uint_5
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
%v2float = OpTypeVector %float 2
%buf2 = OpTypeStruct %v2float
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%x_9 = OpVariable %_ptr_Uniform_buf2 Uniform
%buf3 = OpTypeStruct %v2float
%_ptr_Uniform_buf3 = OpTypePointer Uniform %buf3
%x_12 = OpVariable %_ptr_Uniform_buf3 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_15 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%24 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %24
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %24
%void = OpTypeVoid
%27 = OpTypeFunction %void
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%S = OpTypeStruct %_arr_float_uint_3
%_ptr_Function_S = OpTypePointer Function %S
%36 = OpConstantNull %S
%_ptr_Function_float = OpTypePointer Function %float
%39 = OpConstantNull %float
%_ptr_Function_v2float = OpTypePointer Function %v2float
%42 = OpConstantNull %v2float
%uint_0 = OpConstant %uint 0
%int_3 = OpConstant %int 3
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_2 = OpConstant %int 2
%int_4 = OpConstant %int 4
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
%119 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %27
%30 = OpLabel
%obj = OpVariable %_ptr_Function_S Function %36
%a = OpVariable %_ptr_Function_float Function %39
%x_49 = OpVariable %_ptr_Function_v2float Function %42
%b = OpVariable %_ptr_Function_float Function %39
%47 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_3
%48 = OpLoad %float %47
%50 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
%51 = OpLoad %float %50
%53 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_4
%54 = OpLoad %float %53
%55 = OpCompositeConstruct %_arr_float_uint_3 %48 %51 %54
%56 = OpCompositeConstruct %S %55
OpStore %obj %56
%57 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_0
%58 = OpLoad %float %57
%60 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%61 = OpLoad %float %60
%62 = OpConvertFToS %int %58
%63 = OpAccessChain %_ptr_Function_float %obj %uint_0 %62
OpStore %63 %61
%64 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_0
%65 = OpLoad %float %64
%66 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%67 = OpLoad %float %66
%68 = OpFOrdGreaterThan %bool %65 %67
OpSelectionMerge %70 None
OpBranchConditional %68 %71 %72
%71 = OpLabel
%74 = OpAccessChain %_ptr_Uniform_v2float %x_9 %uint_0
%75 = OpLoad %v2float %74
OpStore %x_49 %75
OpBranch %70
%72 = OpLabel
%76 = OpAccessChain %_ptr_Uniform_v2float %x_12 %uint_0
%77 = OpLoad %v2float %76
OpStore %x_49 %77
OpBranch %70
%70 = OpLabel
%79 = OpAccessChain %_ptr_Function_float %x_49 %uint_1
%80 = OpLoad %float %79
OpStore %a %80
%81 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%82 = OpLoad %float %81
%83 = OpLoad %float %a
%85 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0 %int_0
%86 = OpLoad %int %85
%87 = OpAccessChain %_ptr_Function_float %obj %uint_0 %86
%88 = OpLoad %float %87
%89 = OpExtInst %float %90 FMix %82 %83 %88
OpStore %b %89
%91 = OpLoad %float %b
%92 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
%93 = OpLoad %float %92
%95 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
%96 = OpLoad %float %95
%97 = OpExtInst %float %90 Distance %91 %93
%98 = OpFOrdLessThan %bool %97 %96
OpSelectionMerge %99 None
OpBranchConditional %98 %100 %101
%100 = OpLabel
%102 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0 %int_0
%103 = OpLoad %int %102
%104 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0 %int_1
%105 = OpLoad %int %104
%106 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0 %int_1
%107 = OpLoad %int %106
%108 = OpAccessChain %_ptr_Uniform_int %x_15 %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 %99
%101 = OpLabel
%115 = OpAccessChain %_ptr_Uniform_int %x_15 %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 %99
%99 = 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 %27
%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