From aded2598ae9a4d36e129db3fc4c254ce57d02885 Mon Sep 17 00:00:00 2001 From: Firestar99 Date: Mon, 30 Jun 2025 19:41:32 +0200 Subject: [PATCH 1/2] fix `BoundingBox for Raster` when `wgpu` feature is disabled --- node-graph/gcore/src/raster_types.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/node-graph/gcore/src/raster_types.rs b/node-graph/gcore/src/raster_types.rs index 4fb1fc4d52..937d89b2e0 100644 --- a/node-graph/gcore/src/raster_types.rs +++ b/node-graph/gcore/src/raster_types.rs @@ -97,11 +97,20 @@ impl Raster { let RasterStorage::Gpu(gpu) = &self.data else { unreachable!() }; gpu.clone() } +} + +impl Raster { + #[cfg(feature = "wgpu")] pub fn is_empty(&self) -> bool { let data = self.data(); data.width() == 0 || data.height() == 0 } + #[cfg(not(feature = "wgpu"))] + pub fn is_empty(&self) -> bool { + true + } } + #[cfg(feature = "wgpu")] impl Deref for Raster { type Target = wgpu::Texture; @@ -110,6 +119,7 @@ impl Deref for Raster { self.data() } } + pub type RasterDataTable = Instances>; // TODO: Make this not dupliated From 35c1c1fb9526107beccaef634d184bb4c781bbf6 Mon Sep 17 00:00:00 2001 From: Firestar99 Date: Mon, 30 Jun 2025 19:43:58 +0200 Subject: [PATCH 2/2] fix `tinyvec` crate not being `std` by default --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index faeac043e5..35c5e7040d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -150,7 +150,7 @@ petgraph = { version = "0.7.1", default-features = false, features = [ "graphmap", ] } half = { version = "2.4.1", default-features = false, features = ["bytemuck", "serde"] } -tinyvec = { version = "1" } +tinyvec = { version = "1", features = ["std"] } criterion = { version = "0.5", features = ["html_reports"] } iai-callgrind = { version = "0.12.3" } ndarray = "0.16.1"