Mesa (7.9): r300g: fix conditional rendering in non-wait path

Marek Olšák mareko at kemper.freedesktop.org
Thu Sep 30 13:20:54 PDT 2010


Module: Mesa
Branch: 7.9
Commit: 9f076a0848fcb26fd8ae4551aa0db1d1f709e502
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f076a0848fcb26fd8ae4551aa0db1d1f709e502

Author: Marek Olšák <maraeo at gmail.com>
Date:   Thu Sep 30 01:08:58 2010 +0200

r300g: fix conditional rendering in non-wait path

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 83278d384ee123fa207229cc444f6e77e2d9a0d2)

---

 src/gallium/drivers/r300/r300_query.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
index 5b0121c..5f34fcb 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -158,7 +158,7 @@ static void r300_render_condition(struct pipe_context *pipe,
                                   uint mode)
 {
     struct r300_context *r300 = r300_context(pipe);
-    uint64_t result;
+    uint64_t result = 0;
     boolean wait;
 
     if (query) {
@@ -167,9 +167,9 @@ static void r300_render_condition(struct pipe_context *pipe,
 
         if (!r300_get_query_result(pipe, query, wait, &result)) {
             r300->skip_rendering = FALSE;
+        } else {
+            r300->skip_rendering = result == 0;
         }
-
-        r300->skip_rendering = result == 0;
     } else {
         r300->skip_rendering = FALSE;
     }



More information about the mesa-commit mailing list