In the "Images" chapter of the Texture Mapping section, the createImage function creates an image with an initial layout of VK_IMAGE_LAYOUT_PREINITIALIZED. The reason given for this is so that the contents of the image are preserved by the first transition. However, data is not placed into the image before the first transition in any part of the tutorial. I think this was left over from when the tutorial used a staging image to transfer the texture, but since it uses a staging buffer now, VK_IMAGE_LAYOUT_PREINITIALIZED is not necessary.
For reference, section 11.4 of the spec says
VK_IMAGE_LAYOUT_PREINITIALIZED does not support device access.
...
Currently, VK_IMAGE_LAYOUT_PREINITIALIZED is only useful with VK_IMAGE_TILING_LINEAR images because there is not a standard layout defined for VK_IMAGE_TILING_OPTIMAL images.
VK_IMAGE_TILING_LINEAR is also never used.
In the "Images" chapter of the Texture Mapping section, the
createImagefunction creates an image with an initial layout ofVK_IMAGE_LAYOUT_PREINITIALIZED. The reason given for this is so that the contents of the image are preserved by the first transition. However, data is not placed into the image before the first transition in any part of the tutorial. I think this was left over from when the tutorial used a staging image to transfer the texture, but since it uses a staging buffer now,VK_IMAGE_LAYOUT_PREINITIALIZEDis not necessary.For reference, section 11.4 of the spec says
VK_IMAGE_TILING_LINEARis also never used.