Intel Comes Up With A Way For Vulkan Sparse Support On Their Existing Linux Driver

Written by Michael Larabel in Intel on 3 October 2023 at 02:52 PM EDT. 9 Comments
INTEL
The biggest hindrance for using Intel Arc Graphics for Linux gaming has been the lack of Vulkan sparse support as needed for running many newer Windows DirectX 12 games atop Valve's Steam Play with Proton using VKD3D-Proton. Intel recently did implement Vulkan sparse support for ANV in Mesa 23.3 but it only works with their yet-to-be-upstreamed and still-experimental Xe kernel driver. But now Intel Linux graphics driver engineers have managed to pull off a solution for getting the sparse resources supported while using the existing i915 kernel DRM driver.

The lack of Vulkan sparse support has meant many newer games cannot run when using Intel graphics such as Street Fighter 6, Elden Ring, Assassin's Creed Valhalla, and many others -- just to give you a taste of some of the games that Intel Arc Graphics have been missing out on under Linux. It's been frustrating as well that due to the VM_BIND dependence on the kernel driver, that the Xe kernel driver has been a requirement for the initial sparse support. But a new merge request opened today allows for making use of the Vulkan sparse support with the existing i915 kernel DRM driver.

A draft merge request was posted for Mesa that implements the sparse binding using TR-TT as an alternative to VM_BIND usage. TR-TT is found with Intel Gen12 graphics and newer and is short for the Tiled Resources Translation Table. The Tiled Resources Translation Table (TR-TT) pre-processes graphics virtual addresses to a new graphics virtual memory address or otherwise to a null tile. To date the Intel ANV driver did not make use of TR-TT.

Intel Arc Graphics


Intel engineer Paulo Zanoni wrote in that draft MR:
"This series implements Sparse Binding using TR-TT as its backend (instead of vm_bind) for Gen12+. This allows us to try Sparse on i915.ko, and gives us an extra option for xe.ko.

This series is still a work-in-progress but dEQP tests pass and I was able to play some games."

Paulo went on to elaborate in one of the patches:
"TR-TT is a hardware feature supported by both i915.ko and xe.ko.

Despite being technically incorrect, the current implementation is already good enough to pass all dEQP tests and even run games.

The big problem here is that we're writing the page tables using memory maps instead of batches, which means the CPU may end up racing against batches that are already running, and if the addresses are the same, this may create problems. In practice we don't seem to see this case, hence things appear to work."

Implementing sparse bindings for ANV with the TR-TT approach is just under 500 lines of new code. Hopefully this code gets cleaned up and reviewed in a timely manner so it could potentially still appear in this quarter's Mesa 23.3 as a big boost for Intel Linux gamers.
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