OpenShadingLanguage: Compatibility with version 1.14 (beta)

Pull Request: https://projects.blender.org/blender/blender/pulls/132654
This commit is contained in:
Brecht Van Lommel
2025-01-05 01:19:04 +01:00
parent c3c05559d6
commit faa17e2cc6
3 changed files with 21 additions and 0 deletions
+4
View File
@@ -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)
{
+8
View File
@@ -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,
+9
View File
@@ -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,