How to write a Vulkan driver in 2022
collabora.com
collabora.com
There's also things like subpasses, which, if you can ignore it, you can just use a "default" implementation that acts like a desktop immediate-mode GPU and ignores subpasses. Not always appropriate for a mobile GPU or a tiler, where subpasses are meaningful to you, so it's provided as an optional helper.
Then there's just leftover spec mistakes like VkFramebuffer, where the spec is just thicker than it should be. That's fixed in future spec versions but someone needs to implement the old way.
NIR is a sweet spot for me (lean C89 code with benign bits of c99/c11), even though I would like a configure "switch" to remove all non-breaking algebraic optimizations from the vulkan drivers (I used to do that myself for a good while, near 0 performance impact) since it is redondant because those should be directly done in spir-v code.
Since I am an AMD user (I play video games, now all the ones I play have a vulkan backend), even if I really dislike a bloody lot c++, I am grateful to valve for ACO (because llvm is beyond toxic, even from a c++ point of view). But I wish ACO would manage to add the possibility for hand-coded assembly shaders (AMDGPU ISA is public and really ez to code), just need a few relocation types (writing an assembler should not be a nightmare like with hw architectures using bazillions of relocation types).
Also, I'm getting some strong hints about getting a vulkan driver for nvidia soonish, would be nice!
Unfortunately I don't have a box to try wacky drivers on so that may block my efforts to embarrass myself in one more domain. Couldn't tell whether they test in VMs or physical boxes (or userspace?)
Developers can just build and install them to some user-controlled directory (e.g., $HOME/opt) and run from there with LD_LIBRARY_PATH and other similar variables. You can wrap all the variables in a script and run your custom-built mesa with simply "$ with-custom-mesa glxgears" and then glxgears will be using your custom (and possibly broken) driver, while everything else will still be using the default drivers from the distro.
You could use containers such as systemd-nspawn, but it's much more complicated than simply using $HOME/opt.
Edit: https://docs.mesa3d.org/install.html#running-against-a-local...
Have a read through https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-... and see if you'd find that space interesting to work in.
Configuring the build with Meson might look a bit intimidating, but you can find examples by checking how distros configure it.
For example on Debian you can see this in the build log:
https://buildd.debian.org/status/fetch.php?pkg=mesa&arch=amd...
Search for
LC_ALL=C.UTF-8 meson