diff options
author | Marek Olšák <[email protected]> | 2016-07-29 16:20:19 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-06 13:56:14 +0200 |
commit | ed2254d1573aa0d2b42455b7d3477f7edee563af (patch) | |
tree | 26ada33aac33c27e30aaec9ec4c44904a263002b | |
parent | f4b977bf3dba2b68ebda5b2c0823e4cc6d80192b (diff) |
radeonsi: check IB memory usage of CP DMA operations
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_cp_dma.c | 5 |
1 files changed, 5 insertions, 0 deletions
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. */ |