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

Vulkan backend in renderdoc with wayland #3889

Open
nical opened this issue Jun 25, 2023 · 2 comments
Open

Vulkan backend in renderdoc with wayland #3889

nical opened this issue Jun 25, 2023 · 2 comments
Labels
api: vulkan Issues with Vulkan platform: wayland Issues with integration with linux/wayland type: bug Something isn't working

Comments

@nical
Copy link
Contributor

nical commented Jun 25, 2023

Description

The vulkan backend fails to initialize in renderdoc on wayland.

I am not sure where the responsibility lie between wgpu, winit and renderdoc. I'll document what I know here for future reference because I periodically forget and re-investigate the issue:

I wonder whether when we get to create_surface_from_wayland it is still possible initialize the surface via another method or whether the presence of the extension should be checked earlier. Ideally wgpu applications would work in renderdoc with wayland without having to know about forcing the X11 backend.

Workaround

As far as local testing goes, using winit's x11 backend seems to be a sufficient workaround (set the WINIT_UNIX_BACKEND environment variable to "x11").

Repro steps

Run any of this repository's examples in renderdoc with the WGPU_BACKEND environment variable set to "vulkan" under wayland.

Platform

Linux with wayland

@cwfitzgerald
Copy link
Member

I'm not really sure what a good option we have. By the time we have the wayland pointer, the window has already been made by winit.

We might be able to expose "Linux window system support" on an adapter, but winit has no way to decide programmatically but via an env var. This also feels very specific to this exact situation.

Maybe the best option is an error message that suggests the workaround (if renderdoc is found injected).

@nical
Copy link
Contributor Author

nical commented Jun 26, 2023

Maybe the best option is an error message that suggests the workaround (if renderdoc is found injected).

That sounds very reasonable. I don´t know if we can easily know that renderdoc was injected but we can at least see that VK_KHR_xlib_surface is present and suggest starting the app in "x11 mode" and link back to a wiki page or this issue with specific instructions about winit (which is presubmably what most people use to create the window).

@teoxoy teoxoy added type: bug Something isn't working api: vulkan Issues with Vulkan platform: wayland Issues with integration with linux/wayland labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vulkan Issues with Vulkan platform: wayland Issues with integration with linux/wayland type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants