blob: eca9c855974ca1490c49488d8c63541c6ee170d2 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 69
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %nb_mod_f1_ "nb_mod_f1_"
OpName %limit "limit"
OpName %x_injected_loop_counter "x_injected_loop_counter"
OpName %x_injected_loop_counter_1 "x_injected_loop_counter_1"
OpName %main_1 "main_1"
OpName %param "param"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Function_float = OpTypePointer Function %float
%11 = OpTypeFunction %float %_ptr_Function_float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%19 = OpConstantNull %int
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%float_0 = OpConstant %float 0
%void = OpTypeVoid
%42 = OpTypeFunction %void
%47 = OpConstantNull %float
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%55 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%56 = OpTypeFunction %void %main_out
%nb_mod_f1_ = OpFunction %float None %11
%limit = OpFunctionParameter %_ptr_Function_float
%15 = OpLabel
%x_injected_loop_counter = OpVariable %_ptr_Function_int Function %19
%x_injected_loop_counter_1 = OpVariable %_ptr_Function_int Function %19
%22 = OpLoad %float %limit
%24 = OpFOrdGreaterThanEqual %bool %float_1 %22
OpSelectionMerge %26 None
OpBranchConditional %24 %27 %26
%27 = OpLabel
OpReturnValue %float_1
%26 = OpLabel
OpStore %x_injected_loop_counter %int_0
OpBranch %29
%29 = OpLabel
OpLoopMerge %30 %31 None
OpBranch %32
%32 = OpLabel
%34 = OpSLessThan %bool %int_0 %int_2
OpStore %x_injected_loop_counter_1 %int_0
OpBranch %35
%35 = OpLabel
OpLoopMerge %36 %37 None
OpBranch %38
%38 = OpLabel
%40 = OpSLessThan %bool %int_0 %int_1
OpReturnValue %float_1
%37 = OpLabel
OpBranch %35
%36 = OpLabel
OpBranch %31
%31 = OpLabel
OpBranch %29
%30 = OpLabel
OpReturnValue %float_0
OpFunctionEnd
%main_1 = OpFunction %void None %42
%45 = OpLabel
%param = OpVariable %_ptr_Function_float Function %47
%51 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%52 = OpLoad %float %51
OpStore %param %52
%53 = OpFunctionCall %float %nb_mod_f1_ %param
OpStore %x_GLF_color %55
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %56
%tint_symbol_1 = OpFunctionParameter %main_out
%60 = OpLabel
%61 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %61
OpReturn
OpFunctionEnd
%main = OpFunction %void None %42
%63 = OpLabel
%64 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %64
%65 = OpFunctionCall %void %main_1
%67 = OpLoad %v4float %x_GLF_color
%68 = OpCompositeConstruct %main_out %67
%66 = OpFunctionCall %void %tint_symbol_3 %68
OpReturn
OpFunctionEnd