Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2016-01-02 01:52:37 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2016-01-02 03:15:26 +0300
commitb1a7fc2c51f7c05babce6b99a1c47572906e253c (patch)
tree3bd7a147ab2a9026b40ee07bcefd9a975f6bd3d4 /intern/cycles
parent5c682a901b2ae9acf656f19e5f9b470d957d71cc (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')
-rw-r--r--intern/cycles/blender/blender_sync.cpp2
-rw-r--r--intern/cycles/render/tile.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 4b2fa61e01c..8180aa0c948 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -554,7 +554,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine,
params.tile_size = make_int2(tile_x, tile_y);
}
- if(BlenderSession::headless == false) {
+ if((BlenderSession::headless == false) && background) {
params.tile_order = (TileOrder)RNA_enum_get(&cscene, "tile_order");
}
else {
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++;