blob: 74f2106bc64221de7c15a8f2d5b0e35e4dfe799b [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 86
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %i "i"
OpName %data "data"
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 %tint_symbol_1 Location 0
OpDecorate %_arr_float_uint_1 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%8 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%15 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_ptr_Function__arr_float_uint_1 = OpTypePointer Function %_arr_float_uint_1
%21 = OpConstantNull %_arr_float_uint_1
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%24 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%_ptr_Function_float = OpTypePointer Function %float
%false = OpConstantFalse %bool
%true = OpConstantTrue %bool
%float_2 = OpConstant %float 2
%main_out = OpTypeStruct %v4float
%74 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%i = OpVariable %_ptr_Function_int Function %15
%data = OpVariable %_ptr_Function__arr_float_uint_1 Function %21
OpStore %x_GLF_color %24
OpStore %i %int_0
OpBranch %26
%26 = OpLabel
OpLoopMerge %27 %28 None
OpBranch %29
%29 = OpLabel
%30 = OpLoad %int %i
%32 = OpSLessThan %bool %30 %int_1
OpSelectionMerge %34 None
OpBranchConditional %32 %35 %36
%35 = OpLabel
OpBranch %34
%36 = OpLabel
OpBranch %27
%34 = OpLabel
%37 = OpLoad %int %i
%39 = OpAccessChain %_ptr_Function_float %data %37
%40 = OpLoad %float %39
%41 = OpAccessChain %_ptr_Function_float %data %int_0
%42 = OpLoad %float %41
%43 = OpFOrdLessThan %bool %40 %42
OpSelectionMerge %44 None
OpBranchConditional %43 %45 %44
%45 = OpLabel
OpSelectionMerge %47 None
OpBranchConditional %false %48 %47
%48 = OpLabel
%49 = OpLoad %int %i
%50 = OpConvertSToF %float %49
%51 = OpFOrdGreaterThanEqual %bool %50 %float_1
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %52
%53 = OpLabel
OpBranch %52
%52 = OpLabel
OpBranch %47
%47 = OpLabel
OpSelectionMerge %54 None
OpSwitch %int_0 %55 1 %56 0 %57
%56 = OpLabel
OpBranch %58
%58 = OpLabel
OpLoopMerge %59 %60 None
OpBranch %61
%61 = OpLabel
OpSelectionMerge %63 None
OpBranchConditional %true %64 %65
%64 = OpLabel
OpBranch %63
%65 = OpLabel
OpBranch %59
%63 = OpLabel
OpBranch %60
%60 = OpLabel
OpBranch %58
%59 = OpLabel
OpBranch %66
%66 = OpLabel
OpLoopMerge %67 %68 None
OpBranch %69
%69 = OpLabel
OpBranch %68
%68 = OpLabel
OpBranch %66
%67 = OpLabel
OpBranch %57
%57 = OpLabel
%70 = OpAccessChain %_ptr_Function_float %data %int_0
OpStore %70 %float_2
OpBranch %54
%55 = OpLabel
OpBranch %54
%54 = OpLabel
OpBranch %44
%44 = OpLabel
OpBranch %28
%28 = OpLabel
%72 = OpLoad %int %i
%73 = OpIAdd %int %72 %int_1
OpStore %i %73
OpBranch %26
%27 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %74
%tint_symbol = OpFunctionParameter %main_out
%78 = OpLabel
%79 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %79
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
%81 = OpLabel
%82 = OpFunctionCall %void %main_1
%84 = OpLoad %v4float %x_GLF_color
%85 = OpCompositeConstruct %main_out %84
%83 = OpFunctionCall %void %tint_symbol_2 %85
OpReturn
OpFunctionEnd