diff options
author | Anuj Phogat <anuj.phogat@gmail.com> | 2013-03-07 14:05:38 -0800 |
---|---|---|
committer | Andreas Boll <andreas.boll.dev@gmail.com> | 2013-04-17 13:33:23 +0200 |
commit | 60ef057d5cfe30cf599596e3b209af8ddb190b34 (patch) | |
tree | 01d048e0d0bdf1f7310696495b93a9582ec23e9a | |
parent | 6dee3bd549c1c6506eab63dcd44d23e2bc3969da (diff) |
mesa: Fix FB blitting in case of zero size src or dst rect
Framebuffer blitting operation should be skipped if any of the
dimensions (width/height) of src/dst rect is zero.
V2: Move the dimension check after error checking in _mesa_BlitFramebuffer.
Fixes: fbblit(negative.nullblit.zeroSize) in Intel oglconform
https://bugs.freedesktop.org/show_bug.cgi?id=59495
Note: Candidate for all the stable branches.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
(cherry picked from commit d78dcdf103271c539ff246651236e71f7a9c10fd)
-rw-r--r-- | src/mesa/main/fbobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index e9997ccb77..d36e16730c 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3098,7 +3098,9 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, } } - if (!mask) { + if (!mask || + (srcX1 - srcX0) == 0 || (srcY1 - srcY0) == 0 || + (dstX1 - dstX0) == 0 || (dstY1 - dstY0) == 0) { return; } |