Skip to content

wgpu: Add x11 device detection#162

Merged
mmstick merged 4 commits intomasterfrom
wgpu-x11-fix
Jul 16, 2024
Merged

wgpu: Add x11 device detection#162
mmstick merged 4 commits intomasterfrom
wgpu-x11-fix

Conversation

@Drakulix
Copy link
Copy Markdown
Member

A bunch of fixes for our work-arounds for wgpu's non-existant/broken device selection.

We special case wayland, but we should special case x11 the same way, so e.g. pop-os 22.04. users can use cosmic-store.

Unfortunately the nvidia-xorg-driver doesn't support DRI2, DRI3 or any other way to reliably detect the device node used. So lets rely on the randr-name, which does contain an id and hasn't change ever since this feature was introduce over a decade ago...

(I also have a branch using glutin/egl for detecting the device node, but that is also broken specifically with the nvidia-xorg-driver and nothing else...)

Superseeds #157
Fixes pop-os/libcosmic#512 and pop-os/cosmic-store#73

Tested with system76-power set to hybrid and nvidia, both with DRI_PRIME=1/__NV_PRIME_RENDER_OFFLOAD=1 and no variables. All scenarios display a window with a patched cosmic-store to use this branch.

@Drakulix Drakulix requested a review from a team July 16, 2024 20:41
@mmstick mmstick merged commit cb315f6 into master Jul 16, 2024
@mmstick mmstick deleted the wgpu-x11-fix branch July 16, 2024 20:45
@mmstick
Copy link
Copy Markdown
Member

mmstick commented Jul 16, 2024

I'll push to libcosmic and our apps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cosmic-store crashing when launching - X11

2 participants