From 6b0cf0273fdffbbdf69235b57b5b5a311e7f1ca6 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Fri, 3 May 2013 13:35:14 +0000 Subject: Add support for GL_*_shader__framebuffer_fetch R=robertphillips@google.com Review URL: https://codereview.chromium.org/14875002 git-svn-id: http://skia.googlecode.com/svn/trunk@8980 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/GrGLProgramDesc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gpu/gl/GrGLProgramDesc.cpp') diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp index 86771794d9..1ae6aa69f2 100644 --- a/src/gpu/gl/GrGLProgramDesc.cpp +++ b/src/gpu/gl/GrGLProgramDesc.cpp @@ -96,8 +96,12 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState, } if (readsDst) { - GrAssert(NULL != dstCopy); - desc->fDstRead = GrGLShaderBuilder::KeyForDstRead(dstCopy->texture(), gpu->glCaps()); + GrAssert(NULL != dstCopy || gpu->caps()->dstReadInShaderSupport()); + const GrTexture* dstCopyTexture = NULL; + if (NULL != dstCopy) { + dstCopyTexture = dstCopy->texture(); + } + desc->fDstRead = GrGLShaderBuilder::KeyForDstRead(dstCopyTexture, gpu->glCaps()); GrAssert(0 != desc->fDstRead); } else { desc->fDstRead = 0; -- cgit v1.2.3