I"m in the middle of finishing our texture support on vulkan, and am looking for clarification on some points I haven’t been able to find explicitly addressed:
If i’m uploading textures with mips, there is no way to simply upload the mips? Mips>1 negates the use of VK_IMAGE_TILING_LINEAR - image must be VK_IMAGE_TILING_OPTIMAL.
As far as I can tell, I need to vkCreateImage my multi-mip image as _OPTIMAL, load the corresponding data into a VkBuffer, and then vkCmdCopyBufferToImage() each mip into place (with appropriate waiting/locking). This contrasts to the single mip, _LINEAR path, where I can vkMapMemory -> memcpy -> vkUnMapMemory.
I’m also assuming this is the preferred path to allow the driver to optimize texture layout. If I have a single mip, what are the constraints/benefits of _LINEAR vs _OPTIMAL? Is _LINEAR just a simple convenience but otherwise to be avoided?
Just want to make sure I’m not missing some details before I do the work.
Cheers - j