Geometry Nodes: Make simulation caching optional #107767

Merged
Hans Goudey merged 13 commits from HooglyBoogly/blender:simulation-use-cache-option into main 2023-05-10 16:01:44 +02:00
5 changed files with 29 additions and 5 deletions
Showing only changes of commit 272dcefe3c - Show all commits

View File

@ -314,7 +314,7 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
endif()
endif()
if(WITH_CYCLES AND (WITH_CYCLES_DEVICE_ONEAPI OR (WITH_CYCLES_EMBREE AND EMBREE_SYCL_SUPPORT)))
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
set(CYCLES_LEVEL_ZERO ${LIBDIR}/level-zero CACHE PATH "Path to Level Zero installation")
if(EXISTS ${CYCLES_LEVEL_ZERO} AND NOT LEVEL_ZERO_ROOT_DIR)
set(LEVEL_ZERO_ROOT_DIR ${CYCLES_LEVEL_ZERO})
@ -324,6 +324,13 @@ if(WITH_CYCLES AND (WITH_CYCLES_DEVICE_ONEAPI OR (WITH_CYCLES_EMBREE AND EMBREE_
if(EXISTS ${CYCLES_SYCL} AND NOT SYCL_ROOT_DIR)
set(SYCL_ROOT_DIR ${CYCLES_SYCL})
endif()
endif()
# add_bundled_libraries for SYCL, but custom since we need to filter the files.
if(DEFINED LIBDIR)
if(NOT DEFINED SYCL_ROOT_DIR)
set(SYCL_ROOT_DIR ${LIBDIR}/dpcpp)
endif()
file(GLOB _sycl_runtime_libraries
${SYCL_ROOT_DIR}/lib/libsycl.so
${SYCL_ROOT_DIR}/lib/libsycl.so.*

View File

@ -82,7 +82,7 @@ class CurvesGeometryRuntime {
mutable SharedCache<Vector<float3>> evaluated_position_cache;
/**
* A cache of bounds shared between data-blocks with unchanged positions and radii.
* A cache of bounds shared between data-blocks with unchanged positions.
* When data changes affect the bounds, the cache is "un-shared" with other geometries.
* See #SharedCache comments.
*/

View File

@ -19,7 +19,7 @@ namespace blender::bounds {
/**
* Find the smallest and largest values element-wise in the span.
*/
template<typename T> static std::optional<Bounds<T>> min_max(Span<T> values)
template<typename T> inline std::optional<Bounds<T>> min_max(Span<T> values)
{
if (values.is_empty()) {
return std::nullopt;
@ -46,7 +46,7 @@ template<typename T> static std::optional<Bounds<T>> min_max(Span<T> values)
* first. The template type T is expected to have an addition operator implemented with RadiusT.
*/
template<typename T, typename RadiusT>
static std::optional<Bounds<T>> min_max_with_radii(Span<T> values, Span<RadiusT> radii)
inline std::optional<Bounds<T>> min_max_with_radii(Span<T> values, Span<RadiusT> radii)
{
BLI_assert(values.size() == radii.size());
if (values.is_empty()) {

View File

@ -1613,7 +1613,6 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh
void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, const CustomData_MeshMasks *cd_mask_extra)
{
SCOPED_TIMER_AVERAGED(__func__);
/* NOTE: The function is called from multiple threads with the same input BMesh and different
* mesh objects. */

View File

@ -996,6 +996,24 @@ elseif(WIN32)
${LIBDIR}/materialx/bin/MaterialXGenShader.dll
RELEASE
)
if(EXISTS ${LIBDIR}/materialx/bin/MaterialXRender.dll) # 3.6+
windows_install_shared_manifest(
FILES
${LIBDIR}/materialx/bin/MaterialXRender.dll
${LIBDIR}/materialx/bin/MaterialXRenderGlsl.dll
${LIBDIR}/materialx/bin/MaterialXRenderHw.dll
${LIBDIR}/materialx/bin/MaterialXRenderOsl.dll
RELEASE
)
windows_install_shared_manifest(
FILES
${LIBDIR}/materialx/bin/MaterialXRender_d.dll
${LIBDIR}/materialx/bin/MaterialXRenderGlsl_d.dll
${LIBDIR}/materialx/bin/MaterialXRenderHw_d.dll
${LIBDIR}/materialx/bin/MaterialXRenderOsl_d.dll
DEBUG
)
endif()
windows_install_shared_manifest(
FILES
${LIBDIR}/materialx/bin/MaterialXCore_d.dll