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>
This commit is contained in:
Chris Dalton 2018-02-14 13:41:21 -07:00 committed by Skia Commit-Bot
parent c68ba1d7d9
commit 7fe33c0a42
6 changed files with 0 additions and 58 deletions

View File

@ -70,8 +70,6 @@ public:
bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterpolationSupport; }
bool multisampleInterpolationSupport() const { return fMultisampleInterpolationSupport; }
bool externalTextureSupport() const { return fExternalTextureSupport; }
bool texelFetchSupport() const { return fTexelFetchSupport; }
@ -186,11 +184,6 @@ public:
return fNoPerspectiveInterpolationExtensionString;
}
const char* multisampleInterpolationExtensionString() const {
SkASSERT(this->multisampleInterpolationSupport());
return fMultisampleInterpolationExtensionString;
}
const char* imageLoadStoreExtensionString() const {
SkASSERT(this->imageLoadStoreSupport());
return fImageLoadStoreExtensionString;
@ -250,7 +243,6 @@ private:
bool fFlatInterpolationSupport : 1;
bool fPreferFlatInterpolation : 1;
bool fNoPerspectiveInterpolationSupport : 1;
bool fMultisampleInterpolationSupport : 1;
bool fExternalTextureSupport : 1;
bool fTexelFetchSupport : 1;
bool fVertexIDSupport : 1;
@ -280,7 +272,6 @@ private:
const char* fExternalTextureExtensionString;
const char* fTexelBufferExtensionString;
const char* fNoPerspectiveInterpolationExtensionString;
const char* fMultisampleInterpolationExtensionString;
const char* fImageLoadStoreExtensionString;
const char* fFBFetchColorName;

View File

@ -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);

View File

@ -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);

View File

@ -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());

View File

@ -24,20 +24,6 @@ public:
GrGLSLFragmentBuilder(GrGLSLProgramBuilder* program) : INHERITED(program) {}
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
@ -123,7 +109,6 @@ public:
GrGLSLFragmentShaderBuilder(GrGLSLProgramBuilder* program);
// Shared GrGLSLFragmentBuilder interface.
bool enableFeature(GLSLFeature) override;
virtual SkString ensureCoords2D(const GrShaderVar&) override;
// GrGLSLFPFragmentBuilder interface.

View File

@ -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);