aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrShaderCaps.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-04-03 14:00:52 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-03 14:34:21 +0000
commitdffe9827b18444d1426859d9035f9f0087201f44 (patch)
tree39742c71c9a0373035e8c0c00b27ec6c56253ffa /src/gpu/GrShaderCaps.cpp
parent84c009f69216bc9f741294f24d60434383385f4c (diff)
Revert "Revert "Revert "Allow FPs to elevate default precision for the entire fragment program"""
This reverts commit ec53c636b781830cb6146bb32106d4ee44651fcc. Reason for revert: Mali GMs look bad. Original change's description: > 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> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,ethannicholas@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ic3274a0a8b776e811354c3441391ffdc80678292 Reviewed-on: https://skia-review.googlesource.com/11061 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrShaderCaps.cpp')
-rw-r--r--src/gpu/GrShaderCaps.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp
index 636b955ab7..e3e6b07361 100644
--- a/src/gpu/GrShaderCaps.cpp
+++ b/src/gpu/GrShaderCaps.cpp
@@ -32,10 +32,8 @@ static const char* precision_to_string(GrSLPrecision p) {
return "medium";
case kHigh_GrSLPrecision:
return "high";
- default:
- SkFAIL("Unexpected precision type.");
- return "";
}
+ return "";
}
GrShaderCaps::GrShaderCaps(const GrContextOptions& options) {
@@ -203,7 +201,7 @@ void GrShaderCaps::initSamplerPrecisionTable() {
}
uint8_t* table = fSamplerPrecisions[visibility];
- table[kUnknown_GrPixelConfig] = lowp;
+ table[kUnknown_GrPixelConfig] = kDefault_GrSLPrecision;
table[kAlpha_8_GrPixelConfig] = lowp;
table[kGray_8_GrPixelConfig] = lowp;
table[kRGB_565_GrPixelConfig] = lowp;