r600g/compute: Add an util function to know if an item is in the pool
authorBruno Jiménez <brunojimen@gmail.com>
Wed, 18 Jun 2014 15:01:52 +0000 (17:01 +0200)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 20 Jun 2014 17:43:46 +0000 (13:43 -0400)
Every item that has been placed in the pool must have start_in_dw
different from -1.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/r600/compute_memory_pool.h

index e94159cedaca31c2d6e963795c419f04224b9b1e..d8201c4659f81e43fc2fd6cefda8c20169c5f13e 100644 (file)
@@ -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