From 03469d90b2a03a61a1c7933a0f49fed3bd334c3b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 30 May 2017 15:40:14 +0200 Subject: Displace modifier: Pre-fetch all possible images to image pool prior execution This way we reduce amount of time wasted in spin-lock later on when all threads are starting to sample texture. --- source/blender/modifiers/intern/MOD_displace.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/modifiers/intern/MOD_displace.c') diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 18f60bab490..3325f05025f 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -384,6 +384,7 @@ static void displaceModifier_do( data.vert_clnors = vert_clnors; if (dmd->texture != NULL) { data.pool = BKE_image_pool_new(); + BKE_texture_fetch_images_for_pool(dmd->texture, data.pool); } BLI_task_parallel_range(0, numVerts, &data, displaceModifier_do_task, numVerts > 512); -- cgit v1.2.3