diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 845785678e4..7f1a18a2134 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1292,7 +1292,7 @@ anv_bo_pool_alloc(struct anv_bo_pool *pool, uint32_t size, struct anv_bo *bo = util_sparse_array_free_list_pop_elem(&pool->free_list[bucket]); if (bo != NULL) { - VG(VALGRIND_MEMPOOL_ALLOC(pool, bo->map, size)); + VG(VALGRIND_MEMPOOL_ALLOC(pool, bo->map, bo->size)); *bo_out = bo; return VK_SUCCESS; } @@ -1308,7 +1308,7 @@ anv_bo_pool_alloc(struct anv_bo_pool *pool, uint32_t size, /* We want it to look like it came from this pool */ VG(VALGRIND_FREELIKE_BLOCK(bo->map, 0)); - VG(VALGRIND_MEMPOOL_ALLOC(pool, bo->map, size)); + VG(VALGRIND_MEMPOOL_ALLOC(pool, bo->map, bo->size)); *bo_out = bo;