r600g: early exit in r600_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/r600/r600_blit.c

index 8e553a8e3b99938bd2f6a5d13d9b6420c28b0962..1c59230c78eda3364fe9685f1a582ca6e5e8975d 100644 (file)
@@ -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) {