From 96d6003b921e4ddcdbec9ea5c68385e6728499eb Mon Sep 17 00:00:00 2001 From: Miguel Pozo Date: Tue, 10 Oct 2023 15:49:28 +0200 Subject: [PATCH] Cleanup: Draw: max_orphan_cycles clarification --- source/blender/draw/intern/draw_texture_pool.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/draw/intern/draw_texture_pool.cc b/source/blender/draw/intern/draw_texture_pool.cc index 649a850d3e0..7254b15a425 100644 --- a/source/blender/draw/intern/draw_texture_pool.cc +++ b/source/blender/draw/intern/draw_texture_pool.cc @@ -186,6 +186,8 @@ void DRW_texture_pool_give_texture_ownership(DRWTexturePool *pool, GPUTexture *t void DRW_texture_pool_reset(DRWTexturePool *pool) { + /** Defer deallocation enough cycles to avoid interleaved calls to different DRW_draw/DRW_render + * functions causing constant allocation/deallocation (See #113024). */ const int max_orphan_cycles = 8; pool->last_user_id = -1;