diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-04-06 23:25:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-04-07 20:52:53 +0300 |
commit | 0de0950ad5d1de5172cbd2b6b0e67fe319a420c1 (patch) | |
tree | 54a1a3e8abdb9733f5f9287496d03515c9ff5987 /intern/cycles/hydra | |
parent | 51a7e4b488a4df1ce6fec93ee599d70efdbf5e03 (diff) |
Cycles: various Linux build fixes related to Hydra render delegate
* Add missing GLEW and hgiGL libraries for Hydra
* Fix wrong case sensitive include
* Fix link errors by adding external libs to static Hydra lib
* Work around weird Hydra link error with MAX_SAMPLES
* Use Embree by default for Hydra
* Sync external libs code with standalone
* Update version number to match Blender
* Remove unneeded CLEW/GLEW from test executable
None of this should affect Cycles in Blender.
Ref T96731
Diffstat (limited to 'intern/cycles/hydra')
-rw-r--r-- | intern/cycles/hydra/CMakeLists.txt | 18 | ||||
-rw-r--r-- | intern/cycles/hydra/plugin.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/hydra/render_delegate.cpp | 3 |
3 files changed, 13 insertions, 10 deletions
diff --git a/intern/cycles/hydra/CMakeLists.txt b/intern/cycles/hydra/CMakeLists.txt index d632cd01a02..72d5d0e3bf7 100644 --- a/intern/cycles/hydra/CMakeLists.txt +++ b/intern/cycles/hydra/CMakeLists.txt @@ -13,6 +13,14 @@ set(INC_SYS ${GLEW_INCLUDE_DIR} ) +set(LIB + cycles_scene + cycles_session + cycles_graph + ${CYCLES_GLEW_LIBRARIES} +) +cycles_external_libraries_append(LIB) + set(INC_HD_CYCLES attribute.h camera.h @@ -63,9 +71,6 @@ if(WITH_OPENVDB) list(APPEND INC_SYS ${OPENVDB_INCLUDE_DIRS} ) - list(APPEND LIB - ${OPENVDB_LIBRARIES} - ) endif() include_directories(${INC}) @@ -94,10 +99,9 @@ target_link_libraries(hdCyclesStatic PUBLIC hd hgi + hgiGL PRIVATE - cycles_scene - cycles_session - cycles_graph + ${LIB} ) set(HdCyclesPluginName hdCycles) @@ -124,8 +128,6 @@ target_link_libraries(${HdCyclesPluginName} hdCyclesStatic ) -cycles_target_link_libraries(${HdCyclesPluginName}) - if(WITH_CYCLES_BLENDER) set(CYCLES_HYDRA_INSTALL_PATH "../") else() diff --git a/intern/cycles/hydra/plugin.cpp b/intern/cycles/hydra/plugin.cpp index 8caca3068df..2cbe232334a 100644 --- a/intern/cycles/hydra/plugin.cpp +++ b/intern/cycles/hydra/plugin.cpp @@ -7,7 +7,7 @@ #include "util/log.h" #include "util/path.h" -#include <pxr/base/arch/filesystem.h> +#include <pxr/base/arch/fileSystem.h> #include <pxr/base/plug/plugin.h> #include <pxr/base/plug/thisPlugin.h> #include <pxr/base/tf/envSetting.h> diff --git a/intern/cycles/hydra/render_delegate.cpp b/intern/cycles/hydra/render_delegate.cpp index 748b6a66e1e..a954c3e4d72 100644 --- a/intern/cycles/hydra/render_delegate.cpp +++ b/intern/cycles/hydra/render_delegate.cpp @@ -457,8 +457,9 @@ void HdCyclesDelegate::SetRenderSetting(const PXR_NS::TfToken &key, const PXR_NS VtValue::Cast<double>(value).GetWithDefault(session->params.time_limit)); } else if (key == HdCyclesRenderSettingsTokens->samples) { + static const int max_samples = Integrator::MAX_SAMPLES; int samples = VtValue::Cast<int>(value).GetWithDefault(session->params.samples); - samples = std::min(std::max(1, samples), Integrator::MAX_SAMPLES); + samples = std::min(std::max(1, samples), max_samples); session->set_samples(samples); } else if (key == HdCyclesRenderSettingsTokens->sample_offset) { |