venus: force sw wsi path on nv proprietary
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

We have to force it here, otherwise, if we'd like to preserve the
modifier path, it'd be too late when it falls back to prime blit with
unsupported compositors/envs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35372>
This commit is contained in:
Yiwei Zhang 2025-06-05 11:38:53 -07:00 committed by Marge Bot
parent d1c191a8c8
commit d4cedcd362

View file

@ -78,14 +78,21 @@ vn_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
VkResult
vn_wsi_init(struct vn_physical_device *physical_dev)
{
/* TODO Drop the workaround for NVIDIA_PROPRIETARY once hw prime buffer
* blit path works there.
*/
const bool use_sw_device =
!physical_dev->base.vk.supported_extensions
.EXT_external_memory_dma_buf ||
physical_dev->renderer_driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY;
const VkAllocationCallbacks *alloc =
&physical_dev->instance->base.vk.alloc;
VkResult result = wsi_device_init(
&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 = !physical_dev->base.vk.supported_extensions
.EXT_external_memory_dma_buf,
.sw_device = use_sw_device,
.extra_xwayland_image = true,
});
if (result != VK_SUCCESS)