Skip to content

Commit

Permalink
Mock gpu pointcloud_search calls with empty custom attributes
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Hellmuth <[email protected]>
  • Loading branch information
chellmuth committed Sep 6, 2024
1 parent b472adc commit 68aaf26
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/liboslexec/llvm_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3963,7 +3963,9 @@ LLVMGEN(llvm_gen_pointcloud_search)
else
clear_derivs_of.push_back(&Value);
}
} else {
} else if (!rop.use_optix()) {
//TODO: Implement custom attribute arguments for OptiX

// It is a regular attribute, push it to the arg list
args.push_back(rop.llvm_load_value(Name));
args.push_back(rop.ll.constant(simpletype));
Expand All @@ -3977,7 +3979,14 @@ LLVMGEN(llvm_gen_pointcloud_search)
capacity);
}

args[9] = rop.ll.constant(extra_attrs);
if (rop.use_optix()) {
// TODO: Implement proper variadic arguments for OptiX.
// In the meantime, dropping the custom attributes lets shader ptx compile properly.
args[9] = rop.ll.constant(0);
args.push_back(rop.ll.void_ptr_null());
} else {
args[9] = rop.ll.constant(extra_attrs);
}

if (Max_points.is_constant()) {
// Compare capacity to the requested number of points.
Expand Down

0 comments on commit 68aaf26

Please sign in to comment.