vulkan/wsi/display: Wrap wsi_display_fence in a vk_sync

This gets rid of the bespoke vfunc interface in the WSI code.
Eventually, I'd love to get rid of wsi_display_fence entirely but
this at least makes it a lot more palatable.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>
This commit is contained in:
Jason Ekstrand
2021-10-21 11:50:10 -05:00
parent b1addc425a
commit e3fda7ae78
6 changed files with 105 additions and 35 deletions

View File

@@ -1543,7 +1543,7 @@ anv_fence_impl_cleanup(struct anv_device *device,
break;
case ANV_FENCE_TYPE_WSI:
impl->fence_wsi->destroy(impl->fence_wsi);
vk_sync_destroy(&device->vk, impl->sync_wsi);
break;
default:
@@ -1860,7 +1860,8 @@ anv_wait_for_wsi_fence(struct anv_device *device,
struct anv_fence_impl *impl,
uint64_t abs_timeout)
{
return impl->fence_wsi->wait(impl->fence_wsi, abs_timeout);
return vk_sync_wait(&device->vk, impl->sync_wsi, 0,
VK_SYNC_WAIT_COMPLETE, abs_timeout);
}
static VkResult