Open-Source NVIDIA Vulkan Driver "NVK" Lands Improvements For ReBAR
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.
With those pieces now in Linux Git, Faith Ekstrand merged support for additional memory types and properties to NVK.
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.
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.
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.
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.
5 Comments