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 e747f12
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions blade-graphics/src/vulkan/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,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 348 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);

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

View workflow job for this annotation

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

`SystemBugs` doesn't implement `std::fmt::Debug`

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 e747f12

Please sign in to comment.