[Bf-blender-cvs] [da34136] master: Cycles: Check for validity of the tiles arrays in progressive refine

Sergey Sharybin noreply at git.blender.org
Tue May 19 09:42:33 CEST 2015


Commit: da34136de1093e7da9bc10881d11e2f553f4d8d0
Author: Sergey Sharybin
Date:   Tue May 19 12:31:37 2015 +0500
Branches: master
https://developer.blender.org/rBda34136de1093e7da9bc10881d11e2f553f4d8d0

Cycles: Check for validity of the tiles arrays in progressive refine

In certain configurations (for example when start resolution is set to small
value for background render and progressive refine enabled) number of tiles
might change in the tile manager. This situation will confuse progressive
refine feature and likely cause crash.

We might also add some settings verification in the session constructor, but
having an assert with brief explanation about what's wrong should already be
much better than nothing.

===================================================================

M	intern/cycles/render/session.cpp

===================================================================

diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 275de4d..b880a62 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -409,6 +409,11 @@ bool Session::acquire_tile(Device *tile_device, RenderTile& rtile)
 		if(tile_buffers.size() == 0)
 			tile_buffers.resize(tile_manager.state.num_tiles, NULL);
 
+		/* In certain circumstances number of tiles in the tile manager could
+		 * be changed. This is not supported by the progressive refine feature.
+		 */
+		assert(tile_buffers.size() == tile_manager.state.num_tiles);
+
 		tilebuffers = tile_buffers[tile.index];
 		if(tilebuffers == NULL) {
 			tilebuffers = new RenderBuffers(tile_device);




More information about the Bf-blender-cvs mailing list