blob: ff93ffd456bb297c0d62ff6907300125b866e4ae [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 %result "result"
OpName %i "i"
OpName %c "c"
OpName %thirty_two_0 "thirty_two"
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 %i_0 "i"
OpName %_GLF_color "_GLF_color"
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%20 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Function_float = OpTypePointer Function %float
%23 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float
%float_n0_5 = OpConstant %float -0.5
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%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
%40 = 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
%uint_2 = OpConstant %uint 2
%int_3 = OpConstant %int 3
%float_1 = OpConstant %float 1
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %20
%54 = OpLabel
%c = OpVariable %_ptr_Function_v3float Function
%thirty_two_0 = OpVariable %_ptr_Function_float 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
%i_0 = OpVariable %_ptr_Function_int Function
OpStore %c %40
%55 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
%56 = OpLoad %float %55
%57 = OpFDiv %float %56 %float_8
%58 = OpExtInst %float %1 Round %57
OpStore %thirty_two_0 %58
%59 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
%60 = OpLoad %float %59
OpStore %param %60
%61 = OpLoad %float %thirty_two_0
OpStore %param_0 %61
%62 = OpFunctionCall %float %compute_value_f1_f1_ %param %param_0
%63 = OpAccessChain %_ptr_Function_float %c %uint_0
OpStore %63 %62
%64 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%65 = OpLoad %float %64
OpStore %param_1 %65
%66 = OpLoad %float %thirty_two_0
OpStore %param_2 %66
%67 = OpFunctionCall %float %compute_value_f1_f1_ %param_1 %param_2
%68 = OpAccessChain %_ptr_Function_float %c %uint_1
OpStore %68 %67
%69 = OpAccessChain %_ptr_Function_float %c %uint_0
%70 = OpLoad %float %69
%71 = OpAccessChain %_ptr_Function_float %c %uint_1
%72 = OpLoad %float %71
%73 = OpFAdd %float %70 %72
%74 = OpAccessChain %_ptr_Function_float %c %uint_2
OpStore %74 %73
OpStore %i_0 %int_0
OpBranch %75
%75 = OpLabel
OpLoopMerge %76 %77 None
OpBranch %78
%78 = OpLabel
%79 = OpLoad %int %i_0
%80 = OpSLessThan %bool %79 %int_3
OpBranchConditional %80 %81 %76
%81 = OpLabel
%82 = OpLoad %int %i_0
%83 = OpAccessChain %_ptr_Function_float %c %82
%84 = OpLoad %float %83
%85 = OpFOrdGreaterThanEqual %bool %84 %float_1
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %86
%87 = OpLabel
%88 = OpLoad %int %i_0
%89 = OpLoad %int %i_0
%90 = OpAccessChain %_ptr_Function_float %c %89
%91 = OpLoad %float %90
%92 = OpLoad %int %i_0
%93 = OpAccessChain %_ptr_Function_float %c %92
%94 = OpLoad %float %93
%95 = OpFMul %float %91 %94
%96 = OpAccessChain %_ptr_Function_float %c %88
OpStore %96 %95
OpBranch %86
%86 = OpLabel
OpBranch %77
%77 = OpLabel
%97 = OpLoad %int %i_0
%98 = OpIAdd %int %97 %int_1
OpStore %i_0 %98
OpBranch %75
%76 = OpLabel
%99 = OpLoad %v3float %c
%100 = OpExtInst %v3float %1 FAbs %99
%101 = OpExtInst %v3float %1 Normalize %100
%102 = OpCompositeExtract %float %101 0
%103 = OpCompositeExtract %float %101 1
%104 = OpCompositeExtract %float %101 2
%105 = OpCompositeConstruct %v4float %102 %103 %104 %float_1
OpStore %_GLF_color %105
OpReturn
OpFunctionEnd
%compute_value_f1_f1_ = OpFunction %float None %23
%limit = OpFunctionParameter %_ptr_Function_float
%thirty_two = OpFunctionParameter %_ptr_Function_float
%106 = OpLabel
%result = OpVariable %_ptr_Function_float Function
%i = OpVariable %_ptr_Function_int Function
OpStore %result %float_n0_5
OpStore %i %int_1
OpBranch %107
%107 = OpLabel
OpLoopMerge %108 %109 None
OpBranch %110
%110 = OpLabel
%111 = OpLoad %int %i
%112 = OpSLessThan %bool %111 %int_800
OpBranchConditional %112 %113 %108
%113 = OpLabel
%114 = OpLoad %int %i
%115 = OpSMod %int %114 %int_32
%116 = OpIEqual %bool %115 %int_0
OpSelectionMerge %117 None
OpBranchConditional %116 %118 %119
%118 = OpLabel
%120 = OpLoad %float %result
%121 = OpFAdd %float %120 %float_0_400000006
OpStore %result %121
OpBranch %117
%119 = OpLabel
%122 = OpLoad %int %i
%123 = OpConvertSToF %float %122
%124 = OpLoad %float %thirty_two
%125 = OpExtInst %float %1 Round %124
%126 = OpFMod %float %123 %125
%127 = OpFOrdLessThanEqual %bool %126 %float_0_00999999978
OpSelectionMerge %128 None
OpBranchConditional %127 %129 %128
%129 = OpLabel
%130 = OpLoad %float %result
%131 = OpFAdd %float %130 %float_100
OpStore %result %131
OpBranch %128
%128 = OpLabel
OpBranch %117
%117 = OpLabel
%132 = OpLoad %int %i
%133 = OpConvertSToF %float %132
%134 = OpLoad %float %limit
%135 = OpFOrdGreaterThanEqual %bool %133 %134
OpSelectionMerge %136 None
OpBranchConditional %135 %137 %136
%137 = OpLabel
%138 = OpLoad %float %result
OpReturnValue %138
%136 = OpLabel
OpBranch %109
%109 = OpLabel
%139 = OpLoad %int %i
%140 = OpIAdd %int %139 %int_1
OpStore %i %140
OpBranch %107
%108 = OpLabel
%141 = OpLoad %float %result
OpReturnValue %141
OpFunctionEnd