[Bf-blender-cvs] [dfeabe4f32] cycles_split_kernel: Cycles: Allow mem_zero to be called on buffers without host side memory
Mai Lavelle
noreply at git.blender.org
Thu Jan 26 09:01:07 CET 2017
Commit: dfeabe4f32449ca8809b8bea504aa3aad107f1a0
Author: Mai Lavelle
Date: Thu Jan 26 01:47:45 2017 -0500
Branches: cycles_split_kernel
https://developer.blender.org/rBdfeabe4f32449ca8809b8bea504aa3aad107f1a0
Cycles: Allow mem_zero to be called on buffers without host side memory
Previous commit did this for OpenCL so only need to update CUDA
===================================================================
M intern/cycles/device/device_cuda.cpp
===================================================================
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 5aaed093f3..4a64c13e3b 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -525,7 +525,9 @@ public:
void mem_zero(device_memory& mem)
{
- memset((void*)mem.data_pointer, 0, mem.memory_size());
+ if(mem.data_pointer) {
+ memset((void*)mem.data_pointer, 0, mem.memory_size());
+ }
cuda_push_context();
if(mem.device_pointer)
More information about the Bf-blender-cvs
mailing list