From ae5bcbdb5cacd8066cae0dec2a2a3608fe00d862 Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Sat, 7 May 2022 02:37:48 +0530 Subject: [PATCH] Fix Depth RT lock to be in scope Earlier texture locking design required the lock to be retained but since the introduction of `AttachTexture`, this no longer needs to be done. This being done caused deadlocks when the depth texture is sampled by the fragment shader while being bound as an RT since it would attempt to lock the texture again. --- app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h index 639915aa..dd8dd7b8 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h @@ -2856,9 +2856,8 @@ namespace skyline::gpu::interconnect { // Depth/Stencil Render Target Setup auto depthRenderTargetView{GetDepthRenderTarget()}; - std::optional> depthTargetLock; if (depthRenderTargetView) { - depthTargetLock.emplace(*depthRenderTargetView); + std::scoped_lock lock(*depthRenderTargetView); executor.AttachTexture(depthRenderTargetView); }