blob: 47743fc241ce211ec9ba4d8d3646beb946c0d213 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 59
; 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 %main_1 "main_1"
OpName %i "i"
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
%void = OpTypeVoid
%11 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%float_0 = OpConstant %float 0
%bool = OpTypeBool
%false = OpConstantFalse %bool
%int_3 = OpConstant %int 3
%float_1 = OpConstant %float 1
%44 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%45 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%46 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %11
%14 = OpLabel
%i = OpVariable %_ptr_Function_int Function %18
OpStore %i %int_2
OpBranch %20
%20 = OpLabel
OpLoopMerge %21 %22 None
OpBranch %23
%23 = OpLabel
%24 = OpLoad %int %i
%26 = OpIAdd %int %24 %int_1
OpStore %i %26
OpBranch %22
%22 = OpLabel
%30 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%31 = OpLoad %float %30
%33 = OpFOrdGreaterThanEqual %bool %31 %float_0
%36 = OpLogicalAnd %bool %33 %false
OpBranchConditional %36 %20 %21
%21 = OpLabel
%37 = OpLoad %int %i
%39 = OpIEqual %bool %37 %int_3
OpSelectionMerge %40 None
OpBranchConditional %39 %41 %42
%41 = OpLabel
OpStore %x_GLF_color %44
OpBranch %40
%42 = OpLabel
OpStore %x_GLF_color %45
OpBranch %40
%40 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %46
%gl_FragCoord_param = OpFunctionParameter %v4float
%50 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%51 = OpFunctionCall %void %main_1
%52 = OpLoad %v4float %x_GLF_color
%53 = OpCompositeConstruct %main_out %52
OpReturnValue %53
OpFunctionEnd
%main = OpFunction %void None %11
%55 = OpLabel
%57 = OpLoad %v4float %gl_FragCoord_param_1
%56 = OpFunctionCall %main_out %main_inner %57
%58 = OpCompositeExtract %v4float %56 0
OpStore %x_GLF_color_1_1 %58
OpReturn
OpFunctionEnd