blob: ff2c207a3c8e9894233fd6e81e0c16043c38be75 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 99
; Schema: 0
OpCapability Shader
%49 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "sequence"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %a "a"
OpName %i "i"
OpName %sum "sum"
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_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%buf0 = OpTypeStruct %v4int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%10 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %10
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %10
%void = OpTypeVoid
%13 = OpTypeFunction %void
%_ptr_Function_v4int = OpTypePointer Function %v4int
%19 = OpConstantNull %v4int
%_ptr_Function_int = OpTypePointer Function %int
%22 = OpConstantNull %int
%int_0 = OpConstant %int 0
%25 = OpConstantComposite %v4int %int_0 %int_0 %int_0 %int_0
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_3 = OpConstant %uint 3
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%int_5 = OpConstant %int 5
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%int_10 = OpConstant %int 10
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%85 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%86 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%87 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %13
%16 = OpLabel
%a = OpVariable %_ptr_Function_v4int Function %19
%i = OpVariable %_ptr_Function_int Function %22
%sum = OpVariable %_ptr_Function_int Function %22
OpStore %a %25
OpStore %i %int_0
OpBranch %26
%26 = OpLabel
OpLoopMerge %27 %28 None
OpBranch %29
%29 = OpLabel
%30 = OpLoad %int %i
%35 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %uint_3
%36 = OpLoad %int %35
%38 = OpIAdd %int %36 %int_1
%39 = OpSLessThan %bool %30 %38
OpSelectionMerge %41 None
OpBranchConditional %39 %42 %43
%42 = OpLabel
OpBranch %41
%43 = OpLabel
OpBranch %27
%41 = OpLabel
%44 = OpLoad %int %i
%45 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %uint_0
%46 = OpLoad %int %45
%47 = OpLoad %int %i
%48 = OpExtInst %int %49 SClamp %44 %46 %47
%50 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %48
%51 = OpLoad %int %50
%52 = OpIEqual %bool %51 %int_1
OpSelectionMerge %53 None
OpBranchConditional %52 %54 %55
%54 = OpLabel
%56 = OpLoad %int %i
%57 = OpAccessChain %_ptr_Function_int %a %56
OpStore %57 %int_5
OpBranch %53
%55 = OpLabel
%59 = OpLoad %int %i
%60 = OpLoad %int %i
%61 = OpAccessChain %_ptr_Function_int %a %59
OpStore %61 %60
OpBranch %53
%53 = OpLabel
OpBranch %28
%28 = OpLabel
%62 = OpLoad %int %i
%63 = OpIAdd %int %62 %int_1
OpStore %i %63
OpBranch %26
%27 = OpLabel
%64 = OpAccessChain %_ptr_Function_int %a %uint_0
%65 = OpLoad %int %64
%67 = OpAccessChain %_ptr_Function_int %a %uint_1
%68 = OpLoad %int %67
%70 = OpAccessChain %_ptr_Function_int %a %uint_2
%71 = OpLoad %int %70
%72 = OpAccessChain %_ptr_Function_int %a %uint_3
%73 = OpLoad %int %72
%74 = OpIAdd %int %65 %68
%75 = OpIAdd %int %74 %71
%76 = OpIAdd %int %75 %73
OpStore %sum %76
%77 = OpLoad %int %sum
%79 = OpIEqual %bool %77 %int_10
OpSelectionMerge %80 None
OpBranchConditional %79 %81 %82
%81 = OpLabel
OpStore %x_GLF_color %85
OpBranch %80
%82 = OpLabel
OpStore %x_GLF_color %86
OpBranch %80
%80 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %87
%tint_symbol = OpFunctionParameter %main_out
%91 = OpLabel
%92 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %92
OpReturn
OpFunctionEnd
%main = OpFunction %void None %13
%94 = OpLabel
%95 = OpFunctionCall %void %main_1
%97 = OpLoad %v4float %x_GLF_color
%98 = OpCompositeConstruct %main_out %97
%96 = OpFunctionCall %void %tint_symbol_2 %98
OpReturn
OpFunctionEnd