blob: 847dc61a64d4094a065384a4ca4d1187c3650efc [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 138
; 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_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %func_i1_ "func_i1_"
OpName %x "x"
OpName %a "a"
OpName %i "i"
OpName %indexable "indexable"
OpName %main_1 "main_1"
OpName %a_1 "a_1"
OpName %param "param"
OpName %param_1 "param_1"
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_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 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_8 = 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
%_ptr_Function_int = OpTypePointer Function %int
%15 = OpTypeFunction %int %_ptr_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
%27 = OpConstantNull %_arr_int_uint_4
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%int_3 = OpConstant %int 3
%true = OpConstantTrue %bool
%int_4 = OpConstant %int 4
%void = OpTypeVoid
%84 = OpTypeFunction %void
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%126 = OpTypeFunction %void %main_out
%func_i1_ = OpFunction %int None %15
%x = OpFunctionParameter %_ptr_Function_int
%19 = OpLabel
%a = OpVariable %_ptr_Function_int Function %21
%i = OpVariable %_ptr_Function_int Function %21
%indexable = OpVariable %_ptr_Function__arr_int_uint_4 Function %27
%31 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%32 = OpLoad %int %31
OpStore %a %32
%33 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%34 = OpLoad %int %33
OpStore %i %34
OpBranch %35
%35 = OpLabel
OpLoopMerge %36 %37 None
OpBranch %38
%38 = OpLabel
%39 = OpLoad %int %i
%41 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%42 = OpLoad %int %41
%43 = OpSLessThan %bool %39 %42
OpSelectionMerge %45 None
OpBranchConditional %43 %46 %47
%46 = OpLabel
OpBranch %45
%47 = OpLabel
OpBranch %36
%45 = OpLabel
%49 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%50 = OpLoad %int %49
%51 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%52 = OpLoad %int %51
%53 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%54 = OpLoad %int %53
%55 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%56 = OpLoad %int %55
%57 = OpLoad %int %a
%58 = OpCompositeConstruct %_arr_int_uint_4 %50 %52 %54 %56
OpStore %indexable %58
%59 = OpAccessChain %_ptr_Function_int %indexable %57
%60 = OpLoad %int %59
%62 = OpLoad %int %x
%63 = OpSGreaterThan %bool %60 %62
OpSelectionMerge %64 None
OpBranchConditional %63 %65 %66
%65 = OpLabel
OpSelectionMerge %68 None
OpBranchConditional %true %69 %70
%69 = OpLabel
%71 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%72 = OpLoad %int %71
OpReturnValue %72
%70 = OpLabel
%73 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%74 = OpLoad %int %73
OpStore %a %74
OpBranch %68
%68 = OpLabel
OpBranch %64
%66 = OpLabel
OpSelectionMerge %75 None
OpBranchConditional %true %76 %75
%76 = OpLabel
%78 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_4
%79 = OpLoad %int %78
OpReturnValue %79
%75 = OpLabel
OpBranch %64
%64 = OpLabel
OpBranch %37
%37 = OpLabel
%80 = OpLoad %int %i
%81 = OpIAdd %int %80 %int_1
OpStore %i %81
OpBranch %35
%36 = OpLabel
%82 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%83 = OpLoad %int %82
OpReturnValue %83
OpFunctionEnd
%main_1 = OpFunction %void None %84
%87 = OpLabel
%a_1 = OpVariable %_ptr_Function_int Function %21
%param = OpVariable %_ptr_Function_int Function %21
%param_1 = OpVariable %_ptr_Function_int Function %21
%91 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%92 = OpLoad %int %91
OpStore %param %92
%93 = OpFunctionCall %int %func_i1_ %param
OpStore %a_1 %93
%95 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%96 = OpLoad %int %95
OpStore %param_1 %96
%97 = OpFunctionCall %int %func_i1_ %param_1
%99 = OpLoad %int %a_1
%100 = OpIAdd %int %99 %97
OpStore %a_1 %100
%101 = OpLoad %int %a_1
%103 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_2
%104 = OpLoad %int %103
%105 = OpIEqual %bool %101 %104
OpSelectionMerge %106 None
OpBranchConditional %105 %107 %108
%107 = OpLabel
%109 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%110 = OpLoad %int %109
%111 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%112 = OpLoad %int %111
%113 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%114 = OpLoad %int %113
%115 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_3
%116 = OpLoad %int %115
%117 = OpConvertSToF %float %110
%118 = OpConvertSToF %float %112
%119 = OpConvertSToF %float %114
%120 = OpConvertSToF %float %116
%121 = OpCompositeConstruct %v4float %117 %118 %119 %120
OpStore %x_GLF_color %121
OpBranch %106
%108 = OpLabel
%122 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%123 = OpLoad %int %122
%124 = OpConvertSToF %float %123
%125 = OpCompositeConstruct %v4float %124 %124 %124 %124
OpStore %x_GLF_color %125
OpBranch %106
%106 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %126
%tint_symbol = OpFunctionParameter %main_out
%130 = OpLabel
%131 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %131
OpReturn
OpFunctionEnd
%main = OpFunction %void None %84
%133 = OpLabel
%134 = OpFunctionCall %void %main_1
%136 = OpLoad %v4float %x_GLF_color
%137 = OpCompositeConstruct %main_out %136
%135 = OpFunctionCall %void %tint_symbol_2 %137
OpReturn
OpFunctionEnd