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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-09-05 17:41:08 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-09-12 10:39:05 +0300
commit91e0a16f2f7592b93bd41319e4099f6cfa183a05 (patch)
tree0adfef206b48a39a24a97ca1aa668a1fdc5d6361 /intern/cycles/device/device_opencl.cpp
parent49df5d0980c3350bdcd34fa33220693f67f49e29 (diff)
Cycles: Use XDG's .cache folder for cached kernels
Basically just moves cached kernels from ~/.config/blender/BLENDER_VERSION to ~/.cache/cycles/kernels. This has following benefits: - Follows XDG specification more closely, not as if it's totally crucial or measurable by users, but still nice. - Prevents unexpected sizes of config folder, makes disk space used in more predictable for users way. - Allows to share kernels across multiple Blender versions, which makes it easier debugging at the times close to release. - "Copy Previous Settings" operator will no longer be copying possibly gigabytes of cached kernels, which used to lead to really nast disk usage and annoying delays of copying settings. - In the future we can have some smart logic to clear old unused cached kernels. Currently only done for Linux and OSX. Windows still follows old "cache" folder logic, but it's not really important for now because we don't support kernel compilation on this platform yet. Reviewers: dingto, juicyfruit, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D2197
Diffstat (limited to 'intern/cycles/device/device_opencl.cpp')
-rw-r--r--intern/cycles/device/device_opencl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 5c05aeb5569..c43a3878009 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -987,7 +987,7 @@ public:
string clbin = string_printf("cycles_kernel_%s_%s.clbin",
device_md5.c_str(),
kernel_md5.c_str());
- clbin = path_user_get(path_join("cache", clbin));
+ clbin = path_cache_get(path_join("kernels", clbin));
/* path to preprocessed source for debugging */
string clsrc, *debug_src = NULL;
@@ -996,7 +996,7 @@ public:
clsrc = string_printf("cycles_kernel_%s_%s.cl",
device_md5.c_str(),
kernel_md5.c_str());
- clsrc = path_user_get(path_join("cache", clsrc));
+ clsrc = path_cache_get(path_join("kernels", clsrc));
debug_src = &clsrc;
}
@@ -1680,7 +1680,7 @@ public:
string clbin = string_printf("cycles_kernel_%s_%s.clbin",
device_md5.c_str(),
kernel_md5.c_str());
- clbin = path_user_get(path_join("cache", clbin));
+ clbin = path_cache_get(path_join("kernels", clbin));
/* Path to preprocessed source for debugging. */
string clsrc, *debug_src = NULL;
@@ -1688,7 +1688,7 @@ public:
clsrc = string_printf("cycles_kernel_%s_%s.cl",
device_md5.c_str(),
kernel_md5.c_str());
- clsrc = path_user_get(path_join("cache", clsrc));
+ clsrc = path_cache_get(path_join("kernels", clsrc));
debug_src = &clsrc;
}
@@ -2102,7 +2102,7 @@ public:
return false;
}
- string cache_clbin = path_user_get(path_join("cache", clbin));
+ string cache_clbin = path_cache_get(path_join("kernels", clbin));
/* If exists already, try use it. */
if(path_exists(cache_clbin) && load_binary(kernel_path,
@@ -2220,7 +2220,7 @@ public:
if(opencl_kernel_use_debug()) { \
clsrc = string_printf("cycles_kernel_%s_%s_" #name ".cl", \
device_md5.c_str(), kernel_md5.c_str()); \
- clsrc = path_user_get(path_join("cache", clsrc)); \
+ clsrc = path_cache_get(path_join("kernels", clsrc)); \
debug_src = &clsrc; \
} \
if(!load_split_kernel(#name, \