Mesa (master): llvmpipe: fix query bug when no there's no scene

Brian Paul brianp at kemper.freedesktop.org
Mon Sep 20 16:52:17 UTC 2010


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

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Sep 20 10:50:15 2010 -0600

llvmpipe: fix query bug when no there's no scene

---

 src/gallium/drivers/llvmpipe/lp_query.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c
index ff0e207..84c66dd 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.c
+++ b/src/gallium/drivers/llvmpipe/lp_query.c
@@ -92,8 +92,9 @@ llvmpipe_get_query_result(struct pipe_context *pipe,
    int i;
 
    if (!pq->fence) {
-      assert(0);                /* query not in issued state */
-      return FALSE;
+      /* no fence because there was no scene, so results is zero */
+      *result = 0;
+      return TRUE;
    }
 
    if (!lp_fence_signalled(pq->fence)) {




More information about the mesa-commit mailing list