blob: 7e8e33f2187e1b46fcc71dcd1aa4350f73470698 [file] [log] [blame]
/**************************************************************************************************
*** This file was autogenerated from GrDSLFPTest_Sample.fp; do not modify.
**************************************************************************************************/
/* TODO(skia:11854): DSLCPPCodeGenerator is currently a work in progress. */
#include "GrDSLFPTest_Sample.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"
#include "src/sksl/dsl/priv/DSLFPs.h"
#include "src/sksl/dsl/priv/DSLWriter.h"
class GrGLSLDSLFPTest_Sample : public GrGLSLFragmentProcessor {
public:
GrGLSLDSLFPTest_Sample() {}
void emitCode(EmitArgs& args) override {
[[maybe_unused]] const GrDSLFPTest_Sample& _outer = args.fFp.cast<GrDSLFPTest_Sample>();
using namespace SkSL::dsl;
StartFragmentProcessor(this, &args);
Var _coords(kConst_Modifier, DSLType(kFloat2_Type), "coords", Float2(0.5f));
Var _inColor(kConst_Modifier, DSLType(kHalf4_Type), "inColor", Half4(0.75f));
Declare(_coords);
Declare(_inColor);
Return(((SampleChild(0) * SampleChild(1, _coords)) * SampleChild(0, _inColor)) * SampleChild(1, _coords, _inColor));
EndFragmentProcessor();
}
private:
void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override {
}
};
std::unique_ptr<GrGLSLFragmentProcessor> GrDSLFPTest_Sample::onMakeProgramImpl() const {
return std::make_unique<GrGLSLDSLFPTest_Sample>();
}
void GrDSLFPTest_Sample::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
}
bool GrDSLFPTest_Sample::onIsEqual(const GrFragmentProcessor& other) const {
const GrDSLFPTest_Sample& that = other.cast<GrDSLFPTest_Sample>();
(void) that;
return true;
}
GrDSLFPTest_Sample::GrDSLFPTest_Sample(const GrDSLFPTest_Sample& src)
: INHERITED(kGrDSLFPTest_Sample_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);
}
std::unique_ptr<GrFragmentProcessor> GrDSLFPTest_Sample::clone() const {
return std::make_unique<GrDSLFPTest_Sample>(*this);
}
#if GR_TEST_UTILS
SkString GrDSLFPTest_Sample::onDumpInfo() const {
return SkString();
}
#endif