From: Marek Olšák <marek.ol...@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to