[Bf-blender-cvs] [45d3c1325b4] cycles-x: Fix previous Cycles X OIDN change
Sergey Sharybin
noreply at git.blender.org
Fri Jun 11 19:36:22 CEST 2021
Commit: 45d3c1325b4b5778298021ef8b516e6c1d1ed524
Author: Sergey Sharybin
Date: Fri Jun 11 19:34:06 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB45d3c1325b4b5778298021ef8b516e6c1d1ed524
Fix previous Cycles X OIDN change
Seems that device needs to be recreated as well (preventing
crash), as well as initial commit missed assignment of the
cached configuration.
Maybe there is a way to "remove" images from filter without
re-creating the filter?
===================================================================
M intern/cycles/integrator/denoiser_oidn.cpp
===================================================================
diff --git a/intern/cycles/integrator/denoiser_oidn.cpp b/intern/cycles/integrator/denoiser_oidn.cpp
index ac584be9efd..f0a7472a727 100644
--- a/intern/cycles/integrator/denoiser_oidn.cpp
+++ b/intern/cycles/integrator/denoiser_oidn.cpp
@@ -275,23 +275,27 @@ DeviceInfo OIDNDenoiser::get_denoiser_device_info() const
void OIDNDenoiser::initialize()
{
#ifdef WITH_OPENIMAGEDENOISE
- if (!state_->oidn_device) {
- state_->oidn_device = oidn::newDevice();
- state_->oidn_device.commit();
- }
-
if (state_->oidn_filter) {
if (params_.use_pass_albedo != state_->use_pass_albedo ||
params_.use_pass_normal != state_->use_pass_normal) {
+ state_->oidn_device = nullptr;
state_->oidn_filter = nullptr;
}
}
+ if (!state_->oidn_device) {
+ state_->oidn_device = oidn::newDevice();
+ state_->oidn_device.commit();
+ }
+
if (!state_->oidn_filter) {
state_->oidn_filter = state_->oidn_device.newFilter("RT");
state_->oidn_filter.set("hdr", true);
state_->oidn_filter.set("srgb", false);
}
+
+ state_->use_pass_albedo = params_.use_pass_albedo;
+ state_->use_pass_normal = params_.use_pass_normal;
#endif
}
More information about the Bf-blender-cvs
mailing list