[Mesa-dev] [PATCH 1/2] mesa: return early if mask is cleared to zero in BlitFramebuffer

Marek Olšák maraeo at gmail.com
Sun Jul 10 19:16:15 PDT 2011


Sorry, I pushed this series accidentally. I will revert if needed.

Marek

On Sun, Jul 10, 2011 at 8:30 PM, Marek Olšák <maraeo at gmail.com> wrote:
> 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.
> ---
>  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 d094dd3..8496936 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -2603,6 +2603,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,
> --
> 1.7.4.1
>
>


More information about the mesa-dev mailing list