mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-29 02:04:37 +00:00
reverted bind_memory
This commit is contained in:
parent
b6b073c888
commit
cebabe1f63
@ -166,7 +166,7 @@ impl<F> AttachmentImage<F> {
|
||||
let mem = try!(MemoryPool::alloc(&device.standard_pool(), mem_ty,
|
||||
mem_reqs.size, mem_reqs.alignment));
|
||||
debug_assert!((mem.offset() % mem_reqs.alignment) == 0);
|
||||
unsafe { try!(image.bind_memory_raw(mem.memory(), mem.offset())); }
|
||||
unsafe { try!(image.bind_memory(mem.memory(), mem.offset())); }
|
||||
|
||||
let view = unsafe {
|
||||
try!(UnsafeImageView::raw(&image, 0 .. 1, 0 .. 1))
|
||||
|
@ -81,7 +81,7 @@ impl<F> ImmutableImage<F> {
|
||||
let mem = try!(MemoryPool::alloc(&device.standard_pool(), mem_ty,
|
||||
mem_reqs.size, mem_reqs.alignment));
|
||||
debug_assert!((mem.offset() % mem_reqs.alignment) == 0);
|
||||
unsafe { try!(image.bind_memory_raw(mem.memory(), mem.offset())); }
|
||||
unsafe { try!(image.bind_memory(mem.memory(), mem.offset())); }
|
||||
|
||||
let view = unsafe {
|
||||
try!(UnsafeImageView::raw(&image, 0 .. image.mipmap_levels(),
|
||||
|
@ -458,7 +458,7 @@ impl UnsafeImage {
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn bind_memory_raw(&self, memory: &DeviceMemory, offset: usize)
|
||||
pub unsafe fn bind_memory(&self, memory: &DeviceMemory, offset: usize)
|
||||
-> Result<(), OomError>
|
||||
{
|
||||
let vk = self.device.pointers();
|
||||
@ -478,12 +478,6 @@ impl UnsafeImage {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn bind_memory(&self, memory: &DeviceMemory, offset: usize)
|
||||
{
|
||||
self.bind_memory_raw(memory, offset).unwrap()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn format(&self) -> Format {
|
||||
self.format
|
||||
|
Loading…
Reference in New Issue
Block a user