blob: 42a7dcde1e4db62d03d8817d93bc203108e21d6f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 65
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color "x_GLF_color"
OpName %gl_FragCoord "gl_FragCoord"
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
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%gl_FragCoord = 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
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%21 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%uint_0 = OpConstant %uint 0
%float_226_695999 = OpConstant %float 226.695999
%49 = OpConstantComposite %v4float %float_226_695999 %float_1 %float_1 %float_1
%main_out = OpTypeStruct %v4float
%52 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%i = OpVariable %_ptr_Function_int Function %18
OpStore %x_GLF_color %21
OpStore %i %int_1
OpBranch %23
%23 = OpLabel
OpLoopMerge %24 %25 None
OpBranch %26
%26 = OpLabel
%27 = OpLoad %int %i
%29 = OpSLessThan %bool %27 %int_2
OpSelectionMerge %31 None
OpBranchConditional %29 %32 %33
%32 = OpLabel
OpBranch %31
%33 = OpLabel
OpBranch %24
%31 = OpLabel
%37 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%38 = OpLoad %float %37
%39 = OpFOrdLessThan %bool %38 %float_0
OpSelectionMerge %40 None
OpBranchConditional %39 %41 %40
%41 = OpLabel
%43 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%44 = OpLoad %float %43
%45 = OpFOrdLessThan %bool %44 %float_0
OpSelectionMerge %46 None
OpBranchConditional %45 %47 %46
%47 = OpLabel
OpStore %x_GLF_color %49
OpBranch %46
%46 = OpLabel
OpBranch %25
%40 = OpLabel
OpReturn
%25 = OpLabel
%50 = OpLoad %int %i
%51 = OpIAdd %int %50 %int_1
OpStore %i %51
OpBranch %23
%24 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %52
%tint_symbol_1 = OpFunctionParameter %main_out
%56 = OpLabel
%57 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %57
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
%59 = OpLabel
%60 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %60
%61 = OpFunctionCall %void %main_1
%63 = OpLoad %v4float %x_GLF_color
%64 = OpCompositeConstruct %main_out %63
%62 = OpFunctionCall %void %tint_symbol_3 %64
OpReturn
OpFunctionEnd