blob: a8b7c7b3a84f74aa3e7a5c904cada08a350183a7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 131
; Schema: 0
OpCapability Shader
%37 = OpExtInstImport "GLSL.std.450"
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_int_values"
OpName %x_8 "x_8"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_10 "x_10"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %f0 "f0"
OpName %s1 "s1"
OpName %f1 "f1"
OpName %x_72 "x_72"
OpName %x_73_phi "x_73_phi"
OpName %x_62 "x_62"
OpName %x_71 "x_71"
OpName %x_63_phi "x_63_phi"
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_int_uint_2 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 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
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_10 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%26 = OpConstantNull %float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%32 = OpConstantNull %bool
%float_10 = OpConstant %float 10
%float_9_99999997en07 = OpConstant %float 9.99999997e-07
%float_0x1_b38fb8pn127 = OpConstant %float 0x1.b38fb8p-127
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%float_0_99000001 = OpConstant %float 0.99000001
%float_0_00999999978 = OpConstant %float 0.00999999978
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%main_out = OpTypeStruct %v4float
%119 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%f0 = OpVariable %_ptr_Function_float Function %26
%s1 = OpVariable %_ptr_Function_float Function %26
%f1 = OpVariable %_ptr_Function_float Function %26
%x_72 = OpVariable %_ptr_Function_bool Function %32
%x_73_phi = OpVariable %_ptr_Function_bool Function %32
%x_62 = OpVariable %_ptr_Function_bool Function %32
%x_71 = OpVariable %_ptr_Function_bool Function %32
%x_63_phi = OpVariable %_ptr_Function_bool Function %32
%x_72_phi = OpVariable %_ptr_Function_bool Function %32
%38 = OpFDiv %float %float_10 %float_9_99999997en07
%36 = OpExtInst %float %37 Floor %38
%39 = OpFMul %float %float_9_99999997en07 %36
%40 = OpFSub %float %float_10 %39
OpStore %f0 %40
OpStore %s1 %float_0x1_b38fb8pn127
%42 = OpLoad %float %s1
%44 = OpFOrdEqual %bool %42 %float_0
OpSelectionMerge %45 None
OpBranchConditional %44 %46 %45
%46 = OpLabel
OpStore %s1 %float_1
OpBranch %45
%45 = OpLabel
%52 = OpLoad %float %s1
%54 = OpFDiv %float %float_10 %52
%53 = OpExtInst %float %37 Floor %54
%55 = OpFMul %float %52 %53
%56 = OpFSub %float %float_10 %55
OpStore %f1 %56
%57 = OpLoad %float %f1
%58 = OpLoad %float %s1
%59 = OpIsInf %bool %57
%60 = OpFOrdEqual %bool %58 %float_1
%61 = OpLogicalOr %bool %59 %60
OpStore %x_73_phi %61
%62 = OpLogicalNot %bool %61
OpSelectionMerge %63 None
OpBranchConditional %62 %64 %63
%64 = OpLabel
%65 = OpLoad %float %f0
%66 = OpLoad %float %f1
%67 = OpFOrdEqual %bool %65 %66
OpStore %x_63_phi %67
%68 = OpLogicalNot %bool %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %69
%70 = OpLabel
%71 = OpLoad %float %f0
%72 = OpLoad %float %f0
%74 = OpFOrdGreaterThan %bool %71 %float_0_99000001
%76 = OpFOrdLessThan %bool %72 %float_0_00999999978
%77 = OpLogicalAnd %bool %74 %76
OpStore %x_62 %77
%78 = OpLoad %bool %x_62
OpStore %x_63_phi %78
OpBranch %69
%69 = OpLabel
%79 = OpLoad %bool %x_63_phi
OpStore %x_72_phi %79
%80 = OpLogicalNot %bool %79
OpSelectionMerge %81 None
OpBranchConditional %80 %82 %81
%82 = OpLabel
%83 = OpLoad %float %f1
%84 = OpLoad %float %f1
%85 = OpFOrdGreaterThan %bool %83 %float_0_99000001
%86 = OpFOrdLessThan %bool %84 %float_0_00999999978
%87 = OpLogicalAnd %bool %85 %86
OpStore %x_71 %87
%88 = OpLoad %bool %x_71
OpStore %x_72_phi %88
OpBranch %81
%81 = OpLabel
%89 = OpLoad %bool %x_72_phi
OpStore %x_72 %89
%90 = OpLoad %bool %x_72
OpStore %x_73_phi %90
OpBranch %63
%63 = OpLabel
%91 = OpLoad %bool %x_73_phi
%92 = OpLoad %float %f1
%93 = OpFOrdEqual %bool %92 %float_10
%94 = OpLogicalOr %bool %91 %93
OpSelectionMerge %95 None
OpBranchConditional %94 %96 %97
%96 = OpLabel
%101 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%102 = OpLoad %int %101
%104 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%105 = OpLoad %int %104
%106 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%107 = OpLoad %int %106
%108 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%109 = OpLoad %int %108
%110 = OpConvertSToF %float %102
%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 %95
%97 = OpLabel
%115 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%116 = OpLoad %int %115
%117 = OpConvertSToF %float %116
%118 = OpCompositeConstruct %v4float %117 %117 %117 %117
OpStore %x_GLF_color %118
OpBranch %95
%95 = 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 %20
%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