From: Marek Olšák Date: Tue, 28 Jul 2015 09:39:35 +0000 (+0200) Subject: r600g: early exit in r600_clear if there's nothing to do X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64d3130994bde98b0be44a5c54511e376b6d994e;p=mesa.git r600g: early exit in r600_clear if there's nothing to do Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index 8e553a8e3b9..1c59230c78e 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -401,6 +401,8 @@ static void r600_clear(struct pipe_context *ctx, unsigned buffers, rctx->framebuffer.nr_samples > 1) { evergreen_do_fast_color_clear(&rctx->b, fb, &rctx->framebuffer.atom, &buffers, color); + if (!buffers) + return; /* all buffers have been fast cleared */ } if (buffers & PIPE_CLEAR_COLOR) {