From d729038c073d267e1c04bdd49cc5a53f34acbf63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 13 Oct 2021 10:37:32 +0300 Subject: [PATCH] anv: use vk_object_zalloc for wsi fences created MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jason Ekstrand Part-of: --- src/intel/vulkan/anv_wsi_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_wsi_display.c b/src/intel/vulkan/anv_wsi_display.c index 4c3199f657b..9f54d213e61 100644 --- a/src/intel/vulkan/anv_wsi_display.c +++ b/src/intel/vulkan/anv_wsi_display.c @@ -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;