Closed PeterlitsZo closed 3 years ago
I get it! Althrough I do not know the relation between wgpu and mesa.
I use WSL Ubuntu 20.04 LTS and follow this document: https://github.com/gnsmrky/wsl-vulkan-mesa#install-mesa-and-run-vulkan-tools
Ubuntu has friendly package store than kali, and the wsl-vulkan-mesa is for Ubuntu. If someone know how to run on X server in Kali-Linux, please let me know how to do it.
I'm having a similar issue on Linux
thread 'main' panicked at 'Error in Device::create_swap_chain: surface does not support the adapter's queue family', /home/.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
Segmentation fault (core dumped)
rustc 1.51.0
uname -r
: 5.10.32-1-MANJARO
The error is the same for published iced 0.3.0 and upstream. On the other hand, wgpu-rs examples work fine, showing Using GeForce RTX 2060 (Vulkan)
in logs
Update: integration example works because it passes Some(&surface) to request_adapter https://github.com/hecrj/iced/blob/master/examples/integration/src/main.rs#L41
I have opened #868 to fix the issue. Let me know if it works for you!
Tested with cargo run --package counter
, errors on master but works on wgpu-compatible-surface branch
Edit: woops, not exactly
wgpu error: Validation Error
Caused by:
In a RenderPass
note: encoder = `iced_wgpu encoder`
In a set_scissor_rect command
Invalid ScissorRect parameters
thread 'main' panicked at 'Handling wgpu errors as fatal by default', /home/x/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.7.1/src/backend/direct.rs:1896:5
I have to mess up with the xorg configs in a very specific way in order to reproduce this issue. For example, if I delete /etc/X11/xorg.conf
and all the files in /etc/X11/xorg.conf.d/
, then it builds and runs the application. But when I do cd /etc/X11/xorg.conf.d/
then cp /usr/share/X11/xorg.conf.d/* .
and cd /etc/X11/
with sudo nvidia-xconfig
, then it starts to fail. So it looks that a specific configuration of xorg triggers this behavior in my case.
Tested some more examples
master bezier_tool -> Invalid ScissorRect parameters clock -> ok color_palette -> Invalid ScissorRect parameters counter -> Error in Device::create_swap_chain custom_widget -> Error in Device::create_swap_chain download_progress -> Error in Device::create_swap_chain events -> Error in Device::create_swap_chain
wgpu-compatible-surface bezier_tool -> Invalid ScissorRect parameters clock -> ok color_palette -> Invalid ScissorRect parameters counter -> Invalid ScissorRect parameters custom_widget -> Invalid ScissorRect parameters download_progress -> Invalid ScissorRect parameters events -> Invalid ScissorRect parameters
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:
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?