Fix T84650: CPU render + OptiX denoiser leaves empty tiles unprocessed

The OptiX denoiser is part of the OptiX device, so to the tile manager looks like a GPU device. As a
result the tile stealing implementation erroneously stole CPU tiles and moved them to that OptiX
device, even though in this configuration the OptiX device was only set up for denoising and not
rendering. Launching the render kernel therefore caused a crash because of a missing AS etc.
This fixes that by ensuring tiles can only be stolen by devices that support render tiles.
This commit is contained in:
Patrick Mours 2021-01-18 15:30:25 +01:00
parent 1c2b203795
commit 4fde594fda

@ -459,7 +459,11 @@ 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)) {
/* Can only steal tiles on devices that support rendering
* This is because denoising tiles cannot be stolen (see below)
*/
if ((tile_types & (RenderTile::PATH_TRACE | RenderTile::BAKE)) &&
steal_tile(rtile, tile_device, tile_lock)) {
return true;
}