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:
authorPatrick Mours <pmours@nvidia.com>2020-02-26 18:30:42 +0300
committerPatrick Mours <pmours@nvidia.com>2020-02-28 18:12:29 +0300
commitaf54bbd61c769c69891c9b39df19eb3cad9dafe2 (patch)
tree927403db3791116c9a760f6791426e8164ca9804 /intern/cycles/device/device_optix.cpp
parent03e04d4db78972709ea9c6889afcf72fdaae80a2 (diff)
Cycles: Rework tile scheduling for denoising
This fixes denoising being delayed until after all rendering has finished. Instead, tile-based denoising is now part of the "RENDER" task again, so that it is all in one task and does not cause issues with dedicated task pools where tasks are serialized. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6940
Diffstat (limited to 'intern/cycles/device/device_optix.cpp')
-rw-r--r--intern/cycles/device/device_optix.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp
index 0121b89e9d8..61a5c74f69e 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -569,9 +569,14 @@ class OptiXDevice : public CUDADevice {
if (have_error())
return; // Abort early if there was an error previously
- if (task.type == DeviceTask::RENDER || task.type == DeviceTask::DENOISE) {
+ if (task.type == DeviceTask::RENDER) {
+ if (thread_index != 0) {
+ // Only execute denoising in a single thread (see also 'task_add')
+ task.tile_types &= ~RenderTile::DENOISE;
+ }
+
RenderTile tile;
- while (task.acquire_tile(this, tile)) {
+ while (task.acquire_tile(this, tile, task.tile_types)) {
if (tile.task == RenderTile::PATH_TRACE)
launch_render(task, tile, thread_index);
else if (tile.task == RenderTile::DENOISE)
@@ -1451,7 +1456,7 @@ class OptiXDevice : public CUDADevice {
return;
}
- if (task.type == DeviceTask::DENOISE || task.type == DeviceTask::DENOISE_BUFFER) {
+ if (task.type == DeviceTask::DENOISE_BUFFER) {
// Execute denoising in a single thread (e.g. to avoid race conditions during creation)
task_pool.push(new OptiXDeviceTask(this, task, 0));
return;