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>
(cherry picked from commit d729038c07)
This commit is contained in:
Tapani Pälli 2021-10-13 10:37:32 +03:00 committed by Dylan Baker
parent 121359791d
commit 6d4f4ade71
2 changed files with 5 additions and 5 deletions

View file

@ -409,7 +409,7 @@
"description": "anv: use vk_object_zalloc for wsi fences created",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -254,8 +254,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(VK_ERROR_OUT_OF_HOST_MEMORY);
@ -285,8 +285,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;