pub use self::{
standard::StdDescriptorPool,
sys::{
DescriptorPoolAllocError, DescriptorSetAllocateInfo, UnsafeDescriptorPool,
UnsafeDescriptorPoolCreateInfo,
},
};
use super::{layout::DescriptorSetLayout, sys::UnsafeDescriptorSet};
use crate::{device::DeviceOwned, OomError};
pub mod standard;
mod sys;
pub unsafe trait DescriptorPool: DeviceOwned {
type Alloc: DescriptorPoolAlloc;
fn allocate(
&mut self,
layout: &DescriptorSetLayout,
variable_descriptor_count: u32,
) -> Result<Self::Alloc, OomError>;
}
pub trait DescriptorPoolAlloc: Send + Sync {
fn inner(&self) -> &UnsafeDescriptorSet;
fn inner_mut(&mut self) -> &mut UnsafeDescriptorSet;
}