mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cycles: Update OSL GPU services for version 1.15
The required free functions for closure allocation changed, only a single allocation function needs to be defined now. This is needed to fix the failing tests after the 5.2 libraries update. Pull Request: https://projects.blender.org/blender/blender/pulls/158507
This commit is contained in:
parent
3bca53ed35
commit
addf95f48a
1 changed files with 17 additions and 0 deletions
|
|
@ -21,6 +21,21 @@ CCL_NAMESPACE_BEGIN
|
|||
|
||||
/* Closure */
|
||||
|
||||
#if OSL_LIBRARY_VERSION_CODE >= 11500
|
||||
|
||||
ccl_device_extern void *rs_allocate_closure(ccl_private ShaderGlobals *sg,
|
||||
const size_t size,
|
||||
const size_t alignment)
|
||||
{
|
||||
ccl_private uint8_t *closure_pool = sg->closure_pool;
|
||||
closure_pool = reinterpret_cast<ccl_private uint8_t *>(
|
||||
(reinterpret_cast<size_t>(closure_pool) + alignment - 1) & (-alignment));
|
||||
sg->closure_pool = closure_pool + size;
|
||||
return closure_pool;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
ccl_device_extern ccl_private OSLClosure *osl_mul_closure_color(ccl_private ShaderGlobals *sg,
|
||||
ccl_private OSLClosure *a,
|
||||
const ccl_private float3 *weight)
|
||||
|
|
@ -138,6 +153,8 @@ ccl_device_extern ccl_private OSLClosure *osl_allocate_weighted_closure_componen
|
|||
return closure;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Utilities */
|
||||
|
||||
ccl_device_extern void osl_error(ccl_private ShaderGlobals * /*sg*/,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue