aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-03-31 16:55:26 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-31 16:55:39 +0000
commit903c3f70400462e191ccbca63393b2df3fe2dd11 (patch)
treee281232e14b0a5a76423683ac1492775945e583f /include
parent61b84169eeab16a69e0efc5a7146d235b7a79210 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrTypesPriv.h13
-rw-r--r--include/private/GrGLSL.h2
2 files changed, 5 insertions, 10 deletions
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
index cbff7d8a3b..5db1c24765 100644
--- a/include/gpu/GrTypesPriv.h
+++ b/include/gpu/GrTypesPriv.h
@@ -116,14 +116,11 @@ enum GrSLPrecision {
kMedium_GrSLPrecision,
kHigh_GrSLPrecision,
- // Default precision is a special tag that means "whatever the default for the program/type
- // combination is". In other words, it maps to the empty string in shader code. There are some
- // scenarios where kDefault is not allowed (as the default precision for a program, or for
- // varyings, for example).
- kDefault_GrSLPrecision,
-
- // We only consider the "real" precisions here
- kLast_GrSLPrecision = kHigh_GrSLPrecision,
+ // Default precision is medium. This is because on OpenGL ES 2 highp support is not
+ // guaranteed. On (non-ES) OpenGL the specifiers have no effect on precision.
+ kDefault_GrSLPrecision = kMedium_GrSLPrecision,
+
+ kLast_GrSLPrecision = kHigh_GrSLPrecision
};
static const int kGrSLPrecisionCount = kLast_GrSLPrecision + 1;
diff --git a/include/private/GrGLSL.h b/include/private/GrGLSL.h
index 66f7be84d1..ed33c1cf4c 100644
--- a/include/private/GrGLSL.h
+++ b/include/private/GrGLSL.h
@@ -74,8 +74,6 @@ static inline const char* GrGLSLPrecisionString(GrSLPrecision p) {
return "mediump";
case kHigh_GrSLPrecision:
return "highp";
- case kDefault_GrSLPrecision:
- return "";
default:
SkFAIL("Unexpected precision type.");
return "";