[Mesa-dev] [PATCH 18/18] r600g: early exist in r600_clear if there's nothing to do

Marek Olšák maraeo at gmail.com
Tue Jul 28 03:05:53 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/r600/r600_blit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 8e553a8..1c59230 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) {
-- 
2.1.4



More information about the mesa-dev mailing list