Transition texture layout to eGeneral after creation

As we no longer set the layout to general inside the Texture constructor, yet, we need it to be set prior to the image being used as an attachment. We need to transition the layout to `eGeneral` after creation of the texture object.
This commit is contained in:
PixelyIon
2022-03-11 21:33:10 +05:30
parent 5dea15632c
commit dafcfa68ca
2 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,7 @@ namespace skyline::gpu {
// Create a texture as we cannot find one that matches
auto texture{std::make_shared<Texture>(gpu, guestTexture)};
texture->TransitionLayout(vk::ImageLayout::eGeneral);
auto it{texture->guest->mappings.begin()};
textures.emplace(mappingEnd, TextureMapping{texture, it, guestMapping});
while ((++it) != texture->guest->mappings.end()) {