From: Marek Olšák Date: Fri, 29 Jul 2016 14:20:19 +0000 (+0200) Subject: radeonsi: check IB memory usage of CP DMA operations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed2254d1573aa0d2b42455b7d3477f7edee563af;p=mesa.git radeonsi: check IB memory usage of CP DMA operations Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c index 882458c7b69..7d4edc046cd 100644 --- a/src/gallium/drivers/radeonsi/si_cp_dma.c +++ b/src/gallium/drivers/radeonsi/si_cp_dma.c @@ -150,6 +150,11 @@ static void si_cp_dma_prepare(struct si_context *sctx, struct pipe_resource *dst struct pipe_resource *src, unsigned byte_count, uint64_t remaining_size, unsigned *flags) { + /* Count memory usage in so that need_cs_space can take it into account. */ + r600_context_add_resource_size(&sctx->b.b, dst); + if (src) + r600_context_add_resource_size(&sctx->b.b, src); + si_need_cs_space(sctx); /* This must be done after need_cs_space. */