diff options
author | 2017-04-05 09:26:15 -0400 | |
---|---|---|
committer | 2017-04-05 14:00:50 +0000 | |
commit | 33aa2c7b5c351c17a11ce2bf7d7cd70a3d86cecc (patch) | |
tree | 6fbc30a47986750570d00026ddb3c89a0c3a55df /src/gpu/gl/GrGLGpu.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/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 3af3ed25aa..714ded0e7b 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -3578,7 +3578,7 @@ bool GrGLGpu::createCopyProgram(GrTexture* srcTex) { fshaderTxt.appendf("#extension %s : require\n", shaderCaps->externalTextureExtensionString()); } - GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, *shaderCaps, + GrGLSLAppendDefaultFloatPrecisionDeclaration(kMedium_GrSLPrecision, *shaderCaps, &fshaderTxt); vTexCoord.setTypeModifier(GrShaderVar::kIn_TypeModifier); vTexCoord.appendDecl(shaderCaps, &fshaderTxt); @@ -3716,7 +3716,7 @@ bool GrGLGpu::createMipmapProgram(int progIdx) { fshaderTxt.appendf("#extension %s : require\n", extension); } } - GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, *shaderCaps, + GrGLSLAppendDefaultFloatPrecisionDeclaration(kMedium_GrSLPrecision, *shaderCaps, &fshaderTxt); for (int i = 0; i < numTaps; ++i) { vTexCoords[i].setTypeModifier(GrShaderVar::kIn_TypeModifier); @@ -3831,7 +3831,7 @@ bool GrGLGpu::createWireRectProgram() { GrShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier); SkString fshaderTxt(version); - GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, + GrGLSLAppendDefaultFloatPrecisionDeclaration(kMedium_GrSLPrecision, *this->caps()->shaderCaps(), &fshaderTxt); uColor.appendDecl(this->caps()->shaderCaps(), &fshaderTxt); |