Wine Code Merged To Overcome A Vulkan Performance Penalty

Written by Michael Larabel in WINE on 3 March 2024 at 06:58 AM EST. 14 Comments
WINE
Merged this week ahead of the Wine 9.4 development release due out next Friday is support for using the new Vulkan VK_EXT_map_memory_placed extension to overcome a performance penalty with Windows on Windows 64-bit (WOW64) for games/apps.

As mentioned in mid-February when Vulkan 1.3.278 was released with the VK_EXT_map_memory_placed extension, this new capability will help out Wine / Steam Play. The extension devised by Valve, AMD, NVIDIA, Collabora, and CodeWeavers was worked on with Wine on the mind. VK_EXT_map_memory_placed allows requesting a memory map be placed at a particular virtual address. This was requested by Wine developers to better support 32-bit Windows applications while using 64-bit Vulkan drivers. If a 64-bit Vulkan driver returns a pointer from vkMapMemory that the 32-bit API consumer can't deal with due to being out of the 32-bit range, there are problems. But by leveraging VK_EXT_map_memory_placed to ensure memory objects are in an acceptable range, the 32-bit Windows software on Wine can be dealt with so that the memory objects won't be outside the 32-bit range.

The merge request for using VK_EXT_map_memory_placed for memory mappings on WOW64 was merged this week and will be found in Wine 9.4 next Friday. That merge request explains:
"With the new extension, we may implement wow64 correctly, without VK_EXT_external_memory_host hacks. This is both more correct and more performant (essentially eliminating Vulkan wow64 performance penalty)."

The NVIDIA Vulkan beta driver already supports VK_EXT_map_memory_placed while RADV support was merged this past Friday. The NVK support for this extension is also found in Mesa 24.1-devel while so far I haven't seen any Intel ANV Vulkan driver patches for VK_EXT_map_memory_placed.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week