Make image copy operation public accessible
This commit is contained in:
parent
1976af0166
commit
0f89ceabce
1 changed files with 5 additions and 1 deletions
|
@ -811,7 +811,7 @@ impl Image {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn copy_image_to_buffer(self: &Arc<Image>) -> Result<Arc<Buffer<RawBuffer>>> {
|
pub fn copy_image_to_buffer(self: &Arc<Image>) -> Result<Arc<Buffer<RawBuffer>>> {
|
||||||
let buffer = Buffer::builder()
|
let buffer = Buffer::builder()
|
||||||
.set_usage(VK_BUFFER_USAGE_TRANSFER_DST_BIT)
|
.set_usage(VK_BUFFER_USAGE_TRANSFER_DST_BIT)
|
||||||
.set_memory_usage(MemoryUsage::GpuToCpu)
|
.set_memory_usage(MemoryUsage::GpuToCpu)
|
||||||
|
@ -873,6 +873,10 @@ impl Image {
|
||||||
|
|
||||||
Ok(buffer)
|
Ok(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn copy_buffer_to_image(self: &Arc<Image>, buffer: &Arc<Buffer<RawBuffer>>) -> Result<()> {
|
||||||
|
copy_buffer_to_image(&self.device, &self.queue, &buffer, self)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl VulkanDevice for Image {
|
impl VulkanDevice for Image {
|
||||||
|
|
Loading…
Reference in a new issue