Skip to content

Commit

Permalink
Fix userdata derivatives for interpolated params on GPU
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Lecocq <pascal.lecocq@gmail.com>
  • Loading branch information
Pascal Lecocq authored and lecocqp committed May 20, 2023
1 parent abdc966 commit a5342ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/liboslexec/llvm_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ BackendLLVM::llvm_assign_initial_value(const Symbol& sym, bool force)
llvm::Value* dst = llvm_void_ptr(sym);
TypeDesc t = sym.typespec().simpletype();
ll.op_memcpy(dst, src, t.size(), t.basesize());
if (sym.has_derivs())
llvm_zero_derivs(sym);
#endif
} else if (!sym.lockgeom() && !sym.typespec().is_closure()) {
// geometrically-varying param; memcpy its default value
Expand Down

0 comments on commit a5342ab

Please sign in to comment.