aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-02-14 13:41:21 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-20 16:41:43 +0000
commit7fe33c0a423a351a5d00402a86ca73aa3ba92103 (patch)
tree824880ae81a10808b68cbfd119561641387866de /src
parentc68ba1d7d9817915592e2077ba19c463e7f2b254 (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')
-rw-r--r--src/gpu/GrShaderCaps.cpp3
-rw-r--r--src/gpu/gl/GrGLCaps.cpp13
-rw-r--r--src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp17
-rw-r--r--src/gpu/glsl/GrGLSLFragmentShaderBuilder.h15
-rw-r--r--src/sksl/SkSLIRGenerator.cpp1
5 files changed, 0 insertions, 49 deletions
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp
index ef9ca5f77f..517deaddc6 100644
--- a/src/gpu/GrShaderCaps.cpp
+++ b/src/gpu/GrShaderCaps.cpp
@@ -42,7 +42,6 @@ GrShaderCaps::GrShaderCaps(const GrContextOptions& options) {
fFlatInterpolationSupport = false;
fPreferFlatInterpolation = false;
fNoPerspectiveInterpolationSupport = false;
- fMultisampleInterpolationSupport = false;
fExternalTextureSupport = false;
fTexelFetchSupport = false;
fVertexIDSupport = false;
@@ -58,7 +57,6 @@ GrShaderCaps::GrShaderCaps(const GrContextOptions& options) {
fExternalTextureExtensionString = nullptr;
fTexelBufferExtensionString = nullptr;
fNoPerspectiveInterpolationExtensionString = nullptr;
- fMultisampleInterpolationExtensionString = nullptr;
fFBFetchColorName = nullptr;
fFBFetchExtensionString = nullptr;
fImageLoadStoreExtensionString = nullptr;
@@ -115,7 +113,6 @@ void GrShaderCaps::dumpJSON(SkJSONWriter* writer) const {
writer->appendBool("Flat interpolation support", fFlatInterpolationSupport);
writer->appendBool("Prefer flat interpolation", fPreferFlatInterpolation);
writer->appendBool("No perspective interpolation support", fNoPerspectiveInterpolationSupport);
- writer->appendBool("Multisample interpolation support", fMultisampleInterpolationSupport);
writer->appendBool("External texture support", fExternalTextureSupport);
writer->appendBool("texelFetch support", fTexelFetchSupport);
writer->appendBool("sk_VertexID support", fVertexIDSupport);
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 4fb9ffdea3..d71194ed6f 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -721,19 +721,6 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli
}
}
- if (kGL_GrGLStandard == standard) {
- shaderCaps->fMultisampleInterpolationSupport =
- ctxInfo.glslGeneration() >= k400_GrGLSLGeneration;
- } else {
- if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
- shaderCaps->fMultisampleInterpolationSupport = true;
- } else if (ctxInfo.hasExtension("GL_OES_shader_multisample_interpolation")) {
- shaderCaps->fMultisampleInterpolationSupport = true;
- shaderCaps->fMultisampleInterpolationExtensionString =
- "GL_OES_shader_multisample_interpolation";
- }
- }
-
shaderCaps->fVersionDeclString = get_glsl_version_decl_string(standard,
shaderCaps->fGLSLGeneration,
fIsCoreProfile);
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.
diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp
index 78570ff024..719dca9416 100644
--- a/src/sksl/SkSLIRGenerator.cpp
+++ b/src/sksl/SkSLIRGenerator.cpp
@@ -129,7 +129,6 @@ static void fill_caps(const SKSL_CAPS_CLASS& caps,
CAP(dropsTileOnZeroDivide);
CAP(flatInterpolationSupport);
CAP(noperspectiveInterpolationSupport);
- CAP(multisampleInterpolationSupport);
CAP(externalTextureSupport);
CAP(texelFetchSupport);
CAP(imageLoadStoreSupport);