Update osl to work with version 1.13.6 #11

Closed
howetuft wants to merge 1 commits from howetuft/cycles:osl into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
3 changed files with 36 additions and 4 deletions

View File

@ -1165,7 +1165,11 @@ bool OSLRenderServices::get_userdata(
return false; /* disabled by lockgeom */
}
#if OSL_LIBRARY_VERSION_CODE >= 11100
#if OSL_LIBRARY_VERSION_CODE >= 11306
TextureSystem::TextureHandle *OSLRenderServices::get_texture_handle(OSLUStringHash filename,
OSL::ShadingContext *context,
const OSL::TextureOpt* options)
#elif OSL_LIBRARY_VERSION_CODE >= 11100
TextureSystem::TextureHandle *OSLRenderServices::get_texture_handle(OSLUStringHash filename,
OSL::ShadingContext *)
#else
@ -1616,7 +1620,17 @@ bool OSLRenderServices::environment(OSLUStringHash filename,
return status;
}
#if OSL_LIBRARY_VERSION_CODE >= 11100
#if OSL_LIBRARY_VERSION_CODE >= 11306
bool OSLRenderServices::get_texture_info(OSLUStringHash filename,
TextureHandle *texture_handle,
TexturePerthread *texture_thread_info,
OSL::ShaderGlobals* sg,
int subimage,
OSLUStringHash dataname,
TypeDesc datatype,
void *data,
OSLUStringHash *errormessage)
#elif OSL_LIBRARY_VERSION_CODE >= 11100
bool OSLRenderServices::get_texture_info(OSLUStringHash filename,
TextureHandle *texture_handle,
TexturePerthread *texture_thread_info,

View File

@ -189,7 +189,11 @@ class OSLRenderServices : public OSL::RendererServices {
void *val,
bool derivatives) override;
#if OSL_LIBRARY_VERSION_CODE >= 11100
#if OSL_LIBRARY_VERSION_CODE >= 11306
TextureSystem::TextureHandle *get_texture_handle(OSLUStringHash filename,
OSL::ShadingContext *context,
const OSL::TextureOpt* options) override;
#elif OSL_LIBRARY_VERSION_CODE >= 11100
TextureSystem::TextureHandle *get_texture_handle(OSLUStringHash filename,
OSL::ShadingContext *context) override;
#else
@ -245,7 +249,17 @@ class OSLRenderServices : public OSL::RendererServices {
float *dresultdt,
OSLUStringHash *errormessage) override;
#if OSL_LIBRARY_VERSION_CODE >= 11100
#if OSL_LIBRARY_VERSION_CODE >= 11306
bool get_texture_info(OSLUStringHash filename,
TextureHandle *texture_handle,
TexturePerthread *texture_thread_info,
OSL::ShaderGlobals* sg,
int subimage,
OSLUStringHash dataname,
TypeDesc datatype,
void *data,
OSLUStringHash *errormessage) override;
#elif OSL_LIBRARY_VERSION_CODE >= 11100
bool get_texture_info(OSLUStringHash filename,
TextureHandle *texture_handle,
TexturePerthread *texture_thread_info,

View File

@ -88,6 +88,10 @@ struct ShaderGlobals {
void *context;
#if OSL_LIBRARY_VERSION_CODE >= 11302
void *shadingStateUniform;
#endif
#if OSL_LIBRARY_VERSION_CODE >= 11306
int thread_index;
int shade_index;
#endif
void *renderer;
ccl_private void *object2common;