@@ -6,6 +6,8 @@ use crate::messages::portfolio::utility_types::PersistentData;
6
6
use crate :: messages:: prelude:: Message ;
7
7
use crate :: node_graph_executor:: NodeGraphExecutor ;
8
8
9
+ #[ cfg( feature = "gpu" ) ]
10
+ use gpu_executor:: * ;
9
11
use graph_craft:: concrete;
10
12
use graph_craft:: document:: value:: * ;
11
13
use graph_craft:: document:: * ;
@@ -23,7 +25,7 @@ use graphene_core::*;
23
25
use graphene_std:: application_io:: RenderConfig ;
24
26
use graphene_std:: wasm_application_io:: WasmEditorApi ;
25
27
#[ cfg( feature = "gpu" ) ]
26
- use { gpu_executor :: * , graphene_core :: application_io :: SurfaceHandle , wgpu_executor :: WgpuExecutor } ;
28
+ use wgpu_executor :: { Bindgroup , CommandBuffer , PipelineLayout , ShaderHandle , ShaderInputFrame , WgpuShaderInput } ;
27
29
28
30
use once_cell:: sync:: Lazy ;
29
31
use std:: collections:: VecDeque ;
@@ -994,7 +996,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
994
996
DocumentNode {
995
997
name: "Create Uniform" . to_string( ) ,
996
998
inputs: vec![ NodeInput :: network( generic!( T ) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
997
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::UniformNode<_>" ) ) ,
999
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::UniformNode<_>" ) ) ,
998
1000
..Default :: default ( )
999
1001
} ,
1000
1002
DocumentNode {
@@ -1038,7 +1040,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1038
1040
DocumentNode {
1039
1041
name: "Create Storage" . to_string( ) ,
1040
1042
inputs: vec![ NodeInput :: network( concrete!( Vec <u8 >) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
1041
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::StorageNode<_>" ) ) ,
1043
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::StorageNode<_>" ) ) ,
1042
1044
..Default :: default ( )
1043
1045
} ,
1044
1046
DocumentNode {
@@ -1082,7 +1084,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1082
1084
DocumentNode {
1083
1085
name: "Create Output Buffer" . to_string( ) ,
1084
1086
inputs: vec![ NodeInput :: network( concrete!( usize ) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) , NodeInput :: network( concrete!( Type ) , 1 ) ] ,
1085
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::CreateOutputBufferNode<_, _>" ) ) ,
1087
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::CreateOutputBufferNode<_, _>" ) ) ,
1086
1088
..Default :: default ( )
1087
1089
} ,
1088
1090
DocumentNode {
@@ -1134,12 +1136,12 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1134
1136
DocumentNode {
1135
1137
name: "Create Compute Pass" . to_string( ) ,
1136
1138
inputs: vec![
1137
- NodeInput :: network( concrete!( gpu_executor :: PipelineLayout < WgpuExecutor > ) , 0 ) ,
1139
+ NodeInput :: network( concrete!( PipelineLayout ) , 0 ) ,
1138
1140
NodeInput :: node( NodeId ( 0 ) , 0 ) ,
1139
- NodeInput :: network( concrete!( ShaderInput < WgpuExecutor > ) , 2 ) ,
1141
+ NodeInput :: network( concrete!( WgpuShaderInput ) , 2 ) ,
1140
1142
NodeInput :: network( concrete!( gpu_executor:: ComputePassDimensions ) , 3 ) ,
1141
1143
] ,
1142
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::CreateComputePassNode<_, _, _>" ) ) ,
1144
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::CreateComputePassNode<_, _, _>" ) ) ,
1143
1145
..Default :: default ( )
1144
1146
} ,
1145
1147
DocumentNode {
@@ -1160,12 +1162,12 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1160
1162
DocumentInputType {
1161
1163
name: "In" ,
1162
1164
data_type: FrontendGraphDataType :: General ,
1163
- default : NodeInput :: network( concrete!( gpu_executor :: PipelineLayout < WgpuExecutor > ) , 0 ) ,
1165
+ default : NodeInput :: network( concrete!( PipelineLayout ) , 0 ) ,
1164
1166
} ,
1165
1167
DocumentInputType {
1166
1168
name: "In" ,
1167
1169
data_type: FrontendGraphDataType :: General ,
1168
- default : NodeInput :: network( concrete!( ShaderInput < WgpuExecutor > ) , 2 ) ,
1170
+ default : NodeInput :: network( concrete!( WgpuShaderInput ) , 2 ) ,
1169
1171
} ,
1170
1172
DocumentInputType {
1171
1173
name: "In" ,
@@ -1184,12 +1186,12 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1184
1186
DocumentNodeDefinition {
1185
1187
name: "CreatePipelineLayout" ,
1186
1188
category: "Gpu" ,
1187
- implementation: DocumentNodeImplementation :: proto( "gpu_executor ::CreatePipelineLayoutNode<_, _, _, _>" ) ,
1189
+ implementation: DocumentNodeImplementation :: proto( "wgpu_executor ::CreatePipelineLayoutNode<_, _, _>" ) ,
1188
1190
inputs: vec![
1189
1191
DocumentInputType {
1190
1192
name: "ShaderHandle" ,
1191
1193
data_type: FrontendGraphDataType :: General ,
1192
- default : NodeInput :: network( concrete!( < WgpuExecutor as GpuExecutor > :: ShaderHandle ) , 0 ) ,
1194
+ default : NodeInput :: network( concrete!( ShaderHandle ) , 0 ) ,
1193
1195
} ,
1194
1196
DocumentInputType {
1195
1197
name: "String" ,
@@ -1199,12 +1201,12 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1199
1201
DocumentInputType {
1200
1202
name: "Bindgroup" ,
1201
1203
data_type: FrontendGraphDataType :: General ,
1202
- default : NodeInput :: network( concrete!( gpu_executor :: Bindgroup < WgpuExecutor > ) , 2 ) ,
1204
+ default : NodeInput :: network( concrete!( Bindgroup ) , 2 ) ,
1203
1205
} ,
1204
1206
DocumentInputType {
1205
1207
name: "ArcShaderInput" ,
1206
1208
data_type: FrontendGraphDataType :: General ,
1207
- default : NodeInput :: network( concrete!( Arc <ShaderInput < WgpuExecutor > >) , 3 ) ,
1209
+ default : NodeInput :: network( concrete!( Arc <WgpuShaderInput >) , 3 ) ,
1208
1210
} ,
1209
1211
] ,
1210
1212
outputs: vec![ DocumentOutputType {
@@ -1229,8 +1231,8 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1229
1231
} ,
1230
1232
DocumentNode {
1231
1233
name: "Execute Compute Pipeline" . to_string( ) ,
1232
- inputs: vec![ NodeInput :: network( concrete!( < WgpuExecutor as GpuExecutor > :: CommandBuffer ) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
1233
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::ExecuteComputePipelineNode<_>" ) ) ,
1234
+ inputs: vec![ NodeInput :: network( concrete!( CommandBuffer ) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
1235
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::ExecuteComputePipelineNode<_>" ) ) ,
1234
1236
..Default :: default ( )
1235
1237
} ,
1236
1238
DocumentNode {
@@ -1273,8 +1275,8 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1273
1275
} ,
1274
1276
DocumentNode {
1275
1277
name: "Read Output Buffer" . to_string( ) ,
1276
- inputs: vec![ NodeInput :: network( concrete!( Arc <ShaderInput < WgpuExecutor > >) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
1277
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::ReadOutputBufferNode<_, _>" ) ) ,
1278
+ inputs: vec![ NodeInput :: network( concrete!( Arc <WgpuShaderInput >) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
1279
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::ReadOutputBufferNode<_, _>" ) ) ,
1278
1280
..Default :: default ( )
1279
1281
} ,
1280
1282
DocumentNode {
@@ -1312,7 +1314,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1312
1314
DocumentNode {
1313
1315
name: "Create Gpu Surface" . to_string( ) ,
1314
1316
inputs: vec![ NodeInput :: scope( "editor-api" ) ] ,
1315
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::CreateGpuSurfaceNode" ) ) ,
1317
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::CreateGpuSurfaceNode" ) ) ,
1316
1318
..Default :: default ( )
1317
1319
} ,
1318
1320
DocumentNode {
@@ -1350,12 +1352,13 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1350
1352
} ,
1351
1353
DocumentNode {
1352
1354
name: "Render Texture" . to_string( ) ,
1355
+ manual_composition: Some ( concrete!( Footprint ) ) ,
1353
1356
inputs: vec![
1354
- NodeInput :: network( concrete!( ShaderInputFrame < WgpuExecutor > ) , 0 ) ,
1355
- NodeInput :: network( concrete!( Arc <SurfaceHandle << WgpuExecutor as GpuExecutor > :: Surface < ' _>>> ) , 0 ) ,
1357
+ NodeInput :: network( concrete!( ShaderInputFrame ) , 0 ) ,
1358
+ NodeInput :: network( concrete!( Arc <wgpu_executor :: Surface > ) , 1 ) ,
1356
1359
NodeInput :: node( NodeId ( 0 ) , 0 ) ,
1357
1360
] ,
1358
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::RenderTextureNode<_, _>" ) ) ,
1361
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::RenderTextureNode<_, _, _>" ) ) ,
1359
1362
..Default :: default ( )
1360
1363
} ,
1361
1364
]
@@ -1399,14 +1402,14 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1399
1402
DocumentNode {
1400
1403
name: "Upload Texture" . to_string( ) ,
1401
1404
inputs: vec![ NodeInput :: network( concrete!( ImageFrame <Color >) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
1402
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "gpu_executor ::UploadTextureNode<_>" ) ) ,
1405
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor ::UploadTextureNode<_>" ) ) ,
1403
1406
..Default :: default ( )
1404
1407
} ,
1405
1408
DocumentNode {
1406
1409
name: "Cache" . to_string( ) ,
1407
1410
manual_composition: Some ( concrete!( ( ) ) ) ,
1408
1411
inputs: vec![ NodeInput :: node( NodeId ( 1 ) , 0 ) ] ,
1409
- implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "graphene_core::memo::MemoNode< _, _>" ) ) ,
1412
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "graphene_core::memo::ImpureMemoNode<_, _, _>" ) ) ,
1410
1413
..Default :: default ( )
1411
1414
} ,
1412
1415
]
0 commit comments