[Mesa-dev] [PATCH 05/55] radeonsi: use num_cs_dw_queries_suspend

Marek Olšák maraeo at gmail.com
Mon Apr 2 04:07:58 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/radeonsi/si_hw_context.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
index 6fc85ea..0f7fbc6 100644
--- a/src/gallium/drivers/radeonsi/si_hw_context.c
+++ b/src/gallium/drivers/radeonsi/si_hw_context.c
@@ -62,7 +62,8 @@ void si_need_cs_space(struct si_context *ctx)
 	/* If the CS is sufficiently large, don't count the space needed
 	 * and just flush if there is not enough space left.
 	 */
-	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);
 }
 
-- 
2.7.4



More information about the mesa-dev mailing list