GitHub - segaboy/vulkan-netbsd: This is my attempt to get Vulkan going on NetBSD. · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
segaboy
vulkan-netbsd
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>38 Commits<br>38 Commits
docs
docs
scripts
scripts
LICENSE
LICENSE
README.md
README.md
View all files
Repository files navigation
vulkan-netbsd
An effort to bring the Vulkan software stack (Mesa / Lavapipe) to<br>NetBSD , and to document and automate the process so it can be reproduced<br>and maintained.
Status: beta — Lavapipe Vulkan driver builds, installs, and registers on NetBSD
Milestone reached: Mesa configures, compiles, links, installs , and<br>registers the Lavapipe software Vulkan driver on NetBSD 10.1 amd64,<br>against LLVM 19.1.7. The driver (libvulkan_lvp.so, ~17 MB) installs into<br>/usr/pkg/lib, and its ICD manifest (advertising Vulkan API 1.4) installs<br>into /usr/pkg/share/vulkan/icd.d/, so a Vulkan loader on the system can<br>discover it. ldd resolves every dependency cleanly. The entire process —<br>environment setup, dependency builds, the Mesa build, and installation — is<br>automated end to end and reproducible on a fresh install.
Prebuilt binaries are coming. The tooling to build, fingerprint, and<br>publish prebuilt artifacts is in place, and the build scripts already know how<br>to fetch and install a matching prebuilt instead of building from source. Once<br>a build machine is publishing releases, installing the driver will be a<br>download rather than a multi-hour build. That's the near-term direction.
What this is NOT (yet):
Running Vulkan programs needs the loader. This project builds and<br>installs the Vulkan driver (the Lavapipe ICD). Actually executing a Vulkan<br>application also requires the Vulkan loader (libvulkan.so.1), which is<br>the next component to bring up. Runtime execution is therefore not yet<br>verified.
One workaround is still in place. The build applies -Wno-error=format<br>to sidestep GCC rejecting Mesa's %m format specifier on NetBSD. A proper<br>upstreamable fix (using strerror(errno)) is pending.
Steps, scripts, and documents will continue to change as the loader and the<br>release pipeline come together.
Goal
NetBSD is currently the only major BSD without Vulkan support. The aim of this<br>project is to:
Build the Vulkan software stack (Mesa's Lavapipe driver, which runs on the<br>CPU via LLVM and needs no GPU) on NetBSD.
Document every step, including the dead ends, so the process is reproducible.
Automate the setup so a fresh machine can be brought to a build-ready state<br>with a couple of scripts.
Eventually feed the necessary fixes upstream (to Mesa and to pkgsrc) and<br>provide prebuilt binaries or a pkgsrc package, so that Vulkan on NetBSD<br>becomes something you can simply install rather than build from source.
Scope and environment
Target OS: NetBSD 10.1 (amd64), minimal ISO install.
Host: VirtualBox VM.
Build goal only: This targets compilation and linkage of the Vulkan<br>stack. Runtime GPU acceleration is not available under VirtualBox; the<br>software driver (Lavapipe) is the target.
Repository layout
vulkan-netbsd/<br>├── docs/<br>│ ├── 01-environment-setup.md Base system + pkgsrc + build deps<br>│ ├── 02-source-dependencies.md Dependencies not in pkgsrc (built from source)<br>│ ├── 03-mesa-build.md Configure + compile Mesa (Lavapipe); port notes<br>│ └── 04-prebuilt-artifacts.md Build-once / reuse prebuilt binaries<br>└── scripts/<br>├── setup-env.sh Automates the environment setup<br>├── build-glslang.sh Builds glslang (required by Mesa; not in pkgsrc)<br>├── build-mesa.sh Clones + configures + compiles Mesa (Lavapipe)<br>├── install-mesa.sh Installs the built driver + ICD manifest<br>├── lib-artifacts.sh Shared: fingerprint + prebuilt fetch helpers<br>└── package-artifacts.sh Packages built binaries into release tarballs
Getting started
On a fresh, minimal NetBSD 10.1 (amd64) install, as root:
cd /root<br>ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/setup-env.sh<br>sh setup-env.sh<br>....