diff --git a/.pick_status.json b/.pick_status.json index acaac4db4fd..6e35c9b64ec 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -94,7 +94,7 @@ "description": "anv: Fix valgrind errors on batch buffers allocated from bo_pool", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index af7ab49c1c5..763e717af2b 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1293,7 +1293,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; } @@ -1309,7 +1309,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;