Skip to content

Commit 3937455

Browse files
author
the-slow-one
authored
[SYCLomatic] Add migration support for eight mipmap texture API (#2743)
Signed-off-by: Deepak Raj H R <deepak.raj.h.r@intel.com>
1 parent 65c4307 commit 3937455

File tree

8 files changed

+256
-11
lines changed

8 files changed

+256
-11
lines changed

clang/lib/DPCT/RuleInfra/MapNames.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,11 @@ void MapNames::setExplicitNamespaceMap(
557557
DpctGlobalInfo::useExtBindlessImages()
558558
? getDpctNamespace() + "experimental::image_mem_wrapper_ptr"
559559
: "cudaMipmappedArray_t")},
560+
{"CUmipmappedArray",
561+
std::make_shared<TypeNameRule>(
562+
DpctGlobalInfo::useExtBindlessImages()
563+
? getDpctNamespace() + "experimental::image_mem_wrapper_ptr"
564+
: "CUmipmappedArray")},
560565
{"cudaTextureDesc",
561566
std::make_shared<TypeNameRule>(getDpctNamespace() + "sampling_info",
562567
HelperFeatureEnum::device_ext)},

clang/lib/DPCT/RulesLang/APINamesMemory.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ CONDITIONAL_FACTORY_ENTRY(
185185
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cudaGetMipmappedArrayLevel",
186186
MipmapNeedBindlessImage))
187187

