unsafe fn copy_buffer_to_image(
        &self,
        command_buffer: vk::CommandBuffer,
        src_buffer: vk::Buffer,
        offset: u64,
        mipmap_extent: &MipmapExtent,
        mip_level: u32,
    ) {
        let region = vk::BufferImageCopy {
            buffer_offset: offset,
            buffer_row_length: 0,
            buffer_image_height: 0,
            image_subresource: vk::ImageSubresourceLayers {
                aspect_mask: vk::ImageAspectFlags::COLOR,
                mip_level,
                base_array_layer: 0,
                layer_count: 1,
            },
            image_offset: vk::Offset3D { x: 0, y: 0, z: 0 },
            image_extent: vk::Extent3D {
                width: mipmap_extent.width,
                height: mipmap_extent.height,
                depth: 1,
            },
        };
        self.device.logical_device.cmd_copy_buffer_to_image(
            command_buffer,
            src_buffer,
            self.image,
            vk::ImageLayout::TRANSFER_DST_OPTIMAL,
            &[region],
        );
    }
/// Copy a region of the buffer's memory into the image mipmap.
Copy a region of the buffer's memory into the image mipmap.
Copy a region of the buffer ' s memory into the image mipmap .
unsafe fn copy_buffer_to_image(
        &self,
        command_buffer: vk::CommandBuffer,
        src_buffer: vk::Buffer,
        offset: u64,
        mipmap_extent: &MipmapExtent,
        mip_level: u32,
    ) {
        let region = vk::BufferImageCopy {
            buffer_offset: offset,
            buffer_row_length: 0,
            buffer_image_height: 0,
            image_subresource: vk::ImageSubresourceLayers {
                aspect_mask: vk::ImageAspectFlags::COLOR,
                mip_level,
                base_array_layer: 0,
                layer_count: 1,
            },
            image_offset: vk::Offset3D { x: 0, y: 0, z: 0 },
            image_extent: vk::Extent3D {
                width: mipmap_extent.width,
                height: mipmap_extent.height,
                depth: 1,
            },
        };
        self.device.logical_device.cmd_copy_buffer_to_image(
            command_buffer,
            src_buffer,
            self.image,
            vk::ImageLayout::TRANSFER_DST_OPTIMAL,
            &[region],
        );
    }
unsafe fn copy_buffer_to_image ( & self , command_buffer : vk :: CommandBuffer , src_buffer : vk :: Buffer , offset : u64 , mipmap_extent : & MipmapExtent , mip_level : u32 , ) { let region = vk :: BufferImageCopy { buffer_offset : offset , buffer_row_length : 0 , buffer_image_height : 0 , image_subresource : vk :: ImageSubresourceLayers { aspect_mask : vk :: ImageAspectFlags :: COLOR , mip_level , base_array_layer : 0 , layer_count : 1 , } , image_offset : vk :: Offset3D { x : 0 , y : 0 , z : 0 } , image_extent : vk :: Extent3D { width : mipmap_extent . width , height : mipmap_extent . height , depth : 1 , } , } ; self . device . logical_device . cmd_copy_buffer_to_image ( command_buffer , src_buffer , self . image , vk :: ImageLayout :: TRANSFER_DST_OPTIMAL , & [ region ] , ) ; }
Copy a region of the buffer's memory into the image mipmap.
Copy a region of the buffer ' s memory into the image mipmap .
&self
command_buffer
vk::CommandBuffer
src_buffer
vk::Buffer
offset
u64
mipmap_extent
&MipmapExtent
mip_level
u32