From 8180bf852e61ad09667c4b936b63bff925dd0d44 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Tue, 31 May 2022 16:54:13 +0100 Subject: [PATCH] Lock textures before attaching in BlitContext --- app/src/main/cpp/skyline/gpu/interconnect/blit_context.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/blit_context.h b/app/src/main/cpp/skyline/gpu/interconnect/blit_context.h index 143c6282..314a1def 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/blit_context.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/blit_context.h @@ -123,8 +123,12 @@ namespace skyline::gpu::interconnect { auto srcTextureView{gpu.texture.FindOrCreate(srcGuestTexture)}; auto dstTextureView{gpu.texture.FindOrCreate(dstGuestTexture)}; - executor.AttachTexture(&*srcTextureView); - executor.AttachTexture(&*dstTextureView); + { + std::scoped_lock lock{*srcTextureView, *dstTextureView}; + + executor.AttachTexture(&*srcTextureView); + executor.AttachTexture(&*dstTextureView); + } auto getSubresourceLayers{[](const vk::ImageSubresourceRange &range, vk::ImageAspectFlags aspect) { return vk::ImageSubresourceLayers{