aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-11-15 18:27:09 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-16 03:31:45 +0000
commite42180022720f2fcfd3c634cad855506a7940591 (patch)
tree76fb7187cd7dd509da717a221b3c309f9b703d3b /src/gpu/glsl
parentae9d6189ec03c4a188e67b42d755c42024397f44 (diff)
Fix precision caps and rrect/ellipse effect precisions
Replaces all the complex precision caps with a single flag that says whether "float" == fp32. Updates the ellipse and rrect effects to use float coords, and use the scale workaround when float != fp32. Bug: skia:7190 Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307 Reviewed-on: https://skia-review.googlesource.com/70961 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/glsl')
-rw-r--r--src/gpu/glsl/GrGLSLProgramBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index 6f8d1be736..118b904540 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -303,7 +303,7 @@ GrGLSLProgramBuilder::SamplerHandle GrGLSLProgramBuilder::emitSampler(GrSLType s
const char* name,
GrShaderFlags visibility) {
this->updateSamplerCounts(visibility);
- GrSLPrecision precision = this->shaderCaps()->samplerPrecision(config, visibility);
+ GrSLPrecision precision = GrSLSamplerPrecision(config);
GrSwizzle swizzle = this->shaderCaps()->configTextureSwizzle(config);
return this->uniformHandler()->addSampler(visibility, swizzle, samplerType, precision, name);
}
@@ -311,7 +311,7 @@ GrGLSLProgramBuilder::SamplerHandle GrGLSLProgramBuilder::emitSampler(GrSLType s
GrGLSLProgramBuilder::TexelBufferHandle GrGLSLProgramBuilder::emitTexelBuffer(
GrPixelConfig config, const char* name, GrShaderFlags visibility) {
this->updateSamplerCounts(visibility);
- GrSLPrecision precision = this->shaderCaps()->samplerPrecision(config, visibility);
+ GrSLPrecision precision = GrSLSamplerPrecision(config);
return this->uniformHandler()->addTexelBuffer(visibility, precision, name);
}