blob: 5375739c5b75039578b05a4b7f090a30fd3eaa2b [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 61
; 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 %main_1 "main_1"
OpName %i "i"
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
%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
%46 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%47 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%48 = OpTypeFunction %void %main_out
%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
OpSelectionMerge %35 None
OpBranchConditional %33 %36 %35
%36 = OpLabel
OpBranch %35
%35 = OpLabel
%38 = OpPhi %bool %33 %22 %false %36
OpBranchConditional %38 %20 %21
%21 = OpLabel
%39 = OpLoad %int %i
%41 = OpIEqual %bool %39 %int_3
OpSelectionMerge %42 None
OpBranchConditional %41 %43 %44
%43 = OpLabel
OpStore %x_GLF_color %46
OpBranch %42
%44 = OpLabel
OpStore %x_GLF_color %47
OpBranch %42
%42 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %48
%tint_symbol_1 = OpFunctionParameter %main_out
%52 = OpLabel
%53 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %53
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
%55 = OpLabel
%56 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %56
%57 = OpFunctionCall %void %main_1
%59 = OpLoad %v4float %x_GLF_color
%60 = OpCompositeConstruct %main_out %59
%58 = OpFunctionCall %void %tint_symbol_3 %60
OpReturn
OpFunctionEnd