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 descriptor sets
from and optimizes for a specific layout which must not have a variable descriptor count. If
you need a variable descriptor count see SingleLayoutVariableDescSetPool
. For a more general
purpose pool see StandardDescriptorPool
.
Implementations
sourceimpl SingleLayoutDescSetPool
impl SingleLayoutDescSetPool
sourcepub fn new(layout: Arc<DescriptorSetLayout>) -> Result<Self, OomError>
pub fn new(layout: Arc<DescriptorSetLayout>) -> Result<Self, OomError>
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.
Trait Implementations
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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