SpiecsEngine
 
Loading...
Searching...
No Matches

◆ CopyMemoryToImageHost() [1/2]

void Spices::VulkanImage::CopyMemoryToImageHost ( const std::vector< VkMemoryToImageCopyEXT > & copies) const

Copy the Memory's data to this VkImage. Used to create image data (include mipmaps), which owns a compressed format.

Parameters
[in]copiesThe copy information.

Issue the copy.

Issue the copy.

Definition at line 388 of file VulkanImage.cpp.

389 {
391
395 VkCopyMemoryToImageInfoEXT copyInfo{};
396 copyInfo.sType = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT;
397 copyInfo.dstImage = m_Image;
398 copyInfo.dstImageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
399 copyInfo.regionCount = static_cast<uint32_t>(copies.size());
400 copyInfo.pRegions = copies.data();
401
402 m_VulkanState.m_VkFunc.vkCopyMemoryToImageEXT(m_VulkanState.m_Device, &copyInfo);
403 }
#define SPICES_PROFILE_ZONE
VkImage m_Image
The VkImage this Class Wrapped.
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.
VulkanFunctions m_VkFunc
Definition VulkanUtils.h:98