summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-07-29 16:20:19 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-08-06 13:56:14 +0200
commited2254d1573aa0d2b42455b7d3477f7edee563af (patch)
tree26ada33aac33c27e30aaec9ec4c44904a263002b
parentf4b977bf3dba2b68ebda5b2c0823e4cc6d80192b (diff)
downloadexternal_mesa3d-ed2254d1573aa0d2b42455b7d3477f7edee563af.zip
external_mesa3d-ed2254d1573aa0d2b42455b7d3477f7edee563af.tar.gz
external_mesa3d-ed2254d1573aa0d2b42455b7d3477f7edee563af.tar.bz2
radeonsi: check IB memory usage of CP DMA operations
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
-rw-r--r--src/gallium/drivers/radeonsi/si_cp_dma.c5
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 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. */