Skip to content

Commit

Permalink
Add missing CUDA/OptiX contexts before API calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
njroussel committed Jun 3, 2024
1 parent cdd489c commit 19bf5a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ext/drjit
1 change: 1 addition & 0 deletions src/render/optixdenoiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ MI_VARIANT OptixDenoiser<Float, Spectrum>::OptixDenoiser(
}

MI_VARIANT OptixDenoiser<Float, Spectrum>::~OptixDenoiser() {
scoped_optix_context guard;
if (m_denoiser != nullptr)
jit_optix_check(optixDenoiserDestroy(m_denoiser));
jit_free(m_hdr_intensity);
Expand Down
1 change: 1 addition & 0 deletions src/render/scene_optix.inl
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ MI_VARIANT void Scene<Float, Spectrum>::accel_parameters_changed_gpu() {
dr::sync_thread();
OptixSceneState &s = *(OptixSceneState *) m_accel;
const OptixConfig &config = optix_configs[s.config_index];
scoped_optix_context guard;

if (!m_shapes.empty()) {
// Build geometry acceleration structures for all the shapes
Expand Down

0 comments on commit 19bf5a4

Please sign in to comment.