blob: 34c5d521b07f85abc7c7f6a233fd8e08f5950609 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 49
; Schema: 0
OpCapability Shader
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 %buf0 "buf0"
OpMemberName %buf0 0 "one"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %x "x"
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
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 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
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%12 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_5 = OpConstant %int 5
%int_n4 = OpConstant %int -4
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%36 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%37 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%38 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x = OpVariable %_ptr_Function_int Function %18
%22 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0
%23 = OpLoad %int %22
%26 = OpISub %int %int_5 %23
%24 = OpSNegate %int %26
OpStore %x %24
%27 = OpLoad %int %x
%29 = OpIEqual %bool %27 %int_n4
OpSelectionMerge %31 None
OpBranchConditional %29 %32 %33
%32 = OpLabel
OpStore %x_GLF_color %36
OpBranch %31
%33 = OpLabel
OpStore %x_GLF_color %37
OpBranch %31
%31 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %38
%41 = OpLabel
%42 = OpFunctionCall %void %main_1
%43 = OpLoad %v4float %x_GLF_color
%44 = OpCompositeConstruct %main_out %43
OpReturnValue %44
OpFunctionEnd
%main = OpFunction %void None %12
%46 = OpLabel
%47 = OpFunctionCall %main_out %main_inner
%48 = OpCompositeExtract %v4float %47 0
OpStore %x_GLF_color_1_1 %48
OpReturn
OpFunctionEnd