@@ -6929,19 +6929,15 @@ enqueueMemCopyHelper(pi_command_type CommandType, pi_queue Queue, void *Dst,
6929
6929
6930
6930
const auto &ZeCommandList = CommandList->first ;
6931
6931
const auto &WaitList = (*Event)->WaitList ;
6932
- if (WaitList.Length ) {
6933
-
6934
- ZE_CALL (zeCommandListAppendWaitOnEvents,
6935
- (ZeCommandList, WaitList.Length , WaitList.ZeEventList ));
6936
- }
6937
6932
6938
6933
zePrint (" calling zeCommandListAppendMemoryCopy() with\n "
6939
6934
" ZeEvent %#lx\n " ,
6940
6935
pi_cast<std::uintptr_t >(ZeEvent));
6941
6936
printZeEventList (WaitList);
6942
6937
6943
6938
ZE_CALL (zeCommandListAppendMemoryCopy,
6944
- (ZeCommandList, Dst, Src, Size, ZeEvent, 0 , nullptr ));
6939
+ (ZeCommandList, Dst, Src, Size, ZeEvent, WaitList.Length ,
6940
+ WaitList.ZeEventList ));
6945
6941
6946
6942
if (auto Res =
6947
6943
Queue->executeCommandList (CommandList, BlockingWrite, OkToBatch))
@@ -6993,10 +6989,6 @@ static pi_result enqueueMemCopyRectHelper(
6993
6989
const auto &ZeCommandList = CommandList->first ;
6994
6990
const auto &WaitList = (*Event)->WaitList ;
6995
6991
6996
- if (WaitList.Length ) {
6997
- ZE_CALL (zeCommandListAppendWaitOnEvents,
6998
- (ZeCommandList, WaitList.Length , WaitList.ZeEventList ));
6999
- }
7000
6992
zePrint (" calling zeCommandListAppendMemoryCopy() with\n "
7001
6993
" ZeEvent %#lx\n " ,
7002
6994
pi_cast<std::uintptr_t >(ZeEvent));
@@ -7035,8 +7027,8 @@ static pi_result enqueueMemCopyRectHelper(
7035
7027
7036
7028
ZE_CALL (zeCommandListAppendMemoryCopyRegion,
7037
7029
(ZeCommandList, DstBuffer, &ZeDstRegion, DstPitch, DstSlicePitch,
7038
- SrcBuffer, &ZeSrcRegion, SrcPitch, SrcSlicePitch, nullptr , 0 ,
7039
- nullptr ));
7030
+ SrcBuffer, &ZeSrcRegion, SrcPitch, SrcSlicePitch, nullptr ,
7031
+ WaitList. Length , WaitList. ZeEventList ));
7040
7032
7041
7033
zePrint (" calling zeCommandListAppendMemoryCopyRegion()\n " );
7042
7034
@@ -7250,14 +7242,9 @@ enqueueMemFillHelper(pi_command_type CommandType, pi_queue Queue, void *Ptr,
7250
7242
const auto &ZeCommandList = CommandList->first ;
7251
7243
const auto &WaitList = (*Event)->WaitList ;
7252
7244
7253
- if (WaitList.Length ) {
7254
- ZE_CALL (zeCommandListAppendWaitOnEvents,
7255
- (ZeCommandList, WaitList.Length , WaitList.ZeEventList ));
7256
- }
7257
-
7258
- ZE_CALL (
7259
- zeCommandListAppendMemoryFill,
7260
- (ZeCommandList, Ptr, Pattern, PatternSize, Size, ZeEvent, 0 , nullptr ));
7245
+ ZE_CALL (zeCommandListAppendMemoryFill,
7246
+ (ZeCommandList, Ptr, Pattern, PatternSize, Size, ZeEvent,
7247
+ WaitList.Length , WaitList.ZeEventList ));
7261
7248
7262
7249
zePrint (" calling zeCommandListAppendMemoryFill() with\n "
7263
7250
" ZeEvent %#lx\n " ,
@@ -7669,10 +7656,6 @@ static pi_result enqueueMemImageCommandHelper(
7669
7656
const auto &ZeCommandList = CommandList->first ;
7670
7657
const auto &WaitList = (*Event)->WaitList ;
7671
7658
7672
- if (WaitList.Length ) {
7673
- ZE_CALL (zeCommandListAppendWaitOnEvents,
7674
- (ZeCommandList, WaitList.Length , WaitList.ZeEventList ));
7675
- }
7676
7659
if (CommandType == PI_COMMAND_TYPE_IMAGE_READ) {
7677
7660
pi_mem SrcMem = pi_cast<pi_mem>(const_cast <void *>(Src));
7678
7661
@@ -7709,7 +7692,7 @@ static pi_result enqueueMemImageCommandHelper(
7709
7692
SrcMem->getZeHandle (ZeHandleSrc, _pi_mem::read_only, Queue->Device ));
7710
7693
ZE_CALL (zeCommandListAppendImageCopyToMemory,
7711
7694
(ZeCommandList, Dst, pi_cast<ze_image_handle_t >(ZeHandleSrc),
7712
- &ZeSrcRegion, ZeEvent, 0 , nullptr ));
7695
+ &ZeSrcRegion, ZeEvent, WaitList. Length , WaitList. ZeEventList ));
7713
7696
} else if (CommandType == PI_COMMAND_TYPE_IMAGE_WRITE) {
7714
7697
pi_mem DstMem = pi_cast<pi_mem>(Dst);
7715
7698
ze_image_region_t ZeDstRegion;
@@ -7743,7 +7726,7 @@ static pi_result enqueueMemImageCommandHelper(
7743
7726
DstMem->getZeHandle (ZeHandleDst, _pi_mem::write_only, Queue->Device ));
7744
7727
ZE_CALL (zeCommandListAppendImageCopyFromMemory,
7745
7728
(ZeCommandList, pi_cast<ze_image_handle_t >(ZeHandleDst), Src,
7746
- &ZeDstRegion, ZeEvent, 0 , nullptr ));
7729
+ &ZeDstRegion, ZeEvent, WaitList. Length , WaitList. ZeEventList ));
7747
7730
} else if (CommandType == PI_COMMAND_TYPE_IMAGE_COPY) {
7748
7731
pi_mem SrcImage = pi_cast<pi_mem>(const_cast <void *>(Src));
7749
7732
pi_mem DstImage = pi_cast<pi_mem>(Dst);
0 commit comments