Mesa (main): crocus/query: poll the syncobj in the no wait situation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 07:09:34 UTC 2021


Module: Mesa
Branch: main
Commit: c282a082bef05d21aebf7f9a6c95d80f4b01cd23
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c282a082bef05d21aebf7f9a6c95d80f4b01cd23

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jun 18 05:07:26 2021 +1000

crocus/query: poll the syncobj in the no wait situation

In the no wait, poll the syncobj and bail if it's hasn't signalled.
This fixes a bunch of deqp xfb tests on sandybridge

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11567>

---

 src/gallium/drivers/crocus/crocus_query.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/crocus/crocus_query.c b/src/gallium/drivers/crocus/crocus_query.c
index d614cf678b5..47114cc6e60 100644
--- a/src/gallium/drivers/crocus/crocus_query.c
+++ b/src/gallium/drivers/crocus/crocus_query.c
@@ -676,8 +676,8 @@ crocus_get_query_result(struct pipe_context *ctx,
       }
       assert(READ_ONCE(q->map->snapshots_landed));
 #else
-      if (wait)
-         crocus_wait_syncobj(ctx->screen, q->syncobj, INT64_MAX);
+      if (crocus_wait_syncobj(ctx->screen, q->syncobj, wait ? INT64_MAX : 0))
+         return false;
 #endif
       calculate_result_on_cpu(devinfo, q);
    }



More information about the mesa-commit mailing list