This example shows how you can use the KTX library with a single KTX file to load a texture that contains mip levels.
In addition, you can see how the pipeline and image barriers are used to synchronize between loading the image from the staging buffer and changing the layouts.