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

wgpu: Add x11 device detection #162

Merged
merged 4 commits into from
Jul 16, 2024
Merged

wgpu: Add x11 device detection #162

merged 4 commits into from
Jul 16, 2024

Conversation

Drakulix
Copy link
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
8 of 26 checks passed
@mmstick mmstick deleted the wgpu-x11-fix branch July 16, 2024 20:45
@mmstick
Copy link
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