blob: 782abec857d54b01566c78e155bb2022b07b17ef [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 64
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %func_ "func_"
OpName %x "x"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%11 = OpTypeFunction %float
%_ptr_Function_float = OpTypePointer Function %float
%16 = OpConstantNull %float
%float_2 = OpConstant %float 2
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%float_12 = OpConstant %float 12
%bool = OpTypeBool
%uint_1 = OpConstant %uint 1
%float_13 = OpConstant %float 13
%float_1 = OpConstant %float 1
%void = OpTypeVoid
%39 = OpTypeFunction %void
%false = OpConstantFalse %bool
%float_0 = OpConstant %float 0
%50 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%51 = OpTypeFunction %main_out %v4float
%func_ = OpFunction %float None %11
%13 = OpLabel
%x = OpVariable %_ptr_Function_float Function %16
OpStore %x %float_2
%21 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%22 = OpLoad %float %21
%24 = OpFOrdEqual %bool %22 %float_12
OpSelectionMerge %26 None
OpBranchConditional %24 %27 %26
%27 = OpLabel
%29 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%30 = OpLoad %float %29
%32 = OpFOrdEqual %bool %30 %float_13
OpSelectionMerge %33 None
OpBranchConditional %32 %34 %33
%34 = OpLabel
%35 = OpLoad %float %x
%37 = OpFAdd %float %35 %float_1
OpStore %x %37
OpBranch %33
%33 = OpLabel
%38 = OpLoad %float %x
OpReturnValue %38
%26 = OpLabel
OpReturnValue %float_1
OpFunctionEnd
%main_1 = OpFunction %void None %39
%42 = OpLabel
OpSelectionMerge %44 None
OpBranchConditional %false %45 %46
%45 = OpLabel
%47 = OpFunctionCall %float %func_
%48 = OpCompositeConstruct %v4float %47 %47 %47 %47
OpStore %x_GLF_color %48
OpBranch %44
%46 = OpLabel
OpStore %x_GLF_color %50
OpBranch %44
%44 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %51
%gl_FragCoord_param = OpFunctionParameter %v4float
%55 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%56 = OpFunctionCall %void %main_1
%57 = OpLoad %v4float %x_GLF_color
%58 = OpCompositeConstruct %main_out %57
OpReturnValue %58
OpFunctionEnd
%main = OpFunction %void None %39
%60 = OpLabel
%62 = OpLoad %v4float %gl_FragCoord_param_1
%61 = OpFunctionCall %main_out %main_inner %62
%63 = OpCompositeExtract %v4float %61 0
OpStore %x_GLF_color_1_1 %63
OpReturn
OpFunctionEnd