mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
venus: force sw wsi path on nv proprietary
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:
parent
d1c191a8c8
commit
d4cedcd362
1 changed files with 9 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue