Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
iaomw committed Oct 18, 2024
1 parent edbf3b7 commit ef15eec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions zenovis/xinxinoptix/XAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ namespace xinxinoptix {
inline void buildIAS(OptixDeviceContext& context, OptixAccelBuildOptions& accel_options, std::vector<OptixInstance>& instances,
raii<CUdeviceptr>& bufferIAS, OptixTraversableHandle& handleIAS)
{

if (instances.empty()) {
bufferIAS.reset();
handleIAS = 0llu;
return;
}

raii<CUdeviceptr> d_instances;
const size_t size_in_bytes = sizeof( OptixInstance ) * instances.size();
CUDA_CHECK( cudaMalloc( reinterpret_cast<void**>( &d_instances.reset() ), size_in_bytes ) );
Expand Down

0 comments on commit ef15eec

Please sign in to comment.