[Mesa-dev] [PATCH v2 2/2] r600g/compute: Add debug information to promote and demote functions

Bruno Jiménez brunojimen at gmail.com
Fri Jul 11 01:20:54 PDT 2014


v2: Add information about the item's starting point and size
---
 src/gallium/drivers/r600/compute_memory_pool.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c
index 1d0ec85..6a525cf 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.c
+++ b/src/gallium/drivers/r600/compute_memory_pool.c
@@ -339,6 +339,10 @@ int compute_memory_promote_item(struct compute_memory_pool *pool,
 	int64_t start_in_dw;
 	int err = 0;
 
+	COMPUTE_DBG(pool->screen, "* compute_memory_promote_item()\n"
+			"  + Promoting Item: %i , starting at: %u (%u bytes) "
+			"size: %u (%u bytes)\n", item->id, item->start_in_dw,
+			item->start_in_dw * 4, item->size_in_dw, item->size_in_dw * 4);
 
 	/* Search for free space in the pool for this item. */
 	while ((start_in_dw=compute_memory_prealloc_chunk(pool,
@@ -409,6 +413,11 @@ void compute_memory_demote_item(struct compute_memory_pool *pool,
 	struct pipe_resource *dst;
 	struct pipe_box box;
 
+	COMPUTE_DBG(pool->screen, "* compute_memory_demote_item()\n"
+			"  + Demoting Item: %i, starting at: %u (%u bytes) "
+			"size: %u (%u bytes)\n", item->id, item->start_in_dw,
+			item->start_in_dw * 4, item->size_in_dw, item->size_in_dw * 4);
+
 	/* First, we remove the item from the item_list */
 	list_del(&item->link);
 
-- 
2.0.1



More information about the mesa-dev mailing list