anv: use vk_object_zalloc for wsi fences created

Otherwise we hit assert in vk_object_base_assert_valid when attemping to
create handle from anv_fence with unknown base type.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13330>
This commit is contained in:
Tapani Pälli 2021-10-13 10:37:32 +03:00 committed by Marge Bot
parent 4721352f97
commit d729038c07
1 changed files with 4 additions and 4 deletions

View File

@ -37,8 +37,8 @@ anv_RegisterDeviceEventEXT(VkDevice _device,
struct anv_fence *fence;
VkResult ret;
fence = vk_zalloc2(&device->vk.alloc, allocator, sizeof (*fence), 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
fence = vk_object_zalloc(&device->vk, allocator, sizeof (*fence),
VK_OBJECT_TYPE_FENCE);
if (!fence)
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
@ -68,8 +68,8 @@ anv_RegisterDisplayEventEXT(VkDevice _device,
struct anv_fence *fence;
VkResult ret;
fence = vk_zalloc2(&device->vk.alloc, allocator, sizeof (*fence), 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
fence = vk_object_zalloc(&device->vk, allocator, sizeof (*fence),
VK_OBJECT_TYPE_FENCE);
if (!fence)
return VK_ERROR_OUT_OF_HOST_MEMORY;