Blender Git Commit Log

Git Commits -> Revision dd610cb

Revision dd610cb by Lukas Toenne (openvdb)
November 12, 2016, 12:47 (GMT)
Improved thread data handling for the OpenVDB Cycles node.

OpenVDB grid accessors, samplers, and ray intersectors must be stored per thread.
Previously this data was stored in a per-thread map in each grid. This causes problems
because the pthread_id keys can become invalid, and it also creates a lot of unused
accessors.

The patch switches thread data storage around, so that thread-local data is now passed
along KernelGlobals for every work task as needed (tasks only run in one thread).
This system is much more reliable and similar to other cases of thread-local data,
such as OSL shaders.

The patch also removes the virtual base class for "volumes", which might give a minor
performance improvement. If a generic volume type for Cycles is needed it can be
abstracted from scratch.

Removed the unused thread_id list in Cycles CPU tasks, which were only needed
for the now deprecated OpenVDB grid accessor lookup.

Commit Details:

Full Hash: dd610cb6e97bbc435f3b437c832283d54144a4dd
Parent Commit: f4ec58f
Lines Changed: +493, -604

4 Added Paths:

/intern/cycles/kernel/openvdb/vdb_globals.h (+45, -0) (View)
/intern/cycles/kernel/openvdb/vdb_intern.h (+48, -0) (View)
/intern/cycles/kernel/openvdb/vdb_thread.cpp (+216, -0) (View)
/intern/cycles/kernel/openvdb/vdb_thread.h (+49, -0) (View)

20 Modified Paths:

/intern/cycles/device/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/device/device.h (+5, -0) (Diff)
/intern/cycles/device/device_cpu.cpp (+32, -1) (Diff)
/intern/cycles/kernel/bvh/bvh_volume.h (+1, -1) (Diff)
/intern/cycles/kernel/bvh/bvh_volume_all.h (+1, -1) (Diff)
/intern/cycles/kernel/bvh/qbvh_volume.h (+1, -1) (Diff)
/intern/cycles/kernel/bvh/qbvh_volume_all.h (+1, -1) (Diff)
/intern/cycles/kernel/CMakeLists.txt (+12, -0) (Diff)
/intern/cycles/kernel/kernels/cpu/kernel.cpp (+0, -4) (Diff)
/intern/cycles/kernel/kernel_compat_cpu.h (+2, -2) (Diff)
/intern/cycles/kernel/kernel_globals.h (+10, -3) (Diff)
/intern/cycles/kernel/kernel_volume.h (+17, -16) (Diff)
/intern/cycles/render/attribute.cpp (+3, -0) (Diff)
/intern/cycles/render/volume.cpp (+34, -76) (Diff)
/intern/cycles/render/volume.h (+6, -6) (Diff)
/intern/cycles/util/util_task.cpp (+0, -9) (Diff)
/intern/cycles/util/util_task.h (+0, -4) (Diff)
/intern/cycles/util/util_thread.h (+0, -5) (Diff)
/intern/cycles/util/util_volume.cpp (+0, -164) (Diff)
/intern/cycles/util/util_volume.h (+9, -310) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021