diff options
author | Marek Olšák <[email protected]> | 2018-04-01 13:40:41 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-04-05 15:34:58 -0400 |
commit | 3f55fe99d61ff205ed7433a0b82e5495f85b894d (patch) | |
tree | c3d5f3480e03eb81e30e628a3e353878e1da4354 /src/gallium | |
parent | 54f28359b5dda8f2d2738a1c1654c94cc7beeef0 (diff) |
radeonsi: use num_cs_dw_queries_suspend
Acked-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 6fc85eacb3a..eb9e16c229f 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -59,10 +59,14 @@ void si_need_cs_space(struct si_context *ctx) ctx->b.gtt = 0; ctx->b.vram = 0; - /* If the CS is sufficiently large, don't count the space needed + /* If the IB is sufficiently large, don't count the space needed * and just flush if there is not enough space left. + * + * Also reserve space for stopping queries at the end of IB, because + * the number of active queries is mostly unlimited. */ - if (!ctx->b.ws->cs_check_space(cs, 2048)) + unsigned need_dwords = 2048 + ctx->b.num_cs_dw_queries_suspend; + if (!ctx->b.ws->cs_check_space(cs, need_dwords)) si_flush_gfx_cs(ctx, PIPE_FLUSH_ASYNC, NULL); } |