zink: make descriptor pool creation more robust

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28467>
(cherry picked from commit 18fbe63ff2)
This commit is contained in:
Mike Blumenkrantz 2024-03-19 17:03:19 -04:00 committed by Eric Engestrom
parent b21da22332
commit 398bd27e98
2 changed files with 9 additions and 6 deletions

View file

@ -4434,7 +4434,7 @@
"description": "zink: make descriptor pool creation more robust",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -825,11 +825,14 @@ create_pool(struct zink_screen *screen, unsigned num_type_sizes, const VkDescrip
dpci.poolSizeCount = num_type_sizes;
dpci.flags = flags;
dpci.maxSets = MAX_LAZY_DESCRIPTORS;
VkResult result = VKSCR(CreateDescriptorPool)(screen->dev, &dpci, 0, &pool);
if (result != VK_SUCCESS) {
mesa_loge("ZINK: vkCreateDescriptorPool failed (%s)", vk_Result_to_str(result));
return VK_NULL_HANDLE;
}
VkResult result;
VRAM_ALLOC_LOOP(result,
VKSCR(CreateDescriptorPool)(screen->dev, &dpci, 0, &pool),
if (result != VK_SUCCESS) {
mesa_loge("ZINK: vkCreateDescriptorPool failed (%s)", vk_Result_to_str(result));
return VK_NULL_HANDLE;
}
);
return pool;
}