zink: add a better threshold for clamping query pool resets on suspend

these pools should be dumped even if they aren't used

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>
This commit is contained in:
Mike Blumenkrantz 2022-01-04 12:47:15 -05:00 committed by Marge Bot
parent 8a78706643
commit 8b46d83637

View file

@ -849,7 +849,13 @@ zink_suspend_queries(struct zink_context *ctx, struct zink_batch *batch)
}
if (query->needs_update)
update_qbo(ctx, query);
if (query->last_start && query->curr_query > NUM_QUERIES / 2)
/* do an implicit copy+reset if:
* - query is being read from and >50% of pool is used
* - >90% of pool is used
*
* this avoids overflow
*/
if ((query->last_start && query->curr_query > NUM_QUERIES / 2) || (query->curr_query > NUM_QUERIES * 0.9))
reset_pool(ctx, batch, query);
}
}