reverted bind_memory

This commit is contained in:
Georg Echterling 2016-04-15 15:25:14 +02:00
parent b6b073c888
commit cebabe1f63
3 changed files with 3 additions and 9 deletions

View File

@ -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))

View File

@ -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(),

View File

@ -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