Struct ccthw::graphics::vulkan_api::raii::DescriptorPool
source · pub struct DescriptorPool { /* private fields */ }
Expand description
RAII Vulkan DescriptorPool.
Implementations§
source§impl DescriptorPool
impl DescriptorPool
sourcepub unsafe fn new(
render_device: Arc<RenderDevice>,
create_info: &DescriptorPoolCreateInfo
) -> Result<Self, GraphicsError>
pub unsafe fn new( render_device: Arc<RenderDevice>, create_info: &DescriptorPoolCreateInfo ) -> Result<Self, GraphicsError>
Create a new Vulkan descriptor pool.
Safety
Unsafe because:
- command pools must be destroyed before the Vulkan device is dropped.
sourcepub unsafe fn new_with_sizes(
render_device: Arc<RenderDevice>,
max_sets: u32,
pool_sizes: &[DescriptorPoolSize]
) -> Result<Self, GraphicsError>
pub unsafe fn new_with_sizes( render_device: Arc<RenderDevice>, max_sets: u32, pool_sizes: &[DescriptorPoolSize] ) -> Result<Self, GraphicsError>
Create a new Vulkan descriptor pool using the max_sets and pool_sizes.
Safety
Unsafe because:
- command pools must be destroyed before the Vulkan device is dropped.
sourcepub fn set_debug_name(&self, name: impl Into<String>)
pub fn set_debug_name(&self, name: impl Into<String>)
Set the name which shows up in Vulkan debug logs for this resource.
sourcepub fn descriptor_set(&self, index: usize) -> DescriptorSet
pub fn descriptor_set(&self, index: usize) -> DescriptorSet
Get the n’th descriptor set owned by this pool.
Note: The descriptor pool destroys all allocated sets when it is dropped. The caller must ensure that no descriptor sets are kept around after the pool is dropped.
sourcepub fn allocate_descriptor_sets(
&mut self,
layouts: &[&DescriptorSetLayout]
) -> Result<usize, GraphicsError>
pub fn allocate_descriptor_sets( &mut self, layouts: &[&DescriptorSetLayout] ) -> Result<usize, GraphicsError>
Allocate descriptor sets from this pool.
Returns
Returns the index of the first newly allocated descriptor set.
sourcepub fn raw(&self) -> DescriptorPool
pub fn raw(&self) -> DescriptorPool
Get the raw Vulkan command pool handle.
Trait Implementations§
source§impl Debug for DescriptorPool
impl Debug for DescriptorPool
Auto Trait Implementations§
impl RefUnwindSafe for DescriptorPool
impl !Send for DescriptorPool
impl !Sync for DescriptorPool
impl Unpin for DescriptorPool
impl UnwindSafe for DescriptorPool
Blanket Implementations§
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.