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
Showing only changes of commit 2635328c47 - Show all commits

View File

@ -1165,7 +1165,11 @@ bool OSLRenderServices::get_userdata(
return false; /* disabled by lockgeom */ 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, TextureSystem::TextureHandle *OSLRenderServices::get_texture_handle(OSLUStringHash filename,
OSL::ShadingContext *) OSL::ShadingContext *)
#else #else
@ -1616,7 +1620,17 @@ bool OSLRenderServices::environment(OSLUStringHash filename,
return status; 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, bool OSLRenderServices::get_texture_info(OSLUStringHash filename,
TextureHandle *texture_handle, TextureHandle *texture_handle,
TexturePerthread *texture_thread_info, TexturePerthread *texture_thread_info,

View File

@ -189,7 +189,11 @@ class OSLRenderServices : public OSL::RendererServices {
void *val, void *val,
bool derivatives) override; 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, TextureSystem::TextureHandle *get_texture_handle(OSLUStringHash filename,
OSL::ShadingContext *context) override; OSL::ShadingContext *context) override;
#else #else
@ -245,7 +249,17 @@ class OSLRenderServices : public OSL::RendererServices {
float *dresultdt, float *dresultdt,
OSLUStringHash *errormessage) override; 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, bool get_texture_info(OSLUStringHash filename,
TextureHandle *texture_handle, TextureHandle *texture_handle,
TexturePerthread *texture_thread_info, TexturePerthread *texture_thread_info,

View File

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