diff options
author | Jason Ekstrand <[email protected]> | 2015-07-23 17:26:56 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-07-28 17:50:10 -0700 |
commit | 736c6f3cfc2c69e3c29268d4ebb7110dd36ac97f (patch) | |
tree | 585dfe6eb433e103a7a201da2396efb2862a1e38 /src/mesa/drivers/common/meta_copy_image.c | |
parent | bf4019a1c89755af94218055e86544f7823dc4ac (diff) |
meta/copy_image: Stash off the scissor
The meta CopyImageSubData path uses BlitFramebuffers to do the actual copy.
The only thing that can affect BlitFramebuffers other than the currently
bound framebuffers is the scissor so we need to save that off and reset it.
If we don't do this, applications that use a scissor together with
CopyImageSubData will get accidentally scissored copies.
Tested-by: Markus Wick <markus at selfnet.de>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta_copy_image.c')
-rw-r--r-- | src/mesa/drivers/common/meta_copy_image.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c index 1729766f78d..149ed18503c 100644 --- a/src/mesa/drivers/common/meta_copy_image.c +++ b/src/mesa/drivers/common/meta_copy_image.c @@ -138,8 +138,8 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx, goto cleanup; } - /* We really only need to stash the bound framebuffers. */ - _mesa_meta_begin(ctx, 0); + /* We really only need to stash the bound framebuffers and scissor. */ + _mesa_meta_begin(ctx, MESA_META_SCISSOR); _mesa_GenFramebuffers(2, fbos); _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbos[0]); |