[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49141] branches/soc-2011-tomato/intern/ cycles/device/device_cuda.cpp: Tomato Cycles: ability to cancel rendering before tile was fully rendered
Sergey Sharybin
sergey.vfx at gmail.com
Mon Jul 23 15:51:29 CEST 2012
Revision: 49141
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49141
Author: nazgul
Date: 2012-07-23 13:51:29 +0000 (Mon, 23 Jul 2012)
Log Message:
-----------
Tomato Cycles: ability to cancel rendering before tile was fully rendered
Seems this requred cuda context synchronization after every finished sample,
which could give few percent of slowdown. In test made here it was only minor
slowdown, so think it's pretty much acceptable for now.
Modified Paths:
--------------
branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp
Modified: branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp 2012-07-23 13:33:09 UTC (rev 49140)
+++ branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp 2012-07-23 13:51:29 UTC (rev 49141)
@@ -834,12 +834,17 @@
int start_sample = tile.start_sample;
int end_sample = tile.start_sample + tile.num_samples;
- for(int sample = start_sample; sample < end_sample; sample++)
+ for(int sample = start_sample; sample < end_sample; sample++) {
+ if (task->get_cancel()) {
+ break;
+ }
+
path_trace(tile, sample);
- cuda_push_context();
- cuda_assert(cuCtxSynchronize())
- cuda_pop_context();
+ cuda_push_context();
+ cuda_assert(cuCtxSynchronize())
+ cuda_pop_context();
+ }
task->release_tile(tile);
}
More information about the Bf-blender-cvs
mailing list