screenshot-layer: Fix leftover VK queues in the map at DeviceDestroy.

Noticed when the compiler said device_destroy_queues() was unused.

Fixes: 111faf2158 ("vulkan/screenshot-layer: Correct queueFamilyIndex source")
(cherry picked from commit 25723e3a37)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41402>
This commit is contained in:
Emma Anholt 2026-04-22 14:07:22 -07:00 committed by Eric Engestrom
parent dd927e1e83
commit 7d0df7a6e4
2 changed files with 5 additions and 6 deletions

View file

@ -504,7 +504,7 @@
"description": "screenshot-layer: Fix leftover VK queues in the map at DeviceDestroy.",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "111faf215886a25ce855ca15354d5651bd3d972b",
"notes": null

View file

@ -333,21 +333,20 @@ static void destroy_queue(struct queue_data *data)
ralloc_free(data);
}
static void device_destroy_queues(struct device_data *data)
static void destroy_device_data(struct device_data *data)
{
loader_platform_thread_lock_mutex(&globalLock);
struct queue_data *tmp_queue = VK_NULL_HANDLE;
for (auto it = data->queue_data_head; it != VK_NULL_HANDLE;) {
tmp_queue = it->next;
destroy_queue(it);
it = tmp_queue;
}
}
static void destroy_device_data(struct device_data *data)
{
loader_platform_thread_lock_mutex(&globalLock);
unmap_object(HKEY(data->device));
ralloc_free(data);
loader_platform_thread_unlock_mutex(&globalLock);
}