blob: b50c13547bb883cd6b2c97fba138890baafe1fe6 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 78
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "ten"
OpName %x_8 "x_8"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "minusEight"
OpName %x_10 "x_10"
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 %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 %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%buf1 = OpTypeStruct %int
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_10 = 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
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_5 = OpConstant %int 5
%int_n4 = OpConstant %int -4
%int_1 = OpConstant %int 1
%int_3 = OpConstant %int 3
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%64 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%65 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%66 = 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
OpStore %a %int_0
OpStore %b %int_0
OpStore %i %int_0
OpBranch %25
%25 = OpLabel
OpLoopMerge %26 %27 None
OpBranch %28
%28 = OpLabel
%29 = OpLoad %int %i
%33 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%34 = OpLoad %int %33
%35 = OpSLessThan %bool %29 %34
OpSelectionMerge %37 None
OpBranchConditional %35 %38 %39
%38 = OpLabel
OpBranch %37
%39 = OpLabel
OpBranch %26
%37 = OpLabel
%40 = OpLoad %int %a
%42 = OpSGreaterThan %bool %40 %int_5
OpSelectionMerge %43 None
OpBranchConditional %42 %44 %43
%44 = OpLabel
OpBranch %26
%43 = OpLabel
%45 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0
%46 = OpLoad %int %45
%47 = OpLoad %int %a
%49 = OpSDiv %int %46 %int_n4
%50 = OpIAdd %int %47 %49
OpStore %a %50
%51 = OpLoad %int %b
%53 = OpIAdd %int %51 %int_1
OpStore %b %53
OpBranch %27
%27 = OpLabel
%54 = OpLoad %int %i
%55 = OpIAdd %int %54 %int_1
OpStore %i %55
OpBranch %25
%26 = OpLabel
%56 = OpLoad %int %b
%58 = OpIEqual %bool %56 %int_3
OpSelectionMerge %59 None
OpBranchConditional %58 %60 %61
%60 = OpLabel
OpStore %x_GLF_color %64
OpBranch %59
%61 = OpLabel
OpStore %x_GLF_color %65
OpBranch %59
%59 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %66
%tint_symbol = OpFunctionParameter %main_out
%70 = OpLabel
%71 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %71
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%73 = OpLabel
%74 = OpFunctionCall %void %main_1
%76 = OpLoad %v4float %x_GLF_color
%77 = OpCompositeConstruct %main_out %76
%75 = OpFunctionCall %void %tint_symbol_2 %77
OpReturn
OpFunctionEnd