diff options
Diffstat (limited to 'intern/cycles/kernel/osl/services.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/services.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/intern/cycles/kernel/osl/services.cpp b/intern/cycles/kernel/osl/services.cpp index cff3e24a739..b744422ee78 100644 --- a/intern/cycles/kernel/osl/services.cpp +++ b/intern/cycles/kernel/osl/services.cpp @@ -20,7 +20,6 @@ #include "kernel/osl/globals.h" #include "kernel/osl/services.h" -#include "kernel/osl/shader.h" #include "util/foreach.h" #include "util/log.h" @@ -30,8 +29,6 @@ #include "kernel/device/cpu/globals.h" #include "kernel/device/cpu/image.h" -#include "kernel/util/differential.h" - #include "kernel/integrator/state.h" #include "kernel/integrator/state_flow.h" @@ -123,14 +120,14 @@ ustring OSLRenderServices::u_v("v"); ustring OSLRenderServices::u_empty; OSLRenderServices::OSLRenderServices(OSL::TextureSystem *texture_system) - : texture_system(texture_system) + : OSL::RendererServices(texture_system) { } OSLRenderServices::~OSLRenderServices() { - if (texture_system) { - VLOG_INFO << "OSL texture system stats:\n" << texture_system->getstats(); + if (m_texturesys) { + VLOG_INFO << "OSL texture system stats:\n" << m_texturesys->getstats(); } } @@ -1150,7 +1147,7 @@ TextureSystem::TextureHandle *OSLRenderServices::get_texture_handle(ustring file } /* Get handle from OpenImageIO. */ - OSL::TextureSystem *ts = texture_system; + OSL::TextureSystem *ts = m_texturesys; TextureSystem::TextureHandle *handle = ts->get_texture_handle(filename); if (handle == NULL) { return NULL; @@ -1172,7 +1169,7 @@ bool OSLRenderServices::good(TextureSystem::TextureHandle *texture_handle) OSLTextureHandle *handle = (OSLTextureHandle *)texture_handle; if (handle->oiio_handle) { - OSL::TextureSystem *ts = texture_system; + OSL::TextureSystem *ts = m_texturesys; return ts->good(handle->oiio_handle); } else { @@ -1294,7 +1291,7 @@ bool OSLRenderServices::texture(ustring filename, } case OSLTextureHandle::OIIO: { /* OpenImageIO texture cache. */ - OSL::TextureSystem *ts = texture_system; + OSL::TextureSystem *ts = m_texturesys; if (handle && handle->oiio_handle) { if (texture_thread_info == NULL) { @@ -1398,7 +1395,7 @@ bool OSLRenderServices::texture3d(ustring filename, } case OSLTextureHandle::OIIO: { /* OpenImageIO texture cache. */ - OSL::TextureSystem *ts = texture_system; + OSL::TextureSystem *ts = m_texturesys; if (handle && handle->oiio_handle) { if (texture_thread_info == NULL) { @@ -1482,7 +1479,7 @@ bool OSLRenderServices::environment(ustring filename, ustring *errormessage) { OSLTextureHandle *handle = (OSLTextureHandle *)texture_handle; - OSL::TextureSystem *ts = texture_system; + OSL::TextureSystem *ts = m_texturesys; bool status = false; if (handle && handle->oiio_handle) { @@ -1554,7 +1551,7 @@ bool OSLRenderServices::get_texture_info(OSL::ShaderGlobals *sg, } /* Get texture info from OpenImageIO. */ - OSL::TextureSystem *ts = texture_system; + OSL::TextureSystem *ts = m_texturesys; return ts->get_texture_info(filename, subimage, dataname, datatype, data); } |