From cffb5af2ff44088bfa3f5bb155df7e75c267d72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cle=CC=81ment=20Foucault?= Date: Mon, 25 Aug 2025 17:13:35 +0200 Subject: [PATCH] Fix #142381: EEVEE: Freeze playing back a certain animation In this instance the texture loading was using another `threaded_for` loop internally which created conflict with the top most `threaded_for`. Using task isolation fixes the issue. Candidate for backporting to 4.5 LTS. Pull Request: https://projects.blender.org/blender/blender/pulls/145124 --- source/blender/draw/engines/eevee/eevee_material.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/draw/engines/eevee/eevee_material.cc b/source/blender/draw/engines/eevee/eevee_material.cc index 817df091f4f..5fe2b0f8cfb 100644 --- a/source/blender/draw/engines/eevee/eevee_material.cc +++ b/source/blender/draw/engines/eevee/eevee_material.cc @@ -210,8 +210,10 @@ void MaterialModule::end_sync() GPUMaterialTexture *tex = texture_loading_queue_[i]; ImageUser *iuser = tex->iuser_available ? &tex->iuser : nullptr; BKE_image_get_tile(tex->ima, 0); - ImBuf *imbuf = BKE_image_acquire_ibuf(tex->ima, iuser, nullptr); - BKE_image_release_ibuf(tex->ima, imbuf, nullptr); + threading::isolate_task([&]() { + ImBuf *imbuf = BKE_image_acquire_ibuf(tex->ima, iuser, nullptr); + BKE_image_release_ibuf(tex->ima, imbuf, nullptr); + }); } });