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

vk: include Wayland in the Nvidia-Intel workaround #97

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

kvark
Copy link
Owner

@kvark kvark commented Mar 18, 2024

Follow-up to #95, cc @flukejones

@kvark
Copy link
Owner Author

kvark commented Mar 18, 2024

@davidbuzz has confirmed that this PR picks Nvidia on their machine. Merging.

@kvark kvark merged commit 61cbd6b into main Mar 18, 2024
5 checks passed
@kvark kvark deleted the intel-followup branch March 18, 2024 05:42
//Note: this is somewhat broad across X11/Wayland and different drivers.
// It could be narrower, but at the end of the day if the user forced Prime
// for GLX it should be safe to assume they want it for Vulkan as well.
intel_unable_to_present: is_nvidia_prime_forced(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only applies to Xorg. Wayland completely ignores this, but using it as an indication of desired behaviour may work here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general expected behaviour of desktop applications is that they default to igpu unless one of

PrefersNonDefaultGPU=false
X-KDE-RunOnDiscreteGpu=false

is set in the application.desktop file, or some desktops provide a method to offload with right-click menu.

However when it comes to games, typically vulkan defaults to dgpu. While opengl requires intervention.

mikayla-maki added a commit to zed-industries/zed that referenced this pull request Apr 10, 2024
Release Notes:
- N/A

Picks up kvark/blade#105,
kvark/blade#97, and more

Switches the presentation to be non-blocking, which will improve the
latency slightly.

Allows to start playing with GLES backend, e.g.
```bash
cd crates/gpui
RUSTFLAGS="--cfg gles" CARGO_TARGET_DIR=./target-gl cargo run --example hello_world
```

It doesn't currently render properly due to an issue that needs
investigation, see
kvark/blade#105 (comment)
But at least it's a start

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
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.

2 participants