Open-Source NVIDIA Vulkan Driver "NVK" Lands Improvements For ReBAR

Written by Michael Larabel in Mesa on 25 February 2024 at 11:49 AM EST. 5 Comments
MESA
The open-source NVIDIA "NVK" Vulkan driver within Mesa 24.1-devel has seen improvements made for systems capable of Resizable BAR "ReBAR" support.

NVIDIA ReBAR support can be useful for performance and now the NVK Vulkan driver is aware of ReBAR support by the system and is able to make optimal use of the situation. This ReBAR work for NVK follows the Nouveau driver this week adding two new ioctls for Linux 6.8. Besides the new GSP mode default kernel configuration knob, there are new interfaces added for the Nouveau driver to be able to return the current used vRAM allocation for video memory usage and also reading the vRAM BAR size. With this "NOUVEAU_GETPARAM_VRAM_BAR_SIZE" to be found in Linux 6.8-rc6 releasing later today, the BAR resource size can be easily determined by user-space for those using this open-source NVIDIA kernel driver.

NVIDIA RTX GPU in use with Nouveau + NVK


With those pieces now in Linux Git, Faith Ekstrand merged support for additional memory types and properties to NVK.
"This MR adds the HOST_CACHED flag to the sysmem type and adds a HOST_VISIBLE+HOST_COHERENT type for VRAM which should gives the client access to write-combine memory."

As part of that work is exposing a host-visible vRAM type when ReBAR is enabled. Another one of the patches is uploading shaders on the CPU when there is ReBAR support.
"Without resizable BAR, we're limited as to how much VRAM we can map and we sometimes run out of maps for games with large numbers of shaders. We keep using the DMA engine fallback in that case."

These latest NVK Vulkan patches around ReBAR and many other NVK Vulkan driver improvements will be stable with next quarter's Mesa 24.1 release. By that point as well the Linux 6.8 kernel will be out as stable with the new Nouveau ioctls.
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