summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-07-28 11:39:35 +0200
committerMarek Olšák <[email protected]>2015-07-31 16:49:17 +0200
commit64d3130994bde98b0be44a5c54511e376b6d994e (patch)
tree3504f37cf0090d911e72aaf2192252277b522970
parentf9c4953f99e75e45bc4f0f07315ee643b62b0c23 (diff)
r600g: early exit in r600_clear if there's nothing to do
Reviewed-by: Michel Dänzer <[email protected]>
-rw-r--r--src/gallium/drivers/r600/r600_blit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 8e553a8e3b9..1c59230c78e 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) {