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-21 02:09:59 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-24 02:25:19 +0300
commit070a668d04844610059aaedc80c49e9038fd1779 (patch)
treecad5c64972e45b4ee19cc8e11cdd9adedd7a2f08 /intern/cycles/util
parentaa8b4c5d8124c0379eeee9eacd1a0887a573d7d7 (diff)
Code refactor: move more memory allocation logic into device API.
* Remove tex_* and pixels_* functions, replace by mem_*. * Add MEM_TEXTURE and MEM_PIXELS as memory types recognized by devices. * No longer create device_memory and call mem_* directly, always go through device_only_memory, device_vector and device_pixels.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_vector.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/util/util_vector.h b/intern/cycles/util/util_vector.h
index 9e74505b14a..ca6b56c9c7e 100644
--- a/intern/cycles/util/util_vector.h
+++ b/intern/cycles/util/util_vector.h
@@ -177,6 +177,14 @@ public:
}
}
+ T *steal_pointer()
+ {
+ T *ptr = data_;
+ data_ = NULL;
+ clear();
+ return ptr;
+ }
+
T* resize(size_t newsize)
{
if(newsize == 0) {