@@ -230,16 +230,16 @@ fill_image_desc(const ext::oneapi::experimental::image_descriptor &ImgDesc) {
230230 return UrDesc;
231231}
232232
233- static void
234- fill_copy_args ( detail::handler_impl *impl,
235- const ext::oneapi::experimental::image_descriptor &SrcImgDesc,
236- const ext::oneapi::experimental::image_descriptor &DestImgDesc,
237- ur_exp_image_copy_flags_t ImageCopyFlags, size_t SrcPitch ,
238- size_t DestPitch, sycl::range< 3 > SrcOffset = { 0 , 0 , 0 } ,
239- sycl::range<3 > SrcExtent = {0 , 0 , 0 },
240- sycl::range<3 > DestOffset = {0 , 0 , 0 },
241- sycl::range<3 > DestExtent = {0 , 0 , 0 },
242- sycl::range<3 > CopyExtent = {0 , 0 , 0 }) {
233+ static void fill_copy_args (
234+ detail::handler_impl *impl,
235+ const ext::oneapi::experimental::image_descriptor &SrcImgDesc,
236+ const ext::oneapi::experimental::image_descriptor &DestImgDesc,
237+ ur_exp_image_copy_flags_t ImageCopyFlags,
238+ ur_exp_image_copy_input_types_t ImageCopyInputTypes, size_t SrcPitch ,
239+ size_t DestPitch, sycl::range<3 > SrcOffset = {0 , 0 , 0 },
240+ sycl::range< 3 > SrcExtent = { 0 , 0 , 0 }, sycl::range<3 > DestOffset = {0 , 0 , 0 },
241+ sycl::range<3 > DestExtent = {0 , 0 , 0 },
242+ sycl::range<3 > CopyExtent = {0 , 0 , 0 }) {
243243 SrcImgDesc.verify ();
244244 DestImgDesc.verify ();
245245
@@ -274,6 +274,7 @@ fill_copy_args(detail::handler_impl *impl,
274274 impl->MSrcImageFormat = UrSrcFormat;
275275 impl->MDstImageFormat = UrDestFormat;
276276 impl->MImageCopyFlags = ImageCopyFlags;
277+ impl->MImageCopyInputTypes = ImageCopyInputTypes;
277278
278279 if (CopyExtent.size () != 0 ) {
279280 impl->MCopyExtent = {CopyExtent[0 ] * SrcPixelSize, CopyExtent[1 ],
@@ -303,6 +304,7 @@ static void
303304fill_copy_args (detail::handler_impl *impl,
304305 const ext::oneapi::experimental::image_descriptor &Desc,
305306 ur_exp_image_copy_flags_t ImageCopyFlags,
307+ ur_exp_image_copy_input_types_t ImageCopyInputTypes,
306308 sycl::range<3 > SrcOffset = {0 , 0 , 0 },
307309 sycl::range<3 > SrcExtent = {0 , 0 , 0 },
308310 sycl::range<3 > DestOffset = {0 , 0 , 0 },
@@ -312,29 +314,32 @@ fill_copy_args(detail::handler_impl *impl,
312314 size_t SrcPitch = SrcExtent[0 ] * Desc.num_channels * get_channel_size (Desc);
313315 size_t DestPitch = DestExtent[0 ] * Desc.num_channels * get_channel_size (Desc);
314316
315- fill_copy_args (impl, Desc, Desc, ImageCopyFlags, SrcPitch, DestPitch,
316- SrcOffset, SrcExtent, DestOffset, DestExtent, CopyExtent);
317+ fill_copy_args (impl, Desc, Desc, ImageCopyFlags, ImageCopyInputTypes,
318+ SrcPitch, DestPitch, SrcOffset, SrcExtent, DestOffset,
319+ DestExtent, CopyExtent);
317320}
318321
319- static void
320- fill_copy_args ( detail::handler_impl *impl,
321- const ext::oneapi::experimental::image_descriptor &Desc,
322- ur_exp_image_copy_flags_t ImageCopyFlags, size_t SrcPitch ,
323- size_t DestPitch, sycl::range< 3 > SrcOffset = { 0 , 0 , 0 } ,
324- sycl::range<3 > SrcExtent = {0 , 0 , 0 },
325- sycl::range<3 > DestOffset = {0 , 0 , 0 },
326- sycl::range<3 > DestExtent = {0 , 0 , 0 },
327- sycl::range<3 > CopyExtent = {0 , 0 , 0 }) {
322+ static void fill_copy_args (
323+ detail::handler_impl *impl,
324+ const ext::oneapi::experimental::image_descriptor &Desc,
325+ ur_exp_image_copy_flags_t ImageCopyFlags,
326+ ur_exp_image_copy_input_types_t ImageCopyInputTypes, size_t SrcPitch ,
327+ size_t DestPitch, sycl::range<3 > SrcOffset = {0 , 0 , 0 },
328+ sycl::range< 3 > SrcExtent = { 0 , 0 , 0 }, sycl::range<3 > DestOffset = {0 , 0 , 0 },
329+ sycl::range<3 > DestExtent = {0 , 0 , 0 },
330+ sycl::range<3 > CopyExtent = {0 , 0 , 0 }) {
328331
329- fill_copy_args (impl, Desc, Desc, ImageCopyFlags, SrcPitch, DestPitch,
330- SrcOffset, SrcExtent, DestOffset, DestExtent, CopyExtent);
332+ fill_copy_args (impl, Desc, Desc, ImageCopyFlags, ImageCopyInputTypes,
333+ SrcPitch, DestPitch, SrcOffset, SrcExtent, DestOffset,
334+ DestExtent, CopyExtent);
331335}
332336
333337static void
334338fill_copy_args (detail::handler_impl *impl,
335339 const ext::oneapi::experimental::image_descriptor &SrcImgDesc,
336340 const ext::oneapi::experimental::image_descriptor &DestImgDesc,
337341 ur_exp_image_copy_flags_t ImageCopyFlags,
342+ ur_exp_image_copy_input_types_t ImageCopyInputTypes,
338343 sycl::range<3 > SrcOffset = {0 , 0 , 0 },
339344 sycl::range<3 > SrcExtent = {0 , 0 , 0 },
340345 sycl::range<3 > DestOffset = {0 , 0 , 0 },
@@ -346,9 +351,9 @@ fill_copy_args(detail::handler_impl *impl,
346351 size_t DestPitch =
347352 DestExtent[0 ] * DestImgDesc.num_channels * get_channel_size (DestImgDesc);
348353
349- fill_copy_args (impl, SrcImgDesc, DestImgDesc, ImageCopyFlags, SrcPitch,
350- DestPitch, SrcOffset, SrcExtent, DestOffset, DestExtent ,
351- CopyExtent);
354+ fill_copy_args (impl, SrcImgDesc, DestImgDesc, ImageCopyFlags,
355+ ImageCopyInputTypes, SrcPitch, DestPitch, SrcOffset, SrcExtent ,
356+ DestOffset, DestExtent, CopyExtent);
352357}
353358
354359} // namespace detail
@@ -871,8 +876,8 @@ event handler::finalize() {
871876 CommandGroup.reset (new detail::CGCopyImage (
872877 MSrcPtr, MDstPtr, impl->MSrcImageDesc , impl->MDstImageDesc ,
873878 impl->MSrcImageFormat , impl->MDstImageFormat , impl->MImageCopyFlags ,
874- impl->MSrcOffset , impl->MDestOffset , impl->MCopyExtent ,
875- std::move (impl->CGData ), MCodeLoc));
879+ impl->MImageCopyInputTypes , impl->MSrcOffset , impl->MDestOffset ,
880+ impl-> MCopyExtent , std::move (impl->CGData ), MCodeLoc));
876881 break ;
877882 case detail::CGType::SemaphoreWait:
878883 CommandGroup.reset (
@@ -1588,7 +1593,8 @@ void handler::ext_oneapi_copy(
15881593 MDstPtr = reinterpret_cast <void *>(Dest.raw_handle );
15891594
15901595 detail::fill_copy_args (get_impl (), DestImgDesc,
1591- UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE);
1596+ UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE,
1597+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE);
15921598
15931599 setType (detail::CGType::CopyImage);
15941600}
@@ -1606,7 +1612,8 @@ void handler::ext_oneapi_copy(
16061612 MDstPtr = reinterpret_cast <void *>(Dest.raw_handle );
16071613
16081614 detail::fill_copy_args (get_impl (), DestImgDesc,
1609- UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE, SrcOffset,
1615+ UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE,
1616+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE, SrcOffset,
16101617 SrcExtent, DestOffset, {0 , 0 , 0 }, CopyExtent);
16111618
16121619 setType (detail::CGType::CopyImage);
@@ -1623,7 +1630,8 @@ void handler::ext_oneapi_copy(
16231630 MDstPtr = Dest;
16241631
16251632 detail::fill_copy_args (get_impl (), SrcImgDesc,
1626- UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST);
1633+ UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST,
1634+ UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM);
16271635
16281636 setType (detail::CGType::CopyImage);
16291637}
@@ -1642,7 +1650,8 @@ void handler::ext_oneapi_copy(
16421650 MDstPtr = Dest;
16431651
16441652 detail::fill_copy_args (get_impl (), SrcImgDesc,
1645- UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST, SrcOffset,
1653+ UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST,
1654+ UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM, SrcOffset,
16461655 {0 , 0 , 0 }, DestOffset, DestExtent, CopyExtent);
16471656
16481657 setType (detail::CGType::CopyImage);
@@ -1671,11 +1680,13 @@ void handler::ext_oneapi_copy(
16711680 Desc.width * Desc.num_channels * detail::get_channel_size (Desc);
16721681
16731682 if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) {
1674- detail::fill_copy_args (get_impl (), Desc, ImageCopyFlags, HostRowPitch,
1675- DeviceRowPitch);
1683+ detail::fill_copy_args (get_impl (), Desc, ImageCopyFlags,
1684+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
1685+ HostRowPitch, DeviceRowPitch);
16761686 } else if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) {
1677- detail::fill_copy_args (get_impl (), Desc, ImageCopyFlags, DeviceRowPitch,
1678- HostRowPitch);
1687+ detail::fill_copy_args (get_impl (), Desc, ImageCopyFlags,
1688+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
1689+ DeviceRowPitch, HostRowPitch);
16791690 } else {
16801691 throw sycl::exception (make_error_code (errc::invalid),
16811692 " Copy Error: This copy function only performs host "
@@ -1712,10 +1723,12 @@ void handler::ext_oneapi_copy(
17121723 // Fill the host extent based on the type of copy.
17131724 if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) {
17141725 detail::fill_copy_args (get_impl (), DeviceImgDesc, ImageCopyFlags,
1726+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
17151727 HostRowPitch, DeviceRowPitch, SrcOffset, HostExtent,
17161728 DestOffset, {0 , 0 , 0 }, CopyExtent);
17171729 } else if (ImageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) {
17181730 detail::fill_copy_args (get_impl (), DeviceImgDesc, ImageCopyFlags,
1731+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM,
17191732 DeviceRowPitch, HostRowPitch, SrcOffset, {0 , 0 , 0 },
17201733 DestOffset, HostExtent, CopyExtent);
17211734 } else {
@@ -1740,7 +1753,8 @@ void handler::ext_oneapi_copy(
17401753 MDstPtr = reinterpret_cast <void *>(Dest.raw_handle );
17411754
17421755 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc,
1743- UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE);
1756+ UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
1757+ UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_IMAGE);
17441758
17451759 setType (detail::CGType::CopyImage);
17461760}
@@ -1760,8 +1774,10 @@ void handler::ext_oneapi_copy(
17601774 MDstPtr = reinterpret_cast <void *>(Dest.raw_handle );
17611775
17621776 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc,
1763- UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE, SrcOffset,
1764- {0 , 0 , 0 }, DestOffset, {0 , 0 , 0 }, CopyExtent);
1777+ UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE,
1778+ UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_IMAGE,
1779+ SrcOffset, {0 , 0 , 0 }, DestOffset, {0 , 0 , 0 },
1780+ CopyExtent);
17651781
17661782 setType (detail::CGType::CopyImage);
17671783}
@@ -1779,7 +1795,8 @@ void handler::ext_oneapi_copy(
17791795 MDstPtr = Dest;
17801796
17811797 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc,
1782- UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST, 0 ,
1798+ UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST,
1799+ UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM, 0 ,
17831800 DestRowPitch);
17841801
17851802 setType (detail::CGType::CopyImage);
@@ -1800,7 +1817,8 @@ void handler::ext_oneapi_copy(
18001817 MDstPtr = Dest;
18011818
18021819 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc,
1803- UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST, 0 ,
1820+ UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST,
1821+ UR_EXP_IMAGE_COPY_INPUT_TYPES_IMAGE_TO_MEM, 0 ,
18041822 DestRowPitch, SrcOffset, {0 , 0 , 0 }, DestOffset,
18051823 {0 , 0 , 0 }, CopyExtent);
18061824
@@ -1820,8 +1838,9 @@ void handler::ext_oneapi_copy(
18201838 MDstPtr = reinterpret_cast <void *>(Dest.raw_handle );
18211839
18221840 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc,
1823- UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE, SrcRowPitch,
1824- 0 );
1841+ UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE,
1842+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE,
1843+ SrcRowPitch, 0 );
18251844
18261845 setType (detail::CGType::CopyImage);
18271846}
@@ -1841,9 +1860,10 @@ void handler::ext_oneapi_copy(
18411860 MDstPtr = reinterpret_cast <void *>(Dest.raw_handle );
18421861
18431862 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc,
1844- UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE, SrcRowPitch,
1845- 0 , SrcOffset, {0 , 0 , 0 }, DestOffset, {0 , 0 , 0 },
1846- CopyExtent);
1863+ UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE,
1864+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_IMAGE,
1865+ SrcRowPitch, 0 , SrcOffset, {0 , 0 , 0 }, DestOffset,
1866+ {0 , 0 , 0 }, CopyExtent);
18471867
18481868 setType (detail::CGType::CopyImage);
18491869}
@@ -1864,7 +1884,8 @@ void handler::ext_oneapi_copy(
18641884 ur_exp_image_copy_flags_t ImageCopyFlags =
18651885 UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST;
18661886 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc, ImageCopyFlags,
1867- SrcRowPitch, DestRowPitch);
1887+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM, SrcRowPitch,
1888+ DestRowPitch);
18681889
18691890 setType (detail::CGType::CopyImage);
18701891}
@@ -1882,8 +1903,9 @@ void handler::ext_oneapi_copy(
18821903 ur_exp_image_copy_flags_t ImageCopyFlags =
18831904 UR_EXP_IMAGE_COPY_FLAG_HOST_TO_HOST;
18841905 detail::fill_copy_args (get_impl (), SrcImgDesc, DestImgDesc, ImageCopyFlags,
1885- SrcRowPitch, DestRowPitch, SrcOffset, {0 , 0 , 0 },
1886- DestOffset, {0 , 0 , 0 }, CopyExtent);
1906+ UR_EXP_IMAGE_COPY_INPUT_TYPES_MEM_TO_MEM, SrcRowPitch,
1907+ DestRowPitch, SrcOffset, {0 , 0 , 0 }, DestOffset,
1908+ {0 , 0 , 0 }, CopyExtent);
18871909
18881910 setType (detail::CGType::CopyImage);
18891911}
0 commit comments