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:
authorlazydodo <github@lazydodo.com>2017-04-07 19:25:54 +0300
committerlazydodo <github@lazydodo.com>2017-04-07 19:26:55 +0300
commitb332fc8f23c9995923abbf526e67517f1a26f073 (patch)
tree195169e3c7b8a1a2820a951b800a43668d53cfe3 /intern/cycles/util/util_types.h
parent8e0cdfd0c916e30b1496d0632e824042e9406cd5 (diff)
[Cycles/msvc] Get cycles_kernel compile time under control.
Ever since we merged the extra texture types (half etc) and spit kernel the compile time for cycles_kernel has been going out of control. It's currently sitting at a cool 1295.762 seconds with our standard compiler (2013/x64/release) I'm not entirely sure why msvc gets upset with it, but the inlining of matrix near the bottom of the tri-cubic 3d interpolator is the source of the issue, this patch excludes it from being inlined. This patch bring it back down to a manageable 186 seconds. (7x faster!!) with the attached bzzt.blend that @sergey kindly provided i got the following results with builds with identical hashes 58:51.73 buildbot 58:04.23 Patched it's really close, the slight speedup could be explained by the switch instead of having multiple if's (switches do generate more optimal code than a chain of if/else/if/else statements) but in all honesty it might just have been pure luck (dev box,very polluted, bad for benchmarks) regardless, this patch doesn't seem to slow down anything with my limited testing. {F532336} {F532337} Reviewers: brecht, lukasstockner97, juicyfruit, dingto, sergey Reviewed By: brecht, dingto, sergey Subscribers: InsigMathK, sergey Tags: #cycles Differential Revision: https://developer.blender.org/D2595
Diffstat (limited to 'intern/cycles/util/util_types.h')
-rw-r--r--intern/cycles/util/util_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h
index bf4a134b998..aa22f6a2c57 100644
--- a/intern/cycles/util/util_types.h
+++ b/intern/cycles/util/util_types.h
@@ -55,6 +55,7 @@
#endif
#define ccl_may_alias
#define ccl_always_inline __forceinline
+#define ccl_never_inline __declspec(noinline)
#define ccl_maybe_unused
#else
@@ -68,6 +69,7 @@
#define ccl_try_align(...) __attribute__((aligned(__VA_ARGS__)))
#define ccl_may_alias __attribute__((__may_alias__))
#define ccl_always_inline __attribute__((always_inline))
+#define ccl_never_inline __attribute__((noinline))
#define ccl_maybe_unused __attribute__((used))
#endif