I guess this is not bug, but I cannot find something useful for me.
I have a same issue at here, and this following is the simple copy about it:
I am not sure what is wgpu. And I have also tried to sreach in web for a useful solution but nothing.
I run the progamme in WSL 2 (with the full linux kernel), but it panics with this erroe message:
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
thread 'main' panicked at 'Error in Device::create_swap_chain: surface does not support the adapter's queue family', /home/peter/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.7.1/src/backend/direct.rs:129:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1] 12742 segmentation fault cargo run
The first three lines looks just a waring but not error, and the last one about surface does not support the adapter's queue family' looks useful, but I cannot find some useful solution. So what is adapter's queue family? What can I do to support it?
This is definitely not an error message we need to issue! If you need to present to a surface, you need to pass that surface down to the RequestAdapterOptions. Are you currently doing this?
This is definitely not an error message we need to issue! If you need to present to a surface, you need to pass that surface down to the
RequestAdapterOptions. Are you currently doing this?
Sorry but I am not sure how to pass the surface down to the RequestAdepterOptions. To get your meaning, I download the https://github.com/gfx-rs/wgpu-rs. And run with command cargo run --example cube.
And it raise the same error message! Why it raise the error message? What cause it?
By the way, I guess the cause is the variable XDG_RUNTIME_ERROR, but I cannot get what it is totally.
I ask a question at stack overflow(link), but nobody give me a useful idea. I am still confused.
Does vkcube run in your WSL2 / VcXsrv environment setup?
I think this is an upstream issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4323
Is there software Vulkan implementation available in mesa?
wgpu-rs examples work fine in WSL2, but only with this drivers and OpenGL backend.
WGPU_BACKEND=gl cargo run --example cube
Basically,
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
Means that all bets are off, and it's totally unsafe. We can't do much in the face of a non-conformant implementation. We don't have a good mechanism to even discover that.
I change my WSL2 from WSL 2 kali-linux to WSL 2 Ubuntu-20.04. Now it raise:
peter@Peterlits:~/tmp/icedexp
master ✗ $ cargo run 1 ↵
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/icedexp`
Error: GraphicsAdapterNotFound
I try to solve the problem on kali-linux, but I cannot get the package I want... That is why I try to solve it on Ubuntu WSL.
https://github.com/gnsmrky/wsl-vulkan-mesa#install-mesa-and-run-vulkan-tools
This help me to build mesa that can be used in WSL! I solve it! Why WSL is so difficult to use? MS says it has full kernel... But...
BTW, the issue can be closed! thanks for your friendly help. Thanks for your url, @Systemcluster . It helps me a lot.
Most helpful comment
https://github.com/gnsmrky/wsl-vulkan-mesa#install-mesa-and-run-vulkan-tools
This help me to build mesa that can be used in WSL! I solve it! Why WSL is so difficult to use? MS says it has full kernel... But...
BTW, the issue can be closed! thanks for your friendly help. Thanks for your url, @Systemcluster . It helps me a lot.