aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_allocator.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-10-14 12:57:44 +1000
committerDave Airlie <[email protected]>2016-10-19 09:05:25 +1000
commit8df014c01a41012a983bd0be164600ab50300e5c (patch)
treefdb82b1d6497f407d2222d20323d84c5f43ee4d0 /src/intel/vulkan/anv_allocator.c
parent008f54f63af51638ce36e47ca971714953f142f8 (diff)
anv: port to using new u_vector shared helper.
This just removes the anv vector code and uses the new helper. Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r--src/intel/vulkan/anv_allocator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index d5c033c97e1..ae18f8e3837 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -272,7 +272,7 @@ anv_block_pool_init(struct anv_block_pool *pool,
if (ftruncate(pool->fd, BLOCK_POOL_MEMFD_SIZE) == -1)
return;
- anv_vector_init(&pool->mmap_cleanups,
+ u_vector_init(&pool->mmap_cleanups,
round_to_power_of_two(sizeof(struct anv_mmap_cleanup)), 128);
pool->state.next = 0;
@@ -289,14 +289,14 @@ anv_block_pool_finish(struct anv_block_pool *pool)
{
struct anv_mmap_cleanup *cleanup;
- anv_vector_foreach(cleanup, &pool->mmap_cleanups) {
+ u_vector_foreach(cleanup, &pool->mmap_cleanups) {
if (cleanup->map)
munmap(cleanup->map, cleanup->size);
if (cleanup->gem_handle)
anv_gem_close(pool->device, cleanup->gem_handle);
}
- anv_vector_finish(&pool->mmap_cleanups);
+ u_vector_finish(&pool->mmap_cleanups);
close(pool->fd);
}
@@ -420,7 +420,7 @@ anv_block_pool_grow(struct anv_block_pool *pool, struct anv_block_state *state)
assert(center_bo_offset >= pool->back_state.end);
assert(size - center_bo_offset >= pool->state.end);
- cleanup = anv_vector_add(&pool->mmap_cleanups);
+ cleanup = u_vector_add(&pool->mmap_cleanups);
if (!cleanup)
goto fail;
*cleanup = ANV_MMAP_CLEANUP_INIT;