r300g: cleanup render_condition a bit
authorMarek Olšák <maraeo@gmail.com>
Sun, 29 May 2011 01:59:07 +0000 (03:59 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 29 May 2011 03:15:27 +0000 (05:15 +0200)
src/gallium/drivers/r300/r300_query.c

index 55a2e2fde7f36245b5a190df4d7b4eeff986dc17..782f041e926043cac9db24b4d439718513633f40 100644 (file)
@@ -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;
     }
 }