Phobos
Phobos is a fast, powerful Vulkan abstraction library. It provides abstractions to automatically manage common Vulkan problems like synchronization and resource management. At the same time, it aims to expose the full Vulkan API without major limitations.
At the moment, the project is highly WIP, and not all these goals have been fully achieved yet. It is developed together with a rendering engine using it, so features are currently added as needed.
The abstraction level of Phobos sits a bit above Vulkano. While the full API is exposed, Phobos provides many powerful quality-of-life features sitting on top of it (see below) that Vulkano does not implement. If you are simply looking for a safe, low-level wrapper around Vulkan, Vulkano is the better choice.
What does Phobos do?
- All Vulkan initialization from a single configuration structure.
- Manage per-frame synchronization with the presentation engine.
- GPU futures, fully integrated with Rust futures.
- More formally,
Future<Output = T>
is implemented forphobos::Fence<T>
.
- More formally,
- Provide a task graph that can be used to automatically synchronize resources in your renderer.
- Automatic image layout transitions.
- Automatic renderpass declarations.
- Automatic memory barriers for buffers.
- Virtual resources, meaning actual resources are only bound to a graph at record time. This allows general-purpose graphs to be re-used if desired.
- Safe wrappers for Vulkan objects.
- Descriptor sets are completely hidden. Simply bind resources directly to the command buffer.
- Automatic pipeline management.
- Shader reflection to automatically generate pipeline layouts.
- Automatic double buffering of resources that need it.
- A linear allocator for per-frame allocations like uniform buffers.
- Typed command buffers per queue type.
- Automatically thread safe command buffer recording.
- Easily batch together submits into one
vkQueueSubmit
call and synchronize them with semaphores using theSubmitBatch
utility. - Automatically create a shader binding table for your ray tracing pipeline.
What does Phobos not do?
Phobos is not a renderer, it does not implement any visual features. It's intended as a library to help you write a Vulkan renderer more easily and correctly, without hiding important API details.
Example
For more elaborate examples, please check the examples folder.
use *;
Support
Visit the docs.rs page, or open an issue.
Planned features
- Expose more Vulkan API features.