Skip to content

Commit 14850d6

Browse files
Fixed bug where optix would fail after a recording threw an exception
1 parent 6c14e5d commit 14850d6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/record_ts.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,11 @@ Task *RecordThreadState::launch(Kernel kernel, KernelKey *key,
668668
}
669669
}
670670
pause_scope pause(this);
671+
// Forward the OptiX SBT and pipeline to the internal thread state.
672+
#if defined(DRJIT_ENABLE_OPTIX)
673+
m_internal->optix_pipeline = optix_pipeline;
674+
m_internal->optix_sbt = optix_sbt;
675+
#endif
671676
return m_internal->launch(kernel, key, hash, size, params, nullptr,
672677
kernel_history_entry);
673678
}
@@ -875,13 +880,6 @@ void RecordThreadState::record_launch(
875880
}
876881

877882
m_recording.operations.push_back(op);
878-
879-
// Re-assign optix specific variables to internal thread state since they
880-
// might have changed
881-
#if defined(DRJIT_ENABLE_OPTIX)
882-
m_internal->optix_pipeline = optix_pipeline;
883-
m_internal->optix_sbt = optix_sbt;
884-
#endif
885883
}
886884

887885
int Recording::replay_launch(Operation &op) {

0 commit comments

Comments
 (0)