From fea0a2b3ae5acdb25e088e57a8fb1f77d5ba3e1d Mon Sep 17 00:00:00 2001 From: "n.savitchev" Date: Tue, 14 Jan 2025 21:25:11 +0300 Subject: [PATCH] 803e8a3e: texStreaming: ninjafix for possible deadlock --- prog/engine/lib3d/texPackMgr2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prog/engine/lib3d/texPackMgr2.cpp b/prog/engine/lib3d/texPackMgr2.cpp index ffba501a3..e3d6f3f9a 100644 --- a/prog/engine/lib3d/texPackMgr2.cpp +++ b/prog/engine/lib3d/texPackMgr2.cpp @@ -1797,10 +1797,10 @@ bool ddsx::tex_pack2_perform_delayed_data_loading(int prio) for (int i = 0; i < tex_packs.size() && interlocked_acquire_load(processingTexData[prio]); i++) done |= tex_packs[i].pack->file->performDelayedLoad(full_prio); if (!is_managed_textures_streaming_load_on_demand()) - run_action_on_main_thread_and_wait([]() { - d3d::GpuAutoLock lock; - RMGR.performAsyncTextureReplacementCompletions(); - }); + { + d3d::GpuAutoLock lock; + RMGR.performAsyncTextureReplacementCompletions(); + } if (!interlocked_acquire_load(pendingTexCount[prio]) || !interlocked_acquire_load(processingTexData[prio])) break;