blob: 1144dfa54879cc0732c25c284926ea17a5917a88 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 112
; Schema: 0
OpCapability Shader
%48 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %highSigned "highSigned"
OpName %highUnsigned "highUnsigned"
OpName %i "i"
OpName %data "data"
OpName %i_1 "i_1"
OpName %x_78 "x_78"
OpName %x_79_phi "x_79_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 %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 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
%buf0 = OpTypeStruct %int
%_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
%9 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %9
%void = OpTypeVoid
%12 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%22 = OpConstantNull %uint
%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
%28 = OpConstantNull %_arr_int_uint_2
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%33 = OpConstantNull %bool
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_10 = OpConstant %int 10
%int_5 = OpConstant %int 5
%uint_1 = OpConstant %uint 1
%uint_10 = OpConstant %uint 10
%int_6 = OpConstant %int 6
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%98 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%99 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%100 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%highSigned = OpVariable %_ptr_Function_int Function %18
%highUnsigned = OpVariable %_ptr_Function_uint Function %22
%i = OpVariable %_ptr_Function_int Function %18
%data = OpVariable %_ptr_Function__arr_int_uint_2 Function %28
%i_1 = OpVariable %_ptr_Function_uint Function %22
%x_78 = OpVariable %_ptr_Function_bool Function %33
%x_79_phi = OpVariable %_ptr_Function_bool Function %33
OpStore %highSigned %int_1
OpStore %highUnsigned %uint_2
OpStore %i %int_0
OpBranch %37
%37 = OpLabel
OpLoopMerge %38 %39 None
OpBranch %40
%40 = OpLabel
%41 = OpLoad %int %i
%42 = OpLoad %int %highSigned
%45 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%46 = OpLoad %int %45
%47 = OpExtInst %int %48 SMin %int_10 %42
%50 = OpIAdd %int %47 %46
%51 = OpSLessThan %bool %41 %50
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %54
%53 = OpLabel
OpBranch %52
%54 = OpLabel
OpBranch %38
%52 = OpLabel
%55 = OpLoad %int %i
%56 = OpAccessChain %_ptr_Function_int %data %55
OpStore %56 %int_5
OpBranch %39
%39 = OpLabel
%58 = OpLoad %int %i
%59 = OpIAdd %int %58 %int_1
OpStore %i %59
OpBranch %37
%38 = OpLabel
OpStore %i_1 %uint_1
OpBranch %61
%61 = OpLabel
OpLoopMerge %62 %63 None
OpBranch %64
%64 = OpLabel
%65 = OpLoad %uint %i_1
%66 = OpLoad %uint %highUnsigned
%67 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%68 = OpLoad %int %67
%69 = OpExtInst %uint %48 UMin %uint_10 %66
%71 = OpBitcast %uint %68
%72 = OpIAdd %uint %69 %71
%73 = OpULessThan %bool %65 %72
OpSelectionMerge %74 None
OpBranchConditional %73 %75 %76
%75 = OpLabel
OpBranch %74
%76 = OpLabel
OpBranch %62
%74 = OpLabel
%77 = OpLoad %uint %i_1
%78 = OpAccessChain %_ptr_Function_int %data %77
OpStore %78 %int_6
OpBranch %63
%63 = OpLabel
%80 = OpLoad %uint %i_1
%81 = OpBitcast %uint %int_1
%82 = OpIAdd %uint %80 %81
OpStore %i_1 %82
OpBranch %61
%62 = OpLabel
%83 = OpAccessChain %_ptr_Function_int %data %int_0
%84 = OpLoad %int %83
%85 = OpIEqual %bool %84 %int_5
OpStore %x_79_phi %85
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %86
%87 = OpLabel
%88 = OpAccessChain %_ptr_Function_int %data %int_1
%89 = OpLoad %int %88
%90 = OpIEqual %bool %89 %int_6
OpStore %x_78 %90
%91 = OpLoad %bool %x_78
OpStore %x_79_phi %91
OpBranch %86
%86 = OpLabel
%92 = OpLoad %bool %x_79_phi
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %95
%94 = OpLabel
OpStore %x_GLF_color %98
OpBranch %93
%95 = OpLabel
OpStore %x_GLF_color %99
OpBranch %93
%93 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %100
%tint_symbol = OpFunctionParameter %main_out
%104 = OpLabel
%105 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %105
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%107 = OpLabel
%108 = OpFunctionCall %void %main_1
%110 = OpLoad %v4float %x_GLF_color
%111 = OpCompositeConstruct %main_out %110
%109 = OpFunctionCall %void %tint_symbol_2 %111
OpReturn
OpFunctionEnd