Mesa (7.11): mesa: return early if mask is cleared to zero in BlitFramebuffer

Marek Olšák mareko at kemper.freedesktop.org
Mon Jul 11 21:16:32 UTC 2011


Module: Mesa
Branch: 7.11
Commit: 928bf189ff33a4a6b4c6f883d4a4287ebc5121d2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=928bf189ff33a4a6b4c6f883d4a4287ebc5121d2

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jul 10 20:01:33 2011 +0200

mesa: return early if mask is cleared to zero in BlitFramebuffer

>From ARB_framebuffer_object:
    If a buffer is specified in <mask> and does not exist in both the
    read and draw framebuffers, the corresponding bit is silently
    ignored.
(cherry picked from commit 83478e5d5944e1fc320e8cfb10ba75055bbea3fd)

---

 src/mesa/main/fbobject.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 8cc3fd4..a6a8aaa 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2584,6 +2584,10 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
       }
    }
 
+   if (!mask) {
+      return;
+   }
+
    ASSERT(ctx->Driver.BlitFramebuffer);
    ctx->Driver.BlitFramebuffer(ctx,
                                srcX0, srcY0, srcX1, srcY1,




More information about the mesa-commit mailing list