r600g/compute: Add an util function to know if an item is in the pool

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>
This commit is contained in:
Bruno Jiménez 2014-06-18 17:01:52 +02:00 committed by Tom Stellard
parent 0038402753
commit 9e491eb5d7
1 changed files with 5 additions and 0 deletions

View 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