1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_NV_copy_memory_indirect.html>
use crate::vk;
impl crate::nv::copy_memory_indirect::Device {
    /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryIndirectNV.html>
    ///
    /// `copy_buffer_address` is a buffer device address which is a pointer to an array of
    /// `copy_count` number of [`vk::CopyMemoryIndirectCommandNV`] structures containing the copy
    /// parameters, each `stride` bytes apart.
    #[inline]
    pub unsafe fn cmd_copy_memory_indirect(
        &self,
        command_buffer: vk::CommandBuffer,
        copy_buffer_address: vk::DeviceAddress,
        copy_count: u32,
        stride: u32,
    ) {
        (self.fp.cmd_copy_memory_indirect_nv)(
            command_buffer,
            copy_buffer_address,
            copy_count,
            stride,
        )
    }
    /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryToImageIndirectNV.html>
    ///
    /// `copy_buffer_address` is a buffer device address which is a pointer to an array of
    /// `image_subresources.len()` number of [`vk::CopyMemoryToImageIndirectCommandNV`] structures
    /// containing the copy parameters, each `stride` bytes apart.
    #[inline]
    pub unsafe fn cmd_copy_memory_to_image_indirect(
        &self,
        command_buffer: vk::CommandBuffer,
        copy_buffer_address: vk::DeviceAddress,
        stride: u32,
        dst_image: vk::Image,
        dst_image_layout: vk::ImageLayout,
        image_subresources: &[vk::ImageSubresourceLayers],
    ) {
        (self.fp.cmd_copy_memory_to_image_indirect_nv)(
            command_buffer,
            copy_buffer_address,
            image_subresources.len() as u32,
            stride,
            dst_image,
            dst_image_layout,
            image_subresources.as_ptr(),
        )
    }
}