blob: 84dd1746994cfaef8d199a44577fb46c426371b5 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 152
; Schema: 0
OpCapability Shader
%46 = 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_6 "x_6"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_10 "x_10"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %a "a"
OpName %v1 "v1"
OpName %E "E"
OpName %x_69 "x_69"
OpName %x_85 "x_85"
OpName %x_101 "x_101"
OpName %x_70_phi "x_70_phi"
OpName %x_86_phi "x_86_phi"
OpName %x_102_phi "x_102_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_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_4 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
%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_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%int = OpTypeInt 32 1
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf0 = OpTypeStruct %_arr_int_uint_4
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_10 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%16 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %16
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %16
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_ptr_Function_uint = OpTypePointer Function %uint
%25 = OpConstantNull %uint
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_ptr_Function_float = OpTypePointer Function %float
%30 = OpConstantNull %float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%34 = OpConstantNull %bool
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%main_out = OpTypeStruct %v4float
%140 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %19
%22 = OpLabel
%a = OpVariable %_ptr_Function_uint Function %25
%v1 = OpVariable %_ptr_Function_v4float Function %16
%E = OpVariable %_ptr_Function_float Function %30
%x_69 = OpVariable %_ptr_Function_bool Function %34
%x_85 = OpVariable %_ptr_Function_bool Function %34
%x_101 = OpVariable %_ptr_Function_bool Function %34
%x_70_phi = OpVariable %_ptr_Function_bool Function %34
%x_86_phi = OpVariable %_ptr_Function_bool Function %34
%x_102_phi = OpVariable %_ptr_Function_bool Function %34
%43 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%44 = OpLoad %float %43
%47 = OpCompositeConstruct %v4float %44 %44 %44 %44
%45 = OpExtInst %uint %46 PackSnorm4x8 %47
OpStore %a %45
%48 = OpLoad %uint %a
%49 = OpExtInst %v4float %46 UnpackUnorm4x8 %48
OpStore %v1 %49
%51 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%52 = OpLoad %float %51
OpStore %E %52
%54 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%55 = OpLoad %int %54
%56 = OpAccessChain %_ptr_Function_float %v1 %55
%57 = OpLoad %float %56
%59 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%60 = OpLoad %float %59
%62 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
%63 = OpLoad %float %62
%64 = OpLoad %float %E
%66 = OpFDiv %float %60 %63
%67 = OpFSub %float %57 %66
%65 = OpExtInst %float %46 FAbs %67
%68 = OpFOrdLessThan %bool %65 %64
OpStore %x_70_phi %68
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %69
%70 = OpLabel
%71 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%72 = OpLoad %int %71
%73 = OpAccessChain %_ptr_Function_float %v1 %72
%74 = OpLoad %float %73
%75 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%76 = OpLoad %float %75
%77 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
%78 = OpLoad %float %77
%79 = OpLoad %float %E
%81 = OpFDiv %float %76 %78
%82 = OpFSub %float %74 %81
%80 = OpExtInst %float %46 FAbs %82
%83 = OpFOrdLessThan %bool %80 %79
OpStore %x_69 %83
%84 = OpLoad %bool %x_69
OpStore %x_70_phi %84
OpBranch %69
%69 = OpLabel
%85 = OpLoad %bool %x_70_phi
OpStore %x_86_phi %85
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %86
%87 = OpLabel
%88 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%89 = OpLoad %int %88
%90 = OpAccessChain %_ptr_Function_float %v1 %89
%91 = OpLoad %float %90
%92 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%93 = OpLoad %float %92
%94 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
%95 = OpLoad %float %94
%96 = OpLoad %float %E
%98 = OpFDiv %float %93 %95
%99 = OpFSub %float %91 %98
%97 = OpExtInst %float %46 FAbs %99
%100 = OpFOrdLessThan %bool %97 %96
OpStore %x_85 %100
%101 = OpLoad %bool %x_85
OpStore %x_86_phi %101
OpBranch %86
%86 = OpLabel
%102 = OpLoad %bool %x_86_phi
OpStore %x_102_phi %102
OpSelectionMerge %103 None
OpBranchConditional %102 %104 %103
%104 = OpLabel
%105 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%106 = OpLoad %int %105
%107 = OpAccessChain %_ptr_Function_float %v1 %106
%108 = OpLoad %float %107
%109 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%110 = OpLoad %float %109
%111 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
%112 = OpLoad %float %111
%113 = OpLoad %float %E
%115 = OpFDiv %float %110 %112
%116 = OpFSub %float %108 %115
%114 = OpExtInst %float %46 FAbs %116
%117 = OpFOrdLessThan %bool %114 %113
OpStore %x_101 %117
%118 = OpLoad %bool %x_101
OpStore %x_102_phi %118
OpBranch %103
%103 = OpLabel
%119 = OpLoad %bool %x_102_phi
OpSelectionMerge %120 None
OpBranchConditional %119 %121 %122
%121 = OpLabel
%123 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%124 = OpLoad %int %123
%125 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%126 = OpLoad %int %125
%127 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%128 = OpLoad %int %127
%129 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%130 = OpLoad %int %129
%131 = OpConvertSToF %float %124
%132 = OpConvertSToF %float %126
%133 = OpConvertSToF %float %128
%134 = OpConvertSToF %float %130
%135 = OpCompositeConstruct %v4float %131 %132 %133 %134
OpStore %x_GLF_color %135
OpBranch %120
%122 = OpLabel
%136 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%137 = OpLoad %int %136
%138 = OpConvertSToF %float %137
%139 = OpCompositeConstruct %v4float %138 %138 %138 %138
OpStore %x_GLF_color %139
OpBranch %120
%120 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %140
%tint_symbol = OpFunctionParameter %main_out
%144 = OpLabel
%145 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %145
OpReturn
OpFunctionEnd
%main = OpFunction %void None %19
%147 = OpLabel
%148 = OpFunctionCall %void %main_1
%150 = OpLoad %v4float %x_GLF_color
%151 = OpCompositeConstruct %main_out %150
%149 = OpFunctionCall %void %tint_symbol_2 %151
OpReturn
OpFunctionEnd