Add license information for node_graph crates

This commit is contained in:
Dennis
2022-08-04 11:47:38 +02:00
committed by Keavon Chambers
parent 0c2dbd411b
commit 78f07439db
10 changed files with 29 additions and 2504 deletions

22
node-graph/gstd/file.rs Normal file
View File

@@ -0,0 +1,22 @@
# [cfg (target_arch = "spirv")]pub mod gpu {
# [repr (C )]pub struct PushConsts {
n : u32 , node : u32 ,
}
use super :: * ;
use spirv_std :: glam :: UVec3 ;
# [allow (unused )]# [spirv (compute (threads (64)))]pub fn "add"(# [spirv (global_invocation_id )]global_id : UVec3 , # [spirv (storage_buffer , descriptor_set = 0, binding = 0)]a : & [u32 ], # [spirv (storage_buffer , descriptor_set = 0, binding = 1)]y : & mut [u32 ], # [spirv (push_constant )]push_consts : & PushConsts , ){
fn node_graph (input : u32 )-> u32 {
let n0 = graphene_core :: value :: ValueNode :: new (input );
let n1 = graphene_core :: value :: ValueNode :: new (1u32);
let n2 = graphene_core :: ops :: AddNode :: new ((& n0 , & n1 ));
n2 . eval ()
}
let gid = global_id . x as usize ;
if global_id . x < push_consts . n {
y [gid ]= node_graph (a [gid ]);
}
}
}