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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-07 05:38:49 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-08 00:35:12 +0300
commitff34e489117e0a9f64ca192438d05f28922af6cc (patch)
tree356352f77cfeda80a9d5fd29dc591ff98932fbd6 /intern/cycles/device/device_cuda.cpp
parente74b2293422b91f8c8de8d76fcbb5241caaa7a6b (diff)
Cycles: add an extra CUDA synchronize before rendering.
It should not be needed as far as I know, but just in case it fixes any of the recent issues like T52572.
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r--intern/cycles/device/device_cuda.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 4ab3cb9da75..14e3ddc8c7b 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -1567,6 +1567,8 @@ public:
0, 0, args, 0));
unmap_pixels((rgba_byte)? rgba_byte: rgba_half);
+
+ cuda_assert(cuCtxSynchronize());
}
void shader(DeviceTask& task)
@@ -1928,10 +1930,12 @@ public:
/* Load texture info. */
load_texture_info();
+ /* Synchronize all memory copies before executing task. */
+ cuda_assert(cuCtxSynchronize());
+
if(task.type == DeviceTask::FILM_CONVERT) {
/* must be done in main thread due to opengl access */
film_convert(task, task.buffer, task.rgba_byte, task.rgba_half);
- cuda_assert(cuCtxSynchronize());
}
else {
task_pool.push(new CUDADeviceTask(this, task));