use hal::pso; use log::debug; /// Dummy descriptor pool. #[derive(Debug)] pub struct DescriptorPool; impl pso::DescriptorPool for DescriptorPool { unsafe fn allocate_set( &mut self, _layout: &DescriptorSetLayout, ) -> Result { Ok(DescriptorSet { name: String::new(), }) } unsafe fn free(&mut self, descriptor_sets: I) where I: IntoIterator, { for _ in descriptor_sets { // Let the descriptor set drop } } unsafe fn reset(&mut self) { debug!("Resetting descriptor pool"); } } #[derive(Debug)] pub struct DescriptorSetLayout { /// User-defined name for this descriptor set layout pub(crate) name: String, } #[derive(Debug)] pub struct DescriptorSet { /// User-defined name for this descriptor set pub(crate) name: String, }