mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 23:05:43 +00:00
Some documentation for std_pool
This commit is contained in:
parent
06e24d7767
commit
e18cd9ca5b
@ -20,6 +20,11 @@ use descriptor::descriptor_set::UnsafeDescriptorSet;
|
||||
use descriptor::descriptor_set::UnsafeDescriptorSetLayout;
|
||||
use OomError;
|
||||
|
||||
/// Standard implementation of a descriptor pool.
|
||||
///
|
||||
/// Whenever a set is allocated, this implementation will try to find a pool that has some space
|
||||
/// for it. If there is one, allocate from it. If there is none, create a new pool whose capacity
|
||||
/// is 40 sets and 40 times the requested descriptors. This number is arbitrary.
|
||||
pub struct StdDescriptorPool {
|
||||
device: Arc<Device>,
|
||||
pools: Mutex<Vec<Arc<Mutex<Pool>>>>,
|
||||
@ -41,6 +46,7 @@ impl StdDescriptorPool {
|
||||
}
|
||||
}
|
||||
|
||||
/// A descriptor set allocated from a `StdDescriptorPool`.
|
||||
pub struct StdDescriptorPoolAlloc {
|
||||
pool: Arc<Mutex<Pool>>,
|
||||
set: Option<UnsafeDescriptorSet>,
|
||||
|
Loading…
Reference in New Issue
Block a user