blob: 5f8230b341c0be68344aa4c509e9ae7db7cc0cde [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 175
; Schema: 0
OpCapability Shader
%96 = 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_int_values"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_15 "x_15"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %m0 "m0"
OpName %m1 "m1"
OpName %undefined "undefined"
OpName %defined "defined"
OpName %v0 "v0"
OpName %v1 "v1"
OpName %v2 "v2"
OpName %v3 "v3"
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_12 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_float_uint_1 ArrayStride 16
OpDecorate %x_15 NonWritable
OpDecorate %x_15 DescriptorSet 0
OpDecorate %x_15 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_12 = OpConstant %uint 12
%_arr_int_uint_12 = OpTypeArray %int %uint_12
%buf1 = OpTypeStruct %_arr_int_uint_12
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%12 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
%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_15 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
%void = OpTypeVoid
%20 = OpTypeFunction %void
%mat3v4float = OpTypeMatrix %v4float 3
%_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float
%27 = OpConstantNull %mat3v4float
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%32 = OpConstantNull %v3float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint_0 = OpConstant %uint 0
%int_4 = OpConstant %int 4
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_5 = OpConstant %int 5
%int_6 = OpConstant %int 6
%int_10 = OpConstant %int 10
%int_7 = OpConstant %int 7
%int_8 = OpConstant %int 8
%int_11 = OpConstant %int 11
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%float_4 = OpConstant %float 4
%float_8 = OpConstant %float 8
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%98 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%v3int = OpTypeVector %int 3
%int_500 = OpConstant %int 500
%101 = OpConstantComposite %v3int %int_500 %int_500 %int_500
%int_0 = OpConstant %int 0
%_ptr_Function_float = OpTypePointer Function %float
%bool = OpTypeBool
%int_9 = OpConstant %int 9
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Private_float = OpTypePointer Private %float
%main_out = OpTypeStruct %v4float
%163 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%m0 = OpVariable %_ptr_Function_mat3v4float Function %27
%m1 = OpVariable %_ptr_Function_mat3v4float Function %27
%undefined = OpVariable %_ptr_Function_v3float Function %32
%defined = OpVariable %_ptr_Function_v3float Function %32
%v0 = OpVariable %_ptr_Function_v4float Function %12
%v1 = OpVariable %_ptr_Function_v4float Function %12
%v2 = OpVariable %_ptr_Function_v4float Function %12
%v3 = OpVariable %_ptr_Function_v4float Function %12
%42 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%43 = OpLoad %int %42
%45 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%46 = OpLoad %int %45
%48 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
%49 = OpLoad %int %48
%51 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_10
%52 = OpLoad %int %51
%54 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_7
%55 = OpLoad %int %54
%57 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_8
%58 = OpLoad %int %57
%60 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
%61 = OpLoad %int %60
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%64 = OpLoad %int %63
%66 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%67 = OpLoad %int %66
%69 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%70 = OpLoad %int %69
%71 = OpConvertSToF %float %43
%72 = OpConvertSToF %float %46
%73 = OpConvertSToF %float %49
%75 = OpCompositeConstruct %v4float %71 %72 %73 %float_4
%76 = OpConvertSToF %float %52
%77 = OpConvertSToF %float %55
%78 = OpConvertSToF %float %58
%80 = OpCompositeConstruct %v4float %76 %77 %78 %float_8
%81 = OpConvertSToF %float %61
%82 = OpConvertSToF %float %64
%83 = OpConvertSToF %float %67
%84 = OpConvertSToF %float %70
%85 = OpCompositeConstruct %v4float %81 %82 %83 %84
%86 = OpCompositeConstruct %mat3v4float %75 %80 %85
OpStore %m0 %86
%87 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%88 = OpLoad %int %87
%89 = OpConvertSToF %float %88
%91 = OpCompositeConstruct %v4float %89 %float_0 %float_0 %float_0
%92 = OpCompositeConstruct %v4float %float_0 %89 %float_0 %float_0
%93 = OpCompositeConstruct %v4float %float_0 %float_0 %89 %float_0
%94 = OpCompositeConstruct %mat3v4float %91 %92 %93
OpStore %m1 %94
%95 = OpExtInst %v3float %96 Ldexp %98 %101
OpStore %undefined %95
%102 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%103 = OpLoad %int %102
%104 = OpConvertSToF %float %103
%106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%107 = OpLoad %int %106
%109 = OpCompositeConstruct %v3float %104 %104 %104
%110 = OpCompositeConstruct %v3int %107 %107 %107
%108 = OpExtInst %v3float %96 Ldexp %109 %110
OpStore %defined %108
%111 = OpLoad %mat3v4float %m0
%112 = OpLoad %v3float %undefined
%113 = OpMatrixTimesVector %v4float %111 %112
OpStore %v0 %113
%114 = OpLoad %mat3v4float %m1
%115 = OpLoad %v3float %undefined
%116 = OpMatrixTimesVector %v4float %114 %115
OpStore %v1 %116
%117 = OpLoad %mat3v4float %m0
%118 = OpLoad %v3float %defined
%119 = OpMatrixTimesVector %v4float %117 %118
OpStore %v2 %119
%120 = OpLoad %mat3v4float %m1
%121 = OpLoad %v3float %defined
%122 = OpMatrixTimesVector %v4float %120 %121
OpStore %v3 %122
%124 = OpAccessChain %_ptr_Function_float %v2 %uint_0
%125 = OpLoad %float %124
%126 = OpAccessChain %_ptr_Function_float %v3 %uint_0
%127 = OpLoad %float %126
%128 = OpFOrdGreaterThan %bool %125 %127
OpSelectionMerge %130 None
OpBranchConditional %128 %131 %132
%131 = OpLabel
%133 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%134 = OpLoad %int %133
%136 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
%137 = OpLoad %int %136
%138 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
%139 = OpLoad %int %138
%140 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%141 = OpLoad %int %140
%142 = OpConvertSToF %float %134
%143 = OpConvertSToF %float %137
%144 = OpConvertSToF %float %139
%145 = OpConvertSToF %float %141
%146 = OpCompositeConstruct %v4float %142 %143 %144 %145
OpStore %x_GLF_color %146
OpBranch %130
%132 = OpLabel
%147 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
%148 = OpLoad %int %147
%149 = OpConvertSToF %float %148
%150 = OpCompositeConstruct %v4float %149 %149 %149 %149
OpStore %x_GLF_color %150
OpBranch %130
%130 = OpLabel
%151 = OpAccessChain %_ptr_Function_float %v0 %uint_0
%152 = OpLoad %float %151
%153 = OpAccessChain %_ptr_Function_float %v1 %uint_0
%154 = OpLoad %float %153
%155 = OpFOrdLessThan %bool %152 %154
OpSelectionMerge %156 None
OpBranchConditional %155 %157 %156
%157 = OpLabel
%159 = OpAccessChain %_ptr_Uniform_float %x_15 %uint_0 %int_0
%160 = OpLoad %float %159
%162 = OpAccessChain %_ptr_Private_float %x_GLF_color %uint_1
OpStore %162 %160
OpBranch %156
%156 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %163
%tint_symbol = OpFunctionParameter %main_out
%167 = OpLabel
%168 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %168
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%170 = OpLabel
%171 = OpFunctionCall %void %main_1
%173 = OpLoad %v4float %x_GLF_color
%174 = OpCompositeConstruct %main_out %173
%172 = OpFunctionCall %void %tint_symbol_2 %174
OpReturn
OpFunctionEnd