anv: fix pool allocation failure reporting

When resetting the pool, also reset the allocated size so that failure
to allocation correctly reports VK_ERROR_OUT_OF_POOL_MEMORY instead of
VK_ERROR_FRAGMENTED_POOL.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12690
Tested-by: David Gow <david@ingeniumdigital.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35360>
(cherry picked from commit 426ddb4fc9)
This commit is contained in:
Lionel Landwerlin 2025-06-05 10:52:13 +03:00 committed by Eric Engestrom
parent 9ebeef8ef3
commit c68292dea9
2 changed files with 2 additions and 1 deletions

View file

@ -6784,7 +6784,7 @@
"description": "anv: fix pool allocation failure reporting",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1354,6 +1354,7 @@ anv_descriptor_pool_heap_reset(struct anv_device *device,
util_vma_heap_finish(&heap->heap);
util_vma_heap_init(&heap->heap, POOL_HEAP_OFFSET, heap->size);
heap->alloc_size = 0;
}
static VkResult