mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:55:08 +01:00
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:
parent
5dea15632c
commit
dafcfa68ca
@ -148,6 +148,8 @@ namespace skyline::gpu {
|
||||
return stagingBuffer;
|
||||
} else if (tiling == vk::ImageTiling::eLinear) {
|
||||
// We can optimize linear texture sync on a UMA by mapping the texture onto the CPU and copying directly into it rather than a staging buffer
|
||||
if (layout == vk::ImageLayout::eUndefined)
|
||||
TransitionLayout(vk::ImageLayout::eGeneral);
|
||||
bufferData = std::get<memory::Image>(backing).data();
|
||||
if (cycle.lock() != pCycle)
|
||||
WaitOnFence();
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user