diff options
author | Jason Ekstrand <[email protected]> | 2016-11-01 13:09:36 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-09 11:30:59 -0800 |
commit | 6283b6d56a2bb731cfcb4c876566901075f9bd34 (patch) | |
tree | a5376832550daa6c849042812b57a2a9a9159bbc /src/intel/vulkan/anv_allocator.c | |
parent | ba1eea4f957ca068eceea121bc3a70e2fe07873d (diff) |
anv: Add a new bo_pool_init helper
This ensures that we're always setting all of the fields in anv_bo
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Cc: "13.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 2249fa6a00c..11875cb6399 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -253,10 +253,7 @@ anv_block_pool_init(struct anv_block_pool *pool, assert(util_is_power_of_two(block_size)); pool->device = device; - pool->bo.gem_handle = 0; - pool->bo.offset = 0; - pool->bo.size = 0; - pool->bo.is_winsys_bo = false; + anv_bo_init(&pool->bo, 0, 0); pool->block_size = block_size; pool->free_list = ANV_FREE_LIST_EMPTY; pool->back_free_list = ANV_FREE_LIST_EMPTY; @@ -463,10 +460,8 @@ anv_block_pool_grow(struct anv_block_pool *pool, struct anv_block_state *state) * values back into pool. */ pool->map = map + center_bo_offset; pool->center_bo_offset = center_bo_offset; - pool->bo.gem_handle = gem_handle; - pool->bo.size = size; + anv_bo_init(&pool->bo, gem_handle, size); pool->bo.map = map; - pool->bo.index = 0; done: pthread_mutex_unlock(&pool->device->mutex); |