Commit 5fb31a17 authored by Marek Olšák's avatar Marek Olšák
Browse files

radeonsi: merge 2 identical if statements in si_clear



and other cleanups
Reviewed-by: default avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: default avatarDieter Nützel <Dieter@nuetzel-hh.de>
parent 8a286799
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment