aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/glsl')
-rw-r--r--src/gpu/glsl/GrGLSLProgramBuilder.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index a6bff8a85a..3383221ebf 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -89,6 +89,9 @@ void GrGLSLProgramBuilder::emitAndInstallPrimProc(const GrPrimitiveProcessor& pr
const char* distanceVectorName = nullptr;
if (this->fPipeline.usesDistanceVectorField() && proc.implementsDistanceVector()) {
+ // Each individual user (FP) of the distance vector must be able to handle having this
+ // variable be undeclared. There is no single default value that will yield a reasonable
+ // result for all users.
distanceVectorName = fFS.distanceVectorName();
fFS.codeAppend( "// Normalized vector to the closest geometric edge (in device space)\n");
fFS.codeAppend( "// Distance to the edge encoded in the z-component\n");