blob: 6ff67b14e436a8adfa2ddd3072f1d1311381e89e [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 320
OpName %main "main"
OpName %compute_value_f1_f1_ "compute_value(f1;f1;"
OpName %limit "limit"
OpName %thirty_two "thirty_two"
OpName %c "c"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "resolution"
OpName %_ ""
OpName %gl_FragCoord "gl_FragCoord"
OpName %param "param"
OpName %param_0 "param"
OpName %param_1 "param"
OpName %param_2 "param"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "injectionSwitch"
OpName %__0 ""
OpName %_GLF_color "_GLF_color"
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %buf1 Block
OpDecorate %__0 DescriptorSet 0
OpDecorate %__0 Binding 1
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%18 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Function_float = OpTypePointer Function %float
%21 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float
%float_n0_5 = OpConstant %float -0.5
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%int_800 = OpConstant %int 800
%bool = OpTypeBool
%int_32 = OpConstant %int 32
%int_0 = OpConstant %int 0
%float_0_400000006 = OpConstant %float 0.400000006
%float_0_00999999978 = OpConstant %float 0.00999999978
%float_100 = OpConstant %float 100
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_7 = OpConstant %float 7
%float_8 = OpConstant %float 8
%float_9 = OpConstant %float 9
%37 = OpConstantComposite %v3float %float_7 %float_8 %float_9
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%_ptr_Input_float = OpTypePointer Input %float
%uint_1 = OpConstant %uint 1
%float_1 = OpConstant %float 1
%uint_2 = OpConstant %uint 2
%int_3 = OpConstant %int 3
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%float_0_125 = OpConstant %float 0.125
%main = OpFunction %void None %18
%53 = OpLabel
%c = OpVariable %_ptr_Function_v3float Function
%param = OpVariable %_ptr_Function_float Function
%param_0 = OpVariable %_ptr_Function_float Function
%param_1 = OpVariable %_ptr_Function_float Function
%param_2 = OpVariable %_ptr_Function_float Function
%54 = OpVariable %_ptr_Function_v3float Function
OpStore %c %37
%55 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
%56 = OpLoad %float %55
%57 = OpFMul %float %56 %float_0_125
%58 = OpExtInst %float %1 Round %57
%59 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
%60 = OpLoad %float %59
OpStore %param %60
OpStore %param_0 %58
%61 = OpFunctionCall %float %compute_value_f1_f1_ %param %param_0
%62 = OpAccessChain %_ptr_Function_float %c %uint_0
OpStore %62 %61
%63 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%64 = OpLoad %float %63
OpStore %param_1 %64
OpStore %param_2 %58
%65 = OpFunctionCall %float %compute_value_f1_f1_ %param_1 %param_2
%66 = OpAccessChain %_ptr_Function_float %c %uint_1
OpStore %66 %65
%67 = OpLoad %float %62
%68 = OpLoad %v3float %c
OpStore %54 %68
%69 = OpAccessChain %_ptr_Function_float %54 %uint_1
%70 = OpLoad %float %69
%71 = OpFAdd %float %67 %70
%72 = OpAccessChain %_ptr_Function_float %c %uint_2
OpStore %72 %71
OpBranch %73
%73 = OpLabel
%74 = OpPhi %int %int_0 %53 %75 %76
%77 = OpSLessThan %bool %74 %int_3
OpLoopMerge %78 %76 None
OpBranchConditional %77 %79 %78
%79 = OpLabel
%80 = OpAccessChain %_ptr_Function_float %c %74
%81 = OpLoad %float %80
%82 = OpFOrdGreaterThanEqual %bool %81 %float_1
OpSelectionMerge %83 None
OpBranchConditional %82 %84 %83
%84 = OpLabel
%85 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %uint_0
%86 = OpLoad %float %85
%87 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %uint_1
%88 = OpLoad %float %87
%89 = OpFOrdGreaterThan %bool %86 %88
OpSelectionMerge %90 None
OpBranchConditional %89 %91 %90
%91 = OpLabel
OpKill
%90 = OpLabel
%92 = OpLoad %float %80
%93 = OpLoad %float %80
%94 = OpFMul %float %92 %93
OpStore %80 %94
OpBranch %83
%83 = OpLabel
OpBranch %76
%76 = OpLabel
%75 = OpIAdd %int %74 %int_1
OpBranch %73
%78 = OpLabel
%95 = OpLoad %v3float %c
%96 = OpExtInst %v3float %1 FAbs %95
%97 = OpExtInst %v3float %1 Normalize %96
%98 = OpCompositeExtract %float %97 0
%99 = OpCompositeExtract %float %97 1
%100 = OpCompositeExtract %float %97 2
%101 = OpCompositeConstruct %v4float %98 %99 %100 %float_1
OpStore %_GLF_color %101
OpReturn
OpFunctionEnd
%compute_value_f1_f1_ = OpFunction %float None %21
%limit = OpFunctionParameter %_ptr_Function_float
%thirty_two = OpFunctionParameter %_ptr_Function_float
%102 = OpLabel
OpBranch %103
%103 = OpLabel
%104 = OpPhi %float %float_n0_5 %102 %105 %106
%107 = OpPhi %int %int_1 %102 %108 %106
%109 = OpSLessThan %bool %107 %int_800
OpLoopMerge %110 %106 None
OpBranchConditional %109 %111 %110
%111 = OpLabel
%112 = OpSMod %int %107 %int_32
%113 = OpIEqual %bool %112 %int_0
OpSelectionMerge %114 None
OpBranchConditional %113 %115 %116
%116 = OpLabel
%117 = OpConvertSToF %float %107
%118 = OpLoad %float %thirty_two
%119 = OpExtInst %float %1 Round %118
%120 = OpFMod %float %117 %119
%121 = OpFOrdLessThanEqual %bool %120 %float_0_00999999978
OpSelectionMerge %122 None
OpBranchConditional %121 %123 %122
%123 = OpLabel
%124 = OpFAdd %float %104 %float_100
OpBranch %122
%122 = OpLabel
%125 = OpPhi %float %104 %116 %124 %123
OpBranch %114
%115 = OpLabel
%126 = OpFAdd %float %104 %float_0_400000006
OpBranch %114
%114 = OpLabel
%105 = OpPhi %float %126 %115 %125 %122
%127 = OpConvertSToF %float %107
%128 = OpLoad %float %limit
%129 = OpFOrdGreaterThanEqual %bool %127 %128
OpSelectionMerge %130 None
OpBranchConditional %129 %131 %130
%131 = OpLabel
OpReturnValue %105
%130 = OpLabel
OpBranch %106
%106 = OpLabel
%108 = OpIAdd %int %107 %int_1
OpBranch %103
%110 = OpLabel
OpReturnValue %104
OpFunctionEnd