-
Notifications
You must be signed in to change notification settings - Fork 1.1k
wgpu examples don't work under Wayland when using OpenGL backend #1787
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
Comments
According to EGL docs:
|
For what it's worth, neither OpenGL or Vulkan work for Nvidia on Wayland (with the latest drivers that have improved Wayland support), but I think that's an issue on Nvidia's side... See also the issue on glutin. Firefox runs completely fine on Wayland with Nvidia since 91 though, including Webrender and WebGL. Edit: with |
I'm running nouveau drivers, and it's the same here. Examples from Glutin repo work fine in my case. |
So the issue on proprietary Nvidia is actually unrelated as it turns out: NVIDIA/egl-wayland#34 As for the error reported here on AMD and Nouveau ("Unsupported surfacetype/colorspace") I'm able to reproduce it for Zink as well (OpenGL on Vulkan driver of Mesa), where glutin runs just fine. |
Any ideas how to tackle this? Not being able to run my own software is super annoying, so I would love to help with that, not sure where to start tho. |
Our presentation is different, but that could be a good starting point. As I'm setting up a new system, I may be able to investigate in the upcoming month. But if you can start looking into this yourself, it would be most welcome. |
@kvark Hi! This PR doesn't fix #1787 in my system with Nvidia 495.29.05 beta driver and Gnome on Wayland. I pull the latest code and run
Then I got this:
I still can't run wgpu with Nvidia driver and Wayland... |
Sorry, now I know I should let this example use wgpu's latest code, not 0.11.0. |
What you are seeing is not Wayland-related, it's this line in the log:
Thus, it would be great if you could try an experiment. Change this check to |
@kvark I changed the check then tested. It seems wgpu could find a suitable GPU adapter but there are other errors happening:
It seems that it can't create a window. When I change |
maybe... it seems that our code that prevents you from requesting that adapter is doing the right thing, after all. |
The wayland fix is included in wgpu-hal-0.11.3 |
@kvark I could run alacritty on my OS, which relies on winit but no wgpu. But its performance is very poor... Maybe it's nvidia 495.29.05's fault. And I pulled the latest code of winit, run the examples. They can run without printing errors, but I couldn't find their windows on the screen. Meanwhile, the example application's icons are on the desktop dock. Maybe winit thinks it has created the window but in fact it didn't? This also explains why I got "EGL_BAD_NATIVE_WINDOW" errors before. About the code
After changing it to But I still can't run wgpu with Nvidia and Wayland... I'm not able to understand wgpu's codebase now but I'm eager to help you solve this problem:cry: |
That's quite sad. Thank you for investigating so far! |
I can confirm that for nouveau it's fixed, there is something wrong with resize events but that's probably unrelated I will check winit for that. The rendering itself runs really well |
Thanks! |
@kvark Then changes should be made by wgpu or NVidia driver in order to make them work together? |
@VitalyAnkh I have this machine (Linux with Intel + NV GPUs), and I tried to fix this on our side with no success. What we do here is legal, and it works outside of NV proprietary driver... Therefore, best we can do is file a bug to NVidia, assuming they still care about GLES running on Linux. |
@kvark Thanks! Since NVidia seems to be more friendly about Wayland, I will try reporting this and see if something good will happen... |
Description
As title. They work under X11. This occurred both pre- and post- wgpu-hal.
Repro steps
WGPU_BACKEND=gl cargo run --example cube
Observed behavior
wgpu master, on Wayland:
wgpu master, on X11:
wgpu v0.9 branch, on Wayland:
Platform
Manjaro Linux, Plasma desktop environment, R5 340 GPU
The text was updated successfully, but these errors were encountered: