blob: d7c1363a469647699fcd53d6ce87b4ed3bb838e6 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 94
; Schema: 0
OpCapability Shader
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 %func_ "func_"
OpName %s "s"
OpName %i "i"
OpName %j "j"
OpName %main_1 "main_1"
OpName %c "c"
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
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
%12 = OpTypeFunction %float
%_ptr_Function_float = OpTypePointer Function %float
%17 = OpConstantNull %float
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%float_2 = OpConstant %float 2
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%float_3 = OpConstant %float 3
%int_10 = OpConstant %int 10
%void = OpTypeVoid
%64 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%float_5 = OpConstant %float 5
%81 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%82 = OpTypeFunction %void %main_out
%func_ = OpFunction %float None %12
%14 = OpLabel
%s = OpVariable %_ptr_Function_float Function %17
%i = OpVariable %_ptr_Function_int Function %20
%j = OpVariable %_ptr_Function_int Function %20
OpStore %s %float_2
OpStore %i %int_0
OpBranch %24
%24 = OpLabel
OpLoopMerge %25 %26 None
OpBranch %27
%27 = OpLabel
%28 = OpLoad %int %i
%32 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%33 = OpLoad %int %32
%35 = OpIAdd %int %33 %int_1
%36 = OpSLessThan %bool %28 %35
OpSelectionMerge %38 None
OpBranchConditional %36 %39 %40
%39 = OpLabel
OpBranch %38
%40 = OpLabel
OpBranch %25
%38 = OpLabel
%41 = OpLoad %float %s
%43 = OpFAdd %float %41 %float_3
OpStore %s %43
OpStore %j %int_0
OpBranch %44
%44 = OpLabel
OpLoopMerge %45 %46 None
OpBranch %47
%47 = OpLabel
%48 = OpLoad %int %j
%50 = OpSLessThan %bool %48 %int_10
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %53
%52 = OpLabel
OpBranch %51
%53 = OpLabel
OpBranch %45
%51 = OpLabel
%54 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%55 = OpLoad %int %54
%56 = OpIEqual %bool %55 %int_1
OpSelectionMerge %57 None
OpBranchConditional %56 %58 %57
%58 = OpLabel
OpKill
%57 = OpLabel
OpBranch %46
%46 = OpLabel
%59 = OpLoad %int %j
%60 = OpIAdd %int %59 %int_1
OpStore %j %60
OpBranch %44
%45 = OpLabel
OpBranch %26
%26 = OpLabel
%61 = OpLoad %int %i
%62 = OpIAdd %int %61 %int_1
OpStore %i %62
OpBranch %24
%25 = OpLabel
%63 = OpLoad %float %s
OpReturnValue %63
OpFunctionEnd
%main_1 = OpFunction %void None %64
%67 = OpLabel
%c = OpVariable %_ptr_Function_v4float Function %9
%70 = OpFunctionCall %float %func_
%73 = OpCompositeConstruct %v4float %70 %float_0 %float_0 %float_1
OpStore %c %73
%74 = OpFunctionCall %float %func_
%76 = OpFOrdEqual %bool %74 %float_5
OpSelectionMerge %77 None
OpBranchConditional %76 %78 %79
%78 = OpLabel
%80 = OpLoad %v4float %c
OpStore %x_GLF_color %80
OpBranch %77
%79 = OpLabel
OpStore %x_GLF_color %81
OpBranch %77
%77 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %82
%tint_symbol = OpFunctionParameter %main_out
%86 = OpLabel
%87 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %87
OpReturn
OpFunctionEnd
%main = OpFunction %void None %64
%89 = OpLabel
%90 = OpFunctionCall %void %main_1
%92 = OpLoad %v4float %x_GLF_color
%93 = OpCompositeConstruct %main_out %92
%91 = OpFunctionCall %void %tint_symbol_2 %93
OpReturn
OpFunctionEnd