diff options
author | Marek Olšák <[email protected]> | 2018-03-27 21:57:26 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-04-13 12:31:04 -0400 |
commit | 5fb31a1734b7f52846090b9cfadf5fac4822f500 (patch) | |
tree | 1defe7e6ef05a77dc1db221a4b13ee007a9b1fde /src/gallium/drivers/radeonsi | |
parent | 8a28679987dc768e868c7123e0daea7dd02ab05e (diff) |
radeonsi: merge 2 identical if statements in si_clear
and other cleanups
Reviewed-by: Samuel Pitoiset <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_clear.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c index 5be78ca3e6f..f8136d2b2c4 100644 --- a/src/gallium/drivers/radeonsi/si_clear.c +++ b/src/gallium/drivers/radeonsi/si_clear.c @@ -528,20 +528,13 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers, si_do_fast_color_clear(sctx, &buffers, color); if (!buffers) return; /* all buffers have been fast cleared */ - } - - if (buffers & PIPE_CLEAR_COLOR) { - int i; /* These buffers cannot use fast clear, make sure to disable expansion. */ - for (i = 0; i < fb->nr_cbufs; i++) { + for (unsigned i = 0; i < fb->nr_cbufs; i++) { struct r600_texture *tex; /* If not clearing this buffer, skip. */ - if (!(buffers & (PIPE_CLEAR_COLOR0 << i))) - continue; - - if (!fb->cbufs[i]) + if (!(buffers & (PIPE_CLEAR_COLOR0 << i)) || !fb->cbufs[i]) continue; tex = (struct r600_texture *)fb->cbufs[i]->texture; |