diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2020-09-24 01:37:23 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2020-10-31 03:57:39 +0300 |
commit | 517ff40b124bc9d1324ccf7561a59ac51bf86602 (patch) | |
tree | 96295b1b6a11a597f7927cc61ce9371077bc7e54 /intern/cycles/device/device_task.h | |
parent | 523414dda2bf81b69b1c04e1145ac21758fa4268 (diff) |
Cycles: Implement tile stealing to improve CPU+GPU rendering performance
While Cycles already supports using both CPU and GPU at the same time, there
currently is a large problem with it: Since the CPU grabs one tile per thread,
at the end of the render the GPU runs out of new work but the CPU still needs
quite some time to finish its current times.
Having smaller tiles helps somewhat, but especially OpenCL rendering tends to
lose performance with smaller tiles.
Therefore, this commit adds support for tile stealing: When a GPU device runs
out of new tiles, it can signal the CPU to release one of its tiles.
This way, at the end of the render, the GPU quickly finishes the remaining
tiles instead of having to wait for the CPU.
Thanks to AMD for sponsoring this work!
Differential Revision: https://developer.blender.org/D9324
Diffstat (limited to 'intern/cycles/device/device_task.h')
-rw-r--r-- | intern/cycles/device/device_task.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/cycles/device/device_task.h b/intern/cycles/device/device_task.h index fd380788282..f819f84eb43 100644 --- a/intern/cycles/device/device_task.h +++ b/intern/cycles/device/device_task.h @@ -159,6 +159,7 @@ class DeviceTask { function<void(RenderTile &)> update_tile_sample; function<void(RenderTile &)> release_tile; function<bool()> get_cancel; + function<bool()> get_tile_stolen; function<void(RenderTileNeighbors &, Device *)> map_neighbor_tiles; function<void(RenderTileNeighbors &, Device *)> unmap_neighbor_tiles; |