diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-05 16:49:15 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-05 16:49:15 +0400 |
commit | 3bf175f27047d9b6894327e5ea7216110288aaa2 (patch) | |
tree | 6ec119c444f3f7192f82f6901123ff4e5ec852de /intern/cycles/kernel/osl/osl_globals.h | |
parent | 83617429cf28f2a19e991a0f71d892fc159a4419 (diff) |
Cycles OSL: image texture lookup optimization, acquire the per thread handle
for texture system in advance. Patch by Martijn Berger, with some tweaks.
There was about a 10% performance improvement on OS X in my tests with the
images.blend test file. This may be less on other platforms because OS X has
particularly slow mutex locks.
Diffstat (limited to 'intern/cycles/kernel/osl/osl_globals.h')
-rw-r--r-- | intern/cycles/kernel/osl/osl_globals.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h index fb569117698..c52b3902679 100644 --- a/intern/cycles/kernel/osl/osl_globals.h +++ b/intern/cycles/kernel/osl/osl_globals.h @@ -87,9 +87,10 @@ struct OSLTraceData { /* thread key for thread specific data lookup */ struct OSLThreadData { OSL::ShaderGlobals globals; - OSL::PerThreadInfo *thread_info; + OSL::PerThreadInfo *osl_thread_info; OSLTraceData tracedata; OSL::ShadingContext *context[SHADER_CONTEXT_NUM]; + OIIO::TextureSystem::Perthread *oiio_thread_info; }; CCL_NAMESPACE_END |