File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -644,12 +644,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferReadRect(
644
644
&hBuffer->LastEventWritingToMemObj ));
645
645
}
646
646
647
+ ScopedContext Active (Device);
648
+
647
649
UR_CHECK_ERROR (enqueueEventsWait (hQueue, Stream, numEventsInWaitList,
648
650
phEventWaitList));
649
651
650
- // enqueueEventsWait may set a context so we need to reset it here
651
- ScopedContext Active (Device);
652
-
653
652
if (phEvent) {
654
653
RetImplEvent =
655
654
std::unique_ptr<ur_event_handle_t_>(ur_event_handle_t_::makeNative (
@@ -1655,12 +1654,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferRead(
1655
1654
&hBuffer->LastEventWritingToMemObj ));
1656
1655
}
1657
1656
1657
+ ScopedContext Active (Device);
1658
+
1658
1659
UR_CHECK_ERROR (enqueueEventsWait (hQueue, Stream, numEventsInWaitList,
1659
1660
phEventWaitList));
1660
1661
1661
- // enqueueEventsWait may set a context so we need to reset it here
1662
- ScopedContext Active (Device);
1663
-
1664
1662
if (phEvent) {
1665
1663
RetImplEvent =
1666
1664
std::unique_ptr<ur_event_handle_t_>(ur_event_handle_t_::makeNative (
You can’t perform that action at this time.
0 commit comments