venus: expose WSI on renderer without dma-buf support

For Venus on host driver without dmabuf support, we can fallback to
allow cpu buffer blit for wsi instead of not exposing it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13096
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34804>
This commit is contained in:
Yiwei Zhang 2025-05-04 21:54:20 -07:00 committed by Marge Bot
parent f177b787b8
commit 06f5d1a105
2 changed files with 3 additions and 3 deletions

View file

@ -1178,8 +1178,7 @@ vn_physical_device_get_native_extensions(
}
#ifdef VN_USE_WSI_PLATFORM
if (can_external_mem &&
physical_dev->renderer_sync_fd.semaphore_importable) {
if (physical_dev->renderer_sync_fd.semaphore_importable) {
exts->KHR_incremental_present = true;
exts->KHR_swapchain = true;
exts->KHR_swapchain_mutable_format = true;

View file

@ -81,7 +81,8 @@ vn_wsi_init(struct vn_physical_device *physical_dev)
&physical_dev->wsi_device, vn_physical_device_to_handle(physical_dev),
vn_wsi_proc_addr, alloc, -1, &physical_dev->instance->dri_options,
&(struct wsi_device_options){
.sw_device = false,
.sw_device = !physical_dev->base.vk.supported_extensions
.EXT_external_memory_dma_buf,
.extra_xwayland_image = true,
});
if (result != VK_SUCCESS)