You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add rs_allocate_debug_closure renderer customization point
Add a new free function rs_allocate_debug_closure that is called
instead of rs_allocate_closure specifically when allocating the OSL
debug() closure. This allows renderers to handle debug closure
allocation differently from regular closures -- for example, allocating
from a separate pool, returning nullptr to suppress debug closures in
production, or tracking debug closure usage separately.
The closure name is known at JIT compile time, so both the scalar
(llvm_gen.cpp) and batched (batched_llvm_gen.cpp) codegen paths check
for closure_name == "debug" and emit calls to the new
osl_allocate_debug_closure_component /
osl_allocate_weighted_debug_closure_component functions, which in turn
call rs_allocate_debug_closure instead of rs_allocate_closure.
All default/fallback implementations simply delegate to
rs_allocate_closure, preserving existing behavior.
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Assisted-by: Claude Code / Opus 4.6
0 commit comments