From 7a75fcd6573fa5ec85dfe40cca73c4e2a5fc263e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 10 Jul 2011 20:01:33 +0200 Subject: [PATCH] mesa: return early if mask is cleared to zero in BlitFramebuffer From ARB_framebuffer_object: If a buffer is specified in 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 file changed, 4 insertions(+) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index e5fa1bf79c0..dbba6bb9b1f 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2447,6 +2447,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,