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
This commit is contained in:
Clément Foucault
2025-08-25 17:13:35 +02:00
committed by Clément Foucault
parent 166d7990ab
commit cffb5af2ff

View File

@@ -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);
});
}
});