diff options
-rw-r--r-- | intern/cycles/render/session.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index 524a0e3b9d4..a00f8154148 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -459,13 +459,17 @@ bool Session::acquire_tile(RenderTile &rtile, Device *tile_device, uint tile_typ int device_num = device->device_number(tile_device); while (!tile_manager.next_tile(tile, device_num, tile_types)) { + if (steal_tile(rtile, tile_device, tile_lock)) { + return true; + } + /* Wait for denoising tiles to become available */ if ((tile_types & RenderTile::DENOISE) && !progress.get_cancel() && tile_manager.has_tiles()) { denoising_cond.wait(tile_lock); continue; } - return steal_tile(rtile, tile_device, tile_lock); + return false; } /* fill render tile */ @@ -477,6 +481,7 @@ bool Session::acquire_tile(RenderTile &rtile, Device *tile_device, uint tile_typ rtile.num_samples = tile_manager.state.num_samples; rtile.resolution = tile_manager.state.resolution_divider; rtile.tile_index = tile->index; + rtile.stealing_state = RenderTile::NO_STEALING; if (tile->state == Tile::DENOISE) { rtile.task = RenderTile::DENOISE; |