Ganesh: Clamp blend inputs when using F16_Clamped pixel config
This ensures that we stay in [0,1], except for plus mode, which
requires a larger and more invasive change.
Bug: skia:
Change-Id: I97f6bcea8b10e70e55ba24bcff759ddbb1761794
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index 26b06f9..5401d4d 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -253,5 +253,6 @@
SkASSERT(header->processorFeatures() == processorFeatures); // Ensure enough bits.
header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters();
header->fHasPointSize = hasPointSize ? 1 : 0;
+ header->fClampBlendInput = GrPixelConfigNeedsClamp(renderTarget->config()) ? 1 : 0;
return true;
}