radv: handle fence allocation failing
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:

committed by
Bas Nieuwenhuizen

parent
b2b4f7248b
commit
7ad1c24e2a
@@ -1131,7 +1131,10 @@ VkResult radv_CreateFence(
|
||||
fence->submitted = false;
|
||||
fence->signalled = !!(pCreateInfo->flags & VK_FENCE_CREATE_SIGNALED_BIT);
|
||||
fence->fence = device->ws->create_fence();
|
||||
|
||||
if (!fence->fence) {
|
||||
vk_free2(&device->alloc, pAllocator, fence);
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
|
||||
*pFence = radv_fence_to_handle(fence);
|
||||
|
||||
|
Reference in New Issue
Block a user