Skip to content

Commit

Permalink
Remove winit dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
entropylost committed Aug 24, 2024
1 parent e99d3c4 commit 34d390a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions luisa_compute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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"
Expand Down
5 changes: 2 additions & 3 deletions luisa_compute/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -326,7 +325,7 @@ impl Device {
}
pub fn create_swapchain(
&self,
window: &Window,
window: impl HasWindowHandle + HasDisplayHandle,
stream: &Stream,
width: u32,
height: u32,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 34d390a

Please sign in to comment.