From c68292dea9cbe5648552024ae50338ba89496dcc Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 5 Jun 2025 10:52:13 +0300 Subject: [PATCH] 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 Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12690 Tested-by: David Gow Part-of: (cherry picked from commit 426ddb4fc9a72266f6a710abedd309fe22404f8b) --- .pick_status.json | 2 +- src/intel/vulkan/anv_descriptor_set.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 4bfb1239755..a609e7dd908 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 5ce1f6e0eee..1d4a9348195 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -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