diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-03 13:35:14 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-03 13:35:14 +0000 |
commit | 6b0cf0273fdffbbdf69235b57b5b5a311e7f1ca6 (patch) | |
tree | 150ff50876434a33bb0d2ccfd299e8bc710d2531 /src/gpu/gl/GrGLProgramDesc.cpp | |
parent | dfa1ce027f0b56de40d0ccfefbc30955a50a7350 (diff) |
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
Diffstat (limited to 'src/gpu/gl/GrGLProgramDesc.cpp')
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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; |