File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,16 @@ ur_result_t ze2urImageFormat(const ze_image_desc_t *ZeImageDesc,
265265 return UR_RESULT_SUCCESS;
266266}
267267
268+ static bool Is3ChannelOrder (ur_image_channel_order_t ChannelOrder) {
269+ switch (ChannelOrder) {
270+ case UR_IMAGE_CHANNEL_ORDER_RGB:
271+ case UR_IMAGE_CHANNEL_ORDER_RGX:
272+ return true ;
273+ default :
274+ return false ;
275+ }
276+ }
277+
268278// / Construct ZE image desc from UR image format and desc.
269279ur_result_t ur2zeImageDesc (const ur_image_format_t *ImageFormat,
270280 const ur_image_desc_t *ImageDesc,
@@ -843,6 +853,14 @@ ur_result_t urBindlessImagesImageCopyExp(
843853 UR_CALL (ur2zeImageDesc (pSrcImageFormat, pSrcImageDesc, ZeImageDesc));
844854
845855 bool UseCopyEngine = hQueue->useCopyEngine (/* PreferCopyEngine*/ true );
856+ // Due to the limitation of the copy engine, disable usage of Copy Engine
857+ // Given 3 channel image
858+ if (Is3ChannelOrder (
859+ ur_cast<ur_image_channel_order_t >(pSrcImageFormat->channelOrder )) ||
860+ Is3ChannelOrder (
861+ ur_cast<ur_image_channel_order_t >(pDstImageFormat->channelOrder ))) {
862+ UseCopyEngine = false ;
863+ }
846864
847865 _ur_ze_event_list_t TmpWaitList;
848866 UR_CALL (TmpWaitList.createAndRetainUrZeEventList (
You can’t perform that action at this time.
0 commit comments