Skip to content

Commit

Permalink
vk: include Wayland in the Nvidia-Intel workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Mar 18, 2024
1 parent 94ed644 commit 3918159
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blade-graphics/src/vulkan/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct AdapterCapabilities {
shader_info: bool,
}

#[derive(Debug)]
struct SystemBugs {
/// https://gitlab.freedesktop.org/mesa/mesa/-/issues/4688
intel_unable_to_present_on_xorg: bool,
Expand Down Expand Up @@ -341,14 +342,13 @@ impl super::Context {
entry.create_instance(&create_info, None).unwrap()
};

let is_xorg = match surface_handles {
Some((_, raw_window_handle::RawDisplayHandle::Xlib(_))) => true,
Some((_, raw_window_handle::RawDisplayHandle::Xcb(_))) => true,
_ => false,
};
let bugs = SystemBugs {
intel_unable_to_present_on_xorg: is_xorg && is_nvidia_prime_forced(),
//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(),

Check failure on line 349 in blade-graphics/src/vulkan/init.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

struct `SystemBugs` has no field named `intel_unable_to_present`
};
log::debug!("Bugs {:#?}", bugs);

let vk_surface = surface_handles.map(|(rwh, rdh)| {
ash_window::create_surface(&entry, &core_instance, rdh, rwh, None).unwrap()
Expand Down

0 comments on commit 3918159

Please sign in to comment.