[Mesa-dev] [PATCH 02/11] r600g/compute: Add an util function to know if an item is in the pool

Bruno Jiménez brunojimen at gmail.com
Wed Jun 18 08:01:52 PDT 2014


Every item that has been placed in the pool must have start_in_dw
different from -1.
---
 src/gallium/drivers/r600/compute_memory_pool.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/r600/compute_memory_pool.h b/src/gallium/drivers/r600/compute_memory_pool.h
index e94159c..d8201c4 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.h
+++ b/src/gallium/drivers/r600/compute_memory_pool.h
@@ -59,6 +59,11 @@ struct compute_memory_pool
 };
 
 
+static inline int is_item_in_pool(struct compute_memory_item *item)
+{
+	return item->start_in_dw != -1;
+}
+
 struct compute_memory_pool* compute_memory_pool_new(struct r600_screen *rscreen); ///Creates a new pool
 void compute_memory_pool_delete(struct compute_memory_pool* pool); ///Frees all stuff in the pool and the pool struct itself too
 
-- 
2.0.0



More information about the mesa-dev mailing list