Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vulkan hardware acceleration for WSL #188

Open
shoffmeister opened this issue Mar 5, 2023 · 2 comments
Open

Add Vulkan hardware acceleration for WSL #188

shoffmeister opened this issue Mar 5, 2023 · 2 comments
Assignees

Comments

@shoffmeister
Copy link

Mesa offers Vulkan support, and Microsoft map this, apparently, to "dzn" - experimentally.

Please add "dzn" support to the custom Fedora Remix Mesa packaging, such that vulkaninfo --summary does no longer show only llvmpipe, but exposes the underlying hardware.

See https://forums.developer.nvidia.com/t/enabling-nvidia-support-for-vulkan-on-ubuntu-22-04-through-wsl2/244176/5 for expected output, specifically,e.g.,

GPU id : 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4090)):

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/6318#note_1459269 for build and smoketest instructions.

@shoffmeister
Copy link
Author

For Fedora's rpmbuild that could be as simple as

- %global platform_vulkan ,intel,intel_hasvk
+ %global platform_vulkan ,intel,intel_hasvk,microsoft-experimental
  %{_libdir}/libvulkan_intel_hasvk.so
  %{_datadir}/vulkan/icd.d/intel_hasvk_icd.*.json
+ # hacky packaging problem - bundle executable together with drivers
+ # avoid touching mesa meson
+ %{_bindir}/spirv2dxil
+ %{_libdir}/libvulkan_dzn.so
+ %{_libdir}/libspirv_to_dxil.so
+ # hacky deployment problem - we don't actually want to deploy the static library
+ # avoid touching mesa meson
+ %{_libdir}/libspirv_to_dxil.a
+ %{_datadir}/vulkan/icd.d/dzn_icd.*.json

Looking at libvulkan_dzn I see plenty of dependencies,

 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libX11-xcb.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-dri3.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-present.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-xfixes.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-sync.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-randr.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-shm.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libxshmfence.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libwayland-client.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libdrm.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libexpat.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libvulkan_dzn.so]

presenting a (not so lovely) mix between wayland and X11. Not sure whether that will be changed. The build option probably is called microsoft-experimental for a reason ...

@crramirez crramirez self-assigned this Mar 5, 2023
@crramirez
Copy link
Contributor

I'll put it in the roadmap. Thanks for the suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants