From 78f56d5582d71e001cc1326b7182aa39f9bdedec Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 9 Apr 2020 15:51:44 +0200 Subject: TaskScheduler: Minor Preparations for TBB Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636} Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0} Differential Revision: https://developer.blender.org/D7385 --- source/blender/blenkernel/intern/ocean.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/blenkernel/intern/ocean.c') diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index 26485d10fbd..2683d384bc7 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -680,7 +680,7 @@ void BKE_ocean_simulate(struct Ocean *o, float t, float scale, float chop_amount osd.scale = scale; osd.chop_amount = chop_amount; - pool = BLI_task_pool_create(scheduler, &osd); + pool = BLI_task_pool_create(scheduler, &osd, TASK_PRIORITY_HIGH); BLI_rw_mutex_lock(&o->oceanmutex, THREAD_LOCK_WRITE); @@ -698,23 +698,23 @@ void BKE_ocean_simulate(struct Ocean *o, float t, float scale, float chop_amount BLI_task_parallel_range(0, o->_M, &osd, ocean_compute_htilda, &settings); if (o->_do_disp_y) { - BLI_task_pool_push(pool, ocean_compute_displacement_y, NULL, false, TASK_PRIORITY_HIGH); + BLI_task_pool_push(pool, ocean_compute_displacement_y, NULL, false, NULL); } if (o->_do_chop) { - BLI_task_pool_push(pool, ocean_compute_displacement_x, NULL, false, TASK_PRIORITY_HIGH); - BLI_task_pool_push(pool, ocean_compute_displacement_z, NULL, false, TASK_PRIORITY_HIGH); + BLI_task_pool_push(pool, ocean_compute_displacement_x, NULL, false, NULL); + BLI_task_pool_push(pool, ocean_compute_displacement_z, NULL, false, NULL); } if (o->_do_jacobian) { - BLI_task_pool_push(pool, ocean_compute_jacobian_jxx, NULL, false, TASK_PRIORITY_HIGH); - BLI_task_pool_push(pool, ocean_compute_jacobian_jzz, NULL, false, TASK_PRIORITY_HIGH); - BLI_task_pool_push(pool, ocean_compute_jacobian_jxz, NULL, false, TASK_PRIORITY_HIGH); + BLI_task_pool_push(pool, ocean_compute_jacobian_jxx, NULL, false, NULL); + BLI_task_pool_push(pool, ocean_compute_jacobian_jzz, NULL, false, NULL); + BLI_task_pool_push(pool, ocean_compute_jacobian_jxz, NULL, false, NULL); } if (o->_do_normals) { - BLI_task_pool_push(pool, ocean_compute_normal_x, NULL, false, TASK_PRIORITY_HIGH); - BLI_task_pool_push(pool, ocean_compute_normal_z, NULL, false, TASK_PRIORITY_HIGH); + BLI_task_pool_push(pool, ocean_compute_normal_x, NULL, false, NULL); + BLI_task_pool_push(pool, ocean_compute_normal_z, NULL, false, NULL); o->_N_y = 1.0f / scale; } -- cgit v1.2.3