Haiku OS developer X512 has managed a rather impressive feat: porting NVIDIA’s open-source kernel modules to Haiku. Not only did he get NVIDIA’s official Linux kernel modules running on Haiku but he also ported the Mesa NVK Vulkan driver to be able to run atop the NVIDIA kernel driver interface.
The kernel code ported over to Haiku OS was the “NVRM” official MIT/GPL kernel modules maintained out-of-tree by NVIDIA as part of their official driver stack. This official but out-of-tree open-source NVIDIA kernel code has come together nicely in recent years for recent generations of NVIDIA GPUs. With this code being designed to be platform independent for the most part, it was helpful in porting to Haiku compared to say the Nouveau DRM kernel driver that is very much Linux specific.
Because NVIDIA doesn’t provide any open-source user-space OpenGL/Vulkan drivers, the Haiku developer took to porting the Mesa NVK Vulkan driver to be able to run on the NVIDIA NVRM kernel driver. This adaptation is quite interesting and could even be of interest to Linux users for those wanting to use that open-source community Vulkan driver atop NVIDIA’s official kernel driver for comparing and contrasting to the proprietary Vulkan driver.
The Haiku code is at a stage where some Vulkan apps are running on the platform with this NVIDIA open-source kernel driver and Mesa NVK. This support, of course, only works ofr Turing GPUs and newer due to the dependence on the NVIDIA GPU System Processor “GSP” with this modern kernel driver.
More details on this impressive engineering feat via the Haiku-OS.org discussion.