Module: Mesa
Branch: master
Commit: 49244df5a87f0e6fbf49c8bba6bd42e2852fe957
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=49244df5a87f0e6fbf49c8bba6bd42e2852fe957

Author: Marek Olšák <[email protected]>
Date:   Fri May 28 00:04:05 2010 +0200

r300g/swtcl: avoid an infinite loop if an occl. query doesn't return anything

---

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

diff --git a/src/gallium/drivers/r300/r300_query.c 
b/src/gallium/drivers/r300/r300_query.c
index 4ce7114..97081c4 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -146,9 +146,13 @@ static boolean r300_get_query_result(struct pipe_context* 
pipe,
             /* Looks like our results aren't ready yet. */
             if (wait) {
                 fprintf(stderr, "r300: Despite waiting, OQ results haven't "
-                                "come in yet.\n");
+                                "come in yet. This is a driver bug.\n"
+                                "r300: Returning bogus results to avoid "
+                                "a possible infinite loop...\n");
+                temp = 987654321;
+            } else {
+                temp = ~0U;
             }
-            temp = ~0U;
             break;
         }
         temp += *map;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to