Memory allocator impl (#2289)

* Make the impl of Arc for MemoryAllocator more generic

* Make the impl of Arc for CommandBufferAllocator more generic

* Make the impl of Arc for DescriptorSetAllocator more generic
This commit is contained in:
vE5li 2023-08-16 11:52:59 +02:00 committed by GitHub
parent e9081db64e
commit 54d20c0378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -276,12 +276,12 @@ unsafe impl CommandBufferAllocator for StandardCommandBufferAllocator {
}
}
unsafe impl CommandBufferAllocator for Arc<StandardCommandBufferAllocator> {
type Iter = IntoIter<[StandardCommandBufferBuilderAlloc; 1]>;
unsafe impl<T: CommandBufferAllocator> CommandBufferAllocator for Arc<T> {
type Iter = T::Iter;
type Builder = StandardCommandBufferBuilderAlloc;
type Builder = T::Builder;
type Alloc = StandardCommandBufferAlloc;
type Alloc = T::Alloc;
#[inline]
fn allocate(

View File

@ -189,8 +189,8 @@ unsafe impl DescriptorSetAllocator for StandardDescriptorSetAllocator {
}
}
unsafe impl DescriptorSetAllocator for Arc<StandardDescriptorSetAllocator> {
type Alloc = StandardDescriptorSetAlloc;
unsafe impl<T: DescriptorSetAllocator> DescriptorSetAllocator for Arc<T> {
type Alloc = T::Alloc;
#[inline]
fn allocate(

View File

@ -1566,7 +1566,7 @@ unsafe impl<S: Suballocator> MemoryAllocator for GenericMemoryAllocator<S> {
}
}
unsafe impl<S: Suballocator> MemoryAllocator for Arc<GenericMemoryAllocator<S>> {
unsafe impl<T: MemoryAllocator> MemoryAllocator for Arc<T> {
fn find_memory_type_index(
&self,
memory_type_bits: u32,