diff options
author | Eric Anholt <[email protected]> | 2014-02-04 23:22:52 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-02-12 15:38:58 -0800 |
commit | 397b2c3966175de00e84d0de061c6ad10adb35f5 (patch) | |
tree | 503053deca788bfe86c3bc9e0c27e1bd2a38ccf6 /src/mesa/drivers | |
parent | a4f3e2ca0e6cb4b794109c869e7b872e4ce267af (diff) |
meta: Drop the src == dst restriction on meta glBlitFramebuffer().
From the GL_ARB_fbo spec:
If the source and destination buffers are identical, and the
source and destination rectangles overlap, the result of the blit
operation is undefined.
As far as I know, that's the only thing that would have been of concern
for this.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 3c4f7069f6f..03811bd10ca 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1684,7 +1684,6 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx, /** * Try to do a glBlitFramebuffer using no-copy texturing. * We can do this when the src renderbuffer is actually a texture. - * But if the src buffer == dst buffer we cannot do this. * * \return new buffer mask indicating the buffers left to blit using the * normal path. @@ -1697,9 +1696,7 @@ blitframebuffer_texture(struct gl_context *ctx, GLint flipY, GLboolean glsl_version) { if (mask & GL_COLOR_BUFFER_BIT) { - const struct gl_framebuffer *drawFb = ctx->DrawBuffer; const struct gl_framebuffer *readFb = ctx->ReadBuffer; - const struct gl_renderbuffer_attachment *drawAtt; const struct gl_renderbuffer_attachment *readAtt = &readFb->Attachment[readFb->_ColorReadBufferIndex]; @@ -1717,23 +1714,6 @@ blitframebuffer_texture(struct gl_context *ctx, GLuint sampler, samplerSave = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler ? ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler->Name : 0; - int i; - - /* Iterate through all draw buffers */ - for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) { - int idx = ctx->DrawBuffer->_ColorDrawBufferIndexes[i]; - if (idx == -1) - continue; - drawAtt = &drawFb->Attachment[idx]; - - if (drawAtt->Texture == readAtt->Texture) { - /* Can't use same texture as both the source and dest. We need - * to handle overlapping blits and besides, some hw may not - * support this. - */ - return mask; - } - } if (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_ARB) { /* Can't handle other texture types at this time */ |