blob: 8abeefc970b1eb1ee40367d2d2c36ed4819cc646 [file] [log] [blame]
OpCapability Shader
%5 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
OpExecutionMode %_entrypoint_v OriginUpperLeft
; Debug Information
OpName %sk_FragColor "sk_FragColor" ; id %8
OpName %x "x" ; id %12
OpName %_UniformBuffer "_UniformBuffer" ; id %16
OpMemberName %_UniformBuffer 0 "colorGreen"
OpMemberName %_UniformBuffer 1 "colorRed"
OpName %_entrypoint_v "_entrypoint_v" ; id %18
OpName %out_params_are_distinct_from_global_bh "out_params_are_distinct_from_global_bh" ; id %6
OpName %main "main" ; id %7
; Annotations
OpDecorate %main RelaxedPrecision
OpDecorate %sk_FragColor RelaxedPrecision
OpDecorate %sk_FragColor Location 0
OpDecorate %sk_FragColor Index 0
OpDecorate %x RelaxedPrecision
OpMemberDecorate %_UniformBuffer 0 Offset 0
OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
OpMemberDecorate %_UniformBuffer 1 Offset 16
OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
OpDecorate %_UniformBuffer Block
OpDecorate %15 Binding 0
OpDecorate %15 DescriptorSet 0
OpDecorate %31 RelaxedPrecision
OpDecorate %35 RelaxedPrecision
OpDecorate %44 RelaxedPrecision
OpDecorate %46 RelaxedPrecision
OpDecorate %55 RelaxedPrecision
OpDecorate %58 RelaxedPrecision
OpDecorate %59 RelaxedPrecision
; Types, variables and constants
%int = OpTypeInt 32 1
%_ptr_Input_int = OpTypePointer Input %int
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%sk_FragColor = OpVariable %_ptr_Output_v4float Output ; RelaxedPrecision, Location 0, Index 0
%_ptr_Private_float = OpTypePointer Private %float
%x = OpVariable %_ptr_Private_float Private ; RelaxedPrecision
%float_1 = OpConstant %float 1
%_UniformBuffer = OpTypeStruct %v4float %v4float ; Block
%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
%15 = OpVariable %_ptr_Uniform__UniformBuffer Uniform ; Binding 0, DescriptorSet 0
%void = OpTypeVoid
%20 = OpTypeFunction %void
%float_0 = OpConstant %float 0
%v2float = OpTypeVector %float 2
%24 = OpConstantComposite %v2float %float_0 %float_0
%_ptr_Function_v2float = OpTypePointer Function %v2float
%bool = OpTypeBool
%_ptr_Function_float = OpTypePointer Function %float
%30 = OpTypeFunction %bool %_ptr_Function_float
%float_2 = OpConstant %float 2
%false = OpConstantFalse %bool
%true = OpConstantTrue %bool
%41 = OpTypeFunction %v4float %_ptr_Function_v2float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
; Function _entrypoint_v
%_entrypoint_v = OpFunction %void None %20
%21 = OpLabel
%25 = OpVariable %_ptr_Function_v2float Function
OpStore %25 %24
%27 = OpFunctionCall %v4float %main %25
OpStore %sk_FragColor %27
OpReturn
OpFunctionEnd
; Function out_params_are_distinct_from_global_bh
%out_params_are_distinct_from_global_bh = OpFunction %bool None %30
%31 = OpFunctionParameter %_ptr_Function_float ; RelaxedPrecision
%32 = OpLabel
OpStore %31 %float_2
%35 = OpLoad %float %x ; RelaxedPrecision
%36 = OpFOrdEqual %bool %35 %float_1
OpSelectionMerge %38 None
OpBranchConditional %36 %37 %38
%37 = OpLabel
OpBranch %38
%38 = OpLabel
%40 = OpPhi %bool %false %32 %true %37
OpReturnValue %40
OpFunctionEnd
; Function main
%main = OpFunction %v4float None %41 ; RelaxedPrecision
%42 = OpFunctionParameter %_ptr_Function_v2float
%43 = OpLabel
%44 = OpVariable %_ptr_Function_float Function ; RelaxedPrecision
%47 = OpVariable %_ptr_Function_v4float Function
OpStore %x %float_1
%45 = OpFunctionCall %bool %out_params_are_distinct_from_global_bh %44
%46 = OpLoad %float %44 ; RelaxedPrecision
OpStore %x %46
OpSelectionMerge %51 None
OpBranchConditional %45 %49 %50
%49 = OpLabel
%52 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
%55 = OpLoad %v4float %52 ; RelaxedPrecision
OpStore %47 %55
OpBranch %51
%50 = OpLabel
%56 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1
%58 = OpLoad %v4float %56 ; RelaxedPrecision
OpStore %47 %58
OpBranch %51
%51 = OpLabel
%59 = OpLoad %v4float %47 ; RelaxedPrecision
OpReturnValue %59
OpFunctionEnd