Fix T47132: Cycles Rendering Tiles Indicator Limited to 16

This commit is contained in:
Sergey Sharybin 2016-01-24 01:31:36 +05:00
parent a6aaaad979
commit 398baef6c8
Notes: blender-bot 2023-02-14 10:21:15 +01:00
Referenced by issue #47132, Cycles Rendering Tiles Indicator Limited to 16
1 changed files with 9 additions and 6 deletions

View File

@ -415,15 +415,18 @@ rcti* RE_engine_get_current_tiles(Render *re, int *r_total_tiles, bool *r_needs_
/* Just in case we're using crazy network rendering with more
* slaves as BLENDER_MAX_THREADS.
*/
if (tiles == tiles_static)
tiles = MEM_mallocN(allocation_step * sizeof(rcti), "current engine tiles");
else
tiles = MEM_reallocN(tiles, (total_tiles + allocation_step) * sizeof(rcti));
allocation_size += allocation_step;
if (tiles == tiles_static) {
/* Can not realloc yet, tiles are pointing to a
* stack memory.
*/
tiles = MEM_mallocN(allocation_size * sizeof(rcti), "current engine tiles");
}
else {
tiles = MEM_reallocN(tiles, allocation_size * sizeof(rcti));
}
*r_needs_free = true;
}
tiles[total_tiles] = pa->disprect;
if (pa->crop) {