diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 15:18:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 15:23:35 +0300 |
commit | e8f8c13d4b76ba587ef7cf33370b286d4fbd36bc (patch) | |
tree | 371472ae220ad8740b310aaa8f4c5746448302c5 /source/blender/blenlib/intern/threads.cc | |
parent | 0c062a9e082130212447c2b67e8e16b8a2e622d1 (diff) | |
parent | 44bb73e765a6f79bc14a46449368f83e572d8bad (diff) |
PointCloud: Initial rendering support for Workbenchtmp-pointcloud-render
Also includes outline overlays. Removes the temp overlay drawing
We make the geometry follow camera like billboards this uses less
geometry. Currently we use half octahedron for now. Goal would be
to use icospheres.
This patch also optimize the case when pointcloud has uniform radius.
However we should premultiply the radius prop by the default radius
beforehand to avoid a multiplication on CPU.
Differential Revision: https://developer.blender.org/D8301
Diffstat (limited to 'source/blender/blenlib/intern/threads.cc')
-rw-r--r-- | source/blender/blenlib/intern/threads.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc index 7acd9b071e1..a8333d0c696 100644 --- a/source/blender/blenlib/intern/threads.cc +++ b/source/blender/blenlib/intern/threads.cc @@ -176,9 +176,9 @@ void BLI_threadpool_init(ListBase *threadbase, void *(*do_thread)(void *), int t unsigned int level = atomic_fetch_and_add_u(&thread_levels, 1); if (level == 0) { #ifdef USE_APPLE_OMP_FIX - /* workaround for Apple gcc 4.2.1 omp vs background thread bug, - * we copy gomp thread local storage pointer to setting it again - * inside the thread that we start */ + /* Workaround for Apple gcc 4.2.1 OMP vs background thread bug, + * we copy GOMP thread local storage pointer to setting it again + * inside the thread that we start. */ thread_tls_data = pthread_getspecific(gomp_tls_key); #endif } @@ -218,8 +218,8 @@ static void *tslot_thread_start(void *tslot_p) ThreadSlot *tslot = (ThreadSlot *)tslot_p; #ifdef USE_APPLE_OMP_FIX - /* workaround for Apple gcc 4.2.1 omp vs background thread bug, - * set gomp thread local storage pointer which was copied beforehand */ + /* Workaround for Apple gcc 4.2.1 OMP vs background thread bug, + * set GOMP thread local storage pointer which was copied beforehand */ pthread_setspecific(gomp_tls_key, thread_tls_data); #endif @@ -433,7 +433,7 @@ void BLI_mutex_free(ThreadMutex *mutex) /* Spin Locks */ -#if WITH_TBB +#ifdef WITH_TBB static tbb::spin_mutex *tbb_spin_mutex_cast(SpinLock *spin) { static_assert(sizeof(SpinLock) >= sizeof(tbb::spin_mutex), @@ -500,7 +500,7 @@ void BLI_spin_end(SpinLock *spin) #elif defined(__APPLE__) BLI_mutex_end(spin); #elif defined(_MSC_VER) - BLI_mutex_unlock(spin); + /* Nothing to do, spin is a simple integer type. */ #else pthread_spin_destroy(spin); #endif |