Index: src/gpu/glsl/GrGLSLProgramBuilder.cpp |
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp |
index a6bff8a85ac983fadd717d80f17ee5e4f19bc068..3383221ebfd1bf0ec6f315fe7ecdea8131fdafc3 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"); |