blob: 92f7fbdc4df007f9360da63e7a5190363634ae71 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 138
; Schema: 0
OpCapability Shader
%39 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_6 "x_6"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %x_42 "x_42"
OpName %x_39 "x_39"
OpName %x_38_phi "x_38_phi"
OpName %x_41_phi "x_41_phi"
OpName %x_42_phi "x_42_phi"
OpName %x_47_phi "x_47_phi"
OpName %x_39_phi "x_39_phi"
OpName %x_45 "x_45"
OpName %x_48 "x_48"
OpName %x_66 "x_66"
OpName %x_70 "x_70"
OpName %x_45_phi "x_45_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_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
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
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%_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
%15 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%28 = OpConstantNull %bool
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%int = OpTypeInt 32 1
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%42 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%false = OpConstantFalse %bool
%_ptr_Function_int = OpTypePointer Function %int
%51 = OpConstantNull %int
%int_0 = OpConstant %int 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%true = OpConstantTrue %bool
%int_1 = OpConstant %int 1
%_ptr_Function_float = OpTypePointer Function %float
%uint_2 = OpConstant %uint 2
%main_out = OpTypeStruct %v4float
%125 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%x_42 = OpVariable %_ptr_Function_v4float Function %5
%x_39 = OpVariable %_ptr_Function_bool Function %28
%x_38_phi = OpVariable %_ptr_Function_bool Function %28
%x_41_phi = OpVariable %_ptr_Function_v4float Function %5
%x_42_phi = OpVariable %_ptr_Function_v4float Function %5
%x_47_phi = OpVariable %_ptr_Function_int Function %51
%x_39_phi = OpVariable %_ptr_Function_bool Function %28
%x_45 = OpVariable %_ptr_Function_v4float Function %5
%x_48 = OpVariable %_ptr_Function_int Function %51
%x_66 = OpVariable %_ptr_Function_v4float Function %5
%x_70 = OpVariable %_ptr_Function_v4float Function %5
%x_45_phi = OpVariable %_ptr_Function_v4float Function %5
OpBranch %19
%19 = OpLabel
OpLoopMerge %20 %21 None
OpBranch %22
%22 = OpLabel
%34 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%35 = OpLoad %float %34
%38 = OpExtInst %float %39 NClamp %35 %float_0 %float_1
%36 = OpConvertFToS %int %38
OpStore %x_GLF_color %42
OpStore %x_38_phi %false
OpStore %x_41_phi %42
OpBranch %44
%44 = OpLabel
OpLoopMerge %45 %46 None
OpBranch %47
%47 = OpLabel
%53 = OpLoad %bool %x_38_phi
%54 = OpLoad %v4float %x_41_phi
OpStore %x_42_phi %54
OpStore %x_47_phi %int_0
OpBranch %56
%56 = OpLabel
OpLoopMerge %57 %58 None
OpBranch %59
%59 = OpLabel
%62 = OpLoad %v4float %x_42_phi
OpStore %x_42 %62
%63 = OpLoad %int %x_47_phi
%66 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
%67 = OpLoad %float %66
OpStore %x_39_phi %53
%68 = OpConvertFToS %int %67
%69 = OpIAdd %int %36 %68
%70 = OpSLessThan %bool %63 %69
OpSelectionMerge %71 None
OpBranchConditional %70 %72 %73
%72 = OpLabel
OpBranch %71
%73 = OpLabel
OpBranch %57
%71 = OpLabel
%77 = OpSLessThan %bool %36 %int_0
OpSelectionMerge %78 None
OpBranchConditional %77 %79 %80
%79 = OpLabel
OpStore %x_39_phi %true
OpBranch %57
%80 = OpLabel
%83 = OpIEqual %bool %36 %int_1
OpSelectionMerge %84 None
OpBranchConditional %83 %85 %86
%85 = OpLabel
%87 = OpConvertSToF %float %36
%88 = OpCompositeConstruct %v2float %87 %87
%89 = OpCompositeExtract %float %88 0
%91 = OpAccessChain %_ptr_Function_float %x_42 %uint_1
%92 = OpLoad %float %91
%94 = OpAccessChain %_ptr_Function_float %x_42 %uint_2
%95 = OpLoad %float %94
%96 = OpCompositeExtract %float %88 1
%97 = OpCompositeConstruct %v4float %89 %92 %95 %96
OpStore %x_66 %97
%98 = OpLoad %v4float %x_66
OpStore %x_45_phi %98
OpBranch %84
%86 = OpLabel
%100 = OpIAdd %int %36 %int_1
%99 = OpConvertSToF %float %100
%101 = OpCompositeConstruct %v2float %99 %99
%102 = OpCompositeExtract %float %101 0
%103 = OpAccessChain %_ptr_Function_float %x_42 %uint_1
%104 = OpLoad %float %103
%105 = OpAccessChain %_ptr_Function_float %x_42 %uint_2
%106 = OpLoad %float %105
%107 = OpCompositeExtract %float %101 1
%108 = OpCompositeConstruct %v4float %102 %104 %106 %107
OpStore %x_70 %108
%109 = OpLoad %v4float %x_70
OpStore %x_45_phi %109
OpBranch %84
%84 = OpLabel
%110 = OpLoad %v4float %x_45_phi
OpStore %x_45 %110
OpBranch %78
%78 = OpLabel
OpBranch %58
%58 = OpLabel
%111 = OpIAdd %int %63 %int_1
OpStore %x_48 %111
%112 = OpLoad %v4float %x_45
OpStore %x_42_phi %112
%113 = OpLoad %int %x_48
OpStore %x_47_phi %113
OpBranch %56
%57 = OpLabel
%114 = OpLoad %bool %x_39_phi
OpStore %x_39 %114
%115 = OpLoad %bool %x_39
OpSelectionMerge %116 None
OpBranchConditional %115 %117 %116
%117 = OpLabel
OpBranch %45
%116 = OpLabel
OpBranch %46
%46 = OpLabel
%118 = OpLoad %bool %x_39
OpStore %x_38_phi %118
%119 = OpLoad %v4float %x_42
OpStore %x_41_phi %119
%120 = OpSLessThan %bool %36 %int_0
OpBranchConditional %120 %44 %45
%45 = OpLabel
%121 = OpLoad %bool %x_39
OpSelectionMerge %122 None
OpBranchConditional %121 %123 %122
%123 = OpLabel
OpBranch %20
%122 = OpLabel
%124 = OpLoad %v4float %x_42
OpStore %x_GLF_color %124
OpBranch %20
%21 = OpLabel
OpBranch %19
%20 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %125
%tint_symbol_1 = OpFunctionParameter %main_out
%129 = OpLabel
%130 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %130
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%132 = OpLabel
%133 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %133
%134 = OpFunctionCall %void %main_1
%136 = OpLoad %v4float %x_GLF_color
%137 = OpCompositeConstruct %main_out %136
%135 = OpFunctionCall %void %tint_symbol_3 %137
OpReturn
OpFunctionEnd