mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 19:00:13 +01:00
radv: Fix descriptor set allocation failure.
Set all the handles to VK_NULL_HANDLE:
"If the creation of any of those descriptor sets fails, then the implementation
must destroy all successfully created descriptor set objects from this command,
set all entries of the pDescriptorSets array to VK_NULL_HANDLE and return the
error."
(Vulkan 1.1.117 Spec, section 13.2)
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 2b53c49d2f)
This commit is contained in:
parent
d06ccdf9dd
commit
b1d66aa9ee
1 changed files with 5 additions and 1 deletions
|
|
@ -796,9 +796,13 @@ VkResult radv_AllocateDescriptorSets(
|
|||
pDescriptorSets[i] = radv_descriptor_set_to_handle(set);
|
||||
}
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
if (result != VK_SUCCESS) {
|
||||
radv_FreeDescriptorSets(_device, pAllocateInfo->descriptorPool,
|
||||
i, pDescriptorSets);
|
||||
for (i = 0; i < pAllocateInfo->descriptorSetCount; i++) {
|
||||
pDescriptorSets[i] = VK_NULL_HANDLE;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue