diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-02 20:15:18 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-02 20:15:18 +0400 |
commit | 67030aaf84229b4d0dc52fbe07e91c2c9d320b0d (patch) | |
tree | 9b8d2402b3dd92134d78d1661d678effd8a70ecd /intern/cycles/device/device_opencl.cpp | |
parent | 1135875ab1501ff38184b91dc541aa8a2fe89c92 (diff) |
Cycles: optimizations for instances in scene updates before render starts,
should load a non-trivial mesh instanced many times quite a bit faster now.
Diffstat (limited to 'intern/cycles/device/device_opencl.cpp')
-rw-r--r-- | intern/cycles/device/device_opencl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index 9d25b6df529..787f0e6feab 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -217,8 +217,13 @@ public: if(!opencl_version_check()) return false; + /* nvidia opencl cache doesn't not work correct with includes, so force recompile */ + static double recompile_trick = 0.0; + if(recompile_trick == 0.0) + recompile_trick = time_dt(); + /* compile source */ - string source = string_printf("#include \"kernel.cl\" // %lf\n", time_dt()); + string source = string_printf("#include \"kernel.cl\" // %lf\n", recompile_trick); size_t source_len = source.size(); const char *source_str = source.c_str(); |