mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 21:08:18 +00:00
Implement experimental WebGPU support (#1238)
* Web gpu execution MVP Ready infrastructure for wgpu experimentation Start implementing simple gpu test case Fix Extract Node not working with nested networks Convert inputs for extracted node to network inputs Fix missing cors headers Feature gate gcore to make it once again no-std compatible Add skeleton structure gpu shader Work on gpu node graph output saving Fix Get and Set nodes Fix storage nodes Fix shader construction errors -> spirv errors Add unsafe version Add once cell node Web gpu execution MVP
This commit is contained in:
parent
4bd9fbd073
commit
0586d52f3a
33 changed files with 1080 additions and 239 deletions
|
@ -203,6 +203,7 @@ impl BorrowTree {
|
|||
let node = unsafe { node.erase_lifetime() };
|
||||
self.store_node(Arc::new(node.into()), id);
|
||||
}
|
||||
ConstructionArgs::Inline(_) => unimplemented!("Inline nodes are not supported yet"),
|
||||
ConstructionArgs::Nodes(ids) => {
|
||||
let ids: Vec<_> = ids.iter().map(|(id, _)| *id).collect();
|
||||
let construction_nodes = self.node_refs(&ids);
|
||||
|
|
|
@ -131,7 +131,7 @@ mod tests {
|
|||
0,
|
||||
DocumentNode {
|
||||
name: "id".into(),
|
||||
inputs: vec![NodeInput::Network(concrete!(u32))],
|
||||
inputs: vec![NodeInput::ShortCircut(concrete!(u32))],
|
||||
implementation: DocumentNodeImplementation::Unresolved(NodeIdentifier::new("graphene_core::ops::IdNode")),
|
||||
..Default::default()
|
||||
},
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use glam::{DAffine2, DVec2};
|
||||
|
||||
use graph_craft::document::DocumentNode;
|
||||
use graphene_core::ops::IdNode;
|
||||
use graphene_core::vector::VectorData;
|
||||
use once_cell::sync::Lazy;
|
||||
|
@ -219,7 +220,7 @@ fn node_registry() -> HashMap<NodeIdentifier, HashMap<NodeIOTypes, NodeConstruct
|
|||
|args| {
|
||||
Box::pin(async move {
|
||||
let document_node: DowncastBothNode<(), DocumentNode> = DowncastBothNode::new(args[0]);
|
||||
let document_node = ClonedNode::new(document_node.eval(()).await);
|
||||
//let document_node = ClonedNode::new(document_node.eval(()));
|
||||
let node = graphene_std::executor::MapGpuNode::new(document_node);
|
||||
let any: DynAnyNode<ImageFrame<Color>, _, _> = graphene_std::any::DynAnyNode::new(graphene_core::value::ValueNode::new(node));
|
||||
Box::pin(any) as TypeErasedPinned
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue