summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r--src/intel/vulkan/anv_allocator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 4fc83386a71..1928b9bb157 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -820,10 +820,12 @@ anv_bo_pool_finish(struct anv_bo_pool *pool)
}
VkResult
-anv_bo_pool_alloc(struct anv_bo_pool *pool, struct anv_bo *bo)
+anv_bo_pool_alloc(struct anv_bo_pool *pool, struct anv_bo *bo, uint32_t size)
{
VkResult result;
+ assert(pool->bo_size <= size);
+
void *next_free_void;
if (anv_ptr_free_list_pop(&pool->free_list, &next_free_void)) {
struct bo_pool_bo_link *next_free = next_free_void;