Module: Mesa Branch: master Commit: 7ad1c24e2afab3aacd56af9ffb48e2538d3dd3ee URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ad1c24e2afab3aacd56af9ffb48e2538d3dd3ee
Author: Dave Airlie <[email protected]> Date: Thu Dec 1 00:44:45 2016 +0000 radv: handle fence allocation failing Reviewed-by: Bas Nieuwenhuizen <[email protected]> --- src/amd/vulkan/radv_device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 75b7af1..c1438fe 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -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); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
