blob: 4368557ad3297cc7c15d1b17b3e062e13bc7dedf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
use hal::pso;
use log::debug;
/// Dummy descriptor pool.
#[derive(Debug)]
pub struct DescriptorPool;
impl pso::DescriptorPool<crate::Backend> for DescriptorPool {
unsafe fn allocate_set(
&mut self,
_layout: &DescriptorSetLayout,
) -> Result<DescriptorSet, pso::AllocationError> {
Ok(DescriptorSet {
name: String::new(),
})
}
unsafe fn free<I>(&mut self, descriptor_sets: I)
where
I: IntoIterator<Item = DescriptorSet>,
{
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,
}
|