Expand description
Handles for Vulkan smart-pointer resources.
When you bind a resource to a Graph, you get back a node handle:
let buf_node: BufferNode = graph.bind_resource(my_buffer);
let img_node: ImageNode = graph.bind_resource(my_image);These handles are then passed to command-building methods like
resource_access or
shader_resource_access.
§Node kinds
| Handle | Resource type | Use case |
|---|---|---|
BufferNode | Owned Buffer | Most common |
ImageNode | Owned Image | Most common |
AccelerationStructureNode | Owned AccelerationStructure | Ray tracing |
SwapchainImageNode | SwapchainImage | Swapchain presentation |
BufferLeaseNode, ImageLeaseNode, AccelerationStructureLeaseNode | Pool-leased resource | Pool-based allocation |
AnyBufferNode, AnyImageNode, AnyAccelerationStructureNode | Any of the above | Heterogeneous collections |
For most users, BufferNode and ImageNode are all you need. The Lease and
Any* variants exist for advanced pooling and dynamic dispatch scenarios.
When borrowing resources back out of a graph with Graph::resource,
concrete node types return the exact stored handle type, while Any* node types return a
borrow of the underlying resource. For example, BufferNode yields &Arc<Buffer>, but
AnyBufferNode yields &Buffer.
Structs§
- Acceleration
Structure Lease Node - A graph-local handle for a bound resource.
- Acceleration
Structure Node - A graph-local handle for a bound resource.
- Buffer
Lease Node - A graph-local handle for a bound resource.
- Buffer
Node - A graph-local handle for a bound resource.
- Image
Lease Node - A graph-local handle for a bound resource.
- Image
Node - A graph-local handle for a bound resource.
- Swapchain
Image Node - A graph-local handle for a bound resource.
Enums§
- AnyAcceleration
Structure Node - Specifies either an owned acceleration structure or one obtained from a pool.
- AnyBuffer
Node - Specifies either an owned buffer or one obtained from a pool.
- AnyImage
Node - Specifies either an owned image or one obtained from a pool.
- AnyNode
- A type-erased graph node for any buffer, image, or acceleration structure.