@breif Copy memory from a VkImage.
Instance a VkCopyImageToMemoryInfoEXT.
Instance a VkCopyImageToMemoryInfoEXT.
556 {
558
559 VkImageToMemoryCopyEXT memoryCopy{};
560 memoryCopy.sType = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT;
561 memoryCopy.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
562 memoryCopy.imageSubresource.mipLevel = 0;
563 memoryCopy.imageSubresource.baseArrayLayer = 0;
564 memoryCopy.imageSubresource.layerCount = 1;
565 memoryCopy.imageOffset = { 0, 0, 0 };
566 memoryCopy.imageExtent.width =
m_Width;
567 memoryCopy.imageExtent.height =
m_Height;
568 memoryCopy.imageExtent.depth =
m_Layers;
569 memoryCopy.pHostPointer = data;
570
574 VkCopyImageToMemoryInfoEXT copyInfo{};
575 copyInfo.sType = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT;
577 copyInfo.srcImageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
578 copyInfo.regionCount = 1;
579 copyInfo.pRegions = &memoryCopy;
580
582 }
#define SPICES_PROFILE_ZONE
int m_Height
Image height.
VkImage m_Image
The VkImage this Class Wrapped.
uint32_t m_Layers
Image layer(texture cube: 6).
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.