From: Marek Olšák Date: Sun, 29 May 2011 01:59:07 +0000 (+0200) Subject: r300g: cleanup render_condition a bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d18792f93d6dcdf7ef971522bdfba1ceeb0c6668;p=mesa.git r300g: cleanup render_condition a bit --- diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 55a2e2fde7f..782f041e926 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -156,17 +156,15 @@ static void r300_render_condition(struct pipe_context *pipe, uint64_t result = 0; boolean wait; + r300->skip_rendering = FALSE; + if (query) { wait = mode == PIPE_RENDER_COND_WAIT || mode == PIPE_RENDER_COND_BY_REGION_WAIT; - if (!r300_get_query_result(pipe, query, wait, &result)) { - r300->skip_rendering = FALSE; - } else { + if (r300_get_query_result(pipe, query, wait, &result)) { r300->skip_rendering = result == 0; } - } else { - r300->skip_rendering = FALSE; } }