r600g: early exit in r600_clear if there's nothing to do

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
Marek Olšák 2015-07-28 11:39:35 +02:00
parent f9c4953f99
commit 64d3130994
1 changed files with 2 additions and 0 deletions

View 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) {