Change summary
crates/gpui/src/platform/linux/platform.rs | 6 ++++--
crates/gpui/src/platform/linux/wayland/client.rs | 2 +-
crates/gpui/src/platform/linux/x11/client.rs | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
Detailed changes
@@ -1028,7 +1028,9 @@ impl crate::Capslock {
/// [`CompositorGpuHint`] that the GPU adapter selection code can use to
/// prioritize the compositor's rendering device.
#[cfg(any(feature = "wayland", feature = "x11"))]
-pub(super) fn compositor_gpu_hint_from_dev_t(dev: u64) -> Option<super::wgpu::CompositorGpuHint> {
+pub(super) fn compositor_gpu_hint_from_dev_t(
+ dev: u64,
+) -> Option<crate::platform::wgpu::CompositorGpuHint> {
fn dev_major(dev: u64) -> u32 {
((dev >> 8) & 0xfff) as u32 | (((dev >> 32) & !0xfff) as u32)
}
@@ -1058,7 +1060,7 @@ pub(super) fn compositor_gpu_hint_from_dev_t(dev: u64) -> Option<super::wgpu::Co
device_id,
);
- Some(super::wgpu::CompositorGpuHint {
+ Some(crate::platform::wgpu::CompositorGpuHint {
vendor_id,
device_id,
})
@@ -977,7 +977,7 @@ fn detect_compositor_gpu() -> Option<CompositorGpuHint> {
feedback.destroy();
dmabuf.destroy();
- super::compositor_gpu_hint_from_dev_t(state.device?)
+ super::super::compositor_gpu_hint_from_dev_t(state.device?)
}
impl Dispatch<wl_registry::WlRegistry, GlobalListContents> for WaylandClientStatePtr {
@@ -1992,7 +1992,7 @@ fn detect_compositor_gpu(
let path = format!("/proc/self/fd/{}", fd.as_raw_fd());
let metadata = std::fs::metadata(&path).ok()?;
- super::compositor_gpu_hint_from_dev_t(metadata.rdev())
+ super::super::compositor_gpu_hint_from_dev_t(metadata.rdev())
}
fn check_compositor_present(xcb_connection: &XCBConnection, root: xproto::Window) -> bool {