From 02786839a59fdbb841f95262ce664f806c6c5a87 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 9 Feb 2023 22:35:03 +0000 Subject: [PATCH] Flush pipeline after texture uploads --- .../cpp/skyline/gpu/interconnect/command_executor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp index 00ee51e7..bf4196ab 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp @@ -543,6 +543,14 @@ namespace skyline::gpu::interconnect { texture->cycle = cycle; texture->UpdateRenderPassUsage(0, texture::RenderPassUsage::None); } + + // Wait on texture syncs to finish before beginning the cmdbuf + slot->commandBuffer.pipelineBarrier( + vk::PipelineStageFlagBits::eAllCommands, vk::PipelineStageFlagBits::eAllCommands, {}, vk::MemoryBarrier{ + .srcAccessMask = vk::AccessFlagBits::eMemoryRead | vk::AccessFlagBits::eMemoryWrite, + .dstAccessMask = vk::AccessFlagBits::eMemoryRead | vk::AccessFlagBits::eMemoryWrite, + }, {}, {} + ); } for (const auto &attachedBuffer : ranges::views::concat(attachedBuffers, preserveAttachedBuffers)) {