mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 10:20:22 +01:00
zink: immediately return false when getting query result if it's not gonna happen
this is a small optimization for the no-wait case when unflushed usage exists since it's impossible for a qbo update to happen instantly no functionality will be fixed by this, it's just a very minor optimization Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10796>
This commit is contained in:
parent
cf3f17a643
commit
d1e30ca120
1 changed files with 6 additions and 2 deletions
|
|
@ -780,8 +780,12 @@ zink_get_query_result(struct pipe_context *pctx,
|
|||
if (query->needs_update)
|
||||
update_qbo(ctx, query);
|
||||
|
||||
if (!threaded_query(q)->flushed && query->batch_id.usage == ctx->curr_batch)
|
||||
pctx->flush(pctx, NULL, 0);
|
||||
if (query->batch_id.usage == ctx->curr_batch) {
|
||||
if (!threaded_query(q)->flushed)
|
||||
pctx->flush(pctx, NULL, 0);
|
||||
if (!wait)
|
||||
return false;
|
||||
}
|
||||
|
||||
return get_query_result(pctx, q, wait, result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue