wgpu: Apply Nvidia driver workaround regardless of cctk feature

This commit is contained in:
Ian Douglas Scott 2026-07-06 19:07:11 -07:00 • committed by Ian Douglas Scott
parent 371dd94a2a
commit 5671e49c9b
6 changed files with 8 additions and 18 deletions

View file

@ -2,7 +2,6 @@
pub mod compositor;
#[cfg(all(
unix,
feature = "cctk",
not(target_os = "macos"),
not(target_os = "redox")
))]

View file

@ -11,7 +11,6 @@ use crate::{Engine, Renderer};
#[cfg(all(
unix,
feature = "cctk",
not(target_os = "macos"),
not(target_os = "redox")
))]
@ -67,7 +66,6 @@ impl Compositor {
) -> Result<Self, Error> {
#[cfg(all(
unix,
feature = "cctk",
not(target_os = "macos"),
not(target_os = "redox")
))]
@ -76,16 +74,6 @@ impl Compositor {
.or_else(|| get_x11_device_ids(window))
});
#[cfg(all(
unix,
not(feature = "cctk"),
not(target_os = "macos"),
not(target_os = "redox")
))]
let ids = compatible_window
.as_ref()
.and_then(|window| get_x11_device_ids(window));
// HACK:
// 1. If we specifically didn't select an nvidia gpu
// 2. and the user didn't specifically request an nvidia gpu

View file

@ -1,5 +1,5 @@
use crate::graphics::compositor::Window;
use cctk::sctk::{
use sctk::{
dmabuf::{DmabufFeedback, DmabufHandler, DmabufState},
registry::{ProvidesRegistryState, RegistryState},
registry_handlers,
@ -111,5 +111,5 @@ pub fn get_wayland_device_ids<W: Window>(window: &W) -> Option<(u16, u16)> {
}
}
cctk::sctk::delegate_dmabuf!(AppData);
cctk::sctk::delegate_registry!(AppData);
sctk::delegate_dmabuf!(AppData);
sctk::delegate_registry!(AppData);