diff options
author | cdalton <cdalton@nvidia.com> | 2016-03-11 10:07:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-11 10:07:37 -0800 |
commit | 9c3f14327a38e79ab7d0cf30dfd9bf89676fde06 (patch) | |
tree | f4695cc85cf19bf471ed8c956083f2234f18d4e1 /src/gpu/gl/GrGLGpu.cpp | |
parent | 6b563156eb7ce05b51997695ec9ab2aedcc2e6b1 (diff) |
Add support for vertex and geometry shader textures
Adds a visibility bitfield to GrTextureAccess that controls in which
shaders the texture should be accessible. Also adds caps and
validation to ensure we don't exceed texture limits.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782583002
Review URL: https://codereview.chromium.org/1782583002
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index f9cba433c7..443c55c234 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -191,7 +191,7 @@ GrGLGpu::GrGLGpu(GrGLContext* ctx, GrContext* context) SkASSERT(ctx); fCaps.reset(SkRef(ctx->caps())); - fHWBoundTextureUniqueIDs.reset(this->glCaps().maxFragmentTextureUnits()); + fHWBoundTextureUniqueIDs.reset(this->glCaps().glslCaps()->maxCombinedSamplers()); GrGLClearErr(this->glInterface()); if (gPrintStartupSpew) { @@ -572,7 +572,7 @@ GrTexture* GrGLGpu::onWrapBackendTexture(const GrBackendTextureDesc& desc, // This combination is not supported. return nullptr; } - if (!this->glCaps().externalTextureSupport()) { + if (!this->glCaps().glslCaps()->externalTextureSupport()) { return nullptr; } } else if (GR_GL_TEXTURE_RECTANGLE == idDesc.fInfo.fTarget) { @@ -3684,7 +3684,7 @@ void GrGLGpu::createCopyPrograms() { SkASSERT(3 == SK_ARRAY_COUNT(fCopyPrograms)); for (int i = 0; i < 3; ++i) { if (kSamplerExternal_GrSLType == kSamplerTypes[i] && - !this->glCaps().externalTextureSupport()) { + !this->glCaps().glslCaps()->externalTextureSupport()) { continue; } if (kSampler2DRect_GrSLType == kSamplerTypes[i] && |