blob: a003ea90b9a0e06035f38e7c24f7a352c4687bfa [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 146
; Schema: 0
OpCapability Shader
%65 = OpExtInstImport "GLSL.std.450"
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 %i "i"
OpName %A "A"
OpName %x_77 "x_77"
OpName %x_87 "x_87"
OpName %x_97 "x_97"
OpName %x_78_phi "x_78_phi"
OpName %x_88_phi "x_88_phi"
OpName %x_98_phi "x_98_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_5 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_4 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_5 = OpConstant %uint 5
%_arr_int_uint_5 = OpTypeArray %int %uint_5
%buf0 = OpTypeStruct %_arr_int_uint_5
%_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
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%_ptr_Function__arr_int_uint_4 = OpTypePointer Function %_arr_int_uint_4
%26 = OpConstantNull %_arr_int_uint_4
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%30 = OpConstantNull %bool
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_4 = OpConstant %int 4
%int_3 = OpConstant %int 3
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%float_1 = OpConstant %float 1
%133 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%main_out = OpTypeStruct %v4float
%134 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%i = OpVariable %_ptr_Function_int Function %21
%A = OpVariable %_ptr_Function__arr_int_uint_4 Function %26
%x_77 = OpVariable %_ptr_Function_bool Function %30
%x_87 = OpVariable %_ptr_Function_bool Function %30
%x_97 = OpVariable %_ptr_Function_bool Function %30
%x_78_phi = OpVariable %_ptr_Function_bool Function %30
%x_88_phi = OpVariable %_ptr_Function_bool Function %30
%x_98_phi = OpVariable %_ptr_Function_bool Function %30
%39 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%40 = OpLoad %int %39
OpStore %i %40
OpBranch %41
%41 = OpLabel
OpLoopMerge %42 %43 None
OpBranch %44
%44 = OpLabel
%45 = OpLoad %int %i
%47 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%48 = OpLoad %int %47
%49 = OpSLessThan %bool %45 %48
OpSelectionMerge %50 None
OpBranchConditional %49 %51 %52
%51 = OpLabel
OpBranch %50
%52 = OpLabel
OpBranch %42
%50 = OpLabel
%53 = OpLoad %int %i
%54 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%55 = OpLoad %int %54
%56 = OpAccessChain %_ptr_Function_int %A %53
OpStore %56 %55
%57 = OpLoad %int %i
%59 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%60 = OpLoad %int %59
%62 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%63 = OpLoad %int %62
%67 = OpIMul %int %int_2 %57
%68 = OpIMul %int %int_2 %60
%64 = OpExtInst %int %65 SMax %67 %68
%69 = OpIEqual %bool %64 %63
OpSelectionMerge %70 None
OpBranchConditional %69 %71 %70
%71 = OpLabel
%72 = OpLoad %int %i
%73 = OpAccessChain %_ptr_Function_int %A %72
OpStore %73 %int_1
OpBranch %70
%70 = OpLabel
OpBranch %43
%43 = OpLabel
%74 = OpLoad %int %i
%75 = OpIAdd %int %74 %int_1
OpStore %i %75
OpBranch %41
%42 = OpLabel
%76 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%77 = OpLoad %int %76
%78 = OpAccessChain %_ptr_Function_int %A %77
%79 = OpLoad %int %78
%80 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%81 = OpLoad %int %80
%82 = OpIEqual %bool %79 %81
OpStore %x_78_phi %82
OpSelectionMerge %83 None
OpBranchConditional %82 %84 %83
%84 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%86 = OpLoad %int %85
%87 = OpAccessChain %_ptr_Function_int %A %86
%88 = OpLoad %int %87
%89 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%90 = OpLoad %int %89
%91 = OpIEqual %bool %88 %90
OpStore %x_77 %91
%92 = OpLoad %bool %x_77
OpStore %x_78_phi %92
OpBranch %83
%83 = OpLabel
%93 = OpLoad %bool %x_78_phi
OpStore %x_88_phi %93
OpSelectionMerge %94 None
OpBranchConditional %93 %95 %94
%95 = OpLabel
%96 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%97 = OpLoad %int %96
%98 = OpAccessChain %_ptr_Function_int %A %97
%99 = OpLoad %int %98
%100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%101 = OpLoad %int %100
%102 = OpIEqual %bool %99 %101
OpStore %x_87 %102
%103 = OpLoad %bool %x_87
OpStore %x_88_phi %103
OpBranch %94
%94 = OpLabel
%104 = OpLoad %bool %x_88_phi
OpStore %x_98_phi %104
OpSelectionMerge %105 None
OpBranchConditional %104 %106 %105
%106 = OpLabel
%107 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%108 = OpLoad %int %107
%109 = OpAccessChain %_ptr_Function_int %A %108
%110 = OpLoad %int %109
%111 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%112 = OpLoad %int %111
%113 = OpIEqual %bool %110 %112
OpStore %x_97 %113
%114 = OpLoad %bool %x_97
OpStore %x_98_phi %114
OpBranch %105
%105 = OpLabel
%115 = OpLoad %bool %x_98_phi
OpSelectionMerge %116 None
OpBranchConditional %115 %117 %118
%117 = OpLabel
%119 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%120 = OpLoad %int %119
%121 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%122 = OpLoad %int %121
%123 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%124 = OpLoad %int %123
%125 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%126 = OpLoad %int %125
%127 = OpConvertSToF %float %120
%128 = OpConvertSToF %float %122
%129 = OpConvertSToF %float %124
%130 = OpConvertSToF %float %126
%131 = OpCompositeConstruct %v4float %127 %128 %129 %130
OpStore %x_GLF_color %131
OpBranch %116
%118 = OpLabel
OpStore %x_GLF_color %133
OpBranch %116
%116 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %134
%tint_symbol = OpFunctionParameter %main_out
%138 = OpLabel
%139 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %139
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%141 = OpLabel
%142 = OpFunctionCall %void %main_1
%144 = OpLoad %v4float %x_GLF_color
%145 = OpCompositeConstruct %main_out %144
%143 = OpFunctionCall %void %tint_symbol_2 %145
OpReturn
OpFunctionEnd