diff options
Diffstat (limited to 'stockton-skeleton/src/buffers')
-rw-r--r-- | stockton-skeleton/src/buffers/image.rs | 4 | ||||
-rw-r--r-- | stockton-skeleton/src/buffers/staging.rs | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/stockton-skeleton/src/buffers/image.rs b/stockton-skeleton/src/buffers/image.rs index 34a0a37..4278585 100644 --- a/stockton-skeleton/src/buffers/image.rs +++ b/stockton-skeleton/src/buffers/image.rs @@ -116,7 +116,7 @@ impl<P: MemoryPool> BoundImageView<P> { // Allocate memory let (mem, _) = pool - .alloc(&device, requirements.size, requirements.alignment) + .alloc(device, requirements.size, requirements.alignment) .context("Error allocating memory")?; // Bind memory @@ -169,7 +169,7 @@ impl<P: MemoryPool> BoundImageView<P> { unsafe { device.destroy_image_view(read(&*self.img_view)); device.destroy_image(read(&*self.img)); - pool.free(&device, read(&*self.mem)); + pool.free(device, read(&*self.mem)); } } diff --git a/stockton-skeleton/src/buffers/staging.rs b/stockton-skeleton/src/buffers/staging.rs index 5c80f51..44d0c2d 100644 --- a/stockton-skeleton/src/buffers/staging.rs +++ b/stockton-skeleton/src/buffers/staging.rs @@ -61,15 +61,11 @@ where /// Map the given range to CPU-visible memory, returning a pointer to the start of that range. /// inner_range is local to this block of memory, not to the container as a whole. pub fn map(&mut self, device: &mut DeviceT, inner_range: Range<u64>) -> Result<*mut u8> { - Ok(<<P as MemoryPool>::Block>::map( - &mut *self.mem, - device, - inner_range, - )?) + <<P as MemoryPool>::Block>::map(&mut *self.mem, device, inner_range) } /// Remove any mappings present for this staging buffer. - pub unsafe fn unmap(&mut self, device: &mut DeviceT) -> Result<()> { + pub fn unmap(&mut self, device: &mut DeviceT) -> Result<()> { self.mem.unmap(device) } |