blob: 35f7480b0426097ec05a29dff9ccc28f1923873e [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 141
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %arr "arr"
OpName %index "index"
OpName %x_76 "x_76"
OpName %x_86 "x_86"
OpName %x_77_phi "x_77_phi"
OpName %x_87_phi "x_87_phi"
OpName %x_51 "x_51"
OpName %x_52_phi "x_52_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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_6 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpDecorate %_arr_int_uint_3 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_6 = OpConstant %uint 6
%_arr_int_uint_6 = OpTypeArray %int %uint_6
%buf0 = OpTypeStruct %_arr_int_uint_6
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 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
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
%void = OpTypeVoid
%15 = OpTypeFunction %void
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%_ptr_Function__arr_int_uint_3 = OpTypePointer Function %_arr_int_uint_3
%23 = OpConstantNull %_arr_int_uint_3
%_ptr_Function_int = OpTypePointer Function %int
%26 = OpConstantNull %int
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%30 = OpConstantNull %bool
%uint_0 = OpConstant %uint 0
%int_3 = OpConstant %int 3
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_5 = OpConstant %int 5
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%true = OpConstantTrue %bool
%int_0 = OpConstant %int 0
%int_4 = OpConstant %int 4
%main_out = OpTypeStruct %v4float
%129 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%arr = OpVariable %_ptr_Function__arr_int_uint_3 Function %23
%index = OpVariable %_ptr_Function_int Function %26
%x_76 = OpVariable %_ptr_Function_bool Function %30
%x_86 = OpVariable %_ptr_Function_bool Function %30
%x_77_phi = OpVariable %_ptr_Function_bool Function %30
%x_87_phi = OpVariable %_ptr_Function_bool Function %30
%x_51 = OpVariable %_ptr_Function_bool Function %30
%x_52_phi = OpVariable %_ptr_Function_bool Function %30
%37 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%38 = OpLoad %int %37
%40 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%41 = OpLoad %int %40
%43 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%44 = OpLoad %int %43
%45 = OpCompositeConstruct %_arr_int_uint_3 %38 %41 %44
OpStore %arr %45
OpStore %index %int_1
OpBranch %47
%47 = OpLabel
OpLoopMerge %48 %49 None
OpBranch %50
%50 = OpLabel
OpStore %x_52_phi %true
OpSelectionMerge %54 None
OpBranchConditional %true %55 %54
%55 = OpLabel
%57 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%58 = OpLoad %int %57
%59 = OpLoad %int %index
%61 = OpIEqual %bool %58 %int_1
OpSelectionMerge %62 None
OpBranchConditional %61 %63 %62
%63 = OpLabel
%64 = OpSLessThanEqual %bool %59 %int_1
OpBranch %62
%62 = OpLabel
%65 = OpPhi %bool %61 %55 %64 %63
%60 = OpLogicalNot %bool %65
OpStore %x_51 %60
%66 = OpLoad %bool %x_51
OpStore %x_52_phi %66
OpBranch %54
%54 = OpLabel
%67 = OpLoad %bool %x_52_phi
%68 = OpLogicalNot %bool %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %71
%70 = OpLabel
OpBranch %69
%71 = OpLabel
OpBranch %48
%69 = OpLabel
%72 = OpLoad %int %index
%73 = OpAccessChain %_ptr_Function_int %arr %72
%74 = OpLoad %int %73
%75 = OpAccessChain %_ptr_Function_int %arr %72
%76 = OpIAdd %int %74 %int_1
OpStore %75 %76
%77 = OpLoad %int %index
%78 = OpIAdd %int %77 %int_1
OpStore %index %78
OpBranch %49
%49 = OpLabel
OpBranch %47
%48 = OpLabel
%79 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%80 = OpLoad %int %79
%81 = OpAccessChain %_ptr_Function_int %arr %80
%82 = OpLoad %int %81
%83 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%84 = OpLoad %int %83
%85 = OpIEqual %bool %82 %84
OpStore %x_77_phi %85
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %86
%87 = OpLabel
%88 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%89 = OpLoad %int %88
%90 = OpAccessChain %_ptr_Function_int %arr %89
%91 = OpLoad %int %90
%93 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%94 = OpLoad %int %93
%95 = OpIEqual %bool %91 %94
OpStore %x_76 %95
%96 = OpLoad %bool %x_76
OpStore %x_77_phi %96
OpBranch %86
%86 = OpLabel
%97 = OpLoad %bool %x_77_phi
OpStore %x_87_phi %97
OpSelectionMerge %98 None
OpBranchConditional %97 %99 %98
%99 = OpLabel
%100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%101 = OpLoad %int %100
%102 = OpAccessChain %_ptr_Function_int %arr %101
%103 = OpLoad %int %102
%104 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%105 = OpLoad %int %104
%106 = OpIEqual %bool %103 %105
OpStore %x_86 %106
%107 = OpLoad %bool %x_86
OpStore %x_87_phi %107
OpBranch %98
%98 = OpLabel
%108 = OpLoad %bool %x_87_phi
OpSelectionMerge %109 None
OpBranchConditional %108 %110 %111
%110 = OpLabel
%112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%113 = OpLoad %int %112
%114 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%115 = OpLoad %int %114
%116 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%117 = OpLoad %int %116
%118 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%119 = OpLoad %int %118
%120 = OpConvertSToF %float %113
%121 = OpConvertSToF %float %115
%122 = OpConvertSToF %float %117
%123 = OpConvertSToF %float %119
%124 = OpCompositeConstruct %v4float %120 %121 %122 %123
OpStore %x_GLF_color %124
OpBranch %109
%111 = OpLabel
%125 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%126 = OpLoad %int %125
%127 = OpConvertSToF %float %126
%128 = OpCompositeConstruct %v4float %127 %127 %127 %127
OpStore %x_GLF_color %128
OpBranch %109
%109 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %129
%tint_symbol = OpFunctionParameter %main_out
%133 = OpLabel
%134 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %134
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%136 = OpLabel
%137 = OpFunctionCall %void %main_1
%139 = OpLoad %v4float %x_GLF_color
%140 = OpCompositeConstruct %main_out %139
%138 = OpFunctionCall %void %tint_symbol_2 %140
OpReturn
OpFunctionEnd