Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2021-01-20 20:18:38 +0300
committerSebastian Parborg <darkdefende@gmail.com>2021-01-20 20:18:38 +0300
commitc07c110467ca3c41fcebf7b9062a96b0fb1a3eef (patch)
treeb94cb128a7a27ad53c28553ed96fc3f8eacd4aab /intern/cycles
parente12eb89f22c6ee17971195e0221a8e8b8ee3db8a (diff)
parentb33d839162b6d4b8b85937eb095b661ac93cbddd (diff)
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/blender/blender_sync.cpp2
-rw-r--r--intern/cycles/device/device.cpp2
-rw-r--r--intern/cycles/device/device.h2
-rw-r--r--intern/cycles/device/device_optix.cpp1
-rw-r--r--intern/cycles/render/integrator.cpp6
-rw-r--r--intern/cycles/render/session.h7
6 files changed, 13 insertions, 7 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index b830db7485b..e27daa2488d 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -853,7 +853,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine,
preview_samples = preview_samples * preview_samples;
}
- if (get_enum(cscene, "progressive") == 0 && (params.device.type != DEVICE_OPTIX)) {
+ if (get_enum(cscene, "progressive") == 0 && params.device.has_branched_path) {
if (background) {
params.samples = aa_samples;
}
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index 1efd628b79b..94732cd1855 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -620,6 +620,7 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo> &subdevices,
info.has_half_images = true;
info.has_volume_decoupled = true;
+ info.has_branched_path = true;
info.has_adaptive_stop_per_sample = true;
info.has_osl = true;
info.has_profiling = true;
@@ -665,6 +666,7 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo> &subdevices,
/* Accumulate device info. */
info.has_half_images &= device.has_half_images;
info.has_volume_decoupled &= device.has_volume_decoupled;
+ info.has_branched_path &= device.has_branched_path;
info.has_adaptive_stop_per_sample &= device.has_adaptive_stop_per_sample;
info.has_osl &= device.has_osl;
info.has_profiling &= device.has_profiling;
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index e9b7cde7a16..0a731969c79 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -79,6 +79,7 @@ class DeviceInfo {
bool display_device; /* GPU is used as a display device. */
bool has_half_images; /* Support half-float textures. */
bool has_volume_decoupled; /* Decoupled volume shading. */
+ bool has_branched_path; /* Supports branched path tracing. */
bool has_adaptive_stop_per_sample; /* Per-sample adaptive sampling stopping. */
bool has_osl; /* Support Open Shading Language. */
bool use_split_kernel; /* Use split or mega kernel. */
@@ -99,6 +100,7 @@ class DeviceInfo {
display_device = false;
has_half_images = false;
has_volume_decoupled = false;
+ has_branched_path = true;
has_adaptive_stop_per_sample = false;
has_osl = false;
use_split_kernel = false;
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp
index f04113635f3..07ce63f5394 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -1857,6 +1857,7 @@ void device_optix_info(const vector<DeviceInfo> &cuda_devices, vector<DeviceInfo
info.type = DEVICE_OPTIX;
info.id += "_OptiX";
info.denoisers |= DENOISER_OPTIX;
+ info.has_branched_path = false;
devices.push_back(info);
}
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index 3dc4b2fd4c5..e5b9e6bfabf 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -168,7 +168,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
FLT_MAX :
sample_clamp_indirect * 3.0f;
- kintegrator->branched = (method == BRANCHED_PATH);
+ kintegrator->branched = (method == BRANCHED_PATH) && device->info.has_branched_path;
kintegrator->volume_decoupled = device->info.has_volume_decoupled;
kintegrator->diffuse_samples = diffuse_samples;
kintegrator->glossy_samples = glossy_samples;
@@ -179,7 +179,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
kintegrator->volume_samples = volume_samples;
kintegrator->start_sample = start_sample;
- if (method == BRANCHED_PATH) {
+ if (kintegrator->branched) {
kintegrator->sample_all_lights_direct = sample_all_lights_direct;
kintegrator->sample_all_lights_indirect = sample_all_lights_indirect;
}
@@ -224,7 +224,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
/* sobol directions table */
int max_samples = 1;
- if (method == BRANCHED_PATH) {
+ if (kintegrator->branched) {
foreach (Light *light, scene->lights)
max_samples = max(max_samples, light->get_samples());
diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h
index ab6c0b5f124..43ff07e5884 100644
--- a/intern/cycles/render/session.h
+++ b/intern/cycles/render/session.h
@@ -103,10 +103,10 @@ class SessionParams {
bool modified(const SessionParams &params)
{
+ /* Modified means we have to recreate the session, any parameter changes
+ * that can be handled by an existing Session are omitted. */
return !(device == params.device && background == params.background &&
progressive_refine == params.progressive_refine &&
- /* samples == params.samples && denoising_start_sample ==
- params.denoising_start_sample && */
progressive == params.progressive && experimental == params.experimental &&
tile_size == params.tile_size && start_resolution == params.start_resolution &&
pixel_size == params.pixel_size && threads == params.threads &&
@@ -117,7 +117,8 @@ class SessionParams {
text_timeout == params.text_timeout &&
progressive_update_timeout == params.progressive_update_timeout &&
tile_order == params.tile_order && shadingsystem == params.shadingsystem &&
- denoising.type == params.denoising.type);
+ denoising.type == params.denoising.type &&
+ (denoising.use == params.denoising.use || (device.denoisers & denoising.type)));
}
};