mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
venus: conditionally enable async descriptor set allocation
When VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is not used to create the pool, set allocation is guaranteed to not return VK_ERROR_FRAGMENTED_POOL, and we can safely move set allocation to async after doing resource tracking in the driver. Enable after fully tested with assert(false) in the failure case. Tested with: - dEQP-VK.api.descriptor* - dEQP-VK.api.object_management.* - dEQP-VK.binding_model.descriptor* - dEQP-VK.descriptor_indexing.* Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501>
This commit is contained in:
parent
288ce1b033
commit
3538b5af6d
1 changed files with 9 additions and 4 deletions
|
|
@ -444,10 +444,15 @@ vn_AllocateDescriptorSets(VkDevice device,
|
|||
pDescriptorSets[i] = set_handle;
|
||||
}
|
||||
|
||||
result = vn_call_vkAllocateDescriptorSets(dev->instance, device,
|
||||
pAllocateInfo, pDescriptorSets);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
if (pool->async_set_allocation) {
|
||||
vn_async_vkAllocateDescriptorSets(dev->instance, device, pAllocateInfo,
|
||||
pDescriptorSets);
|
||||
} else {
|
||||
result = vn_call_vkAllocateDescriptorSets(
|
||||
dev->instance, device, pAllocateInfo, pDescriptorSets);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue