blob: 8142eeda381f5898a144b4eb9082974f9de28d2c [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" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
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 %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 %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
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_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%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 %main_out %v4float
%main_1 = OpFunction %void None %15
%18 = OpLabel
%x_42 = OpVariable %_ptr_Function_v4float Function %7
%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 %7
%x_42_phi = OpVariable %_ptr_Function_v4float Function %7
%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 %7
%x_48 = OpVariable %_ptr_Function_int Function %51
%x_66 = OpVariable %_ptr_Function_v4float Function %7
%x_70 = OpVariable %_ptr_Function_v4float Function %7
%x_45_phi = OpVariable %_ptr_Function_v4float Function %7
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
%main_inner = OpFunction %main_out None %125
%gl_FragCoord_param = OpFunctionParameter %v4float
%129 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%130 = OpFunctionCall %void %main_1
%131 = OpLoad %v4float %x_GLF_color
%132 = OpCompositeConstruct %main_out %131
OpReturnValue %132
OpFunctionEnd
%main = OpFunction %void None %15
%134 = OpLabel
%136 = OpLoad %v4float %gl_FragCoord_param_1
%135 = OpFunctionCall %main_out %main_inner %136
%137 = OpCompositeExtract %v4float %135 0
OpStore %x_GLF_color_1_1 %137
OpReturn
OpFunctionEnd