diff options
author | Chris Dalton <csmartdalton@google.com> | 2018-02-14 13:41:21 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-20 16:41:43 +0000 |
commit | 7fe33c0a423a351a5d00402a86ca73aa3ba92103 (patch) | |
tree | 824880ae81a10808b68cbfd119561641387866de /src/gpu/glsl | |
parent | c68ba1d7d9817915592e2077ba19c463e7f2b254 (diff) |
Drop unused shader support for multisample interpolation
Bug: skia:
Change-Id: Ie19f13877bf6828ab94ffbb20e6f74e0e376f6cb
Reviewed-on: https://skia-review.googlesource.com/107359
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/glsl')
-rw-r--r-- | src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp | 17 | ||||
-rw-r--r-- | src/gpu/glsl/GrGLSLFragmentShaderBuilder.h | 15 |
2 files changed, 0 insertions, 32 deletions
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp index 92a0034b73..7f32aa5972 100644 --- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp +++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp @@ -93,23 +93,6 @@ GrGLSLFragmentShaderBuilder::GrGLSLFragmentShaderBuilder(GrGLSLProgramBuilder* p #endif } -bool GrGLSLFragmentShaderBuilder::enableFeature(GLSLFeature feature) { - const GrShaderCaps& shaderCaps = *fProgramBuilder->shaderCaps(); - switch (feature) { - case kMultisampleInterpolation_GLSLFeature: - if (!shaderCaps.multisampleInterpolationSupport()) { - return false; - } - if (const char* extension = shaderCaps.multisampleInterpolationExtensionString()) { - this->addFeature(1 << kMultisampleInterpolation_GLSLFeature, extension); - } - return true; - default: - SK_ABORT("Unexpected GLSLFeature requested."); - return false; - } -} - SkString GrGLSLFragmentShaderBuilder::ensureCoords2D(const GrShaderVar& coords) { if (kFloat3_GrSLType != coords.getType() && kHalf3_GrSLType != coords.getType()) { SkASSERT(kFloat2_GrSLType == coords.getType() || kHalf2_GrSLType == coords.getType()); diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h index a9e665be1a..d64dfdb519 100644 --- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h +++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h @@ -25,20 +25,6 @@ public: virtual ~GrGLSLFragmentBuilder() {} /** - * Use of these features may require a GLSL extension to be enabled. Shaders may not compile - * if code is added that uses one of these features without calling enableFeature() - */ - enum GLSLFeature { - kMultisampleInterpolation_GLSLFeature - }; - - /** - * If the feature is supported then true is returned and any necessary #extension declarations - * are added to the shaders. If the feature is not supported then false will be returned. - */ - virtual bool enableFeature(GLSLFeature) = 0; - - /** * This returns a variable name to access the 2D, perspective correct version of the coords in * the fragment shader. The passed in coordinates must either be of type kHalf2 or kHalf3. If * the coordinates are 3-dimensional, it a perspective divide into is emitted into the @@ -123,7 +109,6 @@ public: GrGLSLFragmentShaderBuilder(GrGLSLProgramBuilder* program); // Shared GrGLSLFragmentBuilder interface. - bool enableFeature(GLSLFeature) override; virtual SkString ensureCoords2D(const GrShaderVar&) override; // GrGLSLFPFragmentBuilder interface. |