[Mesa-dev] [PATCH 02/12] radeonsi: check IB memory usage of CP DMA operations
Marek Olšák
maraeo at gmail.com
Fri Jul 29 21:42:41 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_cp_dma.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c
index 882458c..7d4edc0 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. */
--
2.7.4
More information about the mesa-dev
mailing list