blob: fe39eb796c89b5000e19af6403be375eb1c2c3b9 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 142
; 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 %a "a"
OpName %b "b"
OpName %i "i"
OpName %i_1 "i_1"
OpName %i_2 "i_2"
OpName %indexable "indexable"
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_2 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_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2
%30 = OpConstantNull %_arr_int_uint_2
%uint_0 = OpConstant %uint 0
%int_2 = OpConstant %int 2
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_3 = OpConstant %int 3
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%false = OpConstantFalse %bool
%int_4 = OpConstant %int 4
%main_out = OpTypeStruct %v4float
%130 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%a = OpVariable %_ptr_Function_int Function %21
%b = OpVariable %_ptr_Function_int Function %21
%i = OpVariable %_ptr_Function_int Function %21
%i_1 = OpVariable %_ptr_Function_int Function %21
%i_2 = OpVariable %_ptr_Function_int Function %21
%indexable = OpVariable %_ptr_Function__arr_int_uint_2 Function %30
%34 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%35 = OpLoad %int %34
OpStore %a %35
%37 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%38 = OpLoad %int %37
OpStore %b %38
%39 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%40 = OpLoad %int %39
%41 = OpConvertSToF %float %40
%42 = OpCompositeConstruct %v4float %41 %41 %41 %41
OpStore %x_GLF_color %42
%43 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%44 = OpLoad %int %43
OpStore %i %44
OpBranch %45
%45 = OpLabel
OpLoopMerge %46 %47 None
OpBranch %48
%48 = OpLabel
%49 = OpLoad %int %i
%51 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%52 = OpLoad %int %51
%53 = OpSLessThan %bool %49 %52
OpSelectionMerge %55 None
OpBranchConditional %53 %56 %57
%56 = OpLabel
OpBranch %55
%57 = OpLabel
OpBranch %46
%55 = OpLabel
%58 = OpLoad %int %i
%59 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%60 = OpLoad %int %59
%61 = OpSGreaterThan %bool %58 %60
OpSelectionMerge %62 None
OpBranchConditional %61 %63 %62
%63 = OpLabel
%64 = OpLoad %int %a
%66 = OpIAdd %int %64 %int_1
OpStore %a %66
OpSelectionMerge %68 None
OpBranchConditional %false %69 %68
%69 = OpLabel
%70 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%71 = OpLoad %int %70
OpStore %i_1 %71
OpBranch %72
%72 = OpLabel
OpLoopMerge %73 %74 None
OpBranch %75
%75 = OpLabel
%76 = OpLoad %int %i_1
%77 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%78 = OpLoad %int %77
%79 = OpSLessThan %bool %76 %78
OpSelectionMerge %80 None
OpBranchConditional %79 %81 %82
%81 = OpLabel
OpBranch %80
%82 = OpLabel
OpBranch %73
%80 = OpLabel
OpReturn
%74 = OpLabel
OpBranch %72
%73 = OpLabel
OpBranch %68
%68 = OpLabel
OpBranch %62
%62 = OpLabel
OpBranch %47
%47 = OpLabel
%83 = OpLoad %int %i
%84 = OpIAdd %int %83 %int_1
OpStore %i %84
OpBranch %45
%46 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%86 = OpLoad %int %85
OpStore %i_2 %86
OpBranch %87
%87 = OpLabel
OpLoopMerge %88 %89 None
OpBranch %90
%90 = OpLabel
%91 = OpLoad %int %i_2
%92 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%93 = OpLoad %int %92
%94 = OpSLessThan %bool %91 %93
OpSelectionMerge %95 None
OpBranchConditional %94 %96 %97
%96 = OpLabel
OpBranch %95
%97 = OpLabel
OpBranch %88
%95 = OpLabel
%98 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%99 = OpLoad %int %98
%101 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%102 = OpLoad %int %101
%103 = OpLoad %int %b
%104 = OpCompositeConstruct %_arr_int_uint_2 %99 %102
OpStore %indexable %104
%105 = OpAccessChain %_ptr_Function_int %indexable %103
%106 = OpLoad %int %105
%107 = OpLoad %int %a
%108 = OpIAdd %int %107 %106
OpStore %a %108
OpBranch %89
%89 = OpLabel
%109 = OpLoad %int %i_2
%110 = OpIAdd %int %109 %int_1
OpStore %i_2 %110
OpBranch %87
%88 = OpLabel
%111 = OpLoad %int %a
%112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%113 = OpLoad %int %112
%114 = OpIEqual %bool %111 %113
OpSelectionMerge %115 None
OpBranchConditional %114 %116 %115
%116 = OpLabel
%117 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%118 = OpLoad %int %117
%119 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%120 = OpLoad %int %119
%121 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%122 = OpLoad %int %121
%123 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%124 = OpLoad %int %123
%125 = OpConvertSToF %float %118
%126 = OpConvertSToF %float %120
%127 = OpConvertSToF %float %122
%128 = OpConvertSToF %float %124
%129 = OpCompositeConstruct %v4float %125 %126 %127 %128
OpStore %x_GLF_color %129
OpBranch %115
%115 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %130
%tint_symbol = OpFunctionParameter %main_out
%134 = OpLabel
%135 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %135
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%137 = OpLabel
%138 = OpFunctionCall %void %main_1
%140 = OpLoad %v4float %x_GLF_color
%141 = OpCompositeConstruct %main_out %140
%139 = OpFunctionCall %void %tint_symbol_2 %141
OpReturn
OpFunctionEnd