diff options
author | Brian Osman <brianosman@google.com> | 2018-04-17 11:19:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-17 17:20:44 +0000 |
commit | 4b2f915f9d29b7b5c777fb96d36bd5c00c6e54c0 (patch) | |
tree | 86358718f5335921373c0961488d982776ac8617 /src/gpu/glsl | |
parent | 053d04697acd74c45883058e81e422d731f06a0f (diff) |
Move external texture extension logic into SkSL
Automatically enable the extension if any external samplers are used.
Bug: skia:7713
Change-Id: I1de2faddd7c8eda864873941b90d7a4c4606497a
Reviewed-on: https://skia-review.googlesource.com/121797
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/glsl')
-rw-r--r-- | src/gpu/glsl/GrGLSLProgramBuilder.cpp | 9 | ||||
-rw-r--r-- | src/gpu/glsl/GrGLSLShaderBuilder.h | 1 |
2 files changed, 0 insertions, 10 deletions
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp index 914a958a22..91ac5c3e71 100644 --- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp +++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp @@ -257,15 +257,6 @@ void GrGLSLProgramBuilder::emitSamplers( const GrResourceIOProcessor::TextureSampler& sampler = processor.textureSampler(t); name.printf("TextureSampler_%d", outTexSamplerHandles->count()); GrSLType samplerType = sampler.peekTexture()->texturePriv().samplerType(); - if (kTextureExternalSampler_GrSLType == samplerType) { - const char* externalFeatureString = - this->shaderCaps()->externalTextureExtensionString(); - // We shouldn't ever create a GrGLTexture that requires external sampler type - SkASSERT(externalFeatureString); - this->addFeature(sampler.visibility(), - 1 << GrGLSLShaderBuilder::kExternalTexture_GLSLPrivateFeature, - externalFeatureString); - } outTexSamplerHandles->emplace_back(this->emitSampler( samplerType, sampler.peekTexture()->config(), name.c_str(), sampler.visibility())); } diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.h b/src/gpu/glsl/GrGLSLShaderBuilder.h index cfddbfff15..b13773b8a9 100644 --- a/src/gpu/glsl/GrGLSLShaderBuilder.h +++ b/src/gpu/glsl/GrGLSLShaderBuilder.h @@ -169,7 +169,6 @@ protected: kFragCoordConventions_GLSLPrivateFeature, kBlendEquationAdvanced_GLSLPrivateFeature, kBlendFuncExtended_GLSLPrivateFeature, - kExternalTexture_GLSLPrivateFeature, kTexelBuffer_GLSLPrivateFeature, kFramebufferFetch_GLSLPrivateFeature, kNoPerspectiveInterpolation_GLSLPrivateFeature, |