diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2016-01-02 01:52:37 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2016-01-02 03:15:26 +0300 |
commit | b1a7fc2c51f7c05babce6b99a1c47572906e253c (patch) | |
tree | 3bd7a147ab2a9026b40ee07bcefd9a975f6bd3d4 /intern/cycles/render/tile.cpp | |
parent | 5c682a901b2ae9acf656f19e5f9b470d957d71cc (diff) |
Cycles: Force bottom-to-top tile order for viewport rendering
This commit overrides the user's choice of tile order in the case of viewport rendering and always uses bottom-to-top instead.
This was already done until the TileManager redesign, but since it removed the distinction between viewport and regular rendering
in the manager, the viewport was now also using the selected order. Since this requires sorting of the generated tiles,
it slows down rendering a bit. With the forced bottom-to-top order, this sorting step can now be avoided again.
Since the tile order is invisible anyways for viewport rendering, this commit won't have any impact on users (apart from a slight speedup).
Diffstat (limited to 'intern/cycles/render/tile.cpp')
-rw-r--r-- | intern/cycles/render/tile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/render/tile.cpp b/intern/cycles/render/tile.cpp index 14fd89e1a39..37b9647f84a 100644 --- a/intern/cycles/render/tile.cpp +++ b/intern/cycles/render/tile.cpp @@ -155,7 +155,10 @@ int TileManager::gen_tiles(bool sliced) cur_tiles++; if(cur_tiles == tiles_per_device) { - tile_list->sort(TileComparator(tile_order, center)); + /* Tiles are already generated in Bottom-to-Top order, so no sort is necessary in that case. */ + if(tile_order != TILE_BOTTOM_TO_TOP) { + tile_list->sort(TileComparator(tile_order, center)); + } tile_list++; cur_tiles = 0; cur_device++; |