Commit: ff34e489117e0a9f64ca192438d05f28922af6cc
Author: Brecht Van Lommel
Date:   Tue Nov 7 03:38:49 2017 +0100
Branches: master
https://developer.blender.org/rBff34e489117e0a9f64ca192438d05f28922af6cc

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.

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

M       intern/cycles/device/device_cuda.cpp

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

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));

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to