188+
CONDITIONAL_FACTORY_ENTRY(
189+
UseExtBindlessImages,
190+
ASSIGNABLE_FACTORY(ASSIGN_FACTORY_ENTRY(
191+
"cuMipmappedArrayGetLevel", DEREF(makeCallArgCreatorWithCall(0)),
192+
MEMBER_CALL(ARG(1), true, "get_mip_level", ARG(2)))),
193+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuMipmappedArrayGetLevel",
194+
MipmapNeedBindlessImage))
195+
188196
CONDITIONAL_FACTORY_ENTRY(
189197
UseExtBindlessImages,
190198
ASSIGNABLE_FACTORY(ASSIGN_FACTORY_ENTRY(

clang/lib/DPCT/RulesLang/APINamesTexture.inc

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,67 @@ FEATURE_REQUEST_FACTORY(HelperFeatureEnum::device_ext,
314314
"image_matrix",
315315
ARG(1)))))
316316
ASSIGNABLE_FACTORY(DELETER_FACTORY_ENTRY("cuArrayDestroy", ARG(0)))
317+
318+
CONDITIONAL_FACTORY_ENTRY(
319+
UseExtBindlessImages,
320+
ASSIGNABLE_FACTORY(ASSIGN_FACTORY_ENTRY(
321+
"cuMipmappedArrayCreate", DEREF(0),
322+
NEW(DpctGlobalInfo::useExtBindlessImages()
323+
? MapNames::getDpctNamespace() +
324+
"experimental::image_mem_wrapper"
325+
: MapNames::getDpctNamespace() + "image_matrix",
326+
DEREF(1), ARG(2)))),
327+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuMipmappedArrayCreate",
328+
MipmapNeedBindlessImage))
329+
CONDITIONAL_FACTORY_ENTRY(
330+
UseExtBindlessImages,
331+
ASSIGNABLE_FACTORY(DELETER_FACTORY_ENTRY("cuMipmappedArrayDestroy",
332+
ARG(0))),
333+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuMipmappedArrayDestroy",
334+
MipmapNeedBindlessImage))
335+
336+
CONDITIONAL_FACTORY_ENTRY(
337+
UseExtBindlessImages,
338+
ASSIGNABLE_FACTORY(MEMBER_CALL_FACTORY_ENTRY("cuTexRefSetMipmappedArray",
339+
ARG(0), true, "attach",
340+
ARG(1))),
341+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuTexRefSetMipmappedArray",
342+
MipmapNeedBindlessImage))
343+
344+
CONDITIONAL_FACTORY_ENTRY(
345+
UseExtBindlessImages,
346+
ASSIGNABLE_FACTORY(MEMBER_CALL_FACTORY_ENTRY("cuTexRefSetMipmapFilterMode",
347+
ARG(0), true,
348+
"set_mip_filtering_mode",
349+
ARG(1))),
350+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuTexRefSetMipmapFilterMode",
351+
MipmapNeedBindlessImage))
352+
353+
CONDITIONAL_FACTORY_ENTRY(
354+
UseExtBindlessImages,
355+
ASSIGNABLE_FACTORY(ASSIGN_FACTORY_ENTRY(
356+
"cuTexRefGetMipmapFilterMode", DEREF(0),
357+
MEMBER_CALL(ARG(1), true, "get_mip_filtering_mode"))),
358+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuTexRefGetMipmapFilterMode",
359+
MipmapNeedBindlessImage))
360+
361+
CONDITIONAL_FACTORY_ENTRY(
362+
UseExtBindlessImages,
363+
ASSIGNABLE_FACTORY(MEMBER_CALL_FACTORY_ENTRY("cuTexRefGetMipmapLevelClamp",
364+
ARG(2), true,
365+
"get_mip_level_clamp", ARG(0),
366+
ARG(1))),
367+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuTexRefGetMipmapLevelClamp",
368+
MipmapNeedBindlessImage))
369+
370+
CONDITIONAL_FACTORY_ENTRY(
371+
UseExtBindlessImages,
372+
ASSIGNABLE_FACTORY(ASSIGN_FACTORY_ENTRY(
373+
"cuTexRefGetMipmappedArray", DEREF(0),
374+
MEMBER_CALL(ARG(1), true, "get_attached_mipmap_data"))),
375+
REMOVE_API_FACTORY_ENTRY_WITH_MSG("cuTexRefGetMipmappedArray",
376+
MipmapNeedBindlessImage))
377+
317378
ENTRY_UNSUPPORTED("cuTexObjectGetResourceViewDesc", Diagnostics::API_NOT_MIGRATED)
318379
FEATURE_REQUEST_FACTORY(
319380
HelperFeatureEnum::device_ext,

clang/lib/DPCT/RulesLang/RulesLangTexture.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,8 @@ void TextureRule::registerMatcher(MatchFinder &MF) {
520520
"CUresourcetype", "CUresourcetype_enum", "CUaddress_mode",
521521
"CUaddress_mode_enum", "CUfilter_mode", "CUfilter_mode_enum",
522522
"CUDA_TEXTURE_DESC", "CUtexref", "textureReference",
523-
"cudaMipmappedArray", "cudaMipmappedArray_t"))))))
523+
"cudaMipmappedArray", "cudaMipmappedArray_t",
524+
"CUmipmappedArray"))))))
524525
.bind("texType"),
525526
this);
526527

@@ -574,6 +575,9 @@ void TextureRule::registerMatcher(MatchFinder &MF) {
574575
"cuSurfObjectDestroy",
575576
"cuArray3DCreate_v2",
576577
"cuArrayCreate_v2",
578+
"cuMipmappedArrayCreate",
579+
"cuMipmappedArrayDestroy",
580+
"cuMipmappedArrayGetLevel",
577581
"cuArrayDestroy",
578582
"cuTexObjectCreate",
579583
"cuTexObjectDestroy",
@@ -589,6 +593,11 @@ void TextureRule::registerMatcher(MatchFinder &MF) {
589593
"cuTexRefGetFlags",
590594
"cuTexRefSetAddress_v2",
591595
"cuTexRefSetAddress2D_v3",
596+
"cuTexRefSetMipmappedArray",
597+
"cuTexRefGetMipmappedArray",
598+
"cuTexRefGetMipmapFilterMode",
599+
"cuTexRefSetMipmapFilterMode",
600+
"cuTexRefGetMipmapLevelClamp",
592601
};
593602

594603
auto hasAnyFuncName = [&]() {

clang/lib/DPCT/SrcAPI/APINames.inc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,9 +1712,9 @@ ENTRY(cuMemsetD32, cuMemsetD32_v2, true, NO_FLAG, P4, "comment")
17121712
ENTRY(cuMemsetD32Async, cuMemsetD32Async, true, NO_FLAG, P4, "comment")
17131713
ENTRY(cuMemsetD8, cuMemsetD8_v2, true, NO_FLAG, P4, "comment")
17141714
ENTRY(cuMemsetD8Async, cuMemsetD8Async, true, NO_FLAG, P4, "comment")
1715-
ENTRY(cuMipmappedArrayCreate, cuMipmappedArrayCreate, false, NO_FLAG, P4, "comment")
1716-
ENTRY(cuMipmappedArrayDestroy, cuMipmappedArrayDestroy, false, NO_FLAG, P4, "comment")
1717-
ENTRY(cuMipmappedArrayGetLevel, cuMipmappedArrayGetLevel, false, NO_FLAG, P4, "comment")
1715+
ENTRY(cuMipmappedArrayCreate, cuMipmappedArrayCreate, true, NO_FLAG, P4, "Successful")
1716+
ENTRY(cuMipmappedArrayDestroy, cuMipmappedArrayDestroy, true, NO_FLAG, P4, "Successful")
1717+
ENTRY(cuMipmappedArrayGetLevel, cuMipmappedArrayGetLevel, true, NO_FLAG, P4, "Successful")
17181718
ENTRY(cuMipmappedArrayGetMemoryRequirements, cuMipmappedArrayGetMemoryRequirements, false, NO_FLAG, P4, "comment")
17191719
ENTRY(cuMipmappedArrayGetSparseProperties, cuMipmappedArrayGetSparseProperties, false, NO_FLAG, P7, "comment")
17201720

@@ -1962,10 +1962,10 @@ ENTRY(cuTexRefGetFilterMode, cuTexRefGetFilterMode, true, NO_FLAG, P4, "Successf
19621962
ENTRY(cuTexRefGetFlags, cuTexRefGetFlags, true, NO_FLAG, P4, "Successful")
19631963
ENTRY(cuTexRefGetFormat, cuTexRefGetFormat, false, NO_FLAG, P4, "comment")
19641964
ENTRY(cuTexRefGetMaxAnisotropy, cuTexRefGetMaxAnisotropy, false, NO_FLAG, P4, "comment")
1965-
ENTRY(cuTexRefGetMipmapFilterMode, cuTexRefGetMipmapFilterMode, false, NO_FLAG, P4, "comment")
1965+
ENTRY(cuTexRefGetMipmapFilterMode, cuTexRefGetMipmapFilterMode, true, NO_FLAG, P4, "Successful")
19661966
ENTRY(cuTexRefGetMipmapLevelBias, cuTexRefGetMipmapLevelBias, false, NO_FLAG, P4, "comment")
1967-
ENTRY(cuTexRefGetMipmapLevelClamp, cuTexRefGetMipmapLevelClamp, false, NO_FLAG, P4, "comment")
1968-
ENTRY(cuTexRefGetMipmappedArray, cuTexRefGetMipmappedArray, false, NO_FLAG, P4, "comment")
1967+
ENTRY(cuTexRefGetMipmapLevelClamp, cuTexRefGetMipmapLevelClamp, true, NO_FLAG, P4, "Successful")
1968+
ENTRY(cuTexRefGetMipmappedArray, cuTexRefGetMipmappedArray, true, NO_FLAG, P4, "Successful")
19691969
ENTRY(cuTexRefSetAddress, cuTexRefSetAddress_v2, true, NO_FLAG, P4, "Successful")
19701970
ENTRY(cuTexRefSetAddress2D, cuTexRefSetAddress2D_v2, true, NO_FLAG, P4, "Successful")
19711971
ENTRY(cuTexRefSetAddressMode, cuTexRefSetAddressMode, true, NO_FLAG, P4, "Successful")
@@ -1975,10 +1975,10 @@ ENTRY(cuTexRefSetFilterMode, cuTexRefSetFilterMode, true, NO_FLAG, P4, "Successf
19751975
ENTRY(cuTexRefSetFlags, cuTexRefSetFlags, true, NO_FLAG, P4, "DPCT1074")
19761976
ENTRY(cuTexRefSetFormat, cuTexRefSetFormat, true, NO_FLAG, P4, "Successful")
19771977
ENTRY(cuTexRefSetMaxAnisotropy, cuTexRefSetMaxAnisotropy, false, NO_FLAG, P4, "comment")
1978-
ENTRY(cuTexRefSetMipmapFilterMode, cuTexRefSetMipmapFilterMode, false, NO_FLAG, P4, "comment")
1978+
ENTRY(cuTexRefSetMipmapFilterMode, cuTexRefSetMipmapFilterMode, true, NO_FLAG, P4, "Successful")
19791979
ENTRY(cuTexRefSetMipmapLevelBias, cuTexRefSetMipmapLevelBias, false, NO_FLAG, P4, "comment")
19801980
ENTRY(cuTexRefSetMipmapLevelClamp, cuTexRefSetMipmapLevelClamp, false, NO_FLAG, P4, "comment")
1981-
ENTRY(cuTexRefSetMipmappedArray, cuTexRefSetMipmappedArray, false, NO_FLAG, P4, "comment")
1981+
ENTRY(cuTexRefSetMipmappedArray, cuTexRefSetMipmappedArray, true, NO_FLAG, P4, "Successful")
19821982

19831983
// Surface Reference Management(Deprecated)
19841984
ENTRY(cuSurfRefGetArray, cuSurfRefGetArray, false, NO_FLAG, P4, "comment")

clang/runtime/dpct-rt/include/dpct/bindless_images.hpp

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,19 @@ class image_mem_wrapper {
420420

421421
init_mip_level_wrappers(q);
422422
}
423+
/// Create bindless image memory wrapper.
424+
/// \param [in] desc The image descriptor of bindless image.
425+
/// \param [in] num_levels Number of mipmap levels to allocate
426+
image_mem_wrapper(sycl::ext::oneapi::experimental::image_descriptor desc,
427+
unsigned int num_levels)
428+
: _desc(desc) {
429+
_desc.type = sycl::ext::oneapi::experimental::image_type::mipmap;
430+
_desc.num_levels = num_levels;
431+
auto q = get_default_queue();
432+
_handle = alloc_image_mem(_desc, q);
433+
init_mip_level_wrappers(q);
434+
}
435+
423436
image_mem_wrapper(const image_mem_wrapper &) = delete;
424437
image_mem_wrapper &operator=(const image_mem_wrapper &) = delete;
425438
/// Destroy bindless image memory wrapper.
@@ -462,6 +475,10 @@ class image_mem_wrapper {
462475
return _sub_wrappers + level;
463476
}
464477

478+
sycl::ext::oneapi::experimental::image_type get_image_type(void) {
479+
return _desc.type;
480+
}
481+
465482
private:
466483
image_mem_wrapper(
467484
const image_channel &channel,
@@ -564,11 +581,11 @@ class external_mem_wrapper_base {
564581
image_mem_wrapper *get_mapped_mipmapped_array() {
565582
if (_res_is_buffer) {
566583
throw std::runtime_error(
567-
"Buffer resouce cannot be accessed as an array!");
584+
"Buffer resource cannot be accessed as an array!");
568585
}
569586
if (!_res_img_mem_wrapper_ptr) {
570587
throw std::runtime_error(
571-
"Resouce is not mapped! "
588+
"Resource is not mapped! "
572589
"Resource should be mapped before accessing its memory.");
573590
}
574591

@@ -1717,6 +1734,41 @@ class bindless_image_wrapper_base {
17171734
return _img;
17181735
}
17191736

1737+
/// Set mipmap sample filtering mode for bindless image handle
1738+
/// \param [in] filtering_mode The mipmap filtering mode
1739+
inline void set_mip_filtering_mode(sycl::filtering_mode mode) {
1740+
auto sampling_info = get_sampling_info(_img);
1741+
sampling_info.set_mipmap_filtering(mode);
1742+
}
1743+
1744+
/// Get mipmap sample filtering mode for bindless image handle
1745+
/// \return The mipmap filtering mode
1746+
inline sycl::filtering_mode get_mip_filtering_mode(void) {
1747+
auto sampling_info = get_sampling_info(_img);
1748+
return sampling_info.get_mipmap_filtering();
1749+
}
1750+
1751+
/// Get mipmap sample filtering mode for bindless image handle
1752+
/// \return The mipmap filtering mode
1753+
inline void get_mip_level_clamp(float *min_level_clamp,
1754+
float *max_level_clamp) {
1755+
auto sampling_info = get_sampling_info(_img);
1756+
*min_level_clamp = sampling_info.get_min_mipmap_level_clamp();
1757+
*max_level_clamp = sampling_info.get_max_mipmap_level_clamp();
1758+
}
1759+
1760+
/// Get mipmap memory wrapper attached the bindless image
1761+
/// \return The mipmap memory wrapper
1762+
inline image_mem_wrapper *get_attached_mipmap_data(void) {
1763+
auto mem = detail::get_img_mem_map(_img);
1764+
1765+
if (mem->get_image_type() !=
1766+
sycl::ext::oneapi::experimental::image_type::mipmap)
1767+
throw std::runtime_error("Bindless image data is not of mipmap type");
1768+
1769+
return mem;
1770+
}
1771+
17201772
private:
17211773
image_channel _channel;
17221774
sycl::addressing_mode _addressing_mode = sycl::addressing_mode::clamp_to_edge;

clang/test/dpct/texture/texture_object_bindless_image.cu

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,3 +654,62 @@ int main() {
654654
cudaFreeMipmappedArray(pMipMapArr);
655655
return 0;
656656
}
657+
658+
// CHECK: void set_3D_descriptor(sycl::ext::oneapi::experimental::image_descriptor &desc) {
659+
void set_3D_descriptor(CUDA_ARRAY3D_DESCRIPTOR &desc) {
660+
desc.Width = 1;
661+
desc.Depth = 2;
662+
desc.Height = 1;
663+
// CHECK: desc.channel_type = sycl::image_channel_type::unsigned_int16;
664+
desc.Format = CU_AD_FORMAT_SIGNED_INT16;
665+
desc.NumChannels = 2;
666+
}
667+
668+
void test_mipmap_driver_api() {
669+
// CHECK: sycl::ext::oneapi::experimental::image_descriptor desc;
670+
CUDA_ARRAY3D_DESCRIPTOR desc;
671+
unsigned int numMipmapLevels = 2;
672+
set_3D_descriptor(desc);
673+
674+
// CHECK: dpct::experimental::image_mem_wrapper_ptr mmArray;
675+
CUmipmappedArray mmArray;
676+
677+
// CHECK: mmArray = new dpct::experimental::image_mem_wrapper(desc, numMipmapLevels);
678+
cuMipmappedArrayCreate(&mmArray, &desc, numMipmapLevels);
679+
680+
// CHECK: dpct::experimental::image_mem_wrapper_ptr *pArray;
681+
CUmipmappedArray *pArray;
682+
// CHECK: *pArray = new dpct::experimental::image_mem_wrapper(desc, numMipmapLevels);
683+
cuMipmappedArrayCreate(pArray, &desc, numMipmapLevels);
684+
685+
CUarray level_arr;
686+
// CHECK: level_arr = mmArray->get_mip_level(1);
687+
cuMipmappedArrayGetLevel(&level_arr, mmArray, 1);
688+
689+
CUtexref texRef;
690+
// CHECK: texRef->attach(mmArray);
691+
cuTexRefSetMipmappedArray(texRef, mmArray, 0);
692+
693+
// sycl::filter_mode fm = sycl::filtering_mode::nearest;
694+
CUfilter_mode fm = CU_TR_FILTER_MODE_POINT;
695+
696+
// CHECK: texRef->set_mip_filtering_mode(fm);
697+
cuTexRefSetMipmapFilterMode(texRef, fm);
698+
699+
// CHECK: fm = texRef->get_mip_filtering_mode();
700+
cuTexRefGetMipmapFilterMode(&fm, texRef);
701+
702+
float min_clamp, max_clamp;
703+
// CHECK: texRef->get_mip_level_clamp(&min_clamp, &max_clamp);
704+
cuTexRefGetMipmapLevelClamp(&min_clamp, &max_clamp, texRef);
705+
706+
CUmipmappedArray anotherArray;
707+
// CHECK: anotherArray = texRef->get_attached_mipmap_data();
708+
cuTexRefGetMipmappedArray(&anotherArray, texRef);
709+
710+
// CHECK: delete mmArray;
711+
cuMipmappedArrayDestroy(mmArray);
712+
713+
// CHECK: delete (*pArray);
714+
cuMipmappedArrayDestroy(*pArray);
715+
}

clang/test/dpct/texture_object.cu

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,4 +437,55 @@ void mipmap() {
437437
// CHECK-NEXT: DPCT1007:{{[0-9]+}}: Migration of cudaTextureDesc::maxMipmapLevelClamp is not supported.
438438
// CHECK-NEXT: */
439439
texDesc.maxMipmapLevelClamp = 1;
440+
441+
CUDA_ARRAY3D_DESCRIPTOR texdesc;
442+
unsigned int numMipmapLevels = 2;
443+
444+
CUmipmappedArray *pArray;
445+
// CHECK: /*
446+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuMipmappedArrayCreate was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
447+
// CHECK-NEXT: */
448+
cuMipmappedArrayCreate(pArray, &texdesc, numMipmapLevels);
449+
450+
CUarray level_arr;
451+
// CHECK: /*
452+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuMipmappedArrayGetLevel was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
453+
// CHECK-NEXT: */
454+
cuMipmappedArrayGetLevel(&level_arr, *pArray, 1);
455+
456+
CUtexref texRef;
457+
// CHECK: /*
458+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuTexRefSetMipmappedArray was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
459+
// CHECK-NEXT: */
460+
cuTexRefSetMipmappedArray(texRef, *pArray, 0);
461+
462+
// sycl::filter_mode fm = sycl::filtering_mode::nearest;
463+
CUfilter_mode fm = CU_TR_FILTER_MODE_POINT;
464+
465+
// CHECK: /*
466+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuTexRefSetMipmapFilterMode was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
467+
// CHECK-NEXT: */
468+
cuTexRefSetMipmapFilterMode(texRef, fm);
469+
470+
// CHECK: /*
471+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuTexRefGetMipmapFilterMode was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
472+
// CHECK-NEXT: */
473+
cuTexRefGetMipmapFilterMode(&fm, texRef);
474+
475+
float min_clamp, max_clamp;
476+
// CHECK: /*
477+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuTexRefGetMipmapLevelClamp was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
478+
// CHECK-NEXT: */
479+
cuTexRefGetMipmapLevelClamp(&min_clamp, &max_clamp, texRef);
480+
481+
CUmipmappedArray anotherArray;
482+
// CHECK: /*
483+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuTexRefGetMipmappedArray was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
484+
// CHECK-NEXT: */
485+
cuTexRefGetMipmappedArray(&anotherArray, texRef);
486+
487+
// CHECK: /*
488+
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cuMipmappedArrayDestroy was removed because SYCL currently does not support mipmap image type. You can migrate the code with bindless images by specifying --use-experimental-features=bindless_images.
489+
// CHECK-NEXT: */
490+
cuMipmappedArrayDestroy(*pArray);
440491
}

0 commit comments

Comments
 (0)