Loading non-power-of-two textures in Vulkan
问题 My 2D texture loader works fine if my texture dimensions are power-of-two, but when they are not, the texture data displays as skewed. How do I fix this? I assume the issue has something to do with memory alignment and row pitch. Here's relevant parts of my loader code: VkMemoryRequirements memReqs; vkGetImageMemoryRequirements( GfxDeviceGlobal::device, mappableImage, &memReqs ); VkMemoryAllocateInfo memAllocInfo = {}; memAllocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; memAllocInfo