mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 14:56:42 +00:00
commit
451fb9c70f
@ -122,11 +122,9 @@ impl<T> CpuAccessibleBuffer<T> {
|
||||
-> Result<Arc<CpuAccessibleBuffer<T>>, OomError>
|
||||
where I: IntoIterator<Item = QueueFamily<'a>>
|
||||
{
|
||||
unsafe {
|
||||
CpuAccessibleBuffer::raw(device, mem::size_of::<T>(), usage, queue_families)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> CpuAccessibleBuffer<[T]> {
|
||||
/// Builds a new buffer that contains an array `T`. The initial data comes from an iterator
|
||||
@ -178,11 +176,9 @@ impl<T> CpuAccessibleBuffer<[T]> {
|
||||
-> Result<Arc<CpuAccessibleBuffer<[T]>>, OomError>
|
||||
where I: IntoIterator<Item = QueueFamily<'a>>
|
||||
{
|
||||
unsafe {
|
||||
CpuAccessibleBuffer::raw(device, len * mem::size_of::<T>(), usage, queue_families)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ?Sized> CpuAccessibleBuffer<T> {
|
||||
/// Builds a new buffer without checking the size.
|
||||
|
@ -10,13 +10,10 @@
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::MutexGuard;
|
||||
|
||||
use device::Device;
|
||||
use OomError;
|
||||
use Success;
|
||||
use SynchronizedVulkanObject;
|
||||
use VulkanObject;
|
||||
use VulkanPointers;
|
||||
use check_errors;
|
||||
|
Loading…
Reference in New Issue
Block a user