pub struct SingleLayoutDescSetPool { /* private fields */ }
Expand description
SingleLayoutDescSetPool
is a convenience wrapper provided by Vulkano not to be confused with
VkDescriptorPool
. Its function is to provide access to pool(s) to allocate DescriptorSet
’s
from and optimizes for a specific layout. For a more general purpose pool see descriptor_set::pool::StdDescriptorPool
.
Implementations
sourceimpl SingleLayoutDescSetPool
impl SingleLayoutDescSetPool
sourcepub fn new(layout: Arc<DescriptorSetLayout>) -> Self
pub fn new(layout: Arc<DescriptorSetLayout>) -> Self
Initializes a new pool. The pool is configured to allocate sets that corresponds to the parameters passed to this function.
Panics
- Panics if the provided
layout
is for push descriptors rather than regular descriptor sets. - Panics if the provided
layout
has a binding with a variable descriptor count.
sourcepub fn next(
&mut self,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<SingleLayoutDescSet>, DescriptorSetCreationError>
pub fn next(
&mut self,
descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>
) -> Result<Arc<SingleLayoutDescSet>, DescriptorSetCreationError>
Returns a new descriptor set, either by creating a new one or returning an existing one from the internal reserve.
Auto Trait Implementations
impl RefUnwindSafe for SingleLayoutDescSetPool
impl Send for SingleLayoutDescSetPool
impl Sync for SingleLayoutDescSetPool
impl Unpin for SingleLayoutDescSetPool
impl UnwindSafe for SingleLayoutDescSetPool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more