blob: b6030fb19ab1a4e152ba12e49d11211b9edce050 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 131
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_9 "x_9"
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 %v "v"
OpName %floats "floats"
OpName %one "one"
OpName %i "i"
OpName %alwaysFalse "alwaysFalse"
OpName %x_102 "x_102"
OpName %x_103_phi "x_103_phi"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpDecorate %_arr_float_uint_9 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_9 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %9
%_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 %9
%void = OpTypeVoid
%15 = OpTypeFunction %void
%_ptr_Function_v2float = OpTypePointer Function %v2float
%21 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_9 = OpConstant %uint 9
%_arr_float_uint_9 = OpTypeArray %float %uint_9
%_ptr_Function__arr_float_uint_9 = OpTypePointer Function %_arr_float_uint_9
%27 = OpConstantNull %_arr_float_uint_9
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%31 = OpConstantNull %int
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%36 = OpConstantNull %bool
%float_0 = OpConstant %float 0
%38 = OpConstantComposite %v2float %float_0 %float_0
%int_1 = OpConstant %int 1
%_ptr_Function_float = OpTypePointer Function %float
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_0 = OpConstant %int 0
%float_1 = OpConstant %float 1
%79 = OpConstantComposite %v4float %float_1 %float_1 %float_0 %float_1
%90 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
%_ptr_Private_float = OpTypePointer Private %float
%116 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%117 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%118 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%v = OpVariable %_ptr_Function_v2float Function %21
%floats = OpVariable %_ptr_Function__arr_float_uint_9 Function %27
%one = OpVariable %_ptr_Function_int Function %31
%i = OpVariable %_ptr_Function_int Function %31
%alwaysFalse = OpVariable %_ptr_Function_bool Function %36
%x_102 = OpVariable %_ptr_Function_bool Function %36
%x_103_phi = OpVariable %_ptr_Function_bool Function %36
OpStore %v %38
%41 = OpAccessChain %_ptr_Function_float %floats %int_1
OpStore %41 %float_0
%45 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_1
%46 = OpLoad %float %45
%47 = OpConvertFToS %int %46
OpStore %one %47
OpBranch %48
%48 = OpLabel
OpLoopMerge %49 %50 None
OpBranch %51
%51 = OpLabel
OpStore %i %int_0
OpBranch %53
%53 = OpLabel
OpLoopMerge %54 %55 None
OpBranch %56
%56 = OpLabel
%57 = OpLoad %int %i
%58 = OpLoad %int %one
%59 = OpSLessThan %bool %57 %58
OpSelectionMerge %60 None
OpBranchConditional %59 %61 %62
%61 = OpLabel
OpBranch %60
%62 = OpLabel
OpBranch %54
%60 = OpLabel
%63 = OpLoad %int %i
%64 = OpIEqual %bool %63 %int_0
OpSelectionMerge %65 None
OpBranchConditional %64 %66 %65
%66 = OpLabel
%67 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_0
%68 = OpLoad %float %67
%69 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_1
%70 = OpLoad %float %69
%71 = OpFOrdGreaterThan %bool %68 %70
OpStore %alwaysFalse %71
%72 = OpLoad %bool %alwaysFalse
%73 = OpLogicalNot %bool %72
OpSelectionMerge %74 None
OpBranchConditional %73 %75 %74
%75 = OpLabel
%76 = OpLoad %int %one
%77 = OpAccessChain %_ptr_Function_float %floats %76
OpStore %77 %float_1
OpStore %x_GLF_color %79
OpBranch %74
%74 = OpLabel
%80 = OpLoad %int %one
%81 = OpAccessChain %_ptr_Function_float %v %80
OpStore %81 %float_1
%82 = OpLoad %bool %alwaysFalse
OpSelectionMerge %83 None
OpBranchConditional %82 %84 %83
%84 = OpLabel
OpKill
%83 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_1
%86 = OpLoad %float %85
%87 = OpFOrdLessThan %bool %86 %float_0
OpSelectionMerge %88 None
OpBranchConditional %87 %89 %88
%89 = OpLabel
OpStore %x_GLF_color %90
OpBranch %88
%88 = OpLabel
OpBranch %65
%65 = OpLabel
OpBranch %55
%55 = OpLabel
%91 = OpLoad %int %i
%92 = OpIAdd %int %91 %int_1
OpStore %i %92
OpBranch %53
%54 = OpLabel
OpBranch %50
%50 = OpLabel
%93 = OpLoad %int %one
%94 = OpSLessThan %bool %93 %int_0
OpBranchConditional %94 %48 %49
%49 = OpLabel
%98 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%99 = OpLoad %float %98
%100 = OpFOrdGreaterThanEqual %bool %99 %float_0
OpSelectionMerge %101 None
OpBranchConditional %100 %102 %103
%102 = OpLabel
%104 = OpAccessChain %_ptr_Function_float %v %uint_1
%105 = OpLoad %float %104
%106 = OpFOrdEqual %bool %105 %float_1
OpStore %x_103_phi %106
OpSelectionMerge %107 None
OpBranchConditional %106 %108 %107
%108 = OpLabel
%109 = OpAccessChain %_ptr_Function_float %floats %int_1
%110 = OpLoad %float %109
%111 = OpFOrdEqual %bool %110 %float_1
OpStore %x_102 %111
%112 = OpLoad %bool %x_102
OpStore %x_103_phi %112
OpBranch %107
%107 = OpLabel
%113 = OpLoad %bool %x_103_phi
OpSelectionMerge %114 None
OpBranchConditional %113 %115 %114
%115 = OpLabel
OpStore %x_GLF_color %116
OpBranch %114
%114 = OpLabel
OpBranch %101
%103 = OpLabel
OpStore %x_GLF_color %117
OpBranch %101
%101 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %118
%tint_symbol_1 = OpFunctionParameter %main_out
%122 = OpLabel
%123 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %123
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%125 = OpLabel
%126 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %126
%127 = OpFunctionCall %void %main_1
%129 = OpLoad %v4float %x_GLF_color
%130 = OpCompositeConstruct %main_out %129
%128 = OpFunctionCall %void %tint_symbol_3 %130
OpReturn
OpFunctionEnd