radeonsi: early exit in si_clear if there's nothing to do
[mesa.git] / 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) {