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/device_cuda.cpp
parent92ec4863c22f249a21a5b5224d91fcab5c602100 (diff)
Code refactor: avoid some unnecessary device memory copying.
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r--intern/cycles/device/device_cuda.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index c245d7d8408..0f17b67c8c6 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -840,7 +840,7 @@ public:
}
/* Set Mapping and tag that we need to (re-)upload to device */
- TextureInfo& info = texture_info.get_data()[flat_slot];
+ TextureInfo& info = texture_info[flat_slot];
info.data = (uint64_t)tex;
info.cl_buffer = 0;
info.interpolation = interpolation;
@@ -1911,9 +1911,10 @@ uint64_t CUDASplitKernel::state_buffer_size(device_memory& /*kg*/, device_memory
0, 0, (void**)&args, 0));
device->mem_copy_from(size_buffer, 0, 1, 1, sizeof(uint64_t));
+ size_t size = size_buffer[0];
device->mem_free(size_buffer);
- return *size_buffer.get_data();
+ return size;
}
bool CUDASplitKernel::enqueue_split_kernel_data_init(const KernelDimensions& dim,