Added DSL FP codeAppend function.
This also adds the relevant Start() / End() calls so that the DSL
is put into the correct state.
Change-Id: I844b0ab5dff06e3f7b0a69458bf4442a5da0f33e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364857
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index c620ea59..271bdd7 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -19,6 +19,7 @@
#include "src/gpu/glsl/GrGLSLVarying.h"
#include "src/gpu/glsl/GrGLSLXferProcessor.h"
#include "src/sksl/SkSLCompiler.h"
+#include "src/sksl/dsl/priv/DSLFPs.h"
const int GrGLSLProgramBuilder::kVarsPerBlock = 8;
@@ -54,12 +55,14 @@
bool GrGLSLProgramBuilder::emitAndInstallProcs() {
// First we loop over all of the installed processors and collect coord transforms. These will
// be sent to the GrGLSLPrimitiveProcessor in its emitCode function
+ SkSL::dsl::Start(this->shaderCompiler());
SkString inputColor;
SkString inputCoverage;
this->emitAndInstallPrimProc(&inputColor, &inputCoverage);
this->emitAndInstallFragProcs(&inputColor, &inputCoverage);
this->emitAndInstallXferProc(inputColor, inputCoverage);
fGeometryProcessor->emitTransformCode(&fVS, this->uniformHandler());
+ SkSL::dsl::End();
return this->checkSamplerCounts();
}