RFC: zink: link to vulkan-loader at run-time
This is a big, uncomfortable change with lots of churn.
The problem this solves, is that it makes it possible to build Mesa's
OpenGL32.DLL with both zink and llvmpipe, and use it on systems without a GPU without having to manually distribute
Vulkan-1.DLL. This is especially useful because
Vulkan-1.DLL isn't distributed with the Vulkan SDK, it's distributed through the GPU vendor drivers. Which means that systems without a GPU (or maybe just without a Vulkan capable GPU) has no
It's marked as WIP for two and a half reasons:
- I'm unsure that this is really what we want.
- It's untested on Windows, which is the only place it maybe makes sense.
- It might be cleaner to just delay-load using MSVC... but that leaves MinGW out to dry.
The reason I'm unsure, is that this feels like we're really papering over a hole in the distribution of
Vulkan-1.DLL, and we pay the price even on systems where this isn't a problem (like most Linux systems).
For most other drivers, we just link in their required dependencies (like libdrm etc), so this feels like it takes a far step away from the norm here. The only exception is the D3D12 driver, which does the same thing as we do here, for similar-ish reasons.
This should in theory fix #3855, although we probably need to tweak the DLL name from what we're doing here before it can even work.