From e99d3c44766d80c17280d9a1c1e249653ab4549d Mon Sep 17 00:00:00 2001 From: ReversedGravity Date: Sat, 24 Aug 2024 11:41:48 -0700 Subject: [PATCH 1/3] Bump winit. --- luisa_compute/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luisa_compute/Cargo.toml b/luisa_compute/Cargo.toml index b7c888c..498e71b 100644 --- a/luisa_compute/Cargo.toml +++ b/luisa_compute/Cargo.toml @@ -16,7 +16,7 @@ parking_lot = "0.12.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -winit = "0.29.4" +winit = "0.30.5" raw-window-handle = "0.6.0" indexmap = "2.0.0" From 34d390ae8eb65118b73256d0eeb8ac6f9c94b578 Mon Sep 17 00:00:00 2001 From: ReversedGravity Date: Sat, 24 Aug 2024 11:49:30 -0700 Subject: [PATCH 2/3] Remove winit dependency. --- luisa_compute/Cargo.toml | 5 ++--- luisa_compute/src/runtime.rs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/luisa_compute/Cargo.toml b/luisa_compute/Cargo.toml index 498e71b..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.30.5" -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( From 6a14f5c25840922fff973cea36a8e871a1c352b7 Mon Sep 17 00:00:00 2001 From: ReversedGravity Date: Sat, 24 Aug 2024 12:23:11 -0700 Subject: [PATCH 3/3] Relax luisa_compute crate requirement due to reexports. --- luisa_compute_derive_impl/src/lib.rs | 2 +- luisa_compute_track/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);