aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGeometryProcessor.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-03-31 20:39:56 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-31 20:40:05 +0000
commitec53c636b781830cb6146bb32106d4ee44651fcc (patch)
tree4ad7ff25758ae1d34e2f643d759256fca86e8384 /src/gpu/GrGeometryProcessor.h
parentc6f5e10709649708e4c5e6fff7ccf633e1c7bd10 (diff)
Revert "Revert "Allow FPs to elevate default precision for the entire fragment program""
This reverts commit 903c3f70400462e191ccbca63393b2df3fe2dd11. Reason for revert: Vulkan issue fixed in compiler. Original change's description: > Revert "Allow FPs to elevate default precision for the entire fragment program" > > This reverts commit 92d7ccafdf896cf19764e025873d13315a76842d. > > Reason for revert: Vulkan errors. > > Original change's description: > > Allow FPs to elevate default precision for the entire fragment program > > > > Currently, GrConfigConversionEffect is able to round-trip on many mobile > > GPUs because it uses highp for all intermediate variables (including the > > texture fetch result). Separating the texture sample into a different > > processor breaks that. > > > > This is a blunt instrument, not to be used lightly. > > > > Bug: skia: > > Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789 > > Reviewed-on: https://skia-review.googlesource.com/10162 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > > > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,ethannicholas@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Iee5bb409f86a9cabecc76bd1273a5b3cef6af179 > Reviewed-on: https://skia-review.googlesource.com/10967 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I733a0ecc40b58d8727f0259b5498c8e6610cedce Reviewed-on: https://skia-review.googlesource.com/11010 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrGeometryProcessor.h')
-rw-r--r--src/gpu/GrGeometryProcessor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index 2711b9a608..e5222bf80a 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -51,6 +51,7 @@ protected:
*/
const Attribute& addVertexAttrib(const char* name, GrVertexAttribType type,
GrSLPrecision precision = kDefault_GrSLPrecision) {
+ precision = (kDefault_GrSLPrecision == precision) ? kMedium_GrSLPrecision : precision;
fAttribs.emplace_back(name, type, precision);
fVertexStride += fAttribs.back().fOffset;
return fAttribs.back();