diff --git a/luisa_compute/Cargo.toml b/luisa_compute/Cargo.toml index b7c888c..9cb632a 100644 --- a/luisa_compute/Cargo.toml +++ b/luisa_compute/Cargo.toml @@ -16,8 +16,7 @@ parking_lot = "0.12.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -winit = "0.29.4" -raw-window-handle = "0.6.0" +raw-window-handle = "0.6.2" indexmap = "2.0.0" luisa_compute_api_types = { path = "../luisa_compute_sys/LuisaCompute/src/rust/luisa_compute_api_types", version = "0.1.1-alpha.1" } @@ -33,7 +32,7 @@ nalgebra = { version = "0.33.0", optional = true } [dev-dependencies] libc = "0.2" - +winit = "0.29.15" rand = "0.8.5" image = "0.24.5" tobj = "4.0.0" diff --git a/luisa_compute/src/runtime.rs b/luisa_compute/src/runtime.rs index 33f74e5..60b0264 100644 --- a/luisa_compute/src/runtime.rs +++ b/luisa_compute/src/runtime.rs @@ -14,7 +14,6 @@ use parking_lot::{Condvar, Mutex, RawMutex, RwLock}; use std::ffi::c_void; use raw_window_handle::{HasDisplayHandle, HasWindowHandle}; -use winit::window::Window; use crate::internal_prelude::*; use crate::lang::soa::{SoaBuffer, SoaBufferVar, SoaBufferView, SoaMetadata}; @@ -326,7 +325,7 @@ impl Device { } pub fn create_swapchain( &self, - window: &Window, + window: impl HasWindowHandle + HasDisplayHandle, stream: &Stream, width: u32, height: u32, @@ -358,7 +357,7 @@ impl Device { h.display.map(|d| d.as_ptr() as u64).unwrap_or(0) } raw_window_handle::RawDisplayHandle::Wayland(h) => h.display.as_ptr() as u64, - raw_window_handle::RawDisplayHandle::Windows(h) => 0u64, + raw_window_handle::RawDisplayHandle::Windows(_h) => 0u64, _ => todo!(), }; self.create_swapchain_raw_handle( diff --git a/luisa_compute_derive_impl/src/lib.rs b/luisa_compute_derive_impl/src/lib.rs index 3e34dbf..0bebe4f 100644 --- a/luisa_compute_derive_impl/src/lib.rs +++ b/luisa_compute_derive_impl/src/lib.rs @@ -38,7 +38,7 @@ pub struct Compiler { impl Compiler { pub fn new() -> Self { Self { - crate_path: quote!(::luisa_compute), + crate_path: quote!(luisa_compute), } } fn lang_path(&self) -> TokenStream { diff --git a/luisa_compute_track/src/lib.rs b/luisa_compute_track/src/lib.rs index c2894d9..0030ca8 100644 --- a/luisa_compute_track/src/lib.rs +++ b/luisa_compute_track/src/lib.rs @@ -420,7 +420,7 @@ pub fn tracked( let path = crate_path.path; quote!(#path) } else { - quote!(::luisa_compute) + quote!(luisa_compute) }; let item = syn::parse_macro_input!(item as ItemFn);