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-10-20 05:32:29 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-21 21:58:28 +0300
commit57a0cb797d60024357a3e3a64c1873844b0178bd (patch)
tree1f8ade576fbbc6cbbf7a41c51304ee8ae3fe95b6 /intern/cycles/device/opencl/opencl_split.cpp
parent92ec4863c22f249a21a5b5224d91fcab5c602100 (diff)
Code refactor: avoid some unnecessary device memory copying.
Diffstat (limited to 'intern/cycles/device/opencl/opencl_split.cpp')
-rw-r--r--intern/cycles/device/opencl/opencl_split.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp
index b4e9419ebbd..920106f92d4 100644
--- a/intern/cycles/device/opencl/opencl_split.cpp
+++ b/intern/cycles/device/opencl/opencl_split.cpp
@@ -309,6 +309,7 @@ public:
device->opencl_assert_err(device->ciErr, "clEnqueueNDRangeKernel");
device->mem_copy_from(size_buffer, 0, 1, 1, sizeof(uint64_t));
+ size_t size = size_buffer[0];
device->mem_free(size_buffer);
if(device->ciErr != CL_SUCCESS) {
@@ -318,7 +319,7 @@ public:
return 0;
}
- return *size_buffer.get_data();
+ return size;
}
virtual bool enqueue_split_kernel_data_init(const KernelDimensions& dim,