blob: 50e32c8e8697aefa4f6d794527b35e3e34ca8ae2 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 51
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %a "a"
OpName %b "b"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%15 = OpConstantNull %v2float
%float_1 = OpConstant %float 1
%18 = OpConstantComposite %v2float %float_1 %float_1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%float_0_5 = OpConstant %float 0.5
%bool = OpTypeBool
%float_0 = OpConstant %float 0
%38 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%39 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%40 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%a = OpVariable %_ptr_Function_v2float Function %15
%b = OpVariable %_ptr_Function_v2float Function %15
OpStore %a %18
%22 = OpAccessChain %_ptr_Function_float %a %uint_0
%23 = OpLoad %float %22
%24 = OpAccessChain %_ptr_Function_float %a %uint_0
%26 = OpFAdd %float %23 %float_0_5
OpStore %24 %26
%27 = OpLoad %v2float %a
%28 = OpExtInst %v2float %29 Fract %27
OpStore %b %28
%30 = OpAccessChain %_ptr_Function_float %b %uint_0
%31 = OpLoad %float %30
%32 = OpFOrdEqual %bool %31 %float_0_5
OpSelectionMerge %34 None
OpBranchConditional %32 %35 %36
%35 = OpLabel
OpStore %x_GLF_color %38
OpBranch %34
%36 = OpLabel
OpStore %x_GLF_color %39
OpBranch %34
%34 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %40
%43 = OpLabel
%44 = OpFunctionCall %void %main_1
%45 = OpLoad %v4float %x_GLF_color
%46 = OpCompositeConstruct %main_out %45
OpReturnValue %46
OpFunctionEnd
%main = OpFunction %void None %8
%48 = OpLabel
%49 = OpFunctionCall %main_out %main_inner
%50 = OpCompositeExtract %v4float %49 0
OpStore %x_GLF_color_1_1 %50
OpReturn
OpFunctionEnd