blob: 8577b92915d5e35bac14be153ecc3e44127411c9 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 174
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color "x_GLF_color"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_6 "x_6"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_12 "x_12"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %data "data"
OpName %a "a"
OpName %i "i"
OpName %j "j"
OpName %i_1 "i_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_6 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_12 NonWritable
OpDecorate %x_12 DescriptorSet 0
OpDecorate %x_12 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpDecorate %_arr_int_uint_5 ArrayStride 4
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_6 = OpConstant %uint 6
%_arr_int_uint_6 = OpTypeArray %int %uint_6
%buf1 = OpTypeStruct %_arr_int_uint_6
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%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_12 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%23 = OpTypeFunction %void
%uint_5 = OpConstant %uint 5
%_arr_int_uint_5 = OpTypeArray %int %uint_5
%_ptr_Function__arr_int_uint_5 = OpTypePointer Function %_arr_int_uint_5
%31 = OpConstantNull %_arr_int_uint_5
%_ptr_Function_int = OpTypePointer Function %int
%34 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_5 = OpConstant %int 5
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%bool = OpTypeBool
%_ptr_Private_float = OpTypePointer Private %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%main_out = OpTypeStruct %v4float
%161 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %23
%26 = OpLabel
%data = OpVariable %_ptr_Function__arr_int_uint_5 Function %31
%a = OpVariable %_ptr_Function_int Function %34
%i = OpVariable %_ptr_Function_int Function %34
%j = OpVariable %_ptr_Function_int Function %34
%i_1 = OpVariable %_ptr_Function_int Function %34
%41 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%42 = OpLoad %int %41
%44 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%45 = OpLoad %int %44
%46 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%47 = OpLoad %int %46
%48 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%49 = OpLoad %int %48
%50 = OpConvertSToF %float %42
%51 = OpConvertSToF %float %45
%52 = OpConvertSToF %float %47
%53 = OpConvertSToF %float %49
%54 = OpCompositeConstruct %v4float %50 %51 %52 %53
OpStore %x_GLF_color %54
%56 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%57 = OpLoad %int %56
%59 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%60 = OpLoad %int %59
%62 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%63 = OpLoad %int %62
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%66 = OpLoad %int %65
%67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%68 = OpLoad %int %67
%69 = OpCompositeConstruct %_arr_int_uint_5 %57 %60 %63 %66 %68
OpStore %data %69
%70 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%71 = OpLoad %int %70
OpStore %a %71
OpBranch %72
%72 = OpLabel
OpLoopMerge %73 %74 None
OpBranch %75
%75 = OpLabel
%76 = OpLoad %int %a
%77 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%78 = OpLoad %int %77
%79 = OpSLessThan %bool %76 %78
OpSelectionMerge %81 None
OpBranchConditional %79 %82 %83
%82 = OpLabel
OpBranch %81
%83 = OpLabel
OpBranch %73
%81 = OpLabel
%84 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%85 = OpLoad %int %84
OpStore %i %85
OpBranch %86
%86 = OpLabel
OpLoopMerge %87 %88 None
OpBranch %89
%89 = OpLabel
%90 = OpLoad %int %i
%91 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%92 = OpLoad %int %91
%93 = OpSLessThan %bool %90 %92
OpSelectionMerge %94 None
OpBranchConditional %93 %95 %96
%95 = OpLabel
OpBranch %94
%96 = OpLabel
OpBranch %87
%94 = OpLabel
%97 = OpLoad %int %i
OpStore %j %97
OpBranch %98
%98 = OpLabel
OpLoopMerge %99 %100 None
OpBranch %101
%101 = OpLabel
%102 = OpLoad %int %j
%103 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%104 = OpLoad %int %103
%105 = OpSLessThan %bool %102 %104
OpSelectionMerge %106 None
OpBranchConditional %105 %107 %108
%107 = OpLabel
OpBranch %106
%108 = OpLabel
OpBranch %99
%106 = OpLabel
%109 = OpLoad %int %i
%110 = OpAccessChain %_ptr_Function_int %data %109
%111 = OpLoad %int %110
%112 = OpLoad %int %j
%113 = OpAccessChain %_ptr_Function_int %data %112
%114 = OpLoad %int %113
%115 = OpSLessThan %bool %111 %114
OpSelectionMerge %116 None
OpBranchConditional %115 %117 %116
%117 = OpLabel
%118 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%119 = OpLoad %int %118
%120 = OpConvertSToF %float %119
%121 = OpCompositeConstruct %v4float %120 %120 %120 %120
OpStore %x_GLF_color %121
OpBranch %116
%116 = OpLabel
OpBranch %100
%100 = OpLabel
%122 = OpLoad %int %j
%123 = OpIAdd %int %122 %int_1
OpStore %j %123
OpBranch %98
%99 = OpLabel
OpBranch %88
%88 = OpLabel
%124 = OpLoad %int %i
%125 = OpIAdd %int %124 %int_1
OpStore %i %125
OpBranch %86
%87 = OpLabel
OpBranch %74
%74 = OpLabel
%126 = OpLoad %int %a
%127 = OpIAdd %int %126 %int_1
OpStore %a %127
OpBranch %72
%73 = OpLabel
OpBranch %128
%128 = OpLabel
OpLoopMerge %129 %130 None
OpBranch %131
%131 = OpLabel
%133 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%134 = OpLoad %float %133
%136 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
%137 = OpLoad %float %136
%138 = OpFOrdLessThan %bool %134 %137
OpSelectionMerge %139 None
OpBranchConditional %138 %140 %141
%140 = OpLabel
OpBranch %139
%141 = OpLabel
OpBranch %129
%139 = OpLabel
%142 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%143 = OpLoad %int %142
OpStore %i_1 %143
OpBranch %144
%144 = OpLabel
OpLoopMerge %145 %146 None
OpBranch %147
%147 = OpLabel
%148 = OpLoad %int %i_1
%149 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%150 = OpLoad %int %149
%151 = OpSLessThan %bool %148 %150
OpSelectionMerge %152 None
OpBranchConditional %151 %153 %154
%153 = OpLabel
OpBranch %152
%154 = OpLabel
OpBranch %145
%152 = OpLabel
%155 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%156 = OpLoad %int %155
%157 = OpConvertSToF %float %156
%158 = OpCompositeConstruct %v4float %157 %157 %157 %157
OpStore %x_GLF_color %158
OpBranch %146
%146 = OpLabel
%159 = OpLoad %int %i_1
%160 = OpIAdd %int %159 %int_1
OpStore %i_1 %160
OpBranch %144
%145 = OpLabel
OpBranch %130
%130 = OpLabel
OpBranch %128
%129 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %161
%tint_symbol_1 = OpFunctionParameter %main_out
%165 = OpLabel
%166 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %166
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%168 = OpLabel
%169 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %169
%170 = OpFunctionCall %void %main_1
%172 = OpLoad %v4float %x_GLF_color
%173 = OpCompositeConstruct %main_out %172
%171 = OpFunctionCall %void %tint_symbol_3 %173
OpReturn
OpFunctionEnd