Fixed sampling non-SkSL FPs with coordinates
This fixes an issue where fragment processors which were not written
in pure SkSL did not interact properly with coordinate overrides.
Change-Id: I960173986fd8d6be7322f55ab0d81a533b6b89e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252916
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gradients/generated/GrLinearGradientLayout.cpp b/src/gpu/gradients/generated/GrLinearGradientLayout.cpp
index a20b0e5..c5e70d6 100644
--- a/src/gpu/gradients/generated/GrLinearGradientLayout.cpp
+++ b/src/gpu/gradients/generated/GrLinearGradientLayout.cpp
@@ -29,9 +29,7 @@
fragBuilder->ensureCoords2D(args.fTransformedCoords[0].fVaryingPoint);
fragBuilder->codeAppendf(
"half t = half(%s.x) + 9.9999997473787516e-06;\n%s = half4(t, 1.0, 0.0, 0.0);\n",
- _outer.computeLocalCoordsInVertexShader() ? sk_TransformedCoords2D_0.c_str()
- : "_coords",
- args.fOutputColor);
+ sk_TransformedCoords2D_0.c_str(), args.fOutputColor);
}
private: