SWDEV-432180 - Support hipArraySurfaceLoadStore

Make hipExternalMemoryGetMappedMipmappedArray() accept
hipArraySurfaceLoadStore.
Make hipCreateSurfaceObject() check hipArraySurfaceLoadStore
flag. If flag is hipArrayDefault, hipCreateSurfaceObject() will
also pass to prevent failure of catch2/swissknife tests.

Change-Id: Ifb7db2db14e0c2208a9661cfa33887ec61ab26a5
This commit is contained in:
Tao Sang
2023-11-13 14:42:59 -05:00
committed by Tao Sang
parent c4f773db0b
commit 1c442658ca
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -4265,6 +4265,7 @@ hipError_t ihipMipmappedArrayGetLevel(hipArray_t* level_array_pptr,
(*level_array_pptr)->NumChannels = hip::getNumChannels((*level_array_pptr)->desc);
(*level_array_pptr)->isDrv = 0;
(*level_array_pptr)->textureType = 0;
(*level_array_pptr)->flags = mipmapped_array_ptr->flags;
amd::ScopedLock lock(hip::hipArraySetLock);
hip::hipArraySet.insert(*level_array_pptr);
@@ -4338,8 +4339,7 @@ hipError_t hipExternalMemoryGetMappedMipmappedArray(
hipMipmappedArray_t* mipmap, hipExternalMemory_t extMem,
const hipExternalMemoryMipmappedArrayDesc* mipmapDesc) {
HIP_INIT_API(hipExternalMemoryGetMappedMipmappedArray, mipmap, extMem, mipmapDesc);
if (mipmap == nullptr || extMem == nullptr || mipmapDesc == nullptr ||
mipmapDesc->flags != hipArrayDefault) {
if (mipmap == nullptr || extMem == nullptr || mipmapDesc == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
CHECK_STREAM_CAPTURE_SUPPORTED();