radeonsi: early exit in si_clear if there's nothing to do
authorMarek Olšák <marek.olsak@amd.com>
Tue, 28 Jul 2015 09:39:35 +0000 (11:39 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 31 Jul 2015 14:49:17 +0000 (16:49 +0200)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_blit.c

index c3591a7e85a518706921d9df4fac40692b9ac8fd..c89262389404127ede7ece75aa9d7af02fa29386 100644 (file)
@@ -342,6 +342,8 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers,
        if (buffers & PIPE_CLEAR_COLOR) {
                evergreen_do_fast_color_clear(&sctx->b, fb, &sctx->framebuffer.atom,
                                              &buffers, color);
+               if (!buffers)
+                       return; /* all buffers have been fast cleared */
        }
 
        if (buffers & PIPE_CLEAR_COLOR) {