diff options
author | Rob Clark <robclark@freedesktop.org> | 2014-10-03 12:48:31 -0400 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2014-10-03 14:19:52 -0400 |
commit | 7297bdbd50eb039878fe9e472dc736e1259710fb (patch) | |
tree | 053bf7c1259f187b79ad300c1ca87f4ef12d661a /src/gallium/drivers/freedreno/freedreno_query_hw.c | |
parent | a262c601d363aea2e6680df527e207cc9d5e235f (diff) | |
download | external_mesa3d-7297bdbd50eb039878fe9e472dc736e1259710fb.zip external_mesa3d-7297bdbd50eb039878fe9e472dc736e1259710fb.tar.gz external_mesa3d-7297bdbd50eb039878fe9e472dc736e1259710fb.tar.bz2 |
freedreno: query fixes
Fixes a few issues, including a potential empty-IB (which triggers gpu
hangs in piglit occlusion_query_meta_no_fragments)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_query_hw.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_query_hw.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.c b/src/gallium/drivers/freedreno/freedreno_query_hw.c index 38bd3de..b29f9d4 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_hw.c +++ b/src/gallium/drivers/freedreno/freedreno_query_hw.c @@ -183,12 +183,16 @@ fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q, return false; /* if the app tries to read back the query result before the - * back is submitted, that forces us to flush so that there + * batch is submitted, that forces us to flush so that there * are actually results to wait for: */ if (!LIST_IS_EMPTY(&hq->list)) { + /* if app didn't actually trigger any cmdstream, then + * we have nothing to do: + */ + if (!ctx->needs_flush) + return true; DBG("reading query result forces flush!"); - ctx->needs_flush = true; fd_context_render(&ctx->base); } @@ -201,9 +205,6 @@ fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q, assert(LIST_IS_EMPTY(&hq->current_periods)); assert(!hq->period); - if (LIST_IS_EMPTY(&hq->periods)) - return true; - /* if !wait, then check the last sample (the one most likely to * not be ready yet) and bail if it is not ready: */ |