mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 20:08:12 +08:00
Restore functionality of GPU infrastructure (#1797)
* Update gpu nodes to compile again Restructure `gpu-executor` and `wgpu-executor` And libssl to nix shell Fix graphene-cli and add half percision color format Fix texture scaling Remove vulkan executor Fix compile errors Improve execution request deduplication * Fix warnings * Fix graph compile issues * Code review * Remove test file * Fix lint * Wip make node futures send * Make futures Send on non wasm targets * Fix warnings * Fix nested use of block_on --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
59a943f42f
commit
212f08c6c8
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "bezier-rs"
|
||||
version = "0.4.0"
|
||||
rust-version = "1.70.0"
|
||||
rust-version = "1.79"
|
||||
edition = "2021"
|
||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||
description = "Computational geometry algorithms for Bézier segments and shapes useful in the context of 2D graphics"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "dyn-any"
|
||||
version = "0.3.1"
|
||||
rust-version = "1.70.0"
|
||||
rust-version = "1.79"
|
||||
edition = "2021"
|
||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||
description = "An Any trait that works for arbitrary lifetimes"
|
||||
|
||||
@@ -199,9 +199,15 @@ unsafe impl StaticType for dyn for<'i> DynAny<'_> + '_ {
|
||||
unsafe impl StaticType for dyn for<'i> DynAny<'_> + Send + Sync + '_ {
|
||||
type Static = dyn DynAny<'static> + Send + Sync;
|
||||
}
|
||||
unsafe impl StaticType for dyn for<'i> DynAny<'_> + Send + '_ {
|
||||
type Static = dyn DynAny<'static> + Sync;
|
||||
}
|
||||
unsafe impl<T: StaticTypeSized> StaticType for dyn core::future::Future<Output = T> + Send + Sync + '_ {
|
||||
type Static = dyn core::future::Future<Output = T::Static> + Send + Sync;
|
||||
}
|
||||
unsafe impl<T: StaticTypeSized> StaticType for dyn core::future::Future<Output = T> + Send + '_ {
|
||||
type Static = dyn core::future::Future<Output = T::Static> + Send;
|
||||
}
|
||||
unsafe impl<T: StaticTypeSized> StaticType for dyn core::future::Future<Output = T> + '_ {
|
||||
type Static = dyn core::future::Future<Output = T::Static>;
|
||||
}
|
||||
@@ -332,3 +338,32 @@ fn simple_downcast_panic() {
|
||||
let x = Box::new(3_i32) as Box<dyn DynAny>;
|
||||
assert_eq!(*downcast::<u32>(x).expect("attempted to perform invalid downcast"), 3_u32);
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub trait WasmNotSend: Send {}
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub trait WasmNotSend {}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
impl<T: Send> WasmNotSend for T {}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
impl<T> WasmNotSend for T {}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub trait WasmNotSync: Sync {}
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub trait WasmNotSync {}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
impl<T: Sync> WasmNotSync for T {}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
impl<T> WasmNotSync for T {}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(feature = "alloc")]
|
||||
pub type DynFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n + Send>>;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(feature = "alloc")]
|
||||
pub type DynFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n>>;
|
||||
|
||||
Reference in New Issue
Block a user