Closed rollschild closed 1 year ago
Okey the problem is that I did not wire Wayland up properly in glfw3webgpu, but there is an easy fix: in glfw3webgpu.c
line 47 switch the default WGPU_TARGET
to WGPU_TARGET_LINUX_WAYLAND
instead if WGPU_TARGET_LINUX_X11
.
Sorry I did not spend time looking for a way to automate this because once this is integrated in upstream GLFW I can use GLFW macros (well actually I could use them already, btu hopefully it will soon get merged to I'll do an update of all branches when that happens).
Hey @eliemichel thanks for the quick reply! However I already changed WGPU_TARGET
to WGPU_TARGET_LINUX_WAYLAND
myself because otherwise it wouldn't compile. cmake
build would give me errors. The adapter NotFound
error happens after I made the change, during runtime.
Does the adapter initialize well if you don't specify a surface? (adapterOpts.compatibleSurface = nullptr;
)
And did you mean you compiled wgpu-native yourselves in the original post? If so, which commit?
@eliemichel Hey, somehow it works now. Not sure what changed, but it's very likely because I pulled in Vulkan dependencies like I did here.
Surprisingly, when enumerating adapter features, wgpu-native
's output is tidier than dawn
. Here is the features output I got using wgpu-native
:
Adapter features:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 1610612737
- 1610612738
- 1610612739
- 1610612740
- 1610612741
and those large numbers at the bottom also differ from the 1002
s I got from dawn
. Also, there is no warning here, though I got warnings using dawn
.
Closing this issue since issue fixed. Thanks!
These large numbers are backend-specific features. They are intentionnally starting at different offsets to avoid conflict, more details here ;)
Hi,
I'm on step010. After build succeeded I ran into this error when running the executable (with my custom logging):
Basically the error is
Could NOT get WebGPU adapter: NotFound
. So it successfully initialized window, found the surface, but somehow an adapter could not be found/initialized?I'm using
wgpu-native
, built for Wayland on an Intel graphics laptop. I'm not sure whether it's my code (basically same as yours), or Wayland, orwgpu-native
, or the graphics card itself is causing this error. Any help would be greatly appreciated. Thank you!