diff options
author | Brian Osman <brianosman@google.com> | 2017-04-05 09:26:15 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-05 14:00:50 +0000 |
commit | 33aa2c7b5c351c17a11ce2bf7d7cd70a3d86cecc (patch) | |
tree | 6fbc30a47986750570d00026ddb3c89a0c3a55df /src/gpu/GrShaderCaps.cpp | |
parent | bf17eecf46b246d354b926aacc41e9ea882df49d (diff) |
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.
This reverts commit dffe9827b18444d1426859d9035f9f0087201f44.
Bug: skia:
Change-Id: I940af3256c47e6672a008d516db9e55669672ca3
Reviewed-on: https://skia-review.googlesource.com/11345
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrShaderCaps.cpp')
-rw-r--r-- | src/gpu/GrShaderCaps.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp index e3e6b07361..636b955ab7 100644 --- a/src/gpu/GrShaderCaps.cpp +++ b/src/gpu/GrShaderCaps.cpp @@ -32,8 +32,10 @@ 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) { @@ -201,7 +203,7 @@ void GrShaderCaps::initSamplerPrecisionTable() { } uint8_t* table = fSamplerPrecisions[visibility]; - table[kUnknown_GrPixelConfig] = kDefault_GrSLPrecision; + table[kUnknown_GrPixelConfig] = lowp; table[kAlpha_8_GrPixelConfig] = lowp; table[kGray_8_GrPixelConfig] = lowp; table[kRGB_565_GrPixelConfig] = lowp; |