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.
This commit is contained in:
PixelyIon 2022-05-07 02:37:48 +05:30
parent 1c8d994161
commit ae5bcbdb5c

View File

@ -2856,9 +2856,8 @@ namespace skyline::gpu::interconnect {
// Depth/Stencil Render Target Setup // Depth/Stencil Render Target Setup
auto depthRenderTargetView{GetDepthRenderTarget()}; auto depthRenderTargetView{GetDepthRenderTarget()};
std::optional<std::scoped_lock<TextureView>> depthTargetLock;
if (depthRenderTargetView) { if (depthRenderTargetView) {
depthTargetLock.emplace(*depthRenderTargetView); std::scoped_lock lock(*depthRenderTargetView);
executor.AttachTexture(depthRenderTargetView); executor.AttachTexture(depthRenderTargetView);
} }