Module: Mesa
Branch: master
Commit: ed2254d1573aa0d2b42455b7d3477f7edee563af
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed2254d1573aa0d2b42455b7d3477f7edee563af

Author: Marek Olšák <[email protected]>
Date:   Fri Jul 29 16:20:19 2016 +0200

radeonsi: check IB memory usage of CP DMA operations

Reviewed-by: Nicolai Hähnle <[email protected]>

---

 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. */

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to