diff --git a/intern/cycles/kernel/osl/compat.h b/intern/cycles/kernel/osl/compat.h index a9fc52e8570..feeb598091b 100644 --- a/intern/cycles/kernel/osl/compat.h +++ b/intern/cycles/kernel/osl/compat.h @@ -10,7 +10,11 @@ CCL_NAMESPACE_BEGIN #if OSL_LIBRARY_VERSION_CODE >= 11302 using OSLUStringHash = OSL::ustringhash; +# if OSL_LIBRARY_VERSION_CODE >= 11400 +using OSLUStringRep = OSL::ustringhash; +# else using OSLUStringRep = OSL::ustringrep; +# endif static inline OSL::ustring to_ustring(OSLUStringHash h) { diff --git a/intern/cycles/kernel/osl/services.cpp b/intern/cycles/kernel/osl/services.cpp index 91fa0ebd96b..e5d601d58b5 100644 --- a/intern/cycles/kernel/osl/services.cpp +++ b/intern/cycles/kernel/osl/services.cpp @@ -1640,7 +1640,11 @@ int OSLRenderServices::pointcloud_search(OSL::ShaderGlobals *sg, const float radius, const int max_points, bool sort, +#if OSL_LIBRARY_VERSION_CODE >= 11400 + int *indices, +#else size_t *out_indices, +#endif float *out_distances, const int derivs_offset) { @@ -1649,7 +1653,11 @@ int OSLRenderServices::pointcloud_search(OSL::ShaderGlobals *sg, int OSLRenderServices::pointcloud_get(OSL::ShaderGlobals *sg, OSLUStringHash filename, +#if OSL_LIBRARY_VERSION_CODE >= 11400 + const int *indices, +#else size_t *indices, +#endif const int count, OSLUStringHash attr_name, const TypeDesc attr_type, diff --git a/intern/cycles/kernel/osl/services.h b/intern/cycles/kernel/osl/services.h index d832c0195a8..e9f59eea425 100644 --- a/intern/cycles/kernel/osl/services.h +++ b/intern/cycles/kernel/osl/services.h @@ -142,13 +142,22 @@ class OSLRenderServices : public OSL::RendererServices { const float radius, const int max_points, bool sort, +#if OSL_LIBRARY_VERSION_CODE >= 11400 + int *out_indices, +#else size_t *out_indices, +#endif float *out_distances, int derivs_offset) override; int pointcloud_get(OSL::ShaderGlobals *sg, OSLUStringHash filename, +#if OSL_LIBRARY_VERSION_CODE >= 11400 + const int *indices, +#else size_t *indices, +#endif + const int count, OSLUStringHash attr_name, const TypeDesc attr_type,