| /*#pragma settings NoInline*/ |
| |
| /************************************************************************************************** |
| *** This file was autogenerated from GrFunctionReturnTypes.fp; do not modify. |
| **************************************************************************************************/ |
| #include "GrFunctionReturnTypes.h" |
| |
| #include "src/core/SkUtils.h" |
| #include "src/gpu/GrTexture.h" |
| #include "src/gpu/glsl/GrGLSLFragmentProcessor.h" |
| #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h" |
| #include "src/gpu/glsl/GrGLSLProgramBuilder.h" |
| #include "src/sksl/SkSLCPP.h" |
| #include "src/sksl/SkSLUtil.h" |
| class GrGLSLFunctionReturnTypes : public GrGLSLFragmentProcessor { |
| public: |
| GrGLSLFunctionReturnTypes() {} |
| void emitCode(EmitArgs& args) override { |
| GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; |
| const GrFunctionReturnTypes& _outer = args.fFp.cast<GrFunctionReturnTypes>(); |
| (void) _outer; |
| SkString returns_float_name = fragBuilder->getMangledFunctionName("returns_float"); |
| const GrShaderVar returns_float_args[] = { }; |
| SkString returns_float2_name = fragBuilder->getMangledFunctionName("returns_float2"); |
| const GrShaderVar returns_float2_args[] = { }; |
| SkString returns_float3_name = fragBuilder->getMangledFunctionName("returns_float3"); |
| const GrShaderVar returns_float3_args[] = { }; |
| SkString returns_float4_name = fragBuilder->getMangledFunctionName("returns_float4"); |
| const GrShaderVar returns_float4_args[] = { }; |
| SkString returns_float2x2_name = fragBuilder->getMangledFunctionName("returns_float2x2"); |
| const GrShaderVar returns_float2x2_args[] = { }; |
| SkString returns_float3x3_name = fragBuilder->getMangledFunctionName("returns_float3x3"); |
| const GrShaderVar returns_float3x3_args[] = { }; |
| SkString returns_float4x4_name = fragBuilder->getMangledFunctionName("returns_float4x4"); |
| const GrShaderVar returns_float4x4_args[] = { }; |
| SkString returns_half_name = fragBuilder->getMangledFunctionName("returns_half"); |
| const GrShaderVar returns_half_args[] = { }; |
| SkString returns_half2_name = fragBuilder->getMangledFunctionName("returns_half2"); |
| const GrShaderVar returns_half2_args[] = { }; |
| SkString returns_half3_name = fragBuilder->getMangledFunctionName("returns_half3"); |
| const GrShaderVar returns_half3_args[] = { }; |
| SkString returns_half4_name = fragBuilder->getMangledFunctionName("returns_half4"); |
| const GrShaderVar returns_half4_args[] = { }; |
| SkString returns_half2x2_name = fragBuilder->getMangledFunctionName("returns_half2x2"); |
| const GrShaderVar returns_half2x2_args[] = { }; |
| SkString returns_half3x3_name = fragBuilder->getMangledFunctionName("returns_half3x3"); |
| const GrShaderVar returns_half3x3_args[] = { }; |
| SkString returns_half4x4_name = fragBuilder->getMangledFunctionName("returns_half4x4"); |
| const GrShaderVar returns_half4x4_args[] = { }; |
| SkString returns_bool_name = fragBuilder->getMangledFunctionName("returns_bool"); |
| const GrShaderVar returns_bool_args[] = { }; |
| SkString returns_bool2_name = fragBuilder->getMangledFunctionName("returns_bool2"); |
| const GrShaderVar returns_bool2_args[] = { }; |
| SkString returns_bool3_name = fragBuilder->getMangledFunctionName("returns_bool3"); |
| const GrShaderVar returns_bool3_args[] = { }; |
| SkString returns_bool4_name = fragBuilder->getMangledFunctionName("returns_bool4"); |
| const GrShaderVar returns_bool4_args[] = { }; |
| SkString returns_int_name = fragBuilder->getMangledFunctionName("returns_int"); |
| const GrShaderVar returns_int_args[] = { }; |
| SkString returns_int2_name = fragBuilder->getMangledFunctionName("returns_int2"); |
| const GrShaderVar returns_int2_args[] = { }; |
| SkString returns_int3_name = fragBuilder->getMangledFunctionName("returns_int3"); |
| const GrShaderVar returns_int3_args[] = { }; |
| SkString returns_int4_name = fragBuilder->getMangledFunctionName("returns_int4"); |
| const GrShaderVar returns_int4_args[] = { }; |
| fragBuilder->emitFunction(kFloat_GrSLType, returns_float_name.c_str(), {returns_float_args, 0}, |
| R"SkSL(return 1.0; |
| )SkSL"); |
| fragBuilder->emitFunction(kFloat2_GrSLType, returns_float2_name.c_str(), {returns_float2_args, 0}, |
| R"SkSL(return float2(2.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kFloat3_GrSLType, returns_float3_name.c_str(), {returns_float3_args, 0}, |
| R"SkSL(return float3(3.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kFloat4_GrSLType, returns_float4_name.c_str(), {returns_float4_args, 0}, |
| R"SkSL(return float4(4.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kFloat2x2_GrSLType, returns_float2x2_name.c_str(), {returns_float2x2_args, 0}, |
| R"SkSL(return float2x2(2.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kFloat3x3_GrSLType, returns_float3x3_name.c_str(), {returns_float3x3_args, 0}, |
| R"SkSL(return float3x3(3.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kFloat4x4_GrSLType, returns_float4x4_name.c_str(), {returns_float4x4_args, 0}, |
| R"SkSL(return float4x4(4.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kHalf_GrSLType, returns_half_name.c_str(), {returns_half_args, 0}, |
| R"SkSL(return 1.0; |
| )SkSL"); |
| fragBuilder->emitFunction(kHalf2_GrSLType, returns_half2_name.c_str(), {returns_half2_args, 0}, |
| R"SkSL(return half2(2.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kHalf3_GrSLType, returns_half3_name.c_str(), {returns_half3_args, 0}, |
| R"SkSL(return half3(3.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kHalf4_GrSLType, returns_half4_name.c_str(), {returns_half4_args, 0}, |
| R"SkSL(return half4(4.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kHalf2x2_GrSLType, returns_half2x2_name.c_str(), {returns_half2x2_args, 0}, |
| R"SkSL(return half2x2(2.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kHalf3x3_GrSLType, returns_half3x3_name.c_str(), {returns_half3x3_args, 0}, |
| R"SkSL(return half3x3(3.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kHalf4x4_GrSLType, returns_half4x4_name.c_str(), {returns_half4x4_args, 0}, |
| R"SkSL(return half4x4(4.0); |
| )SkSL"); |
| fragBuilder->emitFunction(kBool_GrSLType, returns_bool_name.c_str(), {returns_bool_args, 0}, |
| R"SkSL(return true; |
| )SkSL"); |
| fragBuilder->emitFunction(kBool2_GrSLType, returns_bool2_name.c_str(), {returns_bool2_args, 0}, |
| R"SkSL(return bool2(true); |
| )SkSL"); |
| fragBuilder->emitFunction(kBool3_GrSLType, returns_bool3_name.c_str(), {returns_bool3_args, 0}, |
| R"SkSL(return bool3(true); |
| )SkSL"); |
| fragBuilder->emitFunction(kBool4_GrSLType, returns_bool4_name.c_str(), {returns_bool4_args, 0}, |
| R"SkSL(return bool4(true); |
| )SkSL"); |
| fragBuilder->emitFunction(kInt_GrSLType, returns_int_name.c_str(), {returns_int_args, 0}, |
| R"SkSL(return 1; |
| )SkSL"); |
| fragBuilder->emitFunction(kInt2_GrSLType, returns_int2_name.c_str(), {returns_int2_args, 0}, |
| R"SkSL(return int2(2); |
| )SkSL"); |
| fragBuilder->emitFunction(kInt3_GrSLType, returns_int3_name.c_str(), {returns_int3_args, 0}, |
| R"SkSL(return int3(3); |
| )SkSL"); |
| fragBuilder->emitFunction(kInt4_GrSLType, returns_int4_name.c_str(), {returns_int4_args, 0}, |
| R"SkSL(return int4(4); |
| )SkSL"); |
| fragBuilder->codeAppendf( |
| R"SkSL(%s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| %s(); |
| return half4(1.0); |
| )SkSL" |
| , returns_float_name.c_str(), returns_float2_name.c_str(), returns_float3_name.c_str(), returns_float4_name.c_str(), returns_float2x2_name.c_str(), returns_float3x3_name.c_str(), returns_float4x4_name.c_str(), returns_half_name.c_str(), returns_half2_name.c_str(), returns_half3_name.c_str(), returns_half4_name.c_str(), returns_half2x2_name.c_str(), returns_half3x3_name.c_str(), returns_half4x4_name.c_str(), returns_bool_name.c_str(), returns_bool2_name.c_str(), returns_bool3_name.c_str(), returns_bool4_name.c_str(), returns_int_name.c_str(), returns_int2_name.c_str(), returns_int3_name.c_str(), returns_int4_name.c_str()); |
| } |
| private: |
| void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override { |
| } |
| }; |
| std::unique_ptr<GrGLSLFragmentProcessor> GrFunctionReturnTypes::onMakeProgramImpl() const { |
| return std::make_unique<GrGLSLFunctionReturnTypes>(); |
| } |
| void GrFunctionReturnTypes::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const { |
| } |
| bool GrFunctionReturnTypes::onIsEqual(const GrFragmentProcessor& other) const { |
| const GrFunctionReturnTypes& that = other.cast<GrFunctionReturnTypes>(); |
| (void) that; |
| return true; |
| } |
| GrFunctionReturnTypes::GrFunctionReturnTypes(const GrFunctionReturnTypes& src) |
| : INHERITED(kGrFunctionReturnTypes_ClassID, src.optimizationFlags()) { |
| this->cloneAndRegisterAllChildProcessors(src); |
| } |
| std::unique_ptr<GrFragmentProcessor> GrFunctionReturnTypes::clone() const { |
| return std::make_unique<GrFunctionReturnTypes>(*this); |
| } |
| #if GR_TEST_UTILS |
| SkString GrFunctionReturnTypes::onDumpInfo() const { |
| return SkString(); |
| } |
| #endif